mirror of
https://github.com/blondie7575/GSCats.git
synced 2025-02-27 05:29:23 +00:00
Added single step and debug bounds
This commit is contained in:
parent
564f6afc3b
commit
b9a6f06270
@ -63,6 +63,15 @@ beginGameplay:
|
||||
jsr clipTerrain
|
||||
; jsl renderTerrainSpans ; Part of the now disabled fill-mode renderer
|
||||
|
||||
; lda #7
|
||||
; sta PARAML0
|
||||
; lda #50
|
||||
; sta PARAML1
|
||||
; ldy #3
|
||||
; jsr craterTerrain
|
||||
; jsr compileTerrain
|
||||
; jsr clipTerrain
|
||||
|
||||
gameplayLoop:
|
||||
jsr kbdScan
|
||||
; BORDER_COLOR #$F
|
||||
@ -164,6 +173,12 @@ gameplayEndTurnCondition:
|
||||
jsr endTurn
|
||||
|
||||
gameplayLoopEndFrame:
|
||||
lda singleStep
|
||||
beq gameplayLoopEndFrameCont
|
||||
lda #1
|
||||
sta paused
|
||||
|
||||
gameplayLoopEndFrameCont:
|
||||
lda quitRequested
|
||||
beq gameplayLoopContinue
|
||||
jmp quitGame
|
||||
@ -228,12 +243,15 @@ trackActiveShotDone:
|
||||
; Handles changing the active player
|
||||
;
|
||||
endTurn:
|
||||
lda currentPlayer
|
||||
inc
|
||||
cmp #NUMPLAYERS
|
||||
beq endTurnWrap
|
||||
lda #0 ; HAAAAX
|
||||
sta currentPlayer
|
||||
|
||||
; lda currentPlayer
|
||||
; inc
|
||||
; cmp #NUMPLAYERS
|
||||
; beq endTurnWrap
|
||||
; sta currentPlayer
|
||||
|
||||
endTurnRefresh:
|
||||
jsr processTurnForProjectiles
|
||||
|
||||
@ -386,6 +404,8 @@ projectileActive:
|
||||
.word -1 ; Y offset of active shot
|
||||
paused:
|
||||
.word 0
|
||||
singleStep:
|
||||
.word 0
|
||||
globalWind:
|
||||
.word 0 ; 12.4 velocity
|
||||
|
||||
@ -399,3 +419,4 @@ mapScrollPos:
|
||||
; .word 0
|
||||
rightScreenEdge:
|
||||
.word 160-GAMEOBJECTWIDTH/4-1
|
||||
|
||||
|
14
gameobject.s
14
gameobject.s
@ -59,7 +59,7 @@ placeGameObjectOnTerrain:
|
||||
; vramPtr
|
||||
;
|
||||
; PARAML0 = Pointer to X,Y (16 bits each)
|
||||
; X => Offset to upper left corner of VRAM, or -1 if offscreen
|
||||
; X => Offset to upper left corner of VRAM, or ffff if offscreen
|
||||
;
|
||||
; Trashes SCRATCHL
|
||||
;
|
||||
@ -100,7 +100,7 @@ vramPtr:
|
||||
bra vramPtrDone
|
||||
|
||||
vramPtrSkip:
|
||||
ldx #-1
|
||||
ldx #$ffff
|
||||
|
||||
vramPtrDone:
|
||||
RESTORE_AY
|
||||
@ -120,14 +120,20 @@ renderGameObject:
|
||||
|
||||
; Find gameobject location in video memory
|
||||
jsr vramPtr
|
||||
cpx #0
|
||||
bmi renderGameobjectDone
|
||||
cpx #$ffff
|
||||
beq renderGameobjectDone
|
||||
|
||||
; Call compiled sprite code
|
||||
txy
|
||||
SAVE_AXY ; DEBUG BOUNDS RENDER
|
||||
clc
|
||||
jsr DrawSpriteBank
|
||||
|
||||
RESTORE_AXY ; DEBUG BOUNDS RENDER
|
||||
lda #11 ; DEBUG BOUNDS RENDER
|
||||
clc ; DEBUG BOUNDS RENDER
|
||||
jsr DrawSpriteBank ; DEBUG BOUNDS RENDER
|
||||
|
||||
renderGameobjectDone:
|
||||
RESTORE_XY
|
||||
rts
|
||||
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
9
input.s
9
input.s
@ -38,6 +38,8 @@ kbdScan:
|
||||
beq kbdScanESC
|
||||
cmp #(127 + $80)
|
||||
beq kbdScanDEL
|
||||
cmp #('=' + $80)
|
||||
beq kbdScanEquals
|
||||
cmp #(9 + $80)
|
||||
beq kbdScanTab
|
||||
|
||||
@ -115,6 +117,13 @@ kbdScanDEL:
|
||||
sta paused
|
||||
rts
|
||||
|
||||
kbdScanEquals:
|
||||
BITS16
|
||||
lda #1
|
||||
sta singleStep
|
||||
stz paused
|
||||
rts
|
||||
|
||||
kbdScanTab:
|
||||
BITS16
|
||||
ldy currentPlayer
|
||||
|
Loading…
x
Reference in New Issue
Block a user