diff options
| -rw-r--r-- | constants/event_flags.asm | 4 | ||||
| -rw-r--r-- | constants/script_constants.asm | 9 | ||||
| -rw-r--r-- | data/text/common_1.asm | 4 | ||||
| -rw-r--r-- | engine/events/daycare.asm | 197 | ||||
| -rw-r--r-- | engine/events/halloffame.asm | 4 | ||||
| -rw-r--r-- | engine/events/lucky_number.asm | 2 | ||||
| -rw-r--r-- | engine/events/std_scripts.asm | 2 | ||||
| -rw-r--r-- | home/video.asm | 14 | ||||
| -rw-r--r-- | hram.asm | 1 | ||||
| -rw-r--r-- | maps/EcruteakTinTowerEntrance.asm | 8 | 
10 files changed, 103 insertions, 142 deletions
| diff --git a/constants/event_flags.asm b/constants/event_flags.asm index 2b75974e..6808cd8a 100644 --- a/constants/event_flags.asm +++ b/constants/event_flags.asm @@ -1961,8 +1961,8 @@  	const EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY  	const EVENT_BURNED_TOWER_FIREBREATHER_DICK_NORMAL  	const EVENT_BURNED_TOWER_FIREBREATHER_DICK_ASHES -	const EVENT_RANG_CLEAR_BELL_1 ; needs rename -	const EVENT_RANG_CLEAR_BELL_2 ; needs rename +	const EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_LEFT +	const EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_RIGHT  	const EVENT_768 ; unused  	const EVENT_769 ; unused  	const EVENT_76A ; unused diff --git a/constants/script_constants.asm b/constants/script_constants.asm index 56e2a12b..e850d4fe 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -229,15 +229,6 @@ NUM_FRUIT_TREES EQU const_value - 1  	const DECODESC_BIG_DOLL   ; 3  	const DECODESC_CONSOLE    ; 4 -; swarm arguments -; StoreSwarmMapIndices arguments -; tentative/placeholder, this is just the order from swarm_grass.asm -	const_def -	const SWARM_YANMA     ; 0 -	const SWARM_SNUBBULL  ; 1 -	const SWARM_DUNSPARCE ; 2 -	const SWARM_MARILL    ; 3 -  ; ActivateFishingSwarm setval arguments  	const_def  	const FISHSWARM_NONE     ; 0 diff --git a/data/text/common_1.asm b/data/text/common_1.asm index 83b99c54..fd92195c 100644 --- a/data/text/common_1.asm +++ b/data/text/common_1.asm @@ -1334,7 +1334,7 @@ _DayCareManIntroText::  	cont "raise a #MON?"  	done -_DayCareManOddEggText:: +_DayCareManIntroEggText::  	text "I'm the DAY-CARE"  	line "MAN. Do you know"  	cont "about EGGS?" @@ -1361,7 +1361,7 @@ _DayCareLadyIntroText::  	line "#MON for you?"  	done -_DayCareLadyOddEggText:: +_DayCareLadyIntroEggText::  	text "I'm the DAY-CARE"  	line "LADY. Do you know"  	cont "about EGGS?" diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm index 9cbe61ce..2cc6c12a 100644 --- a/engine/events/daycare.asm +++ b/engine/events/daycare.asm @@ -1,9 +1,9 @@  ; PrintDayCareText.TextTable indexes  	const_def  	const DAYCARETEXT_MAN_INTRO -	const DAYCARETEXT_MAN_EGG +	const DAYCARETEXT_MAN_INTRO_EGG  	const DAYCARETEXT_LADY_INTRO -	const DAYCARETEXT_LADY_EGG +	const DAYCARETEXT_LADY_INTRO_EGG  	const DAYCARETEXT_WHICH_ONE  	const DAYCARETEXT_DEPOSIT  	const DAYCARETEXT_CANT_BREED_EGG @@ -160,10 +160,9 @@ DayCareAskDepositPokemon:  	scf  	ret -.DummyText: -	; +.DaycareDummyText:  	text_far _DaycareDummyText -	db "@" +	text_end  DayCare_DepositPokemonText:  	ld a, DAYCARETEXT_DEPOSIT @@ -201,7 +200,7 @@ DayCare_AskWithdrawBreedMon:  	jr c, .not_enough_money  	ld a, [wPartyCount]  	cp PARTY_LENGTH -	jr nc, .PartyFull +	jr nc, .party_full  	and a  	ret @@ -215,7 +214,7 @@ DayCare_AskWithdrawBreedMon:  	scf  	ret -.PartyFull: +.party_full  	ld a, DAYCARETEXT_PARTY_FULL  	scf  	ret @@ -268,142 +267,121 @@ PrintDayCareText:  .TextTable:  ; entries correspond to DAYCARETEXT_* constants -	dw .DayCareManIntro ; 00 -	dw .DayCareManOddEgg ; 01 -	dw .DayCareLadyIntro ; 02 -	dw .DayCareLadyOddEgg ; 03 -	dw .WhichOne ; 04 -	dw .OkayIllRaiseYourMon ; 05 -	dw .CantAcceptEgg ; 06 -	dw .JustOneMon ; 07 -	dw .LastHealthyMon ; 08 -	dw .ComeBackForItLater ; 09 -	dw .RemoveMail ; 0a -	dw .AreWeGeniusesOrWhat ; 0b -	dw .AskRetrieveMon ; 0c -	dw .PerfectHeresYourMon ; 0d -	dw .GotBackMon ; 0e -	dw .ImmediatelyWithdrawMon ; 0f -	dw .PartyFull ; 10 -	dw .NotEnoughMoney ; 11 -	dw .OhFineThen ; 12 -	dw .ComeAgain ; 13 - -.DayCareManIntro: -	; I'm the DAY-CARE MAN. Want me to raise a #MON? +	dw .DayCareManIntroText ; 00 +	dw .DayCareManIntroEggText ; 01 +	dw .DayCareLadyIntroText ; 02 +	dw .DayCareLadyIntroEggText ; 03 +	dw .WhatShouldIRaiseText ; 04 +	dw .IllRaiseYourMonText ; 05 +	dw .CantAcceptEggText ; 06 +	dw .OnlyOneMonText ; 07 +	dw .LastHealthyMonText ; 08 +	dw .ComeBackLaterText ; 09 +	dw .RemoveMailText ; 0a +	dw .AreWeGeniusesText ; 0b +	dw .YourMonHasGrownText ; 0c +	dw .PerfectHeresYourMonText ; 0d +	dw .GotBackMonText ; 0e +	dw .BackAlreadyText ; 0f +	dw .HaveNoRoomText ; 10 +	dw .NotEnoughMoneyText ; 11 +	dw .OhFineThenText ; 12 +	dw .ComeAgainText ; 13 + +.DayCareManIntroText:  	text_far _DayCareManIntroText -	db "@" +	text_end -.DayCareManOddEgg: -	; I'm the DAY-CARE MAN. Do you know about EGGS? I was raising #MON with my wife, you see. We were shocked to find an EGG! How incredible is that? So, want me to raise a #MON? -	text_far _DayCareManOddEggText -	db "@" +.DayCareManIntroEggText: +	text_far _DayCareManIntroEggText +	text_end -.DayCareLadyIntro: -	; I'm the DAY-CARE LADY. Should I raise a #MON for you? +.DayCareLadyIntroText:  	text_far _DayCareLadyIntroText -	db "@" +	text_end -.DayCareLadyOddEgg: -	; I'm the DAY-CARE LADY. Do you know about EGGS? My husband and I were raising some #MON, you see. We were shocked to find an EGG! How incredible could that be? Should I raise a #MON for you? -	text_far _DayCareLadyOddEggText -	db "@" +.DayCareLadyIntroEggText: +	text_far _DayCareLadyIntroEggText +	text_end -.WhichOne: -	; What should I raise for you? +.WhatShouldIRaiseText:  	text_far _WhatShouldIRaiseText -	db "@" +	text_end -.JustOneMon: -	; Oh? But you have just one #MON. +.OnlyOneMonText:  	text_far _OnlyOneMonText -	db "@" +	text_end -.CantAcceptEgg: -	; Sorry, but I can't accept an EGG. +.CantAcceptEggText:  	text_far _CantAcceptEggText -	db "@" +	text_end -.RemoveMail: -	; Remove MAIL before you come see me. +.RemoveMailText:  	text_far _RemoveMailText -	db "@" +	text_end -.LastHealthyMon: -	; If you give me that, what will you battle with? +.LastHealthyMonText:  	text_far _LastHealthyMonText -	db "@" +	text_end -.OkayIllRaiseYourMon: -	; OK. I'll raise your @ . +.IllRaiseYourMonText:  	text_far _IllRaiseYourMonText -	db "@" +	text_end -.ComeBackForItLater: -	; Come back for it later. +.ComeBackLaterText:  	text_far _ComeBackLaterText -	db "@" +	text_end -.AreWeGeniusesOrWhat: -	; Are we geniuses or what? Want to see your @ ? +.AreWeGeniusesText:  	text_far _AreWeGeniusesText -	db "@" +	text_end -.AskRetrieveMon: -	; Your @ has grown a lot. By level, it's grown by @ . If you want your #MON back, it will cost ¥@ . +.YourMonHasGrownText:  	text_far _YourMonHasGrownText -	db "@" +	text_end -.PerfectHeresYourMon: -	; Perfect! Here's your #MON. +.PerfectHeresYourMonText:  	text_far _PerfectHeresYourMonText -	db "@" +	text_end -.GotBackMon: -	; got back @ . +.GotBackMonText:  	text_far _GotBackMonText -	db "@" +	text_end -.ImmediatelyWithdrawMon: -	; Huh? Back already? Your @ needs a little more time with us. If you want your #MON back, it will cost ¥100. +.BackAlreadyText:  	text_far _BackAlreadyText -	db "@" +	text_end -.PartyFull: -	; You have no room for it. +.HaveNoRoomText:  	text_far _HaveNoRoomText -	db "@" +	text_end -.NotEnoughMoney: -	; You don't have enough money. +.NotEnoughMoneyText:  	text_far _NotEnoughMoneyText -	db "@" +	text_end -.OhFineThen: -	; Oh, fine then. +.OhFineThenText:  	text_far _OhFineThenText -	db "@" +	text_end -.ComeAgain: -	; Come again. +.ComeAgainText:  	text_far _ComeAgainText -	db "@" +	text_end  DayCareManOutside:  	ld hl, wDayCareMan  	bit DAYCAREMAN_HAS_EGG_F, [hl]  	jr nz, .AskGiveEgg -	ld hl, .NotYet +	ld hl, .NotYetText  	call PrintText  	ret -.NotYet: -	; Not yet… +.NotYetText:  	text_far _NotYetText -	db "@" +	text_end  .AskGiveEgg: -	ld hl, .IntroText +	ld hl, .FoundAnEggText  	call PrintText  	call YesNoBox  	jr c, .Declined @@ -414,13 +392,13 @@ DayCareManOutside:  	ld hl, wDayCareMan  	res DAYCAREMAN_HAS_EGG_F, [hl]  	call DayCare_InitBreeding -	ld hl, .GotEggText +	ld hl, .ReceivedEggText  	call PrintText  	ld de, SFX_GET_EGG  	call PlaySFX  	ld c, 120  	call DelayFrames -	ld hl, .TakeGoodCareOfItText +	ld hl, .TakeGoodCareOfEggText  	jr .Load0  .Declined: @@ -433,36 +411,31 @@ DayCareManOutside:  	ret  .PartyFull: -	ld hl, .PartyFullText +	ld hl, .NoRoomForEggText  	call PrintText  	ld a, TRUE  	ld [wScriptVar], a  	ret -.IntroText: -	; Ah, it's you! We were raising your #MON, and my goodness, were we surprised! Your #MON had an EGG! We don't know how it got there, but your #MON had it. You want it? +.FoundAnEggText:  	text_far _FoundAnEggText -	db "@" +	text_end -.GotEggText: -	; received the EGG! +.ReceivedEggText:  	text_far _ReceivedEggText -	db "@" +	text_end -.TakeGoodCareOfItText: -	; Take good care of it. +.TakeGoodCareOfEggText:  	text_far _TakeGoodCareOfEggText -	db "@" +	text_end  .IllKeepItThanksText: -	; Well then, I'll keep it. Thanks!  	text_far _IllKeepItThanksText -	db "@" +	text_end -.PartyFullText: -	; You have no room in your party. Come back later. +.NoRoomForEggText:  	text_far _NoRoomForEggText -	db "@" +	text_end  DayCare_GiveEgg:  	ld a, [wEggMonLevel] diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index 53ab9f9a..bd6c8a90 100644 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -15,7 +15,9 @@ HallOfFame::  	set STATUSFLAGS_HALL_OF_FAME_F, [hl]  ; Bug: Gold/Silver fail to (conditionally) erase the previous save and -; initialize the current save, if the player did not save on this playthrough! +; initialize the current save, if the player did not save on this playthrough. +; pokecrystal does the following here (routine doesn't exist in Gold/Silver): +;	farcall HallOfFame_InitSaveIfNeeded  	ld hl, wHallOfFameCount  	ld a, [hl] diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm index 2a6991ac..a3f9bc5d 100644 --- a/engine/events/lucky_number.asm +++ b/engine/events/lucky_number.asm @@ -96,7 +96,7 @@ CheckForLuckyNumberWinners:  .SkipBox:  	inc c  	ld a, c -	cp NUM_BOXES_JAPANESE +	cp NUM_BOXES_JAPANESE ; fails to find winning mon in boxes 10-14 if not the active box  	jr c, .BoxesLoop  	call CloseSRAM diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 6fd704d3..c1e9164c 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -530,7 +530,7 @@ InitializeEventsScript:  	setevent EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M  	setevent EVENT_KURTS_HOUSE_KURT_2  	setevent EVENT_BURNED_TOWER_FIREBREATHER_DICK_ASHES -	setevent EVENT_RANG_CLEAR_BELL_1 ; ? +	setevent EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_LEFT  	setevent EVENT_PLAYERS_HOUSE_MOM_2  	setflag ENGINE_ROCKET_SIGNAL_ON_CH20  	setflag ENGINE_ROCKETS_IN_MAHOGANY diff --git a/home/video.asm b/home/video.asm index 242584cb..e4e9fa78 100644 --- a/home/video.asm +++ b/home/video.asm @@ -7,7 +7,7 @@ UpdateBGMapBuffer::  ; Return carry on success.  	ldh a, [hBGMapUpdate] -	and a ; 0 +	and a  	ret z  	ld [hSPBuffer], sp @@ -93,7 +93,7 @@ UpdateBGMap::  ; Update the BG Map, in thirds, from wTilemap and wAttrmap.  	ldh a, [hBGMapMode] -	and a +	and a ; 0  	ret z  ; BG Map 0 @@ -239,8 +239,6 @@ endr  	ret  Serve1bppRequest:: -; Only call during the first fifth of VBlank -  	ld a, [wRequested1bpp]  	and a  	ret z @@ -310,8 +308,6 @@ endr  	ret  Serve2bppRequest:: -; Only call during the first fifth of VBlank -  	ld a, [wRequested2bpp]  	and a  	ret z @@ -373,8 +369,6 @@ endr  	ret  AnimateTileset:: -; Only call during the first fifth of VBlank -  	ldh a, [hMapAnims]  	and a  	ret z @@ -390,8 +384,10 @@ AnimateTileset::  	rst Bankswitch  	ret +; unused  	ret +; unused  	ld hl, rLCDC  	set 1, [hl]  	ret @@ -415,7 +411,7 @@ Function1642::  	ld l, a  	ld de, SCREEN_WIDTH  	add hl, de -	ld b, $12 +	ld b, SCREEN_HEIGHT  	ld a, $60  .loop1  rept 12 @@ -22,7 +22,6 @@ hSeconds:: db ; ff9a  hVBlankCounter:: db ; ff9d -; hDMATransfer?  hFF9E:: db ; ff9e  hROMBank:: db ; ff9f diff --git a/maps/EcruteakTinTowerEntrance.asm b/maps/EcruteakTinTowerEntrance.asm index 5356757e..49d99157 100644 --- a/maps/EcruteakTinTowerEntrance.asm +++ b/maps/EcruteakTinTowerEntrance.asm @@ -18,7 +18,7 @@ EcruteakTinTowerEntrance_MapScripts:  	end  EcruteakTinTowerEntrance_CoordEvent1: -	checkevent EVENT_RANG_CLEAR_BELL_2 +	checkevent EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_RIGHT  	iftrue EcruteakTinTowerEntrance_CoordEvent_DontMove  	applymovement ECRUTEAKTINTOWERENTRANCE_SAGE2, MovementData_0x980c7  	moveobject ECRUTEAKTINTOWERENTRANCE_SAGE1, 4, 6 @@ -28,7 +28,7 @@ EcruteakTinTowerEntrance_CoordEvent1:  	end  EcruteakTinTowerEntrance_CoordEvent2: -	checkevent EVENT_RANG_CLEAR_BELL_1 +	checkevent EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_LEFT  	iftrue EcruteakTinTowerEntrance_CoordEvent_DontMove  	applymovement ECRUTEAKTINTOWERENTRANCE_SAGE1, MovementData_0x980cc  	moveobject ECRUTEAKTINTOWERENTRANCE_SAGE2, 5, 6 @@ -158,7 +158,7 @@ EcruteakTinTowerEntrance_MapEvents:  	db 0 ; bg events  	db 4 ; object events -	object_event  4,  6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_RANG_CLEAR_BELL_1 -	object_event  5,  6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_RANG_CLEAR_BELL_2 +	object_event  4,  6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_LEFT +	object_event  5,  6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_SAGE_RIGHT  	object_event  6,  9, SPRITE_SAGE, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceWanderingSageScript, -1  	object_event  3, 11, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceGrampsScript, -1 | 
