Skip to content

Commit b8bedfa

Browse files
committed
Bug Fixes + Additional things added
Fixed the Rogueport Central warp not working in the Warps menu. The game now recalculates how much BP is left when the max BP is modified. Added text for actor 180.
1 parent a977947 commit b8bedfa

File tree

4 files changed

+67
-76
lines changed

4 files changed

+67
-76
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,10 +2513,10 @@ void drawTitleScreenInfo()
25132513
uint32_t TextColor = 0xFFFFFFFF;
25142514
uint8_t Alpha = 0xFF;
25152515
float Scale = 0.75;
2516-
PosX += 117;
2516+
PosX += 113;
25172517
PosY -= 14;
25182518

2519-
const char *String = "Practice Codes v3.0\nCreated by Zephiles";
2519+
const char *String = "Practice Codes v3.0.1\nCreated by Zephiles";
25202520
drawText(String, PosX, PosY, Alpha, TextColor, Scale);
25212521
}
25222522

ttyd-tools/rel/source/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ const char *BattlesActorsLines[] =
462462
"Unknown 177",
463463
"Unknown 178",
464464
"Unknown 179",
465-
"Unknown 180",
465+
"Frankly - Goomba Trio Fight",
466466
"Unknown 181",
467467
"Unknown 182",
468468
"Unknown 183",

ttyd-tools/rel/source/menu.cpp

Lines changed: 62 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,93 +1869,89 @@ void menuCheckButton()
18691869
}
18701870
case A:
18711871
{
1872-
switch (tempCurrentMenuOption)
1872+
if ((tempCurrentMenuOption == 0) &&
1873+
(tempSelectedOption == 0))
18731874
{
1874-
case 0:
1875-
{
1876-
// Go back to the previous menu
1877-
CurrentMenu = tempPreviousMenu;
1878-
resetMenu();
1879-
break;
1880-
}
1881-
default:
1875+
// Go back to the previous menu
1876+
CurrentMenu = tempPreviousMenu;
1877+
resetMenu();
1878+
}
1879+
else
1880+
{
1881+
switch (tempSelectedOption)
18821882
{
1883-
switch (tempSelectedOption)
1883+
case 0:
18841884
{
1885-
case 0:
1886-
{
1887-
SelectedOption = tempCurrentMenuOption;
1888-
Timer = 0;
1889-
CurrentMenuOption = 0;
1890-
break;
1891-
}
1892-
default:
1885+
SelectedOption = tempCurrentMenuOption;
1886+
Timer = 0;
1887+
CurrentMenuOption = 0;
1888+
break;
1889+
}
1890+
default:
1891+
{
1892+
switch (tempCurrentMenuOption)
18931893
{
1894-
switch (tempCurrentMenuOption)
1894+
case PIT_OF_100_TRIALS:
18951895
{
1896-
case PIT_OF_100_TRIALS:
1896+
switch (tempMenuSelectedOption)
18971897
{
1898-
switch (tempMenuSelectedOption)
1898+
case 0:
18991899
{
1900-
case 0:
1900+
if (checkIfInGame())
19011901
{
1902-
if (checkIfInGame())
1903-
{
1904-
Timer = 0;
1905-
MenuSelectedOption = SELECTING_VALUE;
1902+
Timer = 0;
1903+
MenuSelectedOption = SELECTING_VALUE;
1904+
1905+
SecondaryMenuOption = getHighestAdjustableValueDigit(
1906+
tempCurrentMenu) - 1;
19061907

1907-
SecondaryMenuOption = getHighestAdjustableValueDigit(
1908-
tempCurrentMenu) - 1;
1909-
1910-
MenuSecondaryValue = getCurrentPitFloor();
1911-
}
1912-
else
1913-
{
1914-
FunctionReturnCode = NOT_IN_GAME;
1915-
Timer = secondsToFrames(3);
1916-
}
1917-
break;
1908+
MenuSecondaryValue = getCurrentPitFloor();
19181909
}
1919-
default:
1910+
else
19201911
{
1921-
break;
1912+
FunctionReturnCode = NOT_IN_GAME;
1913+
Timer = secondsToFrames(3);
19221914
}
1915+
break;
1916+
}
1917+
default:
1918+
{
1919+
break;
19231920
}
1924-
break;
19251921
}
1926-
default:
1922+
break;
1923+
}
1924+
default:
1925+
{
1926+
// Warp to the currently selected map and close the menu
1927+
int32_t ReturnCode = warpToMap(tempCurrentMenuOption);
1928+
switch (ReturnCode)
19271929
{
1928-
// Warp to the currently selected map and close the menu
1929-
int32_t ReturnCode = warpToMap(tempCurrentMenuOption);
1930-
switch (ReturnCode)
1930+
case UNKNOWN_BEHAVIOR:
19311931
{
1932-
case UNKNOWN_BEHAVIOR:
1933-
{
1934-
break;
1935-
}
1936-
case SUCCESS:
1937-
{
1938-
closeMenu();
1939-
return;
1940-
}
1941-
case NOT_IN_GAME:
1942-
{
1943-
FunctionReturnCode = ReturnCode;
1944-
Timer = secondsToFrames(3);
1945-
break;
1946-
}
1947-
default:
1948-
{
1949-
break;
1950-
}
1932+
break;
1933+
}
1934+
case SUCCESS:
1935+
{
1936+
closeMenu();
1937+
return;
1938+
}
1939+
case NOT_IN_GAME:
1940+
{
1941+
FunctionReturnCode = ReturnCode;
1942+
Timer = secondsToFrames(3);
1943+
break;
1944+
}
1945+
default:
1946+
{
1947+
break;
19511948
}
1952-
break;
19531949
}
1950+
break;
19541951
}
1955-
break;
19561952
}
1953+
break;
19571954
}
1958-
break;
19591955
}
19601956
}
19611957
break;

ttyd-tools/rel/source/menufunctions.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,13 +1591,8 @@ void setMarioStatsValue(uint32_t currentMenuOption)
15911591
{
15921592
case BP:
15931593
{
1594-
// Force the game to recalculate the BP left to use if the pause menu is open
1595-
uint32_t SystemLevel = getSystemLevel();
1596-
1597-
if (SystemLevel == 15)
1598-
{
1599-
ttyd::mario_pouch::pouchReviseMarioParam();
1600-
}
1594+
// Force the game to recalculate how much BP is left
1595+
ttyd::mario_pouch::pouchReviseMarioParam();
16011596
break;
16021597
}
16031598
case MARIO_MAX_HP:

0 commit comments

Comments
 (0)