Added vdp color optional arguments and small doc chars.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -11s

This commit is contained in:
Willem Cazander 2024-07-01 11:57:30 +02:00
parent 59ddde5bec
commit 4fc2cae2ea
4 changed files with 22 additions and 14 deletions

View file

@ -2,8 +2,8 @@
#
# Adds the following commands to openMSX;
#
# 'boot_exec_color_dark'
# Sets the VDP colors to dark color tones.
# 'boot_exec_color_dark <vdp_fg> <vdp_bg>'
# Sets the VDP colors to defaults or supplied colors.
#
# 'boot_exec_config_info'
# Displays machine and openMSX version on one line.
@ -20,12 +20,22 @@
set boot_exec_color_vdp_fg "777"
set boot_exec_color_vdp_bg "000"
proc boot_exec_color_vdp {} {
proc boot_exec_color_vdp {{vdp_fg 0} {vdp_bg 0}} {
global boot_exec_color_vdp_fg
global boot_exec_color_vdp_bg
setcolor 15 $boot_exec_color_vdp_fg
setcolor 4 $boot_exec_color_vdp_bg
return "Boot color vdp fg $boot_exec_color_vdp_fg bg $boot_exec_color_vdp_bg"
if {$vdp_fg != 0} {
set color_vdp_fg $vdp_fg
} else {
set color_vdp_fg $boot_exec_color_vdp_fg
}
if {$vdp_bg != 0} {
set color_vdp_bg $vdp_bg
} else {
set color_vdp_bg $boot_exec_color_vdp_bg
}
setcolor 15 $color_vdp_fg
setcolor 4 $color_vdp_bg
return "Boot color vdp fg $color_vdp_fg bg $color_vdp_bg"
}
proc boot_exec_config_info {} {