From 4a7075ffefdcb4fe0bb91e68c454bb551c38685d Mon Sep 17 00:00:00 2001 From: Nunuhara Cabbage Date: Fri, 15 Nov 2019 21:40:21 -0800 Subject: [PATCH] Add stubs for MsgSkip.dll --- hll/MsgSkip.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + vm.c | 2 ++ 3 files changed, 68 insertions(+) create mode 100644 hll/MsgSkip.c diff --git a/hll/MsgSkip.c b/hll/MsgSkip.c new file mode 100644 index 0000000..8de4800 --- /dev/null +++ b/hll/MsgSkip.c @@ -0,0 +1,65 @@ +/* Copyright (C) 2019 Nunuhara Cabbage + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include +#include "hll.h" + +static bool enabled = false; +//int Init(string szName) +hll_warn_unimplemented(MsgSkip, Init, 1); +//void UseFlag(int nUse) +hll_warn_unimplemented(MsgSkip, UseFlag, 0); + +//void SetEnable(int nEnable) +hll_defun(SetEnable, args) +{ + enabled = !!args[0].i; + hll_return(0); +} + +//void SetState(int nState) +hll_warn_unimplemented(MsgSkip, SetState, 0); +//void SetFlag(int nMsgNum) +hll_warn_unimplemented(MsgSkip, SetFlag, 0); + +//int GetEnable(void) +hll_defun(GetEnable, args) +{ + hll_return(enabled); +} + +//int GetState(void) +hll_warn_unimplemented(MsgSkip, GetState, 0); +//int GetFlag(int nMsgNum) +hll_warn_unimplemented(MsgSkip, GetFlag, 0); +//int GetNumofMsg(void) +hll_warn_unimplemented(MsgSkip, GetNumofMsg, 0); +//int GetNumofFlag(void) +hll_warn_unimplemented(MsgSkip, GetNumofFlag, 0); + +hll_deflib(MsgSkip) { + hll_export(Init), + hll_export(UseFlag), + hll_export(SetEnable), + hll_export(SetState), + hll_export(SetFlag), + hll_export(GetEnable), + hll_export(GetState), + hll_export(GetFlag), + hll_export(GetNumofMsg), + hll_export(GetNumofFlag), + NULL +}; diff --git a/meson.build b/meson.build index d7531e7..173be9d 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,7 @@ xsystem4 = ['ald.c', hll_libs = ['hll/DrawPluginManager.c', 'hll/Math.c', 'hll/MsgLogManager.c', + 'hll/MsgSkip.c', 'hll/OutputLog.c', 'hll/SACT2.c', ] diff --git a/vm.c b/vm.c index 126c112..d9acd3a 100644 --- a/vm.c +++ b/vm.c @@ -1084,6 +1084,7 @@ static void vm_execute(void) extern struct library lib_DrawPluginManager; extern struct library lib_Math; extern struct library lib_MsgLogManager; +extern struct library lib_MsgSkip; extern struct library lib_OutputLog; extern struct library lib_SACT2; @@ -1091,6 +1092,7 @@ struct library *libraries[] = { &lib_DrawPluginManager, &lib_Math, &lib_MsgLogManager, + &lib_MsgSkip, &lib_OutputLog, &lib_SACT2, NULL