Add logo
This commit is contained in:
parent
a5325cece6
commit
a30be11bf9
3 changed files with 329 additions and 5 deletions
36
renderer.h
36
renderer.h
|
@ -1676,11 +1676,39 @@ void LCR_rendererCameraFollow(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void LCR_rendererBlitImage(uint8_t index, unsigned int x, unsigned int y,
|
||||
uint8_t scale, uint16_t transparentColor)
|
||||
{
|
||||
if (scale == 0 || x + LCR_IMAGE_SIZE * scale >= LCR_EFFECTIVE_RESOLUTION_X ||
|
||||
y + LCR_IMAGE_SIZE * scale >= LCR_EFFECTIVE_RESOLUTION_Y)
|
||||
return;
|
||||
|
||||
for (int m = 0; m < scale; ++m)
|
||||
for (int n = 0; n < scale; ++n)
|
||||
{
|
||||
LCR_loadImage(index);
|
||||
for (int k = 0; k < LCR_IMAGE_SIZE; ++k)
|
||||
{
|
||||
int i = (y + m + k * scale) * LCR_EFFECTIVE_RESOLUTION_X + x + n;
|
||||
|
||||
for (int l = 0; l < LCR_IMAGE_SIZE; ++l)
|
||||
{
|
||||
uint16_t color = LCR_getNextImagePixel();
|
||||
|
||||
if (color != transparentColor)
|
||||
LCR_drawPixel(i,color);
|
||||
|
||||
i += scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LCR_rendererDrawMenu(const char **items, unsigned char itemCount,
|
||||
char selectedItem)
|
||||
{
|
||||
int stripHeight = LCR_EFFECTIVE_RESOLUTION_Y / 5;
|
||||
int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 8;
|
||||
int stripHeight = LCR_EFFECTIVE_RESOLUTION_Y / 4;
|
||||
int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 10;
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
@ -1730,6 +1758,10 @@ void LCR_rendererDrawMenu(const char **items, unsigned char itemCount,
|
|||
|
||||
i += LCR_rendererComputeTextHeight(7);
|
||||
}
|
||||
|
||||
LCR_rendererBlitImage(21,(LCR_EFFECTIVE_RESOLUTION_X -
|
||||
LCR_IMAGE_SIZE * (stripHeight / LCR_IMAGE_SIZE)) / 2,0,
|
||||
stripHeight / LCR_IMAGE_SIZE,0xffff);
|
||||
}
|
||||
|
||||
void LCR_rendererCameraReset(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue