Merge remote-tracking branch 'upstream/master' into match/videomgr-skycolor

This commit is contained in:
Misha 2023-10-08 13:39:51 -04:00
commit 4a1f3f8f3f
8 changed files with 120 additions and 49 deletions

View File

@ -250,16 +250,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
break;
}
if (g_mousedown == 0) {
LAB_00401bc7:
if (g_mousemoved) {
g_mousemoved = FALSE;
}
} else if (g_mousemoved) {
if (g_isle) {
g_isle->Tick(0);
}
goto LAB_00401bc7;
if (g_mousedown && g_mousemoved && g_isle) {
g_isle->Tick(0);
}
if (g_mousemoved) {
g_mousemoved = FALSE;
}
}
}

View File

@ -1,17 +1,18 @@
#include "mxcompositepresenter.h"
#include "decomp.h"
#include "mxnotificationmanager.h"
DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c);
// OFFSET: LEGO1 0x100b60b0 STUB
// OFFSET: LEGO1 0x100b60b0
MxCompositePresenter::MxCompositePresenter()
{
// TODO
NotificationManager()->Register(this);
}
// OFFSET: LEGO1 0x100b6390 STUB
// OFFSET: LEGO1 0x100b6390
MxCompositePresenter::~MxCompositePresenter()
{
// TODO
NotificationManager()->Unregister(this);
}

View File

@ -2,6 +2,7 @@
#define MXCOMPOSITEPRESENTER_H
#include "mxpresenter.h"
#include "mxunklist.h"
// VTABLE 0x100dc618
// SIZE 0x4c
@ -24,9 +25,7 @@ class MxCompositePresenter : public MxPresenter
return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name);
}
undefined m_unk40;
undefined4 *m_unk44;
undefined4 m_unk48;
MxUnkList m_list;
};
#endif // MXCOMPOSITEPRESENTER_H

View File

@ -5,6 +5,7 @@
#include "mxstreamprovider.h"
#include "mxthread.h"
#include "mxcriticalsection.h"
#include "mxunklist.h"
class MxDiskStreamProvider;
@ -23,32 +24,6 @@ class MxDiskStreamProviderThread : public MxThread
MxDiskStreamProvider *m_target;
};
// TODO
struct MxDiskStreamListNode {
MxDiskStreamListNode *m_unk00;
MxDiskStreamListNode *m_unk04;
undefined4 m_unk08;
};
// TODO
struct MxDiskStreamList {
inline MxDiskStreamList() {
undefined unk;
this->m_unk00 = unk;
MxDiskStreamListNode *node = new MxDiskStreamListNode();
node->m_unk00 = node;
node->m_unk04 = node;
this->m_head = node;
this->m_count = 0;
}
undefined m_unk00;
MxDiskStreamListNode *m_head;
MxU32 m_count;
};
// VTABLE 0x100dd138
class MxDiskStreamProvider : public MxStreamProvider
{
@ -80,7 +55,7 @@ class MxDiskStreamProvider : public MxStreamProvider
undefined m_remainingWork; // 0x34
undefined m_unk35; // 0x35
MxCriticalSection m_criticalSection; // 0x38
MxDiskStreamList m_list;
MxUnkList m_list;
};
#endif // MXDISKSTREAMPROVIDER_H

View File

@ -2,6 +2,12 @@
DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50);
// OFFSET: LEGO1 0x1000c550
MxMediaPresenter::~MxMediaPresenter()
{
Destroy(TRUE);
}
// OFFSET: LEGO1 0x100b5d10 STUB
MxResult MxMediaPresenter::Tickle()
{
@ -18,6 +24,56 @@ void MxMediaPresenter::Init()
this->m_unk4c = NULL;
}
// OFFSET: LEGO1 0x100b54f0 STUB
void MxMediaPresenter::Destroy(MxBool p_destroy)
{
// TODO
}
// OFFSET: LEGO1 0x100b5d90 STUB
void MxMediaPresenter::StreamingTickle()
{
// TODO
}
// OFFSET: LEGO1 0x100b5e10 STUB
void MxMediaPresenter::RepeatingTickle()
{
// TODO
}
// OFFSET: LEGO1 0x100b5ef0
void MxMediaPresenter::DoneTickle()
{
m_previousTickleStates |= 1 << m_currentTickleState;
m_currentTickleState = TickleState_Idle;
EndAction();
}
// OFFSET: LEGO1 0x100b6030 STUB
void MxMediaPresenter::Enable(MxBool p_enable)
{
// TODO
}
// OFFSET: LEGO1 0x1000c5b0
void MxMediaPresenter::InitVirtual()
{
Destroy(FALSE);
}
// OFFSET: LEGO1 0x100b5700 STUB
MxLong MxMediaPresenter::StartAction(MxStreamController * p_controller, MxDSAction * p_action)
{
return 0;
}
// OFFSET: LEGO1 0x100b5bc0 STUB
void MxMediaPresenter::EndAction()
{
// TODO
}
// OFFSET: LEGO1 0x100b5f10 STUB
void MxMediaPresenter::VTable0x58()
{

View File

@ -13,8 +13,9 @@ class MxMediaPresenter : public MxPresenter
{
Init();
}
virtual ~MxMediaPresenter() override;
virtual MxResult Tickle() override; // vtable+0x8, override MxCore
virtual MxResult Tickle() override;
// OFFSET: LEGO1 0x1000c5c0
inline virtual const char *ClassName() const override // vtable+0xc
@ -29,7 +30,14 @@ class MxMediaPresenter : public MxPresenter
return !strcmp(name, MxMediaPresenter::ClassName()) || MxPresenter::IsA(name);
}
virtual void VTable0x58(); // vtable+0x58
virtual void StreamingTickle() override;
virtual void RepeatingTickle() override;
virtual void DoneTickle() override;
virtual void InitVirtual() override;
virtual MxLong StartAction(MxStreamController *, MxDSAction *) override;
virtual void EndAction() override;
virtual void Enable(MxBool p_enable) override;
virtual void VTable0x58();
undefined4 m_unk40;
undefined4 m_unk44;
@ -37,6 +45,7 @@ class MxMediaPresenter : public MxPresenter
undefined4 m_unk4c;
private:
void Init();
void Destroy(MxBool);
};

View File

@ -78,8 +78,6 @@ class MxPresenter : public MxCore
protected:
__declspec(dllexport) void Init();
void SendTo_unkPresenter(MxOmni *);
private:
TickleState m_currentTickleState; // 0x8
MxU32 m_previousTickleStates;
MxPoint32 m_location;

37
LEGO1/mxunklist.h Normal file
View File

@ -0,0 +1,37 @@
#ifndef MXUNKLIST_H
#define MXUNKLIST_H
#include "decomp.h"
#include "mxtypes.h"
/*
* This is an as-of-yet unknown list-like data structure.
* The class hierarchy/structure isn't quite correct yet.
*/
struct MxUnkListNode {
MxUnkListNode *m_unk00;
MxUnkListNode *m_unk04;
undefined4 m_unk08;
};
class MxUnkList {
public:
inline MxUnkList() {
undefined unk;
this->m_unk00 = unk;
MxUnkListNode *node = new MxUnkListNode();
node->m_unk00 = node;
node->m_unk04 = node;
this->m_head = node;
this->m_count = 0;
}
undefined m_unk00;
MxUnkListNode *m_head;
MxU32 m_count;
};
#endif // MXUNKLIST_H