Merge branch 'mistress' into renewables

This commit is contained in:
Thorn Avery 2024-01-22 08:46:22 +13:00
commit e031994f50
4 changed files with 36 additions and 21 deletions

View file

@ -2082,17 +2082,12 @@ LoadMapHeader::
ld a, [wCurMap] ld a, [wCurMap]
call SwitchToMapRomBank call SwitchToMapRomBank
ld a, [wCurMapTileset] ld a, [wCurMapTileset]
ld b, a bit 7, a
res 7, a res 7, a
ld [wCurMapTileset], a ld [wCurMapTileset], a
ldh [hPreviousTileset], a ldh [hPreviousTileset], a
bit 7, b ; ret nz ;comment this out so that the header data always loads
push af ;preserve the bit check for later to tell if CONTINUE is being selected
;replace the conditional return with a nop in order to always load the map header data...
;...even when selecting CONTINUE from the main menu
; ret nz
nop
ld hl, MapHeaderPointers ld hl, MapHeaderPointers
ld a, [wCurMap] ld a, [wCurMap]
sla a sla a
@ -2150,7 +2145,7 @@ LoadMapHeader::
ld [wObjectDataPointerTemp], a ld [wObjectDataPointerTemp], a
ld a, [hli] ld a, [hli]
ld [wObjectDataPointerTemp + 1], a ld [wObjectDataPointerTemp + 1], a
push hl ; push hl ; save hl before going to the warp/sign/sprite data (this value is saved for seemingly no purpose)
ld a, [wObjectDataPointerTemp] ld a, [wObjectDataPointerTemp]
ld l, a ld l, a
ld a, [wObjectDataPointerTemp + 1] ld a, [wObjectDataPointerTemp + 1]
@ -2158,6 +2153,9 @@ LoadMapHeader::
ld de, wMapBackgroundTile ld de, wMapBackgroundTile
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
pop af ;we're done if loading from the CONTINUE option of the main menu
ret nz
nop ;padding
.loadWarpData .loadWarpData
ld a, [hli] ld a, [hli]
ld [wNumberOfWarps], a ld [wNumberOfWarps], a
@ -2330,7 +2328,7 @@ LoadMapHeader::
.finishUp .finishUp
predef LoadTilesetHeader predef LoadTilesetHeader
callfar LoadWildData callfar LoadWildData
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose) ; pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
add a ; double it add a ; double it
ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks

View file

@ -309,8 +309,8 @@ SilphCo7TrainerHeader3:
SilphCo7Text1: SilphCo7Text1:
; lapras guy ; lapras guy
text_asm text_asm
ld a, [wd72c] ld a, [wd72e]
bit 2, a bit 0, a
jr z, .givelapras jr z, .givelapras
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
jr nz, .savedsilph jr nz, .savedsilph
@ -329,8 +329,8 @@ SilphCo7Text1:
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl, .HeresYourLaprasText ld hl, .HeresYourLaprasText
call PrintText call PrintText
ld hl, wd72c ld hl, wd72e
set 2, [hl] set 0, [hl]
jr .done jr .done
.savedsilph .savedsilph
ld hl, .LaprasGuySavedText ld hl, .LaprasGuySavedText

View file

@ -370,14 +370,23 @@ VermilionBeauty:
; All it really achieves is weird architecture for like 3-4 less machine cycles. ; All it really achieves is weird architecture for like 3-4 less machine cycles.
ld a, [wBeautyCounter] ; Alright, if you got here, then the event is in progress. ld a, [wBeautyCounter] ; Alright, if you got here, then the event is in progress.
cp 5 ; Do you have 5 of the scrunklies? cp 5 ; Do you have 5 of the scrunklies?
jr z, .eventIsFinished ; Big if true. ; jr z, .eventIsFinished ; Big if true.
jr nz, .eventInProgress ; Small if false. ; jr nz, .eventInProgress ; Small if false.
jr nc, .eventIsFinished ; A set z flag happens for exactly 5. A cleared carry flag happens for values 5 to 255.
jr c, .eventInProgress ; And a set carry flag happens for values 0 to 4.
; Let us start the game. ; Let us start the game.
.eventStart .eventStart
ld hl, BeautyText1 ; Let's open the text. ld hl, BeautyText1 ; Let's open the text.
call PrintText call PrintText
call CatsDogsChoice call CatsDogsChoice
;account for cancelling with the B button
ld hl, _BeautyWait
ldh a, [hJoyHeld]
and B_BUTTON
jr nz, .skip5
ld a, [wCurrentMenuItem] ; Let's load what they picked. 0 is cats, 1 is dogs. ld a, [wCurrentMenuItem] ; Let's load what they picked. 0 is cats, 1 is dogs.
and a and a
jr nz, .getArcanine ; Skip storing Growlithe if dogs. jr nz, .getArcanine ; Skip storing Growlithe if dogs.
@ -401,7 +410,8 @@ VermilionBeauty:
; Now if the event is finished, she needs to hand the Pokemon over. ; Now if the event is finished, she needs to hand the Pokemon over.
.eventIsFinished .eventIsFinished
call SaveScreenTilesToBuffer1 ; saves us from some corruption disasters if nicknaming. ; call SaveScreenTilesToBuffer1 ; saves us from some corruption disasters if nicknaming.
; ...not needed anymore as this was fixed in commit dd71684
ld hl, BeautyFinish1 ld hl, BeautyFinish1
ld a, [wBeautyChoice] ld a, [wBeautyChoice]
cp GROWLITHE cp GROWLITHE
@ -418,10 +428,10 @@ VermilionBeauty:
.skip3 .skip3
call GivePokemon call GivePokemon
jr nc, .done jr nc, .done
call LoadScreenTilesFromBuffer1 ; saves us from some corruption disasters if nicknaming. ; call LoadScreenTilesFromBuffer1 ; saves us from some corruption disasters if nicknaming.
SetEvent EVENT_VERMILION_BEAUTY_DONE ; and now we can finally rest. SetEvent EVENT_VERMILION_BEAUTY_DONE ; and now we can finally rest.
ld hl, wd72e ; ld hl, wd72e ;not needed since EVENT_VERMILION_BEAUTY_DONE is the event bit for this.
set 0, [hl] ; set 0, [hl]
jr .done jr .done
; Now if it's already been said and done, we go here. ; Now if it's already been said and done, we go here.
@ -435,6 +445,7 @@ VermilionBeauty:
.skip4 .skip4
call PrintText call PrintText
ld hl, BeautyExplainCont ld hl, BeautyExplainCont
.skip5
call PrintText call PrintText
;fallthrough ;fallthrough
.done .done
@ -490,3 +501,9 @@ BeautyExplain2:
BeautyExplainCont: BeautyExplainCont:
text_far _BeautyExplainCont text_far _BeautyExplainCont
text_end text_end
_BeautyWait:
text "I can wait on"
line "your answer."
done
db "@"

View file

@ -136,7 +136,7 @@ _BeautyText2::
prompt ; needed for text to scroll correctly - it looks and acts fine in-game, don't worry. prompt ; needed for text to scroll correctly - it looks and acts fine in-game, don't worry.
_BeautyChoice:: ; this is separate for the in-progress event. _BeautyChoice:: ; this is separate for the in-progress event.
text "If you catch 5" text "If you catch 5 new"
line "@" line "@"
text_ram wcd6d ; efficiency - means we don't need two separate texts... text_ram wcd6d ; efficiency - means we don't need two separate texts...
text ", I'll" text ", I'll"