mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-04 04:30:18 +00:00
mist: on split screen cut off the pointer at the edge of screen
This commit is contained in:
parent
80ecdcc452
commit
46b9121c13
@ -17,7 +17,8 @@ draw_pointer:
|
||||
; see if inside special region
|
||||
ldy #LOCATION_SPECIAL_EXIT
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
bmi finger_not_special ; if $ff not special
|
||||
cmp #$ff
|
||||
beq finger_not_special ; if $ff not special
|
||||
cmp DIRECTION
|
||||
bne finger_not_special ; only special if facing right way
|
||||
|
||||
|
@ -8,7 +8,7 @@ open_gen_door:
|
||||
sta location35,Y
|
||||
|
||||
ldy #LOCATION_NORTH_EXIT_DIR
|
||||
lda #(DIRECTION_N | DIRECTION_SPLIT)
|
||||
lda #(DIRECTION_N | DIRECTION_SPLIT | DIRECTION_ONLY_POINT)
|
||||
sta location35,Y
|
||||
|
||||
ldy #LOCATION_NORTH_BG
|
||||
@ -22,3 +22,110 @@ open_gen_door:
|
||||
rts
|
||||
|
||||
|
||||
button_lookup:
|
||||
.byte $10,$8,$4,$2,$1
|
||||
|
||||
generator_button_press:
|
||||
|
||||
lda SWITCH_TOP_ROW
|
||||
ora #$10
|
||||
sta SWITCH_TOP_ROW
|
||||
|
||||
sed ; use BCD mode
|
||||
inc GENERATOR_VOLTS
|
||||
cld ; turn off BCD mode
|
||||
|
||||
rts
|
||||
|
||||
|
||||
generator_update_volts:
|
||||
|
||||
lda DRAW_PAGE
|
||||
clc
|
||||
adc #$6
|
||||
sta volt_ones_smc+2
|
||||
sta volt_tens_smc+2
|
||||
|
||||
lda GENERATOR_VOLTS
|
||||
and #$f
|
||||
clc
|
||||
adc #$b0
|
||||
volt_ones_smc:
|
||||
sta $6d0+14 ; 14,21
|
||||
|
||||
lda GENERATOR_VOLTS
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
and #$f
|
||||
clc
|
||||
adc #$b0
|
||||
volt_tens_smc:
|
||||
sta $6d0+13 ; 13,21
|
||||
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
generator_draw_buttons:
|
||||
|
||||
ldx #0
|
||||
clc
|
||||
lda DRAW_PAGE
|
||||
adc #$4
|
||||
sta top_button_draw_smc+2
|
||||
adc #$1
|
||||
sta bottom_button_draw_smc+2
|
||||
lda #$d0+25
|
||||
sta top_button_draw_smc+1
|
||||
adc #$1
|
||||
sta bottom_button_draw_smc+1
|
||||
|
||||
draw_buttons_loop:
|
||||
|
||||
; top button
|
||||
|
||||
lda SWITCH_TOP_ROW
|
||||
and button_lookup,X
|
||||
beq top_button_off
|
||||
|
||||
top_button_on:
|
||||
ldy #$95
|
||||
bne top_button_draw_smc
|
||||
|
||||
top_button_off:
|
||||
ldy #$35
|
||||
|
||||
top_button_draw_smc:
|
||||
sty $4d0+25
|
||||
|
||||
inc top_button_draw_smc+1
|
||||
inc top_button_draw_smc+1
|
||||
|
||||
; bottom button
|
||||
|
||||
lda SWITCH_BOTTOM_ROW
|
||||
and button_lookup,X
|
||||
beq bottom_button_off
|
||||
|
||||
bottom_button_on:
|
||||
ldy #$93
|
||||
bne bottom_button_draw_smc
|
||||
|
||||
bottom_button_off:
|
||||
ldy #$13
|
||||
|
||||
bottom_button_draw_smc:
|
||||
sty $5d0+26
|
||||
|
||||
inc bottom_button_draw_smc+1
|
||||
inc bottom_button_draw_smc+1
|
||||
|
||||
inx
|
||||
cpx #5
|
||||
bne draw_buttons_loop
|
||||
|
||||
rts
|
||||
|
||||
|
@ -42,6 +42,8 @@ put_sprite_crop_loop:
|
||||
bne crop_increment_y
|
||||
|
||||
put_sprite_crop_pos:
|
||||
|
||||
psc_smc1:
|
||||
cpy #48 ; bge if >= 48, done sprite
|
||||
bcs crop_sprite_done
|
||||
|
||||
@ -222,6 +224,7 @@ put_spritefc_loop:
|
||||
ldy TEMPY ; 3
|
||||
|
||||
bmi fcrop_increment_y ; if < 0, skip to next
|
||||
psc_smc2:
|
||||
cpy #48 ; bge if >= 48, done sprite
|
||||
bcs fcrop_sprite_done
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -121,10 +121,24 @@ change_direction:
|
||||
; load background
|
||||
lda DIRECTION
|
||||
bpl no_split
|
||||
|
||||
; split text/graphics
|
||||
bit TEXTGR
|
||||
|
||||
; also change sprite cutoff
|
||||
ldx #40
|
||||
stx psc_smc1+1
|
||||
stx psc_smc2+1
|
||||
|
||||
jmp done_split
|
||||
no_split:
|
||||
bit FULLGR
|
||||
|
||||
; also change sprite cutoff
|
||||
ldx #40
|
||||
stx psc_smc1+1
|
||||
stx psc_smc2+1
|
||||
|
||||
done_split:
|
||||
and #$f ; mask off special flags
|
||||
asl
|
||||
|
@ -710,8 +710,10 @@ location36:
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH | BG_SOUTH
|
||||
.byte $ff ; DIRECTION_N|DIRECTION_SPLIT|DIRECTION_ONLY_POINT
|
||||
|
||||
.byte DIRECTION_N|DIRECTION_SPLIT|DIRECTION_ONLY_POINT
|
||||
.byte 24,36 ; special x
|
||||
.byte 34,40 ; special y
|
||||
.word generator_button_press-1 ; special function
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user