SAGA2: Properly mark structs as packed

This commit is contained in:
Eugene Sandulenko 2021-06-23 18:38:24 +02:00
parent 5bb5fe9396
commit 3ad054d85c
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
4 changed files with 6 additions and 4 deletions

View File

@ -108,6 +108,7 @@ const int activeItemMapShift = 13;
const int16 activeItemIndexNullID = 0x1FFF;
#include "common/pack-start.h"
struct ActiveItemID {
int16 val; // ID value --
// first 3 bits world number
@ -179,7 +180,8 @@ struct ActiveItemID {
int16 getIndexNum(void) {
return val & activeItemIndexMask;
}
};
} PACKED_STRUCT;
#include "common/pack-end.h"
// ID of NULL active item
extern const ActiveItemID NoActiveItem;

View File

@ -63,7 +63,7 @@ struct ActiveMissionData {
KnowledgeID missionKnowledgeList[32];
uint16 numObjectIDs,
numKnowledgeIDs;
};
} PACKED_STRUCT;
#include "common/pack-end.h"

View File

@ -104,7 +104,7 @@ struct TilePoint {
int16 quickDir(void);
int16 magnitude(void);
};
} PACKED_STRUCT;
#include "common/pack-end.h"

View File

@ -383,7 +383,7 @@ struct ActiveItemData {
worldNum; // Add 0xf000 to get world Object ID
} instance;
};
};
} PACKED_STRUCT;
#include "common/pack-end.h"