UW Sprites new home

Enemizer asm refinement
This commit is contained in:
aerinon
2022-09-27 14:38:28 -06:00
parent 5e93e59727
commit 3fdf95a364
17 changed files with 1108 additions and 112 deletions

View File

@@ -359,11 +359,12 @@ warnpc $B08000
;$22 Contrib Code
;$23 Stats & Credits
;$24 Code Bank
;$26 Multiworld data
;$27 DR Code Bank
;$28 Keydrop / Standing Items Code bank
;$29 External hooks (rest of bank not used)
;$2A Reserved for OWR
;$2B Room Data migration
;$2B Reserved for "outlet data" ~5.8k
;$2E Reserved for Tournament Use
;$2F Static RNG (rest is reserved for tournament use)
;$30 Main Configuration Table
@@ -371,6 +372,7 @@ warnpc $B08000
;$32 Text Bank
;$33 Graphics Bank
;$36 reserved for Enemizer
;$37 Room data if needed for DR/Pottery/Enemizer
;$3A reserved for downstream use
;$3B reserved for downstream use
;$3F reserved for internal debugging

View File

@@ -1,5 +1,5 @@
;-------------
NMIHookAction:
NMIHookActionEnemizer:
{
;-----------------------------------------
; do our shell stuff
@@ -33,7 +33,7 @@ NMIHookAction:
; Sets DP to $0000
LDA.w #$0000 : TCD
JML.l NMIHookReturn
JML.l NMIHookReturnEnemizer
}
DMAKholdstare:

BIN
enemizer/gfx/rocks.gfx Normal file

Binary file not shown.

BIN
enemizer/gfx/rocks2.gfx Normal file

Binary file not shown.

BIN
enemizer/gfx/shell.gfx Normal file

Binary file not shown.

View File

@@ -18,4 +18,6 @@ incsrc hooks/damage_hooks.asm
incsrc hooks/overworld_sprite_hooks.asm
incsrc hooks/underworld_sprite_hooks.asm
incsrc hooks/blindboss_hooks.asm

View File

@@ -3,7 +3,7 @@
;--------------------------------------------------------------------------------
; rando already hooks the Bank00.asm : 164 (PHA : PHX : PHY : PHD : PHB) so we have to hook after that
org $0080D0 ; <- D0 - Bank00.asm : 164-167 (PHB, LDA.w #$0000)
JML.l NMIHookAction
JML.l NMIHookActionEnemizer
org $0080D5 ; <- D5 - Bank00.asm : 164-167 (PHB, LDA.w #$0000)
NMIHookReturn:
NMIHookReturnEnemizer:
;--------------------------------------------------------------------------------

View File

@@ -1,3 +1,3 @@
org $1EC147
JSL newKodongoCollision
JSL NewKodongoCollision
NOP #$05

View File

@@ -0,0 +1,67 @@
org $09C29A
JSL LoadUnderworldSprites : NOP
; these hooks change the LDA.b ($00) commands to use LDA.b [$00] commands
; so we can store the sprites in a different bank
; also needs to change the use of $02 to $03 for slot index to make that possible
org $09C2B2
LDA.b [$00]
org $09C2C1
LDA.b [$00],Y
org $09C2CA
INC.b $03 ; change slot variable to $03
;org $09C329 standing items overwrote this one
;LDA.b [$00],Y
org $09C332
LDA.b [$00],Y
org $09C345
DEC.b $03 : LDX.b $03
org $09C350
LDA.b [$00],Y
org $09C35A
DEC.b $03
org $09C36E
LDA.b $03
org $09C383
LDX.b $03
org $09C38C
LDA.b [$00],Y
org $09C398
LDA.b [$00],Y
org $09C3AA
LDA.b [$00],Y
org $09C3BF
LDA.b [$00],Y
org $09C3DF
LDA.b $03
org $09C3F3
LDA.b [$00],Y
org $09C3FB
LDA.b [$00],Y
org $09C404
LDA.b [$00],Y
org $09C416
LDA.b [$00],Y

View File

@@ -1,4 +1,4 @@
newKodongoCollision:
NewKodongoCollision:
{
LDA $0DE0, X : INC A : AND.b #$03 : STA $0DE0, X
;If they collide more than 32time then kill them !

View File

@@ -49,21 +49,15 @@ incsrc mimic_fixes.asm
; todo: vitreous key fix for boss shuffle
incsrc overworld_sprites.asm
incsrc underworld_sprites.asm
incsrc blindboss.asm
incsrc shell_gfx.asm
warnpc $B6FFFF ;if we hit this we need to split stuff by bank
org $0684BD
Sprite_Get16BitCoords_long:
org $0DBA71
GetRandomInt:
org $0DBB67
Sound_SetSfxPanWithPlayerCoords:
org $0DBB8A
Sound_SetSfx3PanLong:
org $1EC6FA ;F46FA
SpritePrep_Eyegore:

12
enemizer/shell_gfx.asm Normal file
View File

@@ -0,0 +1,12 @@
;================================================================================
; insert kholdstare & trinexx shell gfx file
;--------------------------------------------------------------------------------
GFX_Kholdstare_Shell:
incbin gfx/shell.gfx
GFX_Trinexx_Shell:
incbin gfx/rocks.gfx
GFX_Trinexx_Shell2:
incbin gfx/rocks2.gfx
;--------------------------------------------------------------------------------

View File

@@ -0,0 +1,6 @@
LoadUnderworldSprites:
STA.b $00 ; part one of what we replaced
LDA.w #$0028 : STA.b $02 ; set the bank to 28 for now
LDA.w $048E
RTL

View File

@@ -2916,4 +2916,10 @@ JSL WalkUpOnOverworld
NOP
org $02D7D2 ; BEQ .face_up
NOP #2 ; this fixes Link's direction after mirroring and falling after entering through back of tavern
NOP #2 ; this fixes Link's direction after mirroring and falling after entering through back of tavern
;--------------------------------------------------------------------------------
; Enable new room header table
;--------------------------------------------------------------------------------
org $01B5E6
LDA.b #$30

View File

@@ -92,35 +92,20 @@ SprItemIndex = $7E0750
SprItemMWPlayer = $7E0760 ; 0x16
SprItemFlags = $7E0770 ; 0x16 (used for both pots and drops) (combine with SprDropsItem?)
; todo: move sprites
;org $09D62E
;UWSpritesPointers ; 0x250 bytes for 0x128 rooms' 16-bit pointers
org $09D62E
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
;org $09D87E
;UWPotsPointers ; 0x250 bytes for 0x128 rooms' 16-bit pointers
;org $09DACE
;UWPotsData ; variable number of bytes (max 0x11D1) for all pots data
;org $A88000
;UWSpritesData ; variable number of bytes (max 0x2800) for all sprites and sprite drop data
; First $2800 bytes of this bank (28) is reserved for the sprite tables
;org $09C297
;LDA.w UWSpritesPointers,Y
;org $01E6BF ; not sure this code is reachable anymore
;LDA.l UWPotsPointers,X
;STA.b $00
;LDA.w #UWPotsPointers>>16
; $2800 bytes reserved for sprites
; temporary pot table until sprites get moved:
org $A88000
org $09D87E
UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
org $A88250
UWPotsData:
org $09DACE
UWPotsData: ; variable number of bytes (max 0x11D1) for all pots data
org $A88000
UWSpritesData: ; variable number of bytes (max 0x2800) for all sprites and sprite drop data
; First $2800 bytes of this bank (28) is reserved for the sprite tables
; $2800 bytes reserved for sprites
org $A8A800
;tables:
@@ -290,7 +275,7 @@ IncrementCountsForSubstitute:
RTS
ClearSpriteData:
STZ.b $02 : STZ.b $03 ; what we overrode
STZ.b $03 ; what we overrode # we no longer need STZ $02 see underworld_sprite_hooks
PHX
LDA #$00 : LDX #$00
.loop
@@ -303,20 +288,20 @@ ClearSpriteData:
; Runs during sprite load of the room
LoadSpriteData:
INY : INY
LDA.b ($00), Y
LDA.b [$00], Y
CMP #$F3 : BCC .normal
PHA
DEC.b $02 ; standing items shouldn't consume a sprite slot
LDX.b $02
DEC.b $03 ; standing items shouldn't consume a sprite slot
LDX.b $03 ; these were changed to $03, for moved sprites
CMP #$F9 : BNE .not_multiworld
DEY : LDA.b ($00), Y : STA.l SprItemMWPlayer, X
DEY : LDA.b [$00], Y : STA.l SprItemMWPlayer, X
LDA.b #$02 : STA.l SprDropsItem, X : BRA .common
.not_multiworld
LDA.b #$00 : STA.l SprItemMWPlayer, X
LDA.b #$01 : STA.l SprDropsItem, X
DEY
.common
DEY : LDA.b ($00), Y : STA.l SprItemReceipt, X
DEY : LDA.b [$00], Y : STA.l SprItemReceipt, X
INY : INY
PLA
PLA : PLA ; remove the JSL return lower 16 bits

0
multi/multiworld.asm Normal file
View File

1048
tables.asm

File diff suppressed because it is too large Load Diff