mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- activeXSprites map.
This commit is contained in:
parent
d4873754f3
commit
2c6fa57090
2 changed files with 22 additions and 8 deletions
|
@ -51,6 +51,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
|
FixedBitArray<MAXSPRITES> activeXSprites;
|
||||||
|
|
||||||
// All AI states for assigning an index.
|
// All AI states for assigning an index.
|
||||||
static AISTATE* allAIStates[] =
|
static AISTATE* allAIStates[] =
|
||||||
{
|
{
|
||||||
|
@ -720,8 +722,6 @@ void MyLoadSave::Save(void)
|
||||||
Write(skyInfo, sizeof(*skyInfo));
|
Write(skyInfo, sizeof(*skyInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorLoadSaveConstruct(void);
|
|
||||||
void AILoadSaveConstruct(void);
|
|
||||||
void EndGameLoadSaveConstruct(void);
|
void EndGameLoadSaveConstruct(void);
|
||||||
void LevelsLoadSaveConstruct(void);
|
void LevelsLoadSaveConstruct(void);
|
||||||
void MessagesLoadSaveConstruct(void);
|
void MessagesLoadSaveConstruct(void);
|
||||||
|
@ -736,7 +736,6 @@ void LoadSaveSetup(void)
|
||||||
{
|
{
|
||||||
new MyLoadSave();
|
new MyLoadSave();
|
||||||
|
|
||||||
AILoadSaveConstruct();
|
|
||||||
EndGameLoadSaveConstruct();
|
EndGameLoadSaveConstruct();
|
||||||
LevelsLoadSaveConstruct();
|
LevelsLoadSaveConstruct();
|
||||||
MessagesLoadSaveConstruct();
|
MessagesLoadSaveConstruct();
|
||||||
|
@ -754,6 +753,7 @@ void SerializeSequences(FSerializer& arc);
|
||||||
void SerializeWarp(FSerializer& arc);
|
void SerializeWarp(FSerializer& arc);
|
||||||
void SerializeTriggers(FSerializer& arc);
|
void SerializeTriggers(FSerializer& arc);
|
||||||
void SerializeActor(FSerializer& arc);
|
void SerializeActor(FSerializer& arc);
|
||||||
|
void SerializeAI(FSerializer& arc);
|
||||||
|
|
||||||
void GameInterface::SerializeGameState(FSerializer& arc)
|
void GameInterface::SerializeGameState(FSerializer& arc)
|
||||||
{
|
{
|
||||||
|
@ -761,16 +761,29 @@ void GameInterface::SerializeGameState(FSerializer& arc)
|
||||||
sfxKillAllSounds();
|
sfxKillAllSounds();
|
||||||
ambKillAll();
|
ambKillAll();
|
||||||
seqKillAll();
|
seqKillAll();
|
||||||
|
|
||||||
|
if (arc.isWriting())
|
||||||
|
{
|
||||||
|
activeXSprites.Zero();
|
||||||
|
for (int i = 0; i < kMaxSprites; i++)
|
||||||
|
{
|
||||||
|
if (activeSprites[i] && sprite[i].extra > 0) activeXSprites.Set(sprite[i].extra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (gamestate != GS_LEVEL)
|
if (gamestate != GS_LEVEL)
|
||||||
{
|
{
|
||||||
memset(xsprite, 0, sizeof(xsprite));
|
memset(xsprite, 0, sizeof(xsprite));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
arc.SerializeMemory("activexsprites", activeXSprites.Storage(), activeXSprites.StorageSize());
|
||||||
|
SerializeActor(arc);
|
||||||
|
SerializeAI(arc);
|
||||||
SerializeEvents(arc);
|
SerializeEvents(arc);
|
||||||
SerializeSequences(arc);
|
SerializeSequences(arc);
|
||||||
SerializeWarp(arc);
|
SerializeWarp(arc);
|
||||||
SerializeTriggers(arc);
|
SerializeTriggers(arc);
|
||||||
SerializeActor(arc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,5 +44,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
void LoadSaveSetup(void);
|
void LoadSaveSetup(void);
|
||||||
|
extern FixedBitArray<MAXSPRITES> activeXSprites;
|
||||||
|
|
||||||
END_BLD_NS
|
END_BLD_NS
|
||||||
|
|
Loading…
Reference in a new issue