WIP
This commit is contained in:
53
game_re/gh_fix/Erm_fn_v_UpdateLastError.cxx
Normal file
53
game_re/gh_fix/Erm_fn_v_UpdateLastError.cxx
Normal file
@@ -0,0 +1,53 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
extern "C" {
|
||||
void r3_noop(void *p_cTxt1, void *p_cTxt2); // 00401100 // r3_noop
|
||||
tdstLastErrorInfo *Erm_fn_p_stFindstMyLastErrorInfo(
|
||||
ulong ulChannelId); // 0043e2b0 // Erm_fn_p_stFindstMyLastErrorInfo
|
||||
|
||||
// 0043e410
|
||||
/* Check CpaError.h */
|
||||
|
||||
void Erm_fn_v_UpdateLastError(ushort uwStartOfWarningsId, byte ucModuleId,
|
||||
ulong ulChannelId, ushort uwErrNum,
|
||||
long lDebugData, uchar ucOpenInfoWindow,
|
||||
uchar ucStopForDebug, char *szPersonalMsg)
|
||||
|
||||
{
|
||||
tdstLastErrorInfo *ptVar2;
|
||||
|
||||
ptVar2 = Erm_fn_p_stFindstMyLastErrorInfo(ulChannelId);
|
||||
if (ptVar2 == (tdstLastErrorInfo *)0x0) {
|
||||
throw std::runtime_error(
|
||||
fmt::format("{} {}", s_Error_in_the_Erm__005bd374,
|
||||
s_There_is_no_more_Channel_error_t_005bd388));
|
||||
}
|
||||
if (ptVar2->lastErr != 0) {
|
||||
throw std::runtime_error(
|
||||
fmt::format("{}", s_Strange__The_last_error_was_neve_005bd348));
|
||||
}
|
||||
ptVar2->lastErr = uwErrNum;
|
||||
ptVar2->ucLastFailedModuleId = ucModuleId;
|
||||
ptVar2->ulChannelId = ulChannelId;
|
||||
if (uwErrNum < uwStartOfWarningsId) {
|
||||
if (szPersonalMsg == (char *)0x0) {
|
||||
throw std::runtime_error(fmt::format(
|
||||
"Unkown fatal error ({}, module: {})", uwErrNum, ucModuleId));
|
||||
} else {
|
||||
throw std::runtime_error(
|
||||
fmt::format("Unkown fatal error ({}, module: {}, {})", uwErrNum,
|
||||
ucModuleId, szPersonalMsg));
|
||||
}
|
||||
}
|
||||
if (szPersonalMsg == (char *)0x0) {
|
||||
return;
|
||||
} else {
|
||||
SPDLOG_WARN("Erm_Warn: {}, module: {}, {}", uwErrNum, ucModuleId,
|
||||
szPersonalMsg);
|
||||
}
|
||||
}
|
||||
}
|
26
game_re/gh_fix/FUN_0043ff60.cxx
Normal file
26
game_re/gh_fix/FUN_0043ff60.cxx
Normal file
@@ -0,0 +1,26 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// 0043ff60
|
||||
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
||||
|
||||
void FUN_0043ff60(float param_1,float param_2,float param_3)
|
||||
|
||||
{
|
||||
longlong lVar1;
|
||||
longlong lVar2;
|
||||
longlong lVar3;
|
||||
|
||||
lVar1 = r3_ftol(param_1 * 255.0);
|
||||
lVar2 = r3_ftol(param_2 * 255.0);
|
||||
lVar3 = r3_ftol(param_3 * 255.0);
|
||||
DAT_007a2c14 = ((int)lVar1 << 8 | (uint)lVar2) << 8 | (uint)lVar3;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
16
game_re/gh_fix/binkInit.cxx
Normal file
16
game_re/gh_fix/binkInit.cxx
Normal file
@@ -0,0 +1,16 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
#include <bink.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// 00441e40
|
||||
void binkInit(void) {
|
||||
BinkSetSoundSystem(&BinkOpenDirectSound, 0);
|
||||
BinkSetSoundOnOff(0, 0);
|
||||
BinkSetIOSize(0x80000000);
|
||||
return;
|
||||
}
|
||||
}
|
13
game_re/gh_fix/r3_checkCmdlineLevel.cxx
Normal file
13
game_re/gh_fix/r3_checkCmdlineLevel.cxx
Normal file
@@ -0,0 +1,13 @@
|
||||
// AUTO-GENERATED FILE!!!!
|
||||
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
|
||||
// with possible manualy fixes
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
#include <stdexcept>
|
||||
|
||||
// 00445580
|
||||
// r3_checkCmdlineLevel
|
||||
extern "C" void r3_checkCmdlineLevel(void) {
|
||||
// NOOP
|
||||
}
|
24
game_re/gh_fix/r3_initUnusedSM.cxx
Normal file
24
game_re/gh_fix/r3_initUnusedSM.cxx
Normal file
@@ -0,0 +1,24 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// 0045d2e0
|
||||
void r3_initUnusedSM(void)
|
||||
|
||||
{
|
||||
WORD_007d9e68 = 1;
|
||||
/* 0x53 */
|
||||
sz_S[0] = s_S_005bf008[0];
|
||||
sz_S[1] = s_S_005bf008[1];
|
||||
WORD_007d9e6c = 2;
|
||||
/* 0x4d */
|
||||
sz_M[0] = s_M_005bf004[0];
|
||||
sz_M[1] = s_M_005bf004[1];
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
24
game_re/gh_fix/r3_module10_init.cxx
Normal file
24
game_re/gh_fix/r3_module10_init.cxx
Normal file
@@ -0,0 +1,24 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
|
||||
extern "C" {
|
||||
void Erm_fn_v_UpdateLastError(ushort uwStartOfWarningsId, byte ucModuleId, ulong ulChannelId, ushort uwErrNum, long lDebugData, uchar ucOpenInfoWindow, uchar ucStopForDebug, char * szPersonalMsg); // 0043e410 // Erm_fn_v_UpdateLastError
|
||||
byte Erm_fn_ucInitErrMsg(void); // 0043e1d0 // Erm_fn_ucInitErrMsg
|
||||
|
||||
// 00504ef0
|
||||
void r3_module10_init(void)
|
||||
|
||||
{
|
||||
/* 0x104ef0 95 IPT_fn_vFirstInitInput */
|
||||
if (g_errMod10 == 0xff) {
|
||||
g_errMod10 = Erm_fn_ucInitErrMsg();
|
||||
return;
|
||||
}
|
||||
Erm_fn_v_UpdateLastError(3,g_errMod0,0,4,-1,0xff,0xff,(char *)0x0);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
29
game_re/gh_fix/r3_validateBinkVideoQuality.cxx
Normal file
29
game_re/gh_fix/r3_validateBinkVideoQuality.cxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// AUTO-GENERATED FILE, MOVE TO 'gh_fix' FOLDER PREVENT OVERWRITING!!!!!
|
||||
|
||||
#include <r3/binders/auto.h>
|
||||
#include <gh_global.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// 00442090
|
||||
void r3_validateBinkVideoQuality(byte videoBpp, byte wantedVideoQuality)
|
||||
|
||||
{
|
||||
byte bVar1;
|
||||
|
||||
bVar1 = wantedVideoQuality;
|
||||
if (4 < wantedVideoQuality) {
|
||||
bVar1 = 4;
|
||||
}
|
||||
g_bink_realVideoQuality = g_bink_wantedVideoQuality;
|
||||
if ((g_bink_wantedVideoQuality <= bVar1) &&
|
||||
(g_bink_realVideoQuality = 4, wantedVideoQuality < 5)) {
|
||||
g_bink_realVideoQuality = wantedVideoQuality;
|
||||
}
|
||||
wantedVideoQuality = (uint)g_bink_realVideoQuality;
|
||||
g_bink_videoBpp = videoBpp;
|
||||
g_bink_wantedVideoQualityPlus1 = wantedVideoQuality + 1;
|
||||
DAT_007a2e0c = -(uint)(wantedVideoQuality != 0) & 0x80000000;
|
||||
return;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user