System3: Implement CD availability check

The `Y14,2:` command (`Y20,2:` in Gakuen KING) now returns zero if CD
audio is not available (i.e. playlist is not loaded).
This commit is contained in:
kichikuou
2025-11-28 10:41:20 +09:00
parent 300099be5e
commit 0187d0f216
5 changed files with 24 additions and 2 deletions
+9 -2
View File
@@ -785,8 +785,12 @@ void NACT_Sys3::exec_y(int cmd, int param)
text_wait_time = (param - 1) * 1000 / 60;
}
break;
case 14:
RND = 1;
case 14: // audio device check
if (param == 2) {
RND = mako->is_cd_available() ? 1 : 0;
} else {
RND = 1;
}
break;
case 15:
break;
@@ -1402,6 +1406,9 @@ public:
TRACE("Y %d,%d:", cmd, param);
switch (cmd) {
case 20: // audio device check
exec_y(14, param);
break;
case 25:
ags->menu.back_color = ags->text.back_color = (param == 1 || param == 2) ? 0 : 1;
// text_window = param;