Update some demos to match new behaviors

This commit is contained in:
Lucas Scharenbroich 2023-03-06 14:39:38 -06:00
parent 5697737a93
commit 4bfdeae6aa
4 changed files with 68 additions and 11 deletions

View File

@ -202,9 +202,6 @@ HERO_SLOT equ 1
pei PlayerY2 pei PlayerY2
_GTEAddSprite _GTEAddSprite
pea #RENDER_WITH_SHADOWING
_GTERender
EvtLoop EvtLoop
pha pha
_GTEReadControl _GTEReadControl
@ -280,7 +277,8 @@ do_render
pha pha
_GTEMoveSprite ; Move the sprite to this local position _GTEMoveSprite ; Move the sprite to this local position
pea #RENDER_WITH_SHADOWING ; pea #RENDER_WITH_SHADOWING
pea $0000
_GTERender _GTERender
; Update the performance counters ; Update the performance counters

View File

@ -172,16 +172,64 @@ HERO_SLOT_2 equ 2
pea HERO_VBUFF_4 pea HERO_VBUFF_4
_GTECreateSpriteStamp _GTECreateSpriteStamp
pea HERO_SLOT_1 ; Put the player in slot 1 DO 0
pea HERO_FLAGS lda #SPRITE_16X16
sta SpriteFlags1
lda #SPRITE_16X8
sta SpriteFlags2
ELSE
lda #SPRITE_16X16+SPRITE_COMPILED
sta SpriteFlags1
lda #SPRITE_16X8+SPRITE_COMPILED
sta SpriteFlags2
pha ; Space for result
pea HERO_SIZE
pea HERO_VBUFF_1 pea HERO_VBUFF_1
_GTECompileSpriteStamp
pla
sta HeroFrames1+2
sta HeroFrames1+6
pha ; Space for result
pea HERO_SIZE
pea HERO_VBUFF_2
_GTECompileSpriteStamp
pla
sta HeroFrames1+0
sta HeroFrames1+4
pha ; Space for result
pea HERO_SIZE
pea HERO_VBUFF_3
_GTECompileSpriteStamp
pla
sta HeroFrames2+2
sta HeroFrames2+6
pha ; Space for result
pea HERO_SIZE
pea HERO_VBUFF_4
_GTECompileSpriteStamp
pla
sta HeroFrames2+0
sta HeroFrames2+4
FIN
pea HERO_SLOT_1 ; Put the player in slot 1
lda SpriteFlags1
pha
lda HeroFrames1
pha
pei PlayerX pei PlayerX
pei PlayerY pei PlayerY
_GTEAddSprite _GTEAddSprite
pea HERO_SLOT_2 pea HERO_SLOT_2
pea HERO_FLAGS lda SpriteFlags2
pea HERO_VBUFF_2 pha
lda HeroFrames2
pha
pei PlayerX pei PlayerX
lda PlayerY lda PlayerY
clc clc
@ -294,7 +342,9 @@ do_render
pha pha
_GTESetBG1Origin _GTESetBG1Origin
pea #RENDER_BG1_HORZ_OFFSET ; pea #RENDER_BG1_HORZ_OFFSET
pea #RENDER_WITH_SHADOWING
; pea #0
_GTERender _GTERender
; Update the performance counters ; Update the performance counters
@ -525,6 +575,10 @@ Fatal brk $00
qtRec adrl $0000 qtRec adrl $0000
da $00 da $00
; Sprite VBUFF / Compile tokens
SpriteFlags1 ds 2
SpriteFlags2 ds 2
; Color palette ; Color palette
MyDirectPage ds 2 MyDirectPage ds 2

View File

@ -301,9 +301,12 @@ DoLoadBG1
ldx #BG1AltDataFile ldx #BG1AltDataFile
jsr LoadFile jsr LoadFile
lda altBG1Bank
jsl SetBG1Bank
ldx BankLoad ldx BankLoad
lda #0 lda #0
ldy BG1AltBank ldy BG1DataBank
jsl CopyBinToBG1 jsl CopyBinToBG1
rts rts

View File

@ -105,7 +105,7 @@ InitOverlay
ldx #r_line+{CHAR_WIDTH*4} ldx #r_line+{CHAR_WIDTH*4}
jsr _DrawChar jsr _DrawChar
pea $0000 pea $0000 ; logical lines for the overlay bar
pea $0008 pea $0008
pea #^StatusBar pea #^StatusBar
pea #StatusBar pea #StatusBar
@ -174,6 +174,8 @@ oneSecondCounter ds 2
; Draw the overlay ; Draw the overlay
; A = address of the left edge of the screen ; A = address of the left edge of the screen
; X = top line to start drawing the overlay (typically 0)
; Y = bottom line to stop drawing the overlayer (typically the overlay height set during call to _SetOverlay)
StatusBar phb ; Called via JSL StatusBar phb ; Called via JSL
phd ; save the direct page register phd ; save the direct page register