diff --git a/TODO.txt b/TODO.txt index 4aa8c10..4c5d750 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,7 @@ =========== GENERAL ============== +- popup messages? would be useful for several things: showing checkpoint times, + showing changes in menu etc. - prevent time overflow! stop incrementing level frame once it's at maximum - asset system: - assets are to be loaded from one BIG string consisting of substrings, each diff --git a/assets.h b/assets.h index 3cf4152..2394cf7 100644 --- a/assets.h +++ b/assets.h @@ -77,7 +77,15 @@ static const char *LCR_internalResourceFile = " map end " "#Mmap2;1 :*H1k0J :,s0s0 :fd190 " + "#Rtestrepl;aaa#Rrepl2;" "#Mmap3;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap4;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap5;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap6;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap7;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap8;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap9;1 :*H1k0J :,s0s0 :fd190 " + "#Mmap10;1 :*H1k0J :,s0s0 :fd190 " ; #define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image diff --git a/game.h b/game.h index 8b621b6..49af79c 100644 --- a/game.h +++ b/game.h @@ -677,8 +677,11 @@ void LCR_gameHandleInput(void) break; } - if (tabSwitchedTo) - LCR_gameLoadResourceFileChunk(0,tabSwitchedTo == 1 ? 'M' : 'R'); + if (tabSwitchedTo || scrolled != 0) + LCR_gameLoadResourceFileChunk( + tabSwitchedTo ? 0 : (LCR_game.resourceFile.firstItemIndex + + scrolled * LCR_RESOURCE_ITEM_CHUNK), + LCR_game.menuSelectedTab == 1 ? 'M' : 'R'); } uint8_t LCR_gameStep(uint32_t time) diff --git a/renderer.h b/renderer.h index 522c340..a2e7f99 100644 --- a/renderer.h +++ b/renderer.h @@ -1752,18 +1752,18 @@ void LCR_rendererDrawMenu(const char **items, unsigned char itemCount, for (int j = 0; j < itemCount; ++j) { if (j == selectedItem + 1) - for (int y = i - 10; y < i + LCR_rendererComputeTextHeight(4) + 10; ++y) + for (int y = i - 10; y < i + LCR_rendererComputeTextHeight(3) + 10; ++y) for (int x = LCR_EFFECTIVE_RESOLUTION_X / 4; x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4; ++x) LCR_drawPixelXYSafe(x,y,0x5c1b); LCR_rendererDrawText(items[j],(LCR_EFFECTIVE_RESOLUTION_X - - LCR_rendererComputeTextWidth(items[j],4)) / 2,i,0xffff,4); + LCR_rendererComputeTextWidth(items[j],3)) / 2,i,0xffff,3); if (j == 0) i = stripHeight + stripHeight2; - i += LCR_rendererComputeTextHeight(7); + i += LCR_rendererComputeTextHeight(5); } #if !LCR_SETTING_POTATO_GRAPHICS