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
jsr unrenderProjectiles
jsr updateProjectilePhysics
jsr protectProjectiles
jsr renderProjectiles
jsr updateProjectileCollisions
@ -233,6 +234,7 @@ scrollMap:
jsr protectPlayers
jsr protectProjectiles
jsr renderPlayers
lda #1
sta terrainDirty
rts

Binary file not shown.

View File

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