From eae1951646ed38e025988b003a5ca9cc0da093b7 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sat, 21 Dec 2024 13:43:50 +0900 Subject: [PATCH] Intruder: Fix Z2 command * `Z 2, 0:` clears the graphic screen. * `Z 2, 1:` restores the screen by loading the background image, but with a transparent color so that the preceding G command can be seen. Fixes #31. --- src/sys/nact_sys1.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sys/nact_sys1.cpp b/src/sys/nact_sys1.cpp index e12e06a..79fd455 100644 --- a/src/sys/nact_sys1.cpp +++ b/src/sys/nact_sys1.cpp @@ -1143,9 +1143,15 @@ void NACT_Sys1::cmd_z() ags->text_font_size = 16; ags->text_font_color = color; } else if(cmd == 2) { - ags->load_cg(74, -1); - ags->load_cg(81, -1); - map_page = 81; + if (param == 0) { + // Clear the screen + ags->box_fill(0, 0, 0, 640, 400, 0); + } else { + // Restore the screen + ags->load_cg(74, 8); + ags->load_cg(81, -1); + map_page = 81; + } } else if(cmd == 3) { RND = (param == 0 || param == 1) ? 0 : random(param); } else if(460 <= cmd && cmd <= 625 && 20 <= param && param <= 55) {