From 699495bfcb732559114ad1450e704844a86308a1 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 10 Dec 2017 13:37:15 -0500 Subject: Consistent capitalization for map names, matching their constants --- event/daycare.asm | 40 ++++++++++++++++++++-------------------- event/happiness_egg.asm | 22 +++++++++++----------- event/unown.asm | 8 ++++---- 3 files changed, 35 insertions(+), 35 deletions(-) (limited to 'event') 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/happiness_egg.asm b/event/happiness_egg.asm index e7eece7c8..7588108bf 100755 --- a/event/happiness_egg.asm +++ b/event/happiness_egg.asm @@ -158,31 +158,31 @@ 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 + 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 @@ -204,7 +204,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 +232,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/unown.asm b/event/unown.asm index 6b65877f9..c30c06bfc 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 -- cgit v1.2.3 From b4261d27d8a6ed20c13dd1ff723f7d3f28833a58 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 10 Dec 2017 20:50:08 -0500 Subject: Use new palette constants --- event/unown.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'event') diff --git a/event/unown.asm b/event/unown.asm index c30c06bfc..efd4c74f5 100644 --- a/event/unown.asm +++ b/event/unown.asm @@ -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 -- cgit v1.2.3 From c6fefd0fe878a350a5e8cb1140d0356c78648ba5 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 00:17:39 -0500 Subject: Rename overworld sprite files, consistent with their constants --- event/field_moves.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'event') 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 -- cgit v1.2.3 From 31cce83e9b3bab01d8a605b170549fbd25ca5fee Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 13:47:58 -0500 Subject: Move lots of data tables into individual data/ files (This is not expected to be their final location, but it makes them easier to relocate when necessary, and easier for users to edit until the whole project's file structure is finalized.) --- event/happiness_egg.asm | 30 ++++++----------------------- event/mom_phone.asm | 32 ++++--------------------------- event/overworld.asm | 50 +++---------------------------------------------- 3 files changed, 13 insertions(+), 99 deletions(-) (limited to 'event') diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm index 7588108bf..7c6d6f46b 100755 --- a/event/happiness_egg.asm +++ b/event/happiness_egg.asm @@ -55,11 +55,11 @@ 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 @@ -73,7 +73,7 @@ ChangeHappiness: ; 71c2 ld d, 0 add hl, de ld a, [hl] - cp 100 + cp $64 ; $80? pop de ld a, [de] @@ -103,25 +103,7 @@ ChangeHappiness: ; 71c2 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. @@ -165,7 +147,7 @@ DayCareStep:: ; 7282 jr z, .day_care_lady ld a, [wBreedMon1Level] ; level - cp 100 + cp MAX_LEVEL jr nc, .day_care_lady ld hl, wBreedMon1Exp + 2 ; exp inc [hl] @@ -187,7 +169,7 @@ DayCareStep:: ; 7282 jr z, .check_egg ld a, [wBreedMon2Level] ; level - cp 100 + cp MAX_LEVEL jr nc, .check_egg ld hl, wBreedMon2Exp + 2 ; exp inc [hl] 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..221f02a4f 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/hm_blocks.asm" + OWFlash: ; c8ac call .CheckUseFlash -- cgit v1.2.3 From 5be98bae3c3c27b4b57bb8fda9368cf6c7f0d473 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 15:20:32 -0500 Subject: Move more data tables into data/ files. --- event/bug_contest_judging.asm | 76 ++----------------------------------------- 1 file changed, 3 insertions(+), 73 deletions(-) (limited to 'event') 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 -- cgit v1.2.3 From 8c2c9e91b50daf8e13c0833524d5f36ba67bb4f8 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 17:13:38 -0500 Subject: Better file name --- event/overworld.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'event') diff --git a/event/overworld.asm b/event/overworld.asm index 221f02a4f..d50c158e9 100755 --- a/event/overworld.asm +++ b/event/overworld.asm @@ -278,7 +278,7 @@ CheckOverworldTileArrays: ; c840 ret -INCLUDE "data/hm_blocks.asm" +INCLUDE "data/field_move_blocks.asm" OWFlash: ; c8ac -- cgit v1.2.3 From 2d644f5077fa9ec43009ea5ec072e6ade9a1f61b Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 18:04:23 -0500 Subject: Name some gfx/unknown/ files --- event/photo.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'event') 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 -- cgit v1.2.3 From f1f84743f7759a0f808f935add82439ba6637d2b Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 11 Dec 2017 22:44:25 -0500 Subject: Keep table labels in the same files as their contents. --- event/happiness_egg.asm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'event') diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm index 7c6d6f46b..a00d471bb 100755 --- a/event/happiness_egg.asm +++ b/event/happiness_egg.asm @@ -66,7 +66,7 @@ ChangeHappiness: ; 71c2 .ok dec c ld b, 0 - ld hl, .Actions + ld hl, HappinessChanges add hl, bc add hl, bc add hl, bc @@ -102,9 +102,10 @@ ChangeHappiness: ; 71c2 ld [BattleMonHappiness], a ret -.Actions: + INCLUDE "data/happiness_changes.asm" + StepHappiness:: ; 725a ; Raise the party's happiness by 1 point every other step cycle. -- cgit v1.2.3