Fixed several rendering glitches

This commit is contained in:
blondie7575 2017-10-19 12:59:24 -07:00
parent cbb90ea1aa
commit 7ba22eadda
6 changed files with 415 additions and 381 deletions

View File

@ -15,7 +15,8 @@ ADDR=800
PGM=gscats PGM=gscats
MRSPRITE=../MrSprite/mrsprite MRSPRITE=../MrSprite/mrsprite
PALETTE=00ff00 000000 ffff00 886611 cc9933 eebb44 dd6666 ff99aa 00ff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffffff CHROMA=00ff00
PALETTE=000000 008800 886611 cc9933 eebb44 dd6666 ff99aa 00ff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffff00 ffffff
SPRITES=SpriteBank SPRITES=SpriteBank
all: $(PGM) loader all: $(PGM) loader
@ -46,7 +47,7 @@ clean:
.PHONY: art .PHONY: art
art: art:
$(MRSPRITE) CODE "Art/*.gif" $(PALETTE) $(MRSPRITE) CODE "Art/*.gif" $(CHROMA) $(PALETTE)
$(MRSPRITE) BANK "Art/*.txt" $(SPRITES) $(MRSPRITE) BANK "Art/*.txt" $(SPRITES)
mv Art/$(SPRITES)00.bin . mv Art/$(SPRITES)00.bin .
./MerlinToCA65.sh Art/$(SPRITES)Src.txt > spritebank.s ./MerlinToCA65.sh Art/$(SPRITES)Src.txt > spritebank.s

View File

@ -8,7 +8,9 @@ KBD = $e0c000
KBDSTROBE = $e0c010 KBDSTROBE = $e0c010
COUT = $fded COUT = $fded
VRAM = $e12000 VRAM = $e12000
SHADOWVRAM = $012000
VRAMBANK = $e10000 VRAMBANK = $e10000
SHADOWVRAMBANK = $010000
PRODOS = $bf00 ; MLI entry point PRODOS = $bf00 ; MLI entry point
PRODOSRETURN = $300 ; Indirect jump to get back to ProDOS from any bank PRODOSRETURN = $300 ; Indirect jump to get back to ProDOS from any bank

View File

@ -43,6 +43,8 @@ beginGameplay:
ldy #0 ldy #0
jsr renderPlayerHeader jsr renderPlayerHeader
jsr protectPlayers
gameplayLoop: gameplayLoop:
jsr syncVBL jsr syncVBL
@ -54,7 +56,6 @@ gameplayLoop:
stz terrainDirty stz terrainDirty
; Render players ; Render players
jsr unrenderPlayers
jsr renderPlayers jsr renderPlayers
gameplayLoopKbd: gameplayLoopKbd:
@ -168,6 +169,7 @@ scrollMap:
lda #$ffff lda #$ffff
sta mapScrollRequested sta mapScrollRequested
jsr protectPlayers
lda #1 lda #1
sta terrainDirty sta terrainDirty
rts rts

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -207,6 +207,25 @@ renderPlayers:
rts rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; protectPlayers
;
;
protectPlayers:
SAVE_AXY
VRAM_PTR playerData
lda #playerData+GO_BACKGROUND
jsr protectGameObject
VRAM_PTR playerData+PD_SIZE
lda #playerData+GO_BACKGROUND+PD_SIZE
jsr protectGameObject
RESTORE_AXY
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; unrenderPlayers ; unrenderPlayers
; ;