Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/coolgirl-multicart/coolgirl-multirom-builder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2020-12-28 13:40:26 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2020-12-28 13:57:36 +0300
commit8cfe3d9bb034452d4ea6c7171b068788366cfe97 (patch)
tree114d0a809f3a62974c8f38e3d964bc537fbecc1d /video.asm
parent4dcfbe0894229b229df823069eb2805cd4d73346 (diff)
Using constants instead of .db/.dw
Diffstat (limited to 'video.asm')
-rw-r--r--video.asm16
1 files changed, 10 insertions, 6 deletions
diff --git a/video.asm b/video.asm
index fa62989..adf0a24 100644
--- a/video.asm
+++ b/video.asm
@@ -366,10 +366,12 @@ print_name:
jmp .end_really_really
.not_header:
; when there are not so many games we need offset
+ .if GAMES_OFFSET != 0
lda <TEXT_DRAW_ROW
clc
- adc games_offset
+ adc #GAMES_OFFSET
sta <TEXT_DRAW_ROW
+ .endif
asl <TEXT_DRAW_ROW ; x2
lda <TEXT_DRAW_ROW
; detecting target nametable
@@ -423,15 +425,15 @@ print_name:
; is it footer?
lda <TEXT_DRAW_GAME
sec
- sbc games_count
+ sbc #GAMES_COUNT & $FF
lda <TEXT_DRAW_GAME+1
- sbc games_count+1
+ sbc #(GAMES_COUNT >> 8) & $FF
bcc .print_text_line
ldx <TEXT_DRAW_GAME
- cpx games_count
+ cpx #GAMES_COUNT & $FF
beq .footer1
dex
- cpx games_count
+ cpx #GAMES_COUNT & $FF
beq .footer2
jmp .end
.footer2:
@@ -725,8 +727,10 @@ set_cursor_targets:
; Y coordinate it the same for both
lda <SELECTED_GAME
; when there are not so many games
+ .if GAMES_OFFSET!=0
clc
- adc games_offset
+ adc #GAMES_OFFSET
+ .endif
sec
sbc <SCROLL_LINES_TARGET
clc