mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Mapster32: Add EVENT_LOADMAP, EVENT_SAVEMAP, EVENT_PRELOADMAP, and EVENT_PRESAVEMAP.
Some are more useful than others. git-svn-id: https://svn.eduke32.com/eduke32@4244 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1014af812f
commit
8fa00afb7c
3 changed files with 15 additions and 0 deletions
|
@ -94,6 +94,10 @@ enum GameEvent_t {
|
||||||
EVENT_LINKTAGS,
|
EVENT_LINKTAGS,
|
||||||
EVENT_KEYPRESS,
|
EVENT_KEYPRESS,
|
||||||
EVENT_PREDRAW3DSCREEN,
|
EVENT_PREDRAW3DSCREEN,
|
||||||
|
EVENT_LOADMAP,
|
||||||
|
EVENT_SAVEMAP,
|
||||||
|
EVENT_PRELOADMAP,
|
||||||
|
EVENT_PRESAVEMAP,
|
||||||
MAXEVENTS
|
MAXEVENTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -731,12 +731,16 @@ void ExtLoadMap(const char *mapname)
|
||||||
#if M32_UNDO
|
#if M32_UNDO
|
||||||
map_undoredo_free();
|
map_undoredo_free();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
VM_OnEvent(EVENT_LOADMAP, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtSaveMap(const char *mapname)
|
void ExtSaveMap(const char *mapname)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(mapname);
|
UNREFERENCED_PARAMETER(mapname);
|
||||||
saveboard("backup.map", &pos, ang, cursectnum);
|
saveboard("backup.map", &pos, ang, cursectnum);
|
||||||
|
|
||||||
|
VM_OnEvent(EVENT_SAVEMAP, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8393,6 +8397,8 @@ int32_t ExtPreSaveMap(void)
|
||||||
{
|
{
|
||||||
int32_t numfixedsprites;
|
int32_t numfixedsprites;
|
||||||
|
|
||||||
|
VM_OnEvent(EVENT_PRESAVEMAP, -1);
|
||||||
|
|
||||||
numfixedsprites = fixspritesectors(); //Do this before saving!
|
numfixedsprites = fixspritesectors(); //Do this before saving!
|
||||||
updatesectorz(startpos.x,startpos.y,startpos.z,&startsectnum);
|
updatesectorz(startpos.x,startpos.y,startpos.z,&startsectnum);
|
||||||
if (startsectnum < 0)
|
if (startsectnum < 0)
|
||||||
|
@ -10281,6 +10287,7 @@ static int32_t loadconsounds(const char *fn)
|
||||||
|
|
||||||
void ExtPreLoadMap(void)
|
void ExtPreLoadMap(void)
|
||||||
{
|
{
|
||||||
|
VM_OnEvent(EVENT_PRELOADMAP, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ^^^
|
/// ^^^
|
||||||
|
|
|
@ -3515,6 +3515,10 @@ static void C_AddDefaultDefinitions(void)
|
||||||
C_AddDefinition("EVENT_LINKTAGS", EVENT_LINKTAGS, LABEL_EVENT);
|
C_AddDefinition("EVENT_LINKTAGS", EVENT_LINKTAGS, LABEL_EVENT);
|
||||||
C_AddDefinition("EVENT_KEYPRESS", EVENT_KEYPRESS, LABEL_EVENT);
|
C_AddDefinition("EVENT_KEYPRESS", EVENT_KEYPRESS, LABEL_EVENT);
|
||||||
C_AddDefinition("EVENT_PREDRAW3DSCREEN", EVENT_PREDRAW3DSCREEN, LABEL_EVENT);
|
C_AddDefinition("EVENT_PREDRAW3DSCREEN", EVENT_PREDRAW3DSCREEN, LABEL_EVENT);
|
||||||
|
C_AddDefinition("EVENT_LOADMAP", EVENT_LOADMAP, LABEL_EVENT);
|
||||||
|
C_AddDefinition("EVENT_SAVEMAP", EVENT_SAVEMAP, LABEL_EVENT);
|
||||||
|
C_AddDefinition("EVENT_PRELOADMAP", EVENT_PRELOADMAP, LABEL_EVENT);
|
||||||
|
C_AddDefinition("EVENT_PRESAVEMAP", EVENT_PRESAVEMAP, LABEL_EVENT);
|
||||||
|
|
||||||
C_AddDefinition("CLIPMASK0", CLIPMASK0, LABEL_DEFINE);
|
C_AddDefinition("CLIPMASK0", CLIPMASK0, LABEL_DEFINE);
|
||||||
C_AddDefinition("CLIPMASK1", CLIPMASK1, LABEL_DEFINE);
|
C_AddDefinition("CLIPMASK1", CLIPMASK1, LABEL_DEFINE);
|
||||||
|
|
Loading…
Reference in a new issue