Files
SatyandClaude Opus 5.5 a8e251eb85 Base: Base, CmdLine, ConvertUTF, Coordinate, Sort
Port the remaining Base block A pieces: global/context init, the
command-line option table, UTF-8/16 conversion (sgetu8/sputu8), the
coordinate/aspect helpers and the context qsort. All functions verified
against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:46:00 +02:00

47 lines
1.6 KiB
C++

#include <cstdint>
#include "Engine/Source/Base/CmdLine.h"
#include "Engine/Source/Storm/H/storm.h"
// STATIC: 0x009E9CB0
static const _ARGLIST s_argList[] = {
{ SCMD_TYPE_BOOL, CMD_D3D, "d3d", nullptr },
{ SCMD_TYPE_BOOL, CMD_D3D9EX, "d3d9ex", nullptr },
{ SCMD_TYPE_STRING, CMD_DATA_DIR, "datadir", nullptr },
{ SCMD_TYPE_BOOL, CMD_NO_LAG_FIX, "nolagfix", nullptr },
{ SCMD_TYPE_STRING, CMD_LOADFILE, "loadfile", nullptr },
{ SCMD_TYPE_STRING, CMD_GAMETYPE, "gametype", nullptr },
{ SCMD_TYPE_BOOL, CMD_OPENGL, "opengl", nullptr },
{ SCMD_TYPE_BOOL, CMD_SW_TNL, "swtnl", nullptr },
{ SCMD_TYPE_BOOL, CMD_TIMEDEMO, "timedemo", nullptr },
{ SCMD_TYPE_STRING, CMD_DEMOREZ, "rez", nullptr },
{ SCMD_TYPE_STRING, CMD_DEMODEPTH, "depth", nullptr },
{ SCMD_TYPE_STRING, CMD_DEMODETAIL, "detail", nullptr },
{ SCMD_TYPE_STRING, CMD_DEMOSOUND, "sound", nullptr },
{ SCMD_TYPE_BOOL, CMD_FULL_SCREEN, "fullscreen", nullptr },
{ SCMD_TYPE_BOOL, CMD_22050HZ, "22050", nullptr },
{ SCMD_TYPE_BOOL, CMD_NO_WARNINGS, "nowarnings", nullptr },
};
// VERIFY: 51748a1e auto
// OFFSET: 0x0047B6F0
int32_t CmdLineGetBool(CMDOPT opt) {
return SCmdGetBool(opt);
}
// VERIFY: aa7e8705 auto
// OFFSET: 0x0047B700
const char* CmdLineGetString(CMDOPT opt) {
// STATIC: 0x00B414E8
static char buffer[260];
SCmdGetString(opt, buffer, sizeof(buffer));
return buffer;
}
// VERIFY: 1b140400 auto
// OFFSET: 0x0047B720
int32_t CmdLineProcess() {
SCmdRegisterArgList(s_argList, sizeof(s_argList) / sizeof(s_argList[0]));
return SCmdProcessCommandLine(nullptr, nullptr);
}