Skip to content

Commit

Permalink
Rename MainMenu::SelectRelated to MainMenu::SwapMapping
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Dec 1, 2024
1 parent abd51ba commit a0ac5cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/implemented.csv
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ th06::MainMenu::WeirdSecondInputCheck
th06::MainMenu::OnUpdateOptionsMenu
th06::MainMenu::ColorMenuItem
th06::MainMenu::LoadReplayMenu
th06::MainMenu::SelectRelated
th06::MainMenu::SwapMapping
th06::MidiDevice::MidiDevice
th06::MidiDevice::Close
th06::MidiDevice::OpenDevice
Expand Down
20 changes: 10 additions & 10 deletions src/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,39 +205,39 @@ ChainCallbackResult MainMenu::OnUpdate(MainMenu *menu)
switch (menu->cursor)
{
case 0:
SelectRelated(menu, sVar1, menu->controlMapping[0], 1);
SwapMapping(menu, sVar1, menu->controlMapping[0], 1);
menu->controlMapping[0] = sVar1;
break;
case 1:
SelectRelated(menu, sVar1, menu->controlMapping[1], 0);
SwapMapping(menu, sVar1, menu->controlMapping[1], 0);
menu->controlMapping[1] = sVar1;
break;
case 2:
SelectRelated(menu, sVar1, menu->controlMapping[2], 1);
SwapMapping(menu, sVar1, menu->controlMapping[2], 1);
menu->controlMapping[2] = sVar1;
break;
case 3:
SelectRelated(menu, sVar1, menu->controlMapping[3], 0);
SwapMapping(menu, sVar1, menu->controlMapping[3], 0);
menu->controlMapping[3] = sVar1;
break;
case 4:
SelectRelated(menu, sVar1, menu->controlMapping[4], 0);
SwapMapping(menu, sVar1, menu->controlMapping[4], 0);
menu->controlMapping[4] = sVar1;
break;
case 5:
SelectRelated(menu, sVar1, menu->controlMapping[5], 0);
SwapMapping(menu, sVar1, menu->controlMapping[5], 0);
menu->controlMapping[5] = sVar1;
break;
case 6:
SelectRelated(menu, sVar1, menu->controlMapping[6], 0);
SwapMapping(menu, sVar1, menu->controlMapping[6], 0);
menu->controlMapping[6] = sVar1;
break;
case 7:
SelectRelated(menu, sVar1, menu->controlMapping[7], 0);
SwapMapping(menu, sVar1, menu->controlMapping[7], 0);
menu->controlMapping[7] = sVar1;
break;
case 8:
SelectRelated(menu, sVar1, menu->controlMapping[8], 0);
SwapMapping(menu, sVar1, menu->controlMapping[8], 0);
menu->controlMapping[8] = sVar1;
}
}
Expand Down Expand Up @@ -925,7 +925,7 @@ CursorMovement MainMenu::MoveCursor(MainMenu *menu, i32 menuLength)
#pragma optimize("", on)

#pragma optimize("s", on)
void MainMenu::SelectRelated(MainMenu *menu, i16 btnPressed, i16 oldMapping, ZunBool unk)
void MainMenu::SwapMapping(MainMenu *menu, i16 btnPressed, i16 oldMapping, ZunBool unk)
{
if (unk == 0 && menu->controlMapping[0] == btnPressed)
{
Expand Down
2 changes: 1 addition & 1 deletion src/MainMenu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct MainMenu
static CursorMovement MoveCursor(MainMenu *menu, i32 menuLength);
static void DrawMenuItem(AnmVm *vm, i32 itemNumber, i32 cursor, D3DCOLOR activeItemColor,
D3DCOLOR inactiveItemColor, i32 spriteIdx /* I think*/);
static void SelectRelated(MainMenu *menu, i16 btnPressed, i16 oldMapping, ZunBool unk);
static void SwapMapping(MainMenu *menu, i16 btnPressed, i16 oldMapping, ZunBool unk);

i32 ReplayHandling();
static ZunResult LoadReplayMenu(MainMenu *menu);
Expand Down

0 comments on commit a0ac5cf

Please sign in to comment.