diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 7d7b41a..ae2abcb 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 2b9d4ec..9b10ff3 100644 --- a/main.cpp +++ b/main.cpp @@ -2138,8 +2138,8 @@ void SeasonI::keyUpdates() { } } if (LeftPressed()) { - OVERWORLD_POWER_SELECTION_MEMBER=-1; if (PARTY_MEMBER_COUNT==1) { + OVERWORLD_POWER_SELECTION_MEMBER=-1; GAME_STATE=GameState::OVERWORLD_MENU; } else { GAME_STATE=GameState::OVERWORLD_POWER_PLAYER_MENU; @@ -2416,13 +2416,19 @@ void SeasonI::keyUpdates() { if (EDITING_LAYER==layer::ENCOUNTER&&GetMouse(0).bPressed) { for (int i=0;iencounters.size();i++) { if(CURRENT_MAP->encounters[i]->pos==(vd2d)HIGHLIGHTED_TILE*32) { - EDITING_ENCOUNTER=CURRENT_MAP->encounters[i]; - TextEntryEnable(true); - break; + for (int j=0;jencounters[i]->objs.size();j++) { + int index=CURRENT_MAP->encounters[i]->objs[j]->obj->objArrElement; + delete OBJECTS[index]; + OBJECTS.erase(OBJECTS.begin()+index); + for (int k=0;kobjArrElement=k; + } + } + delete CURRENT_MAP->encounters[i]; + CURRENT_MAP->encounters.erase(CURRENT_MAP->encounters.begin()+i--); + continue; } } - } else - if (EDITING_LAYER==layer::ENCOUNTER&&GetMouse(0).bPressed) { LoadEncounter(CURRENT_MAP,HIGHLIGHTED_TILE*32,ENCOUNTER_LIST[ENCOUNTER_SELECTED]->chance,ENCOUNTER_SELECTED,true); } else if (EDITING_LAYER==layer::ENCOUNTER&&GetMouse(1).bPressed) { @@ -2443,6 +2449,14 @@ void SeasonI::keyUpdates() { } } else if (EDITING_LAYER==layer::OBJECT&&GetMouse(0).bPressed) { + for (int i=0;iGetPos()==(vd2d)HIGHLIGHTED_TILE*32) { + delete OBJECTS[i]; + OBJECTS.erase(OBJECTS.begin()+i--); + } else { + OBJECTS[i]->objArrElement=i; + } + } AddObjectToWorld(CreateObject(SELECTED_OBJ_ID,HIGHLIGHTED_TILE*32)); } else if (EDITING_LAYER==layer::OBJECT&&GetMouse(1).bReleased) { diff --git a/save0 b/save0 index a6c40b5..04d38e5 100644 --- a/save0 +++ b/save0 @@ -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 -1 -1 -1 334 202 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 321 202 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 309 202 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 297 202 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 67 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 512 1 1 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 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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