diff --git a/TODO.txt b/TODO.txt index 7560afc..8991dae 100644 --- a/TODO.txt +++ b/TODO.txt @@ -15,7 +15,7 @@ fuck issue trackers :D - make some kinda repo for world record runs? how will they submit it? - final tests: - very long replay - - different resolutions + - different resolutions KINDA DID 1x - different settings (332, POTATO, ...) - crazy shit with physics - replay with input not occuring for more that LCR_SETTING_GHOST_STEP @@ -39,6 +39,8 @@ fuck issue trackers :D =========== HANDLED ============== - should drifting make a sound? NO NEED +- particles in free camera mode are very big if far away from the car (maybe + just turn them off in this mode?) - make helper header for PC frontends that use stdio for data file, parse arguments etc. - make car turned on its back behave nicer? but how? PROLLY NOT diff --git a/game.h b/game.h index ee6f66f..f7ddc92 100644 --- a/game.h +++ b/game.h @@ -496,8 +496,13 @@ void LCR_gameResetRun(uint8_t replay, uint8_t ghost) LCR_rendererUnmarkCPs(); LCR_racingGetCarTransform(carTransform,carTransform + 3,0); LCR_rendererSetCarTransform(carTransform,carTransform + 3); - LCR_rendererCameraReset(); - LCR_rendererLoadMapChunks(); + + if (LCR_game.cameraMode != LCR_CAMERA_MODE_FREE) + { + LCR_rendererCameraReset(); + LCR_rendererLoadMapChunks(); + } + LCR_game.ghost.active = ghost; LCR_gameSetState(LCR_GAME_STATE_RUN_STARTING); LCR_game.runTime = 0; @@ -1318,8 +1323,8 @@ void LCR_gameDraw3DView(void) LCR_rendererDrawText(str,LCR_GUI_GAP,LCR_EFFECTIVE_RESOLUTION_Y - 2 * (LCR_rendererComputeTextHeight(_FONT_SIZE) + LCR_GUI_GAP),0,_FONT_SIZE); else - LCR_rendererDrawText(str,((LCR_EFFECTIVE_RESOLUTION_X - - LCR_rendererComputeTextWidth(str,4)) / 2), + LCR_rendererDrawText(str,(LCR_EFFECTIVE_RESOLUTION_X - + LCR_rendererComputeTextWidth(str,2 * _FONT_SIZE)) / 2, LCR_EFFECTIVE_RESOLUTION_Y / 2, LCR_game.runTime <= LCR_currentMap.targetTime ? LCR_CONVERT_COLOR(0x0700) : LCR_CONVERT_COLOR(0x4208),2 * _FONT_SIZE); diff --git a/renderer.h b/renderer.h index 4a911a1..17d2b4c 100644 --- a/renderer.h +++ b/renderer.h @@ -34,7 +34,7 @@ #define S3L_Z_BUFFER 1 #define LCR_FONT_PIXEL_SIZE (1 + LCR_EFFECTIVE_RESOLUTION_X / 512) #define LCR_ANIMATE_CAR (LCR_SETTING_CAR_ANIMATION_SUBDIVIDE != 0) -#define LCR_ANT_RESOLUTION (LCR_EFFECTIVE_RESOLUTION_Y <= 96) +#define LCR_ANT_RESOLUTION (LCR_EFFECTIVE_RESOLUTION_Y <= 110) #if LCR_SETTING_POTATO_GRAPHICS #undef S3L_PERSPECTIVE_CORRECTION @@ -68,7 +68,7 @@ #define LCR_RENDERER_CAR_SCALE (LCR_RENDERER_UNIT / 4) -#define LCR_RENDERER_FONT_SEGMENT_SIZE (2 + LCR_EFFECTIVE_RESOLUTION_X / 512) +#define LCR_RENDERER_FONT_SEGMENT_SIZE (2 + LCR_EFFECTIVE_RESOLUTION_Y / 320) /** For some reason the map model is a bit misaligned with physics world, this kinda hotfixes it -- later try to discover source of this bug. TODO */ @@ -1959,8 +1959,10 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, unsigned char itemCount,char selectedItem, char scroll) { #if !LCR_ANT_RESOLUTION - int stripHeight = (2 * LCR_EFFECTIVE_RESOLUTION_Y) / 7; - int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 9; +int stripHeight = (2 * LCR_EFFECTIVE_RESOLUTION_Y) / 11; +int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 12; +// int stripHeight = (2 * LCR_EFFECTIVE_RESOLUTION_Y) / 7; +// int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 9; #else int stripHeight = 6; int stripHeight2 = 0; @@ -2002,8 +2004,8 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, for (int x = 0; x < LCR_EFFECTIVE_RESOLUTION_X; ++x) { LCR_gameDrawPixel(i,(x > LCR_EFFECTIVE_RESOLUTION_X / 4 - limit && - (x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4 + limit) - ? LCR_CONVERT_COLOR(0x73ae) : LCR_CONVERT_COLOR(0x31a6)) + + (x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4 + + limit) ? LCR_CONVERT_COLOR(0x73ae) : LCR_CONVERT_COLOR(0x31a6)) + ((x + y) % 8)); i++; } @@ -2022,7 +2024,7 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, ++i; } - i = stripHeight + (stripHeight2 - LCR_rendererComputeTextHeight(3)) / 2; + i = stripHeight + (stripHeight2 - LCR_rendererComputeTextHeight(3)) / 2 + 2; for (int j = 0; j < itemCount + 1 + (scroll != 0); ++j) { @@ -2045,8 +2047,11 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items, for (int y = i - 3 * LCR_FONT_PIXEL_SIZE; y < i + LCR_rendererComputeTextHeight(_FONT_SIZE) + 3 * LCR_FONT_PIXEL_SIZE; ++y) - for (int x = LCR_EFFECTIVE_RESOLUTION_X / 4; - x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4; ++x) +#if LCR_EFFECTIVE_RESOLUTION_X > 500 + for (int x = 20; x < LCR_EFFECTIVE_RESOLUTION_X - 20; ++x) +#else + for (int x = 2; x < LCR_EFFECTIVE_RESOLUTION_X - 2; ++x) +#endif LCR_gameDrawPixelXYSafe(x,y,0x5c1b + 4 * ((x & 0x10) == (y & 0x10))); LCR_rendererDrawText(s,(LCR_EFFECTIVE_RESOLUTION_X - @@ -2163,9 +2168,15 @@ void LCR_rendererDraw3D(void) { carGhostVisibility |= 1; - m->config.visible = (S3L_distanceManhattan(m->transform.translation, - LCR_renderer.scene.camera.transform.translation) / LCR_RENDERER_UNIT) - <= LCR_SETTING_CAR_RENDER_DISTANCE; + unsigned char camDist = S3L_distanceManhattan(m->transform.translation, + LCR_renderer.scene.camera.transform.translation) / LCR_RENDERER_UNIT; + + m->config.visible = camDist <= LCR_SETTING_CAR_RENDER_DISTANCE; + +#if LCR_SETTING_PARTICLES + if (camDist > 5) + LCR_renderer.particleColor = 0x0000; +#endif } m = LCR_renderer.ghostModel;