summaryrefslogtreecommitdiff
path: root/event
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-12-12 00:08:54 -0500
committerGitHub <noreply@github.com>2017-12-12 00:08:54 -0500
commitf6942b9a136b2ee3b25159ebc4d54509a42c5266 (patch)
tree0c0bedcd311ab83262e31cf6d9d4c37257143acc /event
parent94c7def4883fbdbcd3987a067443a2069b8bb610 (diff)
parent79873a1bfc0e40067c45dc74fbbebf547d177978 (diff)
Merge pull request #411 from roukaour/master
Clean up more labels, constants, and file names
Diffstat (limited to 'event')
-rwxr-xr-xevent/bug_contest_judging.asm76
-rwxr-xr-xevent/daycare.asm40
-rwxr-xr-xevent/field_moves.asm6
-rwxr-xr-xevent/happiness_egg.asm57
-rwxr-xr-xevent/mom_phone.asm32
-rwxr-xr-xevent/overworld.asm50
-rwxr-xr-xevent/photo.asm4
-rw-r--r--event/unown.asm10
8 files changed, 60 insertions, 215 deletions
diff --git a/event/bug_contest_judging.asm b/event/bug_contest_judging.asm
index 0d400bb39..a7a9eb022 100755
--- a/event/bug_contest_judging.asm
+++ b/event/bug_contest_judging.asm
@@ -134,81 +134,11 @@ LoadContestantName: ; 13730
jp CopyBytes
; 13783
-BugContestantPointers: ; 13783
- dw BugContestant_BugCatcherDon ; This reverts back to the player
- dw BugContestant_BugCatcherDon
- dw BugContestant_BugCatcherEd
- dw BugContestant_CooltrainerMNick
- dw BugContestant_PokefanMWilliam
- dw BugContestant_BugCatcherBenny
- dw BugContestant_CamperBarry
- dw BugContestant_PicnickerCindy
- dw BugContestant_BugCatcherJosh
- dw BugContestant_YoungsterSamuel
- dw BugContestant_SchoolboyKipp
-; 13799
-
-BugContestant_BugCatcherDon:
- db BUG_CATCHER, DON
- dbw KAKUNA, 300
- dbw METAPOD, 285
- dbw CATERPIE, 226
-
-BugContestant_BugCatcherEd:
- db BUG_CATCHER, ED
- dbw BUTTERFREE, 286
- dbw BUTTERFREE, 251
- dbw CATERPIE, 237
-
-BugContestant_CooltrainerMNick:
- db COOLTRAINERM, NICK
- dbw SCYTHER, 357
- dbw BUTTERFREE, 349
- dbw PINSIR, 368
-
-BugContestant_PokefanMWilliam:
- db POKEFANM, WILLIAM
- dbw PINSIR, 332
- dbw BUTTERFREE, 324
- dbw VENONAT, 321
-
-BugContestant_BugCatcherBenny:
- db BUG_CATCHER, BUG_CATCHER_BENNY
- dbw BUTTERFREE, 318
- dbw WEEDLE, 295
- dbw CATERPIE, 285
-
-BugContestant_CamperBarry:
- db CAMPER, BARRY
- dbw PINSIR, 366
- dbw VENONAT, 329
- dbw KAKUNA, 314
-
-BugContestant_PicnickerCindy:
- db PICNICKER, CINDY
- dbw BUTTERFREE, 341
- dbw METAPOD, 301
- dbw CATERPIE, 264
-
-BugContestant_BugCatcherJosh:
- db BUG_CATCHER, JOSH
- dbw SCYTHER, 326
- dbw BUTTERFREE, 292
- dbw METAPOD, 282
-
-BugContestant_YoungsterSamuel:
- db YOUNGSTER, SAMUEL
- dbw WEEDLE, 270
- dbw PINSIR, 282
- dbw CATERPIE, 251
-
-BugContestant_SchoolboyKipp:
- db SCHOOLBOY, KIPP
- dbw VENONAT, 267
- dbw PARAS, 254
- dbw KAKUNA, 259
+
+INCLUDE "data/bug_contest_winners.asm"
; 13807
+
BugContest_GetPlayersResult: ; 13807
ld hl, wBugContestThirdPlacePersonID
ld de, -4
diff --git a/event/daycare.asm b/event/daycare.asm
index b521deeff..128cf674a 100755
--- a/event/daycare.asm
+++ b/event/daycare.asm
@@ -21,17 +21,17 @@
const DAYCARETEXT_13
Special_DayCareMan: ; 166d6
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 0, [hl]
jr nz, .AskWithdrawMon
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
ld a, DAYCARETEXT_MAN_INTRO
call DayCareManIntroText
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDaycareMan
- ld hl, wDaycareMan
+ callba DepositMonWithDayCareMan
+ ld hl, wDayCareMan
set 0, [hl]
call DayCare_DepositPokemonText
call DayCare_InitBreeding
@@ -43,9 +43,9 @@ Special_DayCareMan: ; 166d6
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDaycareMan
+ callba RetrievePokemonFromDayCareMan
call DayCare_TakeMoney_PlayCry
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 0, [hl]
res 5, [hl]
jr .cancel
@@ -60,17 +60,17 @@ Special_DayCareMan: ; 166d6
; 1672a
Special_DayCareLady: ; 1672a
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
bit 0, [hl]
jr nz, .AskWithdrawMon
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
ld a, DAYCARETEXT_LADY_INTRO
call DayCareLadyIntroText
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDaycareLady
- ld hl, wDaycareLady
+ callba DepositMonWithDayCareLady
+ ld hl, wDayCareLady
set 0, [hl]
call DayCare_DepositPokemonText
call DayCare_InitBreeding
@@ -82,11 +82,11 @@ Special_DayCareLady: ; 1672a
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDaycareLady
+ callba RetrievePokemonFromDayCareLady
call DayCare_TakeMoney_PlayCry
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
res 0, [hl]
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 5, [hl]
jr .cancel
@@ -124,7 +124,7 @@ DayCareAskDepositPokemon: ; 16798
ld a, DAYCARETEXT_WHICH_ONE
call PrintDayCareText
ld b, PARTYMENUACTION_GIVE_MON
- callba SelectTradeOrDaycareMon
+ callba SelectTradeOrDayCareMon
jr c, .Declined
ld a, [CurPartySpecies]
cp EGG
@@ -426,7 +426,7 @@ PrintDayCareText: ; 1689b
; 0x16936
Special_DayCareManOutside: ; 16936
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 6, [hl]
jr nz, .AskGiveEgg
ld hl, .NotYet
@@ -448,12 +448,12 @@ Special_DayCareManOutside: ; 16936
cp PARTY_LENGTH
jr nc, .PartyFull
call DayCare_GiveEgg
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 6, [hl]
call DayCare_InitBreeding
ld hl, .GotEggText
call PrintText
- ld de, SFX_GET_EGG_FROM_DAYCARE_LADY
+ ld de, SFX_GET_EGG_FROM_DAY_CARE_LADY
call PlaySFX
ld c, 120
call DelayFrames
@@ -590,10 +590,10 @@ DayCare_GetCurrentPartyMember: ; 16a31
; 16a3b
DayCare_InitBreeding: ; 16a3b
- ld a, [wDaycareLady]
+ ld a, [wDayCareLady]
bit 0, a
ret z
- ld a, [wDaycareMan]
+ ld a, [wDayCareMan]
bit 0, a
ret z
callab CheckBreedmonCompatibility
@@ -602,7 +602,7 @@ DayCare_InitBreeding: ; 16a3b
ret z
inc a
ret z
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
set 5, [hl]
.loop
call Random
diff --git a/event/field_moves.asm b/event/field_moves.asm
index 2869f9be9..4c4b8cfc1 100755
--- a/event/field_moves.asm
+++ b/event/field_moves.asm
@@ -75,7 +75,7 @@ ShakeHeadbuttTree: ; 8c80a
; 8c893
HeadbuttTreeGFX: ; 8c893
-INCBIN "gfx/ow_fx/headbutt_tree.2bpp"
+INCBIN "gfx/overworld/headbutt_tree.2bpp"
; 8c913
HideHeadbuttTree: ; 8c913
@@ -152,11 +152,11 @@ OWCutAnimation: ; 8c940
; 8c98c
CutTreeGFX: ; c898c
-INCBIN "gfx/ow_fx/cut_tree.2bpp"
+INCBIN "gfx/overworld/cut_tree.2bpp"
; c89cc
CutGrassGFX: ; 8c9cc
-INCBIN "gfx/ow_fx/cut_grass.2bpp"
+INCBIN "gfx/overworld/cut_grass.2bpp"
; 8ca0c
OWCutJumptable: ; 8ca0c
diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm
index e7eece7c8..a00d471bb 100755
--- a/event/happiness_egg.asm
+++ b/event/happiness_egg.asm
@@ -55,25 +55,25 @@ ChangeHappiness: ; 71c2
push de
ld a, [de]
- cp 100
+ cp HAPPINESS_THRESHOLD_1
ld e, 0
jr c, .ok
inc e
- cp 200
+ cp HAPPINESS_THRESHOLD_2
jr c, .ok
inc e
.ok
dec c
ld b, 0
- ld hl, .Actions
+ ld hl, HappinessChanges
add hl, bc
add hl, bc
add hl, bc
ld d, 0
add hl, de
ld a, [hl]
- cp 100
+ cp $64 ; $80?
pop de
ld a, [de]
@@ -102,26 +102,9 @@ ChangeHappiness: ; 71c2
ld [BattleMonHappiness], a
ret
-.Actions:
- db +5, +3, +2 ; Gained a level
- db +5, +3, +2 ; Vitamin
- db +1, +1, +0 ; X Item
- db +3, +2, +1 ; Battled a Gym Leader
- db +1, +1, +0 ; Learned a move
- db -1, -1, -1 ; Lost to an enemy
- db -5, -5, -10 ; Fainted due to poison
- db -5, -5, -10 ; Lost to a much stronger enemy
- db +1, +1, +1 ; Haircut (Y1)
- db +3, +3, +1 ; Haircut (Y2)
- db +5, +5, +2 ; Haircut (Y3)
- db +1, +1, +1 ; Haircut (O1)
- db +3, +3, +1 ; Haircut (O2)
- db +10, +10, +4 ; Haircut (O3)
- db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
- db -10, -10, -15 ; Used Energy Root (bitter)
- db -15, -15, -20 ; Used Revival Herb (bitter)
- db +3, +3, +1 ; Grooming
- db +10, +6, +4 ; Gained a level in the place where it was caught
+
+INCLUDE "data/happiness_changes.asm"
+
StepHappiness:: ; 725a
; Raise the party's happiness by 1 point every other step cycle.
@@ -158,36 +141,36 @@ StepHappiness:: ; 725a
jr nz, .loop
ret
-DaycareStep:: ; 7282
+DayCareStep:: ; 7282
- ld a, [wDaycareMan]
+ ld a, [wDayCareMan]
bit 0, a
- jr z, .daycare_lady
+ jr z, .day_care_lady
ld a, [wBreedMon1Level] ; level
- cp 100
- jr nc, .daycare_lady
+ cp MAX_LEVEL
+ jr nc, .day_care_lady
ld hl, wBreedMon1Exp + 2 ; exp
inc [hl]
- jr nz, .daycare_lady
+ jr nz, .day_care_lady
dec hl
inc [hl]
- jr nz, .daycare_lady
+ jr nz, .day_care_lady
dec hl
inc [hl]
ld a, [hl]
cp 5242880 / $10000
- jr c, .daycare_lady
+ jr c, .day_care_lady
ld a, 5242880 / $10000
ld [hl], a
-.daycare_lady
- ld a, [wDaycareLady]
+.day_care_lady
+ ld a, [wDayCareLady]
bit 0, a
jr z, .check_egg
ld a, [wBreedMon2Level] ; level
- cp 100
+ cp MAX_LEVEL
jr nc, .check_egg
ld hl, wBreedMon2Exp + 2 ; exp
inc [hl]
@@ -204,7 +187,7 @@ DaycareStep:: ; 7282
ld [hl], a
.check_egg
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 5, [hl] ; egg
ret z
ld hl, wStepsToEgg
@@ -232,7 +215,7 @@ DaycareStep:: ; 7282
call Random
cp b
ret nc
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 5, [hl]
set 6, [hl]
ret
diff --git a/event/mom_phone.asm b/event/mom_phone.asm
index 818010091..0d7a2366f 100755
--- a/event/mom_phone.asm
+++ b/event/mom_phone.asm
@@ -80,11 +80,11 @@ CheckBalance_MomItem2: ; fd044
.check_have_2300
ld hl, hMoneyTemp
- ld [hl], (2300 / $10000) ; $00
+ ld [hl], MOM_MONEY / $10000
inc hl
- ld [hl], ((2300 % $10000) / $100) ; $08
+ ld [hl], MOM_MONEY / $100 % $100
inc hl
- ld [hl], (2300 % $100) ; $fc
+ ld [hl], MOM_MONEY % $100
.loop
ld de, MomItemTriggerBalance
ld bc, wMomsMoney
@@ -212,31 +212,7 @@ endr
ret
; fd136
-momitem: macro
-; money to trigger, cost, kind, item
- dt \1
- dt \2
- db \3, \4
-ENDM
-
-MomItems_1: ; fd136
- momitem 0, 600, MOM_ITEM, SUPER_POTION
- momitem 0, 90, MOM_ITEM, ANTIDOTE
- momitem 0, 180, MOM_ITEM, POKE_BALL
- momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
- momitem 0, 500, MOM_ITEM, GREAT_BALL
-MomItems_2: ; fd15e
- momitem 900, 600, MOM_ITEM, SUPER_POTION
- momitem 4000, 270, MOM_ITEM, REPEL
- momitem 7000, 600, MOM_ITEM, SUPER_POTION
- momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL
- momitem 15000, 3000, MOM_ITEM, MOON_STONE
- momitem 19000, 600, MOM_ITEM, SUPER_POTION
- momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
- momitem 40000, 900, MOM_ITEM, HYPER_POTION
- momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
- momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
-; fd1ae
+INCLUDE "data/mom_phone_items.asm"
db 0, 0, 0 ; XXX
diff --git a/event/overworld.asm b/event/overworld.asm
index 4d67bf61e..d50c158e9 100755
--- a/event/overworld.asm
+++ b/event/overworld.asm
@@ -277,53 +277,9 @@ CheckOverworldTileArrays: ; c840
xor a
ret
-CutTreeBlockPointers: ; c862
-; Which tileset are we in?
- dbw TILESET_JOHTO_1, .johto1
- dbw TILESET_JOHTO_2, .johto2
- dbw TILESET_KANTO, .kanto
- dbw TILESET_PARK, .park
- dbw TILESET_ILEX_FOREST, .ilex
- db -1
-
-.johto1 ; Johto OW
-; Which meta tile are we facing, which should we replace it with, and which animation?
- db $03, $02, $01 ; grass
- db $5b, $3c, $00 ; tree
- db $5f, $3d, $00 ; tree
- db $63, $3f, $00 ; tree
- db $67, $3e, $00 ; tree
- db -1
-
-.johto2 ; Goldenrod area
- db $03, $02, $01 ; grass
- db -1
-
-.kanto ; Kanto OW
- db $0b, $0a, $01 ; grass
- db $32, $6d, $00 ; tree
- db $33, $6c, $00 ; tree
- db $34, $6f, $00 ; tree
- db $35, $4c, $00 ; tree
- db $60, $6e, $00 ; tree
- db -1
-
-.park ; National Park
- db $13, $03, $01 ; grass
- db $03, $04, $01 ; grass
- db -1
-
-.ilex ; Ilex Forest
- db $0f, $17, $00
- db -1
-
-WhirlpoolBlockPointers: ; c8a4
- dbw TILESET_JOHTO_1, .johto
- db -1
-
-.johto ; c8a8
- db $07, $36, $00
- db -1
+
+INCLUDE "data/field_move_blocks.asm"
+
OWFlash: ; c8ac
call .CheckUseFlash
diff --git a/event/photo.asm b/event/photo.asm
index c47445fc5..fea57a368 100755
--- a/event/photo.asm
+++ b/event/photo.asm
@@ -214,9 +214,9 @@ UnownDexVacantString:
; 16d9c
UnownDexATile: ; 16d9c
-INCBIN "gfx/unknown/016d9c.1bpp"
+INCBIN "gfx/unknown/bold_a.1bpp"
UnownDexBTile: ; 16da4
-INCBIN "gfx/unknown/016da4.1bpp"
+INCBIN "gfx/unknown/bold_b.1bpp"
; 16dac
PlaceUnownPrinterFrontpic: ; 16dac
diff --git a/event/unown.asm b/event/unown.asm
index 6b65877f9..efd4c74f5 100644
--- a/event/unown.asm
+++ b/event/unown.asm
@@ -61,10 +61,10 @@ SpecialAerodactylChamber: ; 8ae30
call GetSecondaryMapHeaderPointer
ld a, h
- cp RuinsofAlphAerodactylChamber_SecondMapHeader / $100
+ cp RuinsOfAlphAerodactylChamber_SecondMapHeader / $100
jr nz, .nope
ld a, l
- cp RuinsofAlphAerodactylChamber_SecondMapHeader % $100
+ cp RuinsOfAlphAerodactylChamber_SecondMapHeader % $100
jr nz, .nope
ld de, EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
@@ -89,10 +89,10 @@ SpecialKabutoChamber: ; 8ae4e
call GetSecondaryMapHeaderPointer
ld a, h
- cp RuinsofAlphKabutoChamber_SecondMapHeader / $100
+ cp RuinsOfAlphKabutoChamber_SecondMapHeader / $100
jr nz, .done
ld a, l
- cp RuinsofAlphKabutoChamber_SecondMapHeader % $100
+ cp RuinsOfAlphKabutoChamber_SecondMapHeader % $100
jr nz, .done
ld de, EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
@@ -222,7 +222,7 @@ endm
cp $ff
ret z
cp $60
- ld a, (1 << 3) | PAL_BG_BROWN
+ ld a, VRAM_BANK_1 | PAL_BG_BROWN
jr c, .got_pal
ld a, PAL_BG_BROWN