mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add dumprrautomedaltimes console command
This commit is contained in:
parent
56fe6580e2
commit
8cb962ee19
3 changed files with 51 additions and 0 deletions
|
|
@ -535,6 +535,7 @@ void D_RegisterClientCommands(void)
|
||||||
COM_AddCommand("startlossless", Command_StartLossless_f);
|
COM_AddCommand("startlossless", Command_StartLossless_f);
|
||||||
COM_AddCommand("stopmovie", Command_StopMovie_f);
|
COM_AddCommand("stopmovie", Command_StopMovie_f);
|
||||||
COM_AddDebugCommand("minigen", M_MinimapGenerate);
|
COM_AddDebugCommand("minigen", M_MinimapGenerate);
|
||||||
|
COM_AddDebugCommand("dumprrautomedaltimes", Command_dumprrautomedaltimes);
|
||||||
|
|
||||||
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
||||||
M_AVRecorder_AddCommands();
|
M_AVRecorder_AddCommands();
|
||||||
|
|
|
||||||
|
|
@ -9472,6 +9472,54 @@ UINT8 P_InitMapData(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Command_dumprrautomedaltimes(void)
|
||||||
|
{
|
||||||
|
FILE* out;
|
||||||
|
char outname[512];
|
||||||
|
memset(outname, 0, sizeof(outname));
|
||||||
|
sprintf(outname, "%s/rrautomedaltimes.csv", srb2home);
|
||||||
|
out = fopen(outname, "wb");
|
||||||
|
if (out == NULL)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "Failed to dump rrautomedaltimes.csv\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fprintf(out, "Name,Bronze,Silver,Gold,Platinum\n");
|
||||||
|
for (int i = 0; i < nummapheaders; ++i)
|
||||||
|
{
|
||||||
|
fprintf(out, "%s,", mapheaderinfo[i]->lvlttl);
|
||||||
|
fprintf(
|
||||||
|
out,
|
||||||
|
"%d'%d\"%02d,",
|
||||||
|
G_TicsToMinutes(mapheaderinfo[i]->automedaltime[3], true),
|
||||||
|
G_TicsToSeconds(mapheaderinfo[i]->automedaltime[3]),
|
||||||
|
G_TicsToCentiseconds(mapheaderinfo[i]->automedaltime[3])
|
||||||
|
);
|
||||||
|
fprintf(
|
||||||
|
out,
|
||||||
|
"%d'%d\"%02d,",
|
||||||
|
G_TicsToMinutes(mapheaderinfo[i]->automedaltime[2], true),
|
||||||
|
G_TicsToSeconds(mapheaderinfo[i]->automedaltime[2]),
|
||||||
|
G_TicsToCentiseconds(mapheaderinfo[i]->automedaltime[2])
|
||||||
|
);
|
||||||
|
fprintf(
|
||||||
|
out,
|
||||||
|
"%d'%d\"%02d,",
|
||||||
|
G_TicsToMinutes(mapheaderinfo[i]->automedaltime[1], true),
|
||||||
|
G_TicsToSeconds(mapheaderinfo[i]->automedaltime[1]),
|
||||||
|
G_TicsToCentiseconds(mapheaderinfo[i]->automedaltime[1])
|
||||||
|
);
|
||||||
|
fprintf(
|
||||||
|
out,
|
||||||
|
"%d'%d\"%02d\n",
|
||||||
|
G_TicsToMinutes(mapheaderinfo[i]->automedaltime[0], true),
|
||||||
|
G_TicsToSeconds(mapheaderinfo[i]->automedaltime[0]),
|
||||||
|
G_TicsToCentiseconds(mapheaderinfo[i]->automedaltime[0])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
fclose(out);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add a wadfile to the active wad files,
|
// Add a wadfile to the active wad files,
|
||||||
// replace sounds, musics, patches, textures, sprites and maps
|
// replace sounds, musics, patches, textures, sprites and maps
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,8 @@ void P_DeleteHeaderFollowers(UINT16 i);
|
||||||
// Needed for NiGHTS
|
// Needed for NiGHTS
|
||||||
void P_ReloadRings(void);
|
void P_ReloadRings(void);
|
||||||
|
|
||||||
|
void Command_dumprrautomedaltimes(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue