mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Fix compiler errors
This commit is contained in:
parent
52d9b951a5
commit
6a92b6d944
@ -4,7 +4,7 @@
|
||||
#include "config.h"
|
||||
#include "res/resource.h"
|
||||
|
||||
#include <mxdirectx/mxdirectxinfo.h>
|
||||
#include <mxdirectx/legodxinfo.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(CDialog, 0x60)
|
||||
DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include "detectdx5.h"
|
||||
|
||||
#include <direct.h> // _chdir
|
||||
#include <mxdirectx/legodxinfo.h>
|
||||
#include <mxdirectx/mxdirect3d.h>
|
||||
#include <process.h> // _spawnl
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "legoinputmanager.h"
|
||||
#include "legomain.h"
|
||||
#include "misc.h"
|
||||
#include "mxdirectx/legodxinfo.h"
|
||||
#include "mxdirectx/mxdirect3d.h"
|
||||
#include "mxdirectx/mxstopwatch.h"
|
||||
#include "mxdisplaysurface.h"
|
||||
|
||||
@ -26,6 +26,39 @@ int LegoDeviceEnumerate::FormatDeviceName(char* p_buffer, const MxDriver* p_ddIn
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402560
|
||||
// FUNCTION: LEGO1 0x1009ce60
|
||||
// FUNCTION: BETA10 0x1011c7e0
|
||||
int LegoDeviceEnumerate::ParseDeviceName(const char* p_deviceId)
|
||||
{
|
||||
if (!IsInitialized()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int unknown = -1;
|
||||
int num = -1;
|
||||
int hex[4];
|
||||
|
||||
if (sscanf(p_deviceId, "%d 0x%x 0x%x 0x%x 0x%x", &num, &hex[0], &hex[1], &hex[2], &hex[3]) != 5) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (num < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
GUID guid;
|
||||
memcpy(&guid, hex, sizeof(guid));
|
||||
|
||||
int result = ProcessDeviceBytes(num, guid);
|
||||
|
||||
if (result < 0) {
|
||||
result = ProcessDeviceBytes(-1, guid);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402620
|
||||
// FUNCTION: LEGO1 0x1009cf20
|
||||
// FUNCTION: BETA10 0x1011c8b3
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
// VTABLE: BETA10 0x101befb4
|
||||
// SIZE 0x14
|
||||
class LegoDeviceEnumerate : public MxDeviceEnumerate {
|
||||
public:
|
||||
int ProcessDeviceBytes(int p_deviceNum, GUID& p_guid);
|
||||
int ParseDeviceName(const char* p_deviceId);
|
||||
int FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo) const;
|
||||
|
||||
// SYNTHETIC: BETA10 0x100d8d10
|
||||
|
||||
@ -570,39 +570,6 @@ const char* MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error)
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402560
|
||||
// FUNCTION: LEGO1 0x1009ce60
|
||||
// FUNCTION: BETA10 0x1011c7e0
|
||||
int MxDeviceEnumerate::ParseDeviceName(const char* p_deviceId)
|
||||
{
|
||||
if (!IsInitialized()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int unknown = -1;
|
||||
int num = -1;
|
||||
int hex[4];
|
||||
|
||||
if (sscanf(p_deviceId, "%d 0x%x 0x%x 0x%x 0x%x", &num, &hex[0], &hex[1], &hex[2], &hex[3]) != 5) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (num < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
GUID guid;
|
||||
memcpy(&guid, hex, sizeof(guid));
|
||||
|
||||
int result = ProcessDeviceBytes(num, guid);
|
||||
|
||||
if (result < 0) {
|
||||
result = ProcessDeviceBytes(-1, guid);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402730
|
||||
// FUNCTION: LEGO1 0x1009d030
|
||||
// FUNCTION: BETA10 0x1011ca54
|
||||
|
||||
@ -203,7 +203,6 @@ class MxDeviceEnumerate {
|
||||
LPD3DDEVICEDESC p_HELDesc
|
||||
);
|
||||
const char* EnumerateErrorToString(HRESULT p_error);
|
||||
int ParseDeviceName(const char* p_deviceId);
|
||||
int GetDevice(int p_deviceNum, MxDriver*& p_driver, Direct3DDeviceInfo*& p_device);
|
||||
int BETA_1011cc65(int p_idx, char* p_buffer);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user