diff --git a/assets/sm.png b/assets/images/sm.png similarity index 100% rename from assets/sm.png rename to assets/images/sm.png diff --git a/src/conversation/textbox.c b/src/conversation/textbox.c index 63e5b1a..ef20cfd 100644 --- a/src/conversation/textbox.c +++ b/src/conversation/textbox.c @@ -137,20 +137,19 @@ inline void conversationTextboxUpdate() { // Have we finished scrolling? if(TEXTBOX_STATE & TEXTBOX_STATE_SCROLLED) { // Is the user trying to go to the next line? - BGB_printf("has scrolled"); - if(INPUT_STATE & INPUT_BIND_TEXT_SKIP) { + if(INPUT_STATE & J_A) { // First, lets figure out if there's any more text to reveal or not. - if((TEXTBOX_ROW_COUNT - TEXTBOX_ROW_CURRENT) >= TEXTBOX_TILES_ROWS) { + if((TEXTBOX_ROW_COUNT - TEXTBOX_ROW_CURRENT) < TEXTBOX_TILES_ROWS) { TEXTBOX_STATE &= ~TEXTBOX_STATE_VISIBLE; + HIDE_WIN; return; } - TEXTBOX_STATE &= ~(TEXTBOX_STATE_SCROLLED); + TEXTBOX_STATE &= ~TEXTBOX_STATE_SCROLLED; + TEXTBOX_SCROLL = 0; TEXTBOX_ROW_CURRENT += TEXTBOX_TILES_ROWS; textboxFillBlank(); - BGB_printf("tst"); } - return; } @@ -161,7 +160,7 @@ inline void conversationTextboxUpdate() { if(TEXTBOX_SCROLL == TEXTBOX_CHARS_MAX) { TEXTBOX_STATE |= TEXTBOX_STATE_SCROLLED; } else { - tiles[0] = c - 33 + 4; + tiles[0] = c - 33 + FONT_DATA_POSITION; set_win_tiles( 1 + (TEXTBOX_SCROLL % TEXTBOX_CHARS_PER_ROW), 1 + (TEXTBOX_SCROLL / TEXTBOX_CHARS_PER_ROW), diff --git a/src/conversation/textbox.h b/src/conversation/textbox.h index 00b1100..d584af6 100644 --- a/src/conversation/textbox.h +++ b/src/conversation/textbox.h @@ -23,6 +23,8 @@ #define BORDER_TILE_BOTTOM_CENTER BORDER_TILE_BOTTOM_LEFT + 1 #define BORDER_TILE_BOTTOM_RIGHT BORDER_TILE_BOTTOM_CENTER + 1 +#define TEXTBOX_WIN_Y 0 + #define TEXTBOX_STATE_VISIBLE (1 << 0) #define TEXTBOX_STATE_SCROLLED (1 << 1) diff --git a/src/display/tilemap.h b/src/display/tilemap.h index ad9424a..d11227f 100644 --- a/src/display/tilemap.h +++ b/src/display/tilemap.h @@ -10,6 +10,6 @@ #include "BORDER.h" // #include "SM.h" -#define FONT_DATA_POSITION 0x04 +#define FONT_DATA_POSITION 0x80 #define BORDER_DATA_POSITION FONT_DATA_POSITION+FONT_IMAGE_TILES // #define SM_DATA_POSITION BORDER_DATA_POSITION+BORDER_IMAGE_TILES diff --git a/src/input.h b/src/input.h index 276c378..c0d87ff 100644 --- a/src/input.h +++ b/src/input.h @@ -8,6 +8,4 @@ #pragma once #include "libs.h" -#define INPUT_BIND_TEXT_SKIP J_A - extern uint8_t INPUT_STATE; \ No newline at end of file