helapordo 1.4.23
Loading...
Searching...
No Matches
ser_core.h
Go to the documentation of this file.
1// jgabaut @ github.com/jgabaut
2// SPDX-License-Identifier: GPL-3.0-only
3/*
4 Copyright (C) 2022-2026 jgabaut
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, version 3 of the License.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#ifndef SER_CORE_H
20#define SER_CORE_H
21#include <inttypes.h>
22#include "../utils/game_utils.h"
23
24#ifdef HELAPORDO_RAYLIB_BUILD
25#include "../build-rl/game_rl.h"
26#endif
27
32#define SERSAVEHEADER_BUFSIZE 15
33
39#ifdef __GNUC__
40typedef struct __attribute__((packed)) SerSaveHeader {
41#else
42#pragma pack(push, 1)
54#pragma pack(pop)
55#endif
56
61#define SAVEHEADER_BUFSIZE SERSAVEHEADER_BUFSIZE
62
76
77bool writeSerSaveHeader(const char* filename, SerSaveHeader* data);
78
79bool readSerSaveHeader(const char* filename, SerSaveHeader* data);
80
82
83SaveHeader* prep_saveHeader(const char* static_path, Koliseo* kls, bool force_init, bool* did_init, int saveslot_index);
84
93#ifdef __GNUC__
94typedef struct __attribute__((packed)) SerTurncounter {
95#else
96#pragma pack(push, 1)
97typedef struct SerTurncounter {
98#endif
99 int32_t count;
100 int32_t innerValue;
101 int32_t type;
102#ifdef __GNUC__
104#else
106#pragma pack(pop)
107#endif
108
109#define SerTurncounter_Fmt "SerTurncounter { Type: %" PRId32 ", Count: %" PRId32 ", InnerValue: %" PRId32 " }"
110
111#define SerTurncounter_Arg(st) (st.type), (st.count), (st.innerValue)
112
121#ifdef __GNUC__
122typedef struct __attribute__((packed)) SerPerk {
123#else
124#pragma pack(push, 1)
125typedef struct SerPerk {
126#endif
127 int32_t class;
128 int32_t innerValue;
129#ifdef __GNUC__
130} SerPerk;
131#else
133#pragma pack(pop)
134#endif
135
136#define SerPerk_Fmt "SerPerk { Class: %s , InnerValue: %" PRId32 " }"
137
138#define SerPerk_Arg(sp) (nameStringFromPerk(sp.class)), (sp.innerValue)
139
148#ifdef __GNUC__
149typedef struct __attribute__((packed)) SerSkillslot {
150#else
151#pragma pack(push, 1)
152typedef struct SerSkillslot {
153#endif
154 int32_t class;
155 int8_t enabled;
156#ifdef __GNUC__
158#else
160#pragma pack(pop)
161#endif
162
171#ifdef __GNUC__
172typedef struct __attribute__((packed)) SerEquip {
173#else
174#pragma pack(push, 1)
175typedef struct SerEquip {
176#endif
177 int32_t class;
178 int32_t type;
179 int8_t equipped;
180 int8_t level;
181 int8_t atk;
182 int8_t def;
183 int8_t vel;
184 int8_t enr;
185 int8_t bonus;
187 int8_t cost;
190#ifdef __GNUC__
191} SerEquip;
192#else
194#pragma pack(pop)
195#endif
196
197#define SerEquip_Fmt "SerEquip { Class: %s , Type: %s, Equipped: %" PRId8 ", Level: %" PRId8 ", Atk: %" PRId8 ", Def: %" PRId8 ", Vel: %" PRId8 ", Enr: %" PRId8 ", Bonus: %" PRId8 ", PerksCount: %" PRId8 ", Cost: %" PRId8 ", Quality: %s }"
198
199#define SerEquip_Arg(se) (stringFromEquips(se.class)), (stringFromEquipzones(se.type)), (se.equipped), (se.level), (se.atk), (se.def), (se.vel), (se.enr), (se.bonus), (se.perksCount), (se.cost), (stringFromQuality(se.qual))
200
209#ifdef __GNUC__
210typedef struct __attribute__((packed)) SerEquipslot {
211#else
212#pragma pack(push, 1)
213typedef struct SerEquipslot {
214#endif
215 int32_t type;
216 int8_t active;
217#ifdef __GNUC__
219#else
221#pragma pack(pop)
222#endif
223
232#ifdef __GNUC__
233typedef struct __attribute__((packed)) SerSpecialslot {
234#else
235#pragma pack(push, 1)
236typedef struct SerSpecialslot {
237#endif
238 int8_t enabled;
239 int8_t move;
240 int8_t cost;
241#ifdef __GNUC__
243#else
245#pragma pack(pop)
246#endif
247
248#define SerSpecialslot_Fmt "SerSpecialslot { Move: %" PRId8 ", Enabled: %s, Cost: %" PRId8 " }"
249
250#define SerSpecialslot_Arg(sp) (sp.move), (sp.enabled >= 1 ? "True" : "False"), (sp.cost)
251
260#ifdef __GNUC__
261typedef struct __attribute__((packed)) SerConsumable {
262#else
263#pragma pack(push, 1)
264typedef struct SerConsumable {
265#endif
266 int32_t class;
267 int32_t qty;
268#ifdef __GNUC__
270#else
272#pragma pack(pop)
273#endif
274
275#define SerConsumable_Fmt "SerConsumable { Class: %s , Quantity: %" PRId32 " }"
276
277#define SerConsumable_Arg(sc) (stringFromConsumables(sc.class)), (sc.qty)
278
287#ifdef __GNUC__
288typedef struct __attribute__((packed)) SerArtifact {
289#else
290#pragma pack(push, 1)
291typedef struct SerArtifact {
292#endif
293 int32_t class;
294 int32_t qty;
295 int32_t active;
296 int32_t innerValue;
297#ifdef __GNUC__
299#else
301#pragma pack(pop)
302#endif
303
304#define SerArtifact_Fmt "SerArtifact { Class: %s , Quantity: %" PRId32 ", Active: %" PRId32 ", InnerValue: %" PRId32 " }"
305
306#define SerArtifact_Arg(sa) (stringFromArtifacts(sa.class)), (sa.qty), (sa.active), (sa.innerValue)
307
316#ifdef __GNUC__
317typedef struct __attribute__((packed)) SerCountstats {
318#else
319#pragma pack(push, 1)
341#pragma pack(pop)
342#endif
343
344#define SerCountstats_Fmt "SerCountstats {\n Enemies killed: %" PRId8 ",\n Consumables Found: %" PRId8 ",\n Equips Found: %" PRId8 ",\n Artifacts found: %" PRId8 ",\n Critical Hits dealt: %" PRId8",\n Rooms completed: %" PRId8 ",\n Floors completed: %" PRId8 ",\n Specials Unlocked: %" PRId8 ",\n Coins found: %" PRId8 ",\n Bosses killed: %" PRId8 ",\n Unique Bosses Killed: %" PRId8 ",\n Killed Bosses: [\n %s: %s,\n %s: %s,\n %s: %s,\n %s: %s,\n %s: %s\n ],\n Keys Found: %" PRId8 "\n }"
345
346#define SerCountstats_Arg(sc) (sc.enemieskilled), (sc.consumablesfound), (sc.equipsfound), (sc.artifactsfound), (sc.criticalhits), (sc.roomscompleted), (sc.floorscompleted), (sc.specialsunlocked), (sc.coinsfound), (sc.bosseskilled), (sc.unique_bosseskilled), (stringFromBossClass(0)), (sc.killed_bosses[0] >= 1 ? "True" : "False"), (stringFromBossClass(1)), (sc.killed_bosses[1] >= 1 ? "True" : "False"), (stringFromBossClass(2)), (sc.killed_bosses[2] >= 1 ? "True" : "False"), (stringFromBossClass(3)), (sc.killed_bosses[3] >= 1 ? "True" : "False"), (stringFromBossClass(4)), (sc.killed_bosses[4] >= 1 ? "True" : "False"), (sc.keysfound)
347
356#ifdef __GNUC__
357typedef struct __attribute__((packed)) SerEnemy {
358#else
359#pragma pack(push, 1)
360typedef struct SerEnemy {
361#endif
362 int8_t index;
363 int32_t class;
364 int8_t hp;
365 int8_t atk;
366 int8_t def;
367 int8_t vel;
368 int8_t level;
369 int8_t luck;
370 int8_t xp;
371 int8_t totalhp;
372
373 int8_t energy;
374 int8_t totalenergy;
375
376 int8_t stamina;
378
379 int32_t status;
380 int8_t beast;
381
383
389
390 int8_t prize;
391#ifdef __GNUC__
392} SerEnemy;
393#else
395#pragma pack(pop)
396#endif
397
406#ifdef __GNUC__
407typedef struct __attribute__((packed)) SerBoss {
408#else
409#pragma pack(push, 1)
410typedef struct SerBoss {
411#endif
412 int32_t class;
413 int8_t hp;
414 int8_t atk;
415 int8_t def;
416 int8_t vel;
417 int8_t level;
418 int8_t luck;
419 int8_t xp;
420 int8_t totalhp;
421
422 int8_t energy;
423 int8_t totalenergy;
424
425 int8_t stamina;
427
428 int32_t status;
429 int8_t beast;
430
437
438 int8_t prize;
439#ifdef __GNUC__
440} SerBoss;
441#else
443#pragma pack(pop)
444#endif
445
450#define SERFIGHTER_NAME_BUFSIZE FIGHTER_NAME_BUFSIZE
451
460#ifdef __GNUC__
461typedef struct __attribute__((packed)) SerFighter {
462#else
463#pragma pack(push, 1)
464typedef struct SerFighter {
465#endif
467 int32_t class;
468 int8_t hp;
469 int8_t atk;
470 int8_t def;
471 int8_t vel;
472 int8_t level;
473 int8_t luck;
474 int8_t totalxp;
477 int8_t totalhp;
478 int32_t status;
479
480 int8_t energy;
481 int8_t totalenergy;
482 int8_t stamina;
486
492
493 int8_t perksCount;
495
500
502 int8_t earliestBagSlot; //TODO To always use the array efficiently (???) I sense linked lists may be better
503
508
513
515
516 int32_t balance;
518
519 int8_t floor_x;
520 int8_t floor_y;
521#ifdef __GNUC__
522} SerFighter;
523#else
525#pragma pack(pop)
526#endif
527
528#define SerFighter_Fmt "SerFighter {\n Name: %s,\n Class: %s,\n Hp: %" PRId8 ",\n Atk: %" PRId8 ",\n Def: %" PRId8 ",\n Vel: %" PRId8 ",\n Level: %" PRId8 ",\n Luck: %" PRId8 ",\n Total xp: %" PRId8 ",\n Current lvl xp: %" PRId8 ",\n Total lvl xp: %" PRId8 ",\n Total hp: %" PRId8 ",\n Status: %s,\n Energy: %" PRId8 ",\n Total energy: %" PRId8 ",\n Stamina: %" PRId8 ",\n Total Stamina: %" PRId8 ",\n Turnboost_Atk: %" PRId8 ",\n Turnboost_Def: %" PRId8 ",\n Turnboost_Vel: %" PRId8 ",\n Turnboost_Enr: %" PRId8 ",\n PerksCount: %" PRId8 ",\n EquipsBagOccupiedSlots: %" PRId8 ",\n EarliestBagSlot: %" PRId8 ",\n Permboost_Atk: %" PRId8 ",\n Permboost_Def: %" PRId8 ",\n Permboost_Vel: %" PRId8 ",\n Permboost_Enr: %" PRId8 ",\n Equipboost_Atk: %" PRId8 ",\n Equipboost_Def: %" PRId8 ",\n Equipboost_Vel: %" PRId8 ",\n Equipboost_Enr: %" PRId8 ",\n Balance: %" PRId32 ",\n Keys Balance: %" PRId8 ",\n Floor_x: %" PRId8 ",\n Floor_y: %" PRId8 "\n }"
529
530#define SerFighter_Arg(sf) (sf.name), (stringFromClass(sf.class)), (sf.hp), (sf.atk), (sf.def), (sf.vel), (sf.level), (sf.luck), (sf.totalxp), (sf.currentlevelxp), (sf.totallevelxp), (sf.totalhp), (stringFromStatus(sf.status)), (sf.energy), (sf.totalenergy), (sf.stamina), (sf.totalstamina), (sf.turnboost_atk), (sf.turnboost_def), (sf.turnboost_vel), (sf.turnboost_enr), (sf.perksCount), (sf.equipsBagOccupiedSlots), (sf.earliestBagSlot), (sf.permboost_atk), (sf.permboost_def), (sf.permboost_vel), (sf.permboost_enr), (sf.equipboost_atk), (sf.equipboost_def), (sf.equipboost_vel), (sf.equipboost_enr), (sf.balance), (sf.keys_balance), (sf.floor_x), (sf.floor_y)
531
540#ifdef __GNUC__
541typedef struct __attribute__((packed)) SerFoeParty {
542#else
543#pragma pack(push, 1)
544typedef struct SerFoeParty {
545#endif
546 int32_t class;
547 int8_t level;
554 //TODO: this is not ideal. Could we ever need to have a different max for enemy_foes? Only if the group is not in a Room??
556 int8_t size;
557 int8_t tot_alive;
561#ifdef __GNUC__
563#else
565#pragma pack(pop)
566#endif
567
576#ifdef __GNUC__
577typedef struct __attribute__((packed)) SerChest {
578#else
579#pragma pack(push, 1)
580typedef struct SerChest {
581#endif
582 int32_t class;
584
586 int32_t equipsCount;
587
589#ifdef __GNUC__
590} SerChest;
591#else
593#pragma pack(pop)
594#endif
595
604#ifdef __GNUC__
605typedef struct __attribute__((packed)) SerTreasure {
606#else
607#pragma pack(push, 1)
608typedef struct SerTreasure {
609#endif
610 int32_t class;
614#ifdef __GNUC__
616#else
618#pragma pack(pop)
619#endif
620
628#ifdef __GNUC__
629typedef struct __attribute__((packed)) SerShop {
630#else
631#pragma pack(push, 1)
648#pragma pack(pop)
649#endif
650
659#ifdef __GNUC__
660typedef struct __attribute__((packed)) SerRoadfork {
661#else
662#pragma pack(push, 1)
663typedef struct SerRoadfork {
664#endif
665 int32_t options[2];
666#ifdef __GNUC__
668#else
670#pragma pack(pop)
671#endif
672
681#ifdef __GNUC__
682typedef struct __attribute__((packed)) SerRoom {
683#else
684#pragma pack(push, 1)
701#pragma pack(pop)
702#endif
703
712#ifdef __GNUC__
713typedef struct __attribute__((packed)) SerFloor {
714#else
715#pragma pack(push, 1)
716typedef struct SerFloor {
717#endif
718 int8_t index;
719
720 int32_t class;
722 int8_t area;
723 //SerRoom rooms_matrix[FLOOR_MAX_COLS][FLOOR_MAX_ROWS]; /**< SerRoom matrix for rooms of this floor.*/
727 bool from_bsp;
728#ifdef __GNUC__
729} SerFloor;
730#else
732#pragma pack(pop)
733#endif
734
743#ifdef __GNUC__
744typedef struct __attribute__((packed)) SerWincon {
745#else
746#pragma pack(push, 1)
747typedef struct SerWincon {
748#endif
749 int32_t class;
750 int8_t current_val;
751 int8_t target_val;
752#ifdef __GNUC__
753} SerWincon;
754#else
756#pragma pack(pop)
757#endif
758
767#ifdef __GNUC__
768typedef struct __attribute__((packed)) SerSaveslot {
769#else
770#pragma pack(push, 1)
771typedef struct SerSaveslot {
772#endif
773 char name[50];
774 char save_path[255];
775 int8_t index;
776#ifdef __GNUC__
778#else
780#pragma pack(pop)
781#endif
782
783#define SERPATH_SEED_BUFSIZE PATH_SEED_BUFSIZE
784
793#ifdef __GNUC__
794typedef struct __attribute__((packed)) SerPath {
795#else
796#pragma pack(push, 1)
797typedef struct SerPath {
798#endif
799 int8_t length;
800 int8_t luck;
801 int8_t prize;
806#ifdef __GNUC__
807} SerPath;
808#else
810#pragma pack(pop)
811#endif
812
821#ifdef __GNUC__
822typedef struct __attribute__((packed)) SerGamestate {
823#else
824#pragma pack(push, 1)
852#pragma pack(pop)
853#endif
854
863#ifdef __GNUC__
864typedef struct __attribute__((packed)) SerGameOptions {
865#else
866#pragma pack(push, 1)
867typedef struct SerGameOptions {
868#endif
869 bool use_default_background; //<** Turn on usage of default terminal background */
870 bool do_autosave; //<* Turns on autosave */
871 bool use_3x3_fov; //<* Turns on 3x3 fov */
872
873 int32_t directional_keys_schema; //* Defines the current schema for cardinal directions movement */
874#ifdef __GNUC__
876#else
878#pragma pack(pop)
879#endif
880
881bool appendSerTurncounter(const char* filename, SerTurncounter* data);
882
883bool readSerTurncounter(const char* filename, size_t offset, SerTurncounter* data);
884
887
888bool deser_Perk(SerPerk* ser, Perk* deser);
889bool ser_Perk(Perk* deser, SerPerk* ser);
890
891bool deser_Skillslot(SerSkillslot* ser, Skillslot* deser);
892bool ser_Skillslot(Skillslot* deser, SerSkillslot* ser);
893
894bool deser_Equip(SerEquip* ser, Equip* deser);
895bool ser_Equip(Equip* deser, SerEquip* ser);
896
897bool deser_Equipslot(SerEquipslot* ser, Equipslot* deser);
898bool ser_Equipslot(Equipslot* deser, SerEquipslot* ser);
899
902
903bool deser_Consumable(SerConsumable* ser, Consumable* deser);
904bool ser_Consumable(Consumable* deser, SerConsumable* ser);
905
906bool deser_Artifact(SerArtifact* ser, Artifact* deser);
907bool ser_Artifact(Artifact* deser, SerArtifact* ser);
908
909bool deser_countStats(SerCountstats* ser, countStats* deser);
910bool ser_countStats(countStats* deser, SerCountstats* ser);
911
912bool deser_Enemy(SerEnemy* ser, Enemy* deser);
913bool ser_Enemy(Enemy* deser, SerEnemy* ser);
914
915bool deser_Boss(SerBoss* ser, Boss* deser);
916bool ser_Boss(Boss* deser, SerBoss* ser);
917
918bool deser_Fighter(SerFighter* ser, Fighter* deser);
919bool ser_Fighter(Fighter* deser, SerFighter* ser);
920
921bool deser_FoeParty(SerFoeParty* ser, FoeParty* deser);
922bool ser_FoeParty(FoeParty* deser, SerFoeParty* ser);
923
924bool deser_Chest(SerChest* ser, Chest* deser);
925bool ser_Chest(Chest* deser, SerChest* ser);
926
927bool deser_Treasure(SerTreasure* ser, Treasure* deser);
928bool ser_Treasure(Treasure* deser, SerTreasure* ser);
929
930bool deser_Shop(SerShop* ser, Shop* deser);
931bool ser_Shop(Shop* deser, SerShop* ser);
932
933bool deser_Roadfork(SerRoadfork* ser, Roadfork* deser);
934bool ser_Roadfork(Roadfork* deser, SerRoadfork* ser);
935
936bool deser_Room(SerRoom* ser, Room* deser);
937bool ser_Room(Room* deser, SerRoom* ser);
938
939bool deser_Floor(SerFloor* ser, Floor* deser);
940bool ser_Floor(Floor* deser, SerFloor* ser);
941
942bool deser_Wincon(SerWincon* ser, Wincon* deser);
943bool ser_Wincon(Wincon* deser, SerWincon* ser);
944
945bool deser_Saveslot(SerSaveslot* ser, Saveslot* deser);
946bool ser_Saveslot(Saveslot* deser, SerSaveslot* ser);
947
948bool deser_Path(SerPath* ser, Path* deser);
949bool ser_Path(Path* deser, SerPath* ser);
950
951bool writeSerGamestate(const char* filename, SerGamestate* data);
952bool appendSerGamestate(const char* filename, SerGamestate* data);
953bool readSerGamestate(const char* filename, size_t offset, SerGamestate* data);
954
955bool deser_Gamestate(SerGamestate* ser, Gamestate* deser);
956bool ser_Gamestate(Gamestate* deser, SerGamestate* ser);
957bool prep_Gamestate(Gamestate* gmst, const char* static_path, size_t offset, Koliseo* kls, bool force_init);
958bool read_savedir(const char* dirpath);
959
962bool writeSerGameOptions(const char* filename, SerGameOptions* data);
963bool appendSerGameOptions(const char* filename, SerGameOptions* data);
964bool readSerGameOptions(const char* filename, size_t offset, SerGameOptions* data);
965bool prep_GameOptions(GameOptions* game_options, const char* static_path, size_t offset, Koliseo* kls, bool force_init);
966#endif // SER_CORE_H
#define CONSUMABLESMAX
Maximum index of consumableClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:495
#define FIGHTER_SKILL_SLOTS
Definition game_core.h:869
#define CONSUMABLE_SHOP_MAX
Maximum number of total consumables sold in a shop.
Definition game_core.h:1494
#define EQUIP_SHOP_MAX
Maximum number of equips sold in a shop.
Definition game_core.h:1489
quality
The different grades of Equip.
Definition game_core.h:1394
#define CHEST_EQUIPS_MAX
Maximum number of Equip held in a chest.
Definition game_core.h:1543
#define FLOOR_MAX_COLS
Maximum value of cells in a Floor matrix column.
Definition game_core.h:1813
#define ARTIFACTSMAX
Maximum index of artifactClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:544
#define ENEMY_SKILL_SLOTS
Definition game_core.h:870
#define COUNTERSMAX
Maximum index of counterIndexes, so that the size has to add 1 for the 0th index.
Definition game_core.h:933
#define BOSSCLASSESMAX
Maximum index of bossClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:737
#define BOSS_SKILL_SLOTS
Definition game_core.h:871
#define EQUIPSBAGSIZE
Definition game_core.h:965
#define SPECIALSMAX
Maximum index of specialMove per class, so that the size for each Fighter has to add 1 for the 0th in...
Definition game_core.h:827
#define FOES_BOSSES_MAX
Maximum number of bosses when in a FoeParty.
Definition game_core.h:1694
#define FLOOR_MAX_ROWS
Maximum value of cells in a Floor matrix row.
Definition game_core.h:1819
#define CHEST_CONSUMABLES_MAX
Maximum number of Consumable held in a chest.
Definition game_core.h:1539
#define EQUIPZONES
Maximum index of Equipzone, so that the size has to add 1 for the 0th index.
Definition game_core.h:954
#define ROOM_ENEMIES_MAX
Maximum number of enemies in a room.
Definition game_core.h:1687
#define EQUIPPERKSMAX
Maximum number of Perk per Equip.
Definition game_core.h:994
#define PERKSMAX
Maximum index of perkClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:988
#define ENEMYCLASSESMAX
Maximum index of enemyClass, so that the size has to add 1 for the 0th index.
Definition game_core.h:681
bool deser_GameOptions(SerGameOptions *ser, GameOptions *deser)
Definition ser_core.c:3089
bool deser_Skillslot(SerSkillslot *ser, Skillslot *deser)
Definition ser_core.c:719
bool ser_Gamestate(Gamestate *deser, SerGamestate *ser)
Definition ser_core.c:2710
bool deser_Floor(SerFloor *ser, Floor *deser)
Definition ser_core.c:2132
bool deser_Boss(SerBoss *ser, Boss *deser)
Definition ser_core.c:1170
bool prep_Gamestate(Gamestate *gmst, const char *static_path, size_t offset, Koliseo *kls, bool force_init)
Tries reading binary gamestate from passed path, at passed offset.
Definition ser_core.c:2799
bool deser_Treasure(SerTreasure *ser, Treasure *deser)
Definition ser_core.c:1793
bool writeSerSaveHeader(const char *filename, SerSaveHeader *data)
Writes passed SerSaveHeader to passed file path.
Definition ser_core.c:27
bool ser_Equipslot(Equipslot *deser, SerEquipslot *ser)
Definition ser_core.c:845
bool deser_Shop(SerShop *ser, Shop *deser)
Definition ser_core.c:1867
bool deser_Roadfork(SerRoadfork *ser, Roadfork *deser)
Definition ser_core.c:1968
bool ser_Artifact(Artifact *deser, SerArtifact *ser)
Definition ser_core.c:965
bool deser_Turncounter(SerTurncounter *ser, Turncounter *deser)
Definition ser_core.c:644
bool ser_Chest(Chest *deser, SerChest *ser)
Definition ser_core.c:1750
bool ser_Shop(Shop *deser, SerShop *ser)
Definition ser_core.c:1917
bool writeSerGamestate(const char *filename, SerGamestate *data)
Definition ser_core.c:2429
bool ser_countStats(countStats *deser, SerCountstats *ser)
Definition ser_core.c:1023
bool deser_SaveHeader(SerSaveHeader *ser, SaveHeader *deser)
Converts passed SerSaveHeader into a SaveHeader.
Definition ser_core.c:218
bool deser_Fighter(SerFighter *ser, Fighter *deser)
Definition ser_core.c:1280
bool ser_GameOptions(GameOptions *deser, SerGameOptions *ser)
Definition ser_core.c:3112
bool deser_Saveslot(SerSaveslot *ser, Saveslot *deser)
Definition ser_core.c:2286
bool deser_countStats(SerCountstats *ser, countStats *deser)
Definition ser_core.c:986
bool ser_Perk(Perk *deser, SerPerk *ser)
Definition ser_core.c:702
bool readSerTurncounter(const char *filename, size_t offset, SerTurncounter *data)
Definition ser_core.c:510
bool ser_Room(Room *deser, SerRoom *ser)
Definition ser_core.c:2063
bool deser_Equipslot(SerEquipslot *ser, Equipslot *deser)
Definition ser_core.c:826
bool deser_Artifact(SerArtifact *ser, Artifact *deser)
Definition ser_core.c:943
bool deser_Gamestate(SerGamestate *ser, Gamestate *deser)
Definition ser_core.c:2638
bool deser_Chest(SerChest *ser, Chest *deser)
Definition ser_core.c:1707
bool deser_Perk(SerPerk *ser, Perk *deser)
Definition ser_core.c:686
bool appendSerTurncounter(const char *filename, SerTurncounter *data)
Definition ser_core.c:487
bool ser_Saveslot(Saveslot *deser, SerSaveslot *ser)
Definition ser_core.c:2313
bool appendSerGameOptions(const char *filename, SerGameOptions *data)
Definition ser_core.c:3157
bool ser_Specialslot(Specialslot *deser, SerSpecialslot *ser)
Definition ser_core.c:884
bool ser_Path(Path *deser, SerPath *ser)
Definition ser_core.c:2381
bool deser_Equip(SerEquip *ser, Equip *deser)
Definition ser_core.c:753
bool ser_Boss(Boss *deser, SerBoss *ser)
Definition ser_core.c:1225
bool deser_Path(SerPath *ser, Path *deser)
Definition ser_core.c:2339
bool ser_Fighter(Fighter *deser, SerFighter *ser)
Definition ser_core.c:1431
bool writeSerGameOptions(const char *filename, SerGameOptions *data)
Definition ser_core.c:3135
bool ser_Consumable(Consumable *deser, SerConsumable *ser)
Definition ser_core.c:924
bool deser_Wincon(SerWincon *ser, Wincon *deser)
Definition ser_core.c:2244
bool deser_Enemy(SerEnemy *ser, Enemy *deser)
Definition ser_core.c:1060
bool ser_Skillslot(Skillslot *deser, SerSkillslot *ser)
Definition ser_core.c:736
bool ser_Treasure(Treasure *deser, SerTreasure *ser)
Definition ser_core.c:1830
bool ser_Wincon(Wincon *deser, SerWincon *ser)
Definition ser_core.c:2265
bool deser_Consumable(SerConsumable *ser, Consumable *deser)
Definition ser_core.c:904
bool readSerGameOptions(const char *filename, size_t offset, SerGameOptions *data)
Definition ser_core.c:3179
bool appendSerGamestate(const char *filename, SerGamestate *data)
Definition ser_core.c:2451
bool ser_Turncounter(Turncounter *deser, SerTurncounter *ser)
Definition ser_core.c:665
SaveHeader * prep_saveHeader(const char *static_path, Koliseo *kls, bool force_init, bool *did_init, int saveslot_index)
Tries reading binary save from passed path.
Definition ser_core.c:262
bool ser_Enemy(Enemy *deser, SerEnemy *ser)
Definition ser_core.c:1114
bool ser_Floor(Floor *deser, SerFloor *ser)
Definition ser_core.c:2186
bool prep_GameOptions(GameOptions *game_options, const char *static_path, size_t offset, Koliseo *kls, bool force_init)
Definition ser_core.c:3342
bool deser_Room(SerRoom *ser, Room *deser)
Definition ser_core.c:2006
bool ser_Equip(Equip *deser, SerEquip *ser)
Definition ser_core.c:789
bool read_savedir(const char *dirpath)
Definition ser_core.c:2988
bool deser_FoeParty(SerFoeParty *ser, FoeParty *deser)
Definition ser_core.c:1584
bool deser_Specialslot(SerSpecialslot *ser, Specialslot *deser)
Definition ser_core.c:864
bool readSerGamestate(const char *filename, size_t offset, SerGamestate *data)
Definition ser_core.c:2473
bool ser_FoeParty(FoeParty *deser, SerFoeParty *ser)
Definition ser_core.c:1643
bool ser_Roadfork(Roadfork *deser, SerRoadfork *ser)
Definition ser_core.c:1987
bool readSerSaveHeader(const char *filename, SerSaveHeader *data)
Reads SerSaveHeader from passed file path into passed structure.
Definition ser_core.c:56
#define SERPATH_SEED_BUFSIZE
Definition ser_core.h:783
#define SERSAVEHEADER_BUFSIZE
Defines size for all SerSaveHeader char buffers.
Definition ser_core.h:32
#define SERFIGHTER_NAME_BUFSIZE
Defines size for SerFighter name buffer.
Definition ser_core.h:450
#define SAVEHEADER_BUFSIZE
Defines size for all SaveHeader char buffers.
Definition ser_core.h:61
Represents the entity initialised from a artifactClass.
Definition game_core.h:550
Represents the entity initialised from a bossClass.
Definition game_core.h:1205
Represents the entity initialised from a chestClass.
Definition game_core.h:1558
Holds a certain qty of a consumableClass.
Definition game_core.h:501
Represents the entity initialised from a enemyClass.
Definition game_core.h:1164
Represents the entity initialised from a equipClass.
Definition game_core.h:1417
Represents the entity containing an Equip instance.
Definition game_core.h:1472
Represents the entity initialised from a fighterClass.
Definition game_core.h:1094
Represents the entity initialised from a floorClass.
Definition game_core.h:1826
Represents the entity initialised from a foePartyClass.
Definition game_core.h:1726
Holds options useful for user runtime preferences.
Definition game_core.h:199
Holds arguments for a game.
Definition game_core.h:1901
Holds the state of game progression.
Definition game_core.h:1358
Represents the entity initialised from a perkClass.
Definition game_core.h:1012
Represents the entity initialised from a roadforkClass.
Definition game_core.h:1648
Represents the entity initialised from a roomClass.
Definition game_core.h:1771
Save header.
Definition ser_core.h:69
int32_t api_level
Definition ser_core.h:70
char game_version[SAVEHEADER_BUFSIZE+1]
Definition ser_core.h:71
char machine[SAVEHEADER_BUFSIZE+1]
Definition ser_core.h:74
char save_version[SAVEHEADER_BUFSIZE+1]
Definition ser_core.h:72
char os[SAVEHEADER_BUFSIZE+1]
Definition ser_core.h:73
Holds arguments for a saveslot.
Definition game_core.h:409
Serialized Artifact.
Definition ser_core.h:291
int32_t innerValue
Indicates interal state of the item when needed.
Definition ser_core.h:296
int32_t active
Flag used to mark instance whose function pointer has been called already.
Definition ser_core.h:295
int32_t qty
Indicates how many copies of the artifact the instance of this class holds.
Definition ser_core.h:294
Serialized Boss.
Definition ser_core.h:410
int8_t stamina
Current stamina value.
Definition ser_core.h:425
int8_t atk
Current atk value.
Definition ser_core.h:414
int8_t level
Level value.
Definition ser_core.h:417
int8_t totalhp
Full hp value.
Definition ser_core.h:420
int8_t energy
Current energy value.
Definition ser_core.h:422
int8_t def
Current def value.
Definition ser_core.h:415
int8_t vel
Current vel value.
Definition ser_core.h:416
int8_t turnboost_enr
Current temp boost value for enr.
Definition ser_core.h:436
int8_t totalstamina
Full stamina value.
Definition ser_core.h:426
int8_t hp
Current hp value.
Definition ser_core.h:413
int32_t status
Defines active fighterStatus.
Definition ser_core.h:428
int8_t turnboost_vel
Current temp boost value for vel.
Definition ser_core.h:435
int8_t prize
Amount of currency dropped on defeat.
Definition ser_core.h:438
int8_t beast
Flag defining the instance as "beast" if set.
Definition ser_core.h:429
int8_t turnboost_def
Current temp boost value for def.
Definition ser_core.h:434
int8_t xp
Xp value given on death.
Definition ser_core.h:419
SerTurncounter counters[COUNTERSMAX+1]
Array with all the SerTurncounter.
Definition ser_core.h:432
int8_t turnboost_atk
Current temp boost value for atk.
Definition ser_core.h:433
int8_t totalenergy
Full energy value.
Definition ser_core.h:423
SerSkillslot skills[BOSS_SKILL_SLOTS+1]
Array with all the SerSkillslot.
Definition ser_core.h:431
int8_t luck
Luck value.
Definition ser_core.h:418
Serialized Chest.
Definition ser_core.h:580
SerConsumable consumables[CHEST_CONSUMABLES_MAX]
The contained consumables.
Definition ser_core.h:585
int32_t consumablesCount
Defines how many consumables the chest contains.
Definition ser_core.h:583
int32_t equipsCount
Defines how many equips the chest contains.
Definition ser_core.h:586
SerEquip equips[CHEST_EQUIPS_MAX]
The contained equips.
Definition ser_core.h:588
Serialized Consumable.
Definition ser_core.h:264
int32_t qty
Indicates how many copies of the consumable the instance of this class holds.
Definition ser_core.h:267
Serialized countStats.
Definition ser_core.h:320
int32_t floorscompleted
How many floors were completed.
Definition ser_core.h:328
int8_t unique_bosseskilled
How many unique bosses were defeated.
Definition ser_core.h:334
int32_t consumablesfound
How many consumabls were found.
Definition ser_core.h:323
int8_t killed_enemies[ENEMYCLASSESMAX+1]
Keeps track of which enemyClass you've killed.
Definition ser_core.h:333
int32_t roomscompleted
How many rooms were completed.
Definition ser_core.h:327
int32_t bosseskilled
How many bosses were defeated.
Definition ser_core.h:331
int32_t specialsunlocked
How many special move were unlocked.
Definition ser_core.h:329
int32_t equipsfound
How many equips were found.
Definition ser_core.h:324
int8_t killed_bosses[BOSSCLASSESMAX+1]
Keeps track of which bossClass you've killed.
Definition ser_core.h:335
int32_t criticalhits
How many criticals were dealt.
Definition ser_core.h:326
int32_t enemieskilled
How many enemies were defeated.
Definition ser_core.h:322
int32_t coinsfound
How many coins you found in total.
Definition ser_core.h:330
int32_t artifactsfound
How many artifacts were found.
Definition ser_core.h:325
int8_t unique_enemieskilled
How many unique enemies were defeated.
Definition ser_core.h:332
int32_t keysfound
How many keys you found in total.
Definition ser_core.h:336
Serialized Enemy.
Definition ser_core.h:360
int8_t vel
Current vel value.
Definition ser_core.h:367
int8_t turnboost_vel
Current temp boost value for vel.
Definition ser_core.h:387
int8_t beast
Flag defining the instance as "beast" if set.
Definition ser_core.h:380
int8_t totalenergy
Full energy value.
Definition ser_core.h:374
int8_t hp
Current hp value.
Definition ser_core.h:364
int8_t xp
Xp value given on death.
Definition ser_core.h:370
SerSkillslot skills[ENEMY_SKILL_SLOTS+1]
Array with all the SerSkillslot.
Definition ser_core.h:382
int8_t totalhp
Full hp value.
Definition ser_core.h:371
int8_t atk
Current atk value.
Definition ser_core.h:365
int8_t stamina
Current stamina value.
Definition ser_core.h:376
int32_t status
Defines active fighterStatus.
Definition ser_core.h:379
int8_t totalstamina
Full stamina value.
Definition ser_core.h:377
int8_t def
Current def value.
Definition ser_core.h:366
int8_t turnboost_atk
Current temp boost value for atk.
Definition ser_core.h:385
SerTurncounter counters[COUNTERSMAX+1]
Array with all the SerTurncounter.
Definition ser_core.h:384
int8_t level
Level value.
Definition ser_core.h:368
int8_t energy
Current energy value.
Definition ser_core.h:373
int8_t turnboost_enr
Current temp boost value for enr.
Definition ser_core.h:388
int8_t index
Defines position inside containing foeParty.
Definition ser_core.h:362
int8_t turnboost_def
Current temp boost value for def.
Definition ser_core.h:386
int8_t prize
Amount of currency dropped on defeat.
Definition ser_core.h:390
int8_t luck
Luck value.
Definition ser_core.h:369
Serialized Equip.
Definition ser_core.h:175
int8_t enr
Definition ser_core.h:184
int8_t def
Definition ser_core.h:182
int8_t equipped
Flag indicating the instance as currently in use if set.
Definition ser_core.h:179
int8_t cost
Definition ser_core.h:187
int8_t vel
Definition ser_core.h:183
int8_t level
Definition ser_core.h:180
int8_t atk
Definition ser_core.h:181
int32_t type
Defines which kind of Equipzone the instance relates to.
Definition ser_core.h:178
int8_t bonus
Definition ser_core.h:185
int8_t perksCount
Definition ser_core.h:186
quality qual
Definition ser_core.h:188
SerPerk perks[EQUIPPERKSMAX]
Definition ser_core.h:189
Serialized Equipslot.
Definition ser_core.h:213
int8_t active
Flag indicating the instance as currently in use if set.
Definition ser_core.h:216
int32_t type
Defines which kind of Equipzone the instance relates to.
Definition ser_core.h:215
Serialized Fighter.
Definition ser_core.h:464
SerPerk perks[PERKSMAX+1]
Array with all the SerPerk.
Definition ser_core.h:494
int8_t vel
Current vel value.
Definition ser_core.h:471
int8_t floor_x
Current x position in floor.
Definition ser_core.h:519
int8_t totallevelxp
Xp needed to level up.
Definition ser_core.h:476
int8_t totalxp
Lifetime xp value.
Definition ser_core.h:474
int8_t def
Current def value.
Definition ser_core.h:470
int32_t status
Defines active fighterStatus.
Definition ser_core.h:478
int8_t equipsBagOccupiedSlots
Keeps track of how many slots are occupied.
Definition ser_core.h:501
int8_t turnboost_enr
Current temp boost value for enr.
Definition ser_core.h:491
int8_t totalenergy
Full energy value.
Definition ser_core.h:481
int8_t perksCount
Keeps track of how many perks are active.
Definition ser_core.h:493
SerTurncounter counters[COUNTERSMAX+1]
Array with all the SerTurncounter.
Definition ser_core.h:487
int8_t permboost_enr
Current temp boost value for enr.
Definition ser_core.h:507
char name[SERFIGHTER_NAME_BUFSIZE]
Name string.
Definition ser_core.h:466
SerArtifact artifactsBag[ARTIFACTSMAX+1]
Array with all the Artifacts found.
Definition ser_core.h:499
int8_t permboost_atk
Current temp boost value for atk.
Definition ser_core.h:504
int8_t floor_y
Current y position in floor.
Definition ser_core.h:520
SerCountstats stats
SerCountstats instance.
Definition ser_core.h:514
int8_t atk
Current atk value.
Definition ser_core.h:469
int8_t turnboost_vel
Current temp boost value for vel.
Definition ser_core.h:490
SerSpecialslot specials[SPECIALSMAX+1]
Array with all the SerSpecialslot.
Definition ser_core.h:484
int8_t permboost_vel
Current temp boost value for vel.
Definition ser_core.h:506
int8_t equipboost_enr
Current equip boost value for enr.
Definition ser_core.h:512
int8_t keys_balance
Amount of keys owned.
Definition ser_core.h:517
SerEquip equipsBag[EQUIPSBAGSIZE+1]
Array with all the SerEquip found.
Definition ser_core.h:497
int8_t level
Current level value.
Definition ser_core.h:472
int8_t turnboost_atk
Current temp boost value for atk.
Definition ser_core.h:488
int8_t stamina
Current stamina value.
Definition ser_core.h:482
int8_t hp
Current hp value.
Definition ser_core.h:468
int8_t turnboost_def
Current temp boost value for def.
Definition ser_core.h:489
SerConsumable consumablesBag[CONSUMABLESMAX+1]
Array with all the Consumables found.
Definition ser_core.h:498
int8_t equipboost_atk
Current equip boost value for atk.
Definition ser_core.h:509
int8_t energy
Current energy value.
Definition ser_core.h:480
int8_t currentlevelxp
Xp gained for the current level.
Definition ser_core.h:475
int8_t totalstamina
Full stamina value.
Definition ser_core.h:483
int8_t totalhp
Full hp value.
Definition ser_core.h:477
int32_t balance
Amount of currency owned.
Definition ser_core.h:516
int8_t permboost_def
Current temp boost value for def.
Definition ser_core.h:505
int8_t equipboost_vel
Current equip boost value for vel.
Definition ser_core.h:511
SerSkillslot skills[FIGHTER_SKILL_SLOTS+1]
Array with all the SerSkillslot.
Definition ser_core.h:485
int8_t earliestBagSlot
Keeps track of first available spot.
Definition ser_core.h:502
int8_t luck
Current luck value.
Definition ser_core.h:473
int8_t equipboost_def
Current equip boost value for def.
Definition ser_core.h:510
SerEquipslot equipslots[EQUIPZONES+1]
Array with all the SerEquipslot.
Definition ser_core.h:496
Serialized Floor.
Definition ser_core.h:716
int8_t explored_area
Holds how many cells we explored.
Definition ser_core.h:726
int8_t explored_matrix[FLOOR_MAX_COLS][FLOOR_MAX_ROWS]
Int matrix for explored value for rooms of this floor.
Definition ser_core.h:725
bool from_bsp
Flag for floors generated using bsp.
Definition ser_core.h:727
int8_t floor_layout[FLOOR_MAX_COLS][FLOOR_MAX_ROWS]
Defines the layout for the Floor (which cells are actually filled).
Definition ser_core.h:721
int8_t index
The floor's own number.
Definition ser_core.h:718
int32_t roomclass_layout[FLOOR_MAX_COLS][FLOOR_MAX_ROWS]
roomClass matrix for class value for rooms of this floor.
Definition ser_core.h:724
int8_t area
Holds how many cells we succesfully random walked.
Definition ser_core.h:722
Serialized FoeParty.
Definition ser_core.h:544
int8_t alive_enemies[ROOM_ENEMIES_MAX+1]
Array of integers with 1 for alive enemies in that position.
Definition ser_core.h:559
int8_t alive_bosses[FOES_BOSSES_MAX+1]
Array of integers with 1 for alive bosses in that position.
Definition ser_core.h:560
int8_t turnboost_vel
Current temp boost value for vel.
Definition ser_core.h:551
SerTurncounter counters[COUNTERSMAX+1]
Array with all the SerTurncounter.
Definition ser_core.h:548
int8_t turnboost_def
Current temp boost value for def.
Definition ser_core.h:550
SerEnemy enemy_foes[ROOM_ENEMIES_MAX+1]
Array for all enemies in a room.
Definition ser_core.h:553
int8_t turnboost_atk
Current temp boost value for atk.
Definition ser_core.h:549
int8_t level
Level for the whole FoeParty.
Definition ser_core.h:547
int8_t size
Number of members in the FoeParty.
Definition ser_core.h:556
int8_t turnboost_enr
Current temp boost value for enr.
Definition ser_core.h:552
SerBoss boss_foes[FOES_BOSSES_MAX+1]
Array of for all bosses in a room.
Definition ser_core.h:555
int8_t tot_alive
Number of alive members of the FoeParty.
Definition ser_core.h:557
int8_t current_index
Index of current foe advancement.
Definition ser_core.h:558
Serialized GameOptions.
Definition ser_core.h:867
int32_t directional_keys_schema
Definition ser_core.h:873
bool do_autosave
Definition ser_core.h:870
bool use_default_background
Definition ser_core.h:869
bool use_3x3_fov
Definition ser_core.h:871
Serialized Gamestate.
Definition ser_core.h:825
int64_t start_time
Keeps track of game start time.
Definition ser_core.h:827
SerCountstats stats
Keeps track of stats for the game.
Definition ser_core.h:829
SerFloor current_floor
Pointer to current floor, initialised when gamemode==Rogue.
Definition ser_core.h:844
SerRoom current_room
Pointer to current room.
Definition ser_core.h:846
SerWincon wincon
Keeps track of current Wincon.
Definition ser_core.h:836
int8_t current_room_index
Keeps track of current room index.
Definition ser_core.h:833
int8_t current_fighters
Keeps track of Fighter number for the game.
Definition ser_core.h:831
bool is_seeded
Denotes if the current game was started with a set seed.
Definition ser_core.h:847
SerFighter player
Keeps track of current Player.
Definition ser_core.h:840
int8_t current_enemy_index
Keeps track of current enemy index.
Definition ser_core.h:835
int32_t current_roomtype
Keeps track of current room type.
Definition ser_core.h:832
SerPath path
Keeps track of current Path.
Definition ser_core.h:838
int32_t gamemode
Keeps track of current Gamemode.
Definition ser_core.h:842
Serialized SerPath.
Definition ser_core.h:797
SerSaveslot current_saveslot
Defines current SerSaveslot for the game.
Definition ser_core.h:803
int8_t length
Defines how many rooms there are in total.
Definition ser_core.h:799
int8_t luck
Defines global luck value.
Definition ser_core.h:800
SerWincon win_condition
Defines the win condition for the current game.
Definition ser_core.h:802
char seed[SERPATH_SEED_BUFSIZE+1]
Holds seed for current run.
Definition ser_core.h:804
int8_t prize
Defines the reward for getting to length.
Definition ser_core.h:801
int64_t rng_advancements
Current advancements for rng.
Definition ser_core.h:805
Serialized Perk.
Definition ser_core.h:125
int32_t innerValue
Contains an integer for perks that need a state.
Definition ser_core.h:128
Serialized Roadfork.
Definition ser_core.h:663
int32_t options[2]
Defines which choices the fork has.
Definition ser_core.h:665
Serialized Room.
Definition ser_core.h:685
SerBoss boss
The SerBoss, initialised for rooms of class BOSS.
Definition ser_core.h:693
SerRoadfork roadfork
The SerRoadfork, initialised for rooms of class ROADFORK.
Definition ser_core.h:690
SerFoeParty foes
The SerFoeParty pointer, initialised for rooms of class ENEMIES.
Definition ser_core.h:696
SerEnemy enemies[ROOM_ENEMIES_MAX]
Array for enemies.
Definition ser_core.h:695
int8_t enemyTotal
Total number of enemies initialised in enemies array.
Definition ser_core.h:694
SerShop shop
The SerShop, initialised for rooms of class SHOP.
Definition ser_core.h:689
SerTreasure treasure
The SerTreasure, initialised for rooms of class TREASURE.
Definition ser_core.h:691
int8_t index
The room's own number.
Definition ser_core.h:687
Serialized save header.
Definition ser_core.h:43
char os[SERSAVEHEADER_BUFSIZE+1]
Definition ser_core.h:48
int32_t api_level
Definition ser_core.h:45
char machine[SERSAVEHEADER_BUFSIZE+1]
Definition ser_core.h:49
char save_version[SERSAVEHEADER_BUFSIZE+1]
Definition ser_core.h:47
char game_version[SERSAVEHEADER_BUFSIZE+1]
Definition ser_core.h:46
Serialized Saveslot.
Definition ser_core.h:771
char name[50]
Name string for the saveslot.
Definition ser_core.h:773
int8_t index
Index of saveslot.
Definition ser_core.h:775
char save_path[255]
Path to savefile.
Definition ser_core.h:774
Serialized Shop.
Definition ser_core.h:632
int8_t itemCount
Total number of items for sale.
Definition ser_core.h:634
int8_t consumablePrices[CONSUMABLE_SHOP_MAX]
Array for consumables prices.
Definition ser_core.h:643
int8_t consumablesCount
Total number of consumables for sale, includes quantity for each kind of consumable.
Definition ser_core.h:640
SerConsumable consumables[CONSUMABLE_SHOP_MAX]
Array for consumables on sale.
Definition ser_core.h:642
int8_t uniqueConsumablesCount
Total of unique consumables for sale.
Definition ser_core.h:641
int8_t equipPrices[EQUIP_SHOP_MAX]
Array for equips prices.
Definition ser_core.h:638
int8_t equipsCount
Total number of equips for sale.
Definition ser_core.h:636
SerEquip equips[EQUIP_SHOP_MAX]
Array for equips on sale.
Definition ser_core.h:637
Serialized Skillslot.
Definition ser_core.h:152
int8_t enabled
Flag defining if the slot is initialised.
Definition ser_core.h:155
Serialized Specialslot.
Definition ser_core.h:236
int8_t enabled
Flag defining if the current slot is initialised.
Definition ser_core.h:238
int8_t cost
Cost of use.
Definition ser_core.h:240
int8_t move
Defines which kind of specialMove the slot is holding.
Definition ser_core.h:239
Serialized Treasure.
Definition ser_core.h:608
SerChest chest
The treasure SerChest, initialised if class == TREASURE_CHEST.
Definition ser_core.h:611
SerArtifact artifact
The treasure SerArtifact, initialised if class == TREASURE_ARTIFACT.
Definition ser_core.h:613
SerConsumable consumable
The treasure SerConsumable, initialised if class == TREASURE_CONSUMABLE.
Definition ser_core.h:612
Serialized Turncounter.
Definition ser_core.h:97
int32_t type
Defines which kind of Countertype the instance relates to.
Definition ser_core.h:101
int32_t count
Defines the current count.
Definition ser_core.h:99
int32_t innerValue
Contains an integer for counters that need a state.
Definition ser_core.h:100
Serialized Wincon.
Definition ser_core.h:747
int8_t target_val
Defines the total progress.
Definition ser_core.h:751
int8_t current_val
Defines the current progress.
Definition ser_core.h:750
Represents a shop instance.
Definition game_core.h:1504
Holds state for a skillType.
Definition game_core.h:898
Holds state for a Fighter specials.
Definition game_core.h:852
Represents the entity initialised from a treasureClass.
Definition game_core.h:1604
Represents the entity initialised from a CounterType.
Definition game_core.h:1304
Defines the entity initialised from a winconClass.
Definition game_core.h:1339
Holds the lifetime stats of the player.
Definition game_core.h:780