diff --git a/src/ffi.c b/src/ffi.c index 9a724fc..5717490 100644 --- a/src/ffi.c +++ b/src/ffi.c @@ -138,6 +138,7 @@ void hll_call(int libno, int fno) } extern struct static_library lib_ACXLoader; +extern struct static_library lib_ADVSYS; extern struct static_library lib_AliceLogo; extern struct static_library lib_AliceLogo2; extern struct static_library lib_AliceLogo3; @@ -171,6 +172,7 @@ extern struct static_library lib_Timer; static struct static_library *static_libraries[] = { &lib_ACXLoader, + &lib_ADVSYS, &lib_AliceLogo, &lib_AliceLogo2, &lib_AliceLogo3, diff --git a/src/hll/ADVSYS.c b/src/hll/ADVSYS.c new file mode 100644 index 0000000..62be2e0 --- /dev/null +++ b/src/hll/ADVSYS.c @@ -0,0 +1,40 @@ +/* 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 "xsystem4.h" +#include "input.h" +#include "hll.h" + +static int ADVSYS_Init(void) +{ + return 1; +} + +static int ADVSYS_KEY_IsDown(int key) +{ + return key_is_down(key); +} + +static int ADVSYS_SYSTEM_IsResetOnce(void) +{ + // TODO + return 0; +} + +HLL_LIBRARY(ADVSYS, + HLL_EXPORT(Init, ADVSYS_Init), + HLL_EXPORT(KEY_IsDown, ADVSYS_KEY_IsDown), + HLL_EXPORT(SYSTEM_IsResetOnce, ADVSYS_SYSTEM_IsResetOnce)); diff --git a/src/hll/SACT2.c b/src/hll/SACT2.c index 8408a99..cedd450 100644 --- a/src/hll/SACT2.c +++ b/src/hll/SACT2.c @@ -439,6 +439,26 @@ HLL_WARN_UNIMPLEMENTED(0, int, SACT2, SP_GetBrightness, int sp_no); HLL_EXPORT(SP_SetBrightness, SACT2_SP_SetBrightness), \ HLL_EXPORT(SP_GetBrightness, SACT2_SP_GetBrightness) +static void SACTDX_SetVolumeMixerMasterGroupNum(int n) +{ + // TODO +} + +static void SACTDX_SetVolumeMixerSEGroupNum(int n) +{ + // TODO +} + +static void SACTDX_SetVolumeMixerBGMGroupNum(int n) +{ + // TODO +} + +static int SACTDX_Sound_GetGroupNumFromDataNum(int n) +{ + return 0; +} + static int SACTDX_TRANS_Begin(int nNum) { // TODO @@ -458,9 +478,13 @@ static int SACTDX_TRANS_End(void) } #define SACTDX_EXPORTS \ - HLL_EXPORT(TRANS_Begin, SACTDX_TRANS_Begin), \ - HLL_EXPORT(TRANS_Update, SACTDX_TRANS_Update), \ - HLL_EXPORT(TRANS_End, SACTDX_TRANS_End) + HLL_EXPORT(SetVolumeMixerMasterGroupNum, SACTDX_SetVolumeMixerMasterGroupNum), \ + HLL_EXPORT(SetVolumeMixerSEGroupNum, SACTDX_SetVolumeMixerSEGroupNum), \ + HLL_EXPORT(SetVolumeMixerBGMGroupNum, SACTDX_SetVolumeMixerBGMGroupNum), \ + HLL_EXPORT(Sound_GetGroupNumFromDataNum, SACTDX_Sound_GetGroupNumFromDataNum), \ + HLL_EXPORT(TRANS_Begin, SACTDX_TRANS_Begin), \ + HLL_EXPORT(TRANS_Update, SACTDX_TRANS_Update), \ + HLL_EXPORT(TRANS_End, SACTDX_TRANS_End) HLL_LIBRARY(SACT2, SACT_EXPORTS); HLL_LIBRARY(SACTDX, SACT_EXPORTS, SACTDX_EXPORTS); diff --git a/src/meson.build b/src/meson.build index 8095ac8..33ace4b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -18,6 +18,7 @@ xsystem4 = ['audio.c', 'vm.c', 'hll/ACXLoader.c', + 'hll/ADVSYS.c', 'hll/AliceLogo.c', 'hll/AliceLogo2.c', 'hll/AliceLogo3.c',