mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 03:04:15 +01:00
Cleaned trailing whitespace
This commit is contained in:
parent
91cba0e648
commit
65108c3192
@ -106,7 +106,7 @@ cd /mnt/c/Users/<user>/Desktop/decomps
|
|||||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
|
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
|
||||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
If this works, then proceed to [Installation](#installation).
|
If this works, then proceed to [Installation](#installation).
|
||||||
|
|
||||||
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
|
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
|
||||||
@ -216,7 +216,7 @@ Note that the directory **must exist** in Windows. If you want to store pokeemer
|
|||||||
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
|
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
|
||||||
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
|
||||||
|
|
||||||
## macOS
|
## macOS
|
||||||
@ -539,7 +539,7 @@ devkitARM is now installed.
|
|||||||
devkitARM is now installed.
|
devkitARM is now installed.
|
||||||
|
|
||||||
### Installing devkitARM on Arch Linux
|
### Installing devkitARM on Arch Linux
|
||||||
|
|
||||||
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
|
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
|
||||||
2. Install `gba-dev`: run the following command as root.
|
2. Install `gba-dev`: run the following command as root.
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -254,7 +254,7 @@ tidynonmodern:
|
|||||||
tidymodern:
|
tidymodern:
|
||||||
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
|
rm -f $(MODERN_ROM_NAME) $(MODERN_ELF_NAME) $(MODERN_MAP_NAME)
|
||||||
rm -rf $(MODERN_OBJ_DIR_NAME)
|
rm -rf $(MODERN_OBJ_DIR_NAME)
|
||||||
|
|
||||||
ifneq ($(MODERN),0)
|
ifneq ($(MODERN),0)
|
||||||
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
||||||
endif
|
endif
|
||||||
@ -410,7 +410,7 @@ LD_SCRIPT := ld_script.txt
|
|||||||
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
|
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
|
||||||
else
|
else
|
||||||
LD_SCRIPT := ld_script_modern.txt
|
LD_SCRIPT := ld_script_modern.txt
|
||||||
LD_SCRIPT_DEPS :=
|
LD_SCRIPT_DEPS :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
||||||
|
@ -550,38 +550,38 @@
|
|||||||
.2byte \param1
|
.2byte \param1
|
||||||
.4byte \param2
|
.4byte \param2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ useful script macros
|
@ useful script macros
|
||||||
.macro get_curr_move_type
|
.macro get_curr_move_type
|
||||||
get_type AI_TYPE_MOVE
|
get_type AI_TYPE_MOVE
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_user_type1
|
.macro get_user_type1
|
||||||
get_type AI_TYPE1_USER
|
get_type AI_TYPE1_USER
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_user_type2
|
.macro get_user_type2
|
||||||
get_type AI_TYPE2_USER
|
get_type AI_TYPE2_USER
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_target_type1
|
.macro get_target_type1
|
||||||
get_type AI_TYPE1_TARGET
|
get_type AI_TYPE1_TARGET
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro get_target_type2
|
.macro get_target_type2
|
||||||
get_type AI_TYPE2_TARGET
|
get_type AI_TYPE2_TARGET
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_ability battler:req, ability:req, ptr:req
|
.macro if_ability battler:req, ability:req, ptr:req
|
||||||
check_ability \battler, \ability
|
check_ability \battler, \ability
|
||||||
if_equal 1, \ptr
|
if_equal 1, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_no_ability battler:req, ability:req, ptr:req
|
.macro if_no_ability battler:req, ability:req, ptr:req
|
||||||
check_ability \battler, \ability
|
check_ability \battler, \ability
|
||||||
if_equal 0, \ptr
|
if_equal 0, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_type battler:req, type:req, ptr:req
|
.macro if_type battler:req, type:req, ptr:req
|
||||||
is_of_type \battler, \type
|
is_of_type \battler, \type
|
||||||
if_equal 1, \ptr
|
if_equal 1, \ptr
|
||||||
@ -591,20 +591,20 @@
|
|||||||
is_of_type \battler, \type
|
is_of_type \battler, \type
|
||||||
if_equal 0, \ptr
|
if_equal 0, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_target_faster ptr:req
|
.macro if_target_faster ptr:req
|
||||||
if_user_goes 1, \ptr
|
if_user_goes 1, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_user_faster ptr:req
|
.macro if_user_faster ptr:req
|
||||||
if_user_goes 0, \ptr
|
if_user_goes 0, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_double_battle ptr:req
|
.macro if_double_battle ptr:req
|
||||||
is_double_battle
|
is_double_battle
|
||||||
if_equal 1, \ptr
|
if_equal 1, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_not_double_battle ptr:req
|
.macro if_not_double_battle ptr:req
|
||||||
is_double_battle
|
is_double_battle
|
||||||
if_equal 0, \ptr
|
if_equal 0, \ptr
|
||||||
@ -613,7 +613,7 @@
|
|||||||
.macro if_any_move_disabled battler:req, ptr:req
|
.macro if_any_move_disabled battler:req, ptr:req
|
||||||
if_any_move_disabled_or_encored \battler, 0, \ptr
|
if_any_move_disabled_or_encored \battler, 0, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro if_any_move_encored battler:req, ptr:req
|
.macro if_any_move_encored battler:req, ptr:req
|
||||||
if_any_move_disabled_or_encored \battler, 1, \ptr
|
if_any_move_disabled_or_encored \battler, 1, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
@ -270,16 +270,16 @@
|
|||||||
.macro stopsound
|
.macro stopsound
|
||||||
.byte 0x2f
|
.byte 0x2f
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ useful macros
|
@ useful macros
|
||||||
.macro jumpreteq value:req, ptr:req
|
.macro jumpreteq value:req, ptr:req
|
||||||
jumpargeq ARG_RET_ID, \value, \ptr
|
jumpargeq ARG_RET_ID, \value, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumprettrue ptr:req
|
.macro jumprettrue ptr:req
|
||||||
jumpreteq TRUE, \ptr
|
jumpreteq TRUE, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpretfalse ptr:req
|
.macro jumpretfalse ptr:req
|
||||||
jumpreteq FALSE, \ptr
|
jumpreteq FALSE, \ptr
|
||||||
.endm
|
.endm
|
||||||
|
@ -410,33 +410,33 @@
|
|||||||
.byte \endMode
|
.byte \endMode
|
||||||
.byte \endState
|
.byte \endState
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Help macros for 5 uses of moveend command
|
@ Help macros for 5 uses of moveend command
|
||||||
|
|
||||||
@ All cases
|
@ All cases
|
||||||
.macro moveendall
|
.macro moveendall
|
||||||
setbyte sMOVEEND_STATE, 0
|
setbyte sMOVEEND_STATE, 0
|
||||||
moveend 0, 0
|
moveend 0, 0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Chosen case
|
@ Chosen case
|
||||||
.macro moveendcase case:req
|
.macro moveendcase case:req
|
||||||
setbyte sMOVEEND_STATE, \case
|
setbyte sMOVEEND_STATE, \case
|
||||||
moveend 1, 0
|
moveend 1, 0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ All cases from (inclusive)
|
@ All cases from (inclusive)
|
||||||
.macro moveendfrom from:req
|
.macro moveendfrom from:req
|
||||||
setbyte sMOVEEND_STATE, \from
|
setbyte sMOVEEND_STATE, \from
|
||||||
moveend 0, 0
|
moveend 0, 0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ All cases from 0 to (not inclusive)
|
@ All cases from 0 to (not inclusive)
|
||||||
.macro moveendto to:req
|
.macro moveendto to:req
|
||||||
setbyte sMOVEEND_STATE, 0
|
setbyte sMOVEEND_STATE, 0
|
||||||
moveend 2, \to
|
moveend 2, \to
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Cases from (inclusive) to (not inclusive)
|
@ Cases from (inclusive) to (not inclusive)
|
||||||
.macro moveendfromto from:req, to:req
|
.macro moveendfromto from:req, to:req
|
||||||
setbyte sMOVEEND_STATE, \from
|
setbyte sMOVEEND_STATE, \from
|
||||||
@ -1252,165 +1252,165 @@
|
|||||||
.byte 0xf8
|
.byte 0xf8
|
||||||
.byte \position
|
.byte \position
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ various command changed to more readable macros
|
@ various command changed to more readable macros
|
||||||
.macro cancelmultiturnmoves battler:req
|
.macro cancelmultiturnmoves battler:req
|
||||||
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setmagiccoattarget battler:req
|
.macro setmagiccoattarget battler:req
|
||||||
various \battler, VARIOUS_SET_MAGIC_COAT_TARGET
|
various \battler, VARIOUS_SET_MAGIC_COAT_TARGET
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro getifcantrunfrombattle battler:req
|
.macro getifcantrunfrombattle battler:req
|
||||||
various \battler, VARIOUS_IS_RUNNING_IMPOSSIBLE
|
various \battler, VARIOUS_IS_RUNNING_IMPOSSIBLE
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro getmovetarget battler:req
|
.macro getmovetarget battler:req
|
||||||
various \battler, VARIOUS_GET_MOVE_TARGET
|
various \battler, VARIOUS_GET_MOVE_TARGET
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro getbattlerfainted battler:req
|
.macro getbattlerfainted battler:req
|
||||||
various \battler, VARIOUS_GET_BATTLER_FAINTED
|
various \battler, VARIOUS_GET_BATTLER_FAINTED
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro resetintimidatetracebits battler:req
|
.macro resetintimidatetracebits battler:req
|
||||||
various \battler, VARIOUS_RESET_INTIMIDATE_TRACE_BITS
|
various \battler, VARIOUS_RESET_INTIMIDATE_TRACE_BITS
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro updatechoicemoveonlvlup battler:req
|
.macro updatechoicemoveonlvlup battler:req
|
||||||
various \battler, VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP
|
various \battler, VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro resetplayerfainted
|
.macro resetplayerfainted
|
||||||
various BS_ATTACKER, VARIOUS_RESET_PLAYER_FAINTED
|
various BS_ATTACKER, VARIOUS_RESET_PLAYER_FAINTED
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro palaceflavortext battler:req
|
.macro palaceflavortext battler:req
|
||||||
various \battler, VARIOUS_PALACE_FLAVOR_TEXT
|
various \battler, VARIOUS_PALACE_FLAVOR_TEXT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenajudgmentwindow
|
.macro arenajudgmentwindow
|
||||||
various BS_ATTACKER, VARIOUS_ARENA_JUDGMENT_WINDOW
|
various BS_ATTACKER, VARIOUS_ARENA_JUDGMENT_WINDOW
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenaopponentmonlost
|
.macro arenaopponentmonlost
|
||||||
various BS_ATTACKER, VARIOUS_ARENA_OPPONENT_MON_LOST
|
various BS_ATTACKER, VARIOUS_ARENA_OPPONENT_MON_LOST
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenaplayermonlost
|
.macro arenaplayermonlost
|
||||||
various BS_ATTACKER, VARIOUS_ARENA_PLAYER_MON_LOST
|
various BS_ATTACKER, VARIOUS_ARENA_PLAYER_MON_LOST
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenabothmonlost
|
.macro arenabothmonlost
|
||||||
various BS_ATTACKER, VARIOUS_ARENA_BOTH_MONS_LOST
|
various BS_ATTACKER, VARIOUS_ARENA_BOTH_MONS_LOST
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro forfeityesnobox battler:req
|
.macro forfeityesnobox battler:req
|
||||||
various \battler, VARIOUS_EMIT_YESNOBOX
|
various \battler, VARIOUS_EMIT_YESNOBOX
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenadrawreftextbox
|
.macro arenadrawreftextbox
|
||||||
various BS_ATTACKER, VARIOUS_DRAW_ARENA_REF_TEXT_BOX
|
various BS_ATTACKER, VARIOUS_DRAW_ARENA_REF_TEXT_BOX
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenaerasereftextbox
|
.macro arenaerasereftextbox
|
||||||
various BS_ATTACKER, VARIOUS_ERASE_ARENA_REF_TEXT_BOX
|
various BS_ATTACKER, VARIOUS_ERASE_ARENA_REF_TEXT_BOX
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenajudgmentstring id:req
|
.macro arenajudgmentstring id:req
|
||||||
various \id, VARIOUS_ARENA_JUDGMENT_STRING
|
various \id, VARIOUS_ARENA_JUDGMENT_STRING
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro arenawaitmessage id:req
|
.macro arenawaitmessage id:req
|
||||||
various \id, VARIOUS_ARENA_WAIT_STRING
|
various \id, VARIOUS_ARENA_WAIT_STRING
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro waitcry battler:req
|
.macro waitcry battler:req
|
||||||
various \battler, VARIOUS_WAIT_CRY
|
various \battler, VARIOUS_WAIT_CRY
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro returnopponentmon1toball battler:req
|
.macro returnopponentmon1toball battler:req
|
||||||
various \battler, VARIOUS_RETURN_OPPONENT_MON1
|
various \battler, VARIOUS_RETURN_OPPONENT_MON1
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro returnopponentmon2toball battler:req
|
.macro returnopponentmon2toball battler:req
|
||||||
various \battler, VARIOUS_RETURN_OPPONENT_MON2
|
various \battler, VARIOUS_RETURN_OPPONENT_MON2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro volumedown
|
.macro volumedown
|
||||||
various BS_ATTACKER, VARIOUS_VOLUME_DOWN
|
various BS_ATTACKER, VARIOUS_VOLUME_DOWN
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro volumeup
|
.macro volumeup
|
||||||
various BS_ATTACKER, VARIOUS_VOLUME_UP
|
various BS_ATTACKER, VARIOUS_VOLUME_UP
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setalreadystatusedmoveattempt battler:req
|
.macro setalreadystatusedmoveattempt battler:req
|
||||||
various \battler, VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT
|
various \battler, VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro palacetryescapestatus battler:req
|
.macro palacetryescapestatus battler:req
|
||||||
various \battler, VARIOUS_PALACE_TRY_ESCAPE_STATUS
|
various \battler, VARIOUS_PALACE_TRY_ESCAPE_STATUS
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setoutcomeonteleport battler:req
|
.macro setoutcomeonteleport battler:req
|
||||||
various \battler, VARIOUS_SET_TELEPORT_OUTCOME
|
various \battler, VARIOUS_SET_TELEPORT_OUTCOME
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro playtrainerdefeatbgm battler:req
|
.macro playtrainerdefeatbgm battler:req
|
||||||
various \battler, VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC
|
various \battler, VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7
|
setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setmoveeffect effect:req
|
.macro setmoveeffect effect:req
|
||||||
setbyte cEFFECT_CHOOSER, \effect
|
setbyte cEFFECT_CHOOSER, \effect
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro chosenstatus1animation battler:req, status:req
|
.macro chosenstatus1animation battler:req, status:req
|
||||||
chosenstatusanimation \battler, 0x0, \status
|
chosenstatusanimation \battler, 0x0, \status
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro chosenstatus2animation battler:req, status:req
|
.macro chosenstatus2animation battler:req, status:req
|
||||||
chosenstatusanimation \battler, 0x1, \status
|
chosenstatusanimation \battler, 0x1, \status
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro sethword dst:req, value:req
|
.macro sethword dst:req, value:req
|
||||||
setbyte \dst, (\value) & 0xFF
|
setbyte \dst, (\value) & 0xFF
|
||||||
setbyte \dst + 1, ((\value) >> 8) & 0xFF
|
setbyte \dst + 1, ((\value) >> 8) & 0xFF
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setword dst:req, value:req
|
.macro setword dst:req, value:req
|
||||||
setbyte \dst, (\value) & 0xFF
|
setbyte \dst, (\value) & 0xFF
|
||||||
setbyte \dst + 1, ((\value) >> 8) & 0xFF
|
setbyte \dst + 1, ((\value) >> 8) & 0xFF
|
||||||
setbyte \dst + 2, ((\value) >> 16) & 0xFF
|
setbyte \dst + 2, ((\value) >> 16) & 0xFF
|
||||||
setbyte \dst + 3, ((\value) >> 24) & 0xFF
|
setbyte \dst + 3, ((\value) >> 24) & 0xFF
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copybyte dst:req, src:req
|
.macro copybyte dst:req, src:req
|
||||||
copyarray \dst, \src, 0x1
|
copyarray \dst, \src, 0x1
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copyhword dst:req, src:req
|
.macro copyhword dst:req, src:req
|
||||||
copyarray \dst, \src, 0x2
|
copyarray \dst, \src, 0x2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copyword dst:req, src:req
|
.macro copyword dst:req, src:req
|
||||||
copyarray \dst, \src, 0x4
|
copyarray \dst, \src, 0x4
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifbytenotequal byte1:req, byte2:req, jumpptr:req
|
.macro jumpifbytenotequal byte1:req, byte2:req, jumpptr:req
|
||||||
jumpifarraynotequal \byte1, \byte2, 0x1, \jumpptr
|
jumpifarraynotequal \byte1, \byte2, 0x1, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifbyteequal byte1:req, byte2:req, jumpptr:req
|
.macro jumpifbyteequal byte1:req, byte2:req, jumpptr:req
|
||||||
jumpifarrayequal \byte1, \byte2, 0x1, \jumpptr
|
jumpifarrayequal \byte1, \byte2, 0x1, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifmove move:req, jumpptr:req
|
.macro jumpifmove move:req, jumpptr:req
|
||||||
jumpifhalfword CMP_EQUAL, gCurrentMove, \move, \jumpptr
|
jumpifhalfword CMP_EQUAL, gCurrentMove, \move, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
@ -1418,23 +1418,23 @@
|
|||||||
.macro jumpifnotmove move:req, jumpptr:req
|
.macro jumpifnotmove move:req, jumpptr:req
|
||||||
jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpptr
|
jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
|
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
|
||||||
jumpifstatus3condition \battler, \status, FALSE, \jumpptr
|
jumpifstatus3condition \battler, \status, FALSE, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnostatus3 battler:req, status:req, jumpptr:req
|
.macro jumpifnostatus3 battler:req, status:req, jumpptr:req
|
||||||
jumpifstatus3condition \battler, \status, TRUE, \jumpptr
|
jumpifstatus3condition \battler, \status, TRUE, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifmovehadnoeffect jumpptr:req
|
.macro jumpifmovehadnoeffect jumpptr:req
|
||||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_NO_EFFECT, \jumpptr
|
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_NO_EFFECT, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifbattletype flags:req, jumpptr:req
|
.macro jumpifbattletype flags:req, jumpptr:req
|
||||||
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
|
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnotbattletype flags:req, jumpptr:req
|
.macro jumpifnotbattletype flags:req, jumpptr:req
|
||||||
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
|
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
@ -276,7 +276,7 @@
|
|||||||
.2byte SPECIAL_\function
|
.2byte SPECIAL_\function
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
|
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
|
||||||
@ commands and specials. Calling ScriptContext_Enable for instance will allow execution to continue.
|
@ commands and specials. Calling ScriptContext_Enable for instance will allow execution to continue.
|
||||||
.macro waitstate
|
.macro waitstate
|
||||||
.byte 0x27
|
.byte 0x27
|
||||||
@ -985,7 +985,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
|
@ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
|
||||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||||
.macro givemon species:req, level:req, item=ITEM_NONE
|
.macro givemon species:req, level:req, item=ITEM_NONE
|
||||||
.byte 0x79
|
.byte 0x79
|
||||||
.2byte \species
|
.2byte \species
|
||||||
@ -997,7 +997,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Gives the player an Egg of the specified species.
|
@ Gives the player an Egg of the specified species.
|
||||||
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
|
||||||
.macro giveegg species:req
|
.macro giveegg species:req
|
||||||
.byte 0x7a
|
.byte 0x7a
|
||||||
.2byte \species
|
.2byte \species
|
||||||
@ -1415,7 +1415,7 @@
|
|||||||
.2byte \out
|
.2byte \out
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
|
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
|
||||||
@ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE.
|
@ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE.
|
||||||
.macro addcoins count:req
|
.macro addcoins count:req
|
||||||
.byte 0xb4
|
.byte 0xb4
|
||||||
@ -1887,7 +1887,7 @@
|
|||||||
|
|
||||||
@ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare.
|
@ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare.
|
||||||
@ If the player doesn't have space for all the items then as many are added as possible, the
|
@ If the player doesn't have space for all the items then as many are added as possible, the
|
||||||
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
|
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
|
||||||
@ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s).
|
@ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s).
|
||||||
.macro giveitem item:req, amount=1
|
.macro giveitem item:req, amount=1
|
||||||
setorcopyvar VAR_0x8000, \item
|
setorcopyvar VAR_0x8000, \item
|
||||||
|
@ -1909,7 +1909,7 @@ AI_CV_Protect4:
|
|||||||
if_random_less_than 128, AI_CV_Protect_End
|
if_random_less_than 128, AI_CV_Protect_End
|
||||||
score -1
|
score -1
|
||||||
goto AI_CV_Protect_End
|
goto AI_CV_Protect_End
|
||||||
|
|
||||||
AI_CV_Protect3:
|
AI_CV_Protect3:
|
||||||
get_last_used_bank_move AI_TARGET
|
get_last_used_bank_move AI_TARGET
|
||||||
get_move_effect_from_result
|
get_move_effect_from_result
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
.include "constants/constants.inc"
|
.include "constants/constants.inc"
|
||||||
|
|
||||||
.section script_data, "aw", %progbits
|
.section script_data, "aw", %progbits
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleScriptsForMoveEffects::
|
gBattleScriptsForMoveEffects::
|
||||||
.4byte BattleScript_EffectHit @ EFFECT_HIT
|
.4byte BattleScript_EffectHit @ EFFECT_HIT
|
||||||
@ -2826,7 +2826,7 @@ BattleScript_GiveExp::
|
|||||||
setbyte sGIVEEXP_STATE, 0
|
setbyte sGIVEEXP_STATE, 0
|
||||||
getexp BS_TARGET
|
getexp BS_TARGET
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_HandleFaintedMon::
|
BattleScript_HandleFaintedMon::
|
||||||
checkteamslost BattleScript_LinkHandleFaintedMonMultiple
|
checkteamslost BattleScript_LinkHandleFaintedMonMultiple
|
||||||
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd
|
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd
|
||||||
@ -4046,7 +4046,7 @@ BattleScript_IntimidatePrevented:
|
|||||||
printstring STRINGID_PREVENTEDFROMWORKING
|
printstring STRINGID_PREVENTEDFROMWORKING
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
goto BattleScript_IntimidateActivatesLoopIncrement
|
goto BattleScript_IntimidateActivatesLoopIncrement
|
||||||
|
|
||||||
BattleScript_DroughtActivates::
|
BattleScript_DroughtActivates::
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
printstring STRINGID_PKMNSXINTENSIFIEDSUN
|
printstring STRINGID_PKMNSXINTENSIFIEDSUN
|
||||||
|
@ -38,7 +38,7 @@ EventScript_ResetAllBerries::
|
|||||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_3, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_3, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_2, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_2, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_1, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree BERRY_TREE_ROUTE_117_WEPEAR_1, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
@ Route 112
|
@ Route 112
|
||||||
setberrytree BERRY_TREE_ROUTE_112_RAWST_2, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
setberrytree BERRY_TREE_ROUTE_112_RAWST_2, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree BERRY_TREE_ROUTE_112_PECHA_2, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree BERRY_TREE_ROUTE_112_PECHA_2, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
@ -22,7 +22,7 @@ Roulette_EventScript_Play::
|
|||||||
special PlayRoulette
|
special PlayRoulette
|
||||||
waitstate
|
waitstate
|
||||||
end
|
end
|
||||||
|
|
||||||
Roulette_Text_PlayMinimumWagerIsX::
|
Roulette_Text_PlayMinimumWagerIsX::
|
||||||
.string "The minimum wager at this table\n"
|
.string "The minimum wager at this table\n"
|
||||||
.string "is {STR_VAR_1}. Do you want to play?$"
|
.string "is {STR_VAR_1}. Do you want to play?$"
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
cd /mnt/c/Users/<user>/Downloads
|
cd /mnt/c/Users/<user>/Downloads
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
|
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
|
||||||
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Downloads folder"`.
|
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Downloads folder"`.
|
||||||
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
|
||||||
|
|
||||||
4. Once the directory has been changed to the folder containing the devkitPro pacman package, run the following commands to install devkitARM.
|
4. Once the directory has been changed to the folder containing the devkitPro pacman package, run the following commands to install devkitARM.
|
||||||
|
@ -73,7 +73,7 @@ static const u8 sDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_alt
|
|||||||
static const u8 sUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp");
|
static const u8 sUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp");
|
||||||
static const u8 sUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp");
|
static const u8 sUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp");
|
||||||
static const u8 sDownArrowYCoords[] = { 0, 1, 2, 1 };
|
static const u8 sDownArrowYCoords[] = { 0, 1, 2, 1 };
|
||||||
static const u8 sWindowVerticalScrollSpeeds[] = {
|
static const u8 sWindowVerticalScrollSpeeds[] = {
|
||||||
[OPTIONS_TEXT_SPEED_SLOW] = 1,
|
[OPTIONS_TEXT_SPEED_SLOW] = 1,
|
||||||
[OPTIONS_TEXT_SPEED_MID] = 2,
|
[OPTIONS_TEXT_SPEED_MID] = 2,
|
||||||
[OPTIONS_TEXT_SPEED_FAST] = 4,
|
[OPTIONS_TEXT_SPEED_FAST] = 4,
|
||||||
@ -299,7 +299,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sTempTextPrinter.textSpeed = 0;
|
sTempTextPrinter.textSpeed = 0;
|
||||||
|
|
||||||
// Render all text (up to limit) at once
|
// Render all text (up to limit) at once
|
||||||
for (j = 0; j < 0x400; ++j)
|
for (j = 0; j < 0x400; ++j)
|
||||||
{
|
{
|
||||||
|
@ -93,35 +93,35 @@ $(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png
|
|||||||
SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim
|
SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \
|
$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
||||||
@cat $^ >$@
|
@cat $^ >$@
|
||||||
|
|
||||||
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
||||||
@ -671,7 +671,7 @@ $(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
|||||||
|
|
||||||
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
||||||
|
|
||||||
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 43 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 43 -Wnum_tiles
|
||||||
|
|
||||||
@ -699,7 +699,7 @@ $(PKNAVGFXDIR)/header.4bpp: %.4bpp: %.png
|
|||||||
|
|
||||||
$(PKNAVGFXDIR)/device_outline.4bpp: %.4bpp: %.png
|
$(PKNAVGFXDIR)/device_outline.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 53 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 53 -Wnum_tiles
|
||||||
|
|
||||||
$(PKNAVGFXDIR)/match_call/ui.4bpp: %.4bpp: %.png
|
$(PKNAVGFXDIR)/match_call/ui.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 13 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 13 -Wnum_tiles
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ struct BattleStruct
|
|||||||
|
|
||||||
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
||||||
|
|
||||||
// NOTE: The members of this struct have hard-coded offsets
|
// NOTE: The members of this struct have hard-coded offsets
|
||||||
// in include/constants/battle_script_commands.h
|
// in include/constants/battle_script_commands.h
|
||||||
struct BattleScripting
|
struct BattleScripting
|
||||||
{
|
{
|
||||||
|
@ -878,7 +878,7 @@ struct MysteryGiftSave
|
|||||||
struct WonderCardMetadata cardMetadata;
|
struct WonderCardMetadata cardMetadata;
|
||||||
u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS];
|
u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS];
|
||||||
struct WonderNewsMetadata newsMetadata;
|
struct WonderNewsMetadata newsMetadata;
|
||||||
u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades
|
u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades
|
||||||
}; // 0x36C 0x3598
|
}; // 0x36C 0x3598
|
||||||
|
|
||||||
// For external event data storage. The majority of these may have never been used.
|
// For external event data storage. The majority of these may have never been used.
|
||||||
|
@ -97,12 +97,12 @@ struct RfuGameCompatibilityData
|
|||||||
// wireless play (the kind the Pokémon games use) the gname data can be used for
|
// wireless play (the kind the Pokémon games use) the gname data can be used for
|
||||||
// anything the developers want. This struct is what GF decided to use it for.
|
// anything the developers want. This struct is what GF decided to use it for.
|
||||||
// It can be up to 13 bytes in size (RFU_GAME_NAME_LENGTH).
|
// It can be up to 13 bytes in size (RFU_GAME_NAME_LENGTH).
|
||||||
// The player's name is sent separately as the username ("uname"), and does not
|
// The player's name is sent separately as the username ("uname"), and does not
|
||||||
// use a struct (gHostRfuUsername).
|
// use a struct (gHostRfuUsername).
|
||||||
struct __attribute__((packed, aligned(2))) RfuGameData
|
struct __attribute__((packed, aligned(2))) RfuGameData
|
||||||
{
|
{
|
||||||
struct RfuGameCompatibilityData compatibility;
|
struct RfuGameCompatibilityData compatibility;
|
||||||
u8 partnerInfo[RFU_CHILD_MAX];
|
u8 partnerInfo[RFU_CHILD_MAX];
|
||||||
u16 tradeSpecies:10;
|
u16 tradeSpecies:10;
|
||||||
u16 tradeType:6;
|
u16 tradeType:6;
|
||||||
u8 activity:7;
|
u8 activity:7;
|
||||||
@ -118,7 +118,7 @@ struct __attribute__((packed, aligned(2))) RfuGameData
|
|||||||
// Bits 0-2 are a shortened trainerId
|
// Bits 0-2 are a shortened trainerId
|
||||||
// Bit 3 is the player's gender
|
// Bit 3 is the player's gender
|
||||||
// Bits 4-6 are unknown/unused
|
// Bits 4-6 are unknown/unused
|
||||||
// Bit 7 is an 'active' flag
|
// Bit 7 is an 'active' flag
|
||||||
#define PINFO_TID_MASK 0x7
|
#define PINFO_TID_MASK 0x7
|
||||||
#define PINFO_GENDER_SHIFT 3
|
#define PINFO_GENDER_SHIFT 3
|
||||||
#define PINFO_ACTIVE_FLAG (1 << 7)
|
#define PINFO_ACTIVE_FLAG (1 << 7)
|
||||||
|
@ -116,7 +116,7 @@ enum
|
|||||||
#define POKENAV_MENU_IDS_START 100000
|
#define POKENAV_MENU_IDS_START 100000
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons
|
POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons
|
||||||
POKENAV_MAIN_MENU_CURSOR_ON_MAP,
|
POKENAV_MAIN_MENU_CURSOR_ON_MAP,
|
||||||
POKENAV_CONDITION_MENU, // The first Condition screen where the player selects Party or Search
|
POKENAV_CONDITION_MENU, // The first Condition screen where the player selects Party or Search
|
||||||
POKENAV_CONDITION_SEARCH_MENU, // The Condition search menu where the player selects a search parameter
|
POKENAV_CONDITION_SEARCH_MENU, // The Condition search menu where the player selects a search parameter
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// In the Union Room the player is only ever connected to ≤ 4 other players.
|
// In the Union Room the player is only ever connected to ≤ 4 other players.
|
||||||
// However, there can be up to MAX_UNION_ROOM_LEADERS (8) object events to
|
// However, there can be up to MAX_UNION_ROOM_LEADERS (8) object events to
|
||||||
// represent leaders of recently discovered link groups, and each of those groups
|
// represent leaders of recently discovered link groups, and each of those groups
|
||||||
// may have up to MAX_RFU_PLAYERS (5) players in it including the leader.
|
// may have up to MAX_RFU_PLAYERS (5) players in it including the leader.
|
||||||
// These players are represented on-screen by NPC sprites drawn around the leader.
|
// These players are represented on-screen by NPC sprites drawn around the leader.
|
||||||
// Thus there can be 40 sprites of other players on-screen, in 8 groups of 5.
|
// Thus there can be 40 sprites of other players on-screen, in 8 groups of 5.
|
||||||
@ -16,7 +16,7 @@
|
|||||||
// The maximum number of recently connected players that can be tracked.
|
// The maximum number of recently connected players that can be tracked.
|
||||||
// Note that this is significantly less than NUM_UNION_ROOM_SPRITES, i.e. not
|
// Note that this is significantly less than NUM_UNION_ROOM_SPRITES, i.e. not
|
||||||
// every player that can be shown in the Union Room can be tracked at once.
|
// every player that can be shown in the Union Room can be tracked at once.
|
||||||
// Information such as a group member's gender can instead be read from partnerInfo
|
// Information such as a group member's gender can instead be read from partnerInfo
|
||||||
// of the leader's RfuGameData by tracking at least all of the group leaders.
|
// of the leader's RfuGameData by tracking at least all of the group leaders.
|
||||||
#define MAX_RFU_PLAYER_LIST_SIZE 16
|
#define MAX_RFU_PLAYER_LIST_SIZE 16
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ static void TranslateSpriteInLissajousCurve(struct Sprite *sprite)
|
|||||||
sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude);
|
sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude);
|
||||||
sprite->sCirclePosX += sprite->sCircleSpeedX;
|
sprite->sCirclePosX += sprite->sCircleSpeedX;
|
||||||
sprite->sCirclePosY += sprite->sCircleSpeedY;
|
sprite->sCirclePosY += sprite->sCircleSpeedY;
|
||||||
|
|
||||||
if (sprite->sCirclePosX >= 0x100)
|
if (sprite->sCirclePosX >= 0x100)
|
||||||
sprite->sCirclePosX -= 0x100;
|
sprite->sCirclePosX -= 0x100;
|
||||||
else if (sprite->sCirclePosX < 0)
|
else if (sprite->sCirclePosX < 0)
|
||||||
@ -2429,7 +2429,7 @@ void AnimTask_AttackerPunchWithTrace(u8 taskId)
|
|||||||
|
|
||||||
dest = (task->tPaletteNum + 16) * 16;
|
dest = (task->tPaletteNum + 16) * 16;
|
||||||
src = (gSprites[task->tBattlerSpriteId].oam.paletteNum + 0x10) * 0x10;
|
src = (gSprites[task->tBattlerSpriteId].oam.paletteNum + 0x10) * 0x10;
|
||||||
|
|
||||||
// Set trace's priority based on battler's subpriority
|
// Set trace's priority based on battler's subpriority
|
||||||
task->tPriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker);
|
task->tPriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker);
|
||||||
if (task->tPriority == 20 || task->tPriority == 40)
|
if (task->tPriority == 20 || task->tPriority == 40)
|
||||||
|
@ -6368,7 +6368,7 @@ static void Cmd_various(void)
|
|||||||
break;
|
break;
|
||||||
case VARIOUS_ARENA_JUDGMENT_WINDOW:
|
case VARIOUS_ARENA_JUDGMENT_WINDOW:
|
||||||
i = BattleArena_ShowJudgmentWindow(&gBattleCommunication[0]);
|
i = BattleArena_ShowJudgmentWindow(&gBattleCommunication[0]);
|
||||||
|
|
||||||
// BattleArena_ShowJudgmentWindow's last state was an intermediate step.
|
// BattleArena_ShowJudgmentWindow's last state was an intermediate step.
|
||||||
// Return without advancing the current instruction so that it will be called again.
|
// Return without advancing the current instruction so that it will be called again.
|
||||||
if (i == ARENA_RESULT_RUNNING)
|
if (i == ARENA_RESULT_RUNNING)
|
||||||
|
@ -390,7 +390,7 @@ static void GenerateOpponentMons(void)
|
|||||||
while (i != FRONTIER_PARTY_SIZE)
|
while (i != FRONTIER_PARTY_SIZE)
|
||||||
{
|
{
|
||||||
sRandMonId = monSet[Random() % numMons];
|
sRandMonId = monSet[Random() % numMons];
|
||||||
|
|
||||||
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
// Ensure none of the opponent's pokemon are the same as the potential rental pokemon for the player
|
||||||
for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++)
|
for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock2Ptr->frontier.rentalMons); j++)
|
||||||
{
|
{
|
||||||
|
@ -2434,7 +2434,7 @@ static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task)
|
|||||||
{
|
{
|
||||||
sTransitionData->BG0HOFS_Lower -= 8;
|
sTransitionData->BG0HOFS_Lower -= 8;
|
||||||
sTransitionData->BG0HOFS_Upper += 8;
|
sTransitionData->BG0HOFS_Upper += 8;
|
||||||
|
|
||||||
// Start player's slide in once the opponent is finished
|
// Start player's slide in once the opponent is finished
|
||||||
if (IsTrainerPicSlideDone(task->tOpponentSpriteId))
|
if (IsTrainerPicSlideDone(task->tOpponentSpriteId))
|
||||||
{
|
{
|
||||||
@ -2770,7 +2770,7 @@ static bool8 Slice_Main(struct Task *task)
|
|||||||
{
|
{
|
||||||
u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i];
|
u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i];
|
||||||
u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + DISPLAY_HEIGHT];
|
u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + DISPLAY_HEIGHT];
|
||||||
|
|
||||||
// Alternate rows
|
// Alternate rows
|
||||||
if (i % 2)
|
if (i % 2)
|
||||||
{
|
{
|
||||||
@ -3251,7 +3251,7 @@ static bool8 RectangularSpiral_Main(struct Task *task)
|
|||||||
// The line moved to a new position, draw the tile.
|
// The line moved to a new position, draw the tile.
|
||||||
done = FALSE;
|
done = FALSE;
|
||||||
position = sRectangularSpiralLines[j].position;
|
position = sRectangularSpiralLines[j].position;
|
||||||
|
|
||||||
// Invert position for the two lines that start at the bottom.
|
// Invert position for the two lines that start at the bottom.
|
||||||
if ((j % 2) == 1)
|
if ((j % 2) == 1)
|
||||||
position = 637 - position;
|
position = 637 - position;
|
||||||
@ -3281,7 +3281,7 @@ static bool8 RectangularSpiral_End(struct Task *task)
|
|||||||
static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line)
|
static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line)
|
||||||
{
|
{
|
||||||
const s16 *moveData = moveDataTable[line->state];
|
const s16 *moveData = moveDataTable[line->state];
|
||||||
|
|
||||||
// Has spiral finished?
|
// Has spiral finished?
|
||||||
// Note that most move data arrays endsin SPIRAL_END but it is
|
// Note that most move data arrays endsin SPIRAL_END but it is
|
||||||
// only ever reached on the final array of spiraling outward.
|
// only ever reached on the final array of spiraling outward.
|
||||||
@ -3294,9 +3294,9 @@ static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, stru
|
|||||||
sDebug_RectangularSpiralData = moveData[2];
|
sDebug_RectangularSpiralData = moveData[2];
|
||||||
sDebug_RectangularSpiralData = moveData[3];
|
sDebug_RectangularSpiralData = moveData[3];
|
||||||
|
|
||||||
// Note that for the two lines originating at the bottom the
|
// Note that for the two lines originating at the bottom the
|
||||||
// position is inverted, so the directions are flipped.
|
// position is inverted, so the directions are flipped.
|
||||||
// i.e. position += 1 is right for the top lines and left
|
// i.e. position += 1 is right for the top lines and left
|
||||||
// for their inverted partners on the bottom.
|
// for their inverted partners on the bottom.
|
||||||
switch (moveData[0])
|
switch (moveData[0])
|
||||||
{
|
{
|
||||||
@ -4170,13 +4170,13 @@ static void InitBlackWipe(s16 *data, s16 startX, s16 startY, s16 endX, s16 endY,
|
|||||||
static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
||||||
{
|
{
|
||||||
u8 numFinished;
|
u8 numFinished;
|
||||||
|
|
||||||
if (tWipeXDist > tWipeYDist)
|
if (tWipeXDist > tWipeYDist)
|
||||||
{
|
{
|
||||||
// X has further to move, move it first
|
// X has further to move, move it first
|
||||||
tWipeCurrX += tWipeXMove;
|
tWipeCurrX += tWipeXMove;
|
||||||
|
|
||||||
// If it has been far enough since Y's
|
// If it has been far enough since Y's
|
||||||
// last move then move it too
|
// last move then move it too
|
||||||
tWipeTemp += tWipeYDist;
|
tWipeTemp += tWipeYDist;
|
||||||
if (tWipeTemp > tWipeXDist)
|
if (tWipeTemp > tWipeXDist)
|
||||||
@ -4190,7 +4190,7 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
|||||||
// Y has further to move, move it first
|
// Y has further to move, move it first
|
||||||
tWipeCurrY += tWipeYMove;
|
tWipeCurrY += tWipeYMove;
|
||||||
|
|
||||||
// If it has been far enough since X's
|
// If it has been far enough since X's
|
||||||
// last move then move it too
|
// last move then move it too
|
||||||
tWipeTemp += tWipeXDist;
|
tWipeTemp += tWipeXDist;
|
||||||
if (tWipeTemp > tWipeYDist)
|
if (tWipeTemp > tWipeYDist)
|
||||||
@ -4201,9 +4201,9 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
|||||||
}
|
}
|
||||||
|
|
||||||
numFinished = 0;
|
numFinished = 0;
|
||||||
|
|
||||||
// Has X coord reached end?
|
// Has X coord reached end?
|
||||||
if ((tWipeXMove > 0 && tWipeCurrX >= tWipeEndX)
|
if ((tWipeXMove > 0 && tWipeCurrX >= tWipeEndX)
|
||||||
|| (tWipeXMove < 0 && tWipeCurrX <= tWipeEndX))
|
|| (tWipeXMove < 0 && tWipeCurrX <= tWipeEndX))
|
||||||
{
|
{
|
||||||
numFinished++;
|
numFinished++;
|
||||||
@ -4212,7 +4212,7 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Has Y coord reached end?
|
// Has Y coord reached end?
|
||||||
if ((tWipeYMove > 0 && tWipeCurrY >= tWipeEndY)
|
if ((tWipeYMove > 0 && tWipeCurrY >= tWipeEndY)
|
||||||
|| (tWipeYMove < 0 && tWipeCurrY <= tWipeEndY))
|
|| (tWipeYMove < 0 && tWipeCurrY <= tWipeEndY))
|
||||||
{
|
{
|
||||||
numFinished++;
|
numFinished++;
|
||||||
|
@ -1147,7 +1147,7 @@ static const union AnimCmd *const sAnimTable_AshPuff[] =
|
|||||||
sAnim_AshPuff,
|
sAnim_AshPuff,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
|
const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff =
|
||||||
{
|
{
|
||||||
.tileTag = TAG_NONE,
|
.tileTag = TAG_NONE,
|
||||||
.paletteTag = FLDEFF_PAL_TAG_ASH,
|
.paletteTag = FLDEFF_PAL_TAG_ASH,
|
||||||
|
@ -1211,7 +1211,7 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight,
|
|||||||
{
|
{
|
||||||
x = mapX + i;
|
x = mapX + i;
|
||||||
attributes = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]);
|
attributes = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]);
|
||||||
if (MetatileBehavior_IsSecretBaseImpassable(attributes & METATILE_ATTR_BEHAVIOR_MASK) == TRUE
|
if (MetatileBehavior_IsSecretBaseImpassable(attributes & METATILE_ATTR_BEHAVIOR_MASK) == TRUE
|
||||||
|| (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (attributes >> METATILE_ATTR_LAYER_SHIFT) != METATILE_LAYER_TYPE_NORMAL))
|
|| (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (attributes >> METATILE_ATTR_LAYER_SHIFT) != METATILE_LAYER_TYPE_NORMAL))
|
||||||
impassableFlag = MAPGRID_COLLISION_MASK;
|
impassableFlag = MAPGRID_COLLISION_MASK;
|
||||||
else
|
else
|
||||||
@ -1482,7 +1482,7 @@ static bool8 IsSecretBaseTrainerSpot(u8 behaviorAt, u16 layerType)
|
|||||||
// Can't place decoration where the player was standing when they interacted with the PC
|
// Can't place decoration where the player was standing when they interacted with the PC
|
||||||
static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 layerType)
|
static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 layerType)
|
||||||
{
|
{
|
||||||
if (x == gTasks[taskId].tInitialX + MAP_OFFSET
|
if (x == gTasks[taskId].tInitialX + MAP_OFFSET
|
||||||
&& y == gTasks[taskId].tInitialY + MAP_OFFSET
|
&& y == gTasks[taskId].tInitialY + MAP_OFFSET
|
||||||
&& layerType != METATILE_LAYER_TYPE_NORMAL)
|
&& layerType != METATILE_LAYER_TYPE_NORMAL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -112,7 +112,7 @@ static bool32 ValidateEReaderConnection(void)
|
|||||||
REG_IME = 0;
|
REG_IME = 0;
|
||||||
*(u64 *)handshakes = *(u64 *)gLink.handshakeBuffer;
|
*(u64 *)handshakes = *(u64 *)gLink.handshakeBuffer;
|
||||||
REG_IME = backupIME;
|
REG_IME = backupIME;
|
||||||
|
|
||||||
// Validate that we are player 1, the EReader is player 2,
|
// Validate that we are player 1, the EReader is player 2,
|
||||||
// and that players 3 and 4 are empty.
|
// and that players 3 and 4 are empty.
|
||||||
if (handshakes[0] == SLAVE_HANDSHAKE && handshakes[1] == EREADER_HANDSHAKE
|
if (handshakes[0] == SLAVE_HANDSHAKE && handshakes[1] == EREADER_HANDSHAKE
|
||||||
@ -154,8 +154,8 @@ enum {
|
|||||||
|
|
||||||
static u32 TryReceiveCard(u8 *state, u16 *timer)
|
static u32 TryReceiveCard(u8 *state, u16 *timer)
|
||||||
{
|
{
|
||||||
if (*state >= RECV_STATE_EXCHANGE
|
if (*state >= RECV_STATE_EXCHANGE
|
||||||
&& *state <= RECV_STATE_WAIT_DISCONNECT
|
&& *state <= RECV_STATE_WAIT_DISCONNECT
|
||||||
&& HasLinkErrorOccurred())
|
&& HasLinkErrorOccurred())
|
||||||
{
|
{
|
||||||
// Return error status if an error occurs
|
// Return error status if an error occurs
|
||||||
|
@ -2623,7 +2623,7 @@ bool8 ObjectEventIsTrainerAndCloseToPlayer(struct ObjectEvent *objectEvent)
|
|||||||
minY = objY - objectEvent->trainerRange_berryTreeId;
|
minY = objY - objectEvent->trainerRange_berryTreeId;
|
||||||
maxX = objX + objectEvent->trainerRange_berryTreeId;
|
maxX = objX + objectEvent->trainerRange_berryTreeId;
|
||||||
maxY = objY + objectEvent->trainerRange_berryTreeId;
|
maxY = objY + objectEvent->trainerRange_berryTreeId;
|
||||||
if (minX > playerX || maxX < playerX
|
if (minX > playerX || maxX < playerX
|
||||||
|| minY > playerY || maxY < playerY)
|
|| minY > playerY || maxY < playerY)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ static const struct PacifidlogMetatileOffsets *GetPacifidlogBridgeMetatileOffset
|
|||||||
static void TrySetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap)
|
static void TrySetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap)
|
||||||
{
|
{
|
||||||
offsets = GetPacifidlogBridgeMetatileOffsets(offsets, MapGridGetMetatileBehaviorAt(x, y));
|
offsets = GetPacifidlogBridgeMetatileOffsets(offsets, MapGridGetMetatileBehaviorAt(x, y));
|
||||||
|
|
||||||
// If offsets is NULL, position is not a log (don't set it)
|
// If offsets is NULL, position is not a log (don't set it)
|
||||||
if (offsets)
|
if (offsets)
|
||||||
{
|
{
|
||||||
@ -301,7 +301,7 @@ static bool32 ShouldRaisePacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY)
|
|||||||
}
|
}
|
||||||
else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(oldBehavior))
|
else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(oldBehavior))
|
||||||
{
|
{
|
||||||
// Still on same one if moved from left to right
|
// Still on same one if moved from left to right
|
||||||
if (newX > oldX)
|
if (newX > oldX)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -340,13 +340,13 @@ static bool32 ShouldSinkPacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY)
|
|||||||
}
|
}
|
||||||
else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(newBehavior))
|
else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(newBehavior))
|
||||||
{
|
{
|
||||||
// Still on same one if moved from right to left
|
// Still on same one if moved from right to left
|
||||||
if (newX < oldX)
|
if (newX < oldX)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(newBehavior))
|
else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(newBehavior))
|
||||||
{
|
{
|
||||||
// Still on same one if moved from left to right
|
// Still on same one if moved from left to right
|
||||||
if (newX > oldX)
|
if (newX > oldX)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -371,7 +371,7 @@ static void PacifidlogBridgePerStepCallback(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
tPrevX = x;
|
tPrevX = x;
|
||||||
tPrevY = y;
|
tPrevY = y;
|
||||||
|
|
||||||
// If player is already standing on a log when the callback
|
// If player is already standing on a log when the callback
|
||||||
// is set then immediately set it to submerged
|
// is set then immediately set it to submerged
|
||||||
TrySetLogBridgeFullySubmerged(x, y, TRUE);
|
TrySetLogBridgeFullySubmerged(x, y, TRUE);
|
||||||
@ -424,7 +424,7 @@ static void PacifidlogBridgePerStepCallback(u8 taskId)
|
|||||||
{
|
{
|
||||||
// If player's current position is a log submerge it fully.
|
// If player's current position is a log submerge it fully.
|
||||||
TrySetLogBridgeFullySubmerged(x, y, TRUE);
|
TrySetLogBridgeFullySubmerged(x, y, TRUE);
|
||||||
|
|
||||||
// Player's previous position is not the other end of a log
|
// Player's previous position is not the other end of a log
|
||||||
// they're standing on, try to raise their previous position.
|
// they're standing on, try to raise their previous position.
|
||||||
if (tToRaiseX != -1 && tToRaiseY != -1)
|
if (tToRaiseX != -1 && tToRaiseY != -1)
|
||||||
@ -499,7 +499,7 @@ static void FortreeBridgePerStepCallback(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
tPrevX = x;
|
tPrevX = x;
|
||||||
tPrevY = y;
|
tPrevY = y;
|
||||||
|
|
||||||
// If player is already on bridge when callback is set then lower it immediately.
|
// If player is already on bridge when callback is set then lower it immediately.
|
||||||
if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)))
|
if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)))
|
||||||
{
|
{
|
||||||
@ -518,7 +518,7 @@ static void FortreeBridgePerStepCallback(u8 taskId)
|
|||||||
|
|
||||||
isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y));
|
isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y));
|
||||||
isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY));
|
isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY));
|
||||||
|
|
||||||
// Make sure player isn't below bridge
|
// Make sure player isn't below bridge
|
||||||
elevation = PlayerGetElevation();
|
elevation = PlayerGetElevation();
|
||||||
onBridgeElevation = FALSE;
|
onBridgeElevation = FALSE;
|
||||||
@ -672,7 +672,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId)
|
|||||||
// End if player hasn't moved
|
// End if player hasn't moved
|
||||||
if (x == tPrevX && y == tPrevY)
|
if (x == tPrevX && y == tPrevY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tPrevX = x;
|
tPrevX = x;
|
||||||
tPrevY = y;
|
tPrevY = y;
|
||||||
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
||||||
|
@ -61,7 +61,7 @@ struct SioInfo
|
|||||||
u8 filler[92];
|
u8 filler[92];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Struct is mostly empty, presumably because usage of
|
// Struct is mostly empty, presumably because usage of
|
||||||
// its fields was largely removed before release
|
// its fields was largely removed before release
|
||||||
struct RfuDebug
|
struct RfuDebug
|
||||||
{
|
{
|
||||||
@ -1643,7 +1643,7 @@ bool32 RfuTryDisconnectLeavingChildren(void)
|
|||||||
{
|
{
|
||||||
u8 childrenLeaving = 0;
|
u8 childrenLeaving = 0;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
// Check all children, get those waiting to be disconnected
|
// Check all children, get those waiting to be disconnected
|
||||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||||
{
|
{
|
||||||
@ -2123,7 +2123,7 @@ void SetUnionRoomChatPlayerData(u32 numPlayers)
|
|||||||
// Only trainerId is shifted by the number of children, so the active flag and gender
|
// Only trainerId is shifted by the number of children, so the active flag and gender
|
||||||
// are only ever set for the first child
|
// are only ever set for the first child
|
||||||
partnerInfo |= ((PINFO_ACTIVE_FLAG
|
partnerInfo |= ((PINFO_ACTIVE_FLAG
|
||||||
| ((gLinkPlayers[gRfu.linkPlayerIdx[i]].gender & 1) << PINFO_GENDER_SHIFT)
|
| ((gLinkPlayers[gRfu.linkPlayerIdx[i]].gender & 1) << PINFO_GENDER_SHIFT)
|
||||||
| (gLinkPlayers[gRfu.linkPlayerIdx[i]].trainerId & PINFO_TID_MASK)) << (numConnectedChildren * 8));
|
| (gLinkPlayers[gRfu.linkPlayerIdx[i]].trainerId & PINFO_TID_MASK)) << (numConnectedChildren * 8));
|
||||||
numConnectedChildren++;
|
numConnectedChildren++;
|
||||||
if (numConnectedChildren == numPlayers - 1)
|
if (numConnectedChildren == numPlayers - 1)
|
||||||
@ -2477,7 +2477,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount)
|
|||||||
rfu_LMAN_stopManager(FALSE);
|
rfu_LMAN_stopManager(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gRfuLinkStatus->parentChild == MODE_NEUTRAL
|
if (gRfuLinkStatus->parentChild == MODE_NEUTRAL
|
||||||
&& !lman.pcswitch_flag
|
&& !lman.pcswitch_flag
|
||||||
&& FuncIsActiveTask(Task_UnionRoomListen) == TRUE)
|
&& FuncIsActiveTask(Task_UnionRoomListen) == TRUE)
|
||||||
gRfu.state = RFUSTATE_UR_CONNECT;
|
gRfu.state = RFUSTATE_UR_CONNECT;
|
||||||
@ -2816,7 +2816,7 @@ static bool32 IsPartnerActivityIncompatible(s16 activity, struct RfuGameData *pa
|
|||||||
}
|
}
|
||||||
else if (activity == (ACTIVITY_TRADE | IN_UNION_ROOM))
|
else if (activity == (ACTIVITY_TRADE | IN_UNION_ROOM))
|
||||||
{
|
{
|
||||||
// Verify that the trade offered hasn't changed
|
// Verify that the trade offered hasn't changed
|
||||||
struct RfuGameData *original = &gRfu.parent;
|
struct RfuGameData *original = &gRfu.parent;
|
||||||
if (original->tradeSpecies == SPECIES_EGG)
|
if (original->tradeSpecies == SPECIES_EGG)
|
||||||
{
|
{
|
||||||
|
@ -824,7 +824,7 @@ void UpdateWirelessStatusIndicatorSprite(void)
|
|||||||
struct Sprite *sprite = &gSprites[gWirelessStatusIndicatorSpriteId];
|
struct Sprite *sprite = &gSprites[gWirelessStatusIndicatorSpriteId];
|
||||||
u8 signalStrength = RFU_LINK_ICON_LEVEL4_MAX;
|
u8 signalStrength = RFU_LINK_ICON_LEVEL4_MAX;
|
||||||
u8 i = 0;
|
u8 i = 0;
|
||||||
|
|
||||||
// Get weakest signal strength
|
// Get weakest signal strength
|
||||||
if (gRfuLinkStatus->parentChild == MODE_PARENT)
|
if (gRfuLinkStatus->parentChild == MODE_PARENT)
|
||||||
{
|
{
|
||||||
|
@ -795,7 +795,7 @@ u8 MetatileBehavior_GetBridgeType(u8 metatileBehavior)
|
|||||||
&& metatileBehavior <= MB_BRIDGE_OVER_POND_HIGH)
|
&& metatileBehavior <= MB_BRIDGE_OVER_POND_HIGH)
|
||||||
return metatileBehavior - MB_BRIDGE_OVER_OCEAN;
|
return metatileBehavior - MB_BRIDGE_OVER_OCEAN;
|
||||||
|
|
||||||
if (metatileBehavior >= MB_BRIDGE_OVER_POND_MED_EDGE_1
|
if (metatileBehavior >= MB_BRIDGE_OVER_POND_MED_EDGE_1
|
||||||
&& metatileBehavior <= MB_BRIDGE_OVER_POND_MED_EDGE_2)
|
&& metatileBehavior <= MB_BRIDGE_OVER_POND_MED_EDGE_2)
|
||||||
return BRIDGE_TYPE_POND_MED;
|
return BRIDGE_TYPE_POND_MED;
|
||||||
|
|
||||||
|
@ -171,8 +171,8 @@ static bool32 ValidateWonderCard(const struct WonderCard *card)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (card->type >= CARD_TYPE_COUNT)
|
if (card->type >= CARD_TYPE_COUNT)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!(card->sendType == SEND_TYPE_DISALLOWED
|
if (!(card->sendType == SEND_TYPE_DISALLOWED
|
||||||
|| card->sendType == SEND_TYPE_ALLOWED
|
|| card->sendType == SEND_TYPE_ALLOWED
|
||||||
|| card->sendType == SEND_TYPE_ALLOWED_ALWAYS))
|
|| card->sendType == SEND_TYPE_ALLOWED_ALWAYS))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (card->bgType >= NUM_WONDER_BGS)
|
if (card->bgType >= NUM_WONDER_BGS)
|
||||||
@ -429,7 +429,7 @@ u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLink
|
|||||||
u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused)
|
u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused)
|
||||||
{
|
{
|
||||||
int stampsMissing = data->maxStamps - GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps);
|
int stampsMissing = data->maxStamps - GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps);
|
||||||
|
|
||||||
// Has full stamp card?
|
// Has full stamp card?
|
||||||
if (stampsMissing == 0)
|
if (stampsMissing == 0)
|
||||||
return 1;
|
return 1;
|
||||||
@ -598,7 +598,7 @@ void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId)
|
|||||||
switch (stat)
|
switch (stat)
|
||||||
{
|
{
|
||||||
case CARD_STAT_NUM_TRADES:
|
case CARD_STAT_NUM_TRADES:
|
||||||
IncrementCardStatForNewTrainer(CARD_STAT_NUM_TRADES,
|
IncrementCardStatForNewTrainer(CARD_STAT_NUM_TRADES,
|
||||||
trainerId,
|
trainerId,
|
||||||
gSaveBlock1Ptr->mysteryGift.trainerIds[1],
|
gSaveBlock1Ptr->mysteryGift.trainerIds[1],
|
||||||
ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[1]));
|
ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[1]));
|
||||||
|
@ -1240,7 +1240,7 @@ static void Task_MysteryGift(u8 taskId)
|
|||||||
}
|
}
|
||||||
else if (gSpecialVar_Result == LINKUP_FAILED)
|
else if (gSpecialVar_Result == LINKUP_FAILED)
|
||||||
{
|
{
|
||||||
// Link failed, return to link start menu
|
// Link failed, return to link start menu
|
||||||
ClearScreenInBg0(TRUE);
|
ClearScreenInBg0(TRUE);
|
||||||
data->state = MG_STATE_SOURCE_PROMPT;
|
data->state = MG_STATE_SOURCE_PROMPT;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ static void BufferCardText(void)
|
|||||||
if (sWonderCardData->card.idNumber > 999999)
|
if (sWonderCardData->card.idNumber > 999999)
|
||||||
sWonderCardData->card.idNumber = 999999;
|
sWonderCardData->card.idNumber = 999999;
|
||||||
ConvertIntToDecimalStringN(sWonderCardData->idNumberText, sWonderCardData->card.idNumber, STR_CONV_MODE_LEFT_ALIGN, 6);
|
ConvertIntToDecimalStringN(sWonderCardData->idNumberText, sWonderCardData->card.idNumber, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||||
|
|
||||||
// Copy body text
|
// Copy body text
|
||||||
for (i = 0; i < WONDER_CARD_BODY_TEXT_LINES; i++)
|
for (i = 0; i < WONDER_CARD_BODY_TEXT_LINES; i++)
|
||||||
{
|
{
|
||||||
@ -364,12 +364,12 @@ static void BufferCardText(void)
|
|||||||
break;
|
break;
|
||||||
case CARD_TYPE_LINK_STAT:
|
case CARD_TYPE_LINK_STAT:
|
||||||
sWonderCardData->giftText[0] = EOS;
|
sWonderCardData->giftText[0] = EOS;
|
||||||
|
|
||||||
// Load stats
|
// Load stats
|
||||||
stats[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT;
|
stats[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT;
|
||||||
stats[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT;
|
stats[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT;
|
||||||
stats[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT;
|
stats[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT;
|
||||||
|
|
||||||
// Init stat text arrays
|
// Init stat text arrays
|
||||||
for (i = 0; i < ARRAY_COUNT(sWonderCardData->statTextData); i++)
|
for (i = 0; i < ARRAY_COUNT(sWonderCardData->statTextData); i++)
|
||||||
{
|
{
|
||||||
@ -446,7 +446,7 @@ static void DrawCardWindow(u8 whichWindow)
|
|||||||
sCard_FooterTextOffsets[sWonderCardData->card.type],
|
sCard_FooterTextOffsets[sWonderCardData->card.type],
|
||||||
sCard_TextColorTable[sWonderCardData->gfx->footerTextPal],
|
sCard_TextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||||
0, sWonderCardData->footerLine1Text);
|
0, sWonderCardData->footerLine1Text);
|
||||||
|
|
||||||
// Print footer line 2
|
// Print footer line 2
|
||||||
if (sWonderCardData->card.type != CARD_TYPE_LINK_STAT)
|
if (sWonderCardData->card.type != CARD_TYPE_LINK_STAT)
|
||||||
{
|
{
|
||||||
@ -486,7 +486,7 @@ static void CreateCardSprites(void)
|
|||||||
{
|
{
|
||||||
u8 i = 0;
|
u8 i = 0;
|
||||||
sWonderCardData->monIconSpriteId = SPRITE_NONE;
|
sWonderCardData->monIconSpriteId = SPRITE_NONE;
|
||||||
|
|
||||||
// Create icon sprite
|
// Create icon sprite
|
||||||
if (sWonderCardData->cardMetadata.iconSpecies != SPECIES_NONE)
|
if (sWonderCardData->cardMetadata.iconSpecies != SPECIES_NONE)
|
||||||
{
|
{
|
||||||
@ -505,7 +505,7 @@ static void CreateCardSprites(void)
|
|||||||
sWonderCardData->stampSpriteIds[i][1] = SPRITE_NONE;
|
sWonderCardData->stampSpriteIds[i][1] = SPRITE_NONE;
|
||||||
sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_StampShadow, 216 - 32 * i, 144, 8);
|
sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_StampShadow, 216 - 32 * i, 144, 8);
|
||||||
if (sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i] != SPECIES_NONE)
|
if (sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i] != SPECIES_NONE)
|
||||||
sWonderCardData->stampSpriteIds[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i]),
|
sWonderCardData->stampSpriteIds[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i]),
|
||||||
SpriteCallbackDummy,
|
SpriteCallbackDummy,
|
||||||
216 - 32 * i,
|
216 - 32 * i,
|
||||||
136, 0, 0);
|
136, 0, 0);
|
||||||
@ -520,7 +520,7 @@ static void DestroyCardSprites(void)
|
|||||||
// Destroy icon sprite
|
// Destroy icon sprite
|
||||||
if (sWonderCardData->monIconSpriteId != SPRITE_NONE)
|
if (sWonderCardData->monIconSpriteId != SPRITE_NONE)
|
||||||
FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->monIconSpriteId]);
|
FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->monIconSpriteId]);
|
||||||
|
|
||||||
// Destroy stamp sprites
|
// Destroy stamp sprites
|
||||||
if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP)
|
if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP)
|
||||||
{
|
{
|
||||||
@ -865,7 +865,7 @@ u32 WonderNews_GetInput(u16 input)
|
|||||||
static void BufferNewsText(void)
|
static void BufferNewsText(void)
|
||||||
{
|
{
|
||||||
u8 i = 0;
|
u8 i = 0;
|
||||||
|
|
||||||
// Copy title text
|
// Copy title text
|
||||||
memcpy(sWonderNewsData->titleText, sWonderNewsData->news.titleText, WONDER_NEWS_TEXT_LENGTH);
|
memcpy(sWonderNewsData->titleText, sWonderNewsData->news.titleText, WONDER_NEWS_TEXT_LENGTH);
|
||||||
sWonderNewsData->titleText[WONDER_NEWS_TEXT_LENGTH] = EOS;
|
sWonderNewsData->titleText[WONDER_NEWS_TEXT_LENGTH] = EOS;
|
||||||
@ -896,7 +896,7 @@ static void DrawNewsWindows(void)
|
|||||||
if (x < 0)
|
if (x < 0)
|
||||||
x = 0;
|
x = 0;
|
||||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], FONT_SHORT_COPY_1, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText);
|
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], FONT_SHORT_COPY_1, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText);
|
||||||
|
|
||||||
// Print body text
|
// Print body text
|
||||||
for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++)
|
for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++)
|
||||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], FONT_SHORT_COPY_1, 0,
|
AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], FONT_SHORT_COPY_1, 0,
|
||||||
|
@ -560,7 +560,7 @@ static void DoAreaGlow(void)
|
|||||||
if (sPokedexAreaScreen->markerTimer > 12)
|
if (sPokedexAreaScreen->markerTimer > 12)
|
||||||
{
|
{
|
||||||
sPokedexAreaScreen->markerTimer = 0;
|
sPokedexAreaScreen->markerTimer = 0;
|
||||||
|
|
||||||
// Flash the marker
|
// Flash the marker
|
||||||
// With a max of 4, the marker will disappear twice
|
// With a max of 4, the marker will disappear twice
|
||||||
sPokedexAreaScreen->markerFlashCounter++;
|
sPokedexAreaScreen->markerFlashCounter++;
|
||||||
@ -737,7 +737,7 @@ static void CreateAreaMarkerSprites(void)
|
|||||||
static void DestroyAreaScreenSprites(void)
|
static void DestroyAreaScreenSprites(void)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
// Destroy area marker sprites
|
// Destroy area marker sprites
|
||||||
FreeSpriteTilesByTag(TAG_AREA_MARKER);
|
FreeSpriteTilesByTag(TAG_AREA_MARKER);
|
||||||
FreeSpritePaletteByTag(TAG_AREA_MARKER);
|
FreeSpritePaletteByTag(TAG_AREA_MARKER);
|
||||||
@ -772,7 +772,7 @@ static void CreateAreaUnknownSprites(void)
|
|||||||
|
|
||||||
if (sPokedexAreaScreen->numOverworldAreas || sPokedexAreaScreen->numSpecialAreas)
|
if (sPokedexAreaScreen->numOverworldAreas || sPokedexAreaScreen->numSpecialAreas)
|
||||||
{
|
{
|
||||||
// The current species is present on the map, don't create any "Area Unknown" sprites
|
// The current species is present on the map, don't create any "Area Unknown" sprites
|
||||||
for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaUnknownSprites); i++)
|
for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaUnknownSprites); i++)
|
||||||
sPokedexAreaScreen->areaUnknownSprites[i] = NULL;
|
sPokedexAreaScreen->areaUnknownSprites[i] = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1848,7 +1848,7 @@ static const u8 sMonAnimationDelayTable[NUM_SPECIES - 1] =
|
|||||||
#define PP_UP_SHIFTS_INV(val) (u8)~(val), (u8)~((val) << 2), (u8)~((val) << 4), (u8)~((val) << 6)
|
#define PP_UP_SHIFTS_INV(val) (u8)~(val), (u8)~((val) << 2), (u8)~((val) << 4), (u8)~((val) << 6)
|
||||||
|
|
||||||
// PP Up bonuses are stored for a Pokémon as a single byte.
|
// PP Up bonuses are stored for a Pokémon as a single byte.
|
||||||
// There are 2 bits (a value 0-3) for each move slot that
|
// There are 2 bits (a value 0-3) for each move slot that
|
||||||
// represent how many PP Ups have been applied.
|
// represent how many PP Ups have been applied.
|
||||||
// The following arrays take a move slot id and return:
|
// The following arrays take a move slot id and return:
|
||||||
// gPPUpGetMask - A mask to get the number of PP Ups applied to that move slot
|
// gPPUpGetMask - A mask to get the number of PP Ups applied to that move slot
|
||||||
@ -3119,7 +3119,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
|||||||
spAttack = attacker->spAttack;
|
spAttack = attacker->spAttack;
|
||||||
spDefense = defender->spDefense;
|
spDefense = defender->spDefense;
|
||||||
|
|
||||||
// Get attacker hold item info
|
// Get attacker hold item info
|
||||||
if (attacker->item == ITEM_ENIGMA_BERRY)
|
if (attacker->item == ITEM_ENIGMA_BERRY)
|
||||||
{
|
{
|
||||||
attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect;
|
attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect;
|
||||||
@ -5204,7 +5204,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||||||
case 4: // ITEM5_PP_MAX
|
case 4: // ITEM5_PP_MAX
|
||||||
dataUnsigned = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2);
|
dataUnsigned = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2);
|
||||||
temp2 = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex);
|
temp2 = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex);
|
||||||
|
|
||||||
// Check if 3 PP Ups have been applied already, and that the move has a total PP of at least 5 (excludes Sketch)
|
// Check if 3 PP Ups have been applied already, and that the move has a total PP of at least 5 (excludes Sketch)
|
||||||
if (dataUnsigned < 3 && temp2 >= 5)
|
if (dataUnsigned < 3 && temp2 >= 5)
|
||||||
{
|
{
|
||||||
@ -6918,7 +6918,7 @@ static bool8 ShouldSkipFriendshipChange(void)
|
|||||||
// Only the 'default' mode (MON_SPR_GFX_MODE_NORMAL) is used, which is set
|
// Only the 'default' mode (MON_SPR_GFX_MODE_NORMAL) is used, which is set
|
||||||
// up to allocate 4 sprites using the battler sprite templates (gBattlerSpriteTemplates).
|
// up to allocate 4 sprites using the battler sprite templates (gBattlerSpriteTemplates).
|
||||||
// MON_SPR_GFX_MODE_BATTLE is identical but never used.
|
// MON_SPR_GFX_MODE_BATTLE is identical but never used.
|
||||||
// MON_SPR_GFX_MODE_FULL_PARTY is set up to allocate 7 sprites (party + trainer?)
|
// MON_SPR_GFX_MODE_FULL_PARTY is set up to allocate 7 sprites (party + trainer?)
|
||||||
// using a generic 64x64 template, and is also never used.
|
// using a generic 64x64 template, and is also never used.
|
||||||
|
|
||||||
// Between the unnecessarily large sizes below, a mistake allocating the spritePointers
|
// Between the unnecessarily large sizes below, a mistake allocating the spritePointers
|
||||||
@ -6980,7 +6980,7 @@ struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode)
|
|||||||
gfx->dataSize = 1;
|
gfx->dataSize = 1;
|
||||||
gfx->mode = MON_SPR_GFX_MODE_FULL_PARTY;
|
gfx->mode = MON_SPR_GFX_MODE_FULL_PARTY;
|
||||||
break;
|
break;
|
||||||
// case MON_SPR_GFX_MODE_BATTLE:
|
// case MON_SPR_GFX_MODE_BATTLE:
|
||||||
case MON_SPR_GFX_MODE_NORMAL:
|
case MON_SPR_GFX_MODE_NORMAL:
|
||||||
default:
|
default:
|
||||||
gfx->numSprites = MAX_BATTLERS_COUNT;
|
gfx->numSprites = MAX_BATTLERS_COUNT;
|
||||||
|
@ -3879,7 +3879,7 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state)
|
|||||||
summary->species2,
|
summary->species2,
|
||||||
summary->pid);
|
summary->pid);
|
||||||
else
|
else
|
||||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2],
|
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2],
|
||||||
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
|
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
|
||||||
summary->species2,
|
summary->species2,
|
||||||
summary->pid);
|
summary->pid);
|
||||||
@ -3891,7 +3891,7 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state)
|
|||||||
if (sMonSummaryScreen->monList.mons == gPlayerParty || sMonSummaryScreen->mode == SUMMARY_MODE_BOX || sMonSummaryScreen->unk40EF == TRUE)
|
if (sMonSummaryScreen->monList.mons == gPlayerParty || sMonSummaryScreen->mode == SUMMARY_MODE_BOX || sMonSummaryScreen->unk40EF == TRUE)
|
||||||
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2],
|
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2],
|
||||||
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
|
gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT],
|
||||||
summary->species2,
|
summary->species2,
|
||||||
summary->pid);
|
summary->pid);
|
||||||
else
|
else
|
||||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2],
|
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2],
|
||||||
|
@ -904,7 +904,7 @@ static void StartOptionAnimations_Enter(void)
|
|||||||
// Not selected, set default position
|
// Not selected, set default position
|
||||||
x = OPTION_DEFAULT_X;
|
x = OPTION_DEFAULT_X;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slide new options in
|
// Slide new options in
|
||||||
StartOptionSlide(gfx->iconSprites[i], OPTION_EXIT_X, x, 12);
|
StartOptionSlide(gfx->iconSprites[i], OPTION_EXIT_X, x, 12);
|
||||||
SetOptionInvisibility(gfx->iconSprites[i], FALSE);
|
SetOptionInvisibility(gfx->iconSprites[i], FALSE);
|
||||||
|
@ -879,7 +879,7 @@ static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *records, size
|
|||||||
for (i = 0; i < linkPlayerCount; i++)
|
for (i = 0; i < linkPlayerCount; i++)
|
||||||
{
|
{
|
||||||
mixMail = (void *)records + i * recordSize;
|
mixMail = (void *)records + i * recordSize;
|
||||||
|
|
||||||
// Count number of players that have at least
|
// Count number of players that have at least
|
||||||
// one daycare Pokémon with no held item
|
// one daycare Pokémon with no held item
|
||||||
if (canHoldItem[i][0] == TRUE || canHoldItem[i][1] == TRUE)
|
if (canHoldItem[i][0] == TRUE || canHoldItem[i][1] == TRUE)
|
||||||
@ -945,7 +945,7 @@ static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *records, size
|
|||||||
case 4:
|
case 4:
|
||||||
// 4 players can swap, select which 2 pairings will swap
|
// 4 players can swap, select which 2 pairings will swap
|
||||||
ptr = idxs;
|
ptr = idxs;
|
||||||
|
|
||||||
// Swap pair 1
|
// Swap pair 1
|
||||||
playerSlot1 = sDaycareMailSwapIds_4Player[tableId][0];
|
playerSlot1 = sDaycareMailSwapIds_4Player[tableId][0];
|
||||||
playerSlot2 = sDaycareMailSwapIds_4Player[tableId][1];
|
playerSlot2 = sDaycareMailSwapIds_4Player[tableId][1];
|
||||||
|
@ -127,7 +127,7 @@ void UpdateLocationHistoryForRoamer(void)
|
|||||||
void RoamerMoveToOtherLocationSet(void)
|
void RoamerMoveToOtherLocationSet(void)
|
||||||
{
|
{
|
||||||
u8 mapNum = 0;
|
u8 mapNum = 0;
|
||||||
|
|
||||||
if (!ROAMER->active)
|
if (!ROAMER->active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -170,8 +170,8 @@ void RoamerMove(void)
|
|||||||
// Choose a new map (excluding the first) within this set
|
// Choose a new map (excluding the first) within this set
|
||||||
// Also exclude a map if the roamer was there 2 moves ago
|
// Also exclude a map if the roamer was there 2 moves ago
|
||||||
mapNum = sRoamerLocations[locSet][(Random() % (NUM_LOCATIONS_PER_SET - 1)) + 1];
|
mapNum = sRoamerLocations[locSet][(Random() % (NUM_LOCATIONS_PER_SET - 1)) + 1];
|
||||||
if (!(sLocationHistory[2][MAP_GRP] == ROAMER_MAP_GROUP
|
if (!(sLocationHistory[2][MAP_GRP] == ROAMER_MAP_GROUP
|
||||||
&& sLocationHistory[2][MAP_NUM] == mapNum)
|
&& sLocationHistory[2][MAP_NUM] == mapNum)
|
||||||
&& mapNum != MAP_NUM(UNDEFINED))
|
&& mapNum != MAP_NUM(UNDEFINED))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@ Note: ROM header data is empty space here.
|
@ Note: ROM header data is empty space here.
|
||||||
@ It's populated by gbafix using data provided in the Makefile.
|
@ It's populated by gbafix using data provided in the Makefile.
|
||||||
|
|
||||||
.global Start
|
.global Start
|
||||||
Start:
|
Start:
|
||||||
|
@ -913,7 +913,7 @@ u16 GetSaveBlocksPointersBaseOffset(void)
|
|||||||
for (i = 0; i < NUM_SECTORS_PER_SLOT; i++)
|
for (i = 0; i < NUM_SECTORS_PER_SLOT; i++)
|
||||||
{
|
{
|
||||||
ReadFlashSector(i + slotOffset, gReadWriteSector);
|
ReadFlashSector(i + slotOffset, gReadWriteSector);
|
||||||
|
|
||||||
// Base offset for SaveBlock2 is calculated using the trainer id
|
// Base offset for SaveBlock2 is calculated using the trainer id
|
||||||
if (gReadWriteSector->id == SECTOR_ID_SAVEBLOCK2)
|
if (gReadWriteSector->id == SECTOR_ID_SAVEBLOCK2)
|
||||||
return sector->data[offsetof(struct SaveBlock2, playerTrainerId[0])] +
|
return sector->data[offsetof(struct SaveBlock2, playerTrainerId[0])] +
|
||||||
|
@ -213,9 +213,9 @@ void ScriptContext_Init(void)
|
|||||||
sGlobalScriptContextStatus = CONTEXT_SHUTDOWN;
|
sGlobalScriptContextStatus = CONTEXT_SHUTDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Runs the script until the script makes a wait* call, then returns true if
|
// Runs the script until the script makes a wait* call, then returns true if
|
||||||
// there's more script to run, or false if the script has hit the end.
|
// there's more script to run, or false if the script has hit the end.
|
||||||
// This function also returns false if the context is finished
|
// This function also returns false if the context is finished
|
||||||
// or waiting (after a call to _Stop)
|
// or waiting (after a call to _Stop)
|
||||||
bool8 ScriptContext_RunScript(void)
|
bool8 ScriptContext_RunScript(void)
|
||||||
{
|
{
|
||||||
|
@ -1880,7 +1880,7 @@ static u8 TrySelectBias_Regular(void)
|
|||||||
{
|
{
|
||||||
s16 rval = Random() & 0xff;
|
s16 rval = Random() & 0xff;
|
||||||
s16 value = sBiasProbabilities_Regular[whichBias][sSlotMachine->machineId];
|
s16 value = sBiasProbabilities_Regular[whichBias][sSlotMachine->machineId];
|
||||||
|
|
||||||
// Boost odds of BIAS_POWER if it's a lucky game.
|
// Boost odds of BIAS_POWER if it's a lucky game.
|
||||||
if (whichBias == 0 && sSlotMachine->luckyGame == TRUE)
|
if (whichBias == 0 && sSlotMachine->luckyGame == TRUE)
|
||||||
{
|
{
|
||||||
@ -3668,7 +3668,7 @@ static void ReelTime_CheckExplode(struct Task *task)
|
|||||||
if (sSlotMachine->reelTimeDraw)
|
if (sSlotMachine->reelTimeDraw)
|
||||||
{
|
{
|
||||||
if (sSlotMachine->reelTimeSpinsLeft <= task->tExplodeChecks)
|
if (sSlotMachine->reelTimeSpinsLeft <= task->tExplodeChecks)
|
||||||
task->tState++; // RT_TASK_LAND
|
task->tState++; // RT_TASK_LAND
|
||||||
}
|
}
|
||||||
else if (task->tExplodeChecks > 3)
|
else if (task->tExplodeChecks > 3)
|
||||||
{
|
{
|
||||||
@ -5309,7 +5309,7 @@ static const u8 sSpecialDrawOdds[NUM_SLOT_MACHINE_IDS][MAX_BET] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = {
|
static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = {
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_STRAIGHT_7
|
// Probabilities for BIAS_STRAIGHT_7
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5318,7 +5318,7 @@ static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 40,
|
[SLOT_MACHINE_LUCKIER] = 40,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 50
|
[SLOT_MACHINE_LUCKIEST] = 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_REELTIME
|
// Probabilities for BIAS_REELTIME
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5327,7 +5327,7 @@ static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 35,
|
[SLOT_MACHINE_LUCKIER] = 35,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 35
|
[SLOT_MACHINE_LUCKIEST] = 35
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_MIXED_7
|
// Probabilities for BIAS_MIXED_7
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5339,7 +5339,7 @@ static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_POWER
|
// Probabilities for BIAS_POWER
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 20,
|
[SLOT_MACHINE_UNLUCKIEST] = 20,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5348,7 +5348,7 @@ static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 25,
|
[SLOT_MACHINE_LUCKIER] = 25,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 25
|
[SLOT_MACHINE_LUCKIEST] = 25
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_AZURILL
|
// Probabilities for BIAS_AZURILL
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 12,
|
[SLOT_MACHINE_UNLUCKIEST] = 12,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 15,
|
[SLOT_MACHINE_UNLUCKIER] = 15,
|
||||||
@ -5357,7 +5357,7 @@ static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 19,
|
[SLOT_MACHINE_LUCKIER] = 19,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 22
|
[SLOT_MACHINE_LUCKIEST] = 22
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_LOTAD
|
// Probabilities for BIAS_LOTAD
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5366,7 +5366,7 @@ static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 30,
|
[SLOT_MACHINE_LUCKIER] = 30,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 40
|
[SLOT_MACHINE_LUCKIEST] = 40
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_CHERRY
|
// Probabilities for BIAS_CHERRY
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
[SLOT_MACHINE_UNLUCKIEST] = 25,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 25,
|
[SLOT_MACHINE_UNLUCKIER] = 25,
|
||||||
@ -5375,7 +5375,7 @@ static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = {
|
|||||||
[SLOT_MACHINE_LUCKIER] = 15,
|
[SLOT_MACHINE_LUCKIER] = 15,
|
||||||
[SLOT_MACHINE_LUCKIEST] = 15
|
[SLOT_MACHINE_LUCKIEST] = 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Probabilities for BIAS_REPLAY
|
// Probabilities for BIAS_REPLAY
|
||||||
[SLOT_MACHINE_UNLUCKIEST] = 40,
|
[SLOT_MACHINE_UNLUCKIEST] = 40,
|
||||||
[SLOT_MACHINE_UNLUCKIER] = 40,
|
[SLOT_MACHINE_UNLUCKIER] = 40,
|
||||||
|
@ -377,7 +377,7 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode)
|
|||||||
u8 table;
|
u8 table;
|
||||||
|
|
||||||
species--;
|
species--;
|
||||||
|
|
||||||
// Set default values
|
// Set default values
|
||||||
// May be overridden depending on mode.
|
// May be overridden depending on mode.
|
||||||
length = 140;
|
length = 140;
|
||||||
|
@ -2465,7 +2465,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Player's Pokémon must be of the type the partner requested
|
// Player's Pokémon must be of the type the partner requested
|
||||||
if (gBaseStats[playerSpecies2].type1 != requestedType
|
if (gBaseStats[playerSpecies2].type1 != requestedType
|
||||||
&& gBaseStats[playerSpecies2].type2 != requestedType)
|
&& gBaseStats[playerSpecies2].type2 != requestedType)
|
||||||
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
|
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
|
||||||
}
|
}
|
||||||
|
8
src/tv.c
8
src/tv.c
@ -2058,7 +2058,7 @@ static void SecretBaseVisit_CalculatePartyData(TVShow *show)
|
|||||||
{
|
{
|
||||||
sTV_SecretBaseVisitMonsTemp[numPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
|
sTV_SecretBaseVisitMonsTemp[numPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
|
||||||
sTV_SecretBaseVisitMonsTemp[numPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES);
|
sTV_SecretBaseVisitMonsTemp[numPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES);
|
||||||
|
|
||||||
// Check all the Pokémon's moves, then randomly select one to save
|
// Check all the Pokémon's moves, then randomly select one to save
|
||||||
numMoves = 0;
|
numMoves = 0;
|
||||||
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE1);
|
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE1);
|
||||||
@ -2093,7 +2093,7 @@ static void SecretBaseVisit_CalculatePartyData(TVShow *show)
|
|||||||
for (i = 0, sum = 0; i < numPokemon; i++)
|
for (i = 0, sum = 0; i < numPokemon; i++)
|
||||||
sum += sTV_SecretBaseVisitMonsTemp[i].level;
|
sum += sTV_SecretBaseVisitMonsTemp[i].level;
|
||||||
|
|
||||||
// Using the data calculated above, save the data to talk about on the show
|
// Using the data calculated above, save the data to talk about on the show
|
||||||
// (average level, and one randomly selected species / move)
|
// (average level, and one randomly selected species / move)
|
||||||
show->secretBaseVisit.avgLevel = sum / numPokemon;
|
show->secretBaseVisit.avgLevel = sum / numPokemon;
|
||||||
j = Random() % numPokemon;
|
j = Random() % numPokemon;
|
||||||
@ -2643,7 +2643,7 @@ void DoPokeNews(void)
|
|||||||
// News event is upcoming, make comment about countdown to event
|
// News event is upcoming, make comment about countdown to event
|
||||||
u16 dayCountdown = gSaveBlock1Ptr->pokeNews[i].dayCountdown;
|
u16 dayCountdown = gSaveBlock1Ptr->pokeNews[i].dayCountdown;
|
||||||
ConvertIntToDecimalStringN(gStringVar1, dayCountdown, STR_CONV_MODE_LEFT_ALIGN, 1);
|
ConvertIntToDecimalStringN(gStringVar1, dayCountdown, STR_CONV_MODE_LEFT_ALIGN, 1);
|
||||||
|
|
||||||
// Mark as inactive so the countdown TV airing doesn't repeat
|
// Mark as inactive so the countdown TV airing doesn't repeat
|
||||||
// Will be flagged as "upcoming" again by UpdatePokeNewsCountdown
|
// Will be flagged as "upcoming" again by UpdatePokeNewsCountdown
|
||||||
gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE;
|
gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE;
|
||||||
@ -2848,7 +2848,7 @@ static bool8 IsRecordMixShowAlreadySpawned(u8 kind, bool8 delete)
|
|||||||
static void SortPurchasesByQuantity(void)
|
static void SortPurchasesByQuantity(void)
|
||||||
{
|
{
|
||||||
u8 i, j;
|
u8 i, j;
|
||||||
|
|
||||||
for (i = 0; i < SMARTSHOPPER_NUM_ITEMS - 1; i++)
|
for (i = 0; i < SMARTSHOPPER_NUM_ITEMS - 1; i++)
|
||||||
{
|
{
|
||||||
for (j = i + 1; j < SMARTSHOPPER_NUM_ITEMS; j++)
|
for (j = i + 1; j < SMARTSHOPPER_NUM_ITEMS; j++)
|
||||||
|
@ -569,7 +569,7 @@ bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdP
|
|||||||
for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++)
|
for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++)
|
||||||
{
|
{
|
||||||
s32 id = UR_PLAYER_SPRITE_ID(i, memberId);
|
s32 id = UR_PLAYER_SPRITE_ID(i, memberId);
|
||||||
|
|
||||||
// Is the player in front of a group member position?
|
// Is the player in front of a group member position?
|
||||||
if (x != sUnionRoomPlayerCoords[i][0] + sUnionRoomGroupOffsets[memberId][0] + 7)
|
if (x != sUnionRoomPlayerCoords[i][0] + sUnionRoomGroupOffsets[memberId][0] + 7)
|
||||||
continue;
|
continue;
|
||||||
|
@ -174,7 +174,7 @@ static bool32 TryCalculateWallpaper(u16 *backgroundClr, u16 *foregroundClr, u8 *
|
|||||||
if (GetWallpaperDataBits(data, 0, 3) != GetWallpaperDataBits(charsByTableId, TO_BIT_OFFSET(WALDA_PHRASE_LENGTH - 1) + 2, 3))
|
if (GetWallpaperDataBits(data, 0, 3) != GetWallpaperDataBits(charsByTableId, TO_BIT_OFFSET(WALDA_PHRASE_LENGTH - 1) + 2, 3))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Perform some relatively arbitrary changes to the wallpaper data using the last byte (KEY)
|
// Perform some relatively arbitrary changes to the wallpaper data using the last byte (KEY)
|
||||||
RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES, 21);
|
RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES, 21);
|
||||||
RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY & 0xF);
|
RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY & 0xF);
|
||||||
MaskWallpaperData(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY >> 4);
|
MaskWallpaperData(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY >> 4);
|
||||||
|
@ -64,7 +64,7 @@ static const struct WildPokemon sWildFeebas = {20, 25, SPECIES_FEEBAS};
|
|||||||
|
|
||||||
static const u16 sRoute119WaterTileData[] =
|
static const u16 sRoute119WaterTileData[] =
|
||||||
{
|
{
|
||||||
//yMin, yMax, numSpots in previous sections
|
//yMin, yMax, numSpots in previous sections
|
||||||
0, 45, 0,
|
0, 45, 0,
|
||||||
46, 91, NUM_FISHING_SPOTS_1,
|
46, 91, NUM_FISHING_SPOTS_1,
|
||||||
92, 139, NUM_FISHING_SPOTS_1 + NUM_FISHING_SPOTS_2,
|
92, 139, NUM_FISHING_SPOTS_1 + NUM_FISHING_SPOTS_2,
|
||||||
@ -142,7 +142,7 @@ static bool8 CheckFeebas(void)
|
|||||||
feebasSpots[i] = FeebasRandom() % NUM_FISHING_SPOTS;
|
feebasSpots[i] = FeebasRandom() % NUM_FISHING_SPOTS;
|
||||||
if (feebasSpots[i] == 0)
|
if (feebasSpots[i] == 0)
|
||||||
feebasSpots[i] = NUM_FISHING_SPOTS;
|
feebasSpots[i] = NUM_FISHING_SPOTS;
|
||||||
|
|
||||||
// < 1 below is a pointless check, it will never be TRUE.
|
// < 1 below is a pointless check, it will never be TRUE.
|
||||||
// >= 4 to skip fishing spots 1-3, because these are inaccessible
|
// >= 4 to skip fishing spots 1-3, because these are inaccessible
|
||||||
// spots at the top of the map, at (9,7), (7,13), and (15,16).
|
// spots at the top of the map, at (9,7), (7,13), and (15,16).
|
||||||
|
@ -76,7 +76,7 @@ u16 RetrieveWonderNewsVal(void)
|
|||||||
struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata();
|
struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata();
|
||||||
u16 newsVal;
|
u16 newsVal;
|
||||||
|
|
||||||
// Checks if Mystery Event is enabled, not Mystery Gift?
|
// Checks if Mystery Event is enabled, not Mystery Gift?
|
||||||
if (!IsMysteryEventEnabled() || !ValidateSavedWonderNews())
|
if (!IsMysteryEventEnabled() || !ValidateSavedWonderNews())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ gReservedSpritePaletteCount:
|
|||||||
.include "tv.o"
|
.include "tv.o"
|
||||||
.include "mauville_old_man.o"
|
.include "mauville_old_man.o"
|
||||||
.include "image_processing_effects.o"
|
.include "image_processing_effects.o"
|
||||||
|
|
||||||
.space 0x4
|
.space 0x4
|
||||||
|
|
||||||
.include "contest_painting.o"
|
.include "contest_painting.o"
|
||||||
.include "field_specials.o"
|
.include "field_specials.o"
|
||||||
.include "evolution_scene.o"
|
.include "evolution_scene.o"
|
||||||
@ -66,12 +66,12 @@ gReservedSpritePaletteCount:
|
|||||||
.include "battle_anim_throw.o"
|
.include "battle_anim_throw.o"
|
||||||
.include "battle_factory_screen.o"
|
.include "battle_factory_screen.o"
|
||||||
.include "apprentice.o"
|
.include "apprentice.o"
|
||||||
|
|
||||||
.space 0x8
|
.space 0x8
|
||||||
|
|
||||||
.include "list_menu.o"
|
.include "list_menu.o"
|
||||||
.include "party_menu.o"
|
.include "party_menu.o"
|
||||||
|
|
||||||
.space 0x44
|
.space 0x44
|
||||||
|
|
||||||
.include "ereader_screen.o"
|
.include "ereader_screen.o"
|
||||||
|
Loading…
Reference in New Issue
Block a user