mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-11-22 06:31:48 +00:00
Basic sine wave terrain test
This commit is contained in:
parent
b60043e4b2
commit
e7f4a0b256
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
11
terrain.s
11
terrain.s
@ -33,6 +33,7 @@ renderTerrainColumn:
|
||||
lda terrainData,y
|
||||
and #$00ff
|
||||
tax
|
||||
inx ; Prevent x from going negative upon entry to loop
|
||||
|
||||
renderTerrainColumnLoop:
|
||||
dex
|
||||
@ -86,9 +87,17 @@ generateTerrain:
|
||||
ldy #0
|
||||
lda #terrainData
|
||||
sta SCRATCHL
|
||||
lda #MAXTERRAINHEIGHT
|
||||
|
||||
generateTerrainLoop:
|
||||
|
||||
phy
|
||||
tya ; Pull an interesting value out of the sine table
|
||||
and #$00ff
|
||||
tay
|
||||
lda sineTable,y
|
||||
and #$7f7f
|
||||
ply
|
||||
|
||||
sta (SCRATCHL),y
|
||||
iny
|
||||
cpy #TERRAINWIDTH/4
|
||||
|
Loading…
Reference in New Issue
Block a user