Add 332 color
This commit is contained in:
parent
76cc3227bb
commit
b4aa9cd867
9 changed files with 128 additions and 29 deletions
22
game.h
22
game.h
|
@ -441,7 +441,8 @@ void _LCR_physicdDebugDrawPixel(uint16_t x, uint16_t y, uint8_t color)
|
|||
if (x > 1 && x < LCR_EFFECTIVE_RESOLUTION_X - 2 &&
|
||||
y > 1 && y < LCR_EFFECTIVE_RESOLUTION_Y - 2)
|
||||
{
|
||||
uint16_t c = 0x8101 | (0x8f1f << (2 * color));
|
||||
uint16_t c = LCR_CONVERT_COLOR(0x8101) |
|
||||
(LCR_CONVERT_COLOR(0x8f1f) << (2 * color));
|
||||
|
||||
for (int j = -1; j <= 2; ++j)
|
||||
for (int i = -1; i <= 2; ++i)
|
||||
|
@ -1204,10 +1205,11 @@ void LCR_gameDrawPopupMessage(void)
|
|||
int textW = LCR_rendererComputeTextWidth(LCR_game.popupStr,_TEXT_SIZE);
|
||||
|
||||
LCR_rendererDrawRect((LCR_EFFECTIVE_RESOLUTION_X - textW - 2 * LCR_GUI_GAP)
|
||||
/ 2,_OFFSET_V,textW + 2 * LCR_GUI_GAP,textH + 2 * LCR_GUI_GAP,0xffff,1);
|
||||
/ 2,_OFFSET_V,textW + 2 * LCR_GUI_GAP,textH + 2 * LCR_GUI_GAP,
|
||||
LCR_CONVERT_COLOR(0xffff),1);
|
||||
|
||||
LCR_rendererDrawText(LCR_game.popupStr,(LCR_EFFECTIVE_RESOLUTION_X - textW)
|
||||
/ 2,_OFFSET_V + LCR_GUI_GAP,0x0300,_TEXT_SIZE);
|
||||
/ 2,_OFFSET_V + LCR_GUI_GAP,LCR_CONVERT_COLOR(0x0300),_TEXT_SIZE);
|
||||
|
||||
#undef _OFFSET_V
|
||||
#undef _TEXT_SIZE
|
||||
|
@ -1287,12 +1289,13 @@ void LCR_gameDraw3DView(void)
|
|||
LCR_rendererComputeTextWidth(str,4)) / 2),
|
||||
LCR_EFFECTIVE_RESOLUTION_Y / 2,
|
||||
LCR_game.runTime <= LCR_currentMap.targetTime ?
|
||||
0x0700 : 0x4208,4);
|
||||
LCR_CONVERT_COLOR(0x0700) : LCR_CONVERT_COLOR(0x4208),4);
|
||||
|
||||
LCR_gameTimeToStr(LCR_currentMap.targetTime * LCR_RACING_TICK_MS,str);
|
||||
|
||||
LCR_rendererDrawText(str,LCR_GUI_GAP,LCR_EFFECTIVE_RESOLUTION_Y -
|
||||
LCR_rendererComputeTextHeight(2) - LCR_GUI_GAP,0x4208,2);
|
||||
LCR_rendererComputeTextHeight(2) - LCR_GUI_GAP,
|
||||
LCR_CONVERT_COLOR(0x4208),2);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -1627,11 +1630,14 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
if (LCR_racingGetCarSpeedUnsigned() > 60)
|
||||
{
|
||||
if (LCR_racingCurrentGroundMaterial() == LCR_BLOCK_MATERIAL_GRASS)
|
||||
LCR_rendererSetParticles(0x538a);
|
||||
LCR_rendererSetParticles(
|
||||
LCR_CONVERT_COLOR(LCR_SETTING_PARTICLE_COLOR_GRASS));
|
||||
else if (LCR_racingCurrentGroundMaterial() == LCR_BLOCK_MATERIAL_DIRT)
|
||||
LCR_rendererSetParticles(0x8c2b);
|
||||
LCR_rendererSetParticles(
|
||||
LCR_CONVERT_COLOR(LCR_SETTING_PARTICLE_COLOR_DIRT));
|
||||
else if (LCR_racingCarIsDrifting())
|
||||
LCR_rendererSetParticles(0x4208);
|
||||
LCR_rendererSetParticles(
|
||||
LCR_CONVERT_COLOR(LCR_SETTING_PARTICLE_COLOR_DRIFT));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue