Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pret/pokeemerald
Browse files Browse the repository at this point in the history
  • Loading branch information
citrusbolt committed Jul 17, 2022
2 parents b11c56a + 165f51a commit 43ca25d
Show file tree
Hide file tree
Showing 273 changed files with 5,040 additions and 5,159 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ LIBPATH := -L ../../tools/agbcc/lib
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
else
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
Expand Down
4 changes: 2 additions & 2 deletions asm/macros/battle_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
.byte 0x77
.endm

.macro faintifabilitynotdamp
.macro tryexplosion
.byte 0x78
.endm

Expand Down Expand Up @@ -1031,7 +1031,7 @@
.byte 0xc8
.endm

.macro jumpifattackandspecialattackcannotfall ptr:req
.macro trymemento ptr:req
.byte 0xc9
.4byte \ptr
.endm
Expand Down
8 changes: 4 additions & 4 deletions asm/macros/trainer_hill.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
special CallTrainerHillFunction
.endm

@ Set the challenge mode to HILL_TAG_* (Normal, Variety, Unique, or Expert)
.macro trainerhill_settag tag:req
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG
copyvar VAR_0x8005, \tag
@ Set the challenge mode to HILL_MODE_* (Normal, Variety, Unique, or Expert)
.macro trainerhill_setmode mode:req
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_MODE
copyvar VAR_0x8005, \mode
special CallTrainerHillFunction
.endm
546 changes: 273 additions & 273 deletions data/battle_anim_scripts.s

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ BattleScript_EffectExplosion::
attackcanceler
attackstring
ppreduce
faintifabilitynotdamp
@ Below jumps to BattleScript_DampStopsExplosion if it fails (only way it can)
tryexplosion
setatkhptozero
waitstate
jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop
Expand Down Expand Up @@ -2202,10 +2203,10 @@ BattleScript_AlreadyBurned::

BattleScript_EffectMemento::
attackcanceler
jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_MementoFailProtect
jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_MementoTargetProtect
attackstring
ppreduce
jumpifattackandspecialattackcannotfall BattleScript_ButItFailed
trymemento BattleScript_ButItFailed
setatkhptozero
attackanimation
waitanimation
Expand All @@ -2215,15 +2216,15 @@ BattleScript_EffectMemento::
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
setstatchanger STAT_ATK, 2, TRUE
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
@ Greater than STAT_FELL is checking if the stat cannot decrease
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_EffectMementoTrySpAtk:
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
setstatchanger STAT_SPATK, 2, TRUE
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTryFaint
@ Greater than STAT_FELL is checking if the stat cannot decrease
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
Expand All @@ -2234,11 +2235,12 @@ BattleScript_EffectMementoPrintNoEffect:
printstring STRINGID_BUTNOEFFECT
waitmessage B_WAIT_TIME_LONG
goto BattleScript_EffectMementoTryFaint
BattleScript_MementoFailProtect:
@ If the target is protected there's no need to check the target's stats or animate, the user will just faint
BattleScript_MementoTargetProtect:
attackstring
ppreduce
jumpifattackandspecialattackcannotfall BattleScript_MementoFailEnd
BattleScript_MementoFailEnd:
trymemento BattleScript_MementoTargetProtectEnd
BattleScript_MementoTargetProtectEnd:
setatkhptozero
pause B_WAIT_TIME_LONG
effectivenesssound
Expand Down
8 changes: 4 additions & 4 deletions data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
.set LOCALID_PLAYER, 13
.set LOCALID_OPPONENT, 15

.set NO_DRAW, 0
.set DRAW_TRAINER, 1
.set DRAW_TUCKER, 2

BattleFrontier_BattleDomeBattleRoom_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleDomeBattleRoom_OnTransition
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeBattleRoom_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeBattleRoom_OnWarp
map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeBattleRoom_OnResume
.byte 0

.set NO_DRAW, 0
.set DRAW_TRAINER, 1
.set DRAW_TUCKER, 2

BattleFrontier_BattleDomeBattleRoom_OnTransition:
dome_setopponentgfx
frontier_get FRONTIER_DATA_BATTLE_NUM
Expand Down
3 changes: 2 additions & 1 deletion data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ BattleFrontier_BattlePikeLobby_Text_AwardYouTheseBattlePoints2:
@ Unused
BattleFrontier_BattlePikeLobby_Text_ReachedBattlePointLimit:
.string "You appear to have reached the limit\n"
.string "for Battle Points…\pPlease exchange some Battle Points\n"
.string "for Battle Points…\p"
.string "Please exchange some Battle Points\n"
.string "for prizes, then return…$"

BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting:
Expand Down
26 changes: 14 additions & 12 deletions data/maps/BattleFrontier_Lounge2/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ BattleFrontier_Lounge2_EventScript_AlreadyMetManiac::
end

BattleFrontier_Lounge2_EventScript_GiveAdvice::
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 0, BattleFrontier_Lounge2_EventScript_BufferSingle
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 1, BattleFrontier_Lounge2_EventScript_BufferDouble
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 2, BattleFrontier_Lounge2_EventScript_BufferMulti
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BufferMultiLink
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_BufferBattleDome
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 5, BattleFrontier_Lounge2_EventScript_BufferBattleFactory
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 6, BattleFrontier_Lounge2_EventScript_BufferBattlePalace
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 7, BattleFrontier_Lounge2_EventScript_BufferBattleArena
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 8, BattleFrontier_Lounge2_EventScript_BufferBattlePike
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 9, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid
call_if_le VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BattleTowerNews
call_if_ge VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_FacilityNews
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_SINGLES, BattleFrontier_Lounge2_EventScript_BufferSingle
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_DOUBLES, BattleFrontier_Lounge2_EventScript_BufferDouble
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_MULTIS, BattleFrontier_Lounge2_EventScript_BufferMulti
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_LINK, BattleFrontier_Lounge2_EventScript_BufferMultiLink
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_DOME, BattleFrontier_Lounge2_EventScript_BufferBattleDome
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_FACTORY, BattleFrontier_Lounge2_EventScript_BufferBattleFactory
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PALACE, BattleFrontier_Lounge2_EventScript_BufferBattlePalace
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_ARENA, BattleFrontier_Lounge2_EventScript_BufferBattleArena
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PIKE, BattleFrontier_Lounge2_EventScript_BufferBattlePike
call_if_eq VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_PYRAMID, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid
@ <= FRONTIER_MANIAC_TOWER_LINK is any Battle Tower mode
call_if_le VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_TOWER_LINK, BattleFrontier_Lounge2_EventScript_BattleTowerNews
@ >= FRONTIER_MANIAC_DOME is any facility other than Battle Tower
call_if_ge VAR_FRONTIER_MANIAC_FACILITY, FRONTIER_MANIAC_DOME, BattleFrontier_Lounge2_EventScript_FacilityNews
special ShowFrontierManiacMessage
waitmessage
waitbuttonpress
Expand Down
2 changes: 1 addition & 1 deletion data/maps/TrainerHill_Entrance/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ TrainerHill_Entrance_EventScript_ChooseChallenge::
switch VAR_RESULT
case 4, TrainerHill_Entrance_EventScript_CancelEntry
case MULTI_B_PRESSED, TrainerHill_Entrance_EventScript_CancelEntry
trainerhill_settag VAR_RESULT
trainerhill_setmode VAR_RESULT
setvar VAR_TRAINER_HILL_IS_ACTIVE, 1
setvar VAR_TEMP_5, 0
special HealPlayerParty
Expand Down
2 changes: 1 addition & 1 deletion data/scripts/gift_altering_cave.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MysteryGiftScript_AlteringCave_:
release
end

sText_MysteryGiftAlteringCave::
sText_MysteryGiftAlteringCave:
.string "Thank you for using the Mystery\n"
.string "Gift System.\p"
.string "There appears to be a rumor about\n"
Expand Down
Loading

0 comments on commit 43ca25d

Please sign in to comment.