mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Define MxLong/MxULong (#71)
* define MxLong/MxULong The "long" type has different sizes on different platforms, and this may cause issues. * use DWORD to match RegQueryValueExA arg
This commit is contained in:
@@ -37,4 +37,4 @@ int g_reqEnableRMDevice = 0;
|
||||
int g_startupDelay = 200;
|
||||
|
||||
// 0x4101c0
|
||||
long g_lastFrameTime = 0;
|
||||
MxLong g_lastFrameTime = 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef DEFINE_H
|
||||
#define DEFINE_H
|
||||
|
||||
#include <mxtypes.h>
|
||||
#include <windows.h>
|
||||
|
||||
class IsleApp;
|
||||
@@ -21,6 +22,6 @@ extern int g_targetHeight;
|
||||
extern int g_targetDepth;
|
||||
extern int g_reqEnableRMDevice;
|
||||
extern int g_startupDelay;
|
||||
extern long g_lastFrameTime;
|
||||
extern MxLong g_lastFrameTime;
|
||||
|
||||
#endif // DEFINE_H
|
||||
|
||||
@@ -95,7 +95,7 @@ void IsleApp::Close()
|
||||
TransitionManager()->SetWaitIndicator(NULL);
|
||||
Lego()->vtable3c();
|
||||
|
||||
long lVar8;
|
||||
MxLong lVar8;
|
||||
do {
|
||||
lVar8 = Streamer()->Close(NULL);
|
||||
} while (lVar8 == 0);
|
||||
@@ -571,7 +571,7 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
DWORD valueType;
|
||||
|
||||
BOOL out = FALSE;
|
||||
unsigned long size = outSize;
|
||||
DWORD size = outSize;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
||||
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
|
||||
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
|
||||
@@ -695,7 +695,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||
if (!TickleManager()) return;
|
||||
if (!Timer()) return;
|
||||
|
||||
long currentTime = Timer()->GetRealTime();
|
||||
MxLong currentTime = Timer()->GetRealTime();
|
||||
if (currentTime < g_lastFrameTime) {
|
||||
g_lastFrameTime = -this->m_frameDelta;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
// 40
|
||||
int m_islandTexture;
|
||||
int m_gameStarted;
|
||||
long m_frameDelta;
|
||||
MxLong m_frameDelta;
|
||||
|
||||
// 4c
|
||||
MxVideoParam m_videoParam;
|
||||
|
||||
Reference in New Issue
Block a user