mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2024-12-29 09:33:23 +00:00
Merge pull request #10 from lscharen/add-fill-and-refresh
Add fill and refresh
This commit is contained in:
commit
a8fe848f04
@ -9,8 +9,6 @@
|
||||
use EDS.GSOS.Macs
|
||||
use GTE.Macs
|
||||
|
||||
use ../../src/Defs.s
|
||||
|
||||
mx %00
|
||||
|
||||
TSZelda EXT ; tileset buffer
|
||||
@ -292,9 +290,10 @@ HERO_SPRITE equ SPRITE_16X16+1
|
||||
:10 cmp #$0A
|
||||
bne :11
|
||||
dec ScreenY
|
||||
brl :next
|
||||
|
||||
:11 cmp #'y'
|
||||
bne :next
|
||||
bne :12
|
||||
lda DTile
|
||||
inc
|
||||
and #$007F
|
||||
@ -302,6 +301,17 @@ HERO_SPRITE equ SPRITE_16X16+1
|
||||
pha
|
||||
pea $0000
|
||||
_GTECopyTileToDynamic
|
||||
brl :next
|
||||
|
||||
:12 cmp #'f'
|
||||
bne :13
|
||||
pea $0000
|
||||
_GTEFillTileStore
|
||||
brl :next
|
||||
|
||||
:13 cmp #'m'
|
||||
bne :next
|
||||
_GTERefresh
|
||||
|
||||
:next
|
||||
; inc ScreenX
|
||||
|
@ -105,6 +105,12 @@ _GTEClearOverlay MAC
|
||||
_GTEGetTileDataAddr MAC
|
||||
UserTool $2400+GTEToolNum
|
||||
<<<
|
||||
_GTEFillTileStore MAC
|
||||
UserTool $2500+GTEToolNum
|
||||
<<<
|
||||
_GTERefresh MAC
|
||||
UserTool $2600+GTEToolNum
|
||||
<<<
|
||||
|
||||
; EngineMode definitions
|
||||
; Script definition
|
||||
|
43
src/Tool.s
43
src/Tool.s
@ -88,6 +88,8 @@ _CallTable
|
||||
adrl _TSClearOverlay-1
|
||||
|
||||
adrl _TSGetTileDataAddr-1
|
||||
adrl _TSFillTileStore-1
|
||||
adrl _TSRefresh-1
|
||||
_CTEnd
|
||||
_GTEAddSprite MAC
|
||||
UserTool $1000+GTEToolNum
|
||||
@ -663,6 +665,47 @@ _TSGetTileDataAddr
|
||||
|
||||
_TSExit #0;#0
|
||||
|
||||
; FillTileStore(tileId)
|
||||
_TSFillTileStore
|
||||
:tileId equ FirstParam+0
|
||||
|
||||
_TSEntry
|
||||
|
||||
stz tmp0
|
||||
:oloop
|
||||
stz tmp1
|
||||
:iloop
|
||||
ldx tmp1
|
||||
ldy tmp0
|
||||
lda :tileId,s
|
||||
jsr _SetTile
|
||||
|
||||
lda tmp1
|
||||
inc
|
||||
sta tmp1
|
||||
cmp #TILE_STORE_WIDTH
|
||||
bcc :iloop
|
||||
|
||||
lda tmp0
|
||||
inc
|
||||
sta tmp0
|
||||
cmp #TILE_STORE_HEIGHT
|
||||
bcc :oloop
|
||||
|
||||
_TSExit #0;#2
|
||||
|
||||
; _TSRefresh()
|
||||
_TSRefresh
|
||||
_TSEntry
|
||||
|
||||
ldx #TILE_STORE_SIZE-2
|
||||
:loop jsr _PushDirtyTileX
|
||||
dex
|
||||
dex
|
||||
bpl :loop
|
||||
|
||||
_TSExit #0;#0
|
||||
|
||||
; Insert the GTE code
|
||||
|
||||
put Math.s
|
||||
|
Loading…
Reference in New Issue
Block a user