Fixed flashing text issue, moved textbox to window layer.
This commit is contained in:
@@ -77,6 +77,8 @@ void conversationTextboxSetText(char *text) {
|
||||
// Now we have organized the string nicely we can prep for rendering. Fill the
|
||||
// tiles with blank chars.
|
||||
textboxFillBlank();
|
||||
WY_REG = TEXTBOX_WINDOW_Y * TILE_HEIGHT;
|
||||
SHOW_WIN;
|
||||
}
|
||||
|
||||
inline void textboxFillBlank() {
|
||||
@@ -86,8 +88,8 @@ inline void textboxFillBlank() {
|
||||
tiles, TEXTBOX_WIDTH_IN_TILES, TEXTBOX_HEIGHT_IN_TILES, SPRITE_TILESET_WHITE_HIGH
|
||||
);
|
||||
|
||||
spriteBufferBackgroundHigh(
|
||||
0x00, TEXTBOX_WIN_Y,
|
||||
spriteBufferWindow(
|
||||
0x00, TEXTBOX_Y,
|
||||
TEXTBOX_WIDTH_IN_TILES, TEXTBOX_HEIGHT_IN_TILES,
|
||||
tiles
|
||||
);
|
||||
@@ -108,6 +110,7 @@ inline void conversationTextboxUpdate() {
|
||||
if((TEXTBOX_ROW_COUNT - TEXTBOX_ROW_CURRENT) < TEXTBOX_TILES_ROWS) {
|
||||
TEXTBOX_STATE &= ~TEXTBOX_STATE_VISIBLE;
|
||||
HIDE_WIN;
|
||||
LCDC_REG |= LCDCF_BG8000;
|
||||
conversationQueueNext();
|
||||
return;
|
||||
}
|
||||
@@ -129,9 +132,9 @@ inline void conversationTextboxUpdate() {
|
||||
} else {
|
||||
tile = spriteFontTileFromChar(c);
|
||||
|
||||
spriteBufferBackgroundHigh(
|
||||
spriteBufferWindow(
|
||||
0x01 + (TEXTBOX_SCROLL % TEXTBOX_CHARS_PER_ROW),
|
||||
TEXTBOX_WIN_Y + 0x01 + (TEXTBOX_SCROLL / TEXTBOX_CHARS_PER_ROW),
|
||||
TEXTBOX_Y + 0x01 + (TEXTBOX_SCROLL / TEXTBOX_CHARS_PER_ROW),
|
||||
1, 1,
|
||||
&tile
|
||||
);
|
||||
|
Reference in New Issue
Block a user