mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
CON: Extend undefinevolume so that it also undefines all levels in the specified volume.
git-svn-id: https://svn.eduke32.com/eduke32@5032 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
31c9d21b06
commit
afccb6d735
2 changed files with 10 additions and 5 deletions
|
@ -2232,6 +2232,9 @@ void C_UndefineVolume(int32_t vol)
|
|||
{
|
||||
Bassert((unsigned)vol < MAXVOLUMES);
|
||||
|
||||
for (int32_t i = 0; i < MAXLEVELS; i++)
|
||||
C_UndefineLevel(vol, i);
|
||||
|
||||
EpisodeNames[vol][0] = '\0';
|
||||
|
||||
g_numVolumes = 0;
|
||||
|
@ -2270,9 +2273,11 @@ void C_UndefineLevel(int32_t vol, int32_t lev)
|
|||
{
|
||||
map_t *const map = &MapInfo[(MAXLEVELS*vol)+lev];
|
||||
|
||||
if (map->filename)
|
||||
Bfree(map->filename);
|
||||
map->filename = NULL;
|
||||
|
||||
if (map->name)
|
||||
Bfree(map->name);
|
||||
map->name = NULL;
|
||||
|
||||
|
|
|
@ -111,17 +111,17 @@ extern vmstate_t vm;
|
|||
void G_DoGameStartup(const int32_t *params);
|
||||
void C_DefineMusic(int32_t vol, int32_t lev, const char *fn);
|
||||
|
||||
void C_UndefineVolume(int32_t vol);
|
||||
void C_UndefineSkill(int32_t skill);
|
||||
void C_UndefineLevel(int32_t vol, int32_t lev);
|
||||
#if defined LUNATIC
|
||||
void C_DefineSound(int32_t sndidx, const char *fn, int32_t args[5]);
|
||||
void C_DefineQuote(int32_t qnum, const char *qstr);
|
||||
void C_DefineVolumeName(int32_t vol, const char *name);
|
||||
void C_UndefineVolume(int32_t vol);
|
||||
void C_DefineSkillName(int32_t skill, const char *name);
|
||||
void C_UndefineSkill(int32_t skill);
|
||||
void C_DefineLevelName(int32_t vol, int32_t lev, const char *fn,
|
||||
int32_t partime, int32_t designertime,
|
||||
const char *levelname);
|
||||
void C_UndefineLevel(int32_t vol, int32_t lev);
|
||||
void C_DefineGameFuncName(int32_t idx, const char *name);
|
||||
void C_DefineGameType(int32_t idx, int32_t flags, const char *name);
|
||||
int32_t C_SetDefName(const char *name);
|
||||
|
|
Loading…
Reference in a new issue