Add map beating
This commit is contained in:
parent
2172fcedd1
commit
ea105ba3f3
6 changed files with 119 additions and 18 deletions
24
renderer.h
24
renderer.h
|
@ -1789,8 +1789,8 @@ void LCR_rendererBlitImage(uint8_t index, unsigned int x, unsigned int y,
|
|||
void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
||||
unsigned char itemCount,char selectedItem)
|
||||
{
|
||||
int stripHeight = LCR_EFFECTIVE_RESOLUTION_Y / 4;
|
||||
int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 10;
|
||||
int stripHeight = (2 * LCR_EFFECTIVE_RESOLUTION_Y) / 7;
|
||||
int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 9;
|
||||
int i = 0;
|
||||
uint16_t effect = LCR_renderer.frame >> 1;
|
||||
|
||||
|
@ -1798,13 +1798,13 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
|||
|
||||
while (i < stripHeight * LCR_EFFECTIVE_RESOLUTION_X)
|
||||
{
|
||||
LCR_drawPixel(i,0xd69b
|
||||
LCR_drawPixel(i,0x4a8c
|
||||
#if LCR_SETTING_POTATO_GRAPHICS
|
||||
);
|
||||
#else
|
||||
^ (effect & 0x18e3));
|
||||
^ (effect & 0x1827));
|
||||
|
||||
effect += 7;
|
||||
effect += 3;
|
||||
#endif
|
||||
|
||||
++i;
|
||||
|
@ -1850,6 +1850,16 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
|||
for (int j = 0; j < itemCount + 1; ++j)
|
||||
{
|
||||
const char *s = j ? items[j - 1] : tabName;
|
||||
const char *s2 = s;
|
||||
uint16_t textColor = 0x5aeb;
|
||||
|
||||
while (*s2) // if the item contains '#' (check), we draw it as green
|
||||
{
|
||||
if (*s2 == '#')
|
||||
textColor = 0x0700;
|
||||
|
||||
s2++;
|
||||
}
|
||||
|
||||
if (j == selectedItem + 1)
|
||||
for (int y = i - 10; y < i + LCR_rendererComputeTextHeight(3) + 10; ++y)
|
||||
|
@ -1859,7 +1869,7 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
|||
|
||||
LCR_rendererDrawText(s,(LCR_EFFECTIVE_RESOLUTION_X -
|
||||
LCR_rendererComputeTextWidth(s,3)) / 2,i,
|
||||
(j == 0 || j == selectedItem + 1) ? 0xf79c : 0x5aeb,3);
|
||||
(j == 0 || j == selectedItem + 1) ? 0xf79c : textColor,3);
|
||||
|
||||
if (j == 0)
|
||||
i = stripHeight + stripHeight2;
|
||||
|
@ -1873,7 +1883,7 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
|||
stripHeight / LCR_IMAGE_SIZE,0xffff);
|
||||
#endif
|
||||
|
||||
LCR_rendererDrawText(LCR_texts[LCR_TEXTS_VERSION],5,5,0xffff,2);
|
||||
LCR_rendererDrawText(LCR_texts[LCR_TEXTS_VERSION],5,5,0xe71c,2);
|
||||
|
||||
LCR_renderer.frame++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue