|
|
|
@ -149,6 +149,8 @@ public: |
|
|
|
|
std::vector<Item*> BATTLE_SPOILS_LIST; |
|
|
|
|
std::wstring BATTLE_SPOILS_MESSAGE; |
|
|
|
|
int OVERWORLD_MENU_SELECTION=0; |
|
|
|
|
std::vector<std::string> INTERACTION_MESSAGES; |
|
|
|
|
bool CLOSE_OVERWORLD_WINDOW=false; //When set to true, should cause the overworld menu to close as well once the dialog box is closed.
|
|
|
|
|
|
|
|
|
|
bool MOUSE_PRESSED_DOWN=false,MOUSE_DOWN=false,MOUSE_RELEASED=false; //TODO Implement Mouse things.
|
|
|
|
|
|
|
|
|
@ -299,6 +301,10 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
messageBoxLoad=true; |
|
|
|
|
} else { |
|
|
|
|
messageBoxVisible=false; |
|
|
|
|
if (CLOSE_OVERWORLD_WINDOW) { |
|
|
|
|
GAME_STATE=GameState::GAME_WORLD; |
|
|
|
|
} |
|
|
|
|
CLOSE_OVERWORLD_WINDOW=false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
while (messageBoxMarker<messageBoxFinalText.length()) { |
|
|
|
@ -322,6 +328,11 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (PlayerCanMove()&&INTERACTION_MESSAGES.size()>0) { |
|
|
|
|
DisplayMessageBox(INTERACTION_MESSAGES.front()); |
|
|
|
|
INTERACTION_MESSAGES.erase(INTERACTION_MESSAGES.begin()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (int i=0;i<DAMAGE_NUMBERS.size();i++) { |
|
|
|
|
DamageNumber*numb=DAMAGE_NUMBERS[i]; |
|
|
|
|
if (numb->timer>0) { |
|
|
|
@ -1031,6 +1042,53 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
OVERWORLD_MENU_SELECTION+=5; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (ACTIONKEYPRESSED) { |
|
|
|
|
switch (OVERWORLD_MENU_SELECTION) { |
|
|
|
|
case 0:{//Check is selected.
|
|
|
|
|
Object*closest=nullptr; |
|
|
|
|
float closestDist=999999; |
|
|
|
|
for (int i=0;i<OBJECTS.size();i++) { |
|
|
|
|
float dist; |
|
|
|
|
for (int j=0;j<PARTY_MEMBER_COUNT;j++) { |
|
|
|
|
if (OBJECTS[i]==PARTY_MEMBER_OBJ[j]) { |
|
|
|
|
goto next; |
|
|
|
|
} |
|
|
|
|
} //Make sure it's not a party member.
|
|
|
|
|
dist = abs(PARTY_MEMBER_OBJ[0]->GetPos().x-OBJECTS[i]->GetPos().x)+abs(PARTY_MEMBER_OBJ[0]->GetPos().y-OBJECTS[i]->GetPos().y); |
|
|
|
|
if (dist<closestDist) { |
|
|
|
|
closestDist=dist; |
|
|
|
|
closest=OBJECTS[i]; |
|
|
|
|
} |
|
|
|
|
next: |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (closest!=nullptr) { |
|
|
|
|
//Run the Interaction for this object.
|
|
|
|
|
Interaction interaction = closest->Interact(); |
|
|
|
|
if (interaction.messages.size()>0) { |
|
|
|
|
INTERACTION_MESSAGES=interaction.messages; |
|
|
|
|
DisplayMessageBox(INTERACTION_MESSAGES.front()); |
|
|
|
|
INTERACTION_MESSAGES.erase(INTERACTION_MESSAGES.begin()); |
|
|
|
|
} else { |
|
|
|
|
DisplayMessageBox("No problem here."); |
|
|
|
|
} |
|
|
|
|
CLOSE_OVERWORLD_WINDOW=true; |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case 1:{//Power is selected.
|
|
|
|
|
|
|
|
|
|
}break; |
|
|
|
|
case 2:{//Items is selected.
|
|
|
|
|
|
|
|
|
|
}break; |
|
|
|
|
case 3:{//Equip is selected.
|
|
|
|
|
|
|
|
|
|
}break; |
|
|
|
|
case 4:{//Status is selected.
|
|
|
|
|
|
|
|
|
|
}break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case GameState::EDITOR:{ |
|
|
|
|
if (IsTextEntryEnabled()) { |
|
|
|
|