Save game flag data and map info

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent f1b88ee013
commit d9c9a6e276
  1. BIN
      C++ProjectTemplate
  2. 11
      main.cpp
  3. 2
      object.h
  4. 2
      save0

Binary file not shown.

@ -65,7 +65,7 @@ vi2d HIGHLIGHTED_TILE={0,0};
int EDITING_LAYER=layer::DYNAMIC;
int SELECTED_OBJ_ID = PLAYER;
int OBJ_DISPLAY_OFFSET = 0;
bool GAME_FLAGS[512]={};
std::array<bool,512> GAME_FLAGS={};
std::array<NPC_Obj*,4> PARTY_MEMBER_OBJ={};
std::array<int,4> PARTY_MEMBER_ID={};
std::array<Entity*,7> PARTY_MEMBER_STATS={};
@ -5214,6 +5214,15 @@ void SeasonI::SaveGameSaveData(int saveSlot) {
for (int i=PLAYER;i<7;i++) {
file<<*(PARTY_MEMBER_STATS[i]);
}
file<<PARTY_INVENTORY.size()<<" ";
for (int i=0;i<PARTY_INVENTORY.size();i++) {
file<<(int)PARTY_INVENTORY[i]->id<<" ";
}
file<<GAME_FLAGS.size()<<" ";
for (int i=0;i<GAME_FLAGS.size();i++) {
file<<GAME_FLAGS[i]<<" ";
}
file<<CURRENT_MAP->myID<<" ";
file.close();
}

@ -246,7 +246,7 @@ class TrashCan_Obj : public Object{
};
extern int MESSAGE_BOX_DIALOG_ANSWER;
extern bool GAME_FLAGS[512];
extern std::array<bool,512> GAME_FLAGS;
extern int GAME_STATE;
extern void SetupShop(Object*shopkeeper,std::vector<std::pair<Item*,int>> shopItems);
extern std::map<ItemName,Item*>ITEMLIST;

@ -1 +1 @@
120 120 PLAYER 30 30 8 8 4 0 0 0 0 0 0 0 11 9 10 13 14 15 16 17 33 29 21 25 1 6 4 3 5 7 12 333 240 120 120 NESS 30 30 8 8 4 0 0 0 0 0 0 0 6 33 34 29 30 31 32 0 3 -1 -1 -1 362 260 120 120 PAULA 30 30 8 8 4 0 0 0 0 0 0 0 6 21 22 23 24 37 38 0 3 -1 -1 -1 359 248 120 120 JEFF 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 ANNA 30 30 8 8 4 0 0 0 0 0 0 0 4 21 25 26 29 0 3 -1 -1 -1 359 236 120 120 KING 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 POO 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999
120 120 PLAYER 30 30 8 8 4 0 0 0 0 0 0 0 11 9 10 13 14 15 16 17 33 29 21 25 1 6 4 3 -1 -1 -1 343 200 120 120 NESS 30 30 8 8 4 0 0 0 0 0 0 0 6 33 34 29 30 31 32 0 3 -1 -1 -1 343 200 120 120 PAULA 30 30 8 8 4 0 0 0 0 0 0 0 6 21 22 23 24 37 38 0 3 -1 -1 -1 343 200 120 120 JEFF 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 ANNA 30 30 8 8 4 0 0 0 0 0 0 0 4 21 25 26 29 0 3 -1 -1 -1 343 200 120 120 KING 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 POO 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 8 3 3 3 10 10 10 10 12 12 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 2 2 2 2 2 2 2 2 5 11 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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