Merge with master

This commit is contained in:
DizzyEggg 2020-07-11 12:59:23 +02:00
commit 4c3f40a361
609 changed files with 11010 additions and 9955 deletions

View File

@ -49,6 +49,8 @@ DATA_SRC_SUBDIR = src/data
DATA_ASM_SUBDIR = data
SONG_SUBDIR = sound/songs
MID_SUBDIR = sound/songs/midi
SAMPLE_SUBDIR = sound/direct_sound_samples
CRY_SUBDIR = sound/direct_sound_samples/cries
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
@ -67,7 +69,7 @@ OBJ_DIR := build/emerald
LIBPATH := -L ../../tools/agbcc/lib
else
CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
ROM := pokeemerald_modern.gba
OBJ_DIR := build/modern
LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
@ -173,7 +175,8 @@ clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
mostlyclean: tidy
rm -f sound/direct_sound_samples/*.bin
rm -f $(SAMPLE_SUBDIR)/*.bin
rm -f $(CRY_SUBDIR)/*.bin
rm -f $(MID_SUBDIR)/*.s
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
@ -212,7 +215,7 @@ include songs.mk
%.gbapal: %.png ; $(GFX) $< $@
%.lz: % ; $(GFX) $< $@
%.rl: % ; $(GFX) $< $@
sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif ; $(AIF) $< $@ --compress
$(CRY_SUBDIR)/%.bin: $(CRY_SUBDIR)/%.aif ; $(AIF) $< $@ --compress
sound/%.bin: sound/%.aif ; $(AIF) $< $@
@ -232,7 +235,7 @@ $(C_BUILDDIR)/record_mixing.o: CFLAGS += -ffreestanding
$(C_BUILDDIR)/librfu_intr.o: CC1 := tools/agbcc/bin/agbcc_arm
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -O2 -mthumb-interwork -quiet
else
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -fno-aggressive-loop-optimizations -Wno-pointer-to-int-cast
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
endif
ifeq ($(NODEP),1)

View File

@ -274,15 +274,17 @@
.2byte \functionId
.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).
@ 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
.byte 0x27
.endm
@ Blocks script execution for time (frames? milliseconds?).
.macro delay time:req
@ Blocks script execution for frames. (Pokemon Emerald runs at just shy of 60 frames per second.)
.macro delay frames:req
.byte 0x28
.2byte \time
.2byte \frames
.endm
@ Sets a to 1.
@ -315,7 +317,8 @@
.byte 0x2d
.endm
@ 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.
@ 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
@ -378,7 +381,8 @@
.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.
@ 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 map:req, warp:req, X:req, Y:req
.byte 0x39
map \map
@ -429,7 +433,8 @@
.2byte \Y
.endm
@ 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).
@ 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:req, warp:req, X:req, Y:req
.byte 0x3f
map \map
@ -468,7 +473,8 @@
.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 VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE.
@ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and
@ VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE.
.macro additem index:req, quantity=1
.byte 0x44
.2byte \index
@ -482,21 +488,24 @@
.2byte \quantity
.endm
@ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room.
@ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to
@ TRUE if there is room, or FALSE is there is no room.
.macro checkitemspace index:req, quantity:req
.byte 0x46
.2byte \index
.2byte \quantity
.endm
@ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has enough of the item, or FALSE if they have fewer than quantity of the item.
@ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has
@ enough of the item, or FALSE if they have fewer than quantity of the item.
.macro checkitem index:req, quantity:req
.byte 0x47
.2byte \index
.2byte \quantity
.endm
@ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE).
@ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT.
@ This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE).
.macro checkitemtype index:req
.byte 0x48
.2byte \index
@ -534,7 +543,8 @@
.2byte \decoration
.endm
@ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
@ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or
@ FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
.macro checkdecorspace decoration:req
.byte 0x4e
.2byte \decoration
@ -556,7 +566,10 @@
.endif
.endm
@ 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.
@ 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.
@ If no map is specified, then the current map is used.
.macro waitmovement index:req, map
.ifb \map
@ -569,7 +582,9 @@
.endif
.endm
@ 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.
@ 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.
@ If no map is specified, then the current map is used.
.macro removeobject index:req, map
.ifb \map
@ -582,7 +597,8 @@
.endif
.endm
@ 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.
@ 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.
@ If no map is specified, then the current map is used.
.macro addobject index:req, map
.ifb \map
@ -723,7 +739,8 @@
.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.
@ 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 trainerbattlebegin
.byte 0x5d
.endm
@ -763,7 +780,8 @@
.2byte \y
.endm
@ Copies a live object event's xy position to its template, so that if the sprite goes off screen, it'll still be there when it comes back on screen.
@ Copies a live object event's xy position to its template, so that if the sprite goes off screen,
@ it'll still be there when it comes back on screen.
.macro copyobjectxytoperm index:req
.byte 0x64
.2byte \index
@ -775,12 +793,15 @@
.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.
@ 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 waitmessage
.byte 0x66
.endm
@ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.)
@ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at
@ that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as
@ a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.)
.macro message text:req
.byte 0x67
.4byte \text
@ -816,14 +837,16 @@
.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 VAR_RESULT as NO (0) or YES (1). Pressing B is equivalent to answering NO
@ 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 VAR_RESULT as NO (0) or YES (1). Pressing B is equivalent to answering NO
.macro yesnobox x:req, y:req
.byte 0x6e
.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 (sMultichoiceLists) 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.
@ 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 (sMultichoiceLists) 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:req, y:req, list:req, b:req
.byte 0x6f
.byte \x
@ -832,7 +855,10 @@
.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 (sMultichoiceLists) 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.
@ 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 (sMultichoiceLists) 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:req, y:req, list:req, default:req, b:req
.byte 0x70
.byte \x
@ -842,7 +868,9 @@
.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 (sMultichoiceLists) 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.
@ 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 (sMultichoiceLists) 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 multichoicegrid x:req, y:req, list:req, per_row:req, B:req
.byte 0x71
.byte \x
@ -894,7 +922,9 @@
.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 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).
@ 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:req
.byte 0x78
.4byte \text
@ -923,7 +953,9 @@
.2byte \move
.endm
@ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE. VAR_0x8004 is also set to this Pokemon's species.
@ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the
@ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE.
@ VAR_0x8004 is also set to this Pokemon's species.
.macro checkpartymove index:req
.byte 0x7c
.2byte \index
@ -942,14 +974,16 @@
.byte \out
.endm
@ 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.
@ 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:req, slot:req
.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.
@ 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 bufferitemname out:req, item:req
.byte 0x80
.byte \out
@ -977,7 +1011,8 @@
.2byte \input
.endm
@ 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.
@ 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 crashes or garbage characters.
.macro bufferstdstring out:req, index:req
.byte 0x84
.byte \out
@ -1063,7 +1098,8 @@
.byte \check
.endm
@ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not.
@ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player
@ has enough money, or FALSE if they do not.
.macro checkmoney value:req, check:req
.byte 0x92
.4byte \value
@ -1291,7 +1327,8 @@
.2byte \count
.endm
@ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect normal wild battles. You start the prepared battle with dowildbattle.
@ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect
@ normal wild battles. You start the prepared battle with dowildbattle.
.macro setwildbattle species:req, level:req, item:req
.byte 0xb6
.2byte \species
@ -1395,19 +1432,22 @@
.2byte \box
.endm
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
@ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
.macro textcolor color:req
.byte 0xc7
.byte \color
.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.
@ 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 loadhelp pointer:req
.byte 0xc8
.4byte \pointer
.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.
@ 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
.byte 0xc9
.endm
@ -1435,13 +1475,15 @@
.2byte \slot
.endm
@ Checks if the Pokemon in the specified slot of the player's party is obedient. If the Pokemon is disobedient, VAR_RESULT is TRUE. If the Pokemon is obedient (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
@ Checks if the Pokemon in the specified slot of the player's party is obedient. If the Pokemon is disobedient,
@ VAR_RESULT is TRUE. If the Pokemon is obedient (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
.macro checkmonobedience slot:req
.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 0x020375C0.
@ 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 gotoram
.byte 0xcf
.endm
@ -1468,7 +1510,8 @@
.byte \location
.endm
@ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle specified by puzzleNumber one rotation
@ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle
@ specified by puzzleNumber one rotation
.macro moverotatingtileobjects puzzleNumber:req
.byte 0xd3
.2byte \puzzleNumber
@ -1479,7 +1522,9 @@
.byte 0xd4
.endm
@ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects. isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset the puzzle tiles start. In FireRed, this command is a nop.
@ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects.
@ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset
@ the puzzle tiles start. In FireRed, this command is a nop.
.macro initrotatingtilepuzzle isTrickHouse:req
.byte 0xd5
.2byte \isTrickHouse
@ -1551,7 +1596,10 @@
.2byte \word
.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.
@ 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:req, item:req, quantity:req
.byte 0xe2
.byte \out

View File

@ -3,15 +3,15 @@ gLinkDebugSeed
gLocalLinkPlayerBlock
gLinkErrorOccurred
gLinkDebugFlags
gFiller_03003074
gLinkFiller1
gRemoteLinkPlayersNotReceived
gBlockReceivedStatus
gFiller_03003080
gLinkFiller2
gLinkHeldKeys
gRecvCmds
gLinkStatus
gUnknown_030030E4
gUnknown_030030E8
gLinkDummy1
gLinkDummy2
gUnknown_030030EC
gUnknown_030030F0
gUnknown_030030F4
@ -26,12 +26,10 @@ gLinkCallback
gShouldAdvanceLinkState
gLinkTestBlockChecksums
gBlockRequestType
gFiller_03003154
gFiller_03003158
gFiller_0300315c
gLinkFiller3
gLinkFiller4
gLinkFiller5
gLastSendQueueCount
gLink
gLastRecvQueueCount
gLinkSavedIme
gFiller_03004138
gFiller_0300413C

View File

@ -172,7 +172,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney:: @ 824BF62
BattleFrontier_BattleDomeBattleRoom_EventScript_WonLvOpenTourney:: @ 824BF96
msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerIsLvOpenChamp, MSGBOX_DEFAULT
BattleFrontier_BattleDomeBattleRoom_EventScript_CelebrateWin:: @ 824BF9E
special DoConfettiEffect
special DoDomeConfetti
playse SE_W227B
call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround
delay 60

View File

@ -45,7 +45,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter:: @ 8241BC3
BattleFrontier_BattleTower_EventScript_WarpToLobbyLost:: @ 8241C03
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8004, 3
setvar VAR_0x8004, FANCOUNTER_USED_BATTLE_TOWER
special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby
@ -134,7 +134,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_ContinueChallenge:: @ 8241DDC
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon:: @ 8241DF6
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8004, 3
setvar VAR_0x8004, FANCOUNTER_USED_BATTLE_TOWER
special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby

View File

@ -786,19 +786,19 @@ BattleFrontier_BattleTowerLobby_EventScript_TryCableLink:: @ 823F2C5
setvar VAR_0x8005, 0
special TryBattleLinkup
waitstate
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful
compare VAR_RESULT, 2
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections
compare VAR_RESULT, 4
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq CableClub_EventScript_AbortLinkConnectionError
compare VAR_RESULT, 11
compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink
end
@ -853,7 +853,7 @@ BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful:: @ 823F3AF
message BattleFrontier_BattleTowerLobby_Text_SaveGameBeforeShowingIn
waitmessage
tower_save CHALLENGE_STATUS_SAVING
special sub_80A08CC
special SaveForBattleTowerLink
waitstate
playse SE_SAVE
waitse
@ -884,26 +884,26 @@ BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader:: @ 823F3F3
BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader:: @ 823F430
call CableClub_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader
compare VAR_RESULT, 11
compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink
release
return
BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup:: @ 823F463
call CableClub_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup
compare VAR_RESULT, 11
compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink
release
return
@ -914,7 +914,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful:: @ 823F496
message BattleFrontier_BattleTowerLobby_Text_SaveGameBeforeShowingIn
waitmessage
tower_save CHALLENGE_STATUS_SAVING
special sub_80A08CC
special SaveForBattleTowerLink
waitstate
playse SE_SAVE
waitse

View File

@ -103,7 +103,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoTowerBattle:: @ 8249069
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost:: @ 824907E
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8004, 3
setvar VAR_0x8004, FANCOUNTER_USED_BATTLE_TOWER
special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby
@ -208,7 +208,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge:: @ 8249
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyWon:: @ 82492AF
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
tower_set TOWER_DATA_LVL_MODE
setvar VAR_0x8004, 3
setvar VAR_0x8004, FANCOUNTER_USED_BATTLE_TOWER
special Script_TryGainNewFanFromCounter
goto BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby

View File

@ -54,7 +54,7 @@ EverGrandeCity_DrakesRoom_EventScript_PostBattleSpeech:: @ 822871A
end
EverGrandeCity_DrakesRoom_EventScript_Defeated:: @ 8228724
setvar VAR_0x8004, 0
setvar VAR_0x8004, FANCOUNTER_DEFEATED_DRAKE
special Script_TryGainNewFanFromCounter
setflag FLAG_DEFEATED_ELITE_4_DRAKE
call PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles

View File

@ -43,7 +43,7 @@ LilycoveCity_ContestLobby_EventScript_ContestArtist:: @ 821A264
msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 0
showcontestwinner CONTEST_WINNER_ARTIST
lockall
msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO
compare VAR_RESULT, YES
@ -217,7 +217,7 @@ LilycoveCity_ContestLobby_EventScript_LinkContestArtist:: @ 821A436
msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 0
showcontestwinner CONTEST_WINNER_ARTIST
msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink
@ -505,42 +505,42 @@ LilycoveCity_ContestLobby_EventScript_NinjaBoy:: @ 821A735
LilycoveCity_ContestLobby_EventScript_ContestWinner1:: @ 821A73E
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 1
showcontestwinner CONTEST_WINNER_HALL_1
releaseall
end
LilycoveCity_ContestLobby_EventScript_ContestWinner2:: @ 821A745
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 2
showcontestwinner CONTEST_WINNER_HALL_2
releaseall
end
LilycoveCity_ContestLobby_EventScript_ContestWinner3:: @ 821A74C
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 3
showcontestwinner CONTEST_WINNER_HALL_3
releaseall
end
LilycoveCity_ContestLobby_EventScript_ContestWinner4:: @ 821A753
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 4
showcontestwinner CONTEST_WINNER_HALL_4
releaseall
end
LilycoveCity_ContestLobby_EventScript_ContestWinner5:: @ 821A75A
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 5
showcontestwinner CONTEST_WINNER_HALL_5
releaseall
end
LilycoveCity_ContestLobby_EventScript_ContestWinner6:: @ 821A761
lockall
fadescreen FADE_TO_BLACK
showcontestwinner 6
showcontestwinner CONTEST_WINNER_HALL_6
releaseall
end
@ -767,15 +767,15 @@ LilycoveCity_ContestLobby_EventScript_TrySetUpLinkContest:: @ 821AA15
call_if_eq LilycoveCity_ContestLobby_EventScript_TryLinkGMode
compare VAR_TEMP_C, 2
goto_if_ge LilycoveCity_ContestLobby_EventScript_CancelLinkContest
compare VAR_RESULT, 4
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkError
compare VAR_RESULT, 10
compare VAR_RESULT, LINKUP_FAILED_CONTEST_GMODE
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkModeDifference
message3 LilycoveCity_ContestLobby_Text_Transmitting
contestlinktransfer
@ -889,22 +889,22 @@ LilycoveCity_ContestLobby_EventScript_DecideLinkLeader:: @ 821ABA6
LilycoveCity_ContestLobby_EventScript_TryLeadGroup:: @ 821ABE3
call LilycoveCity_ContestLobby_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq LilycoveCity_ContestLobby_EventScript_TryLeadGroup
release
end
LilycoveCity_ContestLobby_EventScript_TryJoinGroup:: @ 821AC0B
call LilycoveCity_ContestLobby_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq LilycoveCity_ContestLobby_EventScript_TryJoinGroup
release
end

View File

@ -183,35 +183,35 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_RichBoy:: @ 821999C
LilycoveCity_LilycoveMuseum_2F_EventScript_ShowCoolPainting:: @ 82199A5
msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN
fadescreen FADE_TO_BLACK
showcontestwinner 9
showcontestwinner CONTEST_WINNER_MUSEUM_COOL
releaseall
end
LilycoveCity_LilycoveMuseum_2F_EventScript_ShowBeautyPainting:: @ 82199B3
msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN
fadescreen FADE_TO_BLACK
showcontestwinner 10
showcontestwinner CONTEST_WINNER_MUSEUM_BEAUTY
releaseall
end
LilycoveCity_LilycoveMuseum_2F_EventScript_ShowCutePainting:: @ 82199C1
msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN
fadescreen FADE_TO_BLACK
showcontestwinner 11
showcontestwinner CONTEST_WINNER_MUSEUM_CUTE
releaseall
end
LilycoveCity_LilycoveMuseum_2F_EventScript_ShowSmartPainting:: @ 82199CF
msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN
fadescreen FADE_TO_BLACK
showcontestwinner 12
showcontestwinner CONTEST_WINNER_MUSEUM_SMART
releaseall
end
LilycoveCity_LilycoveMuseum_2F_EventScript_ShowToughPainting:: @ 82199DD
msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN
fadescreen FADE_TO_BLACK
showcontestwinner 13
showcontestwinner CONTEST_WINNER_MUSEUM_TOUGH
releaseall
end

View File

@ -20,7 +20,7 @@ UnionRoom_OnResume: @ 823D1B1
removeobject 5
removeobject 4
removeobject 3
special UnionRoomSpecial
special RunUnionRoom
end
UnionRoom_OnTransition: @ 823D1E5
@ -29,7 +29,7 @@ UnionRoom_OnTransition: @ 823D1E5
UnionRoom_EventScript_Player1:: @ 823D1E6
lock
faceplayer
setvar VAR_RESULT, 1
setvar VAR_RESULT, UR_INTERACT_PLAYER_1
waitstate
release
end
@ -37,7 +37,7 @@ UnionRoom_EventScript_Player1:: @ 823D1E6
UnionRoom_EventScript_Player2:: @ 823D1F0
lock
faceplayer
setvar VAR_RESULT, 2
setvar VAR_RESULT, UR_INTERACT_PLAYER_2
waitstate
release
end
@ -45,7 +45,7 @@ UnionRoom_EventScript_Player2:: @ 823D1F0
UnionRoom_EventScript_Player3:: @ 823D1FA
lock
faceplayer
setvar VAR_RESULT, 3
setvar VAR_RESULT, UR_INTERACT_PLAYER_3
waitstate
release
end
@ -53,7 +53,7 @@ UnionRoom_EventScript_Player3:: @ 823D1FA
UnionRoom_EventScript_Player4:: @ 823D204
lock
faceplayer
setvar VAR_RESULT, 4
setvar VAR_RESULT, UR_INTERACT_PLAYER_4
waitstate
release
end
@ -61,7 +61,7 @@ UnionRoom_EventScript_Player4:: @ 823D204
UnionRoom_EventScript_Player5:: @ 823D20E
lock
faceplayer
setvar VAR_RESULT, 5
setvar VAR_RESULT, UR_INTERACT_PLAYER_5
waitstate
release
end
@ -69,7 +69,7 @@ UnionRoom_EventScript_Player5:: @ 823D20E
UnionRoom_EventScript_Player6:: @ 823D218
lock
faceplayer
setvar VAR_RESULT, 6
setvar VAR_RESULT, UR_INTERACT_PLAYER_6
waitstate
release
end
@ -77,7 +77,7 @@ UnionRoom_EventScript_Player6:: @ 823D218
UnionRoom_EventScript_Player7:: @ 823D222
lock
faceplayer
setvar VAR_RESULT, 7
setvar VAR_RESULT, UR_INTERACT_PLAYER_7
waitstate
release
end
@ -85,7 +85,7 @@ UnionRoom_EventScript_Player7:: @ 823D222
UnionRoom_EventScript_Player8:: @ 823D22C
lock
faceplayer
setvar VAR_RESULT, 8
setvar VAR_RESULT, UR_INTERACT_PLAYER_8
waitstate
release
end
@ -93,14 +93,14 @@ UnionRoom_EventScript_Player8:: @ 823D22C
UnionRoom_EventScript_Attendant:: @ 823D236
lock
faceplayer
setvar VAR_RESULT, 9
setvar VAR_RESULT, UR_INTERACT_ATTENDANT
waitstate
release
end
UnionRoom_EventScript_Unused:: @ 823D240
lockall
setvar VAR_RESULT, 10
setvar VAR_RESULT, UR_INTERACT_UNUSED
waitstate
releaseall
end

View File

@ -600,15 +600,15 @@ BerryBlender_EventScript_TryDoLinkBlender: @ 82940BB
waitmessage
special TryBerryBlenderLinkup
waitstate
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BerryBlender_EventScript_SpawnLinkPartners
compare VAR_RESULT, 2
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
goto_if_eq BerryBlender_EventScript_CloseLinkNotReady
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq BerryBlender_EventScript_CloseLinkDifferentSelections
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BerryBlender_EventScript_CloseLink
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq BerryBlender_EventScript_LinkError
end
@ -712,22 +712,22 @@ BerryBlender_EventScript_DecideLinkLeader: @ 82941F8
BerryBlender_EventScript_TryLeadGroup: @ 8294235
call BerryBlender_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BerryBlender_EventScript_LinkLeaderDecided
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BerryBlender_EventScript_DecideLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq BerryBlender_EventScript_TryLeadGroup
release
end
BerryBlender_EventScript_TryJoinGroup: @ 829425D
call BerryBlender_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq BerryBlender_EventScript_LinkLeaderDecided
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq BerryBlender_EventScript_DecideLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq BerryBlender_EventScript_TryJoinGroup
release
end

View File

@ -349,17 +349,17 @@ CableClub_EventScript_TryEnterColosseum:: @ 8276F60
waitmessage
special TryBattleLinkup
waitstate
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterColosseum
compare VAR_RESULT, 2
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections
compare VAR_RESULT, 4
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_AbortLink
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq CableClub_EventScript_AbortLinkConnectionError
end
@ -452,21 +452,21 @@ CableClub_EventScript_TradeCenter:: @ 82770B2
waitmessage
special TryTradeLinkup
waitstate
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterTradeCenter
compare VAR_RESULT, 2
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections
compare VAR_RESULT, 4
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_AbortLink
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq CableClub_EventScript_AbortLinkConnectionError
compare VAR_RESULT, 7
compare VAR_RESULT, LINKUP_PLAYER_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkPlayerNotReady
compare VAR_RESULT, 9
compare VAR_RESULT, LINKUP_PARTNER_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkOtherTrainerNotReady
end
@ -527,21 +527,21 @@ CableClub_EventScript_RecordCorner:: @ 82771DB
waitmessage
special TryRecordMixLinkup
waitstate
special sub_80B2EA8
special ValidateMixingGameLanguage
waitstate
compare VAR_RESULT, 12
compare VAR_RESULT, LINKUP_FOREIGN_GAME
goto_if_eq CableClub_EventScript_AbortLinkForeignGame
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterRecordCorner
compare VAR_RESULT, 2
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady
compare VAR_RESULT, 3
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections
compare VAR_RESULT, 4
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_AbortLink
compare VAR_RESULT, 6
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
goto_if_eq CableClub_EventScript_AbortLinkConnectionError
end
@ -972,7 +972,7 @@ CableClub_EventScript_EnterUnionRoom:: @ 827759F
special SetCableClubWarp
warpteleport2 MAP_UNION_ROOM, 255, 7, 11
waitstate
special UnionRoomSpecial
special RunUnionRoom
waitstate
end
@ -1181,22 +1181,22 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: @ 8277989
CableClub_EventScript_TryLeadGroup2Players:: @ 82779C6
call CableClub_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryLeadGroup2Players
release
return
CableClub_EventScript_TryJoinGroup2Players:: @ 82779EE
call CableClub_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryJoinGroup2Players
release
return
@ -1214,22 +1214,22 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: @ 8277A16
CableClub_EventScript_TryLeadGroup4Players:: @ 8277A53
call CableClub_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryLeadGroup4Players
release
return
CableClub_EventScript_TryJoinGroup4Players:: @ 8277A7B
call CableClub_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryJoinGroup4Players
release
return
@ -1247,22 +1247,22 @@ CableClub_EventScript_ChooseLinkLeader:: @ 8277AA3
CableClub_EventScript_TryLeadGroupXPlayers:: @ 8277AE0
call CableClub_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers
release
return
CableClub_EventScript_TryJoinGroupXPlayers:: @ 8277B08
call CableClub_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq CableClub_EventScript_ChooseLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers
release
return
@ -1310,7 +1310,7 @@ EventScript_WirelessBoxResults:: @ 8277B8A
compare VAR_RESULT, FALSE
goto_if_eq CableClub_EventScript_AdapterNotConnected
fadescreen FADE_TO_BLACK
special sub_801A42C
special ShowWirelessCommunicationScreen
waitstate
msgbox CableClub_Text_ParticipantsStepUpToCounter, MSGBOX_DEFAULT
releaseall
@ -1453,22 +1453,22 @@ MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader:: @ 8277D81
MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader:: @ 8277DBE
call CableClub_EventScript_TryBecomeLinkLeader
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader
release
return
MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup:: @ 8277DE6
call CableClub_EventScript_TryJoinLinkGroup
compare VAR_RESULT, 1
compare VAR_RESULT, LINKUP_SUCCESS
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom
compare VAR_RESULT, 5
compare VAR_RESULT, LINKUP_FAILED
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader
compare VAR_RESULT, 8
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup
release
return

View File

@ -39,7 +39,7 @@ gSpecials:: @ 81DBA64
def_special TryBattleLinkup
def_special TryTradeLinkup
def_special TryRecordMixLinkup
def_special sub_80B2EA8
def_special ValidateMixingGameLanguage
def_special CloseLink
def_special ColosseumPlayerSpotTriggered
def_special PlayerEnteredTradeSeat
@ -426,8 +426,8 @@ gSpecials:: @ 81DBA64
def_special IsWirelessAdapterConnected
def_special TryBecomeLinkLeader
def_special TryJoinLinkGroup
def_special UnionRoomSpecial
def_special sub_801A42C
def_special RunUnionRoom
def_special ShowWirelessCommunicationScreen
def_special InitUnionRoom
def_special BufferUnionRoomPlayerName
def_special sub_801DC20
@ -498,11 +498,11 @@ gSpecials:: @ 81DBA64
def_special GetPCBoxToSendMon
def_special ShouldShowBoxWasFullMessage
def_special SetMatchCallRegisteredFlag
def_special DoConfettiEffect
def_special DoDomeConfetti
def_special CreateAbnormalWeatherEvent
def_special GetAbnormalWeatherMapNameAndType
def_special GetMartEmployeeObjectEventId
def_special sub_80A08CC
def_special SaveForBattleTowerLink
def_special Unused_SetWeatherSunny
def_special SetUnlockedPokedexFlags
def_special IsTrainerRegistered

View File

@ -1,95 +1,183 @@
#ifndef GUARD_TEXT_H
#define GUARD_TEXT_H
#define CHAR_SPACE 0x00
#define CHAR_PLUS 0x2E
#define CHAR_0 0xA1
#define CHAR_1 0xA2
#define CHAR_2 0xA3
#define CHAR_3 0xA4
#define CHAR_4 0xA5
#define CHAR_5 0xA6
#define CHAR_6 0xA7
#define CHAR_7 0xA8
#define CHAR_8 0xA9
#define CHAR_9 0xAA
#define CHAR_EXCL_MARK 0xAB
#define CHAR_QUESTION_MARK 0xAC
#define CHAR_PERIOD 0xAD
#define CHAR_HYPHEN 0xAE
#define CHAR_ELLIPSIS 0xB0
#define CHAR_DBL_QUOT_LEFT 0xB1
#define CHAR_DBL_QUOT_RIGHT 0xB2
#define CHAR_SGL_QUOT_LEFT 0xB3
#define CHAR_SGL_QUOT_RIGHT 0xB4
#define CHAR_MALE 0xB5
#define CHAR_FEMALE 0xB6
#define CHAR_CURRENCY 0xB7
#define CHAR_COMMA 0xB8
#define CHAR_MULT_SIGN 0xB9
#define CHAR_SLASH 0xBA
#define CHAR_A 0xBB
#define CHAR_B 0xBC
#define CHAR_C 0xBD
#define CHAR_D 0xBE
#define CHAR_E 0xBF
#define CHAR_F 0xC0
#define CHAR_G 0xC1
#define CHAR_H 0xC2
#define CHAR_I 0xC3
#define CHAR_J 0xC4
#define CHAR_K 0xC5
#define CHAR_L 0xC6
#define CHAR_M 0xC7
#define CHAR_N 0xC8
#define CHAR_O 0xC9
#define CHAR_P 0xCA
#define CHAR_Q 0xCB
#define CHAR_R 0xCC
#define CHAR_S 0xCD
#define CHAR_T 0xCE
#define CHAR_U 0xCF
#define CHAR_V 0xD0
#define CHAR_W 0xD1
#define CHAR_X 0xD2
#define CHAR_Y 0xD3
#define CHAR_Z 0xD4
#define CHAR_a 0xD5
#define CHAR_b 0xD6
#define CHAR_c 0xD7
#define CHAR_d 0xD8
#define CHAR_e 0xD9
#define CHAR_f 0xDA
#define CHAR_g 0xDB
#define CHAR_h 0xDC
#define CHAR_i 0xDD
#define CHAR_j 0xDE
#define CHAR_k 0xDF
#define CHAR_l 0xE0
#define CHAR_m 0xE1
#define CHAR_n 0xE2
#define CHAR_o 0xE3
#define CHAR_p 0xE4
#define CHAR_q 0xE5
#define CHAR_r 0xE6
#define CHAR_s 0xE7
#define CHAR_t 0xE8
#define CHAR_u 0xE9
#define CHAR_v 0xEA
#define CHAR_w 0xEB
#define CHAR_x 0xEC
#define CHAR_y 0xED
#define CHAR_z 0xEE
#define CHAR_SPECIAL_F7 0xF7
#define CHAR_SPECIAL_F8 0xF8
#define CHAR_SPECIAL_F9 0xF9
#define CHAR_COLON 0xF0
#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
#define PLACEHOLDER_BEGIN 0xFD // string placeholder
#define CHAR_NEWLINE 0xFE
#define EOS 0xFF // end of string
#define CHAR_SPACE 0x00
#define CHAR_A_GRAVE 0x01
#define CHAR_A_ACUTE 0x02
#define CHAR_A_CIRCUMFLEX 0x03
#define CHAR_C_CEDILLA 0x04
#define CHAR_E_GRAVE 0x05
#define CHAR_E_ACUTE 0x06
#define CHAR_E_CIRCUMFLEX 0x07
#define CHAR_E_DIAERESIS 0x08
#define CHAR_I_GRAVE 0x09
//#define CHAR_I_ACUTE 0x0A // Is 0x5A instead
#define CHAR_I_CIRCUMFLEX 0x0B
#define CHAR_I_DIAERESIS 0x0C
#define CHAR_O_GRAVE 0x0D
#define CHAR_O_ACUTE 0x0E
#define CHAR_O_CIRCUMFLEX 0x0F
#define CHAR_OE 0x10
#define CHAR_U_GRAVE 0x11
#define CHAR_U_ACUTE 0x12
#define CHAR_U_CIRCUMFLEX 0x13
#define CHAR_N_TILDE 0x14
#define CHAR_ESZETT 0x15
#define CHAR_a_GRAVE 0x16
#define CHAR_a_ACUTE 0x17
//#define CHAR_a_CIRCUMFLEX 0x18 // Is 0x68 instead
#define CHAR_c_CEDILLA 0x19
#define CHAR_e_GRAVE 0x1A
#define CHAR_e_ACUTE 0x1B
#define CHAR_e_CIRCUMFLEX 0x1C
#define CHAR_e_DIAERESIS 0x1D
#define CHAR_i_GRAVE 0x1E
//#define CHAR_i_ACUTE 0x1F // Is 0x6F instead
#define CHAR_i_CIRCUMFLEX 0x20
#define CHAR_i_DIAERESIS 0x21
#define CHAR_o_GRAVE 0x22
#define CHAR_o_ACUTE 0x23
#define CHAR_o_CIRCUMFLEX 0x24
#define CHAR_oe 0x25
#define CHAR_u_GRAVE 0x26
#define CHAR_u_ACUTE 0x27
#define CHAR_u_CIRCUMFLEX 0x28
#define CHAR_n_TILDE 0x29
#define CHAR_MASCULINE_ORDINAL 0x2A
#define CHAR_FEMININE_ORDINAL 0x2B
#define CHAR_SUPER_ER 0x2C
#define CHAR_AMPERSAND 0x2D
#define CHAR_PLUS 0x2E
//
#define CHAR_LV 0x34
#define CHAR_EQUALS 0x35
#define CHAR_SEMICOLON 0x36
//
#define CHAR_INV_QUESTION_MARK 0x51
#define CHAR_INV_EXCL_MARK 0x52
#define CHAR_PK 0x53
#define CHAR_MN 0x54
#define CHAR_PO 0x55
#define CHAR_KE 0x56
#define CHAR_BLOCK_1 0x57 // Each of these 3
#define CHAR_BLOCK_2 0x58 // chars contains 1/3
#define CHAR_BLOCK_3 0x59 // of the word BLOCK
#define CHAR_I_ACUTE 0x5A
#define CHAR_PERCENT 0x5B
#define CHAR_LEFT_PAREN 0x5C
#define CHAR_RIGHT_PAREN 0x5D
//
#define CHAR_a_CIRCUMFLEX 0x68
//
#define CHAR_i_ACUTE 0x6F
//
#define CHAR_UNK_SPACER 0x77
//
#define CHAR_UP_ARROW 0x79
#define CHAR_DOWN_ARROW 0x7A
#define CHAR_LEFT_ARROW 0x7B
#define CHAR_RIGHT_ARROW 0x7C
//
#define CHAR_SUPER_E 0x84
#define CHAR_LESS_THAN 0x85
#define CHAR_GREATER_THAN 0x86
//
#define CHAR_SUPER_RE 0xA0
#define CHAR_0 0xA1
#define CHAR_1 0xA2
#define CHAR_2 0xA3
#define CHAR_3 0xA4
#define CHAR_4 0xA5
#define CHAR_5 0xA6
#define CHAR_6 0xA7
#define CHAR_7 0xA8
#define CHAR_8 0xA9
#define CHAR_9 0xAA
#define CHAR_EXCL_MARK 0xAB
#define CHAR_QUESTION_MARK 0xAC
#define CHAR_PERIOD 0xAD
#define CHAR_HYPHEN 0xAE
#define CHAR_BULLET 0xAF
#define CHAR_ELLIPSIS 0xB0
#define CHAR_DBL_QUOT_LEFT 0xB1
#define CHAR_DBL_QUOT_RIGHT 0xB2
#define CHAR_SGL_QUOT_LEFT 0xB3
#define CHAR_SGL_QUOT_RIGHT 0xB4
#define CHAR_MALE 0xB5
#define CHAR_FEMALE 0xB6
#define CHAR_CURRENCY 0xB7
#define CHAR_COMMA 0xB8
#define CHAR_MULT_SIGN 0xB9
#define CHAR_SLASH 0xBA
#define CHAR_A 0xBB
#define CHAR_B 0xBC
#define CHAR_C 0xBD
#define CHAR_D 0xBE
#define CHAR_E 0xBF
#define CHAR_F 0xC0
#define CHAR_G 0xC1
#define CHAR_H 0xC2
#define CHAR_I 0xC3
#define CHAR_J 0xC4
#define CHAR_K 0xC5
#define CHAR_L 0xC6
#define CHAR_M 0xC7
#define CHAR_N 0xC8
#define CHAR_O 0xC9
#define CHAR_P 0xCA
#define CHAR_Q 0xCB
#define CHAR_R 0xCC
#define CHAR_S 0xCD
#define CHAR_T 0xCE
#define CHAR_U 0xCF
#define CHAR_V 0xD0
#define CHAR_W 0xD1
#define CHAR_X 0xD2
#define CHAR_Y 0xD3
#define CHAR_Z 0xD4
#define CHAR_a 0xD5
#define CHAR_b 0xD6
#define CHAR_c 0xD7
#define CHAR_d 0xD8
#define CHAR_e 0xD9
#define CHAR_f 0xDA
#define CHAR_g 0xDB
#define CHAR_h 0xDC
#define CHAR_i 0xDD
#define CHAR_j 0xDE
#define CHAR_k 0xDF
#define CHAR_l 0xE0
#define CHAR_m 0xE1
#define CHAR_n 0xE2
#define CHAR_o 0xE3
#define CHAR_p 0xE4
#define CHAR_q 0xE5
#define CHAR_r 0xE6
#define CHAR_s 0xE7
#define CHAR_t 0xE8
#define CHAR_u 0xE9
#define CHAR_v 0xEA
#define CHAR_w 0xEB
#define CHAR_x 0xEC
#define CHAR_y 0xED
#define CHAR_z 0xEE
#define CHAR_BLACK_TRIANGLE 0xEF
#define CHAR_COLON 0xF0
#define CHAR_A_DIAERESIS 0xF1
#define CHAR_O_DIAERESIS 0xF2
#define CHAR_U_DIAERESIS 0xF3
#define CHAR_a_DIAERESIS 0xF4
#define CHAR_o_DIAERESIS 0xF5
#define CHAR_u_DIAERESIS 0xF6
#define CHAR_SPECIAL_F7 0xF7
#define CHAR_SPECIAL_F8 0xF8
#define CHAR_SPECIAL_F9 0xF9
#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
#define PLACEHOLDER_BEGIN 0xFD // string placeholder
#define CHAR_NEWLINE 0xFE
#define EOS 0xFF // end of string
// Special F9 chars
#define CHAR_UP_ARROW_2 0x00

View File

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

View File

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 189 B

View File

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

View File

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

View File

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

View File

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 157 B

View File

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

View File

@ -489,7 +489,7 @@ $(ROULETTEGFXDIR)/poke_icons2.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \
$(ROULETTEGFXDIR)/makuhita.4bpp
@cat $^ >$@
$(BATTRANSGFXDIR)/85BBC14.4bpp: %.4bpp: %.png
$(BATTRANSGFXDIR)/regis.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 53
$(BATTRANSGFXDIR)/rayquaza.4bpp: %.4bpp: %.png

View File

@ -7,7 +7,7 @@ void BattleTransition_Start(u8 transitionId);
bool8 IsBattleTransitionDone(void);
bool8 FldEff_Pokeball(void);
void TransitionPhase1_Task_RunFuncs(u8 taskId);
void sub_8149F58(u16 **a0, u16 **a1);
void GetBg0TilesDst(u16 **tilemap, u16 **tileset);
extern const struct SpritePalette gFieldEffectObjectPaletteInfo10;

View File

@ -3,6 +3,6 @@
#include "main.h"
void sub_8020C70(MainCallback callback);
void StartBerryCrush(MainCallback callback);
#endif // GUARD_BERRY_CRUSH_H

View File

@ -3,18 +3,12 @@
#include "task.h"
// Exported type declarations
// Exported RAM declarations
// Exported ROM declarations
void sub_80B37D4(TaskFunc taskFunc);
u8 sub_80B3050(void);
void sub_80B360C(void);
bool32 sub_80B2AF4(u16 *arg0, u16 *arg1);
void CreateTask_EnterCableClubSeat(TaskFunc taskFunc);
u8 CreateTask_ReestablishCableClubLink(void);
void CB2_ReturnFromCableClubBattle(void);
bool32 AreBattleTowerLinkSpeciesSame(u16 *speciesList1, u16 *speciesList2);
void sub_80B3AF8(u8 taskId);
void task00_08081A90(u8 taskId);
void Task_WaitForLinkPlayerConnection(u8 taskId);
bool32 GetLinkTrainerCardColor(u8 linkPlayerIndex);
#endif //GUARD_CABLE_CLUB_H

33
include/confetti_util.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef GUARD_CONFETTI_UTIL_H
#define GUARD_CONFETTI_UTIL_H
struct ConfettiUtil
{
struct OamData oam;
s16 x;
s16 y;
s16 xDelta;
s16 yDelta;
u16 tileTag;
u16 palTag;
u16 tileNum;
u8 id;
u8 filler;
u8 animNum;
u8 active:1;
u8 allowUpdates:1;
u8 dummied:1;
u8 priority:2;
s16 data[8];
void (*callback)(struct ConfettiUtil *);
};
bool32 ConfettiUtil_Init(u8 count);
bool32 ConfettiUtil_Free(void);
bool32 ConfettiUtil_Update(void);
u8 ConfettiUtil_SetCallback(u8 id, void (*func)(struct ConfettiUtil *));
u8 ConfettiUtil_SetData(u8 id, u8 dataArrayId, s16 dataValue);
u8 ConfettiUtil_AddNew(const struct OamData *oam, u16 tileTag, u16 palTag, s16 x, s16 y, u8 animNum, u8 priority);
u8 ConfettiUtil_Remove(u8 id);
#endif // GUARD_CONFETTI_UTIL_H

View File

@ -26,4 +26,12 @@
#define UNITS_METRIC
#endif
// Various undefined behavior bugs may or may not prevent compilation with
// newer compilers. So always fix them when using a modern compiler.
#if MODERN
#ifndef UBFIX
#define UBFIX
#endif
#endif
#endif // GUARD_CONFIG_H

View File

@ -12,4 +12,20 @@
#define USING_MINIGAME 8
#define USING_BATTLE_TOWER 9
// Return states for the group of specials that use CreateLinkupTask
// A few also used by TryBecomeLinkLeader and TryJoinLinkGroup
#define LINKUP_ONGOING 0
#define LINKUP_SUCCESS 1
#define LINKUP_SOMEONE_NOT_READY 2
#define LINKUP_DIFF_SELECTIONS 3
#define LINKUP_WRONG_NUM_PLAYERS 4
#define LINKUP_FAILED 5
#define LINKUP_CONNECTION_ERROR 6
#define LINKUP_PLAYER_NOT_READY 7
#define LINKUP_RETRY_ROLE_ASSIGN 8
#define LINKUP_PARTNER_NOT_READY 9
#define LINKUP_FAILED_CONTEST_GMODE 10
#define LINKUP_FAILED_BATTLE_TOWER 11
#define LINKUP_FOREIGN_GAME 12
#endif //GUARD_CONSTANTS_CABLE_CLUB_H

View File

@ -29,6 +29,23 @@
#define CONTEST_CATEGORY_TOUGH 4
#define CONTEST_CATEGORIES_COUNT 5
#define CONTEST_WINNER_ARTIST 0 // Winner shown by the artist, painting not necessarily saved
#define CONTEST_WINNER_HALL_1 1
#define CONTEST_WINNER_HALL_2 2
#define CONTEST_WINNER_HALL_3 3
#define CONTEST_WINNER_HALL_4 4
#define CONTEST_WINNER_HALL_5 5
#define CONTEST_WINNER_HALL_6 6
#define NUM_CONTEST_HALL_WINNERS 6
#define CONTEST_WINNER_7 7
#define CONTEST_WINNER_8 8
#define CONTEST_WINNER_MUSEUM_COOL 9
#define CONTEST_WINNER_MUSEUM_BEAUTY 10
#define CONTEST_WINNER_MUSEUM_CUTE 11
#define CONTEST_WINNER_MUSEUM_SMART 12
#define CONTEST_WINNER_MUSEUM_TOUGH 13
// NUM_CONTEST_WINNERS in constants/global.h
#define CANT_ENTER_CONTEST 0
#define CAN_ENTER_CONTEST_EQUAL_RANK 1
#define CAN_ENTER_CONTEST_HIGH_RANK 2

View File

@ -75,4 +75,9 @@
#define FANCLUB_MEMBER7 14
#define FANCLUB_MEMBER8 15
#define FANCOUNTER_DEFEATED_DRAKE 0
#define FANCOUNTER_BATTLED_AT_BASE 1
#define FANCOUNTER_FINISHED_CONTEST 2
#define FANCOUNTER_USED_BATTLE_TOWER 3
#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H

View File

@ -52,6 +52,8 @@
#define APPRENTICE_COUNT 4
#define APPRENTICE_MAX_QUESTIONS 9
#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used
#define NUM_CONTEST_WINNERS 13
#define UNION_ROOM_KB_ROW_COUNT 10
#define PYRAMID_BAG_ITEMS_COUNT 10
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.

View File

@ -16,5 +16,9 @@
#define KEYITEMS_POCKET 4
#define POCKETS_COUNT 5
// The TM/HM pocket is the largest pocket, so the maximum amount of items
// in a pocket is its count + 1 for the cancel option
#define MAX_POCKET_ITEMS (BAG_TMHM_COUNT + 1)
#endif // GUARD_ITEM_CONSTANTS_H

View File

@ -13,7 +13,7 @@
#define TRAINER_PLAYER 1023
#define TRAINER_SECRET_BASE 1024
#define TRAINER_LINK_OPPONENT 2048
#define TRAINER_OPPONENT_C00 3072
#define TRAINER_UNION_ROOM 3072
#define TRAINER_STEVEN_PARTNER 3075
#define TRAINER_CUSTOM_PARTNER 3076

View File

@ -1,6 +1,60 @@
#ifndef GUARD_CONSTANTS_UNION_ROOM_H
#define GUARD_CONSTANTS_UNION_ROOM_H
#define MAX_UNION_ROOM_PLAYERS 8
#define UNION_ROOM_SPAWN_NONE 0
#define UNION_ROOM_SPAWN_IN 1
#define UNION_ROOM_SPAWN_OUT 2
#define ACTIVITY_NONE 0
#define ACTIVITY_BATTLE_SINGLE 1
#define ACTIVITY_BATTLE_DOUBLE 2
#define ACTIVITY_BATTLE_MULTI 3
#define ACTIVITY_TRADE 4
#define ACTIVITY_CHAT 5
#define ACTIVITY_WONDER_CARD 6
#define ACTIVITY_WONDER_NEWS 7
#define ACTIVITY_CARD 8
#define ACTIVITY_POKEMON_JUMP 9
#define ACTIVITY_BERRY_CRUSH 10
#define ACTIVITY_BERRY_PICK 11
#define ACTIVITY_SEARCH 12
#define ACTIVITY_SPIN_TRADE 13
#define ACTIVITY_BATTLE_TOWER_OPEN 14
#define ACTIVITY_RECORD_CORNER 15
#define ACTIVITY_BERRY_BLENDER 16
// Player response
#define ACTIVITY_ACCEPT 17
#define ACTIVITY_DECLINE 18
#define ACTIVITY_NPCTALK 19
#define ACTIVITY_PLYRTALK 20
// Duplicate IDs?
#define ACTIVITY_WONDER_CARD2 21
#define ACTIVITY_WONDER_NEWS2 22
#define ACTIVITY_CONTEST_COOL 23
#define ACTIVITY_CONTEST_BEAUTY 24
#define ACTIVITY_CONTEST_CUTE 25
#define ACTIVITY_CONTEST_SMART 26
#define ACTIVITY_CONTEST_TOUGH 27
#define ACTIVITY_BATTLE_TOWER 28
#define ACTIVITY_29 29
#define IN_UNION_ROOM (1 << 6)
// Used in UR_AddTextPrinterParameterized
#define UR_COLOR_DKE_WHT_LTE 0
#define UR_COLOR_RED_WHT_LTR 1
#define UR_COLOR_GRN_WHT_LTG 2
#define UR_COLOR_WHT_WHT_LTE 3
#define UR_COLOR_WHT_DKE_LTE 4
#define UR_COLOR_GRN_DN6_LTB 5
#define UR_COLOR_DN5_DN6_LTB 6
#define LINK_GROUP_SINGLE_BATTLE 0
#define LINK_GROUP_DOUBLE_BATTLE 1
#define LINK_GROUP_MULTI_BATTLE 2
@ -10,8 +64,8 @@
#define LINK_GROUP_BERRY_PICKING 6
#define LINK_GROUP_WONDER_CARD 7
#define LINK_GROUP_WONDER_NEWS 8
#define LINK_GROUP_UNK_9 9
#define LINK_GROUP_UNK_10 10
#define LINK_GROUP_UNION_ROOM_RESUME 9
#define LINK_GROUP_UNION_ROOM_INIT 10
#define LINK_GROUP_UNK_11 11
#define LINK_GROUP_RECORD_CORNER 12
#define LINK_GROUP_BERRY_BLENDER 13
@ -25,4 +79,24 @@
#define LINK_GROUP_BATTLE_TOWER_OPEN 21
#define NUM_LINK_GROUP_TYPES 22
#define UR_TRADE_MATCH 0
#define UR_TRADE_NOTYPE 1
#define UR_TRADE_NOEGG 2
#define UR_TRADE_READY 0
#define UR_TRADE_PLAYER_NOT_READY 1
#define UR_TRADE_PARTNER_NOT_READY 2
#define UR_INTERACT_PLAYER_1 1
#define UR_INTERACT_PLAYER_2 2
#define UR_INTERACT_PLAYER_3 3
#define UR_INTERACT_PLAYER_4 4
#define UR_INTERACT_PLAYER_5 5
#define UR_INTERACT_PLAYER_6 6
#define UR_INTERACT_PLAYER_7 7
#define UR_INTERACT_PLAYER_8 8
#define UR_INTERACT_ATTENDANT 9
#define UR_INTERACT_UNUSED 10
#define UR_INTERACT_START_MENU 11
#endif //GUARD_CONSTANTS_UNION_ROOM_H

View File

@ -452,9 +452,9 @@ struct ContestResources
extern struct ContestPokemon gContestMons[CONTESTANT_COUNT];
extern s16 gContestMonConditions[CONTESTANT_COUNT];
extern s16 gUnknown_02039F08[CONTESTANT_COUNT];
extern s16 gContestMonTotalPoints[CONTESTANT_COUNT];
extern s16 gUnknown_02039F10[CONTESTANT_COUNT];
extern s16 gUnknown_02039F18[CONTESTANT_COUNT];
extern s16 gContestMonRound2Points[CONTESTANT_COUNT];
extern u8 gContestFinalStandings[CONTESTANT_COUNT];
extern u8 gContestMonPartyIndex;
extern u8 gContestPlayerMonIndex;
@ -470,7 +470,6 @@ extern u8 sContestBgCopyFlags;
extern struct ContestWinner gCurContestWinner;
extern u8 gUnknown_02039F5C;
extern u8 gUnknown_02039F5D;
extern u32 gContestRngValue;
// contest.c

View File

@ -1,5 +1,5 @@
#ifndef GUARD_CONTEST_LINK_80FC4F4_H
#define GUARD_CONTEST_LINK_80FC4F4_H
#ifndef GUARD_CONTEST_LINK_H
#define GUARD_CONTEST_LINK_H
void sub_80FCC88(u8);
void sub_80FCC88(u8);
@ -10,4 +10,4 @@ void sub_80FC804(u8);
void sub_80FCE48(u8);
void sub_80FC894(u8);
#endif //GUARD_CONTEST_LINK_80FC4F4_H
#endif //GUARD_CONTEST_LINK_H

View File

@ -1,12 +1,12 @@
#ifndef GUARD_CONTEST_LINK_80F57C4_H
#define GUARD_CONTEST_LINK_80F57C4_H
#ifndef GUARD_CONTEST_UTIL_H
#define GUARD_CONTEST_UTIL_H
void BufferContestantTrainerName(void);
void BufferContestantMonNickname(void);
void StartContest(void);
void BufferContestantMonSpecies(void);
void sub_80F8484(void);
void sub_80F84C4(u8);
void ShowContestResults(void);
void ContestLinkTransfer(u8);
void sub_80FC998(u8 taskId);
#endif // GUARD_CONTEST_LINK_80F57C4_H
#endif // GUARD_CONTEST_UTIL_H

View File

@ -1,7 +1,7 @@
#ifndef GUARD_DODRIO_BERRY_PICKING_H
#define GUARD_DODRIO_BERRY_PICKING_H
void sub_802493C(u16 a0, void (*callback)(void));
void StartDodrioBerryPicking(u16 a0, void (*callback)(void));
void IsDodrioInParty(void);
void ShowDodrioBerryPickingRecords(void);

View File

@ -4,7 +4,7 @@
void ScriptHatchMon(void);
bool8 CheckDaycareMonReceivedMail(void);
void EggHatch(void);
u8 GetEggStepsToSubtract(void);
u8 GetEggCyclesToSubtract(void);
u16 CountPartyAliveNonEggMons(void);
#endif // GUARD_EGG_HATCH_H

View File

@ -8,6 +8,6 @@ void LockSelectedObjectEvent(void);
void sub_8098630(void);
bool8 sub_8098734(void);
void ScriptUnfreezeObjectEvents(void);
void sub_8098524(void);
void UnionRoom_UnlockPlayerAndChatPartner(void);
#endif // GUARD_EVENT_OBJECT_LOCK_H

View File

@ -81,11 +81,11 @@ void sub_808E16C(s16, s16);
void OverrideSecretBaseDecorationSpriteScript(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
void sub_8092FF0(s16, s16, s16 *, s16 *);
u8 GetFaceDirectionAnimNum(u8);
void sub_80930E0(s16 *, s16 *, s16, s16);
void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16);
void ObjectEventClearHeldMovement(struct ObjectEvent *);
void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *);
void TrySpawnObjectEvents(s16, s16);
u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction);
u8 CreateObjectSprite(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction);
u8 AddPseudoObjectEvent(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority);
u8 TrySpawnObjectEvent(u8, u8, u8);
u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z);
@ -180,7 +180,7 @@ void CreateLevitateMovementTask(struct ObjectEvent *);
void DestroyExtraMovementTask(u8);
void UnfreezeObjectEvents(void);
void FreezeObjectEventsExceptOne(u8 objectEventId);
void sub_8097B78(u8, u8);
void TurnObjectEventSprite(u8, u8);
void sub_8098074(u8 var1, u8 var2);
void FreezeObjectEvents(void);
bool8 FreezeObjectEvent(struct ObjectEvent *objectEvent);
@ -194,7 +194,7 @@ void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible);
s16 sub_809773C(s16 a1);
s16 sub_8097728(s16 a1);
void CameraObjectReset2(void);
u8 ObjectEventGetBerryTreeId(u8 objectEventId);
u8 GetObjectEventBerryTreeId(u8 objectEventId);
void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
bool8 IsBerryTreeSparkling(u8, u8, u8);
@ -414,10 +414,10 @@ u8 MovementType_RunInPlace_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *);
void sub_8097C44(u8 var, bool32 var2);
bool32 sub_8097C8C(u8 var);
void sub_8097BB4(u8 var1, u8 graphicsId);
void sub_8097CC4(u8 var1, u8 var2);
bool32 sub_8097D9C(u8 var);
void SetObjectEventSpriteInvisibility(u8 var, bool32 var2);
bool32 IsObjectEventSpriteInvisible(u8 var);
void SetObjectEventSpriteGraphics(u8 var1, u8 graphicsId);
void SetObjectEventSpriteAnim(u8 var1, u8 var2);
bool32 IsObjectEventSpriteAnimating(u8 var);
#endif //GUARD_EVENT_OBJECT_MOVEMENT_H

View File

@ -10,13 +10,13 @@ enum
};
bool8 ShowFieldMessage(const u8 *message);
bool8 sub_8098238(const u8 *message);
bool8 sub_80982B8(void);
bool8 ShowPokenavFieldMessage(const u8 *message);
bool8 ShowFieldMessageFromBuffer(void);
bool8 ShowFieldAutoScrollMessage(const u8 *message);
void HideFieldMessageBox(void);
bool8 IsFieldMessageBoxHidden(void);
u8 GetFieldMessageBoxMode(void);
void sub_8098374(void);
void StopFieldMessage(void);
void InitFieldMessageBox(void);
#endif // GUARD_FIELD_MESSAGE_BOX_H

View File

@ -43,6 +43,7 @@ void copy_map_tileset1_to_vram(const struct MapLayout *);
void copy_map_tileset2_to_vram(const struct MapLayout *);
struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection);
struct MapConnection *GetConnectionAtCoords(s16 x, s16 y);
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
void SpriteCB_PokeballGlow(struct Sprite *);
void SpriteCB_PokecenterMonitor(struct Sprite *);
@ -50,6 +51,5 @@ void SpriteCB_HallOfFameMonitor(struct Sprite *);
// field_region_map.c
void FieldInitRegionMap(MainCallback callback);
void sub_8088B94(int x, int y, int a2);
#endif //GUARD_FIELDMAP_H

View File

@ -27,6 +27,9 @@ typedef double f64;
typedef u8 bool8;
typedef u16 bool16;
typedef u32 bool32;
typedef vu8 vbool8;
typedef vu16 vbool16;
typedef vu32 vbool32;
struct BgCnt
{

View File

@ -966,7 +966,7 @@ struct SaveBlock1
/*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
/*0x2E28*/ OldMan oldMan;
/*0x2e64*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
/*0x2e90*/ struct ContestWinner contestWinners[13]; // 0 - 5 used in contest hall, 6 - 7 unused?, 8 - 12 museum
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
/*0x3030*/ struct DayCare daycare;
/*0x3150*/ struct LinkBattleRecords linkBattleRecords;
/*0x31A8*/ u8 giftRibbons[52];
@ -980,7 +980,7 @@ struct SaveBlock1
/*0x3B24*/ u8 seen2[DEX_FLAGS_NO];
/*0x3B58*/ LilycoveLady lilycoveLady;
/*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20];
/*0x3C88*/ u8 unk3C88[10][21];
/*0x3C88*/ u8 registeredTexts[UNION_ROOM_KB_ROW_COUNT][21];
/*0x3D5A*/ u8 filler3D5A[0xA];
/*0x3D64*/ struct SaveTrainerHill trainerHill;
/*0x3D70*/ struct WaldaPhrase waldaPhrase;

View File

@ -18,6 +18,13 @@ typedef union // size = 0x24
/*0x23*/ u8 trainerIdHi;
} common;
// Common init (used for initialization loop)
struct {
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u8 pad02[34];
} commonInit;
// Local shows
// TVSHOW_FAN_CLUB_LETTER
struct {

View File

@ -4082,8 +4082,8 @@ extern const u8 gNamingScreenUnderscoreTiles[];
extern const u32 gUnknown_08D9BA44[];
extern const u32 gContestConfetti_Gfx[];
extern const u32 gContestConfetti_Pal[];
extern const u32 gConfetti_Gfx[];
extern const u32 gConfetti_Pal[];
extern const u32 gUnknown_08C093F0[];
extern const u32 gSubstituteDollTilemap[];
@ -5256,23 +5256,23 @@ extern const u32 gRouletteCreditTiles[];
extern const u32 gRouletteNumbersTiles[];
extern const u32 gRouletteMultiplierTiles[];
// Contest Link
extern const u32 gUnknown_08C19588[];
// Contest util
extern const u32 gContestResults_Gfx[];
extern const u32 gUnknown_08C19EEC[];
extern const u32 gUnknown_08C1A000[];
extern const u32 gUnknown_08C1A12C[];
extern const u32 gUnknown_08C1A2B4[];
extern const u16 gUnknown_08DC6498[];
extern const u16 gUnknown_08DC63F8[];
extern const u16 gUnknown_08DC6420[];
extern const u16 gUnknown_08DC6448[];
extern const u16 gUnknown_08DC6470[];
extern const u16 gUnknown_08DC64AC[];
extern const u16 gUnknown_08DC64C0[];
extern const u16 gUnknown_08DC64D4[];
extern const u16 gUnknown_08DC64E8[];
extern const u16 gUnknown_08DC64FC[];
extern const u16 gUnknown_08DC6510[];
extern const u32 gContestResults_Pal[];
extern const u16 gLinkContestResults_Tilemap[];
extern const u16 gNormalContestResults_Tilemap[];
extern const u16 gSuperContestResults_Tilemap[];
extern const u16 gHyperContestResults_Tilemap[];
extern const u16 gMasterContestResults_Tilemap[];
extern const u16 gCoolContestResults_Tilemap[];
extern const u16 gBeautyContestResults_Tilemap[];
extern const u16 gCuteContestResults_Tilemap[];
extern const u16 gSmartContestResults_Tilemap[];
extern const u16 gToughContestResults_Tilemap[];
extern const u16 gContestResults_Tilemap[];
// Trainer Card.
extern const u16 gHoennTrainerCard0Star_Pal[];
@ -5315,14 +5315,14 @@ extern const u16 gEasyChatRightWindow_Pal[];
extern const u32 gUsePokeblockCondition_Gfx[];
// Union Room Chat
extern const u16 gUnknown_08DD4BB0[];
extern const u16 gUnknown_08DD4BD0[];
extern const u32 gUnknown_08DD4BF0[];
extern const u32 gUnknown_08DD4C4C[];
extern const u32 gUnknown_08DD4CF8[];
extern const u16 gLinkMiscMenu_Pal[];
extern const u32 gLinkMiscMenu_Gfx[];
extern const u32 gLinkMiscMenu_Tilemap[];
extern const u16 gUnionRoomChat_Background_Pal[];
extern const u32 gUnionRoomChat_Background_Gfx[];
extern const u32 gUnionRoomChat_Background_Tilemap[];
extern const u16 gUnionRoomChat_Window_Pal1[];
extern const u16 gUnionRoomChat_Window_Pal2[];
extern const u32 gUnionRoomChat_Border_Gfx[];
extern const u32 gUnionRoomChat_Border_Tilemap[];
extern const u32 gUnionRoomChat_RButtonLabels[];
// Use Pokeblock
extern const u8 gPokenavConditionCancel_Gfx[];

View File

@ -4,7 +4,6 @@
void CB2_DoHallOfFameScreen(void);
void CB2_DoHallOfFameScreenDontSaveData(void);
void CB2_DoHallOfFamePC(void);
void DoConfettiEffect(void);
// hof_pc.c
void ReturnFromHallOfFamePC(void);

View File

@ -4,19 +4,35 @@
#include "item.h"
#include "menu_helpers.h"
#define RETURN_LOCATION_FIELD 0
#define RETURN_LOCATION_BATTLE 1
#define RETURN_LOCATION_POKEMON_LIST 2
#define RETURN_LOCATION_SHOP 3
#define RETURN_LOCATION_FIELD_2 4
#define RETURN_LOCATION_FIELD_3 5
#define RETURN_LOCATION_PC 6
#define RETURN_LOCATION_FIELD_4 7
#define RETURN_LOCATION_FIELD_5 8
#define RETURN_LOCATION_FIELD_6 9
#define RETURN_LOCATION_BATTLE_2 10
#define RETURN_LOCATION_PC_2 11
#define RETURN_LOCATION_UNCHANGED 12
#define ITEMMENULOCATION_FIELD 0
#define ITEMMENULOCATION_BATTLE 1
#define ITEMMENULOCATION_PARTY 2
#define ITEMMENULOCATION_SHOP 3
#define ITEMMENULOCATION_BERRY_TREE 4
#define ITEMMENULOCATION_BERRY_BLENDER_CRUSH 5
#define ITEMMENULOCATION_ITEMPC 6
#define ITEMMENULOCATION_FAVOR_LADY 7
#define ITEMMENULOCATION_QUIZ_LADY 8
#define ITEMMENULOCATION_APPRENTICE 9
#define ITEMMENULOCATION_WALLY 10
#define ITEMMENULOCATION_PCBOX 11
#define ITEMMENULOCATION_LAST 12
#define ITEMMENUACTION_USE 0
#define ITEMMENUACTION_TOSS 1
#define ITEMMENUACTION_REGISTER 2
#define ITEMMENUACTION_GIVE 3
#define ITEMMENUACTION_CANCEL 4
#define ITEMMENUACTION_BATTLE_USE 5
#define ITEMMENUACTION_CHECK 6
#define ITEMMENUACTION_WALK 7
#define ITEMMENUACTION_DESELECT 8
#define ITEMMENUACTION_CHECK_TAG 9
#define ITEMMENUACTION_CONFIRM 10
#define ITEMMENUACTION_SHOW 11
#define ITEMMENUACTION_GIVE_2 12
#define ITEMMENUACTION_CONFIRM_2 13
#define ITEMMENUACTION_DUMMY 14
// Exported type declarations
struct BagStruct
@ -33,29 +49,27 @@ extern struct BagStruct gBagPositionStruct;
struct BagMenuStruct
{
void (*mainCallback2)(void);
void (*exitCallback)(void);
u8 tilemapBuffer[0x800];
u8 spriteId[12];
u8 windowPointers[7];
u8 unk817;
u8 unk818;
u8 unk819;
u8 unk81A;
u8 unk81B:4;
u8 unk81B_1:2;
u8 unk81B_3:1;
u8 itemOriginalLocation;
u8 pocketSwitchDisabled:4;
u8 itemIconSlot:2;
u8 inhibitItemDescriptionPrint:1;
u8 hideCloseBagText:1;
u8 filler3[2];
u8 unk81E;
u8 unk81F;
const u8* unk820;
u8 unk824;
u8 unk825;
u8 filler[2];
u8 unk828;
u8 pocketScrollArrowsTask;
u8 pocketSwitchArrowsTask;
const u8* contextMenuItemsPtr;
u8 contextMenuItemsBuffer[4];
u8 contextMenuNumItems;
u8 numItemStacks[POCKETS_COUNT];
u8 numShownItems[6];
s16 unk834;
s16 graphicsLoadState;
u8 filler4[0xE];
u8 pocketNameBuffer[32][32];
u8 filler2[4];
@ -68,11 +82,11 @@ extern struct BagMenuStruct *gBagMenu;
extern u16 gSpecialVar_ItemId;
// Exported ROM declarations
void sub_81AAC14(void);
void CB2_GoToItemDepositMenu(void);
void FavorLadyOpenBagMenu(void);
void QuizLadyOpenBagMenu(void);
void ApprenticeOpenBagMenu(void);
void sub_81AABB0(void);
void CB2_BagMenuFromBattle(void);
void SetInitialScrollAndCursorPositions(u8 pocketId);
void CB2_ReturnToBagMenuPocket(void);
void CB2_BagMenuFromStartMenu(void);

View File

@ -10,7 +10,7 @@ extern const struct CompressedSpritePalette gBerryCheckCirclePaletteTable;
void RemoveBagSprite(u8 id);
void AddBagVisualSprite(u8 bagPocketId);
void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets);
void ShakeBagVisual(void);
void ShakeBagSprite(void);
void AddSwitchPocketRotatingBallSprite(s16 rotationDirection);
void AddBagItemIconSprite(u16 itemId, u8 id);
void RemoveBagItemIconSprite(u8 id);

View File

@ -73,10 +73,10 @@
#define LINKCMD_CANCEL_TRADE 0xEEBB
#define LINKCMD_0xEECC 0xEECC
#define LINKTYPE_0x1111 0x1111 // trade
#define LINKTYPE_0x1122 0x1122 // trade
#define LINKTYPE_0x1133 0x1133 // trade
#define LINKTYPE_0x1144 0x1144 // trade
#define LINKTYPE_TRADE 0x1111
#define LINKTYPE_TRADE_CONNECTING 0x1122
#define LINKTYPE_TRADE_SETUP 0x1133
#define LINKTYPE_TRADE_DISCONNECTED 0x1144
#define LINKTYPE_BATTLE 0x2211
#define LINKTYPE_0x2222 0x2222 // unused battle?
#define LINKTYPE_SINGLE_BATTLE 0x2233
@ -85,13 +85,13 @@
#define LINKTYPE_BATTLE_TOWER_50 0x2266
#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277
#define LINKTYPE_BATTLE_TOWER 0x2288
#define LINKTYPE_0x3311 0x3311
#define LINKTYPE_0x3322 0x3322
#define LINKTYPE_RECORD_MIX_BEFORE 0x3311
#define LINKTYPE_RECORD_MIX_AFTER 0x3322
#define LINKTYPE_BERRY_BLENDER_SETUP 0x4411
#define LINKTYPE_BERRY_BLENDER 0x4422
#define LINKTYPE_0x5501 0x5501 // mystery event
#define LINKTYPE_MYSTERY_EVENT 0x5501
#define LINKTYPE_0x5502 0x5502 // unused?
#define LINKTYPE_0x5503 0x5503 // eReader
#define LINKTYPE_EREADER 0x5503
#define LINKTYPE_CONTEST_GMODE 0x6601
#define LINKTYPE_CONTEST_EMODE 0x6602
@ -126,10 +126,10 @@ enum
EXCHANGE_NOT_STARTED,
EXCHANGE_COMPLETE,
EXCHANGE_TIMED_OUT,
EXCHANGE_IN_PROGRESS,
EXCHANGE_DIFF_SELECTIONS,
EXCHANGE_PLAYER_NOT_READY,
EXCHANGE_PARTNER_NOT_READY,
EXCHANGE_STAT_6,
EXCHANGE_WRONG_NUM_PLAYERS,
EXCHANGE_STAT_7
};
@ -274,9 +274,8 @@ void LoadWirelessStatusIndicatorSpriteGfx(void);
bool8 IsLinkTaskFinished(void);
void CreateWirelessStatusIndicatorSprite(u8, u8);
void sub_800ADF8(void);
void sub_800B488(void);
void SetWirelessCommType1(void);
void CheckShouldAdvanceLinkState(void);
void sub_8011BD0(void);
u8 IsLinkMaster(void);
void sub_800AC34(void);
bool8 HandleLinkConnection(void);
@ -285,14 +284,14 @@ void sub_800A418(void);
void SetSuppressLinkErrorMessage(bool8 flag);
void sub_800B524(struct LinkPlayer *linkPlayer);
u8 GetSioMultiSI(void);
void sub_800AAF4(void);
void sub_800AF18(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 unk_06);
void ClearSavedLinkPlayers(void);
void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 unk_06);
void sub_800B348(void);
void sub_800B3A4(u32 who);
bool32 sub_800A07C(void);
void LinkPlayerFromBlock(u32 who);
bool32 Link_AnyPartnersPlayingFRLG_JP(void);
void ResetLinkPlayerCount(void);
void sub_800AA04(u8 a0);
void sub_800B4C0(void);
void SaveLinkPlayers(u8 a0);
void SetWirelessCommType0(void);
bool32 sub_800B504(void);
extern u16 gLinkPartnersHeldKeys[6];
@ -331,18 +330,18 @@ extern u32 gFiller_03003080;
extern struct LinkPlayer gLocalLinkPlayer;
bool32 Link_AnyPartnersPlayingRubyOrSapphire(void);
bool32 sub_800A03C(void);
bool32 LinkDummy_Return2(void);
void SetLocalLinkPlayerId(u8);
u8 GetSavedPlayerCount(void);
void sub_8009FAC(void);
bool8 sub_800A4D8(u8 a0);
u8 sub_800A9D8(void);
u8 GetLinkPlayerCountAsBitFlags(void);
u8 sub_800A0C8(s32, s32);
u8 sub_800A9A8(void);
u8 GetSavedLinkPlayerCountAsBitFlags(void);
void sub_800AD10(void);
void sub_800AB18(void);
void sub_8009F18(void);
bool8 sub_800AA60(void);
void CheckLinkPlayersMatchSaved(void);
void StartSendingKeysToLink(void);
bool8 DoesLinkPlayerCountMatchSaved(void);
void sub_800ABF4(u16 a0);
bool32 IsSendingKeysToLink(void);
u32 GetLinkRecvQueueLength(void);

View File

@ -5,7 +5,43 @@
#include "link.h"
#include "AgbRfu_LinkManager.h"
// Exported type declarations
#define RFU_COMMAND_0x4400 0x4400
#define RFU_COMMAND_0x8800 0x8800
#define RFU_COMMAND_0x8900 0x8900
#define RFU_COMMAND_0xA100 0xA100
#define RFU_COMMAND_0x7700 0x7700
#define RFU_COMMAND_0x7800 0x7800
#define RFU_COMMAND_0x6600 0x6600
#define RFU_COMMAND_0x5F00 0x5F00
#define RFU_COMMAND_0x2F00 0x2F00
#define RFU_COMMAND_0xBE00 0xBE00
#define RFU_COMMAND_0xEE00 0xEE00
#define RFU_COMMAND_0xED00 0xED00
#define RFU_SERIAL_7F7D 0x7F7D
#define RECV_QUEUE_NUM_SLOTS 32
#define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS)
#define SEND_QUEUE_NUM_SLOTS 40
#define SEND_QUEUE_SLOT_LENGTH 14
#define BACKUP_QUEUE_NUM_SLOTS 2
#define BACKUP_QUEUE_SLOT_LENGTH 14
#define RFU_STATUS_OK 0
#define RFU_STATUS_FATAL_ERROR 1
#define RFU_STATUS_CONNECTION_ERROR 2
#define RFU_STATUS_CHILD_SEND_COMPLETE 3
#define RFU_STATUS_NEW_CHILD_DETECTED 4
#define RFU_STATUS_JOIN_GROUP_OK 5
#define RFU_STATUS_JOIN_GROUP_NO 6
#define RFU_STATUS_WAIT_ACK_JOIN_GROUP 7
#define RFU_STATUS_LEAVE_GROUP_NOTICE 8
#define RFU_STATUS_LEAVE_GROUP 9
#define RFU_STATUS_10 10
#define RFU_STATUS_11 11
#define RFU_STATUS_ACK_JOIN_GROUP 12
// RfuTgtData.gname is read as these structs.
struct GFtgtGnameSub
@ -13,12 +49,11 @@ struct GFtgtGnameSub
u16 language:4;
u16 hasNews:1;
u16 hasCard:1;
u16 unk_00_6:1;
u16 unknown:1; // Never read
u16 isChampion:1;
u16 hasNationalDex:1;
u16 gameClear:1;
u16 version:4;
u16 unk_01_6:2;
u8 playerTrainerId[2];
};
@ -38,111 +73,73 @@ struct __attribute__((packed, aligned(2))) GFtgtGname
u8 padding;
}; // size: RFU_GNAME_SIZE
struct UnkLinkRfuStruct_02022B2C
struct RfuBlockSend
{
u8 unk_00;
u8 unk_01;
u16 unk_02;
u8 unk_04;
u16 unk_06;
struct GFtgtGname *unk_08;
u8 *unk_0c;
u8 unk_10;
u8 unk_11;
u16 unk_12;
u16 unk_14;
/* 0x00 */ u16 next;
/* 0x02 */ u16 count;
/* 0x04 */ const u8 *payload;
/* 0x08 */ u32 receivedFlags;
/* 0x0c */ u32 failedFlags;
/* 0x10 */ bool8 sending;
/* 0x11 */ u8 owner;
/* 0x12 */ u8 receiving;
};
struct UnkLinkRfuStruct_02022B44
struct RfuRecvQueue
{
u8 fill_00[6];
u16 unk_06;
u8 fill_08[6];
vu8 unk_0e;
u8 unk_0f;
u8 fill_10[0x54];
u16 unk_64;
u8 fill_66[0x1d];
u8 unk_83;
u8 fill_84[0x58];
/* 0x000 */ u8 slots[RECV_QUEUE_NUM_SLOTS][RECV_QUEUE_SLOT_LENGTH];
/* 0x8c0 */ vu8 recvSlot;
/* 0x8c1 */ vu8 sendSlot;
/* 0x8c2 */ vu8 count;
/* 0x8c3 */ vu8 full;
};
struct UnkRfuStruct_2_Sub_6c
struct RfuSendQueue
{
/* 0x00 */ u16 unk_00;
/* 0x02 */ u16 unk_02;
/* 0x04 */ const u8 *unk_04;
/* 0x08 */ u32 unk_08;
/* 0x0c */ u32 unk_0c;
/* 0x10 */ u8 unk_10;
/* 0x11 */ u8 unk_11;
/* 0x12 */ u8 unk_12;
/* 0x000 */ u8 slots[SEND_QUEUE_NUM_SLOTS][SEND_QUEUE_SLOT_LENGTH];
/* 0x230 */ vu8 recvSlot;
/* 0x231 */ vu8 sendSlot;
/* 0x232 */ vu8 count;
/* 0x233 */ vu8 full;
};
struct UnkRfuStruct_2_Sub_124
struct RfuBackupQueue
{
/* 0x000 */ u8 unk_00[32][70];
/* 0x8c0 */ vu8 unk_8c0;
/* 0x8c1 */ vu8 unk_8c1;
/* 0x8c2 */ vu8 unk_8c2;
/* 0x8c3 */ vu8 unk_8c3;
/* 0x00 */ u8 slots[BACKUP_QUEUE_NUM_SLOTS][BACKUP_QUEUE_SLOT_LENGTH];
/* 0x1c */ vu8 recvSlot;
/* 0x1d */ vu8 sendSlot;
/* 0x1e */ vu8 count;
};
struct UnkRfuStruct_2_Sub_9e8
struct GFRfuManager
{
/* 0x000 */ u8 unk_00[40][14];
/* 0x230 */ vu8 unk_230;
/* 0x231 */ vu8 unk_231;
/* 0x232 */ vu8 unk_232;
/* 0x233 */ vu8 unk_233;
};
struct UnkRfuStruct_2_Sub_c1c
{
/* 0x00 */ u8 unk_00[2][14];
/* 0x1c */ vu8 unk_1c;
/* 0x1d */ vu8 unk_1d;
/* 0x1e */ vu8 unk_1e;
};
struct UnkRfuStruct_Sub_Unused
{
/* 0x000 */ u8 unk_00[2][256];
/* 0x200 */ vu8 unk_200;
/* 0x201 */ vu8 unk_201;
/* 0x202 */ vu8 unk_202;
/* 0x203 */ vu8 unk_203;
};
struct UnkRfuStruct_2
{
/* 0x000 */ void (*linkRfuCallback)(void);
/* 0x004 */ u16 unk_04;
/* 0x000 */ void (*callback)(void);
/* 0x004 */ u16 state;
/* 0x006 */ u8 filler_06[4];
/* 0x00a */ u16 unk_0a;
/* 0x00c */ u8 unk_0c;
/* 0x00a */ u16 linkmanMsg;
/* 0x00c */ u8 parentChild;
/* 0x00d */ u8 playerCount;
/* 0x00e */ u8 unk_0e;
/* 0x00e */ bool8 unk_0e;
/* 0x00f */ u8 unk_0f;
/* 0x010 */ u16 unk_10;
/* 0x012 */ u16 unk_12;
/* 0x014 */ u8 unk_14[4][14];
/* 0x014 */ u8 unk_14[RFU_CHILD_MAX][14];
/* 0x04c */ u8 unk_4c[14];
/* 0x05a */ u8 unk_5a;
/* 0x05b */ u8 unk_5b;
/* 0x05c */ u8 unk_5c[5];
/* 0x061 */ u8 unk_61[5];
/* 0x066 */ u8 unk_66;
/* 0x067 */ u8 unk_67;
/* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS];
/* 0x061 */ bool8 numBlocksReceived[MAX_RFU_PLAYERS];
/* 0x066 */ u8 idleTaskId;
/* 0x067 */ u8 searchTaskId;
/* 0x068 */ u8 filler_68[4];
/* 0x06c */ struct UnkRfuStruct_2_Sub_6c unk_6c;
/* 0x080 */ struct UnkRfuStruct_2_Sub_6c unk_80[5];
/* 0x06c */ struct RfuBlockSend sendBlock;
/* 0x080 */ struct RfuBlockSend recvBlock[MAX_RFU_PLAYERS];
/* 0x0e4 */ u8 unk_e4[5];
/* 0x0e9 */ u8 unk_e9[5];
/* 0x0ee */ vu8 unk_ee;
/* 0x0ef */ u8 unk_ef;
/* 0x0f0 */ u8 unk_f0;
/* 0x0f1 */ u8 unk_f1;
/* 0x0ee */ vu8 errorState;
/* 0x0ef */ bool8 isShuttingDown;
/* 0x0f0 */ u8 linkLossRecoveryState;
/* 0x0f1 */ u8 status;
/* 0x0f2 */ u16 unk_f2[6];
/* 0x0fe */ u16 unk_fe;
/* 0x100 */ u16 unk_100;
@ -151,193 +148,137 @@ struct UnkRfuStruct_2
/* 0x10A */ struct GFtgtGname unk_10A;
u8 filler_;
u8 playerName[PLAYER_NAME_LENGTH + 1];
/* 0x124 */ struct UnkRfuStruct_2_Sub_124 unk_124;
/* 0x9e8 */ struct UnkRfuStruct_2_Sub_9e8 unk_9e8;
/* 0xc1c */ struct UnkRfuStruct_2_Sub_c1c unk_c1c;
/* 0xc3c */ vu8 unk_c3c;
/* 0x124 */ struct RfuRecvQueue recvQueue;
/* 0x9e8 */ struct RfuSendQueue sendQueue;
/* 0xc1c */ struct RfuBackupQueue backupQueue;
/* 0xc3c */ vu8 linkRecovered;
/* 0xc3d */ u8 unk_c3d;
/* 0xc3e */ vu8 unk_c3e;
/* 0xc3e */ vu8 childSlot;
/* 0xc3f */ u8 unk_c3f[70];
/* 0xc85 */ u8 unk_c85;
/* 0xc86 */ u8 unk_c86;
/* 0xc87 */ u8 unk_c87[5][7][2];
/* 0xccd */ u8 unk_ccd;
/* 0xcce */ u8 unk_cce;
/* 0xc86 */ u8 recvStatus;
/* 0xc87 */ u8 recvCmds[5][7][2];
/* 0xccd */ u8 parentId;
/* 0xcce */ u8 multiplayerId;
/* 0xccf */ u8 unk_ccf;
/* 0xcd0 */ vu8 unk_cd0;
/* 0xcd1 */ u8 unk_cd1[4];
/* 0xcd5 */ u8 unk_cd5[4];
/* 0xcd1 */ u8 partnerSendStatuses[RFU_CHILD_MAX];
/* 0xcd5 */ u8 partnerRecvStatuses[RFU_CHILD_MAX];
/* 0xcd9 */ u8 unk_cd9;
/* 0xcda */ u8 unk_cda;
/* 0xcdb */ vu8 unk_cdb;
/* 0xcdc */ vu8 unk_cdc;
/* 0xcdb */ vbool8 unk_cdb;
/* 0xcdc */ vbool8 unk_cdc;
/* 0xcdd */ u8 unk_cdd;
/* 0xcde */ u8 unk_cde[4];
/* 0xcde */ u8 linkPlayerIdx[RFU_CHILD_MAX];
/* 0xce2 */ u8 unk_ce2;
/* 0xce2 */ u8 unk_ce3;
/* 0xce4 */ u8 unk_ce4;
/* 0xce5 */ u8 unk_ce5;
/* 0xce5 */ u8 unk_ce6;
/* 0xce7 */ u8 unk_ce7;
/* 0xce7 */ u8 acceptSlot_flag;
/* 0xce8 */ u8 unk_ce8;
/* 0xce9 */ u8 unk_ce9;
/* 0xcea */ u8 unk_cea[4];
/* 0xcee */ u8 unk_cee[4];
}; // size = 0xcf4
struct UnkRfuStruct_8010A14
{
char unk_00[15];
u8 unk_0f;
u8 unk_10[4];
struct LinkPlayer unk_14[5];
u8 fill_a0[0x5c];
};
// Exported RAM declarations
extern struct GFtgtGname gUnknown_02022B14;
extern u8 gUnknown_02022B22[];
extern struct UnkRfuStruct_2 Rfu;
extern struct GFtgtGname gHostRFUtgtGnameBuffer;
extern u8 gHostRFUtgtUnameBuffer[];
extern struct GFRfuManager Rfu;
extern u8 gWirelessStatusIndicatorSpriteId;
// Exported ROM declarations
void WipeTrainerNameRecords(void);
void sub_800E700(void);
void sub_800EDD4(void);
void sub_800F6FC(u8 who);
void sub_800F728(u8 who);
void InitRFUAPI(void);
void LinkRfu_Shutdown(void);
void Rfu_SetBlockReceivedFlag(u8 who);
void Rfu_ResetBlockReceivedFlag(u8 who);
bool32 IsSendingKeysToRfu(void);
void sub_800F804(void);
void StartSendingKeysToRfu(void);
void sub_800F850(void);
u8 sub_800FCD8(void);
bool32 sub_800FE84(const u8 *src, size_t size);
u8 Rfu_GetBlockReceivedStatus(void);
bool32 Rfu_InitBlockSend(const u8 *src, size_t size);
void ClearLinkRfuCallback(void);
u8 sub_80104F4(void);
u8 rfu_get_multiplayer_id(void);
u8 Rfu_GetLinkPlayerCount(void);
u8 Rfu_GetMultiplayerId(void);
bool8 sub_8010100(u8 a0);
bool8 IsLinkRfuTaskFinished(void);
bool8 Rfu_IsMaster(void);
void task_add_05_task_del_08FA224_when_no_RfuFunc(void);
void sub_8010434(void);
void sub_800E604(void);
void sub_800E174(void);
void sub_800E6D0(void);
void ResetLinkRfuGFLayer(void);
void UpdateWirelessStatusIndicatorSprite(void);
void InitRFU(void);
bool32 sub_8010EC0(void);
bool32 sub_8010F1C(void);
bool32 sub_8011A80(void);
bool32 RfuHasErrored(void);
bool32 IsRfuRecvQueueEmpty(void);
u32 GetRfuRecvQueueLength(void);
void RfuVSync(void);
void sub_80111B0(bool32 a0);
u8 sub_8011A74(void);
struct GFtgtGname *sub_800F7DC(void);
void sub_8011068(u8 a0);
void sub_8011170(u32 a0);
void sub_8011A64(u8 a0, u16 a1);
u8 RfuGetStatus(void);
struct GFtgtGname *GetHostRFUtgtGname(void);
void UpdateGameData_GroupLockedIn(u8 a0);
void GetLinkmanErrorParams(u32 a0);
void RfuSetStatus(u8 a0, u16 a1);
u8 sub_801048C(bool32 a0);
void sub_800DF90(struct GFtgtGname *buff1, u8 *buff2);
void sub_8010F84(u8 a0, u32 a1, u32 a2);
void sub_8011C10(u32 a0);
void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2);
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started);
void InitializeRfuLinkManager_LinkLeader(u32 a0);
bool32 sub_8012240(void);
void sub_800EF38(void);
void LinkRfu_StopManagerAndFinalizeSlots(void);
bool32 sub_80105EC(void);
bool32 sub_801064C(u16 a0, const u8 *a1);
void sub_8010688(u8 a0, u16 a1, const u8 *a2);
u32 sub_8010714(u16 a0, const u8 *a1);
void sub_8011DC0(const u8 *a0, u16 a1);
bool8 sub_800EF1C(void);
bool32 sub_800EF58(bool32 a0);
void DestroyWirelessStatusIndicatorSprite(void);
bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name);
void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name);
u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name);
void RequestDisconnectSlotByTrainerNameAndId(const u8 *a0, u16 a1);
bool8 LmanAcceptSlotFlagIsNotZero(void);
bool32 WaitRfuState(bool32 a0);
void sub_801103C(void);
void sub_8011C5C(void);
void sub_80106D4(void);
void InitializeRfuLinkManager_JoinGroup(void);
void SendLeaveGroupNotice(void);
void RecordMixTrainerNames(void);
void sub_800ED10(void);
void sub_800ED28(void);
void sub_8011090(u8 a0, u32 a1, u32 a2);
void sub_8011FC8(const u8 *src, u16 trainerId);
void sub_8010FA0(bool32 a0, bool32 a1);
void sub_8010F60(void);
void sub_8010FCC(u32 a0, u32 a1, u32 a2);
void sub_8011C84(void);
void LinkRfu_CreateConnectionAsParent(void);
void LinkRfu_StopManagerBeforeEnteringChat(void);
void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started);
void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId);
void SetGnameBufferWonderFlags(bool32 a0, bool32 a1);
void ClearAndInitHostRFUtgtGname(void);
void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level);
void InitializeRfuLinkManager_EnterUnionRoom(void);
void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 a2);
bool32 sub_8011B90(void);
bool32 IsUnionRoomListenTaskActive(void);
void sub_800FE50(void *a0);
bool32 sub_800E540(u16 id, u8 *name);
bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name);
void sub_8011DE0(u32 arg0);
u8 sub_801100C(s32 a0);
void sub_800EF7C(void);
bool8 sub_800DE7C(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
bool8 sub_800DF34(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
s32 sub_800E87C(u8 idx);
void sub_8011BA4(void);
void sub_8010198(void);
void CreateTask_RfuIdle(void);
void DestroyTask_RfuIdle(void);
void sub_8011AC8(void);
void LinkRfu_FatalError(void);
bool32 sub_8011A9C(void);
void sub_80104B0(void);
void sub_8011A50(void);
void sub_80110B8(u32 a0);
bool8 sub_800DAC8(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
void sub_800EAB4(void);
void sub_800EAFC(void);
void sub_800ED34(u16 unused);
void sub_800EDBC(u16 unused);
void sub_800F048(void);
void sub_800F86C(u8 unused);
void sub_800FCC4(struct UnkRfuStruct_2_Sub_6c *data);
void sub_800FD14(u16 command);
void rfufunc_80F9F44(void);
void sub_800FFB0(void);
void rfufunc_80FA020(void);
bool32 sub_8010454(u32 a0);
void sub_8010528(void);
void sub_8010750(void);
s32 sub_80107A0(void);
void sub_801084C(u8 taskId);
void sub_80109E8(u16 a0);
void sub_8010A70(void *a0);
void sub_8010AAC(u8 taskId);
void sub_8010D0C(u8 taskId);
void sub_80115EC(s32 a0);
u8 sub_8011CE4(const u8 *a0, u16 a1);
void sub_8011D6C(u32 a0);
void sub_8011E94(u32 a0, u32 a1);
bool8 sub_8012224(void);
void sub_801227C(void);
void sub_801209C(u8 taskId);
void sub_8011BF8(void);
void sub_8011BA4(void);
void sub_800D6C8(struct UnkRfuStruct_2_Sub_124 *ptr);
void sub_800D724(struct UnkRfuStruct_2_Sub_9e8 *ptr);
void sub_800D780(struct UnkRfuStruct_Sub_Unused *ptr);
void sub_800D7D8(struct UnkRfuStruct_2_Sub_124 *q1, u8 *q2);
void sub_800D888(struct UnkRfuStruct_2_Sub_9e8 *q1, u8 *q2);
bool8 sub_800D934(struct UnkRfuStruct_2_Sub_124 *q1, u8 *q2);
bool8 sub_800D9DC(struct UnkRfuStruct_2_Sub_9e8 *q1, u8 *q2);
void sub_800DA68(struct UnkRfuStruct_2_Sub_c1c *q1, const u8 *q2);
bool8 sub_800DAC8(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
void sub_800DB18(struct UnkRfuStruct_Sub_Unused *q1, u8 *q2);
bool8 sub_800DB84(struct UnkRfuStruct_Sub_Unused *q1, u8 *q2);
void sub_800DBF8(u8 *q1, u8 mode);
void PkmnStrToASCII(u8 *q1, const u8 *q2);
void ASCIIToPkmnStr(u8 *q1, const u8 *q2);
u8 sub_800DD1C(u8 maxFlags);
void sub_800DD94(struct GFtgtGname *data, u8 r9, bool32 r2, s32 r3);
bool8 sub_800DE7C(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
bool8 sub_800DF34(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
void sub_800DF90(struct GFtgtGname *buff1, u8 *buff2);
bool32 IsRfuSerialNumberValid(u32 serialNo);
bool8 IsRfuRecoveringFromLinkLoss(void);
void RfuRecvQueue_Reset(struct RfuRecvQueue *queue);
void RfuSendQueue_Reset(struct RfuSendQueue *queue);
void RfuRecvQueue_Enqueue(struct RfuRecvQueue *queue, u8 *data);
void RfuSendQueue_Enqueue(struct RfuSendQueue *queue, u8 *data);
bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue *queue, u8 *dest);
bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *dest);
void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *q2);
bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *q2);
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders);
void CreateWirelessStatusIndicatorSprite(u8 x, u8 y);
void DestroyWirelessStatusIndicatorSprite(void);
void LoadWirelessStatusIndicatorSpriteGfx(void);
u8 sub_800E124(void);
void sub_800E15C(struct Sprite *sprite, s32 signalStrengthAnimNum);
void sub_800E174(void);
void CopyTrainerRecord(struct TrainerNameRecord *dest, u32 trainerId, const u8 *name);
bool32 NameIsNotEmpty(const u8 *name);
void RecordMixTrainerNames(void);
bool32 sub_800E540(u16 id, u8 *name);
void WipeTrainerNameRecords(void);
#endif //GUARD_LINK_RFU_H

View File

@ -14,7 +14,7 @@ s32 GetRematchIdxByTrainerIdx(s32 trainerIdx);
void InitMatchCallCounters(void);
bool32 TryStartMatchCall(void);
bool32 IsMatchCallTaskActive(void);
void StartMatchCallFromScript(u8 *message);
void StartMatchCallFromScript(const u8 *message);
void BufferPokedexRatingForMatchCall(u8 *destStr);
bool32 SelectMatchCallMessage(int, u8 *);
void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId);

View File

@ -49,16 +49,16 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
void ScheduleBgCopyTilemapToVram(u8 bgNum);
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
u8 Menu_GetCursorPos(void);
s8 Menu_ProcessInput(void);
s8 Menu_ProcessInputNoWrap(void);
void blit_move_info_icon(u8 winId, u8 a2, u16 x, u16 y);
void reset_temp_tile_data_buffers(void);
void *decompress_and_copy_tile_data_to_vram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
bool8 free_temp_tile_data_buffers_if_possible(void);
void ResetTempTileDataBuffers(void);
void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
bool8 FreeTempTileDataBuffersIfPossible(void);
struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock);
void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos);
void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
@ -79,7 +79,7 @@ void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos);
u8 sub_8199134(s8, s8);
u8 GetStartMenuWindowId(void);
void sub_819A2BC(u8, u8);
void ListMenuLoadStdPalAt(u8, u8);
u8 Menu_MoveCursor(s8 cursorDelta);
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);

View File

@ -30,8 +30,8 @@ u8 GetLRKeysPressed(void);
u8 GetLRKeysPressedAndHeld(void);
bool8 sub_8122148(u16 itemId);
bool8 itemid_80BF6D8_mail_related(u16 itemId);
bool8 sub_81221AC(void);
bool8 sub_81221EC(void);
bool8 MenuHelpers_LinkSomething(void);
bool8 MenuHelpers_CallLinkSomething(void);
void sub_812220C(struct ItemSlot *slots, u8 count, u8 *arg2, u8 *usedSlotsCount, u8 maxUsedSlotsCount);
void sub_812225C(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 numItems);
void sub_8122298(u16 *arg0, u16 *arg1, u8 arg2, u8 arg3, u8 arg4);

View File

@ -57,7 +57,7 @@ u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const vo
bool32 MEventStruct_Unk1442CC_CompareField_unk_16(const struct MEventStruct_Unk1442CC *a0, const u16 *a1);
u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk1442CC *a0, u32 command);
u16 mevent_081445C0(u32 command);
void sub_801B940(void);
bool32 sub_801B94C(u16 a0);
void ResetReceivedWonderCardFlag(void);
bool32 MEventHandleReceivedWonderCard(u16 a0);
#endif //GUARD_MEVENT_H

View File

@ -1,6 +1,6 @@
#ifndef GUARD_MEVENT2_H
#define GUARD_MEVENT2_H
void sub_801B990(u32, u32);
void RecordIdOfWonderCardSenderByEventType(u32, u32);
#endif //GUARD_MEVENT2_H

View File

@ -12,5 +12,7 @@ bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str);
void AddTextPrinterToWindow1(const u8 *src);
void c2_ereader(void);
void c2_mystery_gift(void);
void MG_DrawTextBorder(u8 windowId);
s8 mevent_message_print_and_prompt_yes_no(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str);
#endif //GUARD_MYSTERY_GIFT_H

View File

@ -280,8 +280,8 @@ void sub_80686FC(struct Pokemon *mon, struct BattleTowerPokemon *dest);
void CreateObedientMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
bool8 sub_80688F8(u8 caseId, u8 battlerId);
void SetDeoxysStats(void);
u16 sub_8068B48(void);
u16 sub_8068BB0(void);
u16 GetUnionRoomTrainerPic(void);
u16 GetUnionRoomTrainerClass(void);
void CreateObedientEnemyMon(void);
void CalculateMonStats(struct Pokemon *mon);
void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest);

View File

@ -3,7 +3,7 @@
#include "main.h"
void sub_802A9A8(u16 monId, MainCallback callback);
void StartPokemonJump(u16 monId, MainCallback callback);
bool32 IsSpeciesAllowedInPokemonJump(u16 species);
void IsPokemonJumpSpeciesInParty(void);
void ResetPokeJumpResults(void);

View File

@ -1,33 +0,0 @@
#ifndef GUARD_ROM_81520A8_H
#define GUARD_ROM_81520A8_H
struct UnkStruct_81520A8
{
struct OamData oam;
s16 x;
s16 y;
s16 xDelta;
s16 yDelta;
u16 tileTag;
u16 palTag;
u16 tileNum;
u8 id;
u8 filler17; // Unused.
u8 unk18;
u8 unk19_0:1;
u8 unk19_1:1;
u8 unk19_2:1;
u8 priority:2;
s16 data[8];
void (*callback)(struct UnkStruct_81520A8 *);
};
bool32 sub_81521C0(u8 count);
bool32 sub_8152254(void);
bool32 sub_81522D4(void);
u8 sub_8152438(u8 id, void (*func)(struct UnkStruct_81520A8 *));
u8 sub_8152474(u8 id, u8 dataArrayId, s16 dataValue);
u8 sub_81524C4(const struct OamData *oam, u16 tileTag, u16 palTag, s16 x, s16 y, u8 arg5, u8 priority);
u8 sub_81525D0(u8 id);
#endif // GUARD_ROM_81520A8_H

View File

@ -102,7 +102,7 @@ u8 Save_LoadGameData(u8 saveType);
u16 sub_815355C(void);
u32 TryReadSpecialSaveSection(u8 sector, u8* dst);
u32 TryWriteSpecialSaveSection(u8 sector, u8* src);
void sub_8153688(u8 taskId);
void Task_LinkSave(u8 taskId);
// save_failed_screen.c
void DoSaveFailedScreen(u8 saveType);

View File

@ -41,7 +41,7 @@ struct ShopData
/*0x200B*/ u8 scrollIndicatorsTaskId;
/*0x200C*/ u8 iconSlot;
/*0x200D*/ u8 itemSpriteIds[2];
/*0x2010*/ s16 viewportObjects[16][5];
/*0x2010*/ s16 viewportObjects[OBJECT_EVENTS_COUNT][5];
};
void CreatePokemartMenu(const u16 *);

View File

@ -8,8 +8,8 @@ void Task_ShowStartMenu(u8 taskId);
void ShowStartMenu(void);
void ShowBattlePyramidStartMenu(void);
void SaveGame(void);
void sub_80A0514(void);
void sub_80A08CC(void);
void CB2_SetUpSaveAfterLinkBattle(void);
void SaveForBattleTowerLink(void);
void HideStartMenu(void);
void AppendToList(u8* list, u8* pos, u8 newEntry);

View File

@ -962,7 +962,7 @@ extern const u8 gText_TwoDashes[];
extern const u8 *const gReturnToXStringsTable2[];
extern const u8 gText_XPLink[];
extern const u8 gText_NumPlayerLink[];
extern const u8 gText_ConfirmLinkWhenPlayersReady[];
extern const u8 gText_ConfirmStartLinkWithXPlayers[];
extern const u8 gText_AwaitingLinkup[];
@ -2494,7 +2494,7 @@ extern const u8 gText_CommunicationStandby[];
extern const u8 gText_AnnouncingResults[];
extern const u8 gText_PreliminaryResults[];
extern const u8 gText_Round2Results[];
extern const u8 gText_Var1sVar2Won[];
extern const u8 gText_ContestantsMonWon[];
// Trainer Card
extern const u8 gText_LinkCableBattles[];
@ -2815,10 +2815,10 @@ extern const u8 gText_RegisterTextHere[];
extern const u8 gText_InputText[];
extern const u8 gText_ExitingChat[];
extern const u8 gText_LeaderLeftEndingChat[];
extern const u8 gText_RegisteredTextChanged[];
extern const u8 gText_AlreadySavedFile_Unused[];
extern const u8 gText_SavingDontTurnOff_Unused[];
extern const u8 gText_PlayerSavedGame_Unused[];
extern const u8 gText_RegisteredTextChangedOKToSave[];
extern const u8 gText_AlreadySavedFile_Chat[];
extern const u8 gText_SavingDontTurnOff_Chat[];
extern const u8 gText_PlayerSavedGame_Chat[];
extern const u8 gText_IfLeaderLeavesChatEnds[];
extern const u8 gText_Upper[];
extern const u8 gText_Lower[];

View File

@ -2,71 +2,70 @@
#define GUARD_UNION_ROOM_H
#include "link_rfu.h"
#include "link.h"
#include "constants/union_room.h"
// Exported type declarations
struct UnkStruct_Shared
struct WirelessGnameUnamePair
{
struct GFtgtGname field_0;
struct GFtgtGname gname;
u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1];
};
struct UnkStruct_x1C
{
struct UnkStruct_Shared unk0;
u8 unk18:1;
struct WirelessGnameUnamePair gname_uname;
u8 active:1;
};
struct UnkStruct_x20
{
struct UnkStruct_Shared unk;
u16 field_18;
u8 field_1A_0:2;
u8 field_1A_1:1;
struct WirelessGnameUnamePair gname_uname;
u16 timeoutCounter;
u8 groupScheduledAnim:2;
bool8 useRedText:1; // Never set
u8 field_1B;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u8 filler[3];
};
struct UnkStruct_Main0
{
struct UnkStruct_x20 arr[8];
struct UnkStruct_x20 arr[MAX_UNION_ROOM_PLAYERS];
};
struct UnkStruct_Main4
{
struct UnkStruct_x1C arr[5];
struct UnkStruct_x1C arr[MAX_RFU_PLAYERS];
};
struct UnkStruct_Main8
{
struct UnkStruct_x20 arr[5];
struct UnkStruct_x20 arr[MAX_RFU_PLAYERS];
};
struct UnkStruct_Leader
struct WirelessLink_Leader
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main8 *field_8;
u8 state;
u8 textState;
u8 field_E;
u8 delayTimerAfterOk;
u8 listWindowId;
u8 field_10;
u8 field_11;
u8 bButtonCancelWindowId;
u8 nPlayerModeWindowId;
u8 listTaskId;
u8 field_13;
u8 field_14;
u8 field_15;
u8 playerCount;
u16 field_14;
u8 field_16;
u8 field_17;
u8 field_18;
u8 field_19;
u16 field_1A;
u8 listenTaskId;
u8 activity;
u8 joinRequestAnswer;
u16 memberConfirmTimeout;
};
struct UnkStruct_Group
struct WirelessLink_Group
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
@ -74,98 +73,96 @@ struct UnkStruct_Group
u8 textState;
u8 field_A;
u8 listWindowId;
u8 field_C;
u8 field_D;
u8 bButtonCancelWindowId;
u8 playerNameAndIdWindowId;
u8 listTaskId;
u8 field_F;
u8 leaderId;
u8 field_10;
u8 field_11;
u8 field_12;
u8 listenTaskId;
u8 isWonderNews;
u8 field_13;
u8 field_14;
u8 field_15;
u8 refreshTimer;
u8 delayBeforePrint;
};
struct UnkStruct_8019BA8
struct UnionRoomObject
{
u8 field_0;
u8 field_1;
s8 field_2;
u8 field_3;
u8 state;
u8 gfxId;
s8 animState;
u8 schedAnim;
};
struct UnkStruct_URoom
struct WirelessLink_URoom
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main0 *field_8;
struct UnkStruct_Main4 *field_C;
u16 field_10;
u16 unknown; // Never read
u16 field_12;
u8 state;
u8 stateAfterPrint;
u8 textState;
u8 field_17;
u8 field_18;
u8 field_19;
u8 field_1A;
u8 field_1B;
u8 field_1C;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u8 field_20;
u8 filler[4];
u8 topListMenuWindowId;
u8 topListMenuId;
u8 tradeBoardSelectWindowId;
u8 tradeBoardDetailsWindowId;
u8 unused1;
u8 searchTaskId;
u8 spriteIds[40];
u8 field_49;
u8 field_4A;
u16 field_4C[6];
u8 field_58[0x98 - 0x58];
u16 field_98;
u16 field_9A[3];
struct UnkStruct_8019BA8 field_A0[8];
u8 field_C0[12][15];
u8 field_174[48];
u8 field_1A4[200];
u8 unused2;
u8 tradeBoardListMenuId;
u16 playerSendBuffer[6];
u8 activityRequestStrbufs[4][16];
u16 partnerYesNoResponse;
u16 recvActivityRequest[3];
struct UnionRoomObject objects[MAX_UNION_ROOM_PLAYERS];
u8 trainerCardStrBuffer[12][15];
u8 trainerCardColorStrBuffer[48];
u8 trainerCardMsgStrBuffer[200];
};
union UnkUnion_Main
union WirelessLink_Main
{
struct UnkStruct_Leader *leader;
struct UnkStruct_Group *group;
struct UnkStruct_URoom *uRoom;
struct WirelessLink_Leader *leader;
struct WirelessLink_Group *group;
struct WirelessLink_URoom *uRoom;
};
struct UnionRoomTrade
{
u16 field_0;
u16 state;
u16 type;
u32 playerPersonality;
u8 field_8;
u8 field_9;
u8 offerPlayerId;
u8 filler1;
u16 playerSpecies;
u16 playerLevel;
u16 species;
u16 level;
u16 field_12;
u16 filler2;
u32 personality;
};
// Exported RAM declarations
extern u8 gUnknown_02022C2C;
extern union UnkUnion_Main gUnknown_02022C30;
extern struct GFtgtGnameSub gUnknown_02022C38;
extern u8 gPlayerCurrActivity;
extern union WirelessLink_Main gUnknown_02022C30;
extern struct GFtgtGnameSub gPartnerTgtGnameSub;
extern u16 gUnionRoomOfferedSpecies;
extern u8 gUnionRoomRequestedMonType;
// Exported ROM declarations
u8 sub_8013F78(void);
void nullsub_89(u8 taskId);
void var_800D_set_xB(void);
u8 CreateTask_CreateTradeMenu(void);
void SetUsingUnionRoomStartMenu(void);
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
void MEvent_CreateTask_Leader(u32 arg0);
u8 CreateTask_ListenToWireless(void);
void StartUnionRoomBattle(u16 battleFlags);
#endif //GUARD_UNION_ROOM_H

View File

@ -1,7 +1,6 @@
#ifndef GUARD_UNION_ROOM_BATTLE_H
#define GUARD_UNION_ROOM_BATTLE_H
u8 sub_8013C40(void);
void sub_8014210(u16 battleFlags);
void CB2_UnionRoomBattle(void);
#endif //GUARD_UNION_ROOM_BATTLE_H

View File

@ -1,18 +1,7 @@
#ifndef GUARD_UNION_ROOM_CHAT_H
#define GUARD_UNION_ROOM_CHAT_H
enum
{
UNION_ROOM_KB_PAGE_UPPER,
UNION_ROOM_KB_PAGE_LOWER,
UNION_ROOM_KB_PAGE_EMOJI,
UNION_ROOM_KB_PAGE_COUNT
};
#define UNION_ROOM_KB_ROW_COUNT 10
void sub_801DD98(void);
void copy_strings_to_sav1(void);
void EnterUnionRoomChat(void);
void InitUnionRoomChatRegisteredTexts(void);
#endif // GUARD_UNION_ROOM_CHAT_H

View File

@ -1,14 +1,14 @@
#ifndef GUARD_UNION_ROOM_PLAYER_AVATAR_H
#define GUARD_UNION_ROOM_PLAYER_AVATAR_H
u8 sub_8019BA8(struct UnkStruct_8019BA8 * ptr);
void sub_8019E3C(void);
void sub_8019E70(u8 *arg0, s32 arg1);
void sub_8019F04(u8 *spriteIds);
void sub_8019F2C(void);
void sub_801A274(struct UnkStruct_URoom *arg0);
void sub_801A284(struct UnkStruct_URoom *arg0);
bool32 sub_801A2A8(struct UnkStruct_Main0 *arg0, s16 *arg1, s16 *arg2, u8 *arg3);
void sub_801A3D0(u32 arg0, u32 arg1, struct UnkStruct_Main0 *arg2);
u8 InitUnionRoomPlayerObjects(struct UnionRoomObject *players);
void DestroyUnionRoomPlayerObjects(void);
void CreateGroupMemberSpritesInvisible(u8 *spriteIds, s32 playerIdx);
void DestroyGroupMemberSprites(u8 *spriteIds);
void SetTilesAroundUnionRoomPlayersPassable(void);
void ScheduleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom);
void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom);
bool32 TryInteractWithUnionRoomMember(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds);
void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct UnkStruct_Main0 *main0);
#endif //GUARD_UNION_ROOM_PLAYER_AVATAR_H

View File

@ -65,6 +65,7 @@ SECTIONS {
src/union_room.o(.text);
src/mystery_gift.o(.text);
src/union_room_player_avatar.o(.text);
src/wireless_communication_status_screen.o(.text);
src/union_room_battle.o(.text);
src/mevent2.o(.text);
src/mevent_801BAAC.o(.text);
@ -169,7 +170,7 @@ SECTIONS {
src/record_mixing.o(.text);
src/secret_base.o(.text);
src/tv.o(.text);
src/contest_link_80F57C4.o(.text);
src/contest_util.o(.text);
src/script_pokemon_util_80F87D8.o(.text);
src/field_poison.o(.text);
src/pokemon_size_record.o(.text);
@ -177,7 +178,7 @@ SECTIONS {
src/field_special_scene.o(.text);
src/rotating_gate.o(.text);
src/safari_zone.o(.text);
src/contest_link_80FC4F4.o(.text);
src/contest_link.o(.text);
src/item_use.o(.text);
src/battle_anim_effects_1.o(.text);
src/battle_anim_effects_2.o(.text);
@ -239,7 +240,7 @@ SECTIONS {
src/cable_car.o(.text);
src/math_util.o(.text);
src/roulette_util.o(.text);
src/rom_81520A8.o(.text);
src/confetti_util.o(.text);
src/save.o(.text);
src/mystery_event_script.o(.text);
src/field_effect_helpers.o(.text);
@ -330,7 +331,7 @@ SECTIONS {
src/trainer_hill.o(.text);
src/rayquaza_scene.o(.text);
src/walda_phrase.o(.text);
src/contest_link_81D9DE4.o(.text);
src/contest_link_util.o(.text);
src/gym_leader_rematch.o(.text);
src/unk_transition.o(.text);
src/international_string_util.o(.text);
@ -452,6 +453,7 @@ SECTIONS {
src/union_room.o(.rodata);
src/mystery_gift.o(.rodata);
src/union_room_player_avatar.o(.rodata);
src/wireless_communication_status_screen.o(.rodata);
src/union_room_battle.o(.rodata);
src/mevent2.o(.rodata);
src/mevent_801BAAC.o(.rodata);
@ -545,13 +547,13 @@ SECTIONS {
src/record_mixing.o(.rodata);
src/secret_base.o(.rodata);
src/tv.o(.rodata);
src/contest_link_80F57C4.o(.rodata);
src/contest_util.o(.rodata);
src/script_pokemon_util_80F87D8.o(.rodata);
src/pokemon_size_record.o(.rodata)
src/fldeff_misc.o(.rodata);
src/field_special_scene.o(.rodata);
src/rotating_gate.o(.rodata);
src/contest_link_80FC4F4.o(.rodata);
src/contest_link.o(.rodata);
src/item_use.o(.rodata);
src/battle_anim_effects_1.o(.rodata);
src/battle_anim_effects_2.o(.rodata);

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More