mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Added: Automap markers are stored in savegames now. Also moved the call
to AM_LevelInit to its proper place in G_DoLoadLevel, right after the call to P_SetupLevel to make it work as intended. SVN r667 (trunk)
This commit is contained in:
parent
10b71b09c8
commit
935eeb06f1
5 changed files with 17 additions and 10 deletions
|
@ -1,4 +1,7 @@
|
||||||
January 5, 2008 (Changes by Graf Zahl)
|
January 5, 2008 (Changes by Graf Zahl)
|
||||||
|
- Added: Automap markers are stored in savegames now. Also moved the call
|
||||||
|
to AM_LevelInit to its proper place in G_DoLoadLevel, right after
|
||||||
|
the call to P_SetupLevel to make it work as intended.
|
||||||
- Changed savegame versioning to use the SVN revision number instead of
|
- Changed savegame versioning to use the SVN revision number instead of
|
||||||
an arbitrarily defined value. This reduces the amount of relevant values
|
an arbitrarily defined value. This reduces the amount of relevant values
|
||||||
that have to be defined in version.h to 1 (the minimum compatible savegame
|
that have to be defined in version.h to 1 (the minimum compatible savegame
|
||||||
|
|
|
@ -817,8 +817,7 @@ bool AM_clearMarks ()
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// should be called at the start of every level
|
// called right after the level has been loaded
|
||||||
// right now, i figure it out myself
|
|
||||||
//
|
//
|
||||||
void AM_LevelInit ()
|
void AM_LevelInit ()
|
||||||
{
|
{
|
||||||
|
@ -853,15 +852,8 @@ void AM_Stop ()
|
||||||
//
|
//
|
||||||
void AM_Start ()
|
void AM_Start ()
|
||||||
{
|
{
|
||||||
static char lastmap[sizeof(level.mapname)] = "";
|
|
||||||
|
|
||||||
if (!stopped) AM_Stop();
|
if (!stopped) AM_Stop();
|
||||||
stopped = false;
|
stopped = false;
|
||||||
if (strcmp (lastmap, level.mapname))
|
|
||||||
{
|
|
||||||
AM_LevelInit();
|
|
||||||
strcpy (lastmap, level.mapname);
|
|
||||||
}
|
|
||||||
AM_initVariables();
|
AM_initVariables();
|
||||||
AM_loadPics();
|
AM_loadPics();
|
||||||
}
|
}
|
||||||
|
@ -1822,3 +1814,11 @@ void AM_Drawer ()
|
||||||
AM_drawMarks();
|
AM_drawMarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AM_SerializeMarkers(FArchive &arc)
|
||||||
|
{
|
||||||
|
arc << markpointnum;
|
||||||
|
for (int i=0; i<AM_NUMMARKPOINTS; i++)
|
||||||
|
{
|
||||||
|
arc << markpoints[i].x << markpoints[i].y;
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,6 +39,8 @@ void AM_Drawer (void);
|
||||||
void AM_Stop (void);
|
void AM_Stop (void);
|
||||||
|
|
||||||
void AM_ToggleMap ();
|
void AM_ToggleMap ();
|
||||||
|
void AM_LevelInit ();
|
||||||
|
void AM_SerializeMarkers(FArchive &arc);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2004,6 +2004,7 @@ void G_DoLoadLevel (int position, bool autosave)
|
||||||
}
|
}
|
||||||
|
|
||||||
P_SetupLevel (level.mapname, position);
|
P_SetupLevel (level.mapname, position);
|
||||||
|
AM_LevelInit();
|
||||||
|
|
||||||
// [RH] Start lightning, if MAPINFO tells us to
|
// [RH] Start lightning, if MAPINFO tells us to
|
||||||
if (level.flags & LEVEL_STARTLIGHTNING)
|
if (level.flags & LEVEL_STARTLIGHTNING)
|
||||||
|
@ -2736,6 +2737,7 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
|
||||||
|
|
||||||
// This must be saved, too, of course!
|
// This must be saved, too, of course!
|
||||||
FCanvasTextureInfo::Serialize (arc);
|
FCanvasTextureInfo::Serialize (arc);
|
||||||
|
AM_SerializeMarkers(arc);
|
||||||
|
|
||||||
if (!hubLoad)
|
if (!hubLoad)
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||||
#define MINSAVEVER 665
|
#define MINSAVEVER 667
|
||||||
|
|
||||||
// The maximum length of one save game description for the menus.
|
// The maximum length of one save game description for the menus.
|
||||||
#define SAVESTRINGSIZE 24
|
#define SAVESTRINGSIZE 24
|
||||||
|
|
Loading…
Reference in a new issue