Housekeeping NPCs, Octorok, TransferDungeonMapGfx

This commit is contained in:
scawful
2024-10-08 20:11:40 -04:00
parent 3918eeac17
commit b31cb0c507
4 changed files with 14 additions and 29 deletions

View File

@@ -59,18 +59,16 @@ pullpc ; Bank 0x33
TransferDungeonMapGfx: TransferDungeonMapGfx:
{ {
REP #$20 ; A = 16, XY = 8 REP #$20
LDX #$80 : STX $2100
LDX #$80 : STX $2100 ; turn the screen off (required) LDX #$80 : STX $2115
LDX #$80 : STX $2115 ; Set the video port register every time we write it increase by 1 LDA #$5000 : STA $2116 ; Destination of the DMA in VRAM
LDA #$5000 : STA $2116 ; Destination of the DMA $5800 in vram <- this need to be divided by 2
LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register
LDA.w #MapGfx : STA $4302 ; Source address where you want gfx from ROM LDA.w #MapGfx : STA $4302
LDX.b #MapGfx>>16 : STX $4304 LDX.b #MapGfx>>16 : STX $4304
LDA #$2000 : STA $4305 ; size of the transfer 4 sheets of $800 each LDA #$2000 : STA $4305
LDX #$01 : STX $420B ; Do the DMA LDX #$01 : STX $420B
LDX #$0F : STX $2100
LDX #$0F : STX $2100 ; Turn the screen back on
SEP #$30 SEP #$30
LDA.b #$09 : STA.b $14 LDA.b #$09 : STA.b $14

View File

@@ -269,7 +269,7 @@ Sprite_WaterOctorok_Attack:
JSL Sprite_DamageFlash_Long JSL Sprite_DamageFlash_Long
JSL Sprite_CheckDamageToPlayer JSL Sprite_CheckDamageToPlayer
LDA SprMiscG, X LDA.w SprMiscG, X
JSL UseImplicitRegIndexedLocalJumpTable JSL UseImplicitRegIndexedLocalJumpTable
dw WaterOctorok_Hidden dw WaterOctorok_Hidden

View File

@@ -655,7 +655,6 @@ MinecartFollower_Top:
LDA $02CF : TAY LDA $02CF : TAY
LDA .start_index, Y : STA $06 LDA .start_index, Y : STA $06
PHX PHX
LDX .nbr_of_tiles, Y ; amount of tiles -1 LDX .nbr_of_tiles, Y ; amount of tiles -1
LDY.b #$00 LDY.b #$00
@@ -687,11 +686,8 @@ MinecartFollower_Top:
LDA .properties, X : STA ($90), Y LDA .properties, X : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
@@ -766,11 +762,8 @@ MinecartFollower_Bottom:
LDA .properties, X : STA ($90), Y LDA .properties, X : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile

View File

@@ -48,7 +48,6 @@ Sprite_ZoraPrincess_Long:
Sprite_ZoraPrincess_Prep: Sprite_ZoraPrincess_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.l $7EF302 LDA.l $7EF302
BEQ .doesnt_have_mask BEQ .doesnt_have_mask
STZ.w $0DD0, X ; Kill the sprite STZ.w $0DD0, X ; Kill the sprite
@@ -133,7 +132,6 @@ Sprite_ZoraPrincess_Draw:
.nextTile .nextTile
PHX ; Save current Tile Index? PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset? PHA ; Keep the value with animation index offset?
@@ -161,13 +159,9 @@ Sprite_ZoraPrincess_Draw:
LDA .properties, X : STA ($90), Y LDA .properties, X : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
PLX PLX