Fixed rendering bugs in players and projectiles

This commit is contained in:
blondie7575 2017-10-26 20:22:12 -07:00
parent a932295552
commit 66fde553b9
3 changed files with 6 additions and 2 deletions

View File

@ -98,6 +98,7 @@ gameplayLoopProjectiles:
sta KBDSTROBE sta KBDSTROBE
jsr unrenderProjectiles jsr unrenderProjectiles
jsr updateProjectilePhysics jsr updateProjectilePhysics
jsr protectProjectiles
jsr renderProjectiles jsr renderProjectiles
jsr updateProjectileCollisions jsr updateProjectileCollisions
@ -233,6 +234,7 @@ scrollMap:
jsr protectPlayers jsr protectPlayers
jsr protectProjectiles jsr protectProjectiles
jsr renderPlayers
lda #1 lda #1
sta terrainDirty sta terrainDirty
rts rts

Binary file not shown.

View File

@ -258,14 +258,16 @@ updateProjectileCollisionsPlayerNext:
; Check for terrain collisions ; Check for terrain collisions
lda projectileData+GO_POSX lda projectileData+GO_POSX
inc inc
inc
sta rectParams sta rectParams
lda projectileData+GO_POSY lda projectileData+GO_POSY
clc clc
inc inc
inc
sta rectParams+2 sta rectParams+2
lda #GAMEOBJECTWIDTH-2 lda #GAMEOBJECTWIDTH-4
sta rectParams+4 sta rectParams+4
lda #GAMEOBJECTHEIGHT-2 lda #GAMEOBJECTHEIGHT-4
sta rectParams+6 sta rectParams+6
jsr intersectRectTerrain jsr intersectRectTerrain