summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
Diffstat (limited to 'main.asm')
-rw-r--r--main.asm98
1 files changed, 40 insertions, 58 deletions
diff --git a/main.asm b/main.asm
index 83d9c1d9..4cfa848f 100644
--- a/main.asm
+++ b/main.asm
@@ -1,29 +1,12 @@
-INCLUDE "includes.asm"
-
-SECTION "bank1", ROMX, BANK[$1]
-PlaceWaitingText:: ; 4000 (1:4000)
- hlcoord 3, 10
- ld b, $1
- ld c, $b
- ld a, [wBattleMode]
- and a
- jr z, .asm_4012
- call TextBox
- jr .asm_4017
-
-.asm_4012
- predef Predef_LinkTextbox
-.asm_4017
- hlcoord 4, 11
- ld de, .Waiting
- call PlaceString
- ld c, 50
- jp DelayFrames
-
-.Waiting:
- db "Waiting...!@"
-
-Predef1:
+INCLUDE "contents.asm"
+INCLUDE "constants.asm"
+
+
+SECTION "bank1", ROMX
+
+INCLUDE "engine/link/place_waiting_text.asm"
+
+DummyPredef1:
ret
LoadPushOAM:: ; 4032 (1:4032)
@@ -353,7 +336,7 @@ INCLUDE "engine/specials.asm"
Functionc660:
nop
-FlagPredef:
+SmallFarFlagAction:
push hl
push bc
push bc
@@ -420,7 +403,7 @@ GetBreedMon1LevelGrowth:
ld de, wTempMonSpecies
ld bc, $20
call CopyBytes
- callab CalcLevel
+ callfar CalcLevel
ld a, [wBreedMon1Level]
ld b, a
ld a, d
@@ -434,7 +417,7 @@ GetBreedMon2LevelGrowth:
ld de, wTempMon
ld bc, $20
call CopyBytes
- callab CalcLevel
+ callfar CalcLevel
ld a, [wBreedMon2Level]
ld b, a
ld a, d
@@ -573,8 +556,8 @@ BugContest_SetCaughtContestMon:
and a
jr z, .asm_e76e
ld [wd151], a
- callba DisplayAlreadyCaughtText
- callba DisplayCaughtContestMonStats
+ farcall DisplayAlreadyCaughtText
+ farcall DisplayCaughtContestMonStats
lb bc, 14, 7
call PlaceYesNoBox
ret c
@@ -603,7 +586,7 @@ GenerateBugContestMonStats: ; e781 (3:6781)
Text_CaughtBugMon:
; Caught @ !
- text_jump Text_CaughtBugMon_
+ text_far Text_CaughtBugMon_
db "@"
INCLUDE "items/item_effects.asm"
@@ -630,7 +613,7 @@ KnowsMove:
ret
Text_KnowsMove:
- text_jump Text_KnowsMove_
+ text_far Text_KnowsMove_
db "@"
SECTION "bank4", ROMX, BANK[$4]
@@ -640,12 +623,10 @@ INCLUDE "engine/pack.asm"
INCLUDE "engine/overworld/time.asm"
INCLUDE "engine/learn_tm.asm"
INCLUDE "engine/namingscreen.asm"
-
-AbortBugCatchingContest::
- dr $1269a, $126fd
-HealMachineAnim:
- dr $126fd, $12947
-
+INCLUDE "engine/events/misc_scripts.asm"
+INCLUDE "engine/events/heal_machine_anim.asm"
+INCLUDE "engine/events/whiteout.asm"
+INCLUDE "engine/events/forced_movement.asm"
ItemfinderFunction:
dr $12947, $12e33
@@ -653,8 +634,9 @@ PartyMonItemName::
dr $12e33, $12fa0
Function12fa0:
dr $12fa0, $1399d
-GiveParkBalls:
- dr $1399d, $13a5f
+INCLUDE "engine/events/bug_contest/contest.asm"
+INCLUDE "engine/events/misc_scripts_2.asm"
+INCLUDE "engine/events/std_collision.asm"
Function13a5f:
dr $13a5f, $13d44
ApplyPokerusTick:
@@ -799,7 +781,7 @@ ReturnToBattle_UseBall_:
SECTION "banka", ROMX, BANK[$a]
dr $28000, $28d88
-Predef_LinkTextbox::
+LinkTextboxAtHL::
dr $28d88, $28dea
TradeAnimation::
@@ -916,7 +898,7 @@ SECTION "bankf", ROMX, BANK[$f]
FleeMons::
dr $3c551, $3d70a
-CheckPlayerPartyForFitPkmn::
+CheckPlayerPartyForFitMon::
dr $3d70a, $3d8f5
Function3d8f5:
@@ -939,10 +921,10 @@ BattleRandom_:: ; 3ec11
FillInExpBar::
dr $3f196, $3f243
-GetMonBackpic::
+GetBattleMonBackpic::
dr $3f243, $3f282
-GetMonFrontpic::
+GetEnemyMonFrontpic::
dr $3f282, $3f2c7
StartBattle::
@@ -1036,7 +1018,7 @@ BasementKeyFunction:
SacredAshFunction:
dr $50819, $5087d
-CopyPkmnToTempMon::
+CopyMonToTempMon::
dr $5087d, $50940
PrintMonTypes::
@@ -1069,7 +1051,7 @@ GetGender::
ListMovePP::
dr $51364, $513e4
-Predef22::
+Unused_PlaceEnemyHPLevel::
dr $513e4, $51437
PlaceNonFaintStatus::
@@ -1087,19 +1069,19 @@ CalcExpAtLevel:
GetUnownLetter::
dr $51749, $51780
-GetFrontpic::
+GetMonFrontpic::
dr $51780, $51786
FrontpicPredef::
dr $51786, $51803
-GetBackpic::
+GetMonBackpic::
dr $51803, $518a0
GetTrainerPic::
dr $518a0, $518fa
-DecompressPredef::
+DecompressGet2bpp::
dr $518fa, $51b0b
INCLUDE "data/pokemon/base_stats.asm"
@@ -1167,8 +1149,8 @@ ResetClock_:
DeleteSaveData_:
dr $8c310, $8c355
-Predef35::
-Predef36::
+DummyPredef35::
+DummyPredef36::
ret
UpdateTimeOfDayPal:: ; 8c356
@@ -1195,7 +1177,7 @@ FadeBlackQuickly:
Function8c3e9:: ; 8c3e9
dr $8c3e9, $8c513
-Predef_StartBattle::
+DoBattleTransition::
dr $8c513, $8ca5e
PlayWhirlpoolSound:
@@ -1268,7 +1250,7 @@ Function919c1:
TownMap_:
dr $91a4f, $91c7f
-Area_::
+Pokedex_GetArea::
dr $91c7f, $92c36
Function92c36:
dr $92c36, $94000
@@ -1372,7 +1354,7 @@ Functionc7cd0:
SECTION "bank32", ROMX, BANK[$32]
dr $c8000, $c80d6
-Predef2F::
+DummyPredef2F::
dr $c80d6, $c900a
INCLUDE "data/moves/animations.asm"
@@ -1387,8 +1369,8 @@ DisplayCaughtContestMonStats:
DisplayAlreadyCaughtText:
dr $cc0c8, $cc0d6
-Predef38::
-Predef39::
+DummyPredef38::
+DummyPredef39::
ret
PlayBattleAnim::
@@ -1496,7 +1478,7 @@ MagikarpHouseSign:
SECTION "bank3f", ROMX, BANK[$3f]
nop
-Predef3A::
+DummyPredef3A::
ret
dr $fc002, $100000