mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
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.
46 lines
910 B
C
46 lines
910 B
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(); /* ISys3x */
|
|
int p2 = getCaliValue(); /* IWinMsg */
|
|
int p3 = getCaliValue(); /* ITimer */
|
|
vmvar_t *var = getCaliVariable();
|
|
|
|
*var = 0;
|
|
|
|
TRACE_UNIMPLEMENTED("nDEMO.Init %p:", var);
|
|
}
|
|
|
|
static void SetKeyCancelFlag() {
|
|
int p1 = getCaliValue();
|
|
|
|
TRACE_UNIMPLEMENTED("nDEMO.SetKeyCancelFlag %d:", p1);
|
|
}
|
|
|
|
static void SetLoopFlag() {
|
|
int p1 = getCaliValue();
|
|
|
|
TRACE_UNIMPLEMENTED("nDEMO.SetLoopFlag %d:", p1);
|
|
}
|
|
|
|
static void Run() {
|
|
TRACE_UNIMPLEMENTED("nDEMO.Run:");
|
|
}
|
|
|
|
static const ModuleFunc functions[] = {
|
|
{"Init", Init},
|
|
{"Run", Run},
|
|
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
|
{"SetLoopFlag", SetLoopFlag},
|
|
};
|
|
|
|
const Module module_nDEMO = {"nDEMO", functions, sizeof(functions) / sizeof(ModuleFunc)};
|