mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Refactor file names based on BETA10
This commit is contained in:
parent
afa5b90117
commit
01042acfb0
@ -131,6 +131,7 @@ add_library(mxdirectx STATIC
|
||||
LEGO1/mxdirectx/mxdirect3d.cpp
|
||||
LEGO1/mxdirectx/mxdirectdraw.cpp
|
||||
LEGO1/mxdirectx/mxdirectxinfo.cpp
|
||||
LEGO1/mxdirectx/legodxinfo.cpp
|
||||
)
|
||||
register_lego1_target(mxdirectx)
|
||||
set_property(TARGET mxdirectx PROPERTY ARCHIVE_OUTPUT_NAME "MxDirectX$<$<CONFIG:Debug>:d>")
|
||||
@ -288,7 +289,7 @@ add_library(lego1 SHARED
|
||||
LEGO1/define.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act2actor.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act2genactor.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3actor.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3actors.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3brickster.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3cop.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act3shark.cpp
|
||||
@ -466,6 +467,7 @@ endif()
|
||||
if (ISLE_BUILD_CONFIG)
|
||||
add_executable(config WIN32
|
||||
LEGO1/mxdirectx/mxdirectxinfo.cpp
|
||||
LEGO1/mxdirectx/legodxinfo.cpp
|
||||
CONFIG/config.cpp
|
||||
CONFIG/ConfigCommandLineInfo.cpp
|
||||
CONFIG/AboutDlg.cpp
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
#ifndef ACT3ACTOR_H
|
||||
#define ACT3ACTOR_H
|
||||
#ifndef ACT3ACTORS_H
|
||||
#define ACT3ACTORS_H
|
||||
|
||||
#include "legoanimactor.h"
|
||||
|
||||
// File name verified by multiple assertions, e.g. BETA10 0x10018391
|
||||
|
||||
// VTABLE: LEGO1 0x100d7668 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d7738 LegoAnimActor
|
||||
// VTABLE: BETA10 0x101b8a98 LegoPathActor
|
||||
// SIZE 0x178
|
||||
class Act3Actor : public LegoAnimActor {
|
||||
public:
|
||||
@ -30,4 +33,4 @@ class Act3Actor : public LegoAnimActor {
|
||||
undefined4 m_unk0x1c; // 0x1c
|
||||
};
|
||||
|
||||
#endif // ACT3ACTOR_H
|
||||
#endif // ACT3ACTORS_H
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef ACT3BRICKSTER_H
|
||||
#define ACT3BRICKSTER_H
|
||||
|
||||
#include "act3actor.h"
|
||||
#include "act3actors.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d7838 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d7908 LegoAnimActor
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef ACT3COP_H
|
||||
#define ACT3COP_H
|
||||
|
||||
#include "act3actor.h"
|
||||
#include "act3actors.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d7750 LegoPathActor
|
||||
// VTABLE: LEGO1 0x100d7820 LegoAnimActor
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "act3actor.h"
|
||||
#include "act3actors.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act3Actor, 0x178)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include "act2genactor.h"
|
||||
#include "act2policestation.h"
|
||||
#include "act3.h"
|
||||
#include "act3actor.h"
|
||||
#include "act3actors.h"
|
||||
#include "act3brickster.h"
|
||||
#include "act3cop.h"
|
||||
#include "act3shark.h"
|
||||
|
||||
68
LEGO1/mxdirectx/legodxinfo.cpp
Normal file
68
LEGO1/mxdirectx/legodxinfo.cpp
Normal file
@ -0,0 +1,68 @@
|
||||
#include "mxdirectxinfo.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h> // for vsprintf
|
||||
|
||||
// File name validated by BETA10 0x1011cba3; directory unknown
|
||||
|
||||
// FUNCTION: CONFIG 0x004027d0
|
||||
// FUNCTION: BETA10 0x1011cb70
|
||||
int MxDeviceEnumerate::FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo)
|
||||
const
|
||||
{
|
||||
int number = 0;
|
||||
assert(p_ddInfo && p_d3dInfo);
|
||||
|
||||
for (list<MxDriver>::const_iterator it = m_list.begin(); it != m_list.end(); it++, number++) {
|
||||
if (&(*it) == p_ddInfo) {
|
||||
GUID4 guid;
|
||||
memcpy(&guid, p_d3dInfo->m_guid, sizeof(GUID4));
|
||||
|
||||
sprintf(p_buffer, "%d 0x%x 0x%x 0x%x 0x%x", number, guid.m_data1, guid.m_data2, guid.m_data3, guid.m_data4);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402620
|
||||
// FUNCTION: LEGO1 0x1009cf20
|
||||
// FUNCTION: BETA10 0x1011c8b3
|
||||
int MxDeviceEnumerate::ProcessDeviceBytes(int p_deviceNum, GUID& p_guid)
|
||||
{
|
||||
if (!IsInitialized()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
||||
static_assert(sizeof(GUID4) == sizeof(GUID), "Equal size");
|
||||
|
||||
GUID4 deviceGuid;
|
||||
memcpy(&deviceGuid, &p_guid, sizeof(GUID4));
|
||||
|
||||
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++, i++) {
|
||||
if (p_deviceNum >= 0 && p_deviceNum < i) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
GUID4 compareGuid;
|
||||
MxDriver& driver = *it;
|
||||
for (list<Direct3DDeviceInfo>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
|
||||
Direct3DDeviceInfo& md3d = *it2;
|
||||
assert(md3d.m_guid);
|
||||
|
||||
memcpy(&compareGuid, md3d.m_guid, sizeof(GUID4));
|
||||
|
||||
if (GUID4::Compare(compareGuid, deviceGuid) && i == p_deviceNum) {
|
||||
return j;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -603,47 +603,6 @@ int MxDeviceEnumerate::ParseDeviceName(const char* p_deviceId)
|
||||
return result;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402620
|
||||
// FUNCTION: LEGO1 0x1009cf20
|
||||
// FUNCTION: BETA10 0x1011c8b3
|
||||
int MxDeviceEnumerate::ProcessDeviceBytes(int p_deviceNum, GUID& p_guid)
|
||||
{
|
||||
if (!IsInitialized()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
||||
static_assert(sizeof(GUID4) == sizeof(GUID), "Equal size");
|
||||
|
||||
GUID4 deviceGuid;
|
||||
memcpy(&deviceGuid, &p_guid, sizeof(GUID4));
|
||||
|
||||
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++, i++) {
|
||||
if (p_deviceNum >= 0 && p_deviceNum < i) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
GUID4 compareGuid;
|
||||
MxDriver& driver = *it;
|
||||
for (list<Direct3DDeviceInfo>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
|
||||
Direct3DDeviceInfo& md3d = *it2;
|
||||
assert(md3d.m_guid);
|
||||
|
||||
memcpy(&compareGuid, md3d.m_guid, sizeof(GUID4));
|
||||
|
||||
if (GUID4::Compare(compareGuid, deviceGuid) && i == p_deviceNum) {
|
||||
return j;
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00402730
|
||||
// FUNCTION: LEGO1 0x1009d030
|
||||
// FUNCTION: BETA10 0x1011ca54
|
||||
@ -671,27 +630,6 @@ int MxDeviceEnumerate::GetDevice(int p_deviceNum, MxDriver*& p_driver, Direct3DD
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x004027d0
|
||||
// FUNCTION: BETA10 0x1011cb70
|
||||
int MxDeviceEnumerate::FormatDeviceName(char* p_buffer, const MxDriver* p_ddInfo, const Direct3DDeviceInfo* p_d3dInfo)
|
||||
const
|
||||
{
|
||||
int number = 0;
|
||||
assert(p_ddInfo && p_d3dInfo);
|
||||
|
||||
for (list<MxDriver>::const_iterator it = m_list.begin(); it != m_list.end(); it++, number++) {
|
||||
if (&(*it) == p_ddInfo) {
|
||||
GUID4 guid;
|
||||
memcpy(&guid, p_d3dInfo->m_guid, sizeof(GUID4));
|
||||
|
||||
sprintf(p_buffer, "%d 0x%x 0x%x 0x%x 0x%x", number, guid.m_data1, guid.m_data2, guid.m_data3, guid.m_data4);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x1011cc65
|
||||
int MxDeviceEnumerate::BETA_1011cc65(int p_idx, char* p_buffer)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user