Files
kichikuou_xsystem35-sdl2/modules/eeDemo/eeDemo.c
T
kichikuou a627a8ea3d Add VM variable storage type
Define a dedicated `vmvar_t` type for values stored in variable pages
and propagate it through interfaces that expose those values. Keep the
type as int for now so this commit does not change runtime behavior.
This separates VM storage from ordinary int buffers and makes a later
conversion to 16-bit storage mechanically checkable.
2026-07-17 08:48:10 +09:00

50 lines
1.1 KiB
C

#include "config.h"
#include <stdio.h>
#include "portab.h"
#include "system.h"
#include "xsystem35.h"
#include "modules.h"
#include "nact.h"
static void Init() {
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
vmvar_t *var = getCaliVariable();
*var = 1;
TRACE_UNIMPLEMENTED("eeDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
TRACE_UNIMPLEMENTED("eeDEMO.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
TRACE_UNIMPLEMENTED("eeDEMO.SetLoopFlag %d:", loopflag);
}
static void Run() {
int p1 = getCaliValue();
TRACE_UNIMPLEMENTED("eeDEMO.Run %d:", p1);
}
static const ModuleFunc functions[] = {
{"Init", Init},
{"Run", Run},
{"SetKeyCancelFlag", SetKeyCancelFlag},
{"SetLoopFlag", SetLoopFlag},
};
const Module module_eeDemo = {"eeDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};