From 4fc2cae2eaa8d1b742a51cd99e8bd43d848e64d5 Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 1 Jul 2024 11:57:30 +0200 Subject: [PATCH] Added vdp color optional arguments and small doc chars. --- lib/openmsx/share/scripts/boot_exec.tcl | 22 ++++++++++++++++------ lib/openmsx/share/scripts/fail_after.tcl | 2 +- lib/openmsx/share/scripts/headless.tcl | 6 ++---- lib/openmsx/share/scripts/night_flight.tcl | 6 +++--- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lib/openmsx/share/scripts/boot_exec.tcl b/lib/openmsx/share/scripts/boot_exec.tcl index 1eb39d9..8d05ab4 100644 --- a/lib/openmsx/share/scripts/boot_exec.tcl +++ b/lib/openmsx/share/scripts/boot_exec.tcl @@ -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 ' +# 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 {} { diff --git a/lib/openmsx/share/scripts/fail_after.tcl b/lib/openmsx/share/scripts/fail_after.tcl index 6d25e83..9b4fda6 100644 --- a/lib/openmsx/share/scripts/fail_after.tcl +++ b/lib/openmsx/share/scripts/fail_after.tcl @@ -4,7 +4,7 @@ # # Adds two commands to openMSX; # -# 'fail_after timeout [timeunit] [fail_id] [fail_code]' +# 'fail_after [timeunit] [fail_id] [fail_code]' # Schedules an openMSX exit after the timeout. # This can be canceled by requesting a timeout of 0 or new timeout. # The timeunit can be selected between (msx)'time' and (host)'realtime'. diff --git a/lib/openmsx/share/scripts/headless.tcl b/lib/openmsx/share/scripts/headless.tcl index 8062a27..fee8cda 100644 --- a/lib/openmsx/share/scripts/headless.tcl +++ b/lib/openmsx/share/scripts/headless.tcl @@ -1,8 +1,6 @@ -# headless -- Controls the boot mode config of openMSX from environment variables. +# headless -- Control openMSX in headless mode. # -# Typically used in automation tools which run openMSX without human interaction. -# -# Adds the following command to openMSX; +# Adds the following commands to openMSX; # # 'headless_exit' # A normal exit of the openMSX emulator. diff --git a/lib/openmsx/share/scripts/night_flight.tcl b/lib/openmsx/share/scripts/night_flight.tcl index b679b64..2d895d6 100644 --- a/lib/openmsx/share/scripts/night_flight.tcl +++ b/lib/openmsx/share/scripts/night_flight.tcl @@ -1,11 +1,11 @@ -# night_flight -- Setup the travel for night flight black box recorder for build pipelines. +# night_flight -- Setup the night flight black box recorder for build pipelines. # # Adds the following commands to openMSX; # -# 'night_flight_save_screenshot' +# 'night_flight_save_screenshot [prefix-id]' # Takes an screenshot with optional prefix parameter. # -# 'night_flight_save_video' +# 'night_flight_save_video [prefix-id]' # Starts video recording with optional prefix parameter. # # Supported environment variables by this script;