Continue menu
This commit is contained in:
parent
44f748134f
commit
6bf3a950dc
4 changed files with 18 additions and 5 deletions
2
TODO.txt
2
TODO.txt
|
@ -1,5 +1,7 @@
|
||||||
=========== GENERAL ==============
|
=========== 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
|
- prevent time overflow! stop incrementing level frame once it's at maximum
|
||||||
- asset system:
|
- asset system:
|
||||||
- assets are to be loaded from one BIG string consisting of substrings, each
|
- assets are to be loaded from one BIG string consisting of substrings, each
|
||||||
|
|
8
assets.h
8
assets.h
|
@ -77,7 +77,15 @@ static const char *LCR_internalResourceFile =
|
||||||
" map end "
|
" map end "
|
||||||
|
|
||||||
"#Mmap2;1 :*H1k0J :,s0s0 :fd190 "
|
"#Mmap2;1 :*H1k0J :,s0s0 :fd190 "
|
||||||
|
"#Rtestrepl;aaa#Rrepl2;"
|
||||||
"#Mmap3;1 :*H1k0J :,s0s0 :fd190 "
|
"#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
|
#define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image
|
||||||
|
|
7
game.h
7
game.h
|
@ -677,8 +677,11 @@ void LCR_gameHandleInput(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tabSwitchedTo)
|
if (tabSwitchedTo || scrolled != 0)
|
||||||
LCR_gameLoadResourceFileChunk(0,tabSwitchedTo == 1 ? 'M' : 'R');
|
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)
|
uint8_t LCR_gameStep(uint32_t time)
|
||||||
|
|
|
@ -1752,18 +1752,18 @@ void LCR_rendererDrawMenu(const char **items, unsigned char itemCount,
|
||||||
for (int j = 0; j < itemCount; ++j)
|
for (int j = 0; j < itemCount; ++j)
|
||||||
{
|
{
|
||||||
if (j == selectedItem + 1)
|
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;
|
for (int x = LCR_EFFECTIVE_RESOLUTION_X / 4;
|
||||||
x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4; ++x)
|
x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4; ++x)
|
||||||
LCR_drawPixelXYSafe(x,y,0x5c1b);
|
LCR_drawPixelXYSafe(x,y,0x5c1b);
|
||||||
|
|
||||||
LCR_rendererDrawText(items[j],(LCR_EFFECTIVE_RESOLUTION_X -
|
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)
|
if (j == 0)
|
||||||
i = stripHeight + stripHeight2;
|
i = stripHeight + stripHeight2;
|
||||||
|
|
||||||
i += LCR_rendererComputeTextHeight(7);
|
i += LCR_rendererComputeTextHeight(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !LCR_SETTING_POTATO_GRAPHICS
|
#if !LCR_SETTING_POTATO_GRAPHICS
|
||||||
|
|
Loading…
Reference in a new issue