Files
kichikuou_xsystem35-sdl2/modules/Confirm/Confirm.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

54 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();
TRACE_UNIMPLEMENTED("Confirm.Init %d:", p1);
}
static void ExistKeyFile() {
const char *p1 = sl_getString(0);
vmvar_t *p2 = getCaliVariable();
vmvar_t *var = getCaliVariable();
*var = 1;
TRACE_UNIMPLEMENTED("Confirm.ExistKeyFile %s,%p,%p:",p1, p2, var);
}
static void CheckProtectFile() {
const char *p1 = sl_getString(0);
vmvar_t *p2 = getCaliVariable();
vmvar_t *var = getCaliVariable();
*var = 1;
TRACE_UNIMPLEMENTED("Confirm.CheckProtectFile %s,%p,%p:", p1,p2,var);
}
static void CreateKeyFile() {
const char *p1 = sl_getString(0);
vmvar_t *p2 = getCaliVariable();
vmvar_t *var = getCaliVariable();
*var = 1;
TRACE_UNIMPLEMENTED("Confirm.CreateKeyFile %s,%p,%p:", p1,p2,var);
}
static const ModuleFunc functions[] = {
{"CheckProtectFile", CheckProtectFile},
{"CreateKeyFile", CreateKeyFile},
{"ExistKeyFile", ExistKeyFile},
{"Init", Init},
};
const Module module_Confirm = {"Confirm", functions, sizeof(functions) / sizeof(ModuleFunc)};