mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-21 23:33:36 -05:00
basic name improvements (#930)
* basic name improvements * clang-format --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
73844f14fa
commit
d106aada11
23 changed files with 90 additions and 89 deletions
|
@ -177,7 +177,7 @@ void CMainDialog::UpdateInterface()
|
|||
CheckDlgButton(IDC_CHK_FLIP_VIDEO_MEM_PAGES, currentConfigApp->m_flip_surfaces);
|
||||
CheckDlgButton(IDC_CHK_3D_VIDEO_MEMORY, currentConfigApp->m_3d_video_ram);
|
||||
BOOL full_screen = currentConfigApp->m_full_screen;
|
||||
currentConfigApp->FUN_00403810();
|
||||
currentConfigApp->AdjustDisplayBitDepthBasedOnRenderStatus();
|
||||
if (currentConfigApp->GetHardwareDeviceColorModel()) {
|
||||
CheckDlgButton(IDC_CHK_DRAW_CURSOR, TRUE);
|
||||
}
|
||||
|
@ -198,8 +198,9 @@ void CMainDialog::UpdateInterface()
|
|||
CheckDlgButton(IDC_RAD_PALETTE_16BIT, 0);
|
||||
currentConfigApp->m_display_bit_depth = 0;
|
||||
}
|
||||
GetDlgItem(IDC_RAD_PALETTE_256)->EnableWindow(full_screen && currentConfigApp->FUN_004037a0());
|
||||
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(full_screen && currentConfigApp->FUN_004037e0());
|
||||
GetDlgItem(IDC_RAD_PALETTE_256)
|
||||
->EnableWindow(full_screen && currentConfigApp->GetConditionalDeviceRenderBitDepth());
|
||||
GetDlgItem(IDC_RAD_PALETTE_16BIT)->EnableWindow(full_screen && currentConfigApp->GetDeviceRenderBitStatus());
|
||||
CheckDlgButton(IDC_CHK_3DSOUND, currentConfigApp->m_3d_sound);
|
||||
CheckDlgButton(IDC_CHK_DRAW_CURSOR, currentConfigApp->m_draw_cursor);
|
||||
switch (currentConfigApp->m_model_quality) {
|
||||
|
|
|
@ -198,7 +198,7 @@ BOOL CConfigApp::ReadRegInt(LPCSTR p_key, int* p_value) const
|
|||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x004033d0
|
||||
BOOL CConfigApp::FUN_004033d0() const
|
||||
BOOL CConfigApp::IsDeviceInBasicRGBMode() const
|
||||
{
|
||||
/*
|
||||
* BUG: should be:
|
||||
|
@ -286,7 +286,7 @@ BOOL CConfigApp::ValidateSettings()
|
|||
m_full_screen = TRUE;
|
||||
is_modified = TRUE;
|
||||
}
|
||||
if (FUN_004033d0()) {
|
||||
if (IsDeviceInBasicRGBMode()) {
|
||||
if (m_3d_video_ram) {
|
||||
m_3d_video_ram = FALSE;
|
||||
is_modified = TRUE;
|
||||
|
@ -340,9 +340,9 @@ BOOL CConfigApp::ValidateSettings()
|
|||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x004037a0
|
||||
DWORD CConfigApp::FUN_004037a0() const
|
||||
DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const
|
||||
{
|
||||
if (FUN_004033d0()) {
|
||||
if (IsDeviceInBasicRGBMode()) {
|
||||
return 0;
|
||||
}
|
||||
if (GetHardwareDeviceColorModel()) {
|
||||
|
@ -352,7 +352,7 @@ DWORD CConfigApp::FUN_004037a0() const
|
|||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x004037e0
|
||||
DWORD CConfigApp::FUN_004037e0() const
|
||||
DWORD CConfigApp::GetDeviceRenderBitStatus() const
|
||||
{
|
||||
if (GetHardwareDeviceColorModel()) {
|
||||
return m_device->m_HWDesc.dwDeviceRenderBitDepth & 0x400;
|
||||
|
@ -363,23 +363,23 @@ DWORD CConfigApp::FUN_004037e0() const
|
|||
}
|
||||
|
||||
// FUNCTION: CONFIG 0x00403810
|
||||
BOOL CConfigApp::FUN_00403810()
|
||||
BOOL CConfigApp::AdjustDisplayBitDepthBasedOnRenderStatus()
|
||||
{
|
||||
if (m_display_bit_depth == 8) {
|
||||
if (FUN_004037a0()) {
|
||||
if (GetConditionalDeviceRenderBitDepth()) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if (m_display_bit_depth == 16) {
|
||||
if (FUN_004037e0()) {
|
||||
if (GetDeviceRenderBitStatus()) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if (FUN_004037a0()) {
|
||||
if (GetConditionalDeviceRenderBitDepth()) {
|
||||
m_display_bit_depth = 8;
|
||||
return TRUE;
|
||||
}
|
||||
if (FUN_004037e0()) {
|
||||
if (GetDeviceRenderBitStatus()) {
|
||||
m_display_bit_depth = 16;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -34,14 +34,14 @@ class CConfigApp : public CWinApp {
|
|||
BOOL ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const;
|
||||
BOOL ReadRegBool(LPCSTR p_key, BOOL* p_bool) const;
|
||||
BOOL ReadRegInt(LPCSTR p_key, int* p_value) const;
|
||||
BOOL FUN_004033d0() const;
|
||||
BOOL IsDeviceInBasicRGBMode() const;
|
||||
D3DCOLORMODEL GetHardwareDeviceColorModel() const;
|
||||
BOOL IsPrimaryDriver() const;
|
||||
BOOL ReadRegisterSettings();
|
||||
BOOL ValidateSettings();
|
||||
DWORD FUN_004037a0() const;
|
||||
DWORD FUN_004037e0() const;
|
||||
BOOL FUN_00403810();
|
||||
DWORD GetConditionalDeviceRenderBitDepth() const;
|
||||
DWORD GetDeviceRenderBitStatus() const;
|
||||
BOOL AdjustDisplayBitDepthBasedOnRenderStatus();
|
||||
void CConfigApp::WriteRegisterSettings() const;
|
||||
|
||||
//{{AFX_MSG(CConfigApp)
|
||||
|
|
|
@ -54,8 +54,8 @@ class LegoCacheSoundManager {
|
|||
|
||||
virtual MxResult Tickle(); // vtable+0x00
|
||||
|
||||
LegoCacheSound* FUN_1003d170(const char* p_key);
|
||||
LegoCacheSound* FUN_1003d290(LegoCacheSound* p_sound);
|
||||
LegoCacheSound* FindSoundByKey(const char* p_key);
|
||||
LegoCacheSound* ManageSoundEntry(LegoCacheSound* p_sound);
|
||||
LegoCacheSound* FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three);
|
||||
LegoCacheSound* FUN_1003db10(LegoCacheSound* p_one, const char* p_two, MxBool p_three);
|
||||
void FUN_1003dc40(LegoCacheSound** p_und);
|
||||
|
|
|
@ -32,13 +32,13 @@ class SkateBoard : public IslePathActor {
|
|||
MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4
|
||||
void VTable0xe4() override; // vtable+0xe4
|
||||
|
||||
void FUN_10010510();
|
||||
void ActivateSceneActions();
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000ff60
|
||||
// SkateBoard::`scalar deleting destructor'
|
||||
|
||||
private:
|
||||
void FUN_10010270(MxBool p_enable);
|
||||
void EnableScenePresentation(MxBool p_enable);
|
||||
|
||||
MxBool m_unk0x160; // 0x160
|
||||
Act1State* m_act1state; // 0x164
|
||||
|
|
|
@ -340,7 +340,7 @@ MxU32 Helicopter::VTable0xd8(LegoEndAnimNotificationParam& p_param)
|
|||
void Helicopter::VTable0x74(Matrix4& p_transform)
|
||||
{
|
||||
if (m_userNavFlag) {
|
||||
m_roi->FUN_100a46b0(p_transform);
|
||||
m_roi->UpdateTransformationRelativeToParent(p_transform);
|
||||
FUN_10010c30();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -98,7 +98,7 @@ MxU32 SkateBoard::VTable0xcc()
|
|||
ControlManager()->Register(this);
|
||||
}
|
||||
|
||||
FUN_10010270(m_unk0x160);
|
||||
EnableScenePresentation(m_unk0x160);
|
||||
|
||||
Vector3 position = m_roi->GetWorldPosition();
|
||||
AnimationManager()->FUN_10064670(&position);
|
||||
|
@ -122,7 +122,7 @@ MxU32 SkateBoard::VTable0xd4(LegoControlManagerEvent& p_param)
|
|||
|
||||
// FUNCTION: LEGO1 0x10010270
|
||||
// FUNCTION: BETA10 0x100f5366
|
||||
void SkateBoard::FUN_10010270(MxBool p_enable)
|
||||
void SkateBoard::EnableScenePresentation(MxBool p_enable)
|
||||
{
|
||||
m_act1state = (Act1State*) GameState()->GetState("Act1State");
|
||||
if (!m_act1state) {
|
||||
|
@ -142,12 +142,12 @@ void SkateBoard::FUN_10010270(MxBool p_enable)
|
|||
// FUNCTION: BETA10 0x100f5472
|
||||
MxU32 SkateBoard::VTable0xd0()
|
||||
{
|
||||
FUN_10010270(m_unk0x160);
|
||||
EnableScenePresentation(m_unk0x160);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10010510
|
||||
void SkateBoard::FUN_10010510()
|
||||
void SkateBoard::ActivateSceneActions()
|
||||
{
|
||||
if (m_act1state->m_unk0x018 != 3) {
|
||||
PlayMusic(JukeboxScript::c_BeachBlvd_Music);
|
||||
|
|
|
@ -61,7 +61,7 @@ MxResult LegoCacheSoundManager::Tickle()
|
|||
}
|
||||
|
||||
// STUB: LEGO1 0x1003d170
|
||||
LegoCacheSound* LegoCacheSoundManager::FUN_1003d170(const char* p_key)
|
||||
LegoCacheSound* LegoCacheSoundManager::FindSoundByKey(const char* p_key)
|
||||
{
|
||||
// TODO
|
||||
char* x = new char[strlen(p_key) + 1];
|
||||
|
@ -78,7 +78,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003d170(const char* p_key)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003d290
|
||||
LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
|
||||
LegoCacheSound* LegoCacheSoundManager::ManageSoundEntry(LegoCacheSound* p_sound)
|
||||
{
|
||||
Set100d6b4c::iterator it = m_set.find(LegoCacheSoundEntry(p_sound));
|
||||
if (it != m_set.end()) {
|
||||
|
@ -107,7 +107,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003d290(LegoCacheSound* p_sound)
|
|||
LegoCacheSound* LegoCacheSoundManager::FUN_1003dae0(const char* p_one, const char* p_two, MxBool p_three)
|
||||
{
|
||||
// DECOMP: Second parameter is LegoRoi::m_name (0xe4)
|
||||
return FUN_1003db10(FUN_1003d170(p_one), p_two, p_three);
|
||||
return FUN_1003db10(FindSoundByKey(p_one), p_two, p_three);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003db10
|
||||
|
@ -121,7 +121,7 @@ LegoCacheSound* LegoCacheSoundManager::FUN_1003db10(LegoCacheSound* p_one, const
|
|||
LegoCacheSound* result = p_one->FUN_10006960();
|
||||
|
||||
if (result) {
|
||||
LegoCacheSound* t = FUN_1003d290(result);
|
||||
LegoCacheSound* t = ManageSoundEntry(result);
|
||||
t->FUN_10006a30(p_two, p_three);
|
||||
return t;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ MxResult LegoLoadCacheSoundPresenter::PutData()
|
|||
m_criticalSection.Enter();
|
||||
|
||||
if (m_currentTickleState == e_done) {
|
||||
m_cacheSound = SoundManager()->GetCacheSoundManager()->FUN_1003d290(m_cacheSound);
|
||||
m_cacheSound = SoundManager()->GetCacheSoundManager()->ManageSoundEntry(m_cacheSound);
|
||||
m_unk0x7c = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ void LegoBuildingManager::UpdatePosition(MxS32 p_index, LegoWorld* p_world)
|
|||
AdjustHeight(p_index);
|
||||
MxMatrix mat = roi->GetLocal2World();
|
||||
mat[3][1] = g_buildingInfo[p_index].m_unk0x014;
|
||||
roi->FUN_100a46b0(mat);
|
||||
roi->UpdateTransformationRelativeToParent(mat);
|
||||
VideoManager()->Get3DManager()->Moved(*roi);
|
||||
}
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ void LegoBuildingManager::ScheduleAnimation(LegoEntity* p_entity, MxU32 p_length
|
|||
m_world = CurrentWorld();
|
||||
|
||||
if (p_haveSound) {
|
||||
m_sound = SoundManager()->GetCacheSoundManager()->FUN_1003d170("bcrash");
|
||||
m_sound = SoundManager()->GetCacheSoundManager()->FindSoundByKey("bcrash");
|
||||
m_sound->FUN_10006cb0(35, 60);
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ void LegoBuildingManager::FUN_10030590()
|
|||
LegoROI* roi = g_buildingInfo[i].m_entity->GetROI();
|
||||
MxMatrix mat = roi->GetLocal2World();
|
||||
mat[3][1] = g_buildingInfo[i].m_unk0x014;
|
||||
roi->FUN_100a46b0(mat);
|
||||
roi->UpdateTransformationRelativeToParent(mat);
|
||||
VideoManager()->Get3DManager()->Moved(*roi);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ MxBool LegoCharacterManager::FUN_100849a0(LegoROI* p_roi, LegoTextureInfo* p_tex
|
|||
lodList = dupLodList;
|
||||
|
||||
if (head->GetUnknown0xe0() >= 0) {
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->FUN_100a66a0(head);
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveROIDetailFromScene(head);
|
||||
}
|
||||
|
||||
head->SetLODList(lodList);
|
||||
|
@ -744,7 +744,7 @@ MxBool LegoCharacterManager::SwitchHat(LegoROI* p_roi)
|
|||
lodList = dupLodList;
|
||||
|
||||
if (childROI->GetUnknown0xe0() >= 0) {
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->FUN_100a66a0(childROI);
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveROIDetailFromScene(childROI);
|
||||
}
|
||||
|
||||
childROI->SetLODList(lodList);
|
||||
|
|
|
@ -130,7 +130,7 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
|||
mat
|
||||
);
|
||||
|
||||
m_roi->FUN_100a46b0(mat);
|
||||
m_roi->UpdateTransformationRelativeToParent(mat);
|
||||
}
|
||||
|
||||
m_roi->SetEntity(this);
|
||||
|
@ -170,7 +170,7 @@ void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_directi
|
|||
mat
|
||||
);
|
||||
|
||||
m_roi->FUN_100a46b0(mat);
|
||||
m_roi->UpdateTransformationRelativeToParent(mat);
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_roi);
|
||||
|
||||
if (p_und) {
|
||||
|
|
|
@ -135,7 +135,7 @@ MxResult LegoPathActor::VTable0x88(
|
|||
}
|
||||
|
||||
right.EqualsCross(&up, &dir);
|
||||
m_roi->FUN_100a46b0(matrix);
|
||||
m_roi->UpdateTransformationRelativeToParent(matrix);
|
||||
|
||||
if (!m_cameraFlag || !m_userNavFlag) {
|
||||
p5.EqualsCross(p_boundary->GetUnknown0x14(), &p3);
|
||||
|
@ -201,7 +201,7 @@ MxResult LegoPathActor::VTable0x84(
|
|||
}
|
||||
|
||||
right.EqualsCross(&up, &dir);
|
||||
m_roi->FUN_100a46b0(matrix);
|
||||
m_roi->UpdateTransformationRelativeToParent(matrix);
|
||||
|
||||
if (!m_cameraFlag || !m_userNavFlag) {
|
||||
p5.EqualsCross(p_boundary->GetUnknown0x14(), &p3);
|
||||
|
|
|
@ -180,7 +180,7 @@ MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
|
|||
Mx3DPointFloat(m_action->GetUp().GetX(), m_action->GetUp().GetY(), m_action->GetUp().GetZ()),
|
||||
mat
|
||||
);
|
||||
m_roi->FUN_100a46b0(mat);
|
||||
m_roi->UpdateTransformationRelativeToParent(mat);
|
||||
|
||||
result = SUCCESS;
|
||||
|
||||
|
|
|
@ -940,7 +940,7 @@ MxLong Isle::HandleTransitionEnd()
|
|||
FUN_10032d30(IsleScript::c_SkatePizza_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE);
|
||||
|
||||
if (!m_act1state->m_unk0x01f) {
|
||||
m_skateboard->FUN_10010510();
|
||||
m_skateboard->ActivateSceneActions();
|
||||
}
|
||||
break;
|
||||
case LegoGameState::e_ambulance:
|
||||
|
|
|
@ -28,10 +28,10 @@ class MxRegionCursor : public MxCore {
|
|||
virtual void Reset(); // vtable+0x3c
|
||||
|
||||
private:
|
||||
void FUN_100c46c0(MxRegionLeftRightList& p_leftRightList);
|
||||
void ResetAndInitializeCursor(MxRegionLeftRightList& p_leftRightList);
|
||||
void UpdateRect(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom);
|
||||
void FUN_100c4a20(MxRect32& p_rect);
|
||||
void FUN_100c4b50(MxRect32& p_rect);
|
||||
void ProcessRectOverlapAscending(MxRect32& p_rect);
|
||||
void ProcessOverlapWithRect(MxRect32& p_rect);
|
||||
|
||||
MxRegion* m_region; // 0x08
|
||||
MxRect32* m_rect; // 0x0c
|
||||
|
|
|
@ -64,8 +64,8 @@ struct MxRegionTopBottom {
|
|||
~MxRegionTopBottom() { delete m_leftRightList; }
|
||||
|
||||
MxRegionTopBottom* Clone();
|
||||
void FUN_100c5280(MxS32 p_left, MxS32 p_right);
|
||||
MxBool FUN_100c57b0(MxRect32& p_rect);
|
||||
void MergeOrExpandRegions(MxS32 p_left, MxS32 p_right);
|
||||
MxBool CheckHorizontalOverlap(MxRect32& p_rect);
|
||||
|
||||
inline MxS32 GetTop() { return m_top; }
|
||||
inline MxS32 GetBottom() { return m_bottom; }
|
||||
|
|
|
@ -67,12 +67,12 @@ void MxRegion::VTable0x18(MxRect32& p_rect)
|
|||
MxRegionTopBottom* newTopBottom = topBottom->Clone();
|
||||
newTopBottom->SetBottom(rect.GetBottom());
|
||||
topBottom->SetTop(rect.GetBottom());
|
||||
newTopBottom->FUN_100c5280(rect.GetLeft(), rect.GetRight());
|
||||
newTopBottom->MergeOrExpandRegions(rect.GetLeft(), rect.GetRight());
|
||||
cursor.Prepend(newTopBottom);
|
||||
rect.SetTop(rect.GetBottom());
|
||||
}
|
||||
else {
|
||||
topBottom->FUN_100c5280(rect.GetLeft(), rect.GetRight());
|
||||
topBottom->MergeOrExpandRegions(rect.GetLeft(), rect.GetRight());
|
||||
rect.SetTop(topBottom->GetBottom());
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ MxBool MxRegion::VTable0x1c(MxRect32& p_rect)
|
|||
if (topBottom->GetTop() >= p_rect.GetBottom()) {
|
||||
return FALSE;
|
||||
}
|
||||
if (topBottom->GetBottom() > p_rect.GetTop() && topBottom->FUN_100c57b0(p_rect)) {
|
||||
if (topBottom->GetBottom() > p_rect.GetTop() && topBottom->CheckHorizontalOverlap(p_rect)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ MxRegionTopBottom::MxRegionTopBottom(MxRect32& p_rect)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c5280
|
||||
void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
|
||||
void MxRegionTopBottom::MergeOrExpandRegions(MxS32 p_left, MxS32 p_right)
|
||||
{
|
||||
MxRegionLeftRightListCursor a(m_leftRightList);
|
||||
MxRegionLeftRightListCursor b(m_leftRightList);
|
||||
|
@ -190,7 +190,7 @@ MxRegionTopBottom* MxRegionTopBottom::Clone()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c57b0
|
||||
MxBool MxRegionTopBottom::FUN_100c57b0(MxRect32& p_rect)
|
||||
MxBool MxRegionTopBottom::CheckHorizontalOverlap(MxRect32& p_rect)
|
||||
{
|
||||
MxRegionLeftRightListCursor cursor(m_leftRightList);
|
||||
MxRegionLeftRight* leftRight;
|
||||
|
|
|
@ -34,7 +34,7 @@ MxRect32* MxRegionCursor::VTable0x18()
|
|||
|
||||
MxRegionTopBottom* topBottom;
|
||||
if (m_topBottomCursor->Current(topBottom)) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
|
||||
MxRegionLeftRight* leftRight;
|
||||
m_leftRightCursor->First(leftRight);
|
||||
|
@ -55,7 +55,7 @@ MxRect32* MxRegionCursor::VTable0x20()
|
|||
|
||||
MxRegionTopBottom* topBottom;
|
||||
if (m_topBottomCursor->Current(topBottom)) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
|
||||
MxRegionLeftRight* leftRight;
|
||||
m_leftRightCursor->Last(leftRight);
|
||||
|
@ -83,7 +83,7 @@ MxRect32* MxRegionCursor::VTable0x28()
|
|||
}
|
||||
|
||||
if (m_topBottomCursor->Next(topBottom)) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
m_leftRightCursor->First(leftRight);
|
||||
|
||||
UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom());
|
||||
|
@ -108,7 +108,7 @@ MxRect32* MxRegionCursor::VTable0x30()
|
|||
}
|
||||
|
||||
if (m_topBottomCursor->Prev(topBottom)) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
m_leftRightCursor->Last(leftRight);
|
||||
|
||||
UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom());
|
||||
|
@ -123,7 +123,7 @@ MxRect32* MxRegionCursor::VTable0x30()
|
|||
MxRect32* MxRegionCursor::VTable0x14(MxRect32& p_rect)
|
||||
{
|
||||
m_topBottomCursor->Reset();
|
||||
FUN_100c4a20(p_rect);
|
||||
ProcessRectOverlapAscending(p_rect);
|
||||
return m_rect;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ MxRect32* MxRegionCursor::VTable0x14(MxRect32& p_rect)
|
|||
MxRect32* MxRegionCursor::VTable0x1c(MxRect32& p_rect)
|
||||
{
|
||||
m_topBottomCursor->Reset();
|
||||
FUN_100c4b50(p_rect);
|
||||
ProcessOverlapWithRect(p_rect);
|
||||
return m_rect;
|
||||
}
|
||||
|
||||
|
@ -150,11 +150,11 @@ MxRect32* MxRegionCursor::VTable0x24(MxRect32& p_rect)
|
|||
m_rect->Intersect(p_rect);
|
||||
}
|
||||
else {
|
||||
FUN_100c4a20(p_rect);
|
||||
ProcessRectOverlapAscending(p_rect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
FUN_100c4a20(p_rect);
|
||||
ProcessRectOverlapAscending(p_rect);
|
||||
}
|
||||
|
||||
return m_rect;
|
||||
|
@ -175,11 +175,11 @@ MxRect32* MxRegionCursor::VTable0x2c(MxRect32& p_rect)
|
|||
m_rect->Intersect(p_rect);
|
||||
}
|
||||
else {
|
||||
FUN_100c4b50(p_rect);
|
||||
ProcessOverlapWithRect(p_rect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
FUN_100c4b50(p_rect);
|
||||
ProcessOverlapWithRect(p_rect);
|
||||
}
|
||||
|
||||
return m_rect;
|
||||
|
@ -202,7 +202,7 @@ void MxRegionCursor::Reset()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c46c0
|
||||
void MxRegionCursor::FUN_100c46c0(MxRegionLeftRightList& p_leftRightList)
|
||||
void MxRegionCursor::ResetAndInitializeCursor(MxRegionLeftRightList& p_leftRightList)
|
||||
{
|
||||
if (m_leftRightCursor) {
|
||||
delete m_leftRightCursor;
|
||||
|
@ -225,7 +225,7 @@ void MxRegionCursor::UpdateRect(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c4a20
|
||||
void MxRegionCursor::FUN_100c4a20(MxRect32& p_rect)
|
||||
void MxRegionCursor::ProcessRectOverlapAscending(MxRect32& p_rect)
|
||||
{
|
||||
MxRegionTopBottom* topBottom;
|
||||
while (m_topBottomCursor->Next(topBottom)) {
|
||||
|
@ -235,7 +235,7 @@ void MxRegionCursor::FUN_100c4a20(MxRect32& p_rect)
|
|||
}
|
||||
|
||||
if (p_rect.GetTop() < topBottom->GetBottom()) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
|
||||
MxRegionLeftRight* leftRight;
|
||||
while (m_leftRightCursor->Next(leftRight)) {
|
||||
|
@ -261,7 +261,7 @@ void MxRegionCursor::FUN_100c4a20(MxRect32& p_rect)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c4b50
|
||||
void MxRegionCursor::FUN_100c4b50(MxRect32& p_rect)
|
||||
void MxRegionCursor::ProcessOverlapWithRect(MxRect32& p_rect)
|
||||
{
|
||||
MxRegionTopBottom* topBottom;
|
||||
while (m_topBottomCursor->Prev(topBottom)) {
|
||||
|
@ -271,7 +271,7 @@ void MxRegionCursor::FUN_100c4b50(MxRect32& p_rect)
|
|||
}
|
||||
|
||||
if (topBottom->GetTop() < p_rect.GetBottom()) {
|
||||
FUN_100c46c0(*topBottom->m_leftRightList);
|
||||
ResetAndInitializeCursor(*topBottom->m_leftRightList);
|
||||
|
||||
MxRegionLeftRight* leftRight;
|
||||
while (m_leftRightCursor->Prev(leftRight)) {
|
||||
|
|
|
@ -28,7 +28,7 @@ void OrientableROI::WrappedSetLocalTransform(const Matrix4& p_transform)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a46b0
|
||||
void OrientableROI::FUN_100a46b0(const Matrix4& p_transform)
|
||||
void OrientableROI::UpdateTransformationRelativeToParent(const Matrix4& p_transform)
|
||||
{
|
||||
MxMatrix mat;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class OrientableROI : public ROI {
|
|||
virtual void UpdateWorldVelocity(); // vtable+0x2c
|
||||
|
||||
void WrappedSetLocalTransform(const Matrix4& p_transform);
|
||||
void FUN_100a46b0(const Matrix4& p_transform);
|
||||
void UpdateTransformationRelativeToParent(const Matrix4& p_transform);
|
||||
void WrappedVTable0x24(const Matrix4& p_transform);
|
||||
void GetLocalTransform(Matrix4& p_transform);
|
||||
void FUN_100a58f0(const Matrix4& p_transform);
|
||||
|
|
|
@ -97,7 +97,7 @@ void ViewManager::Remove(ViewROI* p_roi)
|
|||
rois.erase(it);
|
||||
|
||||
if (p_roi->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0(p_roi);
|
||||
RemoveROIDetailFromScene(p_roi);
|
||||
}
|
||||
|
||||
const CompoundObject* comp = p_roi->GetComp();
|
||||
|
@ -105,7 +105,7 @@ void ViewManager::Remove(ViewROI* p_roi)
|
|||
if (comp != NULL) {
|
||||
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
|
||||
if (((ViewROI*) *it)->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0((ViewROI*) *it);
|
||||
RemoveROIDetailFromScene((ViewROI*) *it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void ViewManager::RemoveAll(ViewROI* p_roi)
|
|||
}
|
||||
else {
|
||||
if (p_roi->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0(p_roi);
|
||||
RemoveROIDetailFromScene(p_roi);
|
||||
}
|
||||
|
||||
p_roi->SetUnknown0xe0(-1);
|
||||
|
@ -144,7 +144,7 @@ void ViewManager::RemoveAll(ViewROI* p_roi)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a65b0
|
||||
void ViewManager::FUN_100a65b0(ViewROI* p_roi, int p_und)
|
||||
void ViewManager::UpdateROIDetailBasedOnLOD(ViewROI* p_roi, int p_und)
|
||||
{
|
||||
if (p_roi->GetLODCount() <= p_und) {
|
||||
p_und = p_roi->GetLODCount() - 1;
|
||||
|
@ -197,7 +197,7 @@ void ViewManager::FUN_100a65b0(ViewROI* p_roi, int p_und)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a66a0
|
||||
void ViewManager::FUN_100a66a0(ViewROI* p_roi)
|
||||
void ViewManager::RemoveROIDetailFromScene(ViewROI* p_roi)
|
||||
{
|
||||
const ViewLOD* lod = (const ViewLOD*) p_roi->GetLOD(p_roi->GetUnknown0xe0());
|
||||
|
||||
|
@ -218,10 +218,10 @@ void ViewManager::FUN_100a66a0(ViewROI* p_roi)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a66f0
|
||||
inline void ViewManager::FUN_100a66f0(ViewROI* p_roi, int p_und)
|
||||
inline void ViewManager::ManageVisibilityAndDetailRecursively(ViewROI* p_roi, int p_und)
|
||||
{
|
||||
if (!p_roi->GetVisibility() && p_und != -2) {
|
||||
FUN_100a66f0(p_roi, -2);
|
||||
ManageVisibilityAndDetailRecursively(p_roi, -2);
|
||||
}
|
||||
else {
|
||||
const CompoundObject* comp = p_roi->GetComp();
|
||||
|
@ -235,7 +235,7 @@ inline void ViewManager::FUN_100a66f0(ViewROI* p_roi, int p_und)
|
|||
return;
|
||||
}
|
||||
|
||||
FUN_100a66f0(p_roi, -2);
|
||||
ManageVisibilityAndDetailRecursively(p_roi, -2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -245,19 +245,19 @@ inline void ViewManager::FUN_100a66f0(ViewROI* p_roi, int p_und)
|
|||
|
||||
if (p_und == -2) {
|
||||
if (p_roi->GetUnknown0xe0() >= 0) {
|
||||
FUN_100a66a0(p_roi);
|
||||
RemoveROIDetailFromScene(p_roi);
|
||||
p_roi->SetUnknown0xe0(-2);
|
||||
}
|
||||
|
||||
if (comp != NULL) {
|
||||
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
|
||||
FUN_100a66f0((ViewROI*) *it, p_und);
|
||||
ManageVisibilityAndDetailRecursively((ViewROI*) *it, p_und);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (comp == NULL) {
|
||||
if (p_roi->GetLODs() != NULL && p_roi->GetLODCount() > 0) {
|
||||
FUN_100a65b0(p_roi, p_und);
|
||||
UpdateROIDetailBasedOnLOD(p_roi, p_und);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ inline void ViewManager::FUN_100a66f0(ViewROI* p_roi, int p_und)
|
|||
p_roi->SetUnknown0xe0(-1);
|
||||
|
||||
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
|
||||
FUN_100a66f0((ViewROI*) *it, p_und);
|
||||
ManageVisibilityAndDetailRecursively((ViewROI*) *it, p_und);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -284,11 +284,11 @@ void ViewManager::Update(float p_previousRenderTime, float)
|
|||
Unknown();
|
||||
}
|
||||
else if (flags & c_bit2) {
|
||||
FUN_100a6b90();
|
||||
UpdateViewTransformations();
|
||||
}
|
||||
|
||||
for (CompoundObject::iterator it = rois.begin(); it != rois.end(); it++) {
|
||||
FUN_100a66f0((ViewROI*) *it, -1);
|
||||
ManageVisibilityAndDetailRecursively((ViewROI*) *it, -1);
|
||||
}
|
||||
|
||||
stopWatch.Stop();
|
||||
|
@ -343,7 +343,7 @@ inline int ViewManager::Unknown()
|
|||
*unk0x90 = fVar3;
|
||||
// clang-format on
|
||||
|
||||
FUN_100a6b90();
|
||||
UpdateViewTransformations();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ inline int ViewManager::Unknown3(ViewROI* p_roi)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100a6b90
|
||||
void ViewManager::FUN_100a6b90()
|
||||
void ViewManager::UpdateViewTransformations()
|
||||
{
|
||||
flags &= ~c_bit2;
|
||||
|
||||
|
|
|
@ -24,17 +24,17 @@ class ViewManager {
|
|||
void Remove(ViewROI* p_roi);
|
||||
void RemoveAll(ViewROI* p_roi);
|
||||
unsigned int FUN_100a6150(const BoundingBox& p_bounding_box);
|
||||
void FUN_100a65b0(ViewROI* p_roi, int p_und);
|
||||
void FUN_100a66a0(ViewROI* p_roi);
|
||||
void UpdateROIDetailBasedOnLOD(ViewROI* p_roi, int p_und);
|
||||
void RemoveROIDetailFromScene(ViewROI* p_roi);
|
||||
void SetPOVSource(const OrientableROI* point_of_view);
|
||||
float ProjectedSize(const BoundingSphere& p_bounding_sphere);
|
||||
ViewROI* Pick(Tgl::View* p_view, unsigned long x, unsigned long y);
|
||||
void SetResolution(int width, int height);
|
||||
void SetFrustrum(float fov, float front, float back);
|
||||
inline void FUN_100a66f0(ViewROI* p_roi, int p_und);
|
||||
inline void ManageVisibilityAndDetailRecursively(ViewROI* p_roi, int p_und);
|
||||
void Update(float p_previousRenderTime, float);
|
||||
inline int Unknown();
|
||||
void FUN_100a6b90();
|
||||
void UpdateViewTransformations();
|
||||
|
||||
inline static int Unknown2(float p_und1, float p_und2, ViewROI* p_roi);
|
||||
inline static int Unknown3(ViewROI* p_roi);
|
||||
|
|
Loading…
Reference in a new issue