Jump to content

Retire glitch: Difference between revisions

no edit summary
>RETIRE
No edit summary
>RETIRE
No edit summary
Line 2:
[[File:Retire void.png|thumb|right|300px|RETIRE appearing in the void]]
 
The '''Retire glitch''' (also known as the '''Pal Park Retire glitch''') is a [[glitch derivative]] of [[Tweaking]]. It was documented by Ganix, formerly known as Cryo, on January 10, 2017.
 
By entering the [[out of bounds|void]], then traveling through RAM until you enter Map 0xFB (251) '''Pal Park''', a mapscript will run. The player is granted a Menu, which has the '''RETIRE''' function on it, similarly to the Menu granted in the Great Marsch.
Line 9:
 
The '''RETIRE''' glitch occurs when pressing the RETIRE function.
The sourcecode shown was provided by Ganix.
 
int StartMenu_RETIRE(int wptr)
{
int wdata;
int wmenu;
int flagptr;
 
wdata = GetOverworldDataAddress(wptr);
wmenu = GetOverworldStruct(wptr);
 
//-----------------------------------------------------------------------
// Close the start menu
//-----------------------------------------------------------------------
Function_2035718(wmenu);
Function_200ccf8(wmenu, 1);
Function_201ac68(*wmenu, *(wmenu + 4));
Function_2019178(wmenu);
Function_20358a0(wptr);
 
flagptr = LoadFlagAddress(*(wdata + 12));
 
//-----------------------------------------------------------------------
// Check if the Great Marsh flag (0x967) is set.
//-----------------------------------------------------------------------
if (CheckFlag(flagptr, 0x967))
{
//---------------------------------------------------------------------
// When script 0x2275 is run, it asks if you want to exit Great Marsh.
//
// Answering YES clears flag 0x967 and quits the Safari game.
//---------------------------------------------------------------------
RunScript(wptr, 0x2275u, 0);
}
 
//-----------------------------------------------------------------------
// Pal Park's flags SHOULD have been explicitly checked here, but the
// fact that they weren't is why the RETIRE glitch is possible.
//-----------------------------------------------------------------------
else
{
//---------------------------------------------------------------------
// While script 0x2275 references a defined script number, lower
// numbers such as this reference scripts relative to the current map's
// script runtime.
//
// scripts in runtime from a map then goes to a defined script. This means
// that the script is based on what map you use the menu in, and what the
// 4th script is.
//---------------------------------------------------------------------
RunScript(wptr, 4, 0);
}
free(wmenu);
return 0;
}
 
It first checks for flag 0x967, a flag set when entering the Great Marsch,
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.