Clear $800 for variable storage & reordered vars so X stuff and Y stuff is grouped together
This commit is contained in:
parent
b1a142d0f0
commit
e1a7386f96
3
main.s
3
main.s
|
@ -160,7 +160,8 @@ over_text .byte "OVER",0
|
|||
forever
|
||||
jmp forever
|
||||
|
||||
init_once jsr init_damage
|
||||
init_once jsr init_vars
|
||||
jsr init_damage
|
||||
jsr init_screen_once
|
||||
jsr init_actors_once
|
||||
rts
|
||||
|
|
|
@ -187,6 +187,18 @@ mazerow lda textrows_l,y
|
|||
rts
|
||||
|
||||
|
||||
; clear text page 2 where most of the variables are stored
|
||||
init_vars ldx #0
|
||||
txa
|
||||
?1 sta $800,x
|
||||
sta $900,x
|
||||
sta $a00,x
|
||||
sta $b00,x
|
||||
dex
|
||||
bne ?1
|
||||
rts
|
||||
|
||||
|
||||
; initialize screen to draw to page 1 (displays page 2)
|
||||
init_screen_once nop
|
||||
lda #0
|
||||
|
|
4
vars.s
4
vars.s
|
@ -2,12 +2,12 @@
|
|||
|
||||
actor_col .ds MAX_ACTORS ; # current tile column
|
||||
actor_x .ds MAX_ACTORS ; pixel position (calculated from col & xpixel)
|
||||
actor_row .ds MAX_ACTORS ; # current tile row
|
||||
actor_y .ds MAX_ACTORS ; pixel position (calculated from row & ypixel)
|
||||
actor_xpixel .ds MAX_ACTORS ; # current pixel offset in col
|
||||
actor_xfrac .ds MAX_ACTORS ; # current fractional pixel
|
||||
actor_xspeed_l .ds MAX_ACTORS ; # current speed (affects fractional)
|
||||
actor_xspeed_h .ds MAX_ACTORS ; # current speed (affects pixel)
|
||||
actor_row .ds MAX_ACTORS ; # current tile row
|
||||
actor_y .ds MAX_ACTORS ; pixel position (calculated from row & ypixel)
|
||||
actor_ypixel .ds MAX_ACTORS ; # current pixel offset in row
|
||||
actor_yfrac .ds MAX_ACTORS ; # current fractional pixel
|
||||
actor_yspeed_l .ds MAX_ACTORS ; # current speed (affects fractional)
|
||||
|
|
Loading…
Reference in New Issue