new scooter sprite
This commit is contained in:
@@ -23,6 +23,8 @@ SPR_YEX = $d017 ; vertical expand
|
|||||||
SPR_PRIO = $d01b ; 1 = sprite behind the characters
|
SPR_PRIO = $d01b ; 1 = sprite behind the characters
|
||||||
SPR_MC = $d01c ; multicolor enable
|
SPR_MC = $d01c ; multicolor enable
|
||||||
SPR_XEX = $d01d ; horizontal expand
|
SPR_XEX = $d01d ; horizontal expand
|
||||||
|
SPR_MC1 = $d025 ; shared multicolor 1 (bit pair %01)
|
||||||
|
SPR_MC2 = $d026 ; shared multicolor 2 (bit pair %11)
|
||||||
SPR_COL = $d027 ; sprite 0 color, +1 = sprite 1, ...
|
SPR_COL = $d027 ; sprite 0 color, +1 = sprite 1, ...
|
||||||
|
|
||||||
|
|
||||||
@@ -91,7 +93,7 @@ LANES = 5
|
|||||||
NRABBITS = 7 ; rabbit slots, hardware sprites 1-7
|
NRABBITS = 7 ; rabbit slots, hardware sprites 1-7
|
||||||
MAX_MISS = 3
|
MAX_MISS = 3
|
||||||
ROAD_CX = 184 ; road center in sprite x coordinates
|
ROAD_CX = 184 ; road center in sprite x coordinates
|
||||||
PLAYER_SY = 200 ; scooter sprite top (feet on raster line 221)
|
PLAYER_SY = 179 ; double-sized scooter top (feet stay on line 221)
|
||||||
T_BIG = 112 ; rabbit distance where the big frames start
|
T_BIG = 112 ; rabbit distance where the big frames start
|
||||||
T_EXP = 192 ; ... and where the sprite gets double-sized
|
T_EXP = 192 ; ... and where the sprite gets double-sized
|
||||||
REP_HOLD = 12 ; frames before a held direction auto-repeats
|
REP_HOLD = 12 ; frames before a held direction auto-repeats
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ start:
|
|||||||
lda #COL_SKY
|
lda #COL_SKY
|
||||||
sta BG
|
sta BG
|
||||||
|
|
||||||
; sprites: red scooter, white rabbits, hires, in front
|
; sprites: red scooter, white rabbits, in front; the
|
||||||
|
; scooter is multicolor (white rider, dark grey chrome),
|
||||||
|
; the rabbits stay hires silhouettes
|
||||||
lda #RED
|
lda #RED
|
||||||
sta SPR_COL
|
sta SPR_COL
|
||||||
ldx #7
|
ldx #7
|
||||||
@@ -52,9 +54,14 @@ sprcol:
|
|||||||
sta SPR_COL,x
|
sta SPR_COL,x
|
||||||
dex
|
dex
|
||||||
bne sprcol
|
bne sprcol
|
||||||
|
lda #%00000001
|
||||||
|
sta SPR_MC
|
||||||
|
lda #WHITE
|
||||||
|
sta SPR_MC1
|
||||||
|
lda #DGREY
|
||||||
|
sta SPR_MC2
|
||||||
lda #0
|
lda #0
|
||||||
sta SPR_EN
|
sta SPR_EN
|
||||||
sta SPR_MC
|
|
||||||
sta SPR_PRIO
|
sta SPR_PRIO
|
||||||
sta SPR_MSBX
|
sta SPR_MSBX
|
||||||
sta SPR_XEX
|
sta SPR_XEX
|
||||||
|
|||||||
@@ -68,14 +68,14 @@ pi_col:
|
|||||||
lda #RED
|
lda #RED
|
||||||
sta SPR_COL
|
sta SPR_COL
|
||||||
|
|
||||||
; player sprite: scooter, fixed row, rabbits come per frame
|
; player sprite: scooter, fixed row, double-sized;
|
||||||
|
; rabbits come per frame
|
||||||
lda #SPRP_SCOOT
|
lda #SPRP_SCOOT
|
||||||
sta SPRPTR
|
sta SPRPTR
|
||||||
lda #PLAYER_SY
|
lda #PLAYER_SY
|
||||||
sta SPRPOS+1
|
sta SPRPOS+1
|
||||||
lda #1
|
lda #1
|
||||||
sta SPR_EN
|
sta SPR_EN
|
||||||
lda #0
|
|
||||||
sta SPR_XEX
|
sta SPR_XEX
|
||||||
sta SPR_YEX
|
sta SPR_YEX
|
||||||
|
|
||||||
@@ -183,10 +183,9 @@ pu_nop2:
|
|||||||
sta SPRPOS ; sprite 0 x
|
sta SPRPOS ; sprite 0 x
|
||||||
lda pxhi,x
|
lda pxhi,x
|
||||||
sta msb_sh ; lane 4 sits past x=255
|
sta msb_sh ; lane 4 sits past x=255
|
||||||
lda #0
|
lda #1 ; the scooter rides double-sized
|
||||||
sta xex_sh
|
sta xex_sh
|
||||||
sta yex_sh
|
sta yex_sh
|
||||||
lda #1
|
|
||||||
sta en_sh
|
sta en_sh
|
||||||
|
|
||||||
; -- a hit blinks the scooter for a dozen frames --
|
; -- a hit blinks the scooter for a dozen frames --
|
||||||
|
|||||||
+29
-22
@@ -1,7 +1,8 @@
|
|||||||
; -----------------------------------------------------------
|
; -----------------------------------------------------------
|
||||||
; sprites.asm - hires sprite art, black silhouettes in the
|
; sprites.asm - sprite art, one !be24 row per sprite line,
|
||||||
; spirit of the original PNGs; one !be24 row per sprite line
|
; 64-byte aligned; the rabbits are hires silhouettes
|
||||||
; (`.` = transparent, `#` = pixel), 64-byte aligned
|
; (`.` = transparent, `#` = pixel), the scooter is multicolor
|
||||||
|
; (2-bit pixel pairs, legend at the art)
|
||||||
; -----------------------------------------------------------
|
; -----------------------------------------------------------
|
||||||
|
|
||||||
!align 63, 0
|
!align 63, 0
|
||||||
@@ -11,29 +12,35 @@ SPRP_SCOOT = spr_data DIV 64 ; sprite pointer of the scooter
|
|||||||
SPRP_SMALL = SPRP_SCOOT + 1 ; 4 far rabbit frames
|
SPRP_SMALL = SPRP_SCOOT + 1 ; 4 far rabbit frames
|
||||||
SPRP_BIG = SPRP_SCOOT + 5 ; 4 near rabbit frames
|
SPRP_BIG = SPRP_SCOOT + 5 ; 4 near rabbit frames
|
||||||
|
|
||||||
; ---- rabbit on a scooter, seen from behind ----
|
; ---- rabbit on a scooter, seen from behind; multicolor, so
|
||||||
|
; each row is 12 double-wide pixels as 2-bit pairs:
|
||||||
|
; .. transparent .# white fur (SPR_MC1)
|
||||||
|
; #. red scooter + jersey (sprite color)
|
||||||
|
; ## dark grey chrome: bar, fork, wheel (SPR_MC2)
|
||||||
|
; layout: ears / head / arms to the bar / hands + jersey /
|
||||||
|
; legs / deck / fork / rear wheel ----
|
||||||
spr_scooter:
|
spr_scooter:
|
||||||
!be24 %.........##..##.........
|
!be24 %.......#.#.....#.#......
|
||||||
!be24 %.........##..##.........
|
!be24 %.......#.#.....#.#......
|
||||||
!be24 %.........##..##.........
|
!be24 %.......#.#.....#.#......
|
||||||
!be24 %.........##..##.........
|
!be24 %.........#.#.#.#........
|
||||||
|
!be24 %.........#.#.#.#........
|
||||||
|
!be24 %.........#.#.#.#........
|
||||||
|
!be24 %...#.#...#.#.#.#...#.#..
|
||||||
|
!be24 %########################
|
||||||
|
!be24 %.#.#....#.#.#.#......#.#
|
||||||
|
!be24 %........#.#.#.#.........
|
||||||
|
!be24 %........#.#.#.#.........
|
||||||
|
!be24 %........#.#.#.#.........
|
||||||
|
!be24 %.........#.....#........
|
||||||
|
!be24 %.........#.....#........
|
||||||
|
!be24 %.........#.....#........
|
||||||
|
!be24 %..#.#.#.#.#.#.#.#.#.#...
|
||||||
|
!be24 %..#.#.#.#.#.#.#.#.#.#...
|
||||||
|
!be24 %..........####..........
|
||||||
!be24 %........########........
|
!be24 %........########........
|
||||||
!be24 %........########........
|
!be24 %........########........
|
||||||
!be24 %........########........
|
!be24 %........########........
|
||||||
!be24 %..........####..........
|
|
||||||
!be24 %....################....
|
|
||||||
!be24 %....##..########..##....
|
|
||||||
!be24 %........########........
|
|
||||||
!be24 %........########........
|
|
||||||
!be24 %.......##########.......
|
|
||||||
!be24 %.......##########.......
|
|
||||||
!be24 %.......##########.......
|
|
||||||
!be24 %.....##############.....
|
|
||||||
!be24 %.....##############.....
|
|
||||||
!be24 %..........####..........
|
|
||||||
!be24 %..........####..........
|
|
||||||
!be24 %..........####..........
|
|
||||||
!be24 %..........####..........
|
|
||||||
!byte 0
|
!byte 0
|
||||||
|
|
||||||
; ---- far rabbit, four hop frames: it faces the player, so
|
; ---- far rabbit, four hop frames: it faces the player, so
|
||||||
|
|||||||
+4
-3
@@ -31,10 +31,11 @@ sptab_hi:
|
|||||||
!byte >(i*13)
|
!byte >(i*13)
|
||||||
}
|
}
|
||||||
|
|
||||||
; scooter sprite x per lane (lane center - 12); lane 4 crosses
|
; scooter sprite x per lane (lane center - 24: the scooter is
|
||||||
; the 8-bit boundary, pxhi is its MSB flag
|
; double-sized, 48 wide); lane 4 crosses the 8-bit boundary,
|
||||||
|
; pxhi is its MSB flag
|
||||||
pxlo:
|
pxlo:
|
||||||
!byte 66, 119, 172, 225, 22
|
!byte 54, 107, 160, 213, 10
|
||||||
pxhi:
|
pxhi:
|
||||||
!byte 0, 0, 0, 0, 1
|
!byte 0, 0, 0, 0, 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user