implement character overlays for challenge mode

This commit is contained in:
Martin Michelsen
2023-10-18 17:16:51 -07:00
parent 8c2ce5210d
commit e8d8b94ffa
31 changed files with 378 additions and 16 deletions
+5
View File
@@ -70,6 +70,7 @@ struct SavedPlayerDataBB { // .nsc file format
uint8_t get_material_usage(MaterialType which) const;
void set_material_usage(MaterialType which, uint8_t usage);
void clear_all_material_usage();
void print_inventory(FILE* stream) const;
} __attribute__((packed));
@@ -124,9 +125,13 @@ public:
~ClientGameData();
void create_battle_overlay(std::shared_ptr<const BattleRules> rules, std::shared_ptr<const LevelTable> level_table);
void create_challenge_overlay(size_t template_index, std::shared_ptr<const LevelTable> level_table);
inline void delete_overlay() {
this->overlay_player_data.reset();
}
inline bool has_overlay() const {
return this->overlay_player_data.get() != nullptr;
}
std::shared_ptr<SavedAccountDataBB> account(bool allow_load = true);
std::shared_ptr<SavedPlayerDataBB> player(bool allow_load = true, bool allow_overlay = true);