generated from sigonasr2/CPlusPlusProjectTemplate
Setup inventory window
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
874e5f6fb4
commit
c40b8f7560
Binary file not shown.
1
cmake-build-debug/CMakeFiles/clion-log.txt
Normal file
1
cmake-build-debug/CMakeFiles/clion-log.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
CMakeLists.txt not found in /home/niconiconii/Documents/SeasonI Select CMakeLists.txt
|
33
main.cpp
33
main.cpp
@ -555,6 +555,7 @@ public:
|
|||||||
int BATTLE_SELECTION_CURSOR=0;
|
int BATTLE_SELECTION_CURSOR=0;
|
||||||
int POWER_SELECTION_CURSOR[4]={0,0,0,0};
|
int POWER_SELECTION_CURSOR[4]={0,0,0,0};
|
||||||
int POWER_GRADE_CURSOR[4]={0,0,0,0};
|
int POWER_GRADE_CURSOR[4]={0,0,0,0};
|
||||||
|
int ITEM_SELECTION_CURSOR=0;
|
||||||
int TARGET_SELECTION_CURSOR=0;
|
int TARGET_SELECTION_CURSOR=0;
|
||||||
bool ANYKEYPRESSED=false;
|
bool ANYKEYPRESSED=false;
|
||||||
bool ACTIONKEYPRESSED=false;
|
bool ACTIONKEYPRESSED=false;
|
||||||
@ -646,11 +647,11 @@ public:
|
|||||||
This is a test message that lets us trigger straight from a cutscene! Cool!)"),
|
This is a test message that lets us trigger straight from a cutscene! Cool!)"),
|
||||||
액션 ModifyObject(0,ANIMATIONS["player.png"],{5,5},MAGENTA),
|
액션 ModifyObject(0,ANIMATIONS["player.png"],{5,5},MAGENTA),
|
||||||
액션 MoveCutsceneObject(1,{320,64},1),});
|
액션 MoveCutsceneObject(1,{320,64},1),});
|
||||||
/*DisplayMessageBox(R"(Hello World!
|
|
||||||
This is a rather long message, but I hope it reaches you well
|
AddItemToPlayerInventory(ItemName::COOKIE);
|
||||||
in some form or capacity or another. Even though it
|
AddItemToPlayerInventory(ItemName::COOKIE);
|
||||||
goes on a very long time, I hope you can understand this is only for testing purposes!
|
AddItemToPlayerInventory(ItemName::COOKIE);
|
||||||
)");*/
|
AddItemToPlayerInventory(ItemName::CRACKED_BAT);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -955,7 +956,7 @@ goes on a very long time, I hope you can understand this is only for testing pur
|
|||||||
if (GetTextSizeProp(messageBoxFinalText).x>=WIDTH/2-MESSAGE_BORDER_X) {
|
if (GetTextSizeProp(messageBoxFinalText).x>=WIDTH/2-MESSAGE_BORDER_X) {
|
||||||
while (messageBoxFinalText[messageBoxStopMarker]!=' ') {
|
while (messageBoxFinalText[messageBoxStopMarker]!=' ') {
|
||||||
messageBoxStopMarker--;
|
messageBoxStopMarker--;
|
||||||
};
|
}
|
||||||
messageBoxFinalText.erase(messageBoxFinalText.begin()+messageBoxStopMarker,messageBoxFinalText.end());
|
messageBoxFinalText.erase(messageBoxFinalText.begin()+messageBoxStopMarker,messageBoxFinalText.end());
|
||||||
messageBoxFinalText+='\n';
|
messageBoxFinalText+='\n';
|
||||||
charsWritten=false;
|
charsWritten=false;
|
||||||
@ -1071,8 +1072,7 @@ goes on a very long time, I hope you can understand this is only for testing pur
|
|||||||
SetupTargetSelect();
|
SetupTargetSelect();
|
||||||
}break;
|
}break;
|
||||||
case 2:{ //Items selected.
|
case 2:{ //Items selected.
|
||||||
DisplayMessageBox("Not implemented yet.");
|
BATTLE_STATE=BattleState::ITEM_SELECT;
|
||||||
//BATTLE_STATE=BattleState::ITEM_SELECT;
|
|
||||||
}break;
|
}break;
|
||||||
case 3:{ //Defend selected.
|
case 3:{ //Defend selected.
|
||||||
//DisplayMessageBox("Not implemented yet.");
|
//DisplayMessageBox("Not implemented yet.");
|
||||||
@ -1342,6 +1342,11 @@ goes on a very long time, I hope you can understand this is only for testing pur
|
|||||||
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->atb=400;
|
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->atb=400;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case BattleState::ITEM_SELECT:{
|
||||||
|
if (LeftPressed()||RightPressed()) {
|
||||||
|
ITEM_SELECTION_CURSOR+=ITEM_SELECTION_CURSOR&1?-1:1;
|
||||||
|
}
|
||||||
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1677,6 +1682,11 @@ goes on a very long time, I hope you can understand this is only for testing pur
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (BATTLE_STATE==BattleState::ITEM_SELECT) {
|
||||||
|
SetDrawTarget(layer::INTERFACE);
|
||||||
|
DrawDecal({8+ITEM_SELECTION_CURSOR*(WIDTH-8)/2,12*(POWER_SELECTION_CURSOR[-CURRENT_TURN-1]-POWER_SELECTION_OFFSET[-CURRENT_TURN-1])+8},SPRITES["cursor.png"]);
|
||||||
|
DrawDialogBox({4,4},{(int)(WIDTH-8),(int)(HEIGHT/2)},Pixel(70, 33, 105,128),Pixel(62, 54, 69,128),Pixel(185, 148, 255,128));
|
||||||
|
}
|
||||||
if (BATTLE_STATE==BattleState::TARGET_SELECT) {
|
if (BATTLE_STATE==BattleState::TARGET_SELECT) {
|
||||||
SetDrawTarget(layer::GROUND);
|
SetDrawTarget(layer::GROUND);
|
||||||
if (SELECTED_TARGET<0) {
|
if (SELECTED_TARGET<0) {
|
||||||
@ -3623,6 +3633,13 @@ goes on a very long time, I hope you can understand this is only for testing pur
|
|||||||
}
|
}
|
||||||
return finalDamage;
|
return finalDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddItemToPlayerInventory(ItemName item) {
|
||||||
|
PARTY_INVENTORY.push_back(ITEMLIST[item]);
|
||||||
|
}
|
||||||
|
void RemoveItemFromPlayerInventory(int slot) {
|
||||||
|
PARTY_INVENTORY.erase(PARTY_INVENTORY.begin()+slot);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user