mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
SAGA2: Make ActiveItemStates save size portable
This commit is contained in:
parent
2d20a99a33
commit
e2d7bbe279
@ -778,21 +778,11 @@ void initActiveItemStates(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void saveActiveItemStates(Common::OutSaveFile *out) {
|
||||
void saveActiveItemStates(Common::OutSaveFile *outS) {
|
||||
debugC(2, kDebugSaveload, "Saving ActiveItemStates");
|
||||
|
||||
int32 archiveBufSize = 0;
|
||||
|
||||
for (int i = 0; i < worldCount; i++) {
|
||||
int32 size = tileRes->size(tagStateID + i);
|
||||
archiveBufSize += sizeof(int16);
|
||||
if (stateArray[i] != nullptr)
|
||||
archiveBufSize += size;
|
||||
}
|
||||
|
||||
out->write("TAGS", 4);
|
||||
out->writeUint32LE(archiveBufSize);
|
||||
|
||||
outS->write("TAGS", 4);
|
||||
CHUNK_BEGIN;
|
||||
for (int i = 0; i < worldCount; i++) {
|
||||
debugC(3, kDebugSaveload, "Saving ActiveItemState %d", i);
|
||||
|
||||
@ -831,6 +821,7 @@ void saveActiveItemStates(Common::OutSaveFile *out) {
|
||||
} else
|
||||
out->writeSint16LE(0);
|
||||
}
|
||||
CHUNK_END;
|
||||
}
|
||||
|
||||
void loadActiveItemStates(Common::InSaveFile *in) {
|
||||
|
@ -1011,7 +1011,7 @@ void cleanupTileTasks(void);
|
||||
TilePoint getClosestPointOnTAI(ActiveItem *TAI, GameObject *obj);
|
||||
|
||||
void initActiveItemStates(void);
|
||||
void saveActiveItemStates(Common::OutSaveFile *out);
|
||||
void saveActiveItemStates(Common::OutSaveFile *outS);
|
||||
void loadActiveItemStates(Common::InSaveFile *in);
|
||||
void cleanupActiveItemStates(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user