12/14/2017

This commit is contained in:
Karkat
2017-12-14 15:43:20 -05:00
parent fe2cb8f277
commit b9a180b8c6
9 changed files with 178 additions and 6 deletions

View File

@@ -122,6 +122,7 @@ incsrc goalitem.asm
incsrc compasses.asm incsrc compasses.asm
incsrc doorframefixes.asm incsrc doorframefixes.asm
;incsrc shopkeeper.asm ;incsrc shopkeeper.asm
incsrc cuccostorm.asm
incsrc hashalphabet.asm ; <- TAKE OUT THE EXTRA ORGS IN HERE - THIS IS WHY WE COULDN'T ADD MORE FILES EARLIER incsrc hashalphabet.asm ; <- TAKE OUT THE EXTRA ORGS IN HERE - THIS IS WHY WE COULDN'T ADD MORE FILES EARLIER
warnpc $A18000 warnpc $A18000
@@ -357,6 +358,9 @@ Sprite_ShowMessageMinimal:
org $05EC96 org $05EC96
Sprite_ZeldaLong: Sprite_ZeldaLong:
org $06A7DB
Chicken_SpawnAvengerChicken: ; returns short
org $06DC5C org $06DC5C
Sprite_DrawShadowLong: Sprite_DrawShadowLong:
@@ -369,8 +373,11 @@ Sprite_PrepAndDrawSingleLargeLong:
org $06DC00 org $06DC00
Sprite_PrepAndDrawSingleSmallLong: Sprite_PrepAndDrawSingleSmallLong:
org $06EA18
Sprite_ApplySpeedTowardsPlayerLong:
org $06EAA6 org $06EAA6
Sprite_DirectionToFacePlayer: Sprite_DirectionToFacePlayerLong:
org $06F12F org $06F12F
Sprite_CheckDamageToPlayerSameLayerLong: Sprite_CheckDamageToPlayerSameLayerLong:
@@ -402,6 +409,9 @@ AddPendantOrCrystal:
org $0993DF org $0993DF
AddDashTremor: AddDashTremor:
org $09AE64
Sprite_SetSpawnedCoords:
org $09AD58 org $09AD58
GiveRupeeGift: GiveRupeeGift:
@@ -427,6 +437,12 @@ OAM_AllocateFromRegionF:
org $0DBB67 org $0DBB67
Sound_SetSfxPanWithPlayerCoords: Sound_SetSfxPanWithPlayerCoords:
org $0DBB6E
Sound_SetSfx1PanLong:
org $0DBB7C
Sound_SetSfx2PanLong:
org $0DBB8A org $0DBB8A
Sound_SetSfx3PanLong: Sound_SetSfx3PanLong:
@@ -469,6 +485,9 @@ ShopKeeper_RapidTerminateReceiveItem:
org $1DF65D org $1DF65D
Sprite_SpawnDynamically: Sprite_SpawnDynamically:
org $1DF65F
Sprite_SpawnDynamically_arbitrary:
org $1DFD4B org $1DFD4B
DiggingGameGuy_AttemptPrizeSpawn: DiggingGameGuy_AttemptPrizeSpawn:

View File

@@ -8,7 +8,7 @@ Sprite_ShowMessageFromPlayerContact_Edit:
LDA $4D : CMP.b #$02 : BEQ .dont_show LDA $4D : CMP.b #$02 : BEQ .dont_show
JSL.l Sprite_DirectionToFacePlayer : TYA : EOR.b #$03 JSL.l Sprite_DirectionToFacePlayerLong : TYA : EOR.b #$03
SEC SEC
RTL RTL
.dont_show .dont_show
@@ -27,7 +27,7 @@ Sprite_ShowSolicitedMessageIfPlayerFacing_Edit:
LDA $4D : CMP.b #$02 : BEQ .alpha LDA $4D : CMP.b #$02 : BEQ .alpha
STZ $1CE8 ; set text choice to 1st option (usually yes/confirm/etc) STZ $1CE8 ; set text choice to 1st option (usually yes/confirm/etc)
JSL.l Sprite_DirectionToFacePlayer : PHX : TYX JSL.l Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise ; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???) ; talking can't happen. (What sprites actually use this???)
@@ -90,7 +90,7 @@ Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:
LDA $0F10, X : BNE .alpha LDA $0F10, X : BNE .alpha
LDA $4D : CMP.b #$02 : BEQ .alpha LDA $4D : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayer : PHX : TYX JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise ; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???) ; talking can't happen. (What sprites actually use this???)

74
cuccostorm.asm Normal file
View File

@@ -0,0 +1,74 @@
;================================================================================
StartCuccoStorm:
;STA $FFFFFF
PHA : PHX : PHY : PHP
SEP #$30 ; set 8-bit accumulator & index registers
LDA $1B : BNE .done ; skip if indoors
LDY.b #$0A
LDA.b #$0B : JSL Sprite_SpawnDynamically_arbitrary : BMI .done ; spawn a chicken
JSL Sprite_SetSpawnedCoords
LDA.b #$24 : STA $0DA0, Y ; turn it into an attack chicken
LDA.b #$01 : STA $0DB0, Y
.done
PLP : PLY : PLX : PLA
RTL
;================================================================================
SpawnAngryCucco:
TXA : EOR $1A : AND.b #$0F : ORA $1B : BNE .spawn_delay
LDA.b #$0B
LDY.b #$0A
JSL Sprite_SpawnDynamically_arbitrary : BMI .spawn_failed
PHX
TYX
LDA.b #$1E : JSL Sound_SetSfx3PanLong
PLX
LDA.b #$01 : STA $0DB0, Y
PHX
JSL GetRandomInt : STA $0F : AND.b #$02 : BEQ .vertical_entry_point
LDA $0F : ADC $E2 : STA $0D10, Y
LDA $E3 : ADC.b #$00 : STA $0D30, Y
LDA $0F : AND.b #$01 : TAX
LDA $9F3C, X : ADC $E8 : STA $0D00, Y
LDA $E9 : ADC.b #$00 : STA $0D20, Y
BRA .set_velocity
.vertical_entry_point
LDA $0F : ADC $E8 : STA $0D00, Y
LDA $E9 : ADC.b #$00 : STA $0D20, Y
LDA $0F : AND.b #$01 : TAX
LDA $9F3C, X : ADC $E2 : STA $0D10, Y
LDA $E3 : ADC.b #$00 : STA $0D30, Y
.set_velocity
TYX
LDA.b #$20 : JSL Sprite_ApplySpeedTowardsPlayerLong
PLX
LDA.b #$30 : JSL Sound_SetSfx2PanLong
.spawn_failed
.spawn_delay
RTL
;================================================================================

View File

@@ -357,6 +357,34 @@ JSL.l MSMusicReset : NOP
; $22 = $0100 - $00FF - Hobo ; $22 = $0100 - $00FF - Hobo
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;================================================================================
; Temporary Nerfs and Buffs
;--------------------------------------------------------------------------------
org $06F400 ; <- 37F400 - Bank06.asm : 5963 (CLC : ADC $7EF35B)
JSL.l LoadModifiedArmorLevel : NOP
;--------------------------------------------------------------------------------
org $07ADDB ; <- 3ADDB - Bank07.asm : 7251 (LDA $7EF37B : TAY)
JSL.l LoadModifiedMagicLevel
;--------------------------------------------------------------------------------
org $07AE0D ; <- 3AE0D - Bank07.asm : 7279 (LDA $7EF37B : TAY)
JSL.l LoadModifiedMagicLevel
;--------------------------------------------------------------------------------
org $07AE8E ; <- 3AE8E - Bank07.asm : 7376 (LDA $7EF37B : TAY)
JSL.l LoadModifiedMagicLevel
;--------------------------------------------------------------------------------
org $08DCB9 ; <- 45CB9 - ancilla_cane_spark.asm : 256 (LDA $7EF37B : TAY)
JSL.l LoadModifiedMagicLevel
;--------------------------------------------------------------------------------
org $07B08B
LinkItem_MagicCostBaseIndices:
;--------------------------------------------------------------------------------
org $07B096 ; <- 3B096 - Bank07.asm : 7731 (LDA LinkItem_MagicCostBaseIndices, X : CLC : ADC $7EF37B : TAX)
JSL.l LoadModifiedMagicLevel : !ADD.w LinkItem_MagicCostBaseIndices
;--------------------------------------------------------------------------------
org $07B0D5 ; <- 3B0D5 - Bank07.asm : 7783 (LDA LinkItem_MagicCostBaseIndices, X : CLC : ADC $7EF37B : TAX)
JSL.l LoadModifiedMagicLevel : !ADD.w LinkItem_MagicCostBaseIndices
;--------------------------------------------------------------------------------
;================================================================================ ;================================================================================
; New Items ; New Items
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -45,6 +45,9 @@ ProcessMenuButtons:
.sel_held .sel_held
CLC ; no buttons CLC ; no buttons
RTL RTL
;.l_pressed
;JSL.l SpawnAngryCucco
;RTL
.sel_pressed .sel_pressed
LDA !HUD_FLAG : ORA #$20 : STA !HUD_FLAG ; set hud flag LDA !HUD_FLAG : ORA #$20 : STA !HUD_FLAG ; set hud flag
LDA.b #$20 : STA $012F ; menu select sound LDA.b #$20 : STA $012F ; menu select sound

View File

@@ -4,6 +4,9 @@
; Output: 0 for darkness, 1 for lamp cone ; Output: 0 for darkness, 1 for lamp cone
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LampCheck: LampCheck:
LDA $7F50C4 : CMP.b #$01 : BNE + : RTL : +
CMP.b #$FF : BNE + : INC : RTL : +
LDA $7EF34A : BNE .done ; skip if we already have lantern LDA $7EF34A : BNE .done ; skip if we already have lantern
LDA $7EF3CA : BNE + LDA $7EF3CA : BNE +

View File

@@ -847,7 +847,7 @@ GetRNGItemSingle:
CMP.l RNGSingleTableSize : !BLT +++ : LDA.b #$00 : +++ ; rollover index if needed CMP.l RNGSingleTableSize : !BLT +++ : LDA.b #$00 : +++ ; rollover index if needed
STA !SINGLE_INDEX_TEMP ; store index STA !SINGLE_INDEX_TEMP ; store index
INX : CPX.l RNGSingleTableSize : !BLT .recheck INX : CPX.l RNGSingleTableSize : !BLT .recheck
LDA.b #$5A ; everything is gone, default to null item LDA.b #$5A ; everything is gone, default to null item - MAKE THIS AN OPTION FOR THIS AND THE OTHER ONE
BRA .single_done BRA .single_done
.single_unused .single_unused
LDA !SINGLE_INDEX_TEMP LDA !SINGLE_INDEX_TEMP

View File

@@ -32,11 +32,47 @@ JMP.l PyramidFairy_BRANCH_GAMMA
;================================================================================ ;================================================================================
LoadSwordForDamage: LoadSwordForDamage:
LDA $0E20, X : CMP.b #$88 : BNE .notMoth LDA $0E20, X : CMP.b #$88 : BNE .notMoth
LDA $7EF359 ; load normal sword value JSR.w LoadModifiedSwordLevel ; load normal sword value
CMP.b #$04 : !BLT + : DEC : + CMP.b #$04 : !BLT + : DEC : +
RTL RTL
.notMoth .notMoth
JSR.w LoadModifiedSwordLevel ; load normal sword value
RTL
;================================================================================
; $7F50C0 - Sword Modifier
LoadModifiedSwordLevel: ; returns short
LDA $7F50C0 : BEQ +
!ADD $7EF359 ; add normal sword value to modifier
BNE ++ : LDA.b #$01 : RTS : ++
CMP.b #$05 : !BLT ++ : LDA.b #$04 : RTS : ++
RTS
+
LDA $7EF359 ; load normal sword value LDA $7EF359 ; load normal sword value
RTS
;================================================================================
; $7EF35B - Armor Inventory
; $7F50C2 - Armor Modifier
; $7F5020 - Scratch Space (Caller Preserved)
LoadModifiedArmorLevel:
PHA
LDA $7EF35B : !ADD $7F50C2
CMP.b #$FF : BNE + : LDA.b #$00 : +
CMP.b #$03 : !BLT + : LDA.b #$02 : +
STA $7F5020
PLA
!ADD $7F5020
RTL
;================================================================================
; $7EF37B - Magic Inventory
; $7F50C3 - Magic Modifier
LoadModifiedMagicLevel:
LDA $7F50C3 : BEQ +
!ADD $7EF37B ; add normal magic value to modifier
CMP.b #$FF : BNE + : LDA.b #$00 : +
CMP.b #$03 : !BLT ++ : LDA.b #$02 : RTS : ++
RTL
+
LDA $7F50C3 ; load normal magic value
RTL RTL
;================================================================================ ;================================================================================
CheckTabletSword: CheckTabletSword:

View File

@@ -1285,6 +1285,15 @@ dw #9999 ; Rupee Limit
; $7F50B0 - $7F50BF - Downstream Reserved (Enemizer) ; $7F50B0 - $7F50BF - Downstream Reserved (Enemizer)
; $7F50C0 - Sword Modifier
; $7F50C1 - Shield Modifier (Not Implemented)
; $7F50C2 - Armor Modifier
; $7F50C3 - Magic Modifier
; $7F50C4 - Light Cone Modifier
; $7F50C5 - Cucco Attack Modifier
; $7F50C6 - Old Man Dash Modifier
; $7F50C7 - Ice Physics Modifier
; $7F50D0 - $7F50FF - Block Cypher Parameters ; $7F50D0 - $7F50FF - Block Cypher Parameters
; $7F5100 - $7F51FF - Block Cypher Buffer ; $7F5100 - $7F51FF - Block Cypher Buffer
; $7F5200 - $7F52FF - RNG Pointer Block ; $7F5200 - $7F52FF - RNG Pointer Block