diff options
| author | inspectredc <78732756+inspectredc@users.noreply.github.com> | 2024-05-09 15:58:52 +0100 |
|---|---|---|
| committer | Garrett Cox <garrettjcox@gmail.com> | 2024-05-22 09:05:04 -0500 |
| commit | ad478cfc594ec8820bda726b3dc5fffe2df65e30 (patch) | |
| tree | bcea98a74768141b8f812373abeb939116e6d770 /mm/2s2h/DeveloperTools/SaveEditor.cpp | |
| parent | 1d5d9be0694e0ee6886925ca81929900e7047c9a (diff) | |
DPad Items (#228)
* Initial Dpad
* remove old hud stuff
* and comment
* s..
* add dpad equip macro back in
* fix inputs
* fix equipping (hopefully all)
* finish some todos
* add 2s2h asset header
* check dpad macro
* remove 2s2h_assets
* re-add empty texture
* use correct struct for default dpad equips
* dpad save stuff
* fix item offering, use correct equip offset values
* finally figure out unk_154 and fix mask equipping
* avoid ugly code
* add necessary condition
* correct save names for dpad items/slots
* remove todos and sort out suggestions and rename cvar
* func standardise renaming
* Add dpad to hud presets
* dpad save migration
Diffstat (limited to 'mm/2s2h/DeveloperTools/SaveEditor.cpp')
| -rw-r--r-- | mm/2s2h/DeveloperTools/SaveEditor.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index 4eeb95661..57621b861 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -387,23 +387,26 @@ void DrawEquipItemMenu(InventorySlot slot) { gSaveContext.save.saveInfo.equips.cButtonSlots[CUR_FORM][EQUIP_SLOT_C_RIGHT] = slot; Interface_LoadItemIconImpl(gPlayState, EQUIP_SLOT_C_RIGHT); } - // Todo: DPAD equips support - // if (ImGui::MenuItem("D-Up")) { - // gSaveContext.save.saveInfo.equips.buttonItems[CUR_FORM][4] = currentItemId; - // gSaveContext.save.saveInfo.equips.cButtonSlots[CUR_FORM][3] = slot; - // } - // if (ImGui::MenuItem("D-Down")) { - // gSaveContext.save.saveInfo.equips.buttonItems[CUR_FORM][5] = currentItemId; - // gSaveContext.save.saveInfo.equips.cButtonSlots[CUR_FORM][4] = slot; - // } - // if (ImGui::MenuItem("D-Left")) { - // gSaveContext.save.saveInfo.equips.buttonItems[CUR_FORM][6] = currentItemId; - // gSaveContext.save.saveInfo.equips.cButtonSlots[CUR_FORM][5] = slot; - // } - // if (ImGui::MenuItem("D-Right")) { - // gSaveContext.save.saveInfo.equips.buttonItems[CUR_FORM][7] = currentItemId; - // gSaveContext.save.saveInfo.equips.cButtonSlots[CUR_FORM][6] = slot; - // } + if (ImGui::MenuItem("D-Up")) { + gSaveContext.save.shipSaveInfo.dpadEquips.dpadItems[CUR_FORM][EQUIP_SLOT_D_RIGHT] = currentItemId; + gSaveContext.save.shipSaveInfo.dpadEquips.dpadSlots[CUR_FORM][EQUIP_SLOT_D_RIGHT] = slot; + Interface_Dpad_LoadItemIconImpl(gPlayState, EQUIP_SLOT_D_RIGHT); + } + if (ImGui::MenuItem("D-Down")) { + gSaveContext.save.shipSaveInfo.dpadEquips.dpadItems[CUR_FORM][EQUIP_SLOT_D_LEFT] = currentItemId; + gSaveContext.save.shipSaveInfo.dpadEquips.dpadSlots[CUR_FORM][EQUIP_SLOT_D_LEFT] = slot; + Interface_Dpad_LoadItemIconImpl(gPlayState, EQUIP_SLOT_D_LEFT); + } + if (ImGui::MenuItem("D-Left")) { + gSaveContext.save.shipSaveInfo.dpadEquips.dpadItems[CUR_FORM][EQUIP_SLOT_D_DOWN] = currentItemId; + gSaveContext.save.shipSaveInfo.dpadEquips.dpadSlots[CUR_FORM][EQUIP_SLOT_D_DOWN] = slot; + Interface_Dpad_LoadItemIconImpl(gPlayState, EQUIP_SLOT_D_DOWN); + } + if (ImGui::MenuItem("D-Right")) { + gSaveContext.save.shipSaveInfo.dpadEquips.dpadItems[CUR_FORM][EQUIP_SLOT_D_UP] = currentItemId; + gSaveContext.save.shipSaveInfo.dpadEquips.dpadSlots[CUR_FORM][EQUIP_SLOT_D_UP] = slot; + Interface_Dpad_LoadItemIconImpl(gPlayState, EQUIP_SLOT_D_UP); + } ImGui::EndMenu(); } } |
