Merge branch 'OWMain' into GKNew

This commit is contained in:
2025-09-01 10:56:43 -05:00
5 changed files with 84 additions and 22 deletions

View File

@@ -109,6 +109,36 @@ CheckGanonVulnerability:
BCC .fail BCC .fail
BRA .all_dungeons BRA .all_dungeons
;--------------------------------------------------------------------------------
GTCutscene_TransferGfx:
PHA
REP #$20
LDA.l GanonsTowerOpenGfx : BEQ .original_crystal
PHX
LDX.w ItemStackPtr : STA.l ItemGFXStack,X
LDA.w #$81C0>>1 : STA.l ItemTargetStack,X
INX #2 : STX.w ItemStackPtr
PLX
SEP #$20
PLA
RTL
.original_crystal
SEP #$20
PLA
JML TransferItemReceiptToBuffer_using_GraphicsID
;--------------------------------------------------------------------------------
AncillaDraw_GTCutsceneCrystal_OAMPrep:
LDA.l GanonsTowerOpenGfx : ORA.l GanonsTowerOpenGfx+1 : BEQ .vanilla
LDA.b #$0E : STA.b (OAMPtr),Y
INY
LDA.l GanonsTowerOpenPalette : AND.b #$67 : ASL : ORA.b #$30
STA.b (OAMPtr),Y
RTL
.vanilla
LDA.b #$24 : STA.b (OAMPtr),Y
INY
LDA.b #$3C : STA.b (OAMPtr),Y
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
GTCutscene_CrystalMasks: GTCutscene_CrystalMasks:
db %00000000 ; 0 crystals db %00000000 ; 0 crystals

View File

@@ -538,6 +538,8 @@ JML GTCutscene_ConditionalAnimateCrystals
org $88CE93 org $88CE93
GTCutscene_DrawSingleCrystal: GTCutscene_DrawSingleCrystal:
JML GTCutscene_ConditionalDrawSingleCrystal JML GTCutscene_ConditionalDrawSingleCrystal
org $88CED1
JSL AncillaDraw_GTCutsceneCrystal_OAMPrep : BRA + : NOP #3 : +
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $88CF19 ; <- 44F19 - ancilla_break_tower_seal.asm : 336 (TXA : AND.b #$07 : TAX) org $88CF19 ; <- 44F19 - ancilla_break_tower_seal.asm : 336 (TXA : AND.b #$07 : TAX)
JSL GTCutscene_ActivateSparkle_SelectCrystal JSL GTCutscene_ActivateSparkle_SelectCrystal
@@ -2237,8 +2239,6 @@ org $82A9B0 ; (BCS $A9B7)
NOP #2 NOP #2
org $82C1C8 ; (BCS $C1CC) org $82C1C8 ; (BCS $C1CC)
NOP #2 NOP #2
org $82ADA0 ; (LDA.b #$F1 : STA $012C)
JSL Overworld_MosaicDarkWorldChecks : NOP
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $85CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18) org $85CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18)
JSL PsychoSolder_MusicCheck : NOP #1 JSL PsychoSolder_MusicCheck : NOP #1
@@ -2264,8 +2264,9 @@ JSL Overworld_DetermineMusic
BRA + : NOP #42 : + BRA + : NOP #42 : +
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $82B0C4 org $82B0C4
LDA.b OverworldIndex : CMP.b #$80 : BCS +
JSL Overworld_DetermineAndSetMusic JSL Overworld_DetermineAndSetMusic
BRA + : NOP #16 : + BRA + : NOP #10 : +
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $82B1C1 org $82B1C1
JSL Overworld_DetermineAmbientSFX JSL Overworld_DetermineAmbientSFX
@@ -2283,8 +2284,18 @@ BRA + : NOP #12 : +
org $88C442 org $88C442
JSL Overworld_DetermineAndSetMusic : NOP JSL Overworld_DetermineAndSetMusic : NOP
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $9BD1CD
JSL Overworld_DetermineAndSetMusic : NOP
;--------------------------------------------------------------------------------
org $9DFD27 org $9DFD27
JSL Overworld_DetermineAndSetMusic : NOP JSL Overworld_DetermineAndSetMusic : NOP
;--------------------------------------------------------------------------------
org $829253
JSL FixHalfVolumeOnSpawnExitToOverworld : NOP
;--------------------------------------------------------------------------------
org $8292D9
BRA + : NOP #4 : +
JSL FixPreAgaMusicFadeOut : db $B0 ; BCS
;================================================================================ ;================================================================================
;================================================================================ ;================================================================================
@@ -2654,7 +2665,7 @@ org $898AEE : JSL TransferItemReceiptToBuffer_using_GraphicsID
org $898C85 : JSL TransferItemReceiptToBuffer_using_GraphicsID org $898C85 : JSL TransferItemReceiptToBuffer_using_GraphicsID
; gt cutscene ; gt cutscene
org $899BBE : JSL TransferItemReceiptToBuffer_using_GraphicsID org $899BBE : JSL GTCutscene_TransferGfx
;=================================================================================================== ;===================================================================================================
; gratuitous NOPs removed for speed ; gratuitous NOPs removed for speed

View File

@@ -1437,7 +1437,7 @@ StandingItemGraphicsOffsets:
dw $0960 ; D0 - Bee trap dw $0960 ; D0 - Bee trap
dw $0 ; D1 - Apples dw $0 ; D1 - Apples
dw $0 ; D2 - Fairy dw $0 ; D2 - Fairy
dw $11E0 ; D3 - Chicken dw BigDecompressionBuffer+$0140 ; D3 - Chicken
dw $01E0 ; D4 - Big Magic dw $01E0 ; D4 - Big Magic
dw $11E0 ; D5 - 5 Arrows dw $11E0 ; D5 - 5 Arrows
dw $0 ; D6 - Good Bee dw $0 ; D6 - Good Bee

View File

@@ -173,24 +173,21 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; Additional dark world checks to determine whether or not to fade out music pushpc
; on mosaic transitions org $82AD6C
; ; Determine whether or not to fade out music on mosaic transitions
; On entry, A = $8A (overworld area being loaded) OverworldMosaicTransition_HandleSong:
Overworld_MosaicDarkWorldChecks: LDA.b GameSubMode : CMP.b #$0D : BNE .dont_fade
CMP.b #$40 : BEQ .checkCrystals LDA.w CurrentControlRequest : CMP.b #$04 : BEQ .dont_fade
CMP.b #$42 : BEQ .checkCrystals BRA .fade_song
CMP.b #$50 : BEQ .checkCrystals
CMP.b #$51 : BNE .doFade
.checkCrystals warnpc $82ADA0
LDA.l CrystalsField : CMP.b #$7F : BEQ .done org $82ADA0
.fade_song
org $82ADA5
.dont_fade
.doFade pullpc
LDA.b #$F1 : STA.w MusicControlRequest ; thing we wrote over, fade out music
.done
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -229,3 +226,22 @@ FallingMusicFadeOut:
.return .return
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
FixHalfVolumeOnSpawnExitToOverworld:
BEQ .exit : STA.w MusicControlRequest ; what we wrote over
LDA.w DungeonID : BNE .exit
LDA.b LinkPosY+1 : ROR : LDA.b LinkPosY : ROR
CMP.b #$DC : BCS .exit ; check if link loading in room from a spawn
; set queue to half volume to trigger full volume on exit
LDA.b #$F2 : STA.w MusicControlQueue
.exit
RTL
;--------------------------------------------------------------------------------
FixPreAgaMusicFadeOut:
LDA.l DRMode : TAX : CPX.b #$01 : BCS .exit_no_fade+1
LDA.b RoomIndex : CMP.w #$0030 : BEQ .exit_and_fade ; what we
CMP.w #$0040 : BEQ .exit_and_fade ; wrote over
.exit_no_fade
SEC : RTL
.exit_and_fade
CLC : RTL
;--------------------------------------------------------------------------------

View File

@@ -948,8 +948,13 @@ dw $0000 ; #$00 = Off (default)
; #$09 = Require All Dungeons No Agahnim ; #$09 = Require All Dungeons No Agahnim
; #$0A = Require 100% Item Collection ; #$0A = Require 100% Item Collection
; #$0B = Require 100% Item Collection and All Dungeons ; #$0B = Require 100% Item Collection and All Dungeons
GanonsTowerOpenGfx: ; 0x1801AA-0x1801AB
dw $0000 ; Gfx used for GT open animation, similar to StandingItemGraphicsOffsets
GanonsTowerOpenPalette: ; 0x1801AC
db $00 ; Palette for GanonsTowerOpenGfx
;VHPP CCC O
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; 0x18019A - 0x1801FF (unused) ; 0x1801AD - 0x1801FF (unused)
;================================================================================ ;================================================================================
org $B08200 ; PC 0x180200 - 0x18020B org $B08200 ; PC 0x180200 - 0x18020B
RedClockAmount: RedClockAmount: