fox32rom: Change the color scheme

This commit is contained in:
ry755 2022-02-22 15:01:58 -08:00 committed by Ry
parent 4be89373f6
commit 73509767a8
3 changed files with 25 additions and 17 deletions

View File

@ -7,7 +7,8 @@ const FOX32ROM_VERSION_MINOR: 1
const FOX32ROM_VERSION_PATCH: 0
const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF414C50
const BACKGROUND_COLOR: 0xFF674764
const TEXT_COLOR: 0xFFFFFFFF
; initialization code
entry:
@ -80,7 +81,7 @@ draw_startup_text:
mov r0, startup_str
mov r1, 16
mov r2, 464
mov r3, 0xFFFFFFFF
mov r3, TEXT_COLOR
mov r4, 0x00000000
mov r10, FOX32ROM_VERSION_MAJOR
mov r11, FOX32ROM_VERSION_MINOR

View File

@ -1,5 +1,10 @@
; menu routines
const MENU_SELECTED_BACKGROUND_COLOR: 0xFFFFFFFF
const MENU_SELECTED_TEXT_COLOR: 0xFF000000
const MENU_UNSELECTED_BACKGROUND_COLOR: 0xFF3F3F3F
const MENU_UNSELECTED_TEXT_COLOR: 0xFFFFFFFF
; draw menu items
; inputs:
; r0: pointer to menu bar root struct
@ -90,16 +95,14 @@ draw_menu_items_calculate_x_skip:
movz.8 r0, ' '
mov r1, 0
mov r2, 0
mov r3, 0xFF000000
mov r4, 0xFFFFFFFF
mov r5, 29
draw_empty_menu_loop:
mov r7, r8 ; inner loop counter
cmp r30, r29
ifz mov r3, 0xFFFFFFFF ; foreground color: white
ifz mov r4, 0xFF000000 ; background color: black
ifnz mov r3, 0xFF000000 ; foreground color: black
ifnz mov r4, 0xFFFFFFFF ; background color: white
;ifz mov r3, MENU_UNSELECTED_BACKGROUND_COLOR
ifz mov r4, MENU_SELECTED_BACKGROUND_COLOR
;ifnz mov r3, MENU_SELECTED_BACKGROUND_COLOR
ifnz mov r4, MENU_UNSELECTED_BACKGROUND_COLOR
draw_empty_menu_line_loop:
call draw_font_tile_to_overlay
add r1, 8
@ -118,10 +121,10 @@ draw_empty_menu_line_loop:
mov r2, 0 ; Y = 0
draw_menu_text_loop:
cmp r30, r29
ifz mov r3, 0xFFFFFFFF ; foreground color: white
ifz mov r4, 0xFF000000 ; background color: black
ifnz mov r3, 0xFF000000 ; foreground color: black
ifnz mov r4, 0xFFFFFFFF ; background color: white
ifz mov r3, MENU_SELECTED_TEXT_COLOR
ifz mov r4, MENU_SELECTED_BACKGROUND_COLOR
ifnz mov r3, MENU_UNSELECTED_TEXT_COLOR
ifnz mov r4, MENU_UNSELECTED_BACKGROUND_COLOR
mov r1, 0 ; X = 0
call draw_str_to_overlay ; draw menu item text

View File

@ -1,5 +1,9 @@
; menu bar routines
const MENU_BAR_BACKGROUND_COLOR: 0xFF3F3F3F
const MENU_BAR_SELECTED_COLOR: 0xFFFFFFFF
const MENU_BAR_UNSELECTED_COLOR: 0xFF3F3F3F
; clear menu bar
; inputs:
; none
@ -19,7 +23,7 @@ clear_menu_bar:
mov r1, 0
mov r2, 0
mov r3, 0xFF000000
mov r4, 0xFFFFFFFF
mov r4, MENU_BAR_BACKGROUND_COLOR
mov r5, 30
clear_menu_bar_loop:
call draw_font_tile_to_overlay
@ -64,10 +68,10 @@ draw_menu_bar_root_items:
mov r5, 30 ; overlay 30
draw_menu_bar_root_items_loop:
cmp r30, r29
ifz mov r3, 0xFFFFFFFF ; foreground color: white
ifz mov r4, 0xFF000000 ; background color: black
ifnz mov r3, 0xFF000000 ; foreground color: black
ifnz mov r4, 0xFFFFFFFF ; background color: white
ifz mov r3, MENU_BAR_UNSELECTED_COLOR
ifz mov r4, MENU_BAR_SELECTED_COLOR
ifnz mov r3, MENU_BAR_SELECTED_COLOR
ifnz mov r4, MENU_BAR_UNSELECTED_COLOR
; draw colored space before text
sub r1, 8