mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-18 19:12:44 +03:00
fix(build): make project compilable
This commit is contained in:
parent
e77ed33b0c
commit
bf734b5b20
@ -21,6 +21,7 @@
|
||||
#include "util/Filesystem.hpp"
|
||||
#include <bc/Debug.hpp>
|
||||
#include <common/Prop.hpp>
|
||||
#include <common/Time.hpp>
|
||||
#include <storm/Error.hpp>
|
||||
#include <storm/Log.hpp>
|
||||
#include <bc/os/Path.hpp>
|
||||
@ -468,6 +469,7 @@ int32_t InitializeGlobal() {
|
||||
// );
|
||||
|
||||
// sub_86D430(v8->m_intValue);
|
||||
OsTimeStartup(SystemMethod2);
|
||||
|
||||
// ConsoleCommandRegister("timingInfo", (int)sub_4032A0, 0, 0);
|
||||
|
||||
|
@ -199,20 +199,6 @@ int32_t CCGxRestart(const char*, const char*) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
EGxApi GxApiDefault() {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
return GxApi_D3d9;
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
return GxApi_GLL;
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_LINUX)
|
||||
return GxApi_GLSDL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void RegisterGxCVars() {
|
||||
const auto& format = s_defaults.format;
|
||||
|
||||
@ -331,7 +317,7 @@ void ConsoleDeviceInitialize(const char* title) {
|
||||
// TODO: sub_76BA30(&unk_CABB38, &byte_CABCBD); << ConsoleDetect
|
||||
// TODO: byte_CABCBC = 1;
|
||||
|
||||
if (CmdLineGetBool(WOWCMD_HW_DETECT) || s_cvHwDetect->GetInt() != 0) {
|
||||
if (CmdLineGetBool(CMD_HW_DETECT) || s_cvHwDetect->GetInt() != 0) {
|
||||
s_hwDetect = true;
|
||||
s_cvHwDetect->Set("0", true, false, false, true);
|
||||
} else {
|
||||
@ -339,7 +325,7 @@ void ConsoleDeviceInitialize(const char* title) {
|
||||
}
|
||||
|
||||
|
||||
ConsoleAccessSetEnabled(CmdLineGetBool(WOWCMD_CONSOLE));
|
||||
ConsoleAccessSetEnabled(CmdLineGetBool(CMD_CONSOLE));
|
||||
|
||||
// TODO: sub_76B520(&unk_CABAF0, &unk_CABB38);
|
||||
|
||||
@ -365,19 +351,19 @@ void ConsoleDeviceInitialize(const char* title) {
|
||||
|
||||
GxLog("ConsoleDeviceInitialize(): hwDetect = %d, hwChanged = %d", s_hwDetect, s_hwChanged);
|
||||
|
||||
if (CmdLineGetBool(WOWCMD_RES_800x600)) {
|
||||
if (CmdLineGetBool(CMD_RES_800x600)) {
|
||||
s_requestedFormat.size.x = 800;
|
||||
s_requestedFormat.size.y = 600;
|
||||
} else if (CmdLineGetBool(WOWCMD_RES_1024x768)) {
|
||||
} else if (CmdLineGetBool(CMD_RES_1024x768)) {
|
||||
s_requestedFormat.size.x = 1024;
|
||||
s_requestedFormat.size.y = 768;
|
||||
} else if (CmdLineGetBool(WOWCMD_RES_1280x960)) {
|
||||
} else if (CmdLineGetBool(CMD_RES_1280x960)) {
|
||||
s_requestedFormat.size.x = 1280;
|
||||
s_requestedFormat.size.y = 960;
|
||||
} else if (CmdLineGetBool(WOWCMD_RES_1280x1024)) {
|
||||
} else if (CmdLineGetBool(CMD_RES_1280x1024)) {
|
||||
s_requestedFormat.size.x = 1280;
|
||||
s_requestedFormat.size.y = 1024;
|
||||
} else if (CmdLineGetBool(WOWCMD_RES_1600x1200)) {
|
||||
} else if (CmdLineGetBool(CMD_RES_1600x1200)) {
|
||||
s_requestedFormat.size.x = 1600;
|
||||
s_requestedFormat.size.y = 1200;
|
||||
}
|
||||
@ -406,7 +392,7 @@ void ConsoleDeviceInitialize(const char* title) {
|
||||
|
||||
auto gxApiName = s_cvGxApi->GetString();
|
||||
|
||||
auto gxOverride = CmdLineGetString(WOWCMD_GX_OVERRIDE);
|
||||
auto gxOverride = CmdLineGetString(CMD_GX_OVERRIDE);
|
||||
if (*gxOverride != '\0') {
|
||||
gxApiName = gxOverride;
|
||||
} else if (CmdLineGetBool(CMD_OPENGL)) {
|
||||
@ -432,7 +418,7 @@ void ConsoleDeviceInitialize(const char* title) {
|
||||
bool windowed = s_cvGxWindow->GetInt() != 0;
|
||||
if (CmdLineGetBool(CMD_FULL_SCREEN)) {
|
||||
windowed = false;
|
||||
} else if (CmdLineGetBool(WOWCMD_WINDOWED)) {
|
||||
} else if (CmdLineGetBool(CMD_WINDOWED)) {
|
||||
windowed = true;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ class CGxCaps {
|
||||
int32_t m_texFilterAnisotropic = 0;
|
||||
uint32_t m_maxTexAnisotropy = 0;
|
||||
int32_t m_depthBias = 0;
|
||||
int32_t m_hardwareCursor = 0;
|
||||
int32_t m_hwCursor = 0;
|
||||
int32_t int130 = 1;
|
||||
int32_t int134 = 0;
|
||||
int32_t int138 = 0;
|
||||
|
@ -196,7 +196,7 @@ bool CGxDevice::AdapterMonitorModes(TSGrowableArray<CGxMonitorMode>& modes) {
|
||||
dm.dmSize = sizeof(DEVMODE);
|
||||
|
||||
DWORD i = 0;
|
||||
while (EnumDisplaySettings(&device, i, &dm)) {
|
||||
while (EnumDisplaySettings(device.DeviceName, i, &dm)) {
|
||||
if ((dm.dmPelsWidth >= 640 && dm.dmPelsHeight >= 480)
|
||||
&& dm.dmBitsPerPel >= 16) {
|
||||
auto mode = modes.New();
|
||||
@ -1366,7 +1366,7 @@ void CGxDevice::XformSetViewport(float minX, float maxX, float minY, float maxY,
|
||||
return;
|
||||
}
|
||||
|
||||
this->intF6C = 1;
|
||||
this->m_needsReset = 1;
|
||||
|
||||
this->m_viewport.x.l = minX;
|
||||
this->m_viewport.x.h = maxX;
|
||||
|
@ -111,7 +111,7 @@ class CGxDevice {
|
||||
TSFixedArray<CGxStateBom> m_hwRenderStates;
|
||||
uint32_t m_baseMipLevel = 0; // TODO placeholder
|
||||
int32_t m_cursorVisible = 0;
|
||||
int32_t m_hardwareCursor = 0;
|
||||
int32_t m_hwCursor = 0;
|
||||
uint32_t m_cursorHotspotX = 0;
|
||||
uint32_t m_cursorHotspotY = 0;
|
||||
uint32_t m_cursor[CURSOR_IMAGE_SIZE] = { 0 };
|
||||
|
@ -116,7 +116,3 @@ bool GxApiSupported(EGxApi api) {
|
||||
bool GxAdapterMonitorModes(TSGrowableArray<CGxMonitorMode>& modes) {
|
||||
return CGxDevice::AdapterMonitorModes(modes);
|
||||
}
|
||||
|
||||
void GxLogOpen() {
|
||||
CGxDevice::LogOpen();
|
||||
}
|
||||
|
@ -17,4 +17,6 @@ void* GxDevWindow();
|
||||
|
||||
int32_t GxMasterEnable(EGxMasterEnables state);
|
||||
|
||||
EGxApi GxApiDefault();
|
||||
|
||||
#endif
|
||||
|
@ -530,7 +530,7 @@ void CGxDeviceD3d::DeviceWM(EGxWM wm, uintptr_t param1, uintptr_t param2) {
|
||||
|
||||
// TODO
|
||||
|
||||
this->intF6C = 1;
|
||||
this->m_needsReset = 1;
|
||||
|
||||
return;
|
||||
} else {
|
||||
@ -538,7 +538,7 @@ void CGxDeviceD3d::DeviceWM(EGxWM wm, uintptr_t param1, uintptr_t param2) {
|
||||
}
|
||||
}
|
||||
|
||||
this->intF6C = 1;
|
||||
this->m_needsReset = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1276,11 +1276,6 @@ void CGxDeviceD3d::CursorSetVisible(int32_t visible) {
|
||||
}
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::CursorUnlock(uint32_t x, uint32_t y) {
|
||||
CGxDevice::CursorUnlock(x, y);
|
||||
this->m_hwCursorNeedsUpdate = 1;
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::ICursorDraw() {
|
||||
if (!this->m_hwCursor) {
|
||||
this->ISceneBegin();
|
||||
@ -1746,7 +1741,7 @@ void CGxDeviceD3d::IStateSync() {
|
||||
|
||||
// TODO
|
||||
|
||||
if (this->intF6C) {
|
||||
if (this->m_needsReset) {
|
||||
this->IXformSetViewport();
|
||||
}
|
||||
}
|
||||
@ -2124,7 +2119,7 @@ void CGxDeviceD3d::IXformSetViewport() {
|
||||
|
||||
this->m_d3dDevice->SetViewport(&d3dViewport);
|
||||
|
||||
this->intF6C = 0;
|
||||
this->m_needsReset = 0;
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::IXformSetWorld() {
|
||||
@ -2159,7 +2154,7 @@ void CGxDeviceD3d::SceneClear(uint32_t mask, CImVector color) {
|
||||
flags |= 0x2;
|
||||
}
|
||||
|
||||
if (this->intF6C) {
|
||||
if (this->m_needsReset) {
|
||||
this->IXformSetViewport();
|
||||
}
|
||||
|
||||
@ -2203,7 +2198,7 @@ int32_t CGxDeviceD3d::StereoEnabled() {
|
||||
return this->m_d3dStereoEnabled == 1;
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::CursorUnlock() {
|
||||
void CGxDeviceD3d::CursorUnlock(uint32_t x, uint32_t y) {
|
||||
CGxDevice::CursorUnlock(x, y);
|
||||
this->m_hwCursorNeedsUpdate = 1;
|
||||
}
|
||||
|
@ -229,6 +229,7 @@ class CGxDeviceD3d : public CGxDevice {
|
||||
LPDIRECT3DDEVICE9 m_d3dDevice = nullptr;
|
||||
D3DCAPS9 m_d3dCaps;
|
||||
int32_t m_d3dIsHwDevice = 0;
|
||||
int32_t m_d3dStereoEnabled = 0;
|
||||
LPDIRECT3DVERTEXDECLARATION9 m_d3dVertexDecl[GxVertexBufferFormats_Last] = { 0 };
|
||||
D3DDISPLAYMODE m_desktopDisplayMode;
|
||||
int32_t m_inScene;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <storm/Array.hpp>
|
||||
#include <storm/String.hpp>
|
||||
#include <tempest/Vector.hpp>
|
||||
#include <common/Time.hpp>
|
||||
|
||||
const char* g_glueScriptEvents[41];
|
||||
const char* g_scriptEvents[722];
|
||||
@ -98,12 +99,6 @@ const char* FrameScript_EventObject::GetName() {
|
||||
return this->m_key.m_str;
|
||||
}
|
||||
|
||||
int64_t OsGetAsyncClocksPerSecond() {
|
||||
// TODO
|
||||
|
||||
return 1000.0;
|
||||
}
|
||||
|
||||
int32_t FrameScript_CompileFunction(const char* name, const char* wrapper, const char* body, CStatus* status) {
|
||||
lua_State* L = FrameScript::s_context;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user