mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2024-11-25 15:32:59 +00:00
Comment cleanup and minro refactoring
This commit is contained in:
parent
515ec5280b
commit
869d80af1e
20
src/Tiles.s
20
src/Tiles.s
@ -428,22 +428,22 @@ UserHook1 rtl
|
||||
; A = Table proc index
|
||||
;
|
||||
; see TileProcTables in static/TileStore.s
|
||||
tblPtr equ blttmp
|
||||
_SetTileProcs
|
||||
:tblPtr equ blttmp
|
||||
|
||||
; Multiple the proc index by 6 to get the correct table entry offset
|
||||
|
||||
asl
|
||||
sta tblPtr
|
||||
sta :tblPtr
|
||||
asl
|
||||
adc tblPtr
|
||||
sta tblPtr
|
||||
adc :tblPtr
|
||||
sta :tblPtr
|
||||
|
||||
; Add this offset to the base table address
|
||||
|
||||
tya
|
||||
adc tblPtr
|
||||
sta tblPtr
|
||||
adc :tblPtr
|
||||
sta :tblPtr
|
||||
|
||||
; Set the pointer to this bank
|
||||
|
||||
@ -451,20 +451,20 @@ _SetTileProcs
|
||||
phk
|
||||
pla
|
||||
and #$00FF
|
||||
sta tblPtr+2
|
||||
sta :tblPtr+2
|
||||
|
||||
; Lookup the tile procedures
|
||||
|
||||
ldy #0
|
||||
lda [tblPtr],y
|
||||
lda [:tblPtr],y
|
||||
stal K_TS_BASE_TILE_DISP,x
|
||||
|
||||
ldy #2
|
||||
lda [tblPtr],y
|
||||
lda [:tblPtr],y
|
||||
stal K_TS_SPRITE_TILE_DISP,x
|
||||
|
||||
ldy #4
|
||||
lda [tblPtr],y
|
||||
lda [:tblPtr],y
|
||||
stal K_TS_ONE_SPRITE,x
|
||||
rts
|
||||
|
||||
|
@ -746,6 +746,7 @@ _TSSetOverlay
|
||||
|
||||
_TSExit #0;#8
|
||||
|
||||
; UpdateOverlay(top, bottom, proc)
|
||||
_TSUpdateOverlay
|
||||
:proc equ FirstParam+0
|
||||
:bottom equ FirstParam+4
|
||||
|
@ -240,14 +240,14 @@ epilogue_1 tsc
|
||||
; its passed state, because having the carry bit clear prevents evaluation of
|
||||
; the V bit.
|
||||
;
|
||||
; Version 2: In order to improve performance, especially for two-layer tiles + sprites, the
|
||||
; snippet code was revised to have a fixed structure so that the constant DATA and
|
||||
; MASK values always exist in the same location, regarless of the tile type. The
|
||||
; tradeoff is that there is a different entry point into the snippet based on the
|
||||
; tile type, but that is significantly cheaper to lookup and patch into the code
|
||||
; field JMP instruction than it is to rebuild 20+ bytes of code each time.
|
||||
; In order to improve performance, especially for two-layer tiles + sprites, the
|
||||
; snippet code has a fixed structure so that the constant DATA and MASK values
|
||||
; always exist in the same location, regarless of the tile type. The
|
||||
; tradeoff is that there is a different entry point into the snippet based on the
|
||||
; tile type, but that is significantly cheaper to lookup and patch into the code
|
||||
; field JMP instruction than it is to rebuild 20+ bytes of code each time.
|
||||
;
|
||||
; There are different snippet templates + offset tables based on the EngineMode
|
||||
; There are different snippet templates + offset tables based on the EngineMode
|
||||
;
|
||||
; EngineMode
|
||||
;
|
||||
|
@ -286,7 +286,7 @@ DynamicOverTwoLyr
|
||||
; tile blitter in the TwoLayer function set sees that a tile is marked as DAMAGED, it must
|
||||
; restore the original code structure before proceeding.
|
||||
;
|
||||
; The damages area is not too bad -- just the 10 bytes from [2, 10] are overwritten and must be
|
||||
; The damaged area is not too bad -- just the 10 bytes from [2, 10] are overwritten and must be
|
||||
; restored. This is actually less work than a lot of the snippet macros were doing before
|
||||
; applying the fixed snippet optimization.
|
||||
DynamicUnderTwoLyr
|
||||
|
Loading…
Reference in New Issue
Block a user