diff --git a/game.h b/game.h index ae644a8..d45df51 100644 --- a/game.h +++ b/game.h @@ -866,7 +866,8 @@ uint8_t LCR_gameStep(uint32_t time) LCR_rendererMarkTakenCP(carBlock[0],carBlock[1],carBlock[2]); LCR_audioPlaySound(LCR_SOUND_CLICK); } - else if (events & LCR_RACING_EVENT_FINISHED) + else if (events & LCR_RACING_EVENT_FINISHED && + LCR_game.state != LCR_GAME_STATE_RUN_FINISHED) { LCR_LOG1("finished"); LCR_audioPlaySound(LCR_SOUND_CLICK); diff --git a/renderer.h b/renderer.h index adc98cf..3687cdf 100644 --- a/renderer.h +++ b/renderer.h @@ -1521,42 +1521,6 @@ void LCR_rendererDrawLOD(void) #endif } -void LCR_drawLevelFloor(void) -{ - LCR_LOG2("drawing floor"); - -#if LCR_SETTING_FLOOR_PARTICLE_SIZE != 0 -#define _STEP ((LCR_MAP_SIZE_BLOCKS * LCR_RENDERER_UNIT) / LCR_SETTING_FLOOR_PARTICLE_RESOLUTION) - - S3L_Vec4 floorPoint, projectedPoint; - - floorPoint.z = -1 * (LCR_MAP_SIZE_BLOCKS / 2) * LCR_RENDERER_UNIT + _STEP / 2; - floorPoint.y = -1 *(LCR_MAP_SIZE_BLOCKS / 2) * (LCR_RENDERER_UNIT / 2); - floorPoint.w = LCR_SETTING_RESOLUTION_X / LCR_SETTING_FLOOR_PARTICLE_SIZE; - - for (uint8_t j = 0; j < LCR_SETTING_FLOOR_PARTICLE_RESOLUTION; ++j) - { - floorPoint.x = -1 * (LCR_MAP_SIZE_BLOCKS / 2) * LCR_RENDERER_UNIT - + _STEP / 2; - - for (uint8_t i = 0; i < LCR_SETTING_FLOOR_PARTICLE_RESOLUTION; ++i) - { - S3L_project3DPointToScreen(floorPoint,LCR_renderer.scene.camera, - &projectedPoint); - - if (projectedPoint.w > 0 && projectedPoint.w < LCR_EFFECTIVE_RESOLUTION_X) - LCR_rendererDrawRect(projectedPoint.x,projectedPoint.y, - projectedPoint.w,projectedPoint.w,LCR_SETTING_LOD_COLOR,1); - - floorPoint.x += _STEP; - } - - floorPoint.z += _STEP; - } -#undef _STEP -#endif -} - #if LCR_ANIMATE_CAR void _LCR_rendererAnimateCar(void) { @@ -1749,7 +1713,7 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, while (i < stripHeight * LCR_EFFECTIVE_RESOLUTION_X) { - LCR_drawPixel(i,0x8ddc + LCR_drawPixel(i,0xd69b #if LCR_SETTING_POTATO_GRAPHICS ); #else @@ -1785,7 +1749,13 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, while (i < LCR_EFFECTIVE_RESOLUTION_Y * LCR_EFFECTIVE_RESOLUTION_X) { - LCR_drawPixel(i,0xbdf7); + LCR_drawPixel(i,0xce9c +#if LCR_SETTING_POTATO_GRAPHICS + ); +#else + + (i & 0x1002)); +#endif + ++i; } @@ -1803,7 +1773,8 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, LCR_drawPixelXYSafe(x,y,0x5c1b + 4 * ((x & 0x10) == (y & 0x10))); LCR_rendererDrawText(s,(LCR_EFFECTIVE_RESOLUTION_X - - LCR_rendererComputeTextWidth(s,3)) / 2,i,0xffff,3); + LCR_rendererComputeTextWidth(s,3)) / 2,i, + (j == 0 || j == selectedItem + 1) ? 0xf79c : 0x5aeb,3); if (j == 0) i = stripHeight + stripHeight2; @@ -1872,7 +1843,6 @@ void LCR_rendererDraw3D(void) LCR_renderer.scene.camera.transform.rotation.y, -4 * LCR_renderer.scene.camera.transform.rotation.x); - LCR_drawLevelFloor(); LCR_rendererDrawLOD(); LCR_LOG2("3D rendering (start)");