mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-11-24 04:30:48 +00:00
Basic rendering of projectiles
- Added gravity - Physics now 8.8 instead of 12.4 fixed point
This commit is contained in:
parent
e0c968eb48
commit
3e99f10ec7
@ -7,7 +7,7 @@ import math
|
||||
def twosCompliment(value):
|
||||
return (value^65535)+1
|
||||
|
||||
def toFixed(flt): # Floating point to 12.4 fixed point
|
||||
def toFixed124(flt): # Floating point to 12.4 fixed point
|
||||
whole = max(-2048, min(2047, math.trunc(flt))) # Clamp to signed range
|
||||
frac = abs(flt)%1
|
||||
binary = (abs(whole)<<4) + math.trunc(16*frac)
|
||||
@ -18,6 +18,17 @@ def toFixed(flt): # Floating point to 12.4 fixed point
|
||||
return binary
|
||||
|
||||
|
||||
def toFixed88(flt): # Floating point to 8.8 fixed point
|
||||
whole = max(-128, min(127, math.trunc(flt))) # Clamp to signed range
|
||||
frac = abs(flt)%1
|
||||
binary = (abs(whole)<<8) + math.trunc(256*frac)
|
||||
|
||||
if (flt<0 and abs(flt)>0.0037):
|
||||
binary = twosCompliment(binary)
|
||||
|
||||
return binary
|
||||
|
||||
|
||||
def main(argv):
|
||||
|
||||
print ("sineTable:\t\t; 8.8 fixed point",end="")
|
||||
@ -34,7 +45,7 @@ def main(argv):
|
||||
print (",", end="")
|
||||
|
||||
|
||||
print ("\n\nangleToVectorX:\t\t; 12.4 fixed point, counterclockwise angle, +x=(1,0)",end="")
|
||||
print ("\n\nangleToVectorX:\t\t; 8.8 fixed point, counterclockwise angle, +x=(1,0)",end="")
|
||||
rowCount = 11
|
||||
|
||||
for v in range(0,360):
|
||||
@ -43,12 +54,12 @@ def main(argv):
|
||||
print ("\n\t.word ", end="")
|
||||
rowCount=0
|
||||
|
||||
print ("$%04x" % toFixed(math.cos(math.radians(v))), end="")
|
||||
print ("$%04x" % toFixed88(math.cos(math.radians(v))), end="")
|
||||
if (rowCount<11):
|
||||
print (",", end="")
|
||||
|
||||
|
||||
print ("\n\nangleToVectorY:\t\t; 12.4 fixed point, counterclockwise angle, +x=(1,0)",end="")
|
||||
print ("\n\nangleToVectorY:\t\t; 8.8 fixed point, counterclockwise angle, +x=(1,0)",end="")
|
||||
rowCount = 11
|
||||
|
||||
for v in range(0,360):
|
||||
@ -57,7 +68,7 @@ def main(argv):
|
||||
print ("\n\t.word ", end="")
|
||||
rowCount=0
|
||||
|
||||
print ("$%04x" % toFixed(math.sin(math.radians(v))), end="")
|
||||
print ("$%04x" % toFixed88(math.sin(math.radians(v))), end="")
|
||||
if (rowCount<11):
|
||||
print (",", end="")
|
||||
|
||||
|
@ -64,7 +64,9 @@ gameplayLoopFire:
|
||||
jsr fire
|
||||
|
||||
gameplayLoopProjectiles:
|
||||
jsr unrenderProjectiles
|
||||
jsr updateProjectiles
|
||||
jsr renderProjectiles
|
||||
|
||||
gameplayLoopEndFrame:
|
||||
|
||||
|
62
gameobject.s
62
gameobject.s
@ -74,3 +74,65 @@ renderGameobject:
|
||||
renderGameobjectDone:
|
||||
RESTORE_AXY
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; unrenderGameobject
|
||||
;
|
||||
; PARAML0 = Pointer to gameobject data
|
||||
;
|
||||
unrenderGameobject:
|
||||
SAVE_AXY
|
||||
|
||||
; Find gameobject location in video memory
|
||||
ldy #0
|
||||
|
||||
; X
|
||||
lda (PARAML0),y
|
||||
lsr
|
||||
sec
|
||||
sbc leftScreenEdge
|
||||
bmi unrenderGameobjectDone ; Gameobject is off left edge of screen
|
||||
cmp #320 - GAMEOBJECTWIDTH
|
||||
bpl unrenderGameobjectDone ; Gameobject is off right edge of screen
|
||||
sta SCRATCHL
|
||||
|
||||
; Y
|
||||
iny
|
||||
iny
|
||||
sec
|
||||
lda #200
|
||||
sbc (PARAML0),y
|
||||
bmi unrenderGameobjectDone ; Gameobject is off top edge of screen
|
||||
cmp #200 - GAMEOBJECTHEIGHT
|
||||
bpl unrenderGameobjectDone ; Gameobject is off bottom edge of screen
|
||||
|
||||
asl
|
||||
tax
|
||||
lda vramYOffset,x
|
||||
clc
|
||||
adc SCRATCHL
|
||||
tax
|
||||
|
||||
; X now contains the VRAM offset of the upper left corner
|
||||
lda #$0000
|
||||
sta VRAM,x
|
||||
sta VRAM+2,x
|
||||
sta VRAM+160,x
|
||||
sta VRAM+160+2,x
|
||||
sta VRAM+160*2,x
|
||||
sta VRAM+160*2+2,x
|
||||
sta VRAM+160*3,x
|
||||
sta VRAM+160*3+2,x
|
||||
sta VRAM+160*4,x
|
||||
sta VRAM+160*4+2,x
|
||||
sta VRAM+160*5,x
|
||||
sta VRAM+160*5+2,x
|
||||
sta VRAM+160*6,x
|
||||
sta VRAM+160*6+2,x
|
||||
sta VRAM+160*7,x
|
||||
sta VRAM+160*7+2,x
|
||||
|
||||
unrenderGameobjectDone:
|
||||
RESTORE_AXY
|
||||
rts
|
||||
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
2
gscats.s
2
gscats.s
@ -19,7 +19,7 @@ mainBank2:
|
||||
|
||||
; Set up SCBs
|
||||
jsr initSCBs
|
||||
;SHRVIDEO
|
||||
SHRVIDEO
|
||||
|
||||
jmp beginGameplay
|
||||
|
||||
|
2
player.s
2
player.s
@ -71,6 +71,8 @@ playerFire:
|
||||
lda playerData+PD_POSX,y
|
||||
sta projectileParams
|
||||
lda playerData+PD_POSY,y
|
||||
clc
|
||||
adc #GAMEOBJECTHEIGHT
|
||||
sta projectileParams+2
|
||||
lda playerData+PD_ANGLE,y
|
||||
sta projectileParams+4
|
||||
|
120
projectile.s
120
projectile.s
@ -13,8 +13,10 @@ projectileData:
|
||||
|
||||
.word 0 ; Pos X (12.4 fixed point)
|
||||
.word 0 ; Pos Y (12.4 fixed point)
|
||||
.word 0 ; Velocity X (12.4 fixed point)
|
||||
.word 0 ; Velocity Y (12.4 fixed point)
|
||||
.word 0 ; Velocity X (8.8 fixed point)
|
||||
.word 0 ; Velocity Y (8.8 fixed point)
|
||||
|
||||
.word 0,0 ; Padding
|
||||
|
||||
JD_POSX = 0 ; Byte offsets into projectile data structure
|
||||
JD_POSY = 2
|
||||
@ -23,6 +25,19 @@ JD_PRECISEY = 6
|
||||
JD_VX = 8
|
||||
JD_VY = 10
|
||||
|
||||
GRAVITY = $ffff ; 8.8 fixed point
|
||||
|
||||
|
||||
.macro PROJECTILEPTR_Y
|
||||
tya ; Pointer to projectil structure from index
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
tay
|
||||
.endmacro
|
||||
|
||||
|
||||
|
||||
projectileParams:
|
||||
.word 0 ; Starting pos X
|
||||
@ -75,7 +90,6 @@ fireProjectile:
|
||||
asl
|
||||
tax
|
||||
lda angleToVectorX,x ; Velocity X
|
||||
|
||||
sta (SCRATCHL),y
|
||||
iny
|
||||
iny
|
||||
@ -96,14 +110,29 @@ fireProjectile:
|
||||
; Trashes SCRATCHL
|
||||
;
|
||||
updateProjectiles:
|
||||
SAVE_AXY
|
||||
SAVE_AY
|
||||
lda projectileData+JD_POSX
|
||||
bmi updateProjectilesDone
|
||||
|
||||
; Integrate X velocity over position
|
||||
lda projectileData+JD_PRECISEX
|
||||
; Integrate gravity over velocity
|
||||
lda projectileData+JD_VY
|
||||
clc
|
||||
adc projectileData+JD_VX
|
||||
adc #GRAVITY
|
||||
sta projectileData+JD_VY
|
||||
|
||||
; Integrate X velocity over position
|
||||
lda projectileData+JD_VX
|
||||
; Convert 8.8 to 12.4
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
clc
|
||||
adc projectileData+JD_PRECISEX
|
||||
sta projectileData+JD_PRECISEX
|
||||
|
||||
; Convert to integral for rendering
|
||||
@ -112,11 +141,23 @@ updateProjectiles:
|
||||
lsr
|
||||
lsr
|
||||
sta projectileData+JD_POSX
|
||||
bmi updateProjectilesDelete
|
||||
cmp #TERRAINWIDTH-GAMEOBJECTWIDTH-1
|
||||
bpl updateProjectilesDelete
|
||||
|
||||
; Integrate Y velocity over position
|
||||
lda projectileData+JD_PRECISEY
|
||||
lda projectileData+JD_VY
|
||||
; Convert 8.8 to 12.4
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
cmp #$8000
|
||||
ror
|
||||
clc
|
||||
adc projectileData+JD_VY
|
||||
adc projectileData+JD_PRECISEY
|
||||
sta projectileData+JD_PRECISEY
|
||||
|
||||
; Convert to integral for rendering
|
||||
@ -125,7 +166,64 @@ updateProjectiles:
|
||||
lsr
|
||||
lsr
|
||||
sta projectileData+JD_POSY
|
||||
brk
|
||||
bmi updateProjectilesDelete
|
||||
cmp #201
|
||||
bpl updateProjectilesDelete
|
||||
|
||||
updateProjectilesDone:
|
||||
RESTORE_AXY
|
||||
RESTORE_AY
|
||||
rts
|
||||
|
||||
updateProjectilesDelete:
|
||||
ldy #0
|
||||
jsr deleteProjectile
|
||||
bra updateProjectilesDone
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; deleteProjectile
|
||||
;
|
||||
; Y = Projectile index
|
||||
; Trashes A
|
||||
;
|
||||
deleteProjectile:
|
||||
PROJECTILEPTR_Y
|
||||
lda #-1
|
||||
sta projectileData+JD_POSX,y
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; renderProjectiles
|
||||
;
|
||||
;
|
||||
renderProjectiles:
|
||||
pha
|
||||
lda projectileData
|
||||
bmi renderProjectilesDone
|
||||
|
||||
lda #projectileData
|
||||
sta PARAML0
|
||||
jsr renderGameobject
|
||||
|
||||
renderProjectilesDone:
|
||||
pla
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; unrenderProjectiles
|
||||
;
|
||||
;
|
||||
unrenderProjectiles:
|
||||
pha
|
||||
lda projectileData
|
||||
bmi unrenderProjectilesDone
|
||||
|
||||
lda #projectileData
|
||||
sta PARAML0
|
||||
jsr unrenderGameobject
|
||||
|
||||
unrenderProjectilesDone:
|
||||
pla
|
||||
rts
|
||||
|
124
tables.s
124
tables.s
@ -64,69 +64,69 @@ sineTable: ; 8.8 fixed point
|
||||
.word $004f,$0051,$0054,$0057,$005a,$005d,$0060,$0063
|
||||
.word $0067,$006a,$006d,$0070,$0073,$0076,$0079,$007c
|
||||
|
||||
angleToVectorX: ; 12.4 fixed point, counterclockwise angle, +x=(1,0)
|
||||
.word $0010,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000e,$000e,$000e
|
||||
.word $000e,$000e,$000e,$000e,$000e,$000d,$000d,$000d,$000d,$000d,$000d,$000d
|
||||
.word $000c,$000c,$000c,$000c,$000c,$000c,$000b,$000b,$000b,$000b,$000b,$000a
|
||||
.word $000a,$000a,$000a,$000a,$0009,$0009,$0009,$0009,$0008,$0008,$0008,$0008
|
||||
.word $0008,$0007,$0007,$0007,$0007,$0006,$0006,$0006,$0005,$0005,$0005,$0005
|
||||
.word $0004,$0004,$0004,$0004,$0003,$0003,$0003,$0003,$0002,$0002,$0002,$0001
|
||||
.word $0001,$0001,$0001,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$ffff,$ffff
|
||||
.word $ffff,$ffff,$fffe,$fffe,$fffe,$fffd,$fffd,$fffd,$fffd,$fffc,$fffc,$fffc
|
||||
.word $fffc,$fffb,$fffb,$fffb,$fffb,$fffa,$fffa,$fffa,$fff9,$fff9,$fff9,$fff9
|
||||
.word $fff9,$fff8,$fff8,$fff8,$fff8,$fff7,$fff7,$fff7,$fff7,$fff6,$fff6,$fff6
|
||||
.word $fff6,$fff6,$fff5,$fff5,$fff5,$fff5,$fff5,$fff4,$fff4,$fff4,$fff4,$fff4
|
||||
.word $fff4,$fff3,$fff3,$fff3,$fff3,$fff3,$fff3,$fff3,$fff2,$fff2,$fff2,$fff2
|
||||
.word $fff2,$fff2,$fff2,$fff2,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff0,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff2,$fff2,$fff2
|
||||
.word $fff2,$fff2,$fff2,$fff2,$fff2,$fff3,$fff3,$fff3,$fff3,$fff3,$fff3,$fff3
|
||||
.word $fff4,$fff4,$fff4,$fff4,$fff4,$fff4,$fff5,$fff5,$fff5,$fff5,$fff5,$fff6
|
||||
.word $fff6,$fff6,$fff6,$fff6,$fff7,$fff7,$fff7,$fff7,$fff8,$fff8,$fff8,$fff8
|
||||
.word $fff8,$fff9,$fff9,$fff9,$fff9,$fffa,$fffa,$fffa,$fffb,$fffb,$fffb,$fffb
|
||||
.word $fffc,$fffc,$fffc,$fffc,$fffd,$fffd,$fffd,$fffd,$fffe,$fffe,$fffe,$ffff
|
||||
.word $ffff,$ffff,$ffff,$0000,$0000,$0000,$0000,$0000,$0000,$0000,$0001,$0001
|
||||
.word $0001,$0001,$0002,$0002,$0002,$0003,$0003,$0003,$0003,$0004,$0004,$0004
|
||||
.word $0004,$0005,$0005,$0005,$0005,$0006,$0006,$0006,$0007,$0007,$0007,$0007
|
||||
.word $0008,$0008,$0008,$0008,$0008,$0009,$0009,$0009,$0009,$000a,$000a,$000a
|
||||
.word $000a,$000a,$000b,$000b,$000b,$000b,$000b,$000c,$000c,$000c,$000c,$000c
|
||||
.word $000c,$000d,$000d,$000d,$000d,$000d,$000d,$000d,$000e,$000e,$000e,$000e
|
||||
.word $000e,$000e,$000e,$000e,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f
|
||||
angleToVectorX: ; 8.8 fixed point, counterclockwise angle, +x=(1,0)
|
||||
.word $0100,$00ff,$00ff,$00ff,$00ff,$00ff,$00fe,$00fe,$00fd,$00fc,$00fc,$00fb
|
||||
.word $00fa,$00f9,$00f8,$00f7,$00f6,$00f4,$00f3,$00f2,$00f0,$00ee,$00ed,$00eb
|
||||
.word $00e9,$00e8,$00e6,$00e4,$00e2,$00df,$00dd,$00db,$00d9,$00d6,$00d4,$00d1
|
||||
.word $00cf,$00cc,$00c9,$00c6,$00c4,$00c1,$00be,$00bb,$00b8,$00b5,$00b1,$00ae
|
||||
.word $00ab,$00a7,$00a4,$00a1,$009d,$009a,$0096,$0092,$008f,$008b,$0087,$0083
|
||||
.word $0080,$007c,$0078,$0074,$0070,$006c,$0068,$0064,$005f,$005b,$0057,$0053
|
||||
.word $004f,$004a,$0046,$0042,$003d,$0039,$0035,$0030,$002c,$0028,$0023,$001f
|
||||
.word $001a,$0016,$0011,$000d,$0008,$0004,$0000,$fffc,$fff8,$fff3,$ffef,$ffea
|
||||
.word $ffe6,$ffe1,$ffdd,$ffd8,$ffd4,$ffd0,$ffcb,$ffc7,$ffc3,$ffbe,$ffba,$ffb6
|
||||
.word $ffb1,$ffad,$ffa9,$ffa5,$ffa1,$ff9c,$ff98,$ff94,$ff90,$ff8c,$ff88,$ff84
|
||||
.word $ff81,$ff7d,$ff79,$ff75,$ff71,$ff6e,$ff6a,$ff66,$ff63,$ff5f,$ff5c,$ff59
|
||||
.word $ff55,$ff52,$ff4f,$ff4b,$ff48,$ff45,$ff42,$ff3f,$ff3c,$ff3a,$ff37,$ff34
|
||||
.word $ff31,$ff2f,$ff2c,$ff2a,$ff27,$ff25,$ff23,$ff21,$ff1e,$ff1c,$ff1a,$ff18
|
||||
.word $ff17,$ff15,$ff13,$ff12,$ff10,$ff0e,$ff0d,$ff0c,$ff0a,$ff09,$ff08,$ff07
|
||||
.word $ff06,$ff05,$ff04,$ff04,$ff03,$ff02,$ff02,$ff01,$ff01,$ff01,$ff01,$ff01
|
||||
.word $ff00,$ff01,$ff01,$ff01,$ff01,$ff01,$ff02,$ff02,$ff03,$ff04,$ff04,$ff05
|
||||
.word $ff06,$ff07,$ff08,$ff09,$ff0a,$ff0c,$ff0d,$ff0e,$ff10,$ff12,$ff13,$ff15
|
||||
.word $ff17,$ff18,$ff1a,$ff1c,$ff1e,$ff21,$ff23,$ff25,$ff27,$ff2a,$ff2c,$ff2f
|
||||
.word $ff31,$ff34,$ff37,$ff3a,$ff3c,$ff3f,$ff42,$ff45,$ff48,$ff4b,$ff4f,$ff52
|
||||
.word $ff55,$ff59,$ff5c,$ff5f,$ff63,$ff66,$ff6a,$ff6e,$ff71,$ff75,$ff79,$ff7d
|
||||
.word $ff80,$ff84,$ff88,$ff8c,$ff90,$ff94,$ff98,$ff9c,$ffa1,$ffa5,$ffa9,$ffad
|
||||
.word $ffb1,$ffb6,$ffba,$ffbe,$ffc3,$ffc7,$ffcb,$ffd0,$ffd4,$ffd8,$ffdd,$ffe1
|
||||
.word $ffe6,$ffea,$ffef,$fff3,$fff8,$fffc,$0000,$0004,$0008,$000d,$0011,$0016
|
||||
.word $001a,$001f,$0023,$0028,$002c,$0030,$0035,$0039,$003d,$0042,$0046,$004a
|
||||
.word $004f,$0053,$0057,$005b,$005f,$0064,$0068,$006c,$0070,$0074,$0078,$007c
|
||||
.word $0080,$0083,$0087,$008b,$008f,$0092,$0096,$009a,$009d,$00a1,$00a4,$00a7
|
||||
.word $00ab,$00ae,$00b1,$00b5,$00b8,$00bb,$00be,$00c1,$00c4,$00c6,$00c9,$00cc
|
||||
.word $00cf,$00d1,$00d4,$00d6,$00d9,$00db,$00dd,$00df,$00e2,$00e4,$00e6,$00e8
|
||||
.word $00e9,$00eb,$00ed,$00ee,$00f0,$00f2,$00f3,$00f4,$00f6,$00f7,$00f8,$00f9
|
||||
.word $00fa,$00fb,$00fc,$00fc,$00fd,$00fe,$00fe,$00ff,$00ff,$00ff,$00ff,$00ff
|
||||
|
||||
angleToVectorY: ; 12.4 fixed point, counterclockwise angle, +x=(1,0)
|
||||
.word $0000,$0000,$0000,$0000,$0001,$0001,$0001,$0001,$0002,$0002,$0002,$0003
|
||||
.word $0003,$0003,$0003,$0004,$0004,$0004,$0004,$0005,$0005,$0005,$0005,$0006
|
||||
.word $0006,$0006,$0007,$0007,$0007,$0007,$0007,$0008,$0008,$0008,$0008,$0009
|
||||
.word $0009,$0009,$0009,$000a,$000a,$000a,$000a,$000a,$000b,$000b,$000b,$000b
|
||||
.word $000b,$000c,$000c,$000c,$000c,$000c,$000c,$000d,$000d,$000d,$000d,$000d
|
||||
.word $000d,$000d,$000e,$000e,$000e,$000e,$000e,$000e,$000e,$000e,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000f,$000f,$000f,$0010,$000f,$000f,$000f,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f,$000f
|
||||
.word $000f,$000f,$000f,$000e,$000e,$000e,$000e,$000e,$000e,$000e,$000e,$000d
|
||||
.word $000d,$000d,$000d,$000d,$000d,$000d,$000c,$000c,$000c,$000c,$000c,$000c
|
||||
.word $000b,$000b,$000b,$000b,$000b,$000a,$000a,$000a,$000a,$000a,$0009,$0009
|
||||
.word $0009,$0009,$0008,$0008,$0008,$0008,$0007,$0007,$0007,$0007,$0007,$0006
|
||||
.word $0006,$0006,$0005,$0005,$0005,$0005,$0004,$0004,$0004,$0004,$0003,$0003
|
||||
.word $0003,$0003,$0002,$0002,$0002,$0001,$0001,$0001,$0001,$0000,$0000,$0000
|
||||
.word $0000,$0000,$0000,$0000,$ffff,$ffff,$ffff,$ffff,$fffe,$fffe,$fffe,$fffd
|
||||
.word $fffd,$fffd,$fffd,$fffc,$fffc,$fffc,$fffc,$fffb,$fffb,$fffb,$fffb,$fffa
|
||||
.word $fffa,$fffa,$fff9,$fff9,$fff9,$fff9,$fff8,$fff8,$fff8,$fff8,$fff8,$fff7
|
||||
.word $fff7,$fff7,$fff7,$fff6,$fff6,$fff6,$fff6,$fff6,$fff5,$fff5,$fff5,$fff5
|
||||
.word $fff5,$fff4,$fff4,$fff4,$fff4,$fff4,$fff4,$fff3,$fff3,$fff3,$fff3,$fff3
|
||||
.word $fff3,$fff3,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff0,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1,$fff1
|
||||
.word $fff1,$fff1,$fff1,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff2,$fff3
|
||||
.word $fff3,$fff3,$fff3,$fff3,$fff3,$fff3,$fff4,$fff4,$fff4,$fff4,$fff4,$fff4
|
||||
.word $fff5,$fff5,$fff5,$fff5,$fff5,$fff6,$fff6,$fff6,$fff6,$fff6,$fff7,$fff7
|
||||
.word $fff7,$fff7,$fff8,$fff8,$fff8,$fff8,$fff8,$fff9,$fff9,$fff9,$fff9,$fffa
|
||||
.word $fffa,$fffa,$fffb,$fffb,$fffb,$fffb,$fffc,$fffc,$fffc,$fffc,$fffd,$fffd
|
||||
.word $fffd,$fffd,$fffe,$fffe,$fffe,$ffff,$ffff,$ffff,$ffff,$0000,$0000,$0000
|
||||
angleToVectorY: ; 8.8 fixed point, counterclockwise angle, +x=(1,0)
|
||||
.word $0000,$0004,$0008,$000d,$0011,$0016,$001a,$001f,$0023,$0028,$002c,$0030
|
||||
.word $0035,$0039,$003d,$0042,$0046,$004a,$004f,$0053,$0057,$005b,$005f,$0064
|
||||
.word $0068,$006c,$0070,$0074,$0078,$007c,$007f,$0083,$0087,$008b,$008f,$0092
|
||||
.word $0096,$009a,$009d,$00a1,$00a4,$00a7,$00ab,$00ae,$00b1,$00b5,$00b8,$00bb
|
||||
.word $00be,$00c1,$00c4,$00c6,$00c9,$00cc,$00cf,$00d1,$00d4,$00d6,$00d9,$00db
|
||||
.word $00dd,$00df,$00e2,$00e4,$00e6,$00e8,$00e9,$00eb,$00ed,$00ee,$00f0,$00f2
|
||||
.word $00f3,$00f4,$00f6,$00f7,$00f8,$00f9,$00fa,$00fb,$00fc,$00fc,$00fd,$00fe
|
||||
.word $00fe,$00ff,$00ff,$00ff,$00ff,$00ff,$0100,$00ff,$00ff,$00ff,$00ff,$00ff
|
||||
.word $00fe,$00fe,$00fd,$00fc,$00fc,$00fb,$00fa,$00f9,$00f8,$00f7,$00f6,$00f4
|
||||
.word $00f3,$00f2,$00f0,$00ee,$00ed,$00eb,$00e9,$00e8,$00e6,$00e4,$00e2,$00df
|
||||
.word $00dd,$00db,$00d9,$00d6,$00d4,$00d1,$00cf,$00cc,$00c9,$00c6,$00c4,$00c1
|
||||
.word $00be,$00bb,$00b8,$00b5,$00b1,$00ae,$00ab,$00a7,$00a4,$00a1,$009d,$009a
|
||||
.word $0096,$0092,$008f,$008b,$0087,$0083,$007f,$007c,$0078,$0074,$0070,$006c
|
||||
.word $0068,$0064,$005f,$005b,$0057,$0053,$004f,$004a,$0046,$0042,$003d,$0039
|
||||
.word $0035,$0030,$002c,$0028,$0023,$001f,$001a,$0016,$0011,$000d,$0008,$0004
|
||||
.word $0000,$fffc,$fff8,$fff3,$ffef,$ffea,$ffe6,$ffe1,$ffdd,$ffd8,$ffd4,$ffd0
|
||||
.word $ffcb,$ffc7,$ffc3,$ffbe,$ffba,$ffb6,$ffb1,$ffad,$ffa9,$ffa5,$ffa1,$ff9c
|
||||
.word $ff98,$ff94,$ff90,$ff8c,$ff88,$ff84,$ff80,$ff7d,$ff79,$ff75,$ff71,$ff6e
|
||||
.word $ff6a,$ff66,$ff63,$ff5f,$ff5c,$ff59,$ff55,$ff52,$ff4f,$ff4b,$ff48,$ff45
|
||||
.word $ff42,$ff3f,$ff3c,$ff3a,$ff37,$ff34,$ff31,$ff2f,$ff2c,$ff2a,$ff27,$ff25
|
||||
.word $ff23,$ff21,$ff1e,$ff1c,$ff1a,$ff18,$ff17,$ff15,$ff13,$ff12,$ff10,$ff0e
|
||||
.word $ff0d,$ff0c,$ff0a,$ff09,$ff08,$ff07,$ff06,$ff05,$ff04,$ff04,$ff03,$ff02
|
||||
.word $ff02,$ff01,$ff01,$ff01,$ff01,$ff01,$ff00,$ff01,$ff01,$ff01,$ff01,$ff01
|
||||
.word $ff02,$ff02,$ff03,$ff04,$ff04,$ff05,$ff06,$ff07,$ff08,$ff09,$ff0a,$ff0c
|
||||
.word $ff0d,$ff0e,$ff10,$ff12,$ff13,$ff15,$ff17,$ff18,$ff1a,$ff1c,$ff1e,$ff21
|
||||
.word $ff23,$ff25,$ff27,$ff2a,$ff2c,$ff2f,$ff31,$ff34,$ff37,$ff3a,$ff3c,$ff3f
|
||||
.word $ff42,$ff45,$ff48,$ff4b,$ff4f,$ff52,$ff55,$ff59,$ff5c,$ff5f,$ff63,$ff66
|
||||
.word $ff6a,$ff6e,$ff71,$ff75,$ff79,$ff7d,$ff80,$ff84,$ff88,$ff8c,$ff90,$ff94
|
||||
.word $ff98,$ff9c,$ffa1,$ffa5,$ffa9,$ffad,$ffb1,$ffb6,$ffba,$ffbe,$ffc3,$ffc7
|
||||
.word $ffcb,$ffd0,$ffd4,$ffd8,$ffdd,$ffe1,$ffe6,$ffea,$ffef,$fff3,$fff8,$fffc
|
||||
|
||||
vramRowEndsMinusOne:
|
||||
.word $209f,$213f,$21df,$227f,$231f,$23bf,$245f,$24ff,$259f,$263f,$26df,$277f,$281f,$28bf,$295f,$29ff,$2a9f,$2b3f,$2bdf,$2c7f
|
||||
|
Loading…
Reference in New Issue
Block a user