mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-07-28 00:29:15 +00:00
riven: forgot the number files
This commit is contained in:
parent
ea4403bd78
commit
a18dad0692
141
games/riven_hgr/number_sprites.inc
Normal file
141
games/riven_hgr/number_sprites.inc
Normal file
@ -0,0 +1,141 @@
|
||||
; 18x13
|
||||
|
||||
; frame
|
||||
|
||||
frame_sprite:
|
||||
|
||||
.byte 3,41 ; 3*13, ((3*13)+2)
|
||||
.byte $FF,$FF,$C0
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $60,$01,$80
|
||||
.byte $FF,$FF,$C0
|
||||
|
||||
|
||||
zero_sprite:
|
||||
.byte 1,8 ; 1*6
|
||||
.byte $00
|
||||
.byte $00
|
||||
.byte $00
|
||||
.byte $00
|
||||
.byte $00
|
||||
.byte $06
|
||||
|
||||
one_sprite:
|
||||
.byte 1,13 ; 11+2
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
.byte $06
|
||||
|
||||
two_sprite:
|
||||
.byte 1,13 ; 11+2
|
||||
.byte $80
|
||||
.byte $C0
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $60
|
||||
.byte $C0
|
||||
.byte $80
|
||||
|
||||
three_sprite:
|
||||
.byte 1,13 ; 11+2
|
||||
.byte $06
|
||||
.byte $0C
|
||||
.byte $18
|
||||
.byte $30
|
||||
.byte $60
|
||||
.byte $C0
|
||||
.byte $60
|
||||
.byte $30
|
||||
.byte $18
|
||||
.byte $0c
|
||||
.byte $06
|
||||
|
||||
four_sprite:
|
||||
.byte 2,24 ; 11*2+2
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $07,$F0
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
.byte $06,$00
|
||||
|
||||
|
||||
|
||||
empty_sprite:
|
||||
.byte 1,3
|
||||
.byte $00
|
||||
|
||||
five_sprite:
|
||||
.byte 2,14 ; 2*6
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $FF,$F0
|
||||
|
||||
ten_sprite:
|
||||
.byte 2,24 ; 2*11
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $3F,$c0
|
||||
.byte $40,$20
|
||||
.byte $80,$10
|
||||
|
||||
fifteen_sprite:
|
||||
.byte 2,24 ; 2*11
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $80,$10
|
||||
.byte $C0,$30
|
||||
.byte $60,$60
|
||||
.byte $30,$c0
|
||||
.byte $19,$80
|
||||
.byte $0f,$00
|
||||
.byte $06,$10
|
||||
|
||||
twenty_sprite:
|
||||
.byte 2,14 ; 2*6
|
||||
.byte $30,$00
|
||||
.byte $30,$00
|
||||
.byte $30,$00
|
||||
.byte $30,$00
|
||||
.byte $30,$00
|
||||
.byte $3f,$f0
|
||||
|
||||
|
||||
|
181
games/riven_hgr/print_dni_numbers.s
Normal file
181
games/riven_hgr/print_dni_numbers.s
Normal file
@ -0,0 +1,181 @@
|
||||
;========================
|
||||
; location at XPOS, YPOS ?
|
||||
|
||||
draw_full_dni_number:
|
||||
|
||||
|
||||
lda NUMBER_HIGH
|
||||
beq draw_only_low_dni_number
|
||||
|
||||
; drawing high number
|
||||
|
||||
jsr draw_dni_number
|
||||
|
||||
; adjust for right number
|
||||
lda #14
|
||||
bne draw_low_dni_number ; bra
|
||||
|
||||
draw_only_low_dni_number:
|
||||
|
||||
lda #7
|
||||
draw_low_dni_number:
|
||||
clc
|
||||
adc XPOS
|
||||
sta XPOS
|
||||
|
||||
lda NUMBER_LOW
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
; number in A
|
||||
|
||||
draw_dni_number:
|
||||
|
||||
sta DRAW_NUMBER
|
||||
|
||||
; draw frame
|
||||
|
||||
lda #<frame_sprite
|
||||
sta INL
|
||||
lda #>frame_sprite
|
||||
sta INH
|
||||
|
||||
jsr put_number_sprite
|
||||
|
||||
; adjust to be inside frame
|
||||
|
||||
inc YPOS
|
||||
inc XPOS
|
||||
inc XPOS
|
||||
inc XPOS
|
||||
|
||||
; draw ones values
|
||||
|
||||
lda DRAW_NUMBER
|
||||
bne regular_number
|
||||
|
||||
; lda LEADING_ZERO ; if 0 then regular
|
||||
; beq regular_number
|
||||
|
||||
; if all zeros, then draw special zero char
|
||||
|
||||
lda #<zero_sprite
|
||||
sta INL
|
||||
lda #>zero_sprite
|
||||
jmp finally_draw
|
||||
|
||||
|
||||
regular_number:
|
||||
and #$f
|
||||
tax
|
||||
|
||||
lda ones_sprites_l,X
|
||||
sta INL
|
||||
lda ones_sprites_h,X
|
||||
finally_draw:
|
||||
sta INH
|
||||
|
||||
jsr put_number_sprite
|
||||
|
||||
lda DRAW_NUMBER
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tax
|
||||
|
||||
lda fives_sprite_l,X
|
||||
sta INL
|
||||
lda fives_sprite_h,X
|
||||
sta INH
|
||||
|
||||
jsr put_number_sprite
|
||||
|
||||
|
||||
; restore
|
||||
|
||||
dec YPOS
|
||||
dec XPOS
|
||||
dec XPOS
|
||||
dec XPOS
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
|
||||
put_number_sprite:
|
||||
|
||||
ldy #0
|
||||
lda (INL),Y
|
||||
sta pns_xsize_smc+1
|
||||
iny
|
||||
lda (INL),Y
|
||||
sta pns_ysize_smc+1
|
||||
iny
|
||||
|
||||
lda #0
|
||||
sta SPRITEY
|
||||
pns_yloop:
|
||||
|
||||
lda SPRITEY
|
||||
clc
|
||||
adc YPOS
|
||||
asl
|
||||
tax
|
||||
lda gr_offsets,X
|
||||
; clc
|
||||
adc XPOS
|
||||
sta pns_out_smc+1
|
||||
|
||||
lda gr_offsets+1,X
|
||||
; clc
|
||||
adc DRAW_PAGE
|
||||
sta pns_out_smc+2
|
||||
|
||||
lda #0
|
||||
sta SPRITEX
|
||||
pns_xloop:
|
||||
|
||||
ldx #8 ; rotate through 8 bits
|
||||
lda (INL),Y
|
||||
sta COLOR
|
||||
pns_inner_loop:
|
||||
asl COLOR
|
||||
bcc pns_transparent
|
||||
lda #$FF
|
||||
pns_out_smc:
|
||||
sta $400
|
||||
pns_transparent:
|
||||
inc pns_out_smc+1
|
||||
dex
|
||||
bne pns_inner_loop
|
||||
|
||||
iny
|
||||
|
||||
inc SPRITEX
|
||||
lda SPRITEX
|
||||
pns_xsize_smc:
|
||||
cmp #3
|
||||
bne pns_xloop
|
||||
|
||||
inc SPRITEY
|
||||
pns_ysize_smc:
|
||||
cpy #39
|
||||
bcc pns_yloop ; blt
|
||||
|
||||
rts
|
||||
|
||||
ones_sprites_l:
|
||||
.byte <empty_sprite,<one_sprite,<two_sprite,<three_sprite,<four_sprite
|
||||
ones_sprites_h:
|
||||
.byte >empty_sprite,>one_sprite,>two_sprite,>three_sprite,>four_sprite
|
||||
|
||||
fives_sprite_l:
|
||||
.byte <empty_sprite,<five_sprite,<ten_sprite,<fifteen_sprite,<twenty_sprite
|
||||
fives_sprite_h:
|
||||
.byte >empty_sprite,>five_sprite,>ten_sprite,>fifteen_sprite,>twenty_sprite
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user