From 6882a59366e13d5fde7b5cf415ec4e389cd02207 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:36:14 -0400 Subject: [PATCH 01/28] Add new build option --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2e03d19b3be..add2ba2a5ed 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ roms := \ pokecrystal_au.gbc \ pokecrystal_eu.gbc \ pokecrystal_debug.gbc \ - pokecrystal11_debug.gbc + pokecrystal11_debug.gbc \ + pokecrystalfix_debug.gbc patches := pokecrystal11.patch rom_obj := \ @@ -33,7 +34,7 @@ pokecrystal_eu_obj := $(rom_obj:.o=_eu.o) pokecrystal_debug_obj := $(rom_obj:.o=_debug.o) pokecrystal11_debug_obj := $(rom_obj:.o=11_debug.o) pokecrystal11_vc_obj := $(rom_obj:.o=11_vc.o) - +pokecrystalfix_debug_obj := $(rom_obj:.o=fix_debug.o) ### Build tools @@ -50,10 +51,10 @@ RGBGFX ?= $(RGBDS)rgbgfx RGBLINK ?= $(RGBDS)rgblink -### Build targets +### Build targets .SUFFIXES: -.PHONY: all crystal crystal11 crystal_au crystal_eu crystal_debug crystal11_debug clean tidy compare tools +.PHONY: all crystal crystal11 crystal_au crystal_eu crystal_debug crystal11_debug crystalfix_debug clean tidy compare tools .SECONDEXPANSION: .PRECIOUS: .SECONDARY: @@ -66,6 +67,7 @@ crystal_eu: pokecrystal_eu.gbc crystal_debug: pokecrystal_debug.gbc crystal11_debug: pokecrystal11_debug.gbc crystal11_vc: pokecrystal11.patch +crystalfix_debug: pokecrystalfix_debug.gbc clean: tidy find gfx \ @@ -98,6 +100,7 @@ tidy: $(pokecrystal_eu_obj) \ $(pokecrystal_debug_obj) \ $(pokecrystal11_debug_obj) \ + $(pokecrystalfix_debug_obj) \ rgbdscheck.o $(MAKE) clean -C tools/ @@ -121,6 +124,7 @@ $(pokecrystal_eu_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL_EU $(pokecrystal_debug_obj): RGBASMFLAGS += -D _DEBUG $(pokecrystal11_debug_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _DEBUG $(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL11_VC +$(pokecrystalfix_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG %.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template tools/make_patch $*_vc.sym $^ $@ @@ -151,6 +155,7 @@ $(foreach obj, $(pokecrystal_eu_obj), $(eval $(call DEP,$(obj),$(obj:_eu.o=.asm) $(foreach obj, $(pokecrystal_debug_obj), $(eval $(call DEP,$(obj),$(obj:_debug.o=.asm)))) $(foreach obj, $(pokecrystal11_debug_obj), $(eval $(call DEP,$(obj),$(obj:11_debug.o=.asm)))) $(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) +$(foreach obj, $(pokecrystalfix_debug_obj), $(eval $(call DEP,$(obj),$(obj:fix_debug.o=.asm)))) # Dependencies for VC files that need to run scan_includes %.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) $(preinclude_deps) | rgbdscheck.o @@ -166,6 +171,7 @@ pokecrystal_eu_opt = -Cjv -t PM_CRYSTAL -i BXTP -n 0 -k 01 -l 0x33 -m 0x10 pokecrystal_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_vc_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystalfix_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 %.gbc: $$(%_obj) layout.link $(RGBLINK) -n $*.sym -m $*.map -l layout.link -o $@ $(filter %.o,$^) From c8e3ef90c037a0fbcc6acc322545483ba20d1866 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:42:56 -0400 Subject: [PATCH 02/28] Update sunny_day_moves.asm --- data/battle/ai/sunny_day_moves.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/battle/ai/sunny_day_moves.asm b/data/battle/ai/sunny_day_moves.asm index 3f974b54568..348e4735828 100644 --- a/data/battle/ai/sunny_day_moves.asm +++ b/data/battle/ai/sunny_day_moves.asm @@ -10,4 +10,9 @@ SunnyDayMoves: db SACRED_FIRE db MORNING_SUN db SYNTHESIS +IF DEF(_CRYSTALFIX) + db SOLARBEAM + db FLAME_WHEEL + db MOONLIGHT +ENDC db -1 ; end From fb9653c526a06000b4d3ec17412f9ff336dd0245 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:45:03 -0400 Subject: [PATCH 03/28] fix HAPPINESS_GROOMING --- data/events/happiness_probabilities.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/events/happiness_probabilities.asm b/data/events/happiness_probabilities.asm index 584fd1cbee9..912c7c52a5f 100644 --- a/data/events/happiness_probabilities.asm +++ b/data/events/happiness_probabilities.asm @@ -10,4 +10,9 @@ HappinessData_YoungerHaircutBrother: HappinessData_DaisysGrooming: ; BUG: Daisy's grooming doesn't always increase happiness (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + db 50 percent, 2, HAPPINESS_GROOMING + db -1, 2, HAPPINESS_GROOMING +ELSE db -1, 2, HAPPINESS_GROOMING ; 99.6% chance +ENDC From 78efb86ad19dfa7ccbd73a4b1ffda08bdfa65d19 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:57:08 -0400 Subject: [PATCH 04/28] Fix GetForestTreeFrame --- engine/tilesets/tileset_anims.asm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm index ca2a86a7583..9712478ec80 100644 --- a/engine/tilesets/tileset_anims.asm +++ b/engine/tilesets/tileset_anims.asm @@ -639,6 +639,12 @@ ForestTreeRightAnimation2: GetForestTreeFrame: ; Return 0 if a is even, or 2 if odd. +IF DEF(_CRYSTALFIX) + and 1 + add a + ret + +ELSE and a jr z, .even cp 1 @@ -660,6 +666,7 @@ GetForestTreeFrame: .even xor a ret +ENDC AnimateFlowerTile: ; Save the stack pointer in bc for WriteTile to restore From b2b012fac1e5a90a2fedf8f49e80a179634db56b Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:59:18 -0400 Subject: [PATCH 05/28] Improve AI --- engine/battle/ai/scoring.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index a003495e42e..65d18663b53 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -1668,7 +1668,11 @@ AI_Smart_Conversion2: ; BUG: "Smart" AI discourages Conversion2 after the first turn (see docs/bugs_and_glitches.md) ld a, [wLastPlayerMove] and a +IF DEF(_CRYSTALFIX) + jr z, .discourage +ELSE jr nz, .discourage +ENDC push hl dec a @@ -1746,7 +1750,11 @@ AI_Smart_MeanLook: ; 80% chance to greatly encourage this move if the enemy is badly poisoned. ; BUG: "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + ld a, [wPlayerSubStatus5] +ELSE ld a, [wEnemySubStatus5] +ENDC bit SUBSTATUS_TOXIC, a jr nz, .encourage From e3e7788fdda02ff5cfff17f835bd496d27f37eb4 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:03:26 -0400 Subject: [PATCH 06/28] Fix Future Sight bug --- engine/battle/ai/redundant.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/battle/ai/redundant.asm b/engine/battle/ai/redundant.asm index 6525bde24e5..66efe996700 100644 --- a/engine/battle/ai/redundant.asm +++ b/engine/battle/ai/redundant.asm @@ -177,8 +177,13 @@ AI_Redundant: .FutureSight: ; BUG: AI does not discourage Future Sight when it's already been used (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + ld a, [wEnemyFutureSightCount] + and a +ELSE ld a, [wEnemyScreens] bit 5, a +ENDC ret .Heal: From 825640cfe2beb6b5153a81041d6731cf565175b3 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:06:29 -0400 Subject: [PATCH 07/28] Fix Rival2's DVs --- data/trainers/dvs.asm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/trainers/dvs.asm b/data/trainers/dvs.asm index 3e4999a5ac5..18374a99d95 100644 --- a/data/trainers/dvs.asm +++ b/data/trainers/dvs.asm @@ -44,7 +44,11 @@ TrainerClassDVs: dn 9, 8, 8, 8 ; SAILOR dn 9, 8, 8, 8 ; SUPER_NERD ; BUG: RIVAL2 has lower DVs than RIVAL1 (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + dn 13, 13, 13, 13 ; RIVAL2 +ELSE dn 9, 8, 8, 8 ; RIVAL2 +ENDC dn 9, 8, 8, 8 ; GUITARIST dn 10, 8, 8, 8 ; HIKER dn 9, 8, 8, 8 ; BIKER From eab634eff2f847ad72c172937ab396184b2f9792 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:08:00 -0400 Subject: [PATCH 08/28] Fix Unown Forme bug --- engine/pokemon/breeding.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index 747cf4de10e..6e4eebd295f 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -625,7 +625,12 @@ GetEggFrontpic: ld [wCurPartySpecies], a ld [wCurSpecies], a call GetBaseData +IF DEF(_CRYSTALFIX) + ld a, MON_DVS + call GetPartyParamLocation +ELSE ld hl, wBattleMonDVs +ENDC predef GetUnownLetter pop de predef_jump GetMonFrontpic @@ -635,7 +640,12 @@ GetHatchlingFrontpic: ld [wCurPartySpecies], a ld [wCurSpecies], a call GetBaseData +IF DEF(_CRYSTALFIX) + ld a, MON_DVS + call GetPartyParamLocation +ELSE ld hl, wBattleMonDVs +ENDC predef GetUnownLetter pop de predef_jump GetAnimatedFrontpic From e59cca08bdf630ce511c36261b83c437b116ab15 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:10:18 -0400 Subject: [PATCH 09/28] Fix Ruins of Alph roof palette --- gfx/tilesets/roofs.pal | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gfx/tilesets/roofs.pal b/gfx/tilesets/roofs.pal index 652b152c155..3d138257e80 100644 --- a/gfx/tilesets/roofs.pal +++ b/gfx/tilesets/roofs.pal @@ -11,8 +11,13 @@ RGB 06,09,07, 04,05,06 ; nite ; group 3 (dungeons) +IF DEF(_CRYSTALFIX) + RGB 31,10,00, 18,06,00 ; morn/day + RGB 18,05,09, 17,08,07 ; nite +ELSE RGB 21,21,21, 11,11,11 ; morn/day RGB 21,21,21, 17,08,07 ; nite +ENDC ; group 4 (Ecruteak) RGB 31,19,00, 27,10,05 ; morn/day From 4b1865837d2838a6a228196dd313ae266d5f4fd9 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:13:44 -0400 Subject: [PATCH 10/28] Fix Magikarp length error --- engine/events/magikarp.asm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm index 09d75967e5e..d4996f0674c 100644 --- a/engine/events/magikarp.asm +++ b/engine/events/magikarp.asm @@ -282,10 +282,16 @@ CalcMagikarpLength: ld a, b cp d ret c +IF DEF(_CRYSTALFIX) + ld a, c + cp e + ret +ELSE ret nc ld a, c cp e ret +ENDC .BCMinusDE: ; bc -= de From f3490b6ecba2f5d753e2527c2a6706370d30ef60 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:15:08 -0400 Subject: [PATCH 11/28] Fix HP bar animation --- engine/battle/anim_hp_bar.asm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm index 3e413f9f760..00ad0811f78 100644 --- a/engine/battle/anim_hp_bar.asm +++ b/engine/battle/anim_hp_bar.asm @@ -181,6 +181,18 @@ LongAnim_UpdateVariables: ld b, a ; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md) call ComputeHPBarPixels +IF DEF(_CRYSTALFIX) + ld a, e + pop bc + pop de + pop hl + ld hl, wCurHPBarPixels + cp [hl] + jr z, .loop + ld [hl], a + and a + ret +ELSE pop bc pop de pop hl @@ -191,6 +203,7 @@ LongAnim_UpdateVariables: ld [hl], a and a ret +ENDC ShortHPBarAnim_UpdateTiles: call HPBarAnim_UpdateHPRemaining @@ -377,6 +390,9 @@ ShortHPBar_CalcPixelFrame: ld a, h sbc $0 ld h, a +IF DEF(_CRYSTALFIX) + jr z, .done +ENDC jr c, .done inc b jr .loop From b50367af1d2b411365b0f5a48bc6477fd7800560 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:16:57 -0400 Subject: [PATCH 12/28] Fix various catching-related bugs --- engine/items/item_effects.asm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index d04851e60c0..f6aec36cd2b 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -214,6 +214,13 @@ PokeBallEffect: ld a, [wBattleMode] dec a jp nz, UseBallInTrainerBattle + +IF DEF(_CRYSTALFIX) + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .room_in_party +ENDC + ld a, [wPartyCount] cp PARTY_LENGTH @@ -342,6 +349,9 @@ PokeBallEffect: and 1 << FRZ | SLP_MASK ld c, 10 jr nz, .addstatus +IF DEF(_CRYSTALFIX) + ld a, [wEnemyMonStatus] +ENDC and a ld c, 5 jr nz, .addstatus @@ -357,6 +367,9 @@ PokeBallEffect: ld d, a push de ld a, [wBattleMonItem] +IF DEF(_CRYSTALFIX) + ld b, a +ENDC farcall GetItemHeldEffect ld a, b cp HELD_CATCH_CHANCE @@ -757,6 +770,9 @@ HeavyBall_GetDexEntryBank: push hl push de ld a, [wEnemyMonSpecies] +IF DEF(_CRYSTALFIX) + dec a +ENDC rlca rlca maskbits NUM_DEX_ENTRY_BANKS @@ -921,7 +937,11 @@ MoonBallMultiplier: push bc ld a, BANK("Evolutions and Attacks") call GetFarByte +IF DEF(_CRYSTALFIX) + cp MOON_STONE +ELSE cp MOON_STONE_RED ; BURN_HEAL +ENDC pop bc ret nz @@ -978,7 +998,11 @@ LoveBallMultiplier: pop de cp d pop bc +IF DEF(_CRYSTALFIX) + ret z +ELSE ret nz +ENDC sla b jr c, .max @@ -1012,7 +1036,11 @@ FastBallMultiplier: cp -1 jr z, .next cp c +IF DEF(_CRYSTALFIX) + jr nz, .loop +ELSE jr nz, .next +ENDC sla b jr c, .max From 544b61f3b26c6118d8bb090e7d4bc0bd4874c342 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:18:39 -0400 Subject: [PATCH 13/28] Enable HOF Master title --- engine/events/halloffame.asm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index 6a148d96303..4a95c7a9b25 100644 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -365,7 +365,11 @@ _HallOfFamePC: call DisplayHOFMon ; BUG: A "HOF Master!" title for 200-Time Famers is defined but inaccessible (see docs/bugs_and_glitches.md) ld a, [wHallOfFameTempWinCount] +IF DEF(_CRYSTALFIX) + cp HOF_MASTER_COUNT +ELSE cp HOF_MASTER_COUNT + 1 +ENDC jr c, .print_num_hof ld de, .HOFMaster hlcoord 1, 2 From 088d0d162e3218ae5c67e73e932d5518243e9624 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:20:25 -0400 Subject: [PATCH 14/28] Fix Daycare EXP bug --- engine/pokemon/move_mon.asm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index 4701705f305..0ee2777a342 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -884,18 +884,52 @@ RetrieveBreedmon: dec a ld [wCurPartyMon], a farcall HealPartyMon +IF DEF(_CRYSTALFIX) + ld d, MAX_LEVEL +ELSE ld a, [wCurPartyLevel] ld d, a +ENDC callfar CalcExpAtLevel pop bc +IF DEF(_CRYSTALFIX) + ld hl, MON_EXP + 2 +ELSE ld hl, MON_EXP +ENDC add hl, bc ldh a, [hMultiplicand] +IF DEF(_CRYSTALFIX) + ld b, a +ELSE ld [hli], a +ENDC ldh a, [hMultiplicand + 1] +IF DEF(_CRYSTALFIX) + ld c, a +ELSE ld [hli], a +ENDC ldh a, [hMultiplicand + 2] +IF DEF(_CRYSTALFIX) + ld d, a + ld a, [hld] + sub d + ld a, [hld] + sbc c + ld a, [hl] + sbc b + jr c, .not_max_exp + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, d +ENDC ld [hl], a +IF DEF(_CRYSTALFIX) +.not_max_exp +ENDC and a ret From 29fa9c663f4630457227cc6622118e5594fcf174 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:22:03 -0400 Subject: [PATCH 15/28] Fix enemy level check --- engine/battle/battle_transition.asm | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 74c5304ee6b..0cd98e139c2 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -215,10 +215,41 @@ StartTrainerBattle_DetermineWhichAnimation: ; The screen flashes a different number of times depending on the level of ; your lead Pokemon relative to the opponent's. ; BUG: Battle transitions fail to account for enemy's level (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + ld a, [wOtherTrainerClass] + and a + jr z, .wild + farcall SetTrainerBattleLevel + +.wild + ld b, PARTY_LENGTH + ld hl, wPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH - 1 + +.loop + ld a, [hli] + or [hl] + jr nz, .okay + add hl, de + dec b + jr nz, .loop + +.okay + ld de, MON_LEVEL - MON_HP - 1 + add hl, de +ENDC ld de, 0 +IF DEF(_CRYSTALFIX) + ld a, [hl] +ELSE ld a, [wBattleMonLevel] +ENDC add 3 +IF DEF(_CRYSTALFIX) + ld hl, wCurPartyLevel +ELSE ld hl, wEnemyMonLevel +ENDC cp [hl] jr nc, .not_stronger set TRANS_STRONGER_F, e From 871c130a1763a83d40d0185b5d7f7a79e77fb0a3 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:24:02 -0400 Subject: [PATCH 16/28] Battle transition fix --- engine/battle/read_trainer_party.asm | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 238c316f633..85996462dab 100644 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -389,3 +389,50 @@ IncompleteCopyNameFunction: ; unreferenced ret INCLUDE "data/trainers/parties.asm" + +IF DEF(_CRYSTALFIX) +SetTrainerBattleLevel: + ld a, 255 + ld [wCurPartyLevel], a + + ld a, [wInBattleTowerBattle] + bit 0, a + ret nz + + ld a, [wLinkMode] + and a + ret nz + + ld a, [wOtherTrainerClass] + dec a + ld c, a + ld b, 0 + ld hl, TrainerGroups + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wOtherTrainerID] + ld b, a +.skip_trainer + dec b + jr z, .got_trainer +.skip_party + ld a, [hli] + cp $ff + jr nz, .skip_party + jr .skip_trainer +.got_trainer + +.skip_name + ld a, [hli] + cp "@" + jr nz, .skip_name + + inc hl + ld a, [hl] + ld [wCurPartyLevel], a + ret +ENDC From 64c5bd5cc1c8336584661f88ba8a77057d71cd64 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:25:56 -0400 Subject: [PATCH 17/28] Fix music and battle transitions --- engine/battle/start_battle.asm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm index ff7f07a3c17..7e0ce240842 100644 --- a/engine/battle/start_battle.asm +++ b/engine/battle/start_battle.asm @@ -16,6 +16,9 @@ FindFirstAliveMonAndStartBattle: xor a ldh [hMapAnims], a call DelayFrame +IF DEF(_CRYSTALFIX) + predef DoBattleTransition +ELSE ld b, PARTY_LENGTH ld hl, wPartyMon1HP ld de, PARTYMON_STRUCT_LENGTH - 1 @@ -34,6 +37,7 @@ FindFirstAliveMonAndStartBattle: ld a, [hl] ld [wBattleMonLevel], a predef DoBattleTransition +ENDC farcall _LoadBattleFontsHPBar ld a, 1 ldh [hBGMapMode], a @@ -99,6 +103,14 @@ PlayBattleMusic: jr z, .done cp GRUNTF jr z, .done +IF DEF(_CRYSTALFIX) + cp EXECUTIVEM + jr z, .done + cp EXECUTIVEF + jr z, .done + cp SCIENTIST + jr z, .done +ENDC ld de, MUSIC_KANTO_GYM_LEADER_BATTLE farcall IsKantoGymLeader From 26fd226bac50e6734d8c4bc8e5b7979b5d60d483 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:27:04 -0400 Subject: [PATCH 18/28] Fix audio bug --- engine/games/slot_machine.asm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 0aaa636148c..97fd950023d 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -491,7 +491,11 @@ SlotsAction_PayoutAnim: ld [hl], d ld a, [wSlotsDelay] and $7 +IF DEF(_CRYSTALFIX) + ret nz +ELSE ret z +ENDC ld de, SFX_GET_COIN_FROM_SLOTS call PlaySFX ret From b104d8eb9254aeb97a0adb77dbf3312d168d6e2a Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:28:24 -0400 Subject: [PATCH 19/28] Fix audio bug --- engine/overworld/player_movement.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index 0c392484400..45b58c3909c 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -394,6 +394,10 @@ DoPlayerMovement:: ; BUG: No bump noise if standing on tile $3E (see docs/bugs_and_glitches.md) ld a, [wWalkingDirection] +IF DEF(_CRYSTALFIX) + cp STANDING + jr z, .not_warp +ENDC ld e, a ld d, 0 ld hl, .EdgeWarps @@ -405,8 +409,12 @@ DoPlayerMovement:: ld a, TRUE ld [wWalkingIntoEdgeWarp], a ld a, [wWalkingDirection] +IF DEF(_CRYSTALFIX) + +ELSE cp STANDING jr z, .not_warp +ENDC ld e, a ld a, [wPlayerDirection] From eeeafbc13928a91005c9f7159238a10dbc041dae Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:29:44 -0400 Subject: [PATCH 20/28] Fix Entei cry bug --- engine/pokedex/pokedex.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 3ea1977f38c..e5209522f8c 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -466,12 +466,17 @@ DexEntryScreen_MenuActionJumptable: .Cry: ; BUG: Playing Entei's Pokédex cry can distort Raikou's and Suicune's (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + ld a, [wCurPartySpecies] + call PlayMonCry +ELSE call Pokedex_GetSelectedMon ld a, [wTempSpecies] call GetCryIndex ld e, c ld d, b call PlayCry +ENDC ret .Print: From af4fcf6f2cc6a9037653c5282d7a8cb023ae6944 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:34:16 -0400 Subject: [PATCH 21/28] Fix Daycare and name length bugs --- engine/pokemon/search_owned.asm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/engine/pokemon/search_owned.asm b/engine/pokemon/search_owned.asm index 2edb987eb10..ed2e1c4ac6c 100644 --- a/engine/pokemon/search_owned.asm +++ b/engine/pokemon/search_owned.asm @@ -57,6 +57,17 @@ CheckOwnMonAnywhere: ret z ; BUG: CheckOwnMon does not check the Day-Care (see docs/bugs_and_glitches.md) +IF DEF(_CRYSTALFIX) + ld hl, wBreedMon1Species + ld bc, wBreedMon1OT + call CheckOwnMon + ret c ; found! + + ld hl, wBreedMon2Species + ld bc, wBreedMon2OT + call CheckOwnMon + ret c ; found! +ENDC ld d, a ld e, 0 ld hl, wPartyMon1Species @@ -223,7 +234,18 @@ CheckOwnMon: ld hl, wPlayerName ; BUG: CheckOwnMon only checks the first five letters of OT names (see docs/bugs_and_glitches.md) -rept NAME_LENGTH_JAPANESE - 2 +IF DEF(_CRYSTALFIX) + rept PLAYER_NAME_LENGTH -2 + ld a, [de] + cp [hl] + jr nz, .notfound + cp "@" + jr z, .found + inc hl + inc de +endr +ELSE + rept NAME_LENGTH_JAPANESE - 2 ld a, [de] cp [hl] jr nz, .notfound @@ -232,6 +254,8 @@ rept NAME_LENGTH_JAPANESE - 2 inc hl inc de endr +ENDC + ld a, [de] cp [hl] From d864caf617eee8b93c8994a9053b511b519569d5 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:35:50 -0400 Subject: [PATCH 22/28] Fix Magikarp length bugs --- engine/battle/core.asm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index f7e5d1108cf..6d1b11c4b9b 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6170,7 +6170,11 @@ LoadEnemyMon: ; No reason to keep going if length > 1536 mm (i.e. if HIGH(length) > 6 feet) ld a, [wMagikarpLength] +IF DEF(_CRYSTALFIX) + cp 5 +ELSE cp HIGH(1536) +ENDC jr nz, .CheckMagikarpArea ; 5% chance of skipping both size checks @@ -6179,7 +6183,11 @@ LoadEnemyMon: jr c, .CheckMagikarpArea ; Try again if length >= 1616 mm (i.e. if LOW(length) >= 4 inches) ld a, [wMagikarpLength + 1] +IF DEF(_CRYSTALFIX) + cp 4 +ELSE cp LOW(1616) +ENDC jr nc, .GenerateDVs ; 20% chance of skipping this check @@ -6188,24 +6196,40 @@ LoadEnemyMon: jr c, .CheckMagikarpArea ; Try again if length >= 1600 mm (i.e. if LOW(length) >= 3 inches) ld a, [wMagikarpLength + 1] +IF DEF(_CRYSTALFIX) + cp 3 +ELSE cp LOW(1600) +ENDC jr nc, .GenerateDVs .CheckMagikarpArea: ; BUG: Magikarp in Lake of Rage are shorter, not longer (see docs/bugs_and_glitches.md) ld a, [wMapGroup] cp GROUP_LAKE_OF_RAGE +IF DEF(_CRYSTALFIX) + jr nz, .Happiness +ELSE jr z, .Happiness +ENDC ld a, [wMapNumber] cp MAP_LAKE_OF_RAGE +IF DEF(_CRYSTALFIX) + jr nz, .Happiness +ELSE jr z, .Happiness +ENDC ; 40% chance of not flooring call Random cp 39 percent + 1 jr c, .Happiness ; Try again if length < 1024 mm (i.e. if HIGH(length) < 3 feet) ld a, [wMagikarpLength] +IF DEF(_CRYSTALFIX) + cp 3 +ELSE cp HIGH(1024) +ENDC jr c, .GenerateDVs ; try again ; Finally done with DVs @@ -6802,7 +6826,13 @@ BadgeStatBoosts: ; BUG: Glacier Badge may not boost Special Defense depending on the value of Special Attack (see docs/bugs_and_glitches.md) ld a, b srl b +IF DEF(_CRYSTALFIX) + push af + call c, BoostStat + pop af +ELSE call c, BoostStat +ENDC inc hl inc hl ; Check every other badge. From bc3d51d0e961642038f4b09b9d3a9ef3d9674528 Mon Sep 17 00:00:00 2001 From: Pyrochrome Date: Mon, 29 Jul 2024 17:46:16 -0400 Subject: [PATCH 23/28] Partially funtional skateboard code --- Makefile | 9 +++++- constants/engine_flags.asm | 1 + constants/item_constants.asm | 2 +- constants/sprite_constants.asm | 3 +- constants/wram_constants.asm | 1 + data/events/engine_flags.asm | 1 + data/items/attributes.asm | 6 +++- data/items/catch_rate_items.asm | 2 +- data/items/descriptions.asm | 9 ++++-- data/items/names.asm | 4 +++ data/sprites/player_sprites.asm | 2 ++ data/sprites/sprites.asm | 3 +- engine/events/overworld.asm | 46 +++++++++++++++++++++++++------ engine/items/item_effects.asm | 6 +++- gfx/sprites.asm | 6 +++- gfx/sprites/chris_skateboard.png | Bin 0 -> 450 bytes gfx/sprites/kris_skateboard.png | Bin 0 -> 491 bytes maps/Route16Gate.asm | 5 ++++ ram/wram.asm | 1 + 19 files changed, 88 insertions(+), 19 deletions(-) create mode 100644 gfx/sprites/chris_skateboard.png create mode 100644 gfx/sprites/kris_skateboard.png diff --git a/Makefile b/Makefile index 0b8021c6c18..e814f20b42a 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ roms := \ pokecrystal_eu.gbc \ pokecrystal_debug.gbc \ pokecrystal11_debug.gbc \ - pokecrystalfix_debug.gbc + pokecrystalfix_debug.gbc \ + pokecrystal_plus.gbc patches := pokecrystal11.patch rom_obj := \ @@ -35,6 +36,7 @@ pokecrystal_debug_obj := $(rom_obj:.o=_debug.o) pokecrystal11_debug_obj := $(rom_obj:.o=11_debug.o) pokecrystal11_vc_obj := $(rom_obj:.o=11_vc.o) pokecrystalfix_debug_obj := $(rom_obj:.o=fix_debug.o) +pokecrystal_plus_obj := $(rom_obj:.o=plus.o) ### Build tools @@ -68,6 +70,7 @@ crystal_debug: pokecrystal_debug.gbc crystal11_debug: pokecrystal11_debug.gbc crystal11_vc: pokecrystal11.patch crystalfix_debug: pokecrystalfix_debug.gbc +plus: pokecrystal_plus.gbc clean: tidy find gfx \ @@ -101,6 +104,7 @@ tidy: $(pokecrystal_debug_obj) \ $(pokecrystal11_debug_obj) \ $(pokecrystalfix_debug_obj) \ + $(pokecrystal_plus_obj) \ rgbdscheck.o $(MAKE) clean -C tools/ @@ -125,6 +129,7 @@ $(pokecrystal_debug_obj): RGBASMFLAGS += -D _DEBUG $(pokecrystal11_debug_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _DEBUG $(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL11_VC $(pokecrystalfix_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG +$(pokecrystal_plus_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG -D _PLUS %.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template tools/make_patch $*_vc.sym $^ $@ @@ -156,6 +161,7 @@ $(foreach obj, $(pokecrystal_debug_obj), $(eval $(call DEP,$(obj),$(obj:_debug.o $(foreach obj, $(pokecrystal11_debug_obj), $(eval $(call DEP,$(obj),$(obj:11_debug.o=.asm)))) $(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) $(foreach obj, $(pokecrystalfix_debug_obj), $(eval $(call DEP,$(obj),$(obj:fix_debug.o=.asm)))) +$(foreach obj, $(pokecrystal_plus_obj), $(eval $(call DEP,$(obj),$(obj:plus.o=.asm)))) # Dependencies for VC files that need to run scan_includes %.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) $(preinclude_deps) | rgbdscheck.o @@ -172,6 +178,7 @@ pokecrystal_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 pokecrystal11_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_vc_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystalfix_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystal_plus_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 %.gbc: $$(%_obj) layout.link $(RGBLINK) -n $*.sym -m $*.map -l layout.link -o $@ $(filter %.o,$^) diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm index 2503b3f27c2..6cc33d931c2 100644 --- a/constants/engine_flags.asm +++ b/constants/engine_flags.asm @@ -35,6 +35,7 @@ const ENGINE_STRENGTH_ACTIVE const ENGINE_ALWAYS_ON_BIKE const ENGINE_DOWNHILL + const ENGINE_SKATEBOARD ; wJohtoBadges const ENGINE_ZEPHYRBADGE const ENGINE_HIVEBADGE diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 9774b0cc2e0..91d44d02cd1 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -105,7 +105,7 @@ const WHT_APRICORN ; 61 const BLACKBELT_I ; 62 const BLK_APRICORN ; 63 - const ITEM_64 ; 64 + const SKATEBOARD ; 64 const PNK_APRICORN ; 65 const BLACKGLASSES ; 66 const SLOWPOKETAIL ; 67 diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index 11812856a55..54d284cf56f 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -64,7 +64,7 @@ const SPRITE_SCIENTIST ; 3c const SPRITE_KIMONO_GIRL ; 3d const SPRITE_SAGE ; 3e - const SPRITE_UNUSED_GUY ; 3f + const SPRITE_CHRIS_BOARD ; 3f const SPRITE_GENTLEMAN ; 40 const SPRITE_BLACK_BELT ; 41 const SPRITE_RECEPTIONIST ; 42 @@ -104,6 +104,7 @@ const SPRITE_ENTEI ; 64 const SPRITE_RAIKOU ; 65 const SPRITE_STANDING_YOUNGSTER ; 66 + const SPRITE_KRIS_BOARD ; 67 DEF NUM_OVERWORLD_SPRITES EQU const_value - 1 ; SpriteMons indexes (see data/sprites/sprite_mons.asm) diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index 9a80a8c9dbb..d6a36b73c2f 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -267,6 +267,7 @@ DEF CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2 const BIKEFLAGS_STRENGTH_ACTIVE_F ; 0 const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1 const BIKEFLAGS_DOWNHILL_F ; 2 + const BIKEFLAGS_SKATE_F ; 3 ; wDailyFlags1:: const_def diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm index e579a82c77f..e5e8f574298 100644 --- a/data/events/engine_flags.asm +++ b/data/events/engine_flags.asm @@ -43,6 +43,7 @@ EngineFlags: engine_flag wBikeFlags, BIKEFLAGS_STRENGTH_ACTIVE_F engine_flag wBikeFlags, BIKEFLAGS_ALWAYS_ON_BIKE_F engine_flag wBikeFlags, BIKEFLAGS_DOWNHILL_F + engine_flag wBikeFlags, BIKEFLAGS_SKATE_F engine_flag wJohtoBadges, ZEPHYRBADGE engine_flag wJohtoBadges, HIVEBADGE diff --git a/data/items/attributes.asm b/data/items/attributes.asm index c9c7daf6a19..784e29756a9 100644 --- a/data/items/attributes.asm +++ b/data/items/attributes.asm @@ -206,8 +206,12 @@ ItemAttributes: item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ; BLK_APRICORN item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE -; ITEM_64 +; SKATEBOARD +if DEF(_PLUS) + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +else item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +endc ; PNK_APRICORN item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ; BLACKGLASSES diff --git a/data/items/catch_rate_items.asm b/data/items/catch_rate_items.asm index 9c39afac366..a50578cc30b 100644 --- a/data/items/catch_rate_items.asm +++ b/data/items/catch_rate_items.asm @@ -7,7 +7,7 @@ TimeCapsule_CatchRateItems: db ITEM_2D, BITTER_BERRY db ITEM_32, GOLD_BERRY db ITEM_5A, BERRY - db ITEM_64, BERRY + db SKATEBOARD, BERRY db ITEM_78, BERRY db ITEM_87, BERRY db ITEM_BE, BERRY diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm index 2654a3194b2..9b148b62a1f 100644 --- a/data/items/descriptions.asm +++ b/data/items/descriptions.asm @@ -100,7 +100,7 @@ ItemDescriptions: dw WhtApricornDesc dw BlackbeltDesc dw BlkApricornDesc - dw TeruSama7Desc + dw SkateBoardDesc dw PnkApricornDesc dw BlackGlassesDesc dw SlowpokeTailDesc @@ -644,8 +644,13 @@ BlkApricornDesc: db "A black APRICORN." next "@" -TeruSama7Desc: +SkateBoardDesc: + if DEF(_PLUS) + db "A sporty board for" + next "rolling around.@" + else db "?@" + endc PnkApricornDesc: db "A pink APRICORN." diff --git a/data/items/names.asm b/data/items/names.asm index 93b83d9c5bd..6773cc0bd6c 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -99,7 +99,11 @@ ItemNames:: li "WHT APRICORN" li "BLACKBELT" li "BLK APRICORN" + if DEF(_PLUS) + li "SKATEBOARD" + else li "TERU-SAMA" + endc li "PNK APRICORN" li "BLACKGLASSES" li "SLOWPOKETAIL" diff --git a/data/sprites/player_sprites.asm b/data/sprites/player_sprites.asm index 89eb6e83107..943dd0a24a2 100644 --- a/data/sprites/player_sprites.asm +++ b/data/sprites/player_sprites.asm @@ -3,6 +3,7 @@ ChrisStateSprites: db PLAYER_BIKE, SPRITE_CHRIS_BIKE db PLAYER_SURF, SPRITE_SURF db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU + db PLAYER_SKATE, SPRITE_CHRIS_BOARD db -1 ; end KrisStateSprites: @@ -10,4 +11,5 @@ KrisStateSprites: db PLAYER_BIKE, SPRITE_KRIS_BIKE db PLAYER_SURF, SPRITE_SURF db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU + db PLAYER_SKATE, SPRITE_KRIS_BOARD db -1 ; end diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm index 25281c22d6a..87755d7b998 100644 --- a/data/sprites/sprites.asm +++ b/data/sprites/sprites.asm @@ -69,7 +69,7 @@ OverworldSprites: overworld_sprite ScientistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE overworld_sprite KimonoGirlSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED overworld_sprite SageSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN - overworld_sprite UnusedGuySpriteGFX, 12, STANDING_SPRITE, PAL_OW_RED + overworld_sprite ChrisBoardSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED overworld_sprite GentlemanSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE overworld_sprite BlackBeltSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN overworld_sprite ReceptionistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE @@ -109,4 +109,5 @@ OverworldSprites: overworld_sprite EnteiSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED overworld_sprite RaikouSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED overworld_sprite StandingYoungsterSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BLUE + overworld_sprite KrisBoardSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE assert_table_length NUM_OVERWORLD_SPRITES diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 8fa37c572a6..dadc62ed66a 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1625,15 +1625,36 @@ BikeFunction: .TryBike: call .CheckEnvironment - jr c, .CannotUseBike + jp c, .CannotUseBike ld a, [wPlayerState] cp PLAYER_NORMAL jr z, .GetOnBike + cp PLAYER_SURF + jp z, .CannotUseBike + cp PLAYER_SURF_PIKA + jr z, .CannotUseBike + jr .whichItem + +.whichItem: cp PLAYER_BIKE + jr z, .UsingBike + ld a, [wCurItem] ;currently skating + cp SKATEBOARD + jr z, .GetOffBike + jr .GetOnBike + +.UsingBike + ld a, [wCurItem] + cp BICYCLE jr z, .GetOffBike - jr .CannotUseBike + jr .GetOnBoard .GetOnBike: + ld a, [wCurItem] + cp SKATEBOARD + jr z, .GetOnBoard + ld a, PLAYER_BIKE + ld [wPlayerState], a ld hl, Script_GetOnBike ld de, Script_GetOnBike_Register call .CheckIfRegistered @@ -1651,10 +1672,22 @@ BikeFunction: ld a, $1 ret +.GetOnBoard: + ld hl, wBikeFlags + set BIKEFLAGS_SKATE_F , [hl] + ld a, PLAYER_SKATE + ld [wPlayerState], a + ld hl, Script_GetOnBike + ld de, Script_GetOnBike_Register + call .CheckIfRegistered + jr .done + ret + .GetOffBike: ld hl, wBikeFlags bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] jr nz, .CantGetOffBike + res BIKEFLAGS_SKATE_F , [hl] ld hl, Script_GetOffBike ld de, Script_GetOffBike_Register call .CheckIfRegistered @@ -1678,7 +1711,7 @@ BikeFunction: ld a, [wUsingItemWithSelect] and a ret z - ld h, d + ld h, d ;load script_GetOnBike_Register ld l, e ret @@ -1706,23 +1739,18 @@ BikeFunction: Script_GetOnBike: reloadmappart special UpdateTimePals - loadvar VAR_MOVEMENT, PLAYER_BIKE writetext GotOnBikeText + special PlayMapMusic waitbutton closetext special UpdatePlayerSprite end Script_GetOnBike_Register: - loadvar VAR_MOVEMENT, PLAYER_BIKE closetext special UpdatePlayerSprite end -Overworld_DummyFunction: ; unreferenced - nop - ret - Script_GetOffBike: reloadmappart special UpdateTimePals diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f6aec36cd2b..466bc5b771d 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -113,7 +113,11 @@ ItemEffects: dw NoEffect ; WHT_APRICORN dw NoEffect ; BLACKBELT_I dw NoEffect ; BLK_APRICORN - dw NoEffect ; ITEM_64 + if DEF(_PLUS) + dw BicycleEffect ; SKATEBOARD + else + dw NoEffect + endc dw NoEffect ; PNK_APRICORN dw NoEffect ; BLACKGLASSES dw NoEffect ; SLOWPOKETAIL diff --git a/gfx/sprites.asm b/gfx/sprites.asm index 212c0b2595f..5d562a6bc9f 100644 --- a/gfx/sprites.asm +++ b/gfx/sprites.asm @@ -66,7 +66,7 @@ FishingGuruSpriteGFX:: INCBIN "gfx/sprites/fishing_guru.2bpp" ScientistSpriteGFX:: INCBIN "gfx/sprites/scientist.2bpp" KimonoGirlSpriteGFX:: INCBIN "gfx/sprites/kimono_girl.2bpp" SageSpriteGFX:: INCBIN "gfx/sprites/sage.2bpp" -UnusedGuySpriteGFX:: INCBIN "gfx/sprites/unused_guy.2bpp" +ChrisBoardSpriteGFX:: INCBIN "gfx/sprites/chris_skateboard.2bpp" GentlemanSpriteGFX:: INCBIN "gfx/sprites/gentleman.2bpp" BlackBeltSpriteGFX:: INCBIN "gfx/sprites/black_belt.2bpp" ReceptionistSpriteGFX:: INCBIN "gfx/sprites/receptionist.2bpp" @@ -106,3 +106,7 @@ SuicuneSpriteGFX:: INCBIN "gfx/sprites/suicune.2bpp" EnteiSpriteGFX:: INCBIN "gfx/sprites/entei.2bpp" RaikouSpriteGFX:: INCBIN "gfx/sprites/raikou.2bpp" StandingYoungsterSpriteGFX:: INCBIN "gfx/sprites/standing_youngster.2bpp" + +SECTION "Sprites 3", ROMX + +KrisBoardSpriteGFX:: INCBIN "gfx/sprites/kris_skateboard.2bpp" diff --git a/gfx/sprites/chris_skateboard.png b/gfx/sprites/chris_skateboard.png new file mode 100644 index 0000000000000000000000000000000000000000..349bde1ed360d5606a040e87a016e6b0ff16cec4 GIT binary patch literal 450 zcmV;z0X_bSP)Px$d`Uz>R5*>bltFUDAPfXs6kimN93H70BpKpdb`Rm;G87gwjm8!L20#Ez0CNB= zfN|!y)dIlY^)j-+hMl!6Fu-$>U}9Rz5-eE^K(JtefJqptf{UmcV&g1wp>&qk0R*W` zvPYQXB{x6uR6+EDo<_pK*)i568Yi|I1zuSSJM^92hc?*kG+75YmVE6urFrt3QV{56PU>>Fav%E zX7UP5)eswBkPGcbtSB9R?Bxz;JK2@9zVN$)KIxAO$`?F(G><;Cd0c^sS74e)&tHFs zwvQE%=*G>SS+bLtCk}_0Hv7)Yz2l#FT!HCp$hok~Tm>dxfw>T7UPx$rAb6VR5*>DlS_{1APfY{QLfk=(mrIr1?DqZ%^Ma`gh*(YU15L#zyL2mWC02T zVF)3hDEA35L?s1aBOwqHHZ~&3BoTHPf&^gTd11mxM#6vxY0zs(g!>FIfd0o?h6gYL zAT#C$9RgN#M5kOEcaCrQ51-XM_WyW*=nEA4liCkn2&rm@3D19wzE+diN{+Do2B_vv zDLOWVsQDJ&l?dwanEX~>l2M?_@QfQ1;#emFu|fZt$DD_2K16{S?(!Mr;?d(EAQRhR zf@I_nQ04(oLRIG$x}XjgWaBH$Lu8K0yfULd8M_Nzz+UzPIb-w_&ljot5WYqX+<<71 z8_-2)UV8~Mp3KJbY7lhsYhUjjkPI)V7iQ>!$ zsIC*gnU4#~;<3Mf;HNM>Qb(AVk1*ZJOBjEI3E#qiUl3>uGkM&?Y#vLPxshk2?h|X0 z=T8>szwF+P4InLI?U=@?x` ht{4K0N$J0Q`3I_KB29XYGgJTo002ovPDHLkV1i9s%`^Z2 literal 0 HcmV?d00001 diff --git a/maps/Route16Gate.asm b/maps/Route16Gate.asm index 78ec39e50be..132021d1ab3 100644 --- a/maps/Route16Gate.asm +++ b/maps/Route16Gate.asm @@ -15,6 +15,11 @@ Route16GateOfficerScript: Route16GateBicycleCheck: checkitem BICYCLE + iffalse .CheckBoard + end + +.CheckBoard + checkitem SKATEBOARD iffalse .NoBicycle end diff --git a/ram/wram.asm b/ram/wram.asm index d23680f285e..7a66a4cfc70 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -3276,6 +3276,7 @@ wBikeFlags:: ; bit 0: using strength ; bit 1: always on bike ; bit 2: downhill +; bit 3: skateboard db ds 1 ; cleared along with wBikeFlags by ResetBikeFlags From 33f123bc13785c8401dd45b4b8e2d2bb187955c0 Mon Sep 17 00:00:00 2001 From: Pyrochrome Date: Wed, 18 Sep 2024 18:15:37 -0400 Subject: [PATCH 24/28] Implement Unown symbol on title screen --- Makefile | 18 +++++++++--------- engine/movie/title.asm | 28 ++++++++++++++++++++++++++++ engine/movie/unused_title.asm | 20 ++++++++++---------- gfx/title/old_bg.png | Bin 1770 -> 4551 bytes gfx/title/title.pal | 6 +++--- mobile/mobile_41.asm | 3 ++- 6 files changed, 52 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index e814f20b42a..e2b097e35ff 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ roms := \ pokecrystal_eu.gbc \ pokecrystal_debug.gbc \ pokecrystal11_debug.gbc \ - pokecrystalfix_debug.gbc \ + pokecrystalplus_debug.gbc \ pokecrystal_plus.gbc patches := pokecrystal11.patch @@ -35,7 +35,7 @@ pokecrystal_eu_obj := $(rom_obj:.o=_eu.o) pokecrystal_debug_obj := $(rom_obj:.o=_debug.o) pokecrystal11_debug_obj := $(rom_obj:.o=11_debug.o) pokecrystal11_vc_obj := $(rom_obj:.o=11_vc.o) -pokecrystalfix_debug_obj := $(rom_obj:.o=fix_debug.o) +pokecrystalplus_debug_obj := $(rom_obj:.o=plus_debug.o) pokecrystal_plus_obj := $(rom_obj:.o=plus.o) ### Build tools @@ -56,7 +56,7 @@ RGBLINK ?= $(RGBDS)rgblink ### Build targets .SUFFIXES: -.PHONY: all crystal crystal11 crystal_au crystal_eu crystal_debug crystal11_debug crystalfix_debug clean tidy compare tools +.PHONY: all crystal crystal11 crystal_au crystal_eu crystal_debug crystal11_debug plus_debug clean tidy compare tools .SECONDEXPANSION: .PRECIOUS: .SECONDARY: @@ -69,7 +69,7 @@ crystal_eu: pokecrystal_eu.gbc crystal_debug: pokecrystal_debug.gbc crystal11_debug: pokecrystal11_debug.gbc crystal11_vc: pokecrystal11.patch -crystalfix_debug: pokecrystalfix_debug.gbc +plus_debug: pokecrystalplus_debug.gbc plus: pokecrystal_plus.gbc clean: tidy @@ -103,7 +103,7 @@ tidy: $(pokecrystal_eu_obj) \ $(pokecrystal_debug_obj) \ $(pokecrystal11_debug_obj) \ - $(pokecrystalfix_debug_obj) \ + $(pokecrystalplus_debug_obj) \ $(pokecrystal_plus_obj) \ rgbdscheck.o $(MAKE) clean -C tools/ @@ -128,8 +128,8 @@ $(pokecrystal_eu_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL_EU $(pokecrystal_debug_obj): RGBASMFLAGS += -D _DEBUG $(pokecrystal11_debug_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _DEBUG $(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL11_VC -$(pokecrystalfix_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG -$(pokecrystal_plus_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG -D _PLUS +$(pokecrystalplus_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG -D _PLUS +$(pokecrystal_plus_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _PLUS %.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template tools/make_patch $*_vc.sym $^ $@ @@ -160,7 +160,7 @@ $(foreach obj, $(pokecrystal_eu_obj), $(eval $(call DEP,$(obj),$(obj:_eu.o=.asm) $(foreach obj, $(pokecrystal_debug_obj), $(eval $(call DEP,$(obj),$(obj:_debug.o=.asm)))) $(foreach obj, $(pokecrystal11_debug_obj), $(eval $(call DEP,$(obj),$(obj:11_debug.o=.asm)))) $(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) -$(foreach obj, $(pokecrystalfix_debug_obj), $(eval $(call DEP,$(obj),$(obj:fix_debug.o=.asm)))) +$(foreach obj, $(pokecrystalplus_debug_obj), $(eval $(call DEP,$(obj),$(obj:plus_debug.o=.asm)))) $(foreach obj, $(pokecrystal_plus_obj), $(eval $(call DEP,$(obj),$(obj:plus.o=.asm)))) # Dependencies for VC files that need to run scan_includes @@ -177,7 +177,7 @@ pokecrystal_eu_opt = -Cjv -t PM_CRYSTAL -i BXTP -n 0 -k 01 -l 0x33 -m 0x10 pokecrystal_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_vc_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystalfix_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystalplus_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal_plus_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 %.gbc: $$(%_obj) layout.link diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 16d56ab534d..9e64263eac4 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -26,6 +26,9 @@ _TitleScreen: ld de, vTiles1 call Decompress + ; db $96, $78 + ; db $96, $80 + ; db $96, $88 ; Clear screen palettes hlbgcoord 0, 0 ld bc, 20 * BG_MAP_WIDTH @@ -84,6 +87,7 @@ _TitleScreen: ld a, 0 | VRAM_BANK_1 call ByteFill + ; Back to VRAM bank 0 ld a, 0 ldh [rVBK], a @@ -97,8 +101,29 @@ _TitleScreen: ld hl, TitleCrystalGFX ld de, vTiles0 call Decompress + ld a, [wCurSpecies] + cp 3 + jr nz, .ClearTile + +; Load Unown graphic + ld hl, TitleUnownGFX + ld de, vTiles0 tile $60 + ld bc, $C tiles + call CopyBytes + ld hl, .UnownOamData + ld de, wShadowOAMSprite30 + ld bc, $18 + call CopyBytes + .UnownOamData + db $78, $88, $60, 07 + db $78, $90, $62, 07 + db $78, $98, $64, 07 + db $88, $88, $66, 07 + db $88, $90, $68, 07 + db $88, $98, $6A, 07 ; Clear screen tiles +.ClearTile hlbgcoord 0, 0 ld bc, 64 * BG_MAP_WIDTH ld a, " " @@ -372,3 +397,6 @@ INCBIN "gfx/title/crystal.2bpp.lz" TitleScreenPalettes: INCLUDE "gfx/title/title.pal" + +TitleUnownGFX: +INCBIN "gfx/title/old_bg.2bpp" diff --git a/engine/movie/unused_title.asm b/engine/movie/unused_title.asm index db916e92581..943015ee2ee 100644 --- a/engine/movie/unused_title.asm +++ b/engine/movie/unused_title.asm @@ -14,15 +14,15 @@ UnusedTitleScreen: ; unreferenced ld [hli], a ; wTitleScreenTimer ld [hl], a ; wTitleScreenTimer + 1 - ld hl, UnusedTitleBG_GFX - ld de, vTiles2 - ld bc, vBGMap0 - vTiles2 - call CopyBytes + ; ld hl, UnusedTitleBG_GFX + ; ld de, vTiles2 + ; ld bc, vBGMap0 - vTiles2 + ; call CopyBytes - ld hl, UnusedTitleBG_GFX + $80 tiles - ld de, vTiles1 - ld bc, vTiles2 - vTiles1 - call CopyBytes + ; ld hl, UnusedTitleBG_GFX + $80 tiles + ; ld de, vTiles1 + ; ld bc, vTiles2 - vTiles1 + ; call CopyBytes ld hl, UnusedTitleFG_GFX ld de, vTiles0 @@ -96,8 +96,8 @@ UnusedTitleScreen: ; unreferenced ret -UnusedTitleBG_GFX: -INCBIN "gfx/title/old_bg.2bpp" +;UnusedTitleBG_GFX: +;INCBIN "gfx/title/old_bg.2bpp" UnusedTitleBG_Tilemap: ; 32x32 (alternating tiles and attributes) diff --git a/gfx/title/old_bg.png b/gfx/title/old_bg.png index 2b6d5db20b458dc000ed1b869946e6669c22f6aa..93fd4ac1e83a989bd05692d0dd9cc35b3ebf23cf 100644 GIT binary patch literal 4551 zcmeHLe{dA_72iZ`jtGiDeiWsw7p-X7+r8bp+aKH!NiLAnTu8$KiP)KZZ}+>G9qw+A zyG`yAolezBFvuVyP?QO&#xZsxIt6QC#!4K-A1x?MlwWnyqKI|sI2kK8N~HAd-sO_C z&U7*@|K&2@eBXY*?|r`Sect=NWUsTfX64M{1;qqG%nVfd>tJq#VY9(6qBQi}`!Jor z^#L^yxQj3sL9<{QQ26YAXiF1K=!P8?NnMj?tuW|!Qsa8=@8>pxt6G>gwqL?5uU3<2@cF&Q!Z))$~`|+a9 zZ*Fe4_5NmXpb>r4H)~q^{B?;}{`ljD`>VrM`~x za+zbeo8wOG-_B5x;alJBJN)&lmyiB)r|-&J_7{G87XQR{^!J~)-r?##zHZ60^uqHe zy~BTf>ama69W`qjo}4$Q{(*3$?n1|!y@UVwuHwr_&TJi6Qc~7=;8_I>e#RebXe_4OxjoIYov*8AR#*DtNx_3$qqxTjnz-}`4jH;3=3t8ol<8{Z8L|LN_9*R&T`ef6~MZ>P5Oxo8_bcrW?jwln*K47Aqdr(I$$HFz6g`X`nOMT) zlkk>h5=h>F4Kj=)THI$JdbQt9YKqUk&K+cei3;4LRkbDY>b9DY+_pg$6?@sTVsAzQ zfEYFqnTbW?DJkQ#TeuR)<}z(3Efr&f&t4B{uF#X1bU9oOhN{eHEv$W6G3iYzs#ND+ zk%NFIpS{U25)w_P(`iSVbLhzk?G#0kW>}hKDbS!&t#JcosCcT>gves}aY{~V2}9H4 zq=|{bdb8oP+hLy^^)HqP2J`UoRE`DUgU+A??Q}47EJlyFNEwwa0Fra)do5C-)&!>O za7u4Z%DA!x$BokQ5Q?0)Pc$c^Ryc}G<0y`SY6?zuPB_xM5P1uef`}GNSXMyx1WiLz z$H0ZF^vzzBjiY{x4lodr@m3ft;6q!Sm zi{%vxd03FRu#99@4m$;Y98@5lGEiK`CKP}>G{9jH&%4}wnDU4oFbum96=r#k;*o%z zqDOEd(LD}gRZ@ehMA7kHnNSKqVHD<6BqGWwr~>6uWlV{(;sRuqXIWnGu$0A(Ad^ie&w4z9 z$Z;;W!0;Z=n9^FDOhF}@m{x1EcFeR$5DXBD%sK@CYaL>dDv}r(dNQQzQJ+2E6!Y6b zxK0W(kRKTsK=W-fG}|<23t`bRFmqJ2vHiQ&v!HVT4U}d-DCKQig=pMOp9bMPHrxXO%BO}#~DOps*luHo= zN)Sbrg2ah#L3DXImpBnUrK?67CGqkI@CaN%d0Kx!$i-Ho?wqKdZo+03fG~;?DJLIt z@)E;IoRA}ozWO0z#VsqmiYQj#6v`#a423usLwT66+oQU}0@qs-&1@V@GlQ7KK`>OmjCj|-L~@n%a=BP zaO;=bj`j3aN9vzywDmlC%egzZ-?qPF;IX%N9q#HLJN$Q~IM=#G_U-IqRx#ZF_9gByq-80y@zI)FnKb20NCej^k z(Uzj(od-si{yqB9)+N&ht8Lp~pFwoJd$eYjjEB!2X&XG_?fSfR(YYIzHH`c~?1YtBd{rx8>5xzjM~tSm*N@eZ(F5}LNcz=Kdda2{#G8qZD!%4GNG6X;}k58}R%xpaF#Za@gd~YU4 zfV%Ru+%5;||bY(jPy5Y%|c$ zUdMGF-fg}8Oba9^_7I>_=kSaKw5LFg>Rx{&UR4NyBn5F?HnAxSt04-Zr0YW1KJXKu z<=a6vsrxPk^$R$(onfFj2t5S!l{&GZD=L;I7Hg*%2m>ets6n#}uvF-Wq3zcQusI7r z9qCS>Ybl_@Pz_G$_?fUNzXWJ2-2n6wupL%)%-E$V3G~^|0R03s0Zz5__~eHY=njHo zP+`CggZkNcc6!HP0229UfF2ko1DqS2MVyj=mWMCH3v%XxrC7%R$N=NxR}nvyKwn;@ zgK0+U!cykm0APbMNG&(PPe36LC#_+zNC5Zzf@cW(*a_EYJS%xPYyq6~fF1&x1C*i3 zTZ2MC1wfFYhk(N&2`H9l$V{${6CkX9L55x~@c=&o*fEG}LKK{CpqKiIT?V=;4EQ5$ z;21q%q+=*Z!%-L*A)uy*l?(8dZbKy@M8c$MLkv)&)DZ@x;ZH9TFr$%yfe8jU)qU{V zzTqMPNm*!dQmU4!Dlb!Qs{6(Q4y_FWTn4IrLHW7_PFw2fpVp~%X7cx!0_dxKJFLdp z&<5PMEcLCSx-@+7s|EDAp>*OKP(aGu+u(y2T#K5RAmERlK?$|Kqs>5)0S$V^>vEt{ z43MGna~ySAXBQkYP!jvNn-a*^0N-cBOPHA0ov|G<_$-+|-)#m?+>%YOL7U%AmJvpA zV8qA3kO!=>LHA!I!_xgA0SVs-tsU^KaZTM{6yj$nmdav@XUlb76hk8rUa)!xRIYiH zayN!XIp+Z_%A`JF!OW;ON*#aSGpwMIGsJv*nu9nKR?aS*U6>igZNGlB$cEfpt^*(r zC^G>gkSHUq`4@|#vWnT8hV4w6W*b=ZebdgBjq<+X3_ieY8Si~}AE@~ZJGYcu!W}YP zW5Yl3!4lq!?*necu*>rg=GhRZ8M;cZcjximk38Tv&aQ(yv`pl-K1GH+wj4xbnf9b* zT3I)dPLFK>O9E{0R`SE+$4)lx5+I+*5a}{V;Jxo{-2J50Z z*=#lfdODdTK-ULZ?s8odpM34%*x#H#$K$g)#6T;w4b-u%J!#l;K7DU9w2`wjdL#{f z3lcatNV~b}Skhqr_4qrfJEAU=mEUxUl>C?(qn{QM_u5fM8bwJ z?a*5uKr!#Zm*_F#FZ!l;R`&{;mZLp}(&%SEr9rp`WN?*mG+p}PbwPp>%tc6Xivh~Y z6Hs}&RF5dJXjT-o;M6okGZg0*DbBBA(~@z};TiGU@kAn7Dk1b3=cy4z*TW{xjHur6 zRaL@NchOl{e`KYQQwV+_;nwS0?c`!zujg@Zw)cYc^8!>&?lQ zUa;p(Z19JHiA|eBZ7dE`>mRp2wC+c*P Date: Wed, 18 Sep 2024 20:58:24 -0400 Subject: [PATCH 25/28] Add ability to stop skateboard --- engine/overworld/player_movement.asm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index 45b58c3909c..790a93d6649 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -18,8 +18,15 @@ DoPlayerMovement:: ld hl, wBikeFlags bit BIKEFLAGS_DOWNHILL_F, [hl] + jr nz, .Downhill + bit BIKEFLAGS_SKATE_F, [hl] ret z - + ld c, a + cp B_BUTTON + jr z, .NotMoving + ret + +.Downhill ld c, a and D_PAD ret nz From bc23b8e1c1b0bda1de7aa4e5ab8f6aa2efc9b82d Mon Sep 17 00:00:00 2001 From: Pyrochrome Date: Wed, 18 Sep 2024 22:31:46 -0400 Subject: [PATCH 26/28] More changes to skateboard. --- data/items/descriptions.asm | 4 ++-- engine/overworld/player_movement.asm | 14 +++++++------- maps/Route16Gate.asm | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm index 9b148b62a1f..1aaeac6c8a4 100644 --- a/data/items/descriptions.asm +++ b/data/items/descriptions.asm @@ -646,8 +646,8 @@ BlkApricornDesc: SkateBoardDesc: if DEF(_PLUS) - db "A sporty board for" - next "rolling around.@" + db "Ride anywhere at" ;18 max chars per line + next "twice the speed.@" else db "?@" endc diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index 790a93d6649..29aef51a8ed 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -17,16 +17,16 @@ DoPlayerMovement:: ; Standing downhill instead moves down. ld hl, wBikeFlags - bit BIKEFLAGS_DOWNHILL_F, [hl] - jr nz, .Downhill bit BIKEFLAGS_SKATE_F, [hl] - ret z + jr nz, .NotSkate ld c, a cp B_BUTTON - jr z, .NotMoving - ret - -.Downhill + jp z, .Standing + +.NotSkate + bit BIKEFLAGS_DOWNHILL_F, [hl] + ret z + ld c, a and D_PAD ret nz diff --git a/maps/Route16Gate.asm b/maps/Route16Gate.asm index 132021d1ab3..d2226a7ab63 100644 --- a/maps/Route16Gate.asm +++ b/maps/Route16Gate.asm @@ -15,11 +15,11 @@ Route16GateOfficerScript: Route16GateBicycleCheck: checkitem BICYCLE - iffalse .CheckBoard - end +; iffalse .CheckBoard +; end -.CheckBoard - checkitem SKATEBOARD +; .CheckBoard +; checkitem SKATEBOARD iffalse .NoBicycle end From bd55787cc5b8d6584ecc43aeeeb7956b8bc983f4 Mon Sep 17 00:00:00 2001 From: Pyrochrome <116858853+Pyrochrome@users.noreply.github.com> Date: Mon, 23 Sep 2024 06:49:32 +0000 Subject: [PATCH 27/28] Update README.md --- README.md | 86 ++++++++++++++++++------------------------------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 891f1442ee2..f61682e069d 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,57 @@ ## Information -A fork of pokecrystal designed to restore and localize Mobile Adapter functionality such as online battles and trades to Crystal using disassembled code from the Japanese ROM designed for use with Mobile System recreation projects like the REON Project. +This is a project aimed at restoring lost content and features from the second generation of Pokemon games, as well as envisioning what could have been if Pink Version had released alongside Yellow. -The intention of this project is to create a build of pokecrystal with all of the content that was featured in the Japanese version of the game and was cut from the international release(s). -We've been very strict on ensuring that any decisions made on the localization or presentation of this content match the standards of a hypothetical scenario in which the Mobile Adapter was released outside of Japan and Crystal received a complete English release back in 2001. +## Features -This repository is built upon a substantial amount of work done by Sudel-Matze. - -A link to Matze’s repository can be found here: -https://github.com/Sudel-Matze/pokecrystal - -## Screenshots +Mobile GB Restoration: Battle and trade online like it's 2001. ![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/38f43741-10cb-44e3-adff-2a13f1c1a15c) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/2dcac8d6-9b58-47d6-9b0a-004d112267d0) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/ea64d517-1069-4cdb-a68d-3d657613d16e) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/5959587a-651b-4a45-9511-0977323aaa0a) ![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/42c3949c-ad17-4452-981d-5bb19647e022) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/a2753b55-920e-4ed9-bcc4-913655fdc87e) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/6c3f6fe9-9362-4f07-b5bf-f1ae785febf9) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/3f056306-7409-4c91-8c84-eb046ef6ba11) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/5cdd65ee-700d-4921-924a-c55ea29bc2ce) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/4942f0e5-8599-4bfb-a149-b06d487d29c7) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/1349bf82-7668-4573-8dce-021792013571) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/46af69c9-da9f-4656-90e4-e46cc5aec4b2) ![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/040a1f18-441b-4bc7-819c-8fc7ef43f949) -![image](https://user-images.githubusercontent.com/110418063/196129175-eebdad9e-f4a0-44ae-8432-7aa538b3c722.png) -![image](https://github.com/gb-mobile/pokecrystal-mobile-eng/assets/110418063/bd6ae5da-1994-474a-a21e-4b03b837fff5) - +(See https://github.com/gb-mobile/pokecrystal-mobile-eng for more information on how to use mobile features.) -## Setup [![Build Status][ci-badge]][ci] +Skateboard functionality: Zip around at high speed! Use the B button to brake. -For more information, please see [INSTALL.md](INSTALL.md) - -After setup has been completed, you can choose which version you wish to build. -To build a specific version, run one of these commands inside the repository directory in cygwin64: +![bgb00006](https://github.com/user-attachments/assets/49bdce45-59c6-420c-9f9b-949e5a20cbd3) +![bgb00007](https://github.com/user-attachments/assets/7070055d-41af-43b7-9627-546c856ae863) +![bgb00008](https://github.com/user-attachments/assets/f45642b4-7f6c-41f9-bed6-8230d005b8e3) -- US Version: `make` +Optional tie-in with Pokemon Pink: replace Red with Green for a new twist. -- EUR Version: `make crystal_eu` +![bgb00003](https://github.com/user-attachments/assets/4b2c3121-f0d7-4671-97e0-ef45fd6766b6) +![bgb00004](https://github.com/user-attachments/assets/2fb650b4-2c70-4fdf-afa9-c20331e6b508) +![bgb00005](https://github.com/user-attachments/assets/3abc9b46-b68f-49c5-aebb-d26df4727d94) -- AUS Version: `make crystal_au` +Also includes a handful of bugfixes to restore intended gameplay flow, and more soon to be revealed! -For a more accurate experience, we advising picking the build version based on where you live as this will make different 'address' options available to you which are selectable for personal information. +## Setup -The US Version covers the United States and Canada. - -The EUR Version covers all countries in Europe (as of 2001). - -The AUS Version covers Australia & New Zealand. +For more information, please see [INSTALL.md](INSTALL.md) -Other languages are being worked on, but are not complete and still require a lot of polish. +By default, the target will build with both bugfixing and 1.1 revisions. You will need to run one of the following commands: -## Using Mobile Adapter Features +- US Version: `make` -To take advantage of the Mobile Adapter features, we currently recommend the GameBoy Emulator BGB: -https://bgb.bircd.org/ +- US with debugging symbols: `make debug` -and libmobile-bgb: -https://github.com/REONTeam/libmobile-bgb/releases +- US without bugfixes: `make nofix` -Simply open BGB, right click the ‘screen’ and select `Link > Listen`, then accept the port it provides by clicking `OK`. -Once done, run the latest version of libmobile for your operating system (`mobile-windows.exe` or windows and `mobile-linux` for linux). -Now right click the ‘screen’ on BGB again and select `Load ROM…`, then choose the pokecrystal-mobile `.gbc` file you have built. +- EU Version: `make eu` + +- AU Version: `make au` ## Mobile Adapter Features A full list of Mobile Adapter features for Pokémon Crystal can be found here: https://github.com/gb-mobile/pokecrystal-mobile-en/wiki/Pok%C3%A9mon-Crystal-Mobile-Features -## Contributors - -- Pret : Initial disassembly -- Matze : Mobile Restoration & Japanese Code Disassembly -- Damien : Code -- DS : GFX & Code -- Nob Ogasawara : Consultation on minor menu translations -- Ryuzac : Code & Japanese Translation -- Vulcandth : Rebasing and keeping the repo up to date -- Zumilsawhat? : Code (Large amounts of work on the EZ Chat system) -- REON Community : Support and Assistance +## TO-DO -[ci]: https://github.com/pret/pokecrystal/actions -[ci-badge]: https://github.com/pret/pokecrystal/actions/workflows/main.yml/badge.svg +- Finish implementing Green battle +- Restore cut minigames from GS Spaceworld +- General polish and bugfixing +- Implement changes into other languages +- ??? From 3b3e49904f2ea3669892520487c4c812ee68e4ac Mon Sep 17 00:00:00 2001 From: Pyrochrome Date: Mon, 23 Sep 2024 02:49:55 -0400 Subject: [PATCH 28/28] Pink additions and skateboard bugfixes --- Makefile | 103 +++++++++------------ constants/trainer_data_constants.asm | 3 + data/items/attributes.asm | 8 +- data/items/descriptions.asm | 8 +- data/items/names.asm | 8 +- data/trainers/dvs.asm | 4 + data/trainers/palettes.asm | 4 + data/trainers/parties.asm | 11 +++ engine/events/overworld.asm | 4 +- engine/games/memory_game.asm | 22 +++-- engine/items/item_effects.asm | 8 +- engine/overworld/player_movement.asm | 2 +- engine/overworld/warp_connection.asm | 4 + gfx/memory_game/cursor.png | Bin 0 -> 218 bytes gfx/pics.asm | 129 ++++++++++++++------------- gfx/sprites.asm | 4 + gfx/sprites/green.png | Bin 0 -> 443 bytes gfx/trainers/green.png | Bin 0 -> 522 bytes maps/GoldenrodGameCorner.asm | 8 +- maps/SilverCaveRoom3.asm | 4 + 20 files changed, 187 insertions(+), 147 deletions(-) create mode 100644 gfx/memory_game/cursor.png create mode 100644 gfx/sprites/green.png create mode 100644 gfx/trainers/green.png diff --git a/Makefile b/Makefile index e2b097e35ff..044a0c487b7 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,11 @@ roms := \ - pokecrystal.gbc \ - pokecrystal11.gbc \ - pokecrystal_au.gbc \ - pokecrystal_eu.gbc \ - pokecrystal_debug.gbc \ - pokecrystal11_debug.gbc \ + pokecrystal_plus.gbc \ pokecrystalplus_debug.gbc \ - pokecrystal_plus.gbc -patches := pokecrystal11.patch + pokecrystalplus_au.gbc \ + pokecrystalplus_eu.gbc \ + pokecrystalplus_nofix.gbc +patches := pokecrystalvc.patch \ + pokecrystalpink.patch rom_obj := \ audio.o \ @@ -28,15 +26,13 @@ rom_obj := \ lib/mobile/main.o \ lib/mobile/mail.o -pokecrystal_obj := $(rom_obj:.o=.o) -pokecrystal11_obj := $(rom_obj:.o=11.o) -pokecrystal_au_obj := $(rom_obj:.o=_au.o) -pokecrystal_eu_obj := $(rom_obj:.o=_eu.o) -pokecrystal_debug_obj := $(rom_obj:.o=_debug.o) -pokecrystal11_debug_obj := $(rom_obj:.o=11_debug.o) -pokecrystal11_vc_obj := $(rom_obj:.o=11_vc.o) -pokecrystalplus_debug_obj := $(rom_obj:.o=plus_debug.o) pokecrystal_plus_obj := $(rom_obj:.o=plus.o) +pokecrystalplus_debug_obj := $(rom_obj:.o=plus_debug.o) +pokecrystalplus_au_obj := $(rom_obj:.o=_au.o) +pokecrystalplus_eu_obj := $(rom_obj:.o=_eu.o) +pokecrystalplus_nofix_obj := $(rom_obj:.o=nofix.o) +pokecrystal11_vc_obj := $(rom_obj:.o=11_vc.o) +pokecrystal_pink_obj := $(rom_obj:.o=pink.o) ### Build tools @@ -56,21 +52,19 @@ RGBLINK ?= $(RGBDS)rgblink ### Build targets .SUFFIXES: -.PHONY: all crystal crystal11 crystal_au crystal_eu crystal_debug crystal11_debug plus_debug clean tidy compare tools +.PHONY: all plus debug au eu nofix vc clean tidy compare tools .SECONDEXPANSION: .PRECIOUS: .SECONDARY: -all: crystal -crystal: pokecrystal.gbc -crystal11: pokecrystal11.gbc -crystal_au: pokecrystal_au.gbc -crystal_eu: pokecrystal_eu.gbc -crystal_debug: pokecrystal_debug.gbc -crystal11_debug: pokecrystal11_debug.gbc -crystal11_vc: pokecrystal11.patch -plus_debug: pokecrystalplus_debug.gbc +all: plus plus: pokecrystal_plus.gbc +debug: pokecrystalplus_debug.gbc +au: pokecrystalplus_au.gbc +eu: pokecrystalplus_eu.gbc +nofix: pokecrystalplus_nofix.gbc +vc: pokecrystalvc.patch +#pink: pokecrystalpink.patch clean: tidy find gfx \ @@ -96,15 +90,13 @@ tidy: $(patches:.patch=_vc.sym) \ $(patches:.patch=_vc.map) \ $(patches:%.patch=vc/%.constants.sym) \ - $(pokecrystal_obj) \ - $(pokecrystal11_obj) \ - $(pokecrystal11_vc_obj) \ - $(pokecrystal_au_obj) \ - $(pokecrystal_eu_obj) \ - $(pokecrystal_debug_obj) \ - $(pokecrystal11_debug_obj) \ - $(pokecrystalplus_debug_obj) \ $(pokecrystal_plus_obj) \ + $(pokecrystalplus_debug_obj) \ + $(pokecrystalplus_au_obj) \ + $(pokecrystalplus_eu_obj) \ + $(pokecrystalplus_nofix_obj) \ + $(pokecrystal11_vc_obj) \ + $(pokecrystal_pink_obj) \ rgbdscheck.o $(MAKE) clean -C tools/ @@ -121,15 +113,13 @@ ifeq ($(DEBUG),1) RGBASMFLAGS += -E endif -$(pokecrystal_obj): RGBASMFLAGS += -$(pokecrystal11_obj): RGBASMFLAGS += -D _CRYSTAL11 -$(pokecrystal_au_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL_AU -$(pokecrystal_eu_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL_EU -$(pokecrystal_debug_obj): RGBASMFLAGS += -D _DEBUG -$(pokecrystal11_debug_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _DEBUG -$(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL11_VC -$(pokecrystalplus_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG -D _PLUS -$(pokecrystal_plus_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _PLUS +$(pokecrystal_plus_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 +$(pokecrystalplus_debug_obj):RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _DEBUG +$(pokecrystalplus_au_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _CRYSTAL_AU +$(pokecrystalplus_eu_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _CRYSTAL_EU +$(pokecrystalplus_nofix_obj): RGBASMFLAGS += -D _CRYSTAL11 +$(pokecrystal11_vc_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _CRYSTAL11_VC +$(pokecrystal_pink_obj): RGBASMFLAGS += -D _CRYSTALFIX -D _CRYSTAL11 -D _PINK %.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template tools/make_patch $*_vc.sym $^ $@ @@ -153,15 +143,13 @@ $1: $2 $$(shell tools/scan_includes $2) $(preinclude_deps) | rgbdscheck.o endef # Dependencies for shared objects objects -$(foreach obj, $(pokecrystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm)))) -$(foreach obj, $(pokecrystal11_obj), $(eval $(call DEP,$(obj),$(obj:11.o=.asm)))) -$(foreach obj, $(pokecrystal_au_obj), $(eval $(call DEP,$(obj),$(obj:_au.o=.asm)))) -$(foreach obj, $(pokecrystal_eu_obj), $(eval $(call DEP,$(obj),$(obj:_eu.o=.asm)))) -$(foreach obj, $(pokecrystal_debug_obj), $(eval $(call DEP,$(obj),$(obj:_debug.o=.asm)))) -$(foreach obj, $(pokecrystal11_debug_obj), $(eval $(call DEP,$(obj),$(obj:11_debug.o=.asm)))) -$(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) -$(foreach obj, $(pokecrystalplus_debug_obj), $(eval $(call DEP,$(obj),$(obj:plus_debug.o=.asm)))) $(foreach obj, $(pokecrystal_plus_obj), $(eval $(call DEP,$(obj),$(obj:plus.o=.asm)))) +$(foreach obj, $(pokecrystalplus_debug_obj), $(eval $(call DEP,$(obj),$(obj:plus_debug.o=.asm)))) +$(foreach obj, $(pokecrystalplus_au_obj), $(eval $(call DEP,$(obj),$(obj:_au.o=.asm)))) +$(foreach obj, $(pokecrystalplus_eu_obj), $(eval $(call DEP,$(obj),$(obj:_eu.o=.asm)))) +$(foreach obj, $(pokecrystalplus_nofix_obj), $(eval $(call DEP,$(obj),$(obj:nofix.o=.asm)))) +$(foreach obj, $(pokecrystal11_vc_obj), $(eval $(call DEP,$(obj),$(obj:11_vc.o=.asm)))) +$(foreach obj, $(pokecrystal_pink_obj), $(eval $(call DEP,$(obj),$(obj:pink.o=.asm)))) # Dependencies for VC files that need to run scan_includes %.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) $(preinclude_deps) | rgbdscheck.o @@ -169,16 +157,13 @@ $(foreach obj, $(pokecrystal_plus_obj), $(eval $(call DEP,$(obj),$(obj:plus.o=.a endif - -pokecrystal_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystal11_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystal_au_opt = -Cjv -t PM_CRYSTAL -i BXTU -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystal_plus_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystalplus_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystalplus_au_opt = -Cjv -t PM_CRYSTAL -i BXTU -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal_eu_opt = -Cjv -t PM_CRYSTAL -i BXTP -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystal_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystal11_debug_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystal_nofix_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 pokecrystal11_vc_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystalplus_debug_opt= -Cjv -t PM_CRYSTAL -i BXTE -n 1 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 -pokecrystal_plus_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 +pokecrystal_pink_opt = -Cjv -t PM_CRYSTAL -i BXTE -n 0 -k 01 -l 0x33 -m 0x10 -r 5 -p 0 %.gbc: $$(%_obj) layout.link $(RGBLINK) -n $*.sym -m $*.map -l layout.link -o $@ $(filter %.o,$^) diff --git a/constants/trainer_data_constants.asm b/constants/trainer_data_constants.asm index b08de9deb7a..0db7f209f4f 100644 --- a/constants/trainer_data_constants.asm +++ b/constants/trainer_data_constants.asm @@ -20,6 +20,9 @@ DEF NUM_TRAINER_ATTRIBUTES EQU _RS shift_const AI_CAUTIOUS shift_const AI_STATUS shift_const AI_RISKY +IF DEF (_PINK) + shift_const AI_METRONOME +ENDC DEF NO_AI EQU 0 ; TRNATTR_AI_ITEM_SWITCH bit flags diff --git a/data/items/attributes.asm b/data/items/attributes.asm index 784e29756a9..77c7f682210 100644 --- a/data/items/attributes.asm +++ b/data/items/attributes.asm @@ -207,11 +207,11 @@ ItemAttributes: ; BLK_APRICORN item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ; SKATEBOARD -if DEF(_PLUS) +;if DEF(_PLUS) item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE -else - item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE -endc +; else +; item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; endc ; PNK_APRICORN item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ; BLACKGLASSES diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm index 1aaeac6c8a4..22f857380c3 100644 --- a/data/items/descriptions.asm +++ b/data/items/descriptions.asm @@ -645,12 +645,12 @@ BlkApricornDesc: next "@" SkateBoardDesc: - if DEF(_PLUS) + ;if DEF(_PLUS) db "Ride anywhere at" ;18 max chars per line next "twice the speed.@" - else - db "?@" - endc + ; else + ; db "?@" + ; endc PnkApricornDesc: db "A pink APRICORN." diff --git a/data/items/names.asm b/data/items/names.asm index 6773cc0bd6c..5b1e0ef7d68 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -99,11 +99,11 @@ ItemNames:: li "WHT APRICORN" li "BLACKBELT" li "BLK APRICORN" - if DEF(_PLUS) + ;if DEF(_PLUS) li "SKATEBOARD" - else - li "TERU-SAMA" - endc + ; else + ; li "TERU-SAMA" + ; endc li "PNK APRICORN" li "BLACKGLASSES" li "SLOWPOKETAIL" diff --git a/data/trainers/dvs.asm b/data/trainers/dvs.asm index 18374a99d95..1cde1d8adef 100644 --- a/data/trainers/dvs.asm +++ b/data/trainers/dvs.asm @@ -69,7 +69,11 @@ ENDC dn 6, 8, 8, 10 ; KIMONO_GIRL dn 6, 8, 10, 8 ; TWINS dn 6, 13, 8, 8 ; POKEFANF + IF DEF (_PINK) + dn 11, 13, 15, 14 ; RED + ELSE dn 15, 13, 13, 14 ; RED + ENDC dn 9, 13, 13, 13 ; BLUE dn 9, 8, 8, 8 ; OFFICER dn 7, 14, 10, 8 ; GRUNTF diff --git a/data/trainers/palettes.asm b/data/trainers/palettes.asm index 342999647e9..42afeec1035 100644 --- a/data/trainers/palettes.asm +++ b/data/trainers/palettes.asm @@ -71,7 +71,11 @@ INCBIN "gfx/trainers/pokefan_m.gbcpal", middle_colors INCBIN "gfx/trainers/kimono_girl.gbcpal", middle_colors INCBIN "gfx/trainers/twins.gbcpal", middle_colors INCBIN "gfx/trainers/pokefan_f.gbcpal", middle_colors +IF DEF (_PINK) +INCBIN "gfx/trainers/green.gbcpal", middle_colors +ELSE INCBIN "gfx/trainers/red.gbcpal", middle_colors +ENDC INCBIN "gfx/trainers/blue.gbcpal", middle_colors INCBIN "gfx/trainers/officer.gbcpal", middle_colors INCBIN "gfx/trainers/grunt_f.gbcpal", middle_colors diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm index ad796da02d8..ccf2ad3864d 100644 --- a/data/trainers/parties.asm +++ b/data/trainers/parties.asm @@ -3424,6 +3424,16 @@ PokefanFGroup: RedGroup: ; RED (1) +IF DEF (_PINK) + db "GREEN@", TRAINERTYPE_MOVES + db 81, CLEFAIRY, METRONOME, LIGHT_SCREEN, REFLECT, TRI_ATTACK + db 73, GENGAR, SLUDGE_BOMB, SHADOW_BALL, TOXIC, PSYCHIC_M + db 75, KANGASKHAN, DIZZY_PUNCH, ZAP_CANNON, REST, FAINT_ATTACK + db 77, VENUSAUR, SUNNY_DAY, GIGA_DRAIN, SYNTHESIS, SOLARBEAM + db 77, CHARIZARD, FLAMETHROWER, WING_ATTACK, SLASH, FIRE_SPIN + db 77, BLASTOISE, RAIN_DANCE, SURF, BLIZZARD, WHIRLPOOL + db -1 ; end +ELSE db "RED@", TRAINERTYPE_MOVES db 81, PIKACHU, CHARM, QUICK_ATTACK, THUNDERBOLT, THUNDER db 73, ESPEON, MUD_SLAP, REFLECT, SWIFT, PSYCHIC_M @@ -3432,6 +3442,7 @@ RedGroup: db 77, CHARIZARD, FLAMETHROWER, WING_ATTACK, SLASH, FIRE_SPIN db 77, BLASTOISE, RAIN_DANCE, SURF, BLIZZARD, WHIRLPOOL db -1 ; end +ENDC BlueGroup: ; BLUE (1) diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index dadc62ed66a..91169225909 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1632,7 +1632,7 @@ BikeFunction: cp PLAYER_SURF jp z, .CannotUseBike cp PLAYER_SURF_PIKA - jr z, .CannotUseBike + jp z, .CannotUseBike jr .whichItem .whichItem: @@ -1674,6 +1674,8 @@ BikeFunction: .GetOnBoard: ld hl, wBikeFlags + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] + jr nz, .CantGetOffBike set BIKEFLAGS_SKATE_F , [hl] ld a, PLAYER_SKATE ld [wPlayerState], a diff --git a/engine/games/memory_game.asm b/engine/games/memory_game.asm index 8be4e51c484..7a57fd7d9cd 100644 --- a/engine/games/memory_game.asm +++ b/engine/games/memory_game.asm @@ -14,11 +14,15 @@ _MemoryGame: ld hl, MemoryGameLZ ld de, vTiles2 tile $00 call Decompress - ld hl, MemoryGameGFX + ;ld hl, MemoryGameGFX + ;ld de, vTiles0 tile $00 + ;ld bc, 4 tiles + ;ld a, BANK(MemoryGameGFX) + ;call FarCopyBytes + ld hl, CursorGFX ld de, vTiles0 tile $00 ld bc, 4 tiles - ld a, BANK(MemoryGameGFX) - call FarCopyBytes + call CopyBytes ld a, SPRITE_ANIM_DICT_ARROW_CURSOR ld hl, wSpriteAnimDict ld [hli], a @@ -77,8 +81,9 @@ _MemoryGame: ret .ResetBoard: - call UnusedCursor_InterpretJoypad_AnimateCursor - jr nc, .proceed + ;call UnusedCursor_InterpretJoypad_AnimateCursor + ;jr nc, .proceed + jr .proceed ld hl, wJumptableIndex set 7, [hl] ret @@ -463,9 +468,9 @@ MemoryGame_InitStrings: .dummy_text db "@" .japstr1 - db "とったもの@" + db "aaa@" ;"とったもの@" .japstr2 - db "あと かい@" + db "bbb@" ;"あと かい@" MemoryGame_Card2Coord: ld d, 0 @@ -588,3 +593,6 @@ MemoryGame_InterpretJoypad_AnimateCursor: MemoryGameLZ: INCBIN "gfx/memory_game/memory_game.2bpp.lz" + +CursorGFX: +INCBIN "gfx/memory_game/cursor.2bpp" diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 466bc5b771d..c3e77ac7a69 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -113,11 +113,11 @@ ItemEffects: dw NoEffect ; WHT_APRICORN dw NoEffect ; BLACKBELT_I dw NoEffect ; BLK_APRICORN - if DEF(_PLUS) + ;if DEF(_PLUS) dw BicycleEffect ; SKATEBOARD - else - dw NoEffect - endc + ; else + ; dw NoEffect + ; endc dw NoEffect ; PNK_APRICORN dw NoEffect ; BLACKGLASSES dw NoEffect ; SLOWPOKETAIL diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index 29aef51a8ed..d554b09eaf3 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -18,7 +18,7 @@ DoPlayerMovement:: ld hl, wBikeFlags bit BIKEFLAGS_SKATE_F, [hl] - jr nz, .NotSkate + jr z, .NotSkate ld c, a cp B_BUTTON jp z, .Standing diff --git a/engine/overworld/warp_connection.asm b/engine/overworld/warp_connection.asm index 89d8437a18e..dae7a0327e4 100644 --- a/engine/overworld/warp_connection.asm +++ b/engine/overworld/warp_connection.asm @@ -3,7 +3,11 @@ HandleNewMap: call ResetMapBufferEventFlags call ResetFlashIfOutOfCave call GetCurrentMapSceneID + ld a, [wPlayerState] + cp PLAYER_SKATE + jr z, .skip call ResetBikeFlags +.skip ld a, MAPCALLBACK_NEWMAP call RunMapCallback HandleContinueMap: diff --git a/gfx/memory_game/cursor.png b/gfx/memory_game/cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..0cff55f8fdce5b8d06ce302e4351a98d45a49983 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sDEfH31!Z9ZwBV7{k|V~BrWgnD88a|3CWcjj|Yt}8fR%Wz0>FLs6$4>&SX7F_N Kb6Mw<&;$UoxJWtx literal 0 HcmV?d00001 diff --git a/gfx/pics.asm b/gfx/pics.asm index 9264e2dd30f..f0f848089fa 100644 --- a/gfx/pics.asm +++ b/gfx/pics.asm @@ -539,7 +539,7 @@ TogepiFrontpic: INCBIN "gfx/pokemon/togepi/front.animated.2bpp.lz" SuperNerdPic: INCBIN "gfx/trainers/super_nerd.2bpp.lz" HaunterBackpic: INCBIN "gfx/pokemon/haunter/back.2bpp.lz" XatuBackpic: INCBIN "gfx/pokemon/xatu/back.2bpp.lz" -RedPic: INCBIN "gfx/trainers/red.2bpp.lz" + INCBIN "gfx/trainers/red.2bpp.lz" Porygon2Backpic: INCBIN "gfx/pokemon/porygon2/back.2bpp.lz" JasminePic: INCBIN "gfx/trainers/jasmine.2bpp.lz" PinecoBackpic: INCBIN "gfx/pokemon/pineco/back.2bpp.lz" @@ -712,67 +712,72 @@ UnownRBackpic: INCBIN "gfx/pokemon/unown_r/back.2bpp.lz" SECTION "Pics 19", ROMX ; Seems to be an accidental copy of the previous bank - -INCBIN "gfx/pokemon/spinarak/back.2bpp.lz" -INCBIN "gfx/pokemon/raikou/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_k/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/houndour/back.2bpp.lz" -INCBIN "gfx/pokemon/poliwag/back.2bpp.lz" -INCBIN "gfx/pokemon/squirtle/back.2bpp.lz" -INCBIN "gfx/pokemon/shuckle/back.2bpp.lz" -INCBIN "gfx/pokemon/dewgong/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_b/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/slowpoke/back.2bpp.lz" -INCBIN "gfx/pokemon/dunsparce/back.2bpp.lz" -INCBIN "gfx/pokemon/donphan/back.2bpp.lz" -INCBIN "gfx/pokemon/wooper/back.2bpp.lz" -INCBIN "gfx/pokemon/tauros/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_x/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_n/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/tangela/back.2bpp.lz" -INCBIN "gfx/pokemon/voltorb/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_j/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/mantine/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_l/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/piloswine/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_m/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_f/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/natu/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_a/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/golem/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_u/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/diglett/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_q/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_p/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_c/back.2bpp.lz" -INCBIN "gfx/pokemon/jynx/back.2bpp.lz" -INCBIN "gfx/pokemon/golbat/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_y/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_g/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_i/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_v/back.2bpp.lz" -INCBIN "gfx/pokemon/forretress/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_s/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_r/front.animated.2bpp.lz" -INCBIN "gfx/pokemon/unown_e/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_j/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_b/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_o/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_z/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_w/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_n/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_a/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_m/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_k/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_t/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_x/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_l/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_u/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_q/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_y/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_p/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_i/back.2bpp.lz" -INCBIN "gfx/pokemon/unown_r/back.2bpp.lz" +IF DEF (_PINK) +RedPic: INCBIN "gfx/trainers/green.2bpp.lz" +ELSE +RedPic: INCBIN "gfx/trainers/red.2bpp.lz" +ENDC + +; INCBIN "gfx/pokemon/spinarak/back.2bpp.lz" +; INCBIN "gfx/pokemon/raikou/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_k/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/houndour/back.2bpp.lz" +; INCBIN "gfx/pokemon/poliwag/back.2bpp.lz" +; INCBIN "gfx/pokemon/squirtle/back.2bpp.lz" +; INCBIN "gfx/pokemon/shuckle/back.2bpp.lz" +; INCBIN "gfx/pokemon/dewgong/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_b/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/slowpoke/back.2bpp.lz" +; INCBIN "gfx/pokemon/dunsparce/back.2bpp.lz" +; INCBIN "gfx/pokemon/donphan/back.2bpp.lz" +; INCBIN "gfx/pokemon/wooper/back.2bpp.lz" +; INCBIN "gfx/pokemon/tauros/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_x/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_n/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/tangela/back.2bpp.lz" +; INCBIN "gfx/pokemon/voltorb/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_j/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/mantine/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_l/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/piloswine/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_m/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_f/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/natu/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_a/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/golem/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_u/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/diglett/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_q/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_p/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_c/back.2bpp.lz" +; INCBIN "gfx/pokemon/jynx/back.2bpp.lz" +; INCBIN "gfx/pokemon/golbat/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_y/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_g/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_i/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_v/back.2bpp.lz" +; INCBIN "gfx/pokemon/forretress/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_s/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_r/front.animated.2bpp.lz" +; INCBIN "gfx/pokemon/unown_e/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_j/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_b/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_o/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_z/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_w/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_n/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_a/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_m/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_k/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_t/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_x/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_l/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_u/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_q/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_y/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_p/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_i/back.2bpp.lz" +; INCBIN "gfx/pokemon/unown_r/back.2bpp.lz" ; Sections "Pics 20" to "Pics 24" are not used for any graphics, diff --git a/gfx/sprites.asm b/gfx/sprites.asm index 5d562a6bc9f..3398b3a7492 100644 --- a/gfx/sprites.asm +++ b/gfx/sprites.asm @@ -5,7 +5,11 @@ ChrisBikeSpriteGFX:: INCBIN "gfx/sprites/chris_bike.2bpp" GameboyKidSpriteGFX:: INCBIN "gfx/sprites/gameboy_kid.2bpp" RivalSpriteGFX:: INCBIN "gfx/sprites/rival.2bpp" OakSpriteGFX:: INCBIN "gfx/sprites/oak.2bpp" +IF DEF (_PINK) +RedSpriteGFX:: INCBIN "gfx/sprites/green.2bpp" +ELSE RedSpriteGFX:: INCBIN "gfx/sprites/red.2bpp" +ENDC BlueSpriteGFX:: INCBIN "gfx/sprites/blue.2bpp" BillSpriteGFX:: INCBIN "gfx/sprites/bill.2bpp" ElderSpriteGFX:: INCBIN "gfx/sprites/elder.2bpp" diff --git a/gfx/sprites/green.png b/gfx/sprites/green.png new file mode 100644 index 0000000000000000000000000000000000000000..6675a96f85691c44d0e936b31a2cfbf192f5eb97 GIT binary patch literal 443 zcmV;s0Yv_ZP)Px$bxA})R5*>Llu>#FAqazi=9??VL&72H130>~yY061NuwZ%M6!nH$pL^FGOKBV zApnAe156?ykPIp$L{Q_v1Q6~)$T(|-z=x=ia0U!Km^rp_02+9NGX#(buT4kfNt(~& zKC*JuS&daX0s^uCtV42Mn`_;5lpZYLJ3TC$ZbA8q%XR?SYqlQ%EpS|b0wC0dnQBuI z`LfcBJ^hrE{a^I3yB@^VA90cG(mkqfS%vs~E25ijEQW9N@JAp=EWi?qp7x|kHP|X$ zg|tAcLGJxA1-cZ<>z1d&z(!BbS|Y3>KQWN?t^zO)P?UX&kEMwy`a@0bw+2F&fe@J_ zc<%t2mQxMF8OaH0+(q66daDP+9)RVb&anisWHZQigP)Px#3{Xr|Mfmvm$cQjwAPWEh0QB*yqyPW`tVu*cR7i=PmI)TaAP7Wp=KgoCfT-CT z2wh*&FTNO)1bMegGtg{1c(NTldq`7xD0KOTAcr| zCNXl;EW61jvWS|l-~BOS#CxnJtyu$1M-zG@X>rnQbWf)B=$UY}!U?{S)cjn?L~>MQ zkVA52sJ#{edM8MNbdKD#w$14yI5>%fs%H1e2hjV;Ta;qc4~%`;NJr10ZWOkCn>%rE zRgr#~mv%L2q8I6$gxDdlqq?*{dE|Uq)Wf2jsvBkiYZG7XSbN M07*qoM6N<$f`Iz)Y5)KL literal 0 HcmV?d00001 diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index d8072316882..512f1ed84b1 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -319,6 +319,12 @@ GoldenrodGameCornerCardFlipMachineScript: closetext end +GoldenrodGameCornerMemoryMachineScript: + refreshscreen + special UnusedMemoryGame + closetext + end + GoldenrodGameCornerPrizeVendorIntroText: text "Welcome!" @@ -515,7 +521,7 @@ GoldenrodGameCorner_MapEvents: bg_event 18, 8, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript bg_event 18, 9, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript bg_event 18, 10, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript - bg_event 18, 11, BGEVENT_RIGHT, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 11, BGEVENT_RIGHT, GoldenrodGameCornerMemoryMachineScript bg_event 12, 1, BGEVENT_LEFT, GoldenrodGameCornerLeftTheirDrinkScript def_object_events diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm index f471bd8b111..759a1ada859 100644 --- a/maps/SilverCaveRoom3.asm +++ b/maps/SilverCaveRoom3.asm @@ -59,4 +59,8 @@ SilverCaveRoom3_MapEvents: def_bg_events def_object_events + IF DEF (_PINK) + object_event 9, 10, SPRITE_RED, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Red, EVENT_RED_IN_MT_SILVER + ELSE object_event 9, 10, SPRITE_RED, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Red, EVENT_RED_IN_MT_SILVER + ENDC