mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-11-28 00:51:14 +00:00
Support for custom projectile rendering
This commit is contained in:
parent
b06048a9d9
commit
c6d1fd00b2
BIN
Art/014Stand.gif
Normal file
BIN
Art/014Stand.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 135 B |
BIN
SpriteBank00.bin
BIN
SpriteBank00.bin
Binary file not shown.
39
fan.s
39
fan.s
@ -58,9 +58,46 @@ updateFan:
|
|||||||
sta projectileData+JD_STATIC,y
|
sta projectileData+JD_STATIC,y
|
||||||
jsr endProjectile
|
jsr endProjectile
|
||||||
|
|
||||||
|
; Now set up the stand
|
||||||
|
lda projectileData+GO_POSX,y
|
||||||
|
sta standGameObjectData+GO_POSX
|
||||||
|
lda projectileData+GO_POSY,y
|
||||||
|
sec
|
||||||
|
sbc #GAMEOBJECTHEIGHT
|
||||||
|
sta standGameObjectData+GO_POSY,y
|
||||||
|
|
||||||
updateFanDone:
|
updateFanDone:
|
||||||
RESTORE_AXY
|
RESTORE_AXY
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; renderFan
|
||||||
|
;
|
||||||
|
; Y = Offset to projectile structure
|
||||||
|
;
|
||||||
|
renderFan:
|
||||||
|
SAVE_AXY
|
||||||
|
|
||||||
|
lda projectileData+JD_STATIC,y
|
||||||
|
beq renderFanDone ; Don't render the stand until we're static
|
||||||
|
|
||||||
|
; Render the stand under the fan
|
||||||
|
lda #standGameObjectData
|
||||||
|
sta PARAML0
|
||||||
|
lda #14
|
||||||
|
jsr renderGameObject
|
||||||
|
|
||||||
|
renderFanDone:
|
||||||
|
RESTORE_AXY
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
; Fake game object for rendering the stand
|
||||||
|
standGameObjectData:
|
||||||
|
.word 40 ; X pos in pixels (from right terrain edge)
|
||||||
|
.word 38 ; Y pos in pixels (from bottom terrain edge)
|
||||||
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Saved background 64 bytes
|
||||||
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
@ -112,7 +112,7 @@ projectileTypes:
|
|||||||
.word 12 ; Frame 2
|
.word 12 ; Frame 2
|
||||||
.addr deployFan ; Deploy
|
.addr deployFan ; Deploy
|
||||||
.addr updateFan ; Update
|
.addr updateFan ; Update
|
||||||
.addr 0 ; Render
|
.addr renderFan ; Render
|
||||||
|
|
||||||
;.word ; Padding to 16-byte boundary (none needed)
|
;.word ; Padding to 16-byte boundary (none needed)
|
||||||
|
|
||||||
@ -688,6 +688,11 @@ renderProjectileFlat:
|
|||||||
renderProjectileGoSprite:
|
renderProjectileGoSprite:
|
||||||
jsr renderGameObject
|
jsr renderGameObject
|
||||||
|
|
||||||
|
; Check for special deployment code
|
||||||
|
lda projectileTypes+PT_RENDER,x
|
||||||
|
beq renderProjectileDone
|
||||||
|
JSRA
|
||||||
|
|
||||||
renderProjectileDone:
|
renderProjectileDone:
|
||||||
RESTORE_AXY
|
RESTORE_AXY
|
||||||
rts
|
rts
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
|
|
||||||
DrawSpriteBank :
|
DrawSpriteBank :
|
||||||
ASL ; A=Sprite Number ($0000-$000D)
|
ASL ; A=Sprite Number ($0000-$000E)
|
||||||
TAX ; Y=Target Screen Address ($2000-$9D00)
|
TAX ; Y=Target Screen Address ($2000-$9D00)
|
||||||
LDA SpriteBankNum,X ; Relative Sprite Number Table
|
LDA SpriteBankNum,X ; Relative Sprite Number Table
|
||||||
JMP (SpriteBankBank,X) ; Bank Number Table
|
JMP (SpriteBankBank,X) ; Bank Number Table
|
||||||
|
|
||||||
SpriteBankNum :
|
SpriteBankNum :
|
||||||
.dbyt $0100,$0000,$0900,$0400,$0500,$0800,$0C00,$0B00
|
.dbyt $0100,$0000,$0A00,$0500,$0600,$0900,$0D00,$0C00
|
||||||
.dbyt $0700,$0600,$0A00,$0D00,$0200,$0300
|
.dbyt $0800,$0700,$0B00,$0E00,$0200,$0300,$0400
|
||||||
|
|
||||||
SpriteBankBank :
|
SpriteBankBank :
|
||||||
.addr SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00
|
.addr SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00
|
||||||
.addr SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00
|
.addr SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00,SpriteBankBank00
|
||||||
|
|
||||||
SpriteBankBank00 :
|
SpriteBankBank00 :
|
||||||
JSL $AA0000
|
JSL $AA0000
|
||||||
|
Loading…
Reference in New Issue
Block a user