Anonymous user
Pokémon FireRed/LeafGreen predefined functions list: Difference between revisions
Pokémon FireRed/LeafGreen predefined functions list (view source)
Revision as of 11:13, 29 July 2019
, 4 years agomight as well advance the article
>Sherkel mNo edit summary |
>Ryccardo (might as well advance the article) |
||
Line 1:
{{Template:Stub}}
==Introduction==
''All function numbers are hexadecimal.''▼
▲''All function and variable numbers in this article are hexadecimal.''
All functions technically have a return value (which is ignored of they are called with the '''special''' (0x25) script opcode, or stored in a variable like LASTRESULT if called with '''special2''' (0x26)), although not all of them return a meaningful value and output instead 0x9F69 (or 0xADC1 for stubbed out ones); for the purpose of this article they will be segregated.
Regardless of how they are called, all functions are unsandboxed and can freely read or write memory; indeed, a fair number of them does accept and/or return parameters at a fixed location (usually a subset of [https://github.com/pret/pokefirered/blob/master/include/constants/vars.h temporary variables], chiefly the 8004-8006 range). It's also not uncommon for them to directly read or write the game's state.
==Void functions==
*000 heals the entire team
Line 11 ⟶ 16:
*0C4 display Trainer Tower records (with 8004 = 1)
*0F6 check for DLC trainer availability?
*110 start ending sequence (saving and displaying current team into Hall of Fame, player/rival/Oak walking out of League, credits, soft reset)
*163 register Pokémon with index number stored in 8004 as seen
*173 unlock information in Fame Checker (variable 8004: character [0-?]; 8005: fact number [0-5?])
*174 unlock
*182 unknown, used in Saffron Pokémon Center map script
*187 unknown, used by {the imitating girl in Saffron}, Pokémart workers, etc
Line 19 ⟶ 25:
*199 used after 01F to cancel multiplayer link setup
*1A6 display Dodrio's Berry Picking minigame records
*1B9 clear [https://forums.glitchcity.info/index.php?topic=8847.0 a range of flags (A4 up to AC), all initially enabled and used as the hide/show status of Lorelei's dolls, proportionally to 1/20th rounded down of the number of Hall of Fame entries; used in Lorelei's house map script].
==Int functions==
*084 get number of Pokémon in party
Line 29 ⟶ 35:
*165 check whether current Box is full
*16A check whether wireless adapter is ready
*17C check whether Pokémon with index number equal to variable 8004 is in team
*180 check whether Mystery Gift deliveryman should be visible
|