diff options
-rw-r--r-- | asm/macros.inc | 1 | ||||
-rw-r--r-- | asm/macros/event.inc (renamed from asm/macros/event.s) | 913 | ||||
-rw-r--r-- | asm/macros/map.inc | 104 | ||||
-rw-r--r-- | asm/macros/movement.inc | 118 | ||||
-rw-r--r-- | constants/map_object_constants.inc | 52 | ||||
-rw-r--r-- | constants/variables.inc | 6 | ||||
-rw-r--r-- | data/cable_car.s | 2 | ||||
-rw-r--r-- | data/event_script_command_function_table.inc | 94 | ||||
-rw-r--r-- | data/event_scripts.s | 2 | ||||
-rw-r--r-- | data/rom4.s | 4 | ||||
-rw-r--r-- | data/text/tv.inc | 75 | ||||
-rw-r--r-- | data/tilesets/graphics.inc (renamed from data/tilesets/tileset_graphics.inc) | 0 | ||||
-rw-r--r-- | data/tilesets/headers.inc (renamed from data/tilesets/tilesets.inc) | 0 | ||||
-rw-r--r-- | src/battle_2.c | 10 | ||||
-rw-r--r-- | src/scrcmd.c | 102 |
15 files changed, 954 insertions, 529 deletions
diff --git a/asm/macros.inc b/asm/macros.inc index 135cfac61..0c6644002 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -1,5 +1,6 @@ .include "asm/macros/asm.inc" .include "asm/macros/function.inc" + .include "asm/macros/movement.inc" .include "asm/macros/window.inc" .include "asm/macros/pokemon_data.inc" .include "asm/macros/ec.inc" diff --git a/asm/macros/event.s b/asm/macros/event.inc index b5fefb925..f0577f777 100644 --- a/asm/macros/event.s +++ b/asm/macros/event.inc @@ -1,20 +1,20 @@ @ Does nothing. - .macro snop + .macro nop .byte 0x00 .endm @ Does nothing. - .macro snop1 + .macro nop1 .byte 0x01 .endm @ Terminates script execution. - .macro end + .macro end .byte 0x02 .endm @ Jumps back to after the last-executed call statement, and continues script execution from there. - .macro return + .macro return .byte 0x03 .endm @@ -25,27 +25,27 @@ .endm @ Jumps to destination and continues script execution from there. - .macro jump destination + .macro goto destination .byte 0x05 .4byte \destination .endm @ If the result of the last comparison matches condition (see Comparison operators), jumps to destination and continues script execution from there. - .macro jumpif condition, destination + .macro goto_if condition, destination .byte 0x06 .byte \condition .4byte \destination .endm @ If the result of the last comparison matches condition (see Comparison operators), calls destination. - .macro callif condition, destination + .macro call_if condition, destination .byte 0x07 .byte \condition .4byte \destination .endm @ Jumps to the standard function at index function. - .macro jumpstd function + .macro gotostd function .byte 0x08 .byte \function .endm @@ -57,58 +57,58 @@ .endm @ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function. - .macro jumpstdif condition, function + .macro gotostd_if condition, function .byte 0x0a .byte \condition .byte \function .endm @ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function. - .macro callstdif condition, function + .macro callstd_if condition, function .byte 0x0b .byte \condition .byte \function .endm @ Executes a script stored in a default RAM location. - .macro jumpram + .macro gotoram .byte 0x0c .endm @ Terminates script execution and "resets the script RAM". - .macro die + .macro killscript .byte 0x0d .endm - @ Pads the specified value to a dword, and then writes that dword to a predefined address (0x0203AAA8). - .macro setbyte value + @ Sets some status related to Mystery Event. + .macro setmysteryeventstatus value .byte 0x0e .byte \value .endm @ Sets the specified script bank to value. - .macro loadptr destination, value + .macro loadword destination, value .byte 0x0f .byte \destination .4byte \value .endm @ Sets the specified script bank to value. - .macro setbufferbyte destination, value + .macro loadbyte destination, value .byte 0x10 .byte \destination .byte \value .endm @ Sets the byte at offset to value. - .macro writebytetooffset value, offset + .macro writebytetoaddr value, offset .byte 0x11 .byte \value .4byte \offset .endm @ Copies the byte value at source into the specified script bank. - .macro loadbytefrompointer destination, source + .macro loadbytefromaddr destination, source .byte 0x12 .byte \destination .4byte \source @@ -122,7 +122,7 @@ .endm @ Copies the contents of bank source into bank destination. - .macro copybuffers destination, source + .macro copylocal destination, source .byte 0x14 .byte \destination .byte \source @@ -171,93 +171,93 @@ .endm @ Compares the values of script banks a and b, after forcing the values to bytes. - .macro comparebuffers byte1, byte2 + .macro compare_local_to_local byte1, byte2 .byte 0x1b .byte \byte1 .byte \byte2 .endm @ Compares the least-significant byte of the value of script bank a to a fixed byte value (b). - .macro comparebuffertobyte a, b + .macro compare_local_to_value a, b .byte 0x1c .byte \a .byte \b .endm @ Compares the least-significant byte of the value of script bank a to the byte located at offset b. - .macro comparebuffertoptrbyte a, b + .macro compare_local_to_addr a, b .byte 0x1d .byte \a .4byte \b .endm @ Compares the byte located at offset a to the least-significant byte of the value of script bank b. - .macro compareptrbytetobuffer a, b + .macro compare_addr_to_local a, b .byte 0x1e .4byte \a .byte \b .endm @ Compares the byte located at offset a to a fixed byte value (b). - .macro compareptrbytetobyte a, b + .macro compare_addr_to_value a, b .byte 0x1f .4byte \a .byte \b .endm @ Compares the byte located at offset a to the byte located at offset b. - .macro compareptrbytes a, b + .macro compare_addr_to_addr a, b .byte 0x20 .4byte \a .4byte \b .endm - @ Compares the value of a to a fixed word value (b). - .macro compare a, b + @ Compares the value of `var` to a fixed word value (b). + .macro compare_var_to_value var, value .byte 0x21 - .2byte \a - .2byte \b + .2byte \var + .2byte \value .endm - @ Compares the value of a to the value of b. - .macro comparevars a, b + @ Compares the value of `var1` to the value of `var2`. + .macro compare_var_to_var var1, var2 .byte 0x22 - .2byte \a - .2byte \b + .2byte \var1 + .2byte \var2 .endm - @ Calls the ASM routine stored at code. Script execution is blocked until the ASM returns (bx lr, mov pc, lr, etc.). Remember to add 1 to the offset when calling THUMB code. - .macro callasm code + @ Calls the native C function stored at `func`. + .macro callnative func .byte 0x23 - .4byte \code + .4byte \func .endm - @ Replaces a pointer in the script engine RAM with asm_pointer. - .macro jumpasm asm_pointer + @ Replaces the script with the function stored at `func`. Execution returns to the bytecode script when func returns TRUE. + .macro gotonative func .byte 0x24 - .4byte \asm_pointer + .4byte \func .endm - @ Calls a special function; that is, a piece of ASM code designed for use by scripts and listed in a table of pointers. + @ Calls a special function; that is, a function designed for use by scripts and listed in a table of pointers. .macro special function .byte 0x25 .2byte SPECIAL_\function .endm @ Calls a special function. That function's output (if any) will be written to the variable you specify. - .macro specialval output, function + .macro specialvar output, function .byte 0x26 .2byte \output .2byte SPECIAL_\function .endm @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock state, the script will remain blocked indefinitely (essentially a hang). - .macro waitstate + .macro waitstate .byte 0x27 .endm @ Blocks script execution for time (frames? milliseconds?). - .macro pause time + .macro delay time .byte 0x28 .2byte \time .endm @@ -280,134 +280,157 @@ .2byte \a .endm - @ In FireRed, this command is a nop. - .macro compareflags + @ Initializes the RTC`s local time offset to the given hour and minute. In FireRed, this command is a nop. + .macro initclock hour, minute .byte 0x2c + .2byte \hour + .2byte \minute .endm - @ In FireRed, this command is a nop. - .macro checkdailyflags + @ Runs time based events. In FireRed, this command is a nop. + .macro dodailyevents .byte 0x2d .endm - @ Resets the values of variables 0x8000, 0x8001, and 0x8002. Related to RTC in RSE? - .macro resetvars + @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, this command sets those variables to zero. + .macro gettime .byte 0x2e .endm @ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones. - .macro playsfx sound_number + .macro playse sound_number .byte 0x2f .2byte \sound_number .endm - @ Blocks script execution until the currently-playing sound (triggered by sound) finishes playing. - .macro checksound + @ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing. + .macro waitse .byte 0x30 .endm @ Plays the specified (fanfare_number) fanfare. - .macro fanfare fanfare_number + .macro playfanfare fanfare_number .byte 0x31 .2byte \fanfare_number .endm @ Blocks script execution until all currently-playing fanfares finish. - .macro waitfanfare + .macro waitfanfare .byte 0x32 .endm @ Plays the specified (song_number) song. The byte is apparently supposed to be 0x00. - .macro playmusic song_number, unknown + .macro playbgm song_number, unknown .byte 0x33 .2byte \song_number .byte \unknown .endm - @ Plays the specified (song_number) song. - .macro playmusicbattle song_number + @ Saves the specified (song_number) song to be played later. + .macro savebgm song_number .byte 0x34 .2byte \song_number .endm @ Crossfades the currently-playing song into the map's default song. - .macro fadedefault + .macro fadedefaultbgm .byte 0x35 .endm @ Crossfades the currently-playng song into the specified (song_number) song. - .macro fademusic song_number + .macro fadenewbgm song_number .byte 0x36 .2byte \song_number .endm @ Fades out the currently-playing song. - .macro fadeout speed + .macro fadeoutbgm speed .byte 0x37 .byte \speed .endm - @ Fades the currently-playing song back in. - .macro fadein speed + @ Fades the previously-playing song back in. + .macro fadeinbgm speed .byte 0x38 .byte \speed .endm @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, then the player will instead be sent to (X, Y) on the map. - .macro warp bank, map, warp, X, Y + .macro warp map, warp, X, Y .byte 0x39 - .byte \bank - .byte \map + map \map .byte \warp .2byte \X .2byte \Y .endm @ Clone of warp that does not play a sound effect. - .macro warpmuted + .macro warpsilent map, warp, X, Y .byte 0x3a + map \map + .byte \warp + .2byte \X + .2byte \Y .endm - @ Clone of warp that uses "a walking effect". - .macro warpwalk + @ Clone of warp that plays a door opening animation before stepping upwards into it. + .macro warpdoor map, warp, X, Y .byte 0x3b + map \map + .byte \warp + .2byte \X + .2byte \Y .endm @ Warps the player to another map using a hole animation. - .macro warphole bank, map + .macro warphole map .byte 0x3c - .byte \bank - .byte \map + map \map .endm - @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E.[source] - .macro warpteleport + @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E. + .macro warpteleport map, warp, X, Y .byte 0x3d + map \map + .byte \warp + .2byte \X + .2byte \Y .endm - @ Clone of warp. Used by an (unused?) Safari Zone script to return the player to the gatehouse and end the Safari Game. - .macro warp3 + @ Sets the warp destination to be used later. + .macro setwarp map, warp, X, Y .byte 0x3e + map \map + .byte \warp + .2byte \X + .2byte \Y .endm - @ Sets a default warp place. If a warp tries to send the player to Warp 127 on Map 127.127, they will instead be sent here. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). - .macro warpplace bank, map, warp, X, Y + @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). + .macro setdynamicwarp map, warp, X, Y .byte 0x3f - .byte \bank - .byte \map + map \map .byte \warp .2byte \X .2byte \Y .endm - @ Clone of warp3, except that this writes data to different offsets... - .macro warp4 + @ Sets the destination that diving or emerging from a dive will take the player to. + .macro setdivewarp map, warp, X, Y .byte 0x40 + map \map + .byte \warp + .2byte \X + .2byte \Y .endm - @ Clone of warp3, except that this writes data to different offsets... - .macro warp5 + @ Sets the destination that falling into a hole will take the player to. + .macro setholewarp map, warp, X, Y .byte 0x41 + map \map + .byte \warp + .2byte \X + .2byte \Y .endm @ Retrieves the player's zero-indexed X- and Y-coordinates in the map, and stores them in the specified variables. @@ -417,20 +440,20 @@ .2byte \Y .endm - @ Retrieves the number of Pokmon in the player's party, and stores that number in variable 0x800D (LASTRESULT). - .macro countpokemon + @ Retrieves the number of Pokemon in the player's party, and stores that number in variable 0x800D (LASTRESULT). + .macro getpartysize .byte 0x43 .endm @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and variable 0x800D (LASTRESULT) will be set to 0x0001; otherwise, LASTRESULT is set to 0x0000. - .macro additem index, quantity + .macro giveitem index, quantity .byte 0x44 .2byte \index .2byte \quantity .endm @ Removes quantity of item index from the player's Bag. - .macro removeitem index, quantity + .macro takeitem index, quantity .byte 0x45 .2byte \index .2byte \quantity @@ -457,7 +480,7 @@ .endm @ Adds a quantity amount of item index to the player's PC. Both arguments can be variables. - .macro addpcitem index, quantity + .macro givepcitem index, quantity .byte 0x49 .2byte \index .2byte \quantity @@ -470,139 +493,172 @@ .2byte \quantity .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro adddecor a + @ Adds decoration to the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro givedecoration decoration .byte 0x4b - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro removedecor a + @ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro takedecoration decoration .byte 0x4c - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro testdecor a + @ Checks for decoration in the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro checkdecor decoration .byte 0x4d - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro checkdecor a + @ Checks if the player has enough space in their PC to hold decoration. Sets variable 0x800D (LASTRESULT) to 0x0001 if there is room, or 0x0000 is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro checkdecorspace decoration .byte 0x4e - .2byte \a + .2byte \decoration .endm - @ Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open. - .macro move index, movements + @ Applies the movement data at movements to the specified (index) Object. Also closes any standard message boxes that are still open. + .macro applymovement index, movements .byte 0x4f .2byte \index .4byte \movements .endm - @ Apparent clone of applymovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything. - @ This command in fact uses variables to access the Person event ID. So, for example, if you setvar 0x8000 to 0x3, and then use applymovementpos 0x8000 @move1, Person event 3 will have the movements at @move1 applied to them. Thank you Shiny Quagsire for bringing this to my attention. - .macro movecoords variable, movements + @ Applies the movement data at movements to the specified (index) Object on the specified (map_group, map_num) map. Really only useful if the object has followed from one map to another (e.g. Wally during the catching event). + .macro applymovementat variable, movements, map .byte 0x50 .2byte \variable .4byte \movements + map \map .endm - @ Blocks script execution until the movements being applied to the specified (index) Person event finish. If the specified Person event is 0x0000, then the command will block script execution until all Person events affected by applymovement finish their movements. If the specified Person event is not currently being manipulated with applymovement, then this command does nothing. - .macro waitmove index + @ Blocks script execution until the movements being applied to the specified (index) Object finish. If the specified Object is 0x0000, then the command will block script execution until all Objects affected by applymovement finish their movements. If the specified Object is not currently being manipulated with applymovement, then this command does nothing. + .macro waitmovement index .byte 0x51 .2byte \index .endm - @ Apparent clone of waitmovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything. - .macro waitmovexy index, X, Y + @ Blocks script execution until the movements being applied to the specified (index) Object on the specified (map) map finish. + .macro waitmovementat index, map .byte 0x52 .2byte \index - .byte \X - .byte \Y + map \map .endm - @ Attempts to hide the specified (local_ID, a local ID) Person event on the current map, by setting its visibility flag if it has a valid one. If the Person does not have a valid visibility flag, this command does nothing. - .macro disappear local_ID + @ Attempts to hide the specified (index) Object on the current map, by setting its visibility flag if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. + .macro removeobject index .byte 0x53 - .2byte \local_ID + .2byte \index .endm - @ Clone of hidesprite that also moves the Person? Test it! - .macro disappearxy index, X, Y + @ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map, by setting its visibility flag if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. + .macro removeobjectat index, map .byte 0x54 .2byte \index - .byte \X - .byte \Y + map \map .endm - .macro reappear word + @ Unsets the specified (index) Object's visibility flag on the current map if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. + .macro addobject index .byte 0x55 - .2byte \word + .2byte \index .endm - .macro reappearxy word, byte1, byte2 + @ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. + .macro addobjectat index, map .byte 0x56 - .2byte \word - .byte \byte1 - .byte \byte2 + .2byte \index + map \map .endm - .macro movesprite word1, word2, word3 + @ Sets the specified (index) Object's position on the current map. + .macro setobjectxy index, x, y .byte 0x57 - .2byte \word1 - .2byte \word2 - .2byte \word3 + .2byte \index + .2byte \x + .2byte \y .endm - .macro spritevisible word, byte1, byte2 + .macro showobjectat index, map .byte 0x58 - .2byte \word - .byte \byte1 - .byte \byte2 + .2byte \index + map \map .endm - .macro spriteinvisible word, byte1, byte2 + .macro hideobjectat index, map .byte 0x59 - .2byte \word - .byte \byte1 - .byte \byte2 + .2byte \index + map \map .endm - @ If the script was called by a Person event, then that Person will turn to face toward the tile that the player is stepping off of. - .macro faceplayer + @ If the script was called by an Object, then that Object will turn to face toward the metatile that the player is standing on. + .macro faceplayer .byte 0x5a .endm - .macro spriteface word, byte + .macro turnobject index, direction .byte 0x5b - .2byte \word - .byte \byte + .2byte \index + .byte \direction .endm @ If the Trainer flag for Trainer index is not set, this command does absolutely nothing. - .macro trainerbattle byte, word1, word2, pointer1, pointer2, pointer3, pointer4 + .macro trainerbattle type, trainer, word, pointer1, pointer2, pointer3, pointer4 .byte 0x5c - .byte \byte - .2byte \word1 - .2byte \word2 - .4byte \pointer1 - .4byte \pointer2 - .4byte \pointer3 - .4byte \pointer4 + .byte \type + .2byte \trainer + .2byte \word + .if \type == 0 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .elseif \type == 1 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ event script + .elseif \type == 2 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ event script + .elseif \type == 3 + .4byte \pointer1 @ text + .elseif \type == 4 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .elseif \type == 5 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .elseif \type == 6 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .4byte \pointer4 @ event script + .elseif \type == 7 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .elseif \type == 8 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .4byte \pointer4 @ event script + .elseif \type == 9 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .endif .endm + @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this command behind-the-scenes), and blocks script execution until the battle finishes. - .macro reptrainerbattle + .macro trainerbattlebegin .byte 0x5d .endm - .macro endtrainerbattle + .macro ontrainerbattleend .byte 0x5e .endm - .macro endtrainerbattle2 + .macro ontrainerbattleendgoto .byte 0x5f .endm @@ -612,38 +668,38 @@ .2byte \trainer .endm - @ Sets Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) - .macro cleartrainerflag trainer + @ Sets Flag (trainer + 0x500). + .macro settrainerflag trainer .byte 0x61 .2byte \trainer .endm - @ Clears Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) - .macro settrainerflag trainer + @ Clears Flag (trainer + 0x500). + .macro cleartrainerflag trainer .byte 0x62 .2byte \trainer .endm - .macro movespriteperm word1, word2, word3 + .macro setobjectxyperm index, x, y .byte 0x63 - .2byte \word1 - .2byte \word2 - .2byte \word3 + .2byte \index + .2byte \x + .2byte \y .endm - .macro moveoffscreen word + .macro moveobjectoffscreen index .byte 0x64 - .2byte \word + .2byte \index .endm - .macro spritebehave word, byte + .macro setobjectmovementtype word, byte .byte 0x65 .2byte \word .byte \byte .endm @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the box and its text have been fully drawn. - .macro waittext + .macro waitmessage .byte 0x66 .endm @@ -653,81 +709,79 @@ .4byte \text .endm - @ Holds the current message box open until the player presses a key. The message box is then closed. - .macro closebutton + @ Closes the current message box. + .macro closemessage .byte 0x68 .endm - @ Ceases movement for all OWs on-screen. - .macro lockall + @ Ceases movement for all Objects on-screen. + .macro lockall .byte 0x69 .endm - @ If the script was called by a Person event, then that Person's movement will cease. - .macro lock + @ If the script was called by an Object, then that Object's movement will cease. + .macro lock .byte 0x6a .endm - @ Resumes normal movement for all OWs on-screen, and closes any standard message boxes that are still open. - .macro releaseall + @ Resumes normal movement for all Objects on-screen, and closes any standard message boxes that are still open. + .macro releaseall .byte 0x6b .endm - @ If the script was called by a Person event, then that Person's movement will resume. This command also closes any standard message boxes that are still open. - .macro release + @ If the script was called by an Object, then that Object's movement will resume. This command also closes any standard message boxes that are still open. + .macro release .byte 0x6c .endm @ Blocks script execution until the player presses any key. - .macro waitbutton + .macro waitbuttonpress .byte 0x6d .endm @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in variable 0x800D (LASTRESULT); 0x0000 for "NO" or if the user pressed B, and 0x0001 for "YES". - .macro yesnobox X, Y + .macro yesnobox x, y .byte 0x6e - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoice X, Y, list, B + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoice x, y, list, b .byte 0x6f - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list - .byte \B + .byte \b .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoicedef X, Y, list, default, B + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoicedefault x, y, list, default, b .byte 0x70 - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list .byte \default - .byte \B + .byte \b .endm @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box. - .macro multichoicerow X, Y, list, per_row, B + .macro multichoicegrid x, y, list, per_row, B .byte 0x71 - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list .byte \per_row .byte \B .endm - .macro showbox byte1, byte2, byte3, byte4 + @ Nopped in Emerald. + .macro drawbox .byte 0x72 - .byte \byte1 - .byte \byte2 - .byte \byte3 - .byte \byte4 .endm - .macro hidebox byte1, byte2, byte3, byte4 + @ Nopped in Emerald, but still consumes parameters. + .macro erasebox byte1, byte2, byte3, byte4 .byte 0x73 .byte \byte1 .byte \byte2 @@ -735,7 +789,8 @@ .byte \byte4 .endm - .macro clearbox byte1, byte2, byte3, byte4 + @ Nopped in Emerald, but still consumes parameters. + .macro drawboxtext byte1, byte2, byte3, byte4 .byte 0x74 .byte \byte1 .byte \byte2 @@ -743,33 +798,33 @@ .byte \byte4 .endm - @ Displays a box containing the front sprite for the specified (species) Pokmon species. - .macro showpokepic species, X, Y + @ Displays a box containing the front sprite for the specified (species) Pokemon species. + .macro drawmonpic species, x, y .byte 0x75 .2byte \species - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Hides all boxes displayed with showpokepic. - .macro hidepokepic + @ Hides all boxes displayed with drawmonpic. + .macro erasemonpic .byte 0x76 .endm - @ In FireRed, this command is a nop. (The argument is discarded.) - .macro showcontestwinner a + @ Draws an image of the winner of the contest. In FireRed, this command is a nop. (The argument is discarded.) + .macro drawcontestwinner a .byte 0x77 .byte \a .endm - @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille characters. - .macro braille text + @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille characters and needs to provide six extra starting characters that are skipped (in RS, these characters determined the box's size and position, but in Emerald these are calculated automatically). + .macro braillemessage text .byte 0x78 .4byte \text .endm - @ Gives the player one of the specified (species) Pokmon at level level holding item. The unknown arguments should all be zeroes. - .macro givepokemon species, level, item, unknown1, unknown2, unknown3 + @ Gives the player one of the specified (species) Pokemon at level level holding item. The unknown arguments should all be zeroes. + .macro givemon species, level, item, unknown1, unknown2, unknown3 .byte 0x79 .2byte \species .byte \level @@ -779,81 +834,81 @@ .byte \unknown3 .endm - .macro giveegg word + .macro giveegg species .byte 0x7a - .2byte \word + .2byte \species .endm - .macro setpokemove byte1, byte2, word + .macro setmonmove byte1, byte2, word .byte 0x7b .byte \byte1 .byte \byte2 .2byte \word .endm - @ Checks if at least one Pokmon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the Pokmon that knows the move. If not, LASTRESULT is set to 0x0006. - .macro checkattack index + @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, LASTRESULT is set to 0x0006. Variable 0x8004 is also set to this Pokemon's species. + .macro checkpartymove index .byte 0x7c .2byte \index .endm - @ Writes the name of the Pokmon at index species to the specified buffer. - .macro bufferpoke out, species + @ Writes the name of the Pokemon at index species to the specified buffer. + .macro bufferspeciesname out, species .byte 0x7d .byte \out .2byte \species .endm - @ Writes the name of the first Pokmon in the player's party to the specified buffer. - .macro bufferfirstpoke out + @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. + .macro bufferleadmonspeciesname out .byte 0x7e .byte \out .endm - @ Writes the name of the Pokmon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. - .macro bufferpartypoke out, slot + @ Writes the nickname of the Pokemon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. + .macro bufferpartymonnick out, slot .byte 0x7f .byte \out .2byte \slot .endm @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. - .macro bufferitem out, item + .macro bufferitemname out, item .byte 0x80 .byte \out .2byte \item .endm - @ In FireRed, this command is a nop. (The first argument is discarded immediately. The second argument is read, but not used for anything.) - .macro bufferdecor a, b + @ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop. + .macro bufferdecorationname out, decoration .byte 0x81 - .byte \a - .2byte \b + .byte \out + .2byte \decoration .endm - @ Writes the name of the attack at index attack to the specified buffer. - .macro bufferattack out, attack + @ Writes the name of the move at index move to the specified buffer. + .macro buffermovename out, move .byte 0x82 .byte \out - .2byte \attack + .2byte \move .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. - .macro buffernum out, input + .macro buffernumberstring out, input .byte 0x83 .byte \out .2byte \input .endm - @ Writes the standard string identified by index to the specified buffer. Specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption (I've observed destruction of the stored player name and crashes when entering/exiting certain menu screens). - .macro bufferstd out, index + @ Writes the standard string identified by index to the specified buffer. This command has no protections in place at all, so specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption. + .macro bufferstdstring out, index .byte 0x84 .byte \out .2byte \index .endm @ Copies the string at offset to the specified buffer. - .macro buffertext out, offset + .macro bufferstring out, offset .byte 0x85 .byte \out .4byte \offset @@ -865,45 +920,49 @@ .4byte \products .endm - @ Apparent clone of pokemart. - .macro pokemartdecor products + @ Opens the Pokemart system and treats the list of items as decorations. + .macro pokemartdecoration products .byte 0x87 .4byte \products .endm - @ Apparent clone of pokemart. - .macro pokemartbp products + @ Apparent clone of pokemartdecoration. + .macro pokemartdecoration2 products .byte 0x88 .4byte \products .endm - .macro pokecasino word + @ Starts up the slot machine minigame. + .macro playslotmachine word .byte 0x89 .2byte \word .endm - @ In FireRed, this command is a nop. - .macro event_8a + @ Sets a berry tree's specific berry and growth stage. In FireRed, this command is a nop. + .macro setberrytree tree_id, berry, growth_stage .byte 0x8a + .byte \tree_id + .byte \berry + .byte \growth_stage .endm - @ In FireRed, this command sets the byte at 0x03000EA8 to 0x01. I do not know what that means. - .macro choosecontestpkmn + @ This allows you to choose a Pokemon to use in a contest. In FireRed, this command sets the byte at 0x03000EA8 to 0x01. + .macro choosecontestpkmn .byte 0x8b .endm - @ In FireRed, this command is a nop. - .macro startcontest + @ Starts a contest. In FireRed, this command is a nop. + .macro startcontest .byte 0x8c .endm - @ In FireRed, this command is a nop. - .macro showcontestresults + @ Shows the results of a contest. In FireRed, this command is a nop. + .macro showcontestresults .byte 0x8d .endm - @ In FireRed, this command is a nop. - .macro contestlinktransfer + @ Starts a contest over a link connection. In FireRed, this command is a nop. + .macro contestlinktransfer .byte 0x8e .endm @@ -921,7 +980,7 @@ .endm @ If check is 0x00, this command subtracts value from the player's money. - .macro paymoney value, check + .macro takemoney value, check .byte 0x91 .4byte \value .byte \check @@ -935,106 +994,107 @@ .endm @ Spawns a secondary box showing how much money the player has. - .macro showmoney X, Y + .macro showmoneybox x, y, check .byte 0x93 - .byte \X - .byte \Y + .byte \x + .byte \y + .byte \check .endm @ Hides the secondary box spawned by showmoney. - .macro hidemoney X, Y + .macro hidemoneybox .byte 0x94 - .byte \X - .byte \Y .endm - @ Updates the secondary box spawned by showmoney. (What does it do with its arguments?) - .macro updatemoney X, Y + @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. + .macro updatemoneybox x, y .byte 0x95 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ In FireRed, this command is a nop. - .macro event_96 + @ Gets the price reduction for the index (word) given. In FireRed, this command is a nop. + .macro getpricereduction word .byte 0x96 + .2byte \word .endm - @ Fades the screen to black or back, using the specified effect. Effect 0x00 fades in, and effect 0x01 fades out. I don't know if other effects exist. + @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. .macro fadescreen effect .byte 0x97 .byte \effect .endm - .macro fadescreendelay byte1, byte2 + @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. Other modes may exist. + .macro fadescreenspeed effect, speed .byte 0x98 - .byte \byte1 - .byte \byte2 + .byte \effect + .byte \speed .endm - .macro darken word + .macro setflashradius word .byte 0x99 .2byte \word .endm - .macro lighten byte + .macro animateflash byte .byte 0x9a .byte \byte .endm - .macro message2 pointer + .macro messageautoscroll pointer .byte 0x9b .4byte \pointer .endm @ Executes the specified field move animation. - .macro doanimation animation + .macro dofieldeffect animation .byte 0x9c .2byte \animation .endm - @ Tells the game which party Pokmon to use for the next field move animation. - .macro setanimation animation, slot + @ Sets up the field effect argument argument with the value value. + .macro setfieldeffectargument argument, param .byte 0x9d - .byte \animation - .2byte \slot + .byte \argument + .2byte \param .endm @ Blocks script execution until all playing field move animations complete. - .macro checkanimation animation + .macro waitfieldeffect animation .byte 0x9e .2byte \animation .endm - @ Sets which healing place the player will return to if all of the Pokmon in their party faint. A list of available healing places can be found on PokeCommunity. - .macro sethealplace flightspot + @ Sets which healing place the player will return to if all of the Pokemon in their party faint. + .macro setrespawn flightspot .byte 0x9f .2byte \flightspot .endm @ Checks the player's gender. If male, then 0x0000 is stored in variable 0x800D (LASTRESULT). If female, then 0x0001 is stored in LASTRESULT. - .macro checkgender + .macro checkplayergender .byte 0xa0 .endm - @ Plays the specified (species) Pokmon's cry. You can use waitcry to block script execution until the sound finishes. - .macro pokecry species, effect + @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. + .macro playmoncry species, effect .byte 0xa1 .2byte \species .2byte \effect .endm - @ Changes the tile at (X, Y) on the current map. - .macro setmaptile X, Y, tile_number, tile_attrib + @ Changes the metatile at (x, y) on the current map. + .macro setmetatile x, y, metatile_number, tile_attrib .byte 0xa2 - .2byte \X - .2byte \Y - .2byte \tile_number + .2byte \x + .2byte \y + .2byte \metatile_number .2byte \tile_attrib .endm @ Queues a weather change to the default weather for the map. - .macro resetweather + .macro resetweather .byte 0xa3 .endm @@ -1045,106 +1105,108 @@ .endm @ Executes the weather change queued with resetweather or setweather. The current weather will smoothly fade into the queued weather. - .macro doweather + .macro doweather .byte 0xa5 .endm @ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors). - .macro tileeffect subroutine + .macro setstepcallback subroutine .byte 0xa6 .byte \subroutine .endm - .macro setmapfooter word + .macro setmaplayoutindex index .byte 0xa7 - .2byte \word + .2byte \index .endm - .macro spritelevelup word, byte1, byte2, byte3 + .macro setobjectpriority index, map, priority .byte 0xa8 - .2byte \word - .byte \byte1 - .byte \byte2 - .byte \byte3 + .2byte \index + map \map + .byte \priority .endm - .macro restorespritelevel word, byte1, byte2 + .macro resetobjectpriority index, map .byte 0xa9 - .2byte \word - .byte \byte1 - .byte \byte2 + .2byte \index + map \map .endm - .macro createvsprite byte1, byte2, word1, word2, byte3, byte4 + .macro createvobject sprite, byte2, x, y, elevation, direction .byte 0xaa - .byte \byte1 + .byte \sprite .byte \byte2 - .2byte \word1 - .2byte \word2 - .byte \byte3 - .byte \byte4 + .2byte \x + .2byte \y + .byte \elevation + .byte \direction .endm - .macro vspriteface byte1, byte2 + .macro turnvobject index, direction .byte 0xab - .byte \byte1 - .byte \byte2 + .byte \index + .byte \direction .endm - @ Queues the opening of the door tile at (X, Y) with an animation. - .macro setdooropened X, Y + @ Opens the door metatile at (X, Y) with an animation. + .macro opendoor x, y .byte 0xac - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Queues the closing of the door tile at (X, Y) with an animation. - .macro setdoorclosed X, Y + @ Closes the door metatile at (X, Y) with an animation. + .macro closedoor x, y .byte 0xad - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Executes the state changes queued with setdooropened, setdoorclosed, setdooropened2, and setdoorclosed2. - .macro doorchange + @ Waits for the door animation started with opendoor or closedoor to finish. + .macro waitdooranim .byte 0xae .endm - @ Queues the opening of the door tile at (X, Y) without an animation. - .macro setdooropened2 X, Y + @ Sets the door tile at (x, y) to be open without an animation. + .macro setdooropen x, y .byte 0xaf - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Queues the closing of the door tile at (X, Y) without an animation. - .macro setdoorclosed2 X, Y + @ Sets the door tile at (x, y) to be closed without an animation. + .macro setdoorclosed2 x, y .byte 0xb0 - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ In FireRed, this command is a nop. - .macro event_b1 + @ In Emerald, this command consumes its parameters and does nothing. In FireRed, this command is a nop. + .macro addelevmenuitem a, b, c, d .byte 0xb1 + .byte \a + .2byte \b + .2byte \c + .2byte \d .endm - @ In FireRed, this command is a nop. - .macro event_b2 + @ In FireRed and Emerald, this command is a nop. + .macro showelevmenu .byte 0xb2 .endm - .macro checkcoins word + .macro checkcoins out .byte 0xb3 - .2byte \word + .2byte \out .endm - .macro givecoins word + .macro givecoins count .byte 0xb4 - .2byte \word + .2byte \count .endm - .macro removecoins word + .macro takecoins word .byte 0xb5 .2byte \word .endm @@ -1157,8 +1219,8 @@ .2byte \item .endm - @ Starts a wild battle against the Pokmon generated by setwildbattle. Blocks script execution until the battle finishes. - .macro dowildbattle + @ Starts a wild battle against the Pokemon generated by setwildbattle. Blocks script execution until the battle finishes. + .macro dowildbattle .byte 0xb7 .endm @@ -1168,7 +1230,7 @@ .2byte \word .endm - .macro vjump pointer + .macro vgoto pointer .byte 0xb9 .4byte \pointer .endm @@ -1178,19 +1240,19 @@ .4byte \pointer .endm - .macro if5 byte, pointer + .macro vgoto_if byte, pointer .byte 0xbb .byte \byte .4byte \pointer .endm - .macro if6 byte, pointer + .macro vcall_if byte, pointer .byte 0xbc .byte \byte .4byte \pointer .endm - .macro vtext pointer + .macro vmessage pointer .byte 0xbd .4byte \pointer .endm @@ -1200,46 +1262,50 @@ .4byte \pointer .endm - .macro vbuffer byte, pointer + .macro vbufferstring byte, pointer .byte 0xbf .byte \byte .4byte \pointer .endm @ Spawns a secondary box showing how many Coins the player has. - .macro showcoins X, Y + .macro showcoinsbox x, y .byte 0xc0 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Hides the secondary box spawned by showcoins. It doesn't appear to use its arguments, but they are still required. - .macro hidecoins X, Y + @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + .macro hidecoinsbox x, y .byte 0xc1 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Updates the secondary box spawned by showcoins. (What does it do with its arguments?) - .macro updatecoins X, Y + @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + .macro updatecoinsbox x, y .byte 0xc2 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Increases the value of the specified hidden variable by 1. The hidden variable's value will not be allowed to exceed 0x00FFFFFF. - .macro inccounter a + @ Increases the value of the specified game stat by 1. The stat's value will not be allowed to exceed 0x00FFFFFF. + .macro incrementgamestat stat .byte 0xc3 - .byte \a + .byte \stat .endm - @ Clone of warp... Except that it doesn't appear to have any effect when used in some of FireRed's default level scripts. (If it did, Berry Forest would be impossible to enter...) - .macro warp6 + @ Sets the destination that using an Escape Rope or Dig will take the player to. + .macro setescapewarp map, warp, x, y .byte 0xc4 + map \map + .byte \warp + .2byte \x + .2byte \y .endm @ Blocks script execution until cry finishes. - .macro waitpokecry + .macro waitmoncry .byte 0xc5 .endm @@ -1263,17 +1329,17 @@ .endm @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened. - .macro unloadhelp + .macro unloadhelp .byte 0xc9 .endm @ After using this command, all standard message boxes will use the signpost frame. - .macro signmsg + .macro signmsg .byte 0xca .endm @ Ends the effects of signmsg, returning message box frames to normal. - .macro normalmsg + .macro normalmsg .byte 0xcb .endm @@ -1284,82 +1350,81 @@ .4byte \value .endm - @ Makes the Pokmon in the specified slot of the player's party obedient. It will not randomly disobey orders in battle. - .macro setobedience slot + @ Makes the Pokemon in the specified slot of the player's party obedient. It will not randomly disobey orders in battle. + .macro setmonobedient slot .byte 0xcd .2byte \slot .endm - @ Checks if the Pokmon in the specified slot of the player's party is obedient. If the Pokmon is disobedient, 0x0001 is written to script variable 0x800D (LASTRESULT). If the Pokmon is obedient (or if the specified slot is empty or invalid), 0x0000 is written. - .macro checkobedience slot + @ Checks if the Pokemon in the specified slot of the player's party is obedient. If the Pokemon is disobedient, 0x0001 is written to script variable 0x800D (LASTRESULT). If the Pokemon is obedient (or if the specified slot is empty or invalid), 0x0000 is written. + .macro checkmonobedience slot .byte 0xce .2byte \slot .endm - @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020370A4. - .macro execram + @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020375C0. + .macro execram .byte 0xcf .endm @ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot. - .macro setworldflag worldmapflag + .macro setworldmapflag worldmapflag .byte 0xd0 .2byte \worldmapflag .endm @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] - .macro warpteleport2 + .macro warpteleport2 map, warp, x, y .byte 0xd1 + map \map + .byte \warp + .2byte \x + .2byte \y .endm - @ Changes the location where the player caught the Pokmon in the specified slot of their party. A list of valid catch locations can be found on PokeCommunity. - .macro setcatchlocale slot, location + @ Changes the location where the player caught the Pokemon in the specified slot of their party. + .macro setmonmetlocation slot, location .byte 0xd2 .2byte \slot .byte \location .endm - @ Sets variable 0x8004 to a value based on the width of the braille string at text. - .macro braille2 text + .macro mossdeepgym1 unknown .byte 0xd3 - .4byte \text + .2byte \unknown .endm - @ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. - .macro storeitems out, item, quantity + .macro mossdeepgym2 .byte 0xd4 - .byte \out - .2byte \item - .2byte \quantity .endm @ In FireRed, this command is a nop. - .macro event_d5 + .macro mossdeepgym3 var .byte 0xd5 + .2byte \var .endm - .macro event_d6 + .macro mossdeepgym4 .byte 0xd6 .endm - .macro warp7 byte1, byte2, byte3, word1, word2 + .macro warp7 map, byte, word1, word2 .byte 0xd7 - .byte \byte1 - .byte \byte2 - .byte \byte3 + map \map + .byte \byte .2byte \word1 .2byte \word2 .endm - .macro event_d8 + .macro cmdD8 .byte 0xd8 .endm - .macro event_d9 + .macro cmdD9 .byte 0xd9 .endm - .macro hidebox2 + .macro hidebox2 .byte 0xda .endm @@ -1368,21 +1433,21 @@ .4byte \pointer .endm - .macro fadescreen3 byte + .macro fadescreenswapbuffers byte .byte 0xdc .byte \byte .endm - .macro buffertrainerclass byte, word + .macro buffertrainerclassname out, class .byte 0xdd - .byte \byte - .2byte \word + .byte \out + .2byte \class .endm - .macro buffertrainername byte, word + .macro buffertrainername out, trainer .byte 0xde - .byte \byte - .2byte \word + .byte \out + .2byte \trainer .endm .macro pokenavcall pointer @@ -1390,24 +1455,62 @@ .4byte \pointer .endm - .macro warp8 byte1, byte2, byte3, word1, word2 + .macro warp8 map, byte, word1, word2 .byte 0xe0 - .byte \byte1 - .byte \byte2 - .byte \byte3 + map \map + .byte \byte .2byte \word1 .2byte \word2 .endm - .macro buffercontesttype byte, word + .macro buffercontesttypestring out, word .byte 0xe1 - .byte \byte + .byte \out .2byte \word .endm - .macro storeitems2 byte, word1, word2 + @ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. + .macro bufferitemnameplural out, item, quantity .byte 0xe2 - .byte \byte - .2byte \word1 - .2byte \word2 + .byte \out + .2byte \item + .2byte \quantity + .endm + + +@ Supplementary + + .macro goto_eq dest + goto_if 1, \dest + .endm + + .macro switch var + copyvar 0x8000, \var + .endm + + .macro case condition, dest + compare_var_to_value 0x8000, \condition + goto_eq \dest + .endm + + .macro msgbox text, type=4 + loadword 0, \text + callstd \type + .endm + + @ Message box types + MSGBOX_YESNO = 5 + + YES = 1 + NO = 0 + + .macro giveitem_std item, amount=1, function=0 + setorcopyvar 0x8000, \item + setorcopyvar 0x8001, \amount + callstd \function + .endm + + .macro givedecoration_std decoration + setorcopyvar 0x8000, \decoration + callstd 7 .endm diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 452f9b714..5367ad712 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -1,15 +1,115 @@ .macro new_map_group - .set cur_map_group, cur_map_group + 1 + inc cur_map_group .set cur_map_num, 0 .endm .macro map_group map_name .set GROUP_\map_name, cur_map_group .set MAP_\map_name, cur_map_num - .set cur_map_num, cur_map_num + 1 + inc cur_map_num .endm .macro map map_name .byte GROUP_\map_name .byte MAP_\map_name .endm + + .macro warp_map map_name + .byte MAP_\map_name + .byte GROUP_\map_name + .endm + + .macro heal_location map_name, x, y + .byte GROUP_\map_name + .byte MAP_\map_name + .2byte \x + .2byte \y + .space 2 + .endm + + .equiv GROUP_NONE, 0x7f + .equiv MAP_NONE, 0x7f + + .equiv GROUP_UNDEFINED, 0xff + .equiv MAP_UNDEFINED, 0xff + + .macro map_script type, address + .byte \type + .4byte \address + .endm + + .macro map_script_2 word1, word2, address + .2byte \word1 + .2byte \word2 + .4byte \address + .endm + + .macro object_event index, gfx, replacement, filler1, x, y, elevation, movement_type, radius, filler2, trainer_type, sight_radius_tree_etc, script, event_flag, filler3, filler4 + .byte \index, \gfx, \replacement, \filler1 + .2byte \x + .2byte \y + .byte \elevation, \movement_type, \radius, \filler2 + .2byte \trainer_type, \sight_radius_tree_etc + .4byte \script + .2byte \event_flag + .byte \filler3, \filler4 + inc _num_npcs + .endm + + .macro warp_def x, y, byte, warp, map + .2byte \x, \y + .byte \byte, \warp + warp_map \map + inc _num_warps + .endm + + .macro coord_event x, y, byte1, byte2, word1, word2, word3, script + .2byte \x, \y + .byte \byte1, \byte2 + .2byte \word1, \word2, \word3 + .4byte \script + inc _num_traps + .endm + + .macro bg_event x, y, byte, kind, word, arg6, arg7, arg8 + .2byte \x, \y + .byte \byte, \kind + .2byte \word + .if \kind < 5 + .4byte \arg6 + .else + .2byte \arg6 + .byte \arg7, \arg8 + .endif + inc _num_signs + .endm + + .macro map_events npcs, warps, traps, signs + .byte _num_npcs, _num_warps, _num_traps, _num_signs + .4byte \npcs, \warps, \traps, \signs + reset_map_events + .endm + + .macro reset_map_events + .set _num_npcs, 0 + .set _num_warps, 0 + .set _num_traps, 0 + .set _num_signs, 0 + .endm + + reset_map_events + + + .equiv connection_down, 1 + .equiv connection_up, 2 + .equiv connection_left, 3 + .equiv connection_right, 4 + .equiv connection_dive, 5 + .equiv connection_emerge, 6 + + .macro connection direction, offset, map, filler + .4byte connection_\direction + .4byte \offset + map \map + .space 2 + .endm diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc new file mode 100644 index 000000000..40fb3ca4e --- /dev/null +++ b/asm/macros/movement.inc @@ -0,0 +1,118 @@ + .macro create_movement name + enum _\name + .macro \name + .byte _\name + .endm + .endm + + enum_start + create_movement step_00 + create_movement step_01 + create_movement step_02 + create_movement step_03 + create_movement slow_step_down + create_movement slow_step_up + create_movement slow_step_left + create_movement slow_step_right + create_movement step_down + create_movement step_up + create_movement step_left + create_movement step_right + create_movement fast_step_down + create_movement fast_step_up + create_movement fast_step_left + create_movement fast_step_right + create_movement step_10 + create_movement step_11 + create_movement step_12 + create_movement step_13 + create_movement step_14 + create_movement step_15 + create_movement step_16 + create_movement step_17 + create_movement step_18 + create_movement step_19 + create_movement step_1a + create_movement step_1b + create_movement step_1c + create_movement step_1d + create_movement step_1e + create_movement step_1f + create_movement step_20 + create_movement step_21 + create_movement step_22 + create_movement step_23 + create_movement step_24 + create_movement step_25 + create_movement step_26 + create_movement step_27 + create_movement step_28 + create_movement step_29 + create_movement step_2a + create_movement step_2b + create_movement step_2c + create_movement step_2d + create_movement step_2e + create_movement step_2f + create_movement step_30 + create_movement step_31 + create_movement step_32 + create_movement step_33 + create_movement step_34 + create_movement step_35 + create_movement step_36 + create_movement step_37 + create_movement step_38 + create_movement step_39 + create_movement step_3a + create_movement step_3b + create_movement step_3c + create_movement step_3d + create_movement step_3e + create_movement step_3f + create_movement step_40 + create_movement step_41 + create_movement step_42 + create_movement step_43 + create_movement step_44 + create_movement step_45 + create_movement step_46 + create_movement step_47 + create_movement step_48 + create_movement step_49 + create_movement step_4a + create_movement step_4b + create_movement step_4c + create_movement step_4d + create_movement step_4e + create_movement step_4f + create_movement step_50 + create_movement step_51 + create_movement step_52 + create_movement step_53 + create_movement step_54 + create_movement step_55 + create_movement step_56 + create_movement step_57 + create_movement step_58 + create_movement step_59 + create_movement step_5a + create_movement step_5b + create_movement step_5c + create_movement step_5d + create_movement step_5e + create_movement step_5f + create_movement step_60 + create_movement step_61 + create_movement step_62 + create_movement step_63 + + enum_start 0x91 + create_movement step_91 + create_movement step_92 + + enum_start 0x96 + create_movement step_96 + + enum_start 0xfe + create_movement step_end diff --git a/constants/map_object_constants.inc b/constants/map_object_constants.inc index 014eb05c8..50b171d9c 100644 --- a/constants/map_object_constants.inc +++ b/constants/map_object_constants.inc @@ -39,7 +39,7 @@ .set MAP_OBJ_GFX_SCHOOL_KID_M, 38 .set MAP_OBJ_GFX_MANIAC, 39 .set MAP_OBJ_GFX_HEX_MANIAC, 40 - .set MAP_OBJ_GFX_RAYQUAZA, 41 + .set MAP_OBJ_GFX_RAYQUAZA_1, 41 .set MAP_OBJ_GFX_SWIMMER_M, 42 .set MAP_OBJ_GFX_SWIMMER_F, 43 .set MAP_OBJ_GFX_BLACK_BELT, 44 @@ -68,12 +68,12 @@ .set MAP_OBJ_GFX_REPORTER_M, 67 .set MAP_OBJ_GFX_REPORTER_F, 68 .set MAP_OBJ_GFX_BARD, 69 - .set MAP_OBJ_GFX_HIPSTER, 70 - .set MAP_OBJ_GFX_TRADER, 71 - .set MAP_OBJ_GFX_STORYTELLER, 72 - .set MAP_OBJ_GFX_GIDDY, 73 - .set MAP_OBJ_GFX_UNUSED_MAUVILLE_OLD_MAN_1, 74 - .set MAP_OBJ_GFX_UNUSED_MAUVILLE_OLD_MAN_2, 75 + .set MAP_OBJ_GFX_ANABEL, 70 + .set MAP_OBJ_GFX_TUCKER, 71 + .set MAP_OBJ_GFX_GRETA, 72 + .set MAP_OBJ_GFX_SPENSER, 73 + .set MAP_OBJ_GFX_NOLAND, 74 + .set MAP_OBJ_GFX_LUCY, 75 .set MAP_OBJ_GFX_UNUSED_NATU_DOLL, 76 .set MAP_OBJ_GFX_UNUSED_MAGNEMITE_DOLL, 77 .set MAP_OBJ_GFX_UNUSED_SQUIRTLE_DOLL, 78 @@ -93,10 +93,10 @@ .set MAP_OBJ_GFX_MAY_SURFING, 92 .set MAP_OBJ_GFX_MAY_FIELD_MOVE, 93 .set MAP_OBJ_GFX_TRUCK, 94 - .set MAP_OBJ_GFX_MACHOKE_CARRYING_BOX, 95 - .set MAP_OBJ_GFX_MACHOKE_FACING_AWAY, 96 + .set MAP_OBJ_GFX_VIGAROTH_CARRYING_BOX, 95 + .set MAP_OBJ_GFX_VIGAROTH_FACING_AWAY, 96 .set MAP_OBJ_GFX_BIRCHS_BAG, 97 - .set MAP_OBJ_GFX_ZIGZAGOON, 98 + .set MAP_OBJ_GFX_ZIGZAGOON_1, 98 .set MAP_OBJ_GFX_ARTIST, 99 .set MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL, 100 .set MAP_OBJ_GFX_RIVAL_BRENDAN_MACH_BIKE, 101 @@ -205,8 +205,8 @@ .set MAP_OBJ_GFX_KECLEON_1, 204 .set MAP_OBJ_GFX_KYOGRE_2, 205 .set MAP_OBJ_GFX_GROUDON_2, 206 - .set MAP_OBJ_GFX_RAYQUAZA_2, 207 - .set MAP_OBJ_GFX_ZIGZAGOON_2, 208 + .set MAP_OBJ_GFX_RAYQUAZA_2, 207 + .set MAP_OBJ_GFX_ZIGZAGOON_2, 208 .set MAP_OBJ_GFX_PIKACHU, 209 .set MAP_OBJ_GFX_AZUMARILL, 210 .set MAP_OBJ_GFX_WINGULL, 211 @@ -216,6 +216,34 @@ .set MAP_OBJ_GFX_MOM, 215 .set MAP_OBJ_GFX_LINK_BRENDAN, 216 .set MAP_OBJ_GFX_LINK_MAY, 217 + .set MAP_OBJ_GFX_JUAN, 218 + .set MAP_OBJ_GFX_SCOTT, 219 + .set MAP_OBJ_GFX_POOCHYENA, 220 + .set MAP_OBJ_GFX_KYOGRE_3, 221 + .set MAP_OBJ_GFX_GROUDON_3, 222 + .set MAP_OBJ_GFX_MYSTERY_GIFT_MAN, 223 + .set MAP_OBJ_GFX_TRICK_HOUSE_STATUE, 224 + .set MAP_OBJ_GFX_KIRLIA, 225 + .set MAP_OBJ_GFX_DUSCLOPS, 226 + .set MAP_OBJ_GFX_UNION_ROOM_NURSE, 227 + .set MAP_OBJ_GFX_SUDOWOODO, 228 + .set MAP_OBJ_GFX_MEW, 229 + .set MAP_OBJ_GFX_RED, 230 + .set MAP_OBJ_GFX_LEAF, 231 + .set MAP_OBJ_GFX_DEOXYS, 232 + .set MAP_OBJ_GFX_DEOXYS_TRIANGLE, 233 + .set MAP_OBJ_GFX_BRANDON, 234 + .set MAP_OBJ_GFX_LINK_RS_BRENDAN, 235 + .set MAP_OBJ_GFX_LINK_RS_MAY, 236 + .set MAP_OBJ_GFX_LUGIA, 237 + .set MAP_OBJ_GFX_HOOH, 238 + .set MAP_OBJ_GFX_BARD_2, 239 + .set MAP_OBJ_GFX_HIPSTER, 240 + .set MAP_OBJ_GFX_TRADER, 241 + .set MAP_OBJ_GFX_STORYTELLER, 242 + .set MAP_OBJ_GFX_GIDDY, 243 + .set MAP_OBJ_GFX_PLACEHOLDER_1, 244 + .set MAP_OBJ_GFX_PLACEHOLDER_2, 245 .set SHADOW_SIZE_S, 0 .set SHADOW_SIZE_M, 1 diff --git a/constants/variables.inc b/constants/variables.inc new file mode 100644 index 000000000..ab488a97e --- /dev/null +++ b/constants/variables.inc @@ -0,0 +1,6 @@ + .equiv FACING, 0x800C + .equiv RESULT, 0x800D + .equiv ITEM_ID, 0x800E + .equiv LAST_TALKED, 0x800F + .equiv CONTEST_RANK, 0x8010 + .equiv CONTEST_CATEGORY, 0x8011 diff --git a/data/cable_car.s b/data/cable_car.s index 23b81cba7..0f3bf3e2e 100644 --- a/data/cable_car.s +++ b/data/cable_car.s @@ -86,7 +86,7 @@ gMtChimneyHikerGraphicsIDs:: @ 85CDBE6 .byte MAP_OBJ_GFX_HIKER .byte MAP_OBJ_GFX_CAMPER .byte MAP_OBJ_GFX_PICNICKER - .byte MAP_OBJ_GFX_ZIGZAGOON @ not used + .byte MAP_OBJ_GFX_ZIGZAGOON_1 @ not used .align 1 gMtChimneyHikerCoords:: @ 85CDBEA diff --git a/data/event_script_command_function_table.inc b/data/event_script_command_function_table.inc index 7cd00c37d..bef236c9a 100644 --- a/data/event_script_command_function_table.inc +++ b/data/event_script_command_function_table.inc @@ -67,18 +67,18 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_setdivewarp .4byte ScrCmd_setholewarp .4byte ScrCmd_getplayerxy - .4byte ScrCmd_countpokemon - .4byte ScrCmd_additem - .4byte ScrCmd_removeitem + .4byte ScrCmd_getpartysize + .4byte ScrCmd_giveitem + .4byte ScrCmd_takeitem .4byte ScrCmd_checkitemspace .4byte ScrCmd_checkitem .4byte ScrCmd_checkitemtype - .4byte ScrCmd_addpcitem + .4byte ScrCmd_givepcitem .4byte ScrCmd_checkpcitem - .4byte ScrCmd_adddecor - .4byte ScrCmd_removedecor - .4byte ScrCmd_hasdecor + .4byte ScrCmd_givedecoration + .4byte ScrCmd_takedecoration .4byte ScrCmd_checkdecor + .4byte ScrCmd_checkdecorspace .4byte ScrCmd_applymovement .4byte ScrCmd_applymovement_at .4byte ScrCmd_waitmovement @@ -88,12 +88,12 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_addobject .4byte ScrCmd_addobject_at .4byte ScrCmd_setobjectxy - .4byte ScrCmd_showobject - .4byte ScrCmd_hideobject + .4byte ScrCmd_showobject_at + .4byte ScrCmd_hideobject_at .4byte ScrCmd_faceplayer .4byte ScrCmd_turnobject .4byte ScrCmd_trainerbattle - .4byte ScrCmd_battlebegin + .4byte ScrCmd_dotrainerbattle .4byte ScrCmd_ontrainerbattleend .4byte ScrCmd_ontrainerbattleendgoto .4byte ScrCmd_checktrainerflag @@ -109,7 +109,7 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_lock .4byte ScrCmd_releaseall .4byte ScrCmd_release - .4byte ScrCmd_waitbutton + .4byte ScrCmd_waitbuttonpress .4byte ScrCmd_yesnobox .4byte ScrCmd_multichoice .4byte ScrCmd_multichoicedefault @@ -117,28 +117,28 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_drawbox .4byte ScrCmd_erasebox .4byte ScrCmd_drawboxtext - .4byte ScrCmd_drawpokepic - .4byte ScrCmd_erasepokepic - .4byte ScrCmd_drawcontestwinner + .4byte ScrCmd_showmonpic + .4byte ScrCmd_hidemonpic + .4byte ScrCmd_showcontestwinner .4byte ScrCmd_braillemessage - .4byte ScrCmd_givepoke + .4byte ScrCmd_givemon .4byte ScrCmd_giveegg - .4byte ScrCmd_setpokemove - .4byte ScrCmd_checkpokemove - .4byte ScrCmd_getspeciesname - .4byte ScrCmd_getfirstpartypokename - .4byte ScrCmd_getpartypokename - .4byte ScrCmd_getitemname - .4byte ScrCmd_getdecorname - .4byte ScrCmd_getmovename - .4byte ScrCmd_getnumberstring - .4byte ScrCmd_getstdstring - .4byte ScrCmd_getstring + .4byte ScrCmd_setmonmove + .4byte ScrCmd_checkpartymove + .4byte ScrCmd_bufferspeciesname + .4byte ScrCmd_bufferleadmonspeciesname + .4byte ScrCmd_bufferpartymonnick + .4byte ScrCmd_bufferitemname + .4byte ScrCmd_bufferdecorationname + .4byte ScrCmd_buffermovename + .4byte ScrCmd_buffernumberstring + .4byte ScrCmd_bufferstdstring + .4byte ScrCmd_bufferstring .4byte ScrCmd_pokemart - .4byte ScrCmd_pokemartdecor - .4byte ScrCmd_pokemartbp + .4byte ScrCmd_pokemartdecoration + .4byte ScrCmd_pokemartdecoration2 .4byte ScrCmd_playslotmachine - .4byte ScrCmd_plantberrytree + .4byte ScrCmd_setberrytree .4byte ScrCmd_choosecontestpkmn .4byte ScrCmd_startcontest .4byte ScrCmd_showcontestresults @@ -152,21 +152,21 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_updatemoneybox .4byte ScrCmd_getpricereduction .4byte ScrCmd_fadescreen - .4byte ScrCmd_fadescreendelay - .4byte ScrCmd_setdarklevel - .4byte ScrCmd_animdarklevel + .4byte ScrCmd_fadescreenspeed + .4byte ScrCmd_setflashradius + .4byte ScrCmd_animateflash .4byte ScrCmd_messageautoscroll .4byte ScrCmd_dofieldeffect - .4byte ScrCmd_setfieldeffect + .4byte ScrCmd_setfieldeffectarg .4byte ScrCmd_waitfieldeffect - .4byte ScrCmd_sethealplace + .4byte ScrCmd_setrespawn .4byte ScrCmd_checkplayergender - .4byte ScrCmd_playpokecry - .4byte ScrCmd_setmaptile + .4byte ScrCmd_playmoncry + .4byte ScrCmd_setmetatile .4byte ScrCmd_resetweather .4byte ScrCmd_setweather .4byte ScrCmd_doweather - .4byte ScrCmd_tileeffect + .4byte ScrCmd_setstepcallback .4byte ScrCmd_setmaplayoutindex .4byte ScrCmd_setobjectpriority .4byte ScrCmd_resetobjectpriority @@ -191,26 +191,26 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_vcall_if .4byte ScrCmd_vmessage .4byte ScrCmd_vloadword - .4byte ScrCmd_vgetstring + .4byte ScrCmd_vbufferstring .4byte ScrCmd_showcoinsbox .4byte ScrCmd_hidecoinsbox .4byte ScrCmd_updatecoinsbox .4byte ScrCmd_incrementgamestat .4byte ScrCmd_setescapewarp - .4byte ScrCmd_waitpokecry - .4byte ScrCmd_getboxname + .4byte ScrCmd_waitmoncry + .4byte ScrCmd_bufferboxname .4byte ScrCmd_nop1 .4byte ScrCmd_nop1 .4byte ScrCmd_nop1 .4byte ScrCmd_nop1 .4byte ScrCmd_nop1 .4byte ScrCmd_nop1 - .4byte ScrCmd_setpokeobedient - .4byte ScrCmd_checkpokeobedience + .4byte ScrCmd_setmonobedient + .4byte ScrCmd_checkmonobedience .4byte ScrCmd_cmdCF .4byte ScrCmd_nop1 .4byte ScrCmd_warpD1 - .4byte ScrCmd_setpokemetlocation + .4byte ScrCmd_setmonmetlocation .4byte ScrCmd_mossdeepgym1 .4byte ScrCmd_mossdeepgym2 .4byte ScrCmd_mossdeepgym3 @@ -221,9 +221,9 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_cmdDA .4byte ScrCmd_cmdDB .4byte ScrCmd_fadescreenswapbuffers - .4byte ScrCmd_gettrainerclass - .4byte ScrCmd_gettrainername + .4byte ScrCmd_buffertrainerclassname + .4byte ScrCmd_buffertrainername .4byte ScrCmd_pokenavcall .4byte ScrCmd_warpE0 - .4byte ScrCmd_getcontesttype - .4byte ScrCmd_getitemnameplural + .4byte ScrCmd_buffercontesttype + .4byte ScrCmd_bufferitemnameplural diff --git a/data/event_scripts.s b/data/event_scripts.s index ad1216b91..2383907ee 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1,5 +1,7 @@ .include "asm/macros.inc" + .include "asm/macros/event.inc" .include "constants/constants.inc" + .include "constants/variables.inc" .section script_data, "aw", %progbits diff --git a/data/rom4.s b/data/rom4.s index aa57174d9..15c3459eb 100644 --- a/data/rom4.s +++ b/data/rom4.s @@ -25,13 +25,13 @@ gUnknown_08339E00:: @ 8339E00 .incbin "baserom.gba", 0x339e00, 0x8 @ 8339E08 - .include "data/tilesets/tileset_graphics.inc" + .include "data/tilesets/graphics.inc" @ 83960F0 .include "data/tilesets/metatiles.inc" @ 83DF704 - .include "data/tilesets/tilesets.inc" + .include "data/tilesets/headers.inc" @ 83DFE14 .incbin "baserom.gba", 0x3dfe14, 0xa1fc0 diff --git a/data/text/tv.inc b/data/text/tv.inc index fa2d0ac73..6d461e906 100644 --- a/data/text/tv.inc +++ b/data/text/tv.inc @@ -63,6 +63,7 @@ gTVBravoTrainerText07:: @ 0827F65C gTVBravoTrainerText08:: @ 0827F6E6 .string "Introducing the TRAINER’s {STR_VAR_1}!$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F704:: @ 0827F704 .string "Hello! You’re the TRAINER who just had\n" .string "a battle, right?\p" .string "I’m gathering interviews with TRAINERS\n" @@ -70,6 +71,7 @@ gTVBravoTrainerText08:: @ 0827F6E6 .string "May I get a few words from you about\n" .string "your impressions on battling?$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F7BA:: @ 0827F7BA .string "You will? Really?\n" .string "Thank you!\l" .string "Then, uh…\p" @@ -78,37 +80,44 @@ gTVBravoTrainerText08:: @ 0827F6E6 .string "Were you satisfied with the battle?\n" .string "Or are you unhappy?$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F84C:: @ 0827F84C .string "Oh…\n" .string "Sorry we disturbed you.\p" .string "Please give us an interview the next\n" .string "time you visit the BATTLE TOWER.$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F8AE:: @ 0827F8AE .string "Well, of course!\p" .string "That unmistakable look of satisfaction\n" .string "on your face…\p" .string "It’s obvious that you’ve had a great\n" .string "battle.$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F921:: @ 0827F921 .string "Oh, I see…\p" .string "Well, it certainly is difficult to make a\n" .string "battle turn out exactly as planned.$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F97A:: @ 0827F97A .string "Oh, oh, may I ask one more question?\p" .string "If you were to describe your\n" .string "impressions about this battle with\l" .string "one saying, what would it be?$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27F9FD:: @ 0827F9FD .string "Oh, that is stunningly cool!\p" .string "That’s a great line!\n" .string "I hope you’ll do great next time, too.\p" .string "I hope to see you again!$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27FA6F:: @ 0827FA6F .string "Oh, I see…\p" .string "Still, being the silent type is also\n" .string "cool, isn’t it?\p" .string "I hope you’ll give me the opportunity\n" .string "to share your thoughts again!$" +BATTLE_FRONTIER_BATTLE_TOWER_LOBBY_Text_27FAF3:: @ 0827FAF3 .string "I’ll be looking forward to your\n" .string "next battle!$" @@ -215,6 +224,7 @@ gTVBravoTrainerBattleTowerText14:: @ 082801E6 .string "That’s all the time we have!\n" .string "Until next time, see you!$" +SlateportCity_PokemonFanClub_Text_280270: @ 08280270 .string "Wow!\p" .string "It’s plain to see that you lavish your\n" .string "love on your {STR_VAR_1}.\p" @@ -225,30 +235,36 @@ gTVBravoTrainerBattleTowerText14:: @ 082801E6 .string "Would you be willing to answer a few\n" .string "simple questions for me?$" +SlateportCity_PokemonFanClub_Text_28034F: @ 0828034F .string "Great! Thank you!\p" .string "Okay, here goes.\n" .string "I just need quick answers, okay?$" +SlateportCity_PokemonFanClub_Text_280393: @ 08280393 .string "When you first met {STR_VAR_1},\n" .string "what did you feel?\p" .string "How would you describe your feelings\n" .string "at the time?$" +SlateportCity_PokemonFanClub_Text_2803EF: @ 082803EF .string "Your {STR_VAR_1} is cared for lovingly.\p" .string "If you were to liken it to something\n" .string "that you like, what would it be?$" +SlateportCity_PokemonFanClub_Text_280454: @ 08280454 .string "This question also relates to your\n" .string "beloved {STR_VAR_1}.\p" .string "What was it about {STR_VAR_1} that\n" .string "attracted you?$" +SlateportCity_PokemonFanClub_Text_2804AC: @ 082804AC .string "Okay, that makes sense.\p" .string "The next question might be a little\n" .string "on the tough side.\p" .string "Here goes…\p" .string "What do POKéMON mean to you?$" +SlateportCity_PokemonFanClub_Text_280523: @ 08280523 .string "I see!\p" .string "Hmhm…\p" .string "Okay!\n" @@ -260,13 +276,16 @@ gTVBravoTrainerBattleTowerText14:: @ 082801E6 .string "Okay, that’s all.\n" .string "Bye-bye!$" +SlateportCity_PokemonFanClub_Text_2805E2: @ 082805E2 .string "Oh, okay…\p" .string "Well, if you get the urge to tell me\n" .string "about POKéMON, I’ll be here!$" +SlateportCity_PokemonFanClub_Text_28062E: @ 0828062E .string "I enjoy this job--you get to learn\n" .string "about POKéMON by doing interviews.$" +SlateportCity_PokemonFanClub_Text_280674: @ 08280674 .string "Hi, you seem to be very close to your\n" .string "{STR_VAR_1}.\p" .string "Do you know what?\n" @@ -276,10 +295,12 @@ gTVBravoTrainerBattleTowerText14:: @ 082801E6 .string "I’m wondering if you’d be willing to tell\n" .string "me a little about your {STR_VAR_1}?$" +SlateportCity_PokemonFanClub_Text_28073B: @ 0828073B .string "Wow, thank you!\p" .string "Okay, then, please tell me anything\n" .string "you’d like about your {STR_VAR_1}.$" +SlateportCity_PokemonFanClub_Text_280789: @ 08280789 .string "Wow…\n" .string "That’s an interesting account.\p" .string "You really are tight with {STR_VAR_1},\n" @@ -413,6 +434,7 @@ gTVFanClubText07:: @ 082810E7 .string "A-whoops, will you look at the time?\n" .string "Time to say good-bye until next time!$" +SlateportCity_OceanicMuseum_1F_Text_2811A0: @ 082811A0 .string "Oh?\n" .string "Do you perhaps like POKéMON?\p" .string "I’m on assignment with the TV network.\p" @@ -421,27 +443,32 @@ gTVFanClubText07:: @ 082810E7 .string "If you don’t mind, could you tell me\n" .string "something about yourself?$" +SlateportCity_OceanicMuseum_1F_Text_28126D: @ 0828126D .string "I’m gathering stories on POKéMON and\n" .string "TRAINERS that occurred recently.\p" .string "If you don’t mind, could you tell me\n" .string "something about yourself?$" +SlateportCity_OceanicMuseum_1F_Text_2812F2: @ 082812F2 .string "Oh, you will?\n" .string "Thank you!\p" .string "Then, please, tell me anything of\n" .string "interest that you experienced recently\l" .string "involving POKéMON.$" +SlateportCity_OceanicMuseum_1F_Text_281367: @ 08281367 .string "Oh, I see…\p" .string "Well, if you do have an interesting\n" .string "story to tell, please let me know.$" +SlateportCity_OceanicMuseum_1F_Text_2813B9: @ 082813B9 .string "Oh, what an uplifting story!\p" .string "I’ll be sure to get your story told\n" .string "on television.\p" .string "It should be aired sometime, I think,\n" .string "so please look forward to it.$" +SlateportCity_OceanicMuseum_1F_Text_28144D: @ 0828144D .string "Hmmm…\n" .string "I’ve got a good story for a TV program.\p" .string "I’d better write it up in a hurry!$" @@ -540,35 +567,44 @@ gTV3CheersForPokeblocksText05:: @ 08281B93 .string "Tune in next time!\n" .string "Our slogan is “3 CHEERS FOR {POKEBLOCK}S!”$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281BCB:: @ 8281BCB .string "Hi, there!\p" .string "I’m a big fan of {STR_VAR_1}.\n" .string "What’s your opinion of {STR_VAR_1}?$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281C06:: @ 8281C06 .string "I see, I see. That’s what you think\n" .string "about the TRAINER.$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281C3D:: @ 8281C3D .string "Have you completely forgotten\n" .string "about {STR_VAR_1}?$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281C65:: @ 8281C65 .string "I’m a big fan of {STR_VAR_1}.\n" .string "What’s your opinion of {STR_VAR_1}?$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281C95:: @ 8281C95 .string "How strong would you rate {STR_VAR_1}\n" .string "on a scale of one hundred?$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281CCD:: @ 8281CCD .string "Have you completely forgotten\n" .string "about {STR_VAR_1}?$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281CF5:: @ 8281CF5 .string "Oh, I see!\n" .string "You should meet {STR_VAR_1} sometime.\l" .string "I’m sure you’ll become a fan, too!$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281D40:: @ 8281D40 .string "I see, I see.\p" .string "Thank you!\n" .string "That’s very useful to know.\p" .string "I’ll share this information with other\n" .string "{STR_VAR_1} fans and discuss it.$" +LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB_Text_281DB4:: @ 8281DB4 .string "There’s going to be a TV special on\n" .string "{STR_VAR_1} very soon.\p" .string "I hope you catch it!$" @@ -2613,19 +2649,25 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "This concludes this episode of\n" .string "“POKéMON BATTLE UPDATE!”$" +Route111_Text_28AF05: @ 0828AF05 .string "GABBY: Oh! We’ve just spotted a tough-\n" .string "looking TRAINER here of all places!\p" .string "Okay, roll camera!\n" .string "Let’s get this interview.$" +Route111_Text_28AF7D: @ 0828AF7D +Route118_Text_28AF7D: @ 0828AF7D +Route120_Text_28AF7D: @ 0828AF7D .string "GABBY: Oh! You’re {PLAYER}! Hi!\n" .string "Do you remember us from last time?\p" .string "Can you show us how much stronger\n" .string "you’ve become? Okay, cue interview!$" +Route111_Text_28B000: @ 0828B000 .string "GABBY: My eyes didn’t lie!\n" .string "I did discover an astonishing TRAINER!$" +Route111_Text_28B042: @ 0828B042 .string "GABBY: Awesome! Awesome!\n" .string "Who are you?!\p" .string "I knew we were onto something wild\n" @@ -2636,16 +2678,19 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "So, would you give us a bit of your time\n" .string "for an interview?$" +Route111_Text_28B137: @ 0828B137 .string "GABBY: “{STR_VAR_1}!”\p" .string "Remember? That’s the quote you gave\n" .string "us as the battle clincher last time.\p" .string "I never, ever forget stuff like that!$" +Route111_Text_28B1B3: @ 0828B1B3 .string "The last time we battled, you stomped\n" .string "us before we could brace ourselves…\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" +Route111_Text_28B23D: @ 0828B23D .string "The last time we battled, didn’t you\n" .string "throw a POKé BALL at us?\p" .string "We were shocked! So we told everyone,\n" @@ -2653,25 +2698,30 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" +Route111_Text_28B2FA: @ 0828B2FA .string "The last time we battled, your item\n" .string "skills cleverly did us in.\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" +Route111_Text_28B379: @ 0828B379 .string "The last time we battled, we managed\n" .string "to look respectable.\p" .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" +Route111_Text_28B3F3: @ 0828B3F3 .string "Anyway, what do you think?\n" .string "Do you want to be interviewed again?$" +Route111_Text_28B433: @ 0828B433 .string "You will?\n" .string "Thank you!\p" .string "Okay, I need you to describe your\n" .string "feelings about our battle, but it\l" .string "has to be short and sweet. Go!$" +Route111_Text_28B4AB: @ 0828B4AB .string "GABBY: Mmm, yeah!\n" .string "That’s the perfect clincher!\p" .string "I get the feeling that this will make\n" @@ -2681,16 +2731,24 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "Okay!\n" .string "We’ll be seeing you!$" +Route111_Text_28B577: @ 0828B577 .string "GABBY: Oh…\p" .string "Okay, but don’t give up!\n" .string "We’ll be keeping an eye out for you!$" +Route111_Text_28B5C0: @ 0828B5C0 +Route118_Text_28B5C0: @ 0828B5C0 +Route120_Text_28B5C0: @ 0828B5C0 .string "GABBY: We’ll be keeping an eye out\n" .string "for you!$" +Route111_Text_28B5EC: @ 0828B5EC +Route118_Text_28B5EC: @ 0828B5EC +Route120_Text_28B5EC: @ 0828B5EC .string "GABBY: Is there a strong TRAINER\n" .string "anywhere with a lot of POKéMON?$" +Route111_Text_28B62D: @ 0828B62D .string "GABBY: Wow, you are something!\p" .string "You’ve gotten a lot stronger--a lot--\n" .string "since we last battled.\p" @@ -2700,29 +2758,46 @@ gTVPokemonBattleUpdateText07:: @ 0828AE26 .string "Are you willing to give us an interview\l" .string "this time?$" +Route111_Text_28B719: @ 0828B719 +Route118_Text_28B719: @ 0828B719 +Route120_Text_28B719: @ 0828B719 .string "GABBY: That was an intense battle!\n" .string "Did you get all that on camera?$" +Route111_Text_28B75C: @ 0828B75C .string "TY: Hey, lookie here! A tough-looking\n" .string "TRAINER here, of all places!\l" .string "Camera’s rolling!$" +Route111_Text_28B7B1: @ 0828B7B1 +Route118_Text_28B7B1: @ 0828B7B1 +Route120_Text_28B7B1: @ 0828B7B1 .string "TY: Hey, lookie here!\n" .string "I remember you!\p" .string "I’ll get this battle all on this\n" .string "here camera!$" +Route111_Text_28B805: @ 0828B805 +Route118_Text_28B805: @ 0828B805 +Route120_Text_28B805: @ 0828B805 .string "TY: You’re a natural!\n" .string "Got me some prime footage right here!$" +Route111_Text_28B841: @ 0828B841 +Route118_Text_28B841: @ 0828B841 +Route120_Text_28B841: @ 0828B841 .string "TY: Do you only have the one POKéMON\n" .string "and that’s it?\p" .string "If you had more POKéMON, it’d make for\n" .string "better footage, but…$" +Route111_Text_28B8B1: @ 0828B8B1 .string "TY: Yep, we sure spotted a hot TRAINER.\n" .string "This is a huge scoop for us!$" +Route111_Text_28B8F6: @ 0828B8F6 +Route118_Text_28B8F6: @ 0828B8F6 +Route120_Text_28B8F6: @ 0828B8F6 .string "TY: Yep, I got it all.\n" .string "That whole battle’s on camera.$" diff --git a/data/tilesets/tileset_graphics.inc b/data/tilesets/graphics.inc index 2d1ddb1f9..2d1ddb1f9 100644 --- a/data/tilesets/tileset_graphics.inc +++ b/data/tilesets/graphics.inc diff --git a/data/tilesets/tilesets.inc b/data/tilesets/headers.inc index a342dc973..a342dc973 100644 --- a/data/tilesets/tilesets.inc +++ b/data/tilesets/headers.inc diff --git a/src/battle_2.c b/src/battle_2.c index 16c07114a..6b7c4063e 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -43,6 +43,7 @@ #include "tv.h" #include "safari_zone.h" #include "battle_string_ids.h" +#include "data2.h" struct UnknownStruct6 { @@ -2478,15 +2479,6 @@ static void sub_80398D0(struct Sprite *sprite) } } -// to get rid of once the struct is declared in a header -struct MonCoords -{ - // This would use a bitfield, but sub_8079F44 - // uses it as a u8 and casting won't match. - u8 coords; // u8 x:4, y:4; - u8 y_offset; -}; - extern const struct MonCoords gMonFrontPicCoords[]; extern const struct MonCoords gCastformFrontSpriteCoords[]; diff --git a/src/scrcmd.c b/src/scrcmd.c index af314609c..219dfebd0 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -495,7 +495,7 @@ bool8 ScrCmd_random(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_additem(struct ScriptContext *ctx) +bool8 ScrCmd_giveitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); @@ -504,7 +504,7 @@ bool8 ScrCmd_additem(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_removeitem(struct ScriptContext *ctx) +bool8 ScrCmd_takeitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); @@ -539,7 +539,7 @@ bool8 ScrCmd_checkitemtype(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_addpcitem(struct ScriptContext *ctx) +bool8 ScrCmd_givepcitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u16 quantity = VarGet(ScriptReadHalfword(ctx)); @@ -557,7 +557,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_adddecor(struct ScriptContext *ctx) +bool8 ScrCmd_givedecoration(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); @@ -565,7 +565,7 @@ bool8 ScrCmd_adddecor(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_removedecor(struct ScriptContext *ctx) +bool8 ScrCmd_takedecoration(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); @@ -573,7 +573,7 @@ bool8 ScrCmd_removedecor(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_checkdecor(struct ScriptContext *ctx) +bool8 ScrCmd_checkdecorspace(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); @@ -581,7 +581,7 @@ bool8 ScrCmd_checkdecor(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_hasdecor(struct ScriptContext *ctx) +bool8 ScrCmd_checkdecor(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); @@ -613,14 +613,14 @@ bool8 ScrCmd_incrementgamestat(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_animdarklevel(struct ScriptContext *ctx) +bool8 ScrCmd_animateflash(struct ScriptContext *ctx) { sub_80B009C(ScriptReadByte(ctx)); ScriptContext1_Stop(); return TRUE; } -bool8 ScrCmd_setdarklevel(struct ScriptContext *ctx) +bool8 ScrCmd_setflashradius(struct ScriptContext *ctx) { u16 flashLevel = VarGet(ScriptReadHalfword(ctx)); @@ -643,12 +643,12 @@ bool8 ScrCmd_fadescreen(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_fadescreendelay(struct ScriptContext *ctx) +bool8 ScrCmd_fadescreenspeed(struct ScriptContext *ctx) { u8 mode = ScriptReadByte(ctx); - u8 delay = ScriptReadByte(ctx); + u8 speed = ScriptReadByte(ctx); - fade_screen(mode, delay); + fade_screen(mode, speed); SetupNativeScript(ctx, IsPaletteNotActive); return TRUE; } @@ -736,7 +736,7 @@ bool8 ScrCmd_doweather(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_tileeffect(struct ScriptContext *ctx) +bool8 ScrCmd_setstepcallback(struct ScriptContext *ctx) { ActivatePerStepCallback(ScriptReadByte(ctx)); return FALSE; @@ -907,7 +907,7 @@ bool8 ScrCmd_getplayerxy(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_countpokemon(struct ScriptContext *ctx) +bool8 ScrCmd_getpartysize(struct ScriptContext *ctx) { gScriptResult = CalculatePlayerPartyCount(); return FALSE; @@ -1121,7 +1121,7 @@ bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_showobject(struct ScriptContext *ctx) +bool8 ScrCmd_showobject_at(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1131,7 +1131,7 @@ bool8 ScrCmd_showobject(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_hideobject(struct ScriptContext *ctx) +bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1339,7 +1339,7 @@ static bool8 WaitForAorBPress(void) return FALSE; } -bool8 ScrCmd_waitbutton(struct ScriptContext *ctx) +bool8 ScrCmd_waitbuttonpress(struct ScriptContext *ctx) { SetupNativeScript(ctx, WaitForAorBPress); return TRUE; @@ -1454,7 +1454,7 @@ bool8 ScrCmd_drawboxtext(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_drawpokepic(struct ScriptContext *ctx) +bool8 ScrCmd_showmonpic(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u8 x = ScriptReadByte(ctx); @@ -1464,7 +1464,7 @@ bool8 ScrCmd_drawpokepic(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_erasepokepic(struct ScriptContext *ctx) +bool8 ScrCmd_hidemonpic(struct ScriptContext *ctx) { bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc(); @@ -1474,7 +1474,7 @@ bool8 ScrCmd_erasepokepic(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_drawcontestwinner(struct ScriptContext *ctx) +bool8 ScrCmd_showcontestwinner(struct ScriptContext *ctx) { u8 v1 = ScriptReadByte(ctx); @@ -1694,7 +1694,7 @@ bool8 ScrCmd_vmessage(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getspeciesname(struct ScriptContext *ctx) +bool8 ScrCmd_bufferspeciesname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 species = VarGet(ScriptReadHalfword(ctx)); @@ -1703,7 +1703,7 @@ bool8 ScrCmd_getspeciesname(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getfirstpartypokename(struct ScriptContext *ctx) +bool8 ScrCmd_bufferleadmonspeciesname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); @@ -1714,7 +1714,7 @@ bool8 ScrCmd_getfirstpartypokename(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getpartypokename(struct ScriptContext *ctx) +bool8 ScrCmd_bufferpartymonnick(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); @@ -1724,7 +1724,7 @@ bool8 ScrCmd_getpartypokename(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getitemname(struct ScriptContext *ctx) +bool8 ScrCmd_bufferitemname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 itemId = VarGet(ScriptReadHalfword(ctx)); @@ -1733,7 +1733,7 @@ bool8 ScrCmd_getitemname(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getitemnameplural(struct ScriptContext *ctx) +bool8 ScrCmd_bufferitemnameplural(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 itemId = VarGet(ScriptReadHalfword(ctx)); @@ -1743,7 +1743,7 @@ bool8 ScrCmd_getitemnameplural(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getdecorname(struct ScriptContext *ctx) +bool8 ScrCmd_bufferdecorationname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 decorId = VarGet(ScriptReadHalfword(ctx)); @@ -1752,7 +1752,7 @@ bool8 ScrCmd_getdecorname(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getmovename(struct ScriptContext *ctx) +bool8 ScrCmd_buffermovename(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 moveId = VarGet(ScriptReadHalfword(ctx)); @@ -1761,7 +1761,7 @@ bool8 ScrCmd_getmovename(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getnumberstring(struct ScriptContext *ctx) +bool8 ScrCmd_buffernumberstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 v1 = VarGet(ScriptReadHalfword(ctx)); @@ -1771,7 +1771,7 @@ bool8 ScrCmd_getnumberstring(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getstdstring(struct ScriptContext *ctx) +bool8 ScrCmd_bufferstdstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 index = VarGet(ScriptReadHalfword(ctx)); @@ -1780,7 +1780,7 @@ bool8 ScrCmd_getstdstring(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getcontesttype(struct ScriptContext *ctx) +bool8 ScrCmd_buffercontesttype(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 index = VarGet(ScriptReadHalfword(ctx)); @@ -1789,7 +1789,7 @@ bool8 ScrCmd_getcontesttype(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getstring(struct ScriptContext *ctx) +bool8 ScrCmd_bufferstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); const u8 *text = (u8 *)ScriptReadWord(ctx); @@ -1806,7 +1806,7 @@ bool8 ScrCmd_vloadword(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_vgetstring(struct ScriptContext *ctx) +bool8 ScrCmd_vbufferstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u32 addr = ScriptReadWord(ctx); @@ -1817,7 +1817,7 @@ bool8 ScrCmd_vgetstring(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getboxname(struct ScriptContext *ctx) +bool8 ScrCmd_bufferboxname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 boxId = VarGet(ScriptReadHalfword(ctx)); @@ -1826,7 +1826,7 @@ bool8 ScrCmd_getboxname(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_givepoke(struct ScriptContext *ctx) +bool8 ScrCmd_givemon(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u8 level = ScriptReadByte(ctx); @@ -1847,7 +1847,7 @@ bool8 ScrCmd_giveegg(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setpokemove(struct ScriptContext *ctx) +bool8 ScrCmd_setmonmove(struct ScriptContext *ctx) { u8 partyIndex = ScriptReadByte(ctx); u8 slot = ScriptReadByte(ctx); @@ -1857,7 +1857,7 @@ bool8 ScrCmd_setpokemove(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_checkpokemove(struct ScriptContext *ctx) +bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx) { u8 i; u16 moveId = ScriptReadHalfword(ctx); @@ -1973,7 +1973,7 @@ bool8 ScrCmd_trainerbattle(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_battlebegin(struct ScriptContext *ctx) +bool8 ScrCmd_dotrainerbattle(struct ScriptContext *ctx) { BattleSetup_StartTrainerBattle(); return TRUE; @@ -2041,7 +2041,7 @@ bool8 ScrCmd_pokemart(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_pokemartdecor(struct ScriptContext *ctx) +bool8 ScrCmd_pokemartdecoration(struct ScriptContext *ctx) { const void *ptr = (void *)ScriptReadWord(ctx); @@ -2050,7 +2050,7 @@ bool8 ScrCmd_pokemartdecor(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_pokemartbp(struct ScriptContext *ctx) +bool8 ScrCmd_pokemartdecoration2(struct ScriptContext *ctx) { const void *ptr = (void *)ScriptReadWord(ctx); @@ -2068,7 +2068,7 @@ bool8 ScrCmd_playslotmachine(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_plantberrytree(struct ScriptContext *ctx) +bool8 ScrCmd_setberrytree(struct ScriptContext *ctx) { u8 treeId = ScriptReadByte(ctx); u8 berry = ScriptReadByte(ctx); @@ -2127,7 +2127,7 @@ bool8 ScrCmd_dofieldeffect(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setfieldeffect(struct ScriptContext *ctx) +bool8 ScrCmd_setfieldeffectarg(struct ScriptContext *ctx) { u8 argNum = ScriptReadByte(ctx); @@ -2150,7 +2150,7 @@ bool8 ScrCmd_waitfieldeffect(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_sethealplace(struct ScriptContext *ctx) +bool8 ScrCmd_setrespawn(struct ScriptContext *ctx) { u16 healLocationId = VarGet(ScriptReadHalfword(ctx)); @@ -2164,7 +2164,7 @@ bool8 ScrCmd_checkplayergender(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_playpokecry(struct ScriptContext *ctx) +bool8 ScrCmd_playmoncry(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u16 mode = VarGet(ScriptReadHalfword(ctx)); @@ -2173,13 +2173,13 @@ bool8 ScrCmd_playpokecry(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_waitpokecry(struct ScriptContext *ctx) +bool8 ScrCmd_waitmoncry(struct ScriptContext *ctx) { SetupNativeScript(ctx, IsCryFinished); return TRUE; } -bool8 ScrCmd_setmaptile(struct ScriptContext *ctx) +bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) { u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); @@ -2353,8 +2353,8 @@ bool8 ScrCmd_cmdD9(struct ScriptContext *ctx) } } -// This command will force the Pokémon to be obedient, you don't get to choose which value to set its obedience to -bool8 ScrCmd_setpokeobedient(struct ScriptContext *ctx) +// This command will force the Pokémon to be obedient, you don't get to make it disobedient +bool8 ScrCmd_setmonobedient(struct ScriptContext *ctx) { bool8 obedient = TRUE; u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); @@ -2363,7 +2363,7 @@ bool8 ScrCmd_setpokeobedient(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_checkpokeobedience(struct ScriptContext *ctx) +bool8 ScrCmd_checkmonobedience(struct ScriptContext *ctx) { u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); @@ -2398,7 +2398,7 @@ bool8 ScrCmd_warpD1(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_setpokemetlocation(struct ScriptContext *ctx) +bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx) { u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); u8 location = ScriptReadByte(ctx); @@ -2414,7 +2414,7 @@ void sub_809BDB4(void) RemoveWindow(gUnknown_03000F30); } -bool8 ScrCmd_gettrainerclass(struct ScriptContext *ctx) +bool8 ScrCmd_buffertrainerclassname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 trainerClassId = VarGet(ScriptReadHalfword(ctx)); @@ -2423,7 +2423,7 @@ bool8 ScrCmd_gettrainerclass(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_gettrainername(struct ScriptContext *ctx) +bool8 ScrCmd_buffertrainername(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 trainerClassId = VarGet(ScriptReadHalfword(ctx)); |