make all file/network-related structs packed

This commit is contained in:
Martin Michelsen
2022-03-29 00:12:16 -07:00
parent b61a9bcdcb
commit 5c388c4052
12 changed files with 147 additions and 149 deletions
+4 -4
View File
@@ -17,7 +17,7 @@ struct BattleParams {
uint8_t unknown[14];
uint32_t experience;
uint32_t difficulty;
};
} __attribute__((packed));
struct BattleParamTable {
BattleParams entries[2][3][4][0x60]; // online/offline, episode, difficulty, monster type
@@ -28,13 +28,13 @@ struct BattleParamTable {
uint8_t monster_type) const;
const BattleParams* get_subtable(bool solo, uint8_t episode,
uint8_t difficulty) const;
};
} __attribute__((packed));
struct BattleParamIndex {
BattleParamTable table_for_episode[3];
};
} __attribute__((packed));
// an enemy entry as loaded by the game
struct PSOEnemy {
@@ -46,7 +46,7 @@ struct PSOEnemy {
PSOEnemy();
PSOEnemy(uint32_t experience, uint32_t rt_index);
};
} __attribute__((packed));
std::vector<PSOEnemy> load_map(const char* filename, uint8_t episode,
uint8_t difficulty, const BattleParams* bp, bool alt_enemies);