From f07a4d363547c0eb8b32c0e696b1a99772fd15c6 Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Sun, 11 May 2025 20:37:02 +0200 Subject: [PATCH] Give replays better names --- TODO.txt | 2 +- data | 3 +++ game.h | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/TODO.txt b/TODO.txt index 009107e..49437bc 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,7 +4,6 @@ fuck issue trackers :D - hitting ramps at higher speed still often bugs, try to fiddle with physics again (reshape iterations, tension, ...) -- make replays have better names (time etc.) - press forward map??? :-D only when physics is frozen - make some kinda repo for world record runs? - Try doing the bouncy car body? Just keep a point and its velocity, change @@ -41,6 +40,7 @@ fuck issue trackers :D =========== HANDLED ============== - should drifting make a sound? NO NEED +- make replays have better names (time etc.) - LOD blocks in lower res look too small - 640x480 with resolution subdiv has bad sized menu item highlight - Map4: fix top bottom corner, making the curve is too hard -- either add ramps diff --git a/data b/data index 9806d98..416446e 100644 --- a/data +++ b/data @@ -134,3 +134,6 @@ details #RLCtiny2;00LCtiny2;833ee4b2 0000245 #BLCtiny2; #RLCtiny2;00LCtiny2;833ee4b2 0000245 +#RLCtiny1 00'10'659;00LCtiny1;ae1ab677 0000323:0011:0389:0021:00b9:0041:0039:0031:0149:0091:0183:0031:00d3:00c1:0065:0047:0033:0051:00b3:0181:0069:0011:0175:0041:0203:0061:00a9:0041:0093:0061 +#BLCtiny1; +#RLCtiny1 00'10'098;00LCtiny1;ae1ab677 0000306:0011:00e9:0041:0203:0031:0099:0031:00a9:0021:0149:00d1:0103:0061:00d3:0031:0083:00c5:0081:0023:01f1:00a9:0061:00c5:0041:01b9:0031:0133:0041:0089 diff --git a/game.h b/game.h index 4287187..ddd145c 100644 --- a/game.h +++ b/game.h @@ -1193,7 +1193,7 @@ void LCR_gameTimeToStr(uint32_t timeMS, char *str) timeMS /= 10; str[0] = '0' + timeMS % 10; } - + void LCR_gameDrawPopupMessage(void) { #define _TEXT_SIZE 5 @@ -1293,6 +1293,8 @@ void LCR_gameDraw3DView(void) void LCR_gameSaveReplay(void) { + char str[10]; + LCR_LOG0("saving replay"); _LCR_gameDataCharWrite(LCR_DATA_FILE_SEPARATOR); _LCR_gameDataCharWrite('R'); @@ -1302,7 +1304,17 @@ void LCR_gameSaveReplay(void) _LCR_gameDataCharWrite(LCR_currentMap.name[i]); else break; - + + _LCR_gameDataCharWrite(' '); + + LCR_gameTimeToStr(LCR_timeTicksToMS(LCR_game.runTime),str); + + for (int i = 0; i < LCR_MAP_NAME_MAX_LEN; ++i) + if (str[i]) + _LCR_gameDataCharWrite(str[i]); + else + break; + _LCR_gameDataCharWrite(';'); LCR_replayOutputStr(_LCR_gameDataCharWrite);