mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-29 02:08:01 +03:00
We only support a fixed set of modules, so dynamic linking isn't really necessary. This paves the way for running System3.9 games on more platforms. NIGHTDLL is temporarily disabled, because many symbols conflict with the SACT module.
54 lines
1.1 KiB
C
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();
|
|
|
|
DEBUG_COMMAND_YET("Confirm.Init %d:\n", p1);
|
|
}
|
|
|
|
static void ExistKeyFile() {
|
|
char *p1 = sys_getString(0);
|
|
int *p2 = getCaliVariable();
|
|
int *var = getCaliVariable();
|
|
|
|
*var = 1;
|
|
|
|
DEBUG_COMMAND_YET("Confirm.ExistKeyFile %s,%p,%p:\n",p1, p2, var);
|
|
}
|
|
|
|
static void CheckProtectFile() {
|
|
char *p1 = sys_getString(0);
|
|
int *p2 = getCaliVariable();
|
|
int *var = getCaliVariable();
|
|
|
|
*var = 1;
|
|
|
|
DEBUG_COMMAND_YET("Confirm.CheckProtectFile %s,%p,%p:\n", p1,p2,var);
|
|
}
|
|
|
|
static void CreateKeyFile() {
|
|
char *p1 = sys_getString(0);
|
|
int *p2 = getCaliVariable();
|
|
int *var = getCaliVariable();
|
|
|
|
*var = 1;
|
|
|
|
DEBUG_COMMAND_YET("Confirm.CreateKeyFile %s,%p,%p:\n", 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)};
|