From 30989aec9cea0fed6b62641319fb35cd113fcb64 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 18 Jun 2023 13:45:39 +0200 Subject: [PATCH 1/3] add Lego3DManager and related, fix a function signature --- ISLE/isle.cpp | 7 ++----- LEGO1/lego3dmanager.h | 17 +++++++++++++++++ LEGO1/lego3dview.h | 16 ++++++++++++++++ LEGO1/legoomni.cpp | 5 +++++ LEGO1/legoomni.h | 6 ++++-- LEGO1/legovideomanager.h | 11 ++++++----- 6 files changed, 50 insertions(+), 12 deletions(-) create mode 100755 LEGO1/lego3dmanager.h create mode 100755 LEGO1/lego3dview.h diff --git a/ISLE/isle.cpp b/ISLE/isle.cpp index e3483cd5..96479e93 100644 --- a/ISLE/isle.cpp +++ b/ISLE/isle.cpp @@ -85,10 +85,7 @@ void Isle::close() InputManager()->QueueEvent(KEYDOWN, 0, 0, 0, 0x20); } - // FIXME: Untangle - //VideoManager()->GetViewManager()->RemoveAll(NULL); - //ViewManager::RemoveAll - // (*(ViewManager **)(*(int *)(*(int *)(pLVar4 + 0x68) + 8) + 0x88), NULL); + VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveAll(NULL); long local_88 = 0; Lego()->RemoveWorld(ds.m_atomId, local_88); @@ -102,7 +99,7 @@ void Isle::close() } while (lVar8 == 0); while (Lego()) { - if (Lego()->vtable28(ds) != 0) { + if (Lego()->vtable28(ds) != MX_FALSE) { break; } diff --git a/LEGO1/lego3dmanager.h b/LEGO1/lego3dmanager.h new file mode 100755 index 00000000..3e4de5ce --- /dev/null +++ b/LEGO1/lego3dmanager.h @@ -0,0 +1,17 @@ +#ifndef LEGO3DMANAGER_H +#define LEGO3DMANAGER_H + +#include "lego3dview.h" + +class Lego3DManager +{ +public: + inline Lego3DView *GetLego3DView() { return this->m_3dView; } + +private: + int m_unk00; + int m_unk04; + Lego3DView *m_3dView; +}; + +#endif // LEGO3DMANAGER_H diff --git a/LEGO1/lego3dview.h b/LEGO1/lego3dview.h new file mode 100755 index 00000000..3ab2da30 --- /dev/null +++ b/LEGO1/lego3dview.h @@ -0,0 +1,16 @@ +#ifndef LEGO3DVIEW_H +#define LEGO3DVIEW_H + +#include "viewmanager.h" + +class Lego3DView +{ +public: + inline ViewManager *GetViewManager() { return this->m_viewManager; } + +private: + char unknown[0x88]; + ViewManager *m_viewManager; +}; + +#endif // LEGO3DVIEW_H diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index e43be3bd..5ab9e866 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -11,3 +11,8 @@ LegoOmni *Lego() { return LegoOmni::GetInstance(); } + +LegoVideoManager *VideoManager() +{ + return LegoOmni::GetInstance()->GetVideoManager(); +} \ No newline at end of file diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 1d4d92ef..42421e22 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -28,6 +28,7 @@ class MxMusicManager; class MxNotificationManager; class MxSoundManager; +// class LegoOmni : public MxOmni class LegoOmni { public: @@ -48,7 +49,7 @@ class LegoOmni virtual void vtable1c(); virtual void vtable20(); virtual void vtable24(MxDSAction &ds); - virtual int vtable28(MxDSAction &ds); + virtual MxBool vtable28(MxDSAction &ds); virtual void vtable2c(); virtual void vtable30(); virtual void vtable34(); @@ -56,6 +57,7 @@ class LegoOmni virtual void vtable3c(); virtual unsigned char vtable40(); + LegoVideoManager *GetVideoManager() { return m_videoMgr; } LegoInputManager *GetInputManager() { return m_inputMgr; } private: @@ -69,7 +71,7 @@ class LegoOmni int m_unk20; int m_unk24; int m_unk28; - int m_unk2c; + LegoVideoManager *m_videoMgr; int m_unk30; int m_unk34; int m_unk38; diff --git a/LEGO1/legovideomanager.h b/LEGO1/legovideomanager.h index fd370715..a221504f 100644 --- a/LEGO1/legovideomanager.h +++ b/LEGO1/legovideomanager.h @@ -1,17 +1,19 @@ #ifndef LEGOVIDEOMANAGER_H #define LEGOVIDEOMANAGER_H +#include "lego3dmanager.h" + +// class LegoVideoManager : public MxVideoManager class LegoVideoManager { public: __declspec(dllexport) int EnableRMDevice(); - __declspec(dllexport) int DisableRMDevice(); - __declspec(dllexport) void EnableFullScreenMovie(unsigned char a, unsigned char b); - __declspec(dllexport) void MoveCursor(int x, int y); + inline Lego3DManager *Get3DManager() { return this->m_3dManager; } + int m_unk00; int m_unk04; int m_unk08; @@ -38,11 +40,10 @@ class LegoVideoManager int m_unk5c; int m_unk60; int m_unk64; - int m_unk68; + Lego3DManager *m_3dManager; int m_unk6c; int m_unk70; int *m_unk74; - }; #endif // LEGOVIDEOMANAGER_H From e648bcb43954a8f047a3980fdb6eeaa02c701006 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 18 Jun 2023 13:59:56 +0200 Subject: [PATCH 2/3] add updated project files --- isle.mak | 18 ++++++++++++++++++ isle.mdp | Bin 51200 -> 48640 bytes 2 files changed, 18 insertions(+) diff --git a/isle.mak b/isle.mak index 2913bc72..66a85f7f 100644 --- a/isle.mak +++ b/isle.mak @@ -485,6 +485,8 @@ SOURCE=.\LEGO1\dllmain.cpp SOURCE=.\LEGO1\legoomni.cpp DEP_CPP_LEGOO=\ + ".\LEGO1\lego3dmanager.h"\ + ".\LEGO1\lego3dview.h"\ ".\LEGO1\legoanimationmanager.h"\ ".\LEGO1\legobuildingmanager.h"\ ".\LEGO1\legoentity.h"\ @@ -518,6 +520,7 @@ DEP_CPP_LEGOO=\ ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ ".\LEGO1\mxvideoparamflags.h"\ + ".\LEGO1\viewmanager.h"\ "$(INTDIR)\legoomni.obj" : $(SOURCE) $(DEP_CPP_LEGOO) "$(INTDIR)" @@ -578,10 +581,14 @@ DEP_CPP_MXOMN=\ ".\LEGO1\mxomnicreateflags.h"\ ".\LEGO1\mxomnicreateparam.h"\ ".\LEGO1\mxomnicreateparambase.h"\ + ".\LEGO1\mxpalette.h"\ + ".\LEGO1\mxrect32.h"\ ".\LEGO1\mxresult.h"\ ".\LEGO1\mxstring.h"\ ".\LEGO1\mxtimer.h"\ + ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ + ".\LEGO1\mxvideoparamflags.h"\ "$(INTDIR)\mxomni.obj" : $(SOURCE) $(DEP_CPP_MXOMN) "$(INTDIR)" @@ -625,8 +632,12 @@ DEP_CPP_MXOMNI=\ ".\LEGO1\mxomnicreateflags.h"\ ".\LEGO1\mxomnicreateparam.h"\ ".\LEGO1\mxomnicreateparambase.h"\ + ".\LEGO1\mxpalette.h"\ + ".\LEGO1\mxrect32.h"\ ".\LEGO1\mxstring.h"\ + ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ + ".\LEGO1\mxvideoparamflags.h"\ "$(INTDIR)\mxomnicreateparam.obj" : $(SOURCE) $(DEP_CPP_MXOMNI) "$(INTDIR)" @@ -644,8 +655,12 @@ DEP_CPP_MXOMNIC=\ ".\LEGO1\mxomnicreateflags.h"\ ".\LEGO1\mxomnicreateparam.h"\ ".\LEGO1\mxomnicreateparambase.h"\ + ".\LEGO1\mxpalette.h"\ + ".\LEGO1\mxrect32.h"\ ".\LEGO1\mxstring.h"\ + ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ + ".\LEGO1\mxvideoparamflags.h"\ "$(INTDIR)\mxomnicreateparambase.obj" : $(SOURCE) $(DEP_CPP_MXOMNIC)\ @@ -732,6 +747,8 @@ DEP_CPP_ISLE_=\ ".\ISLE\define.h"\ ".\ISLE\isle.h"\ ".\ISLE\res\resource.h"\ + ".\LEGO1\lego3dmanager.h"\ + ".\LEGO1\lego3dview.h"\ ".\LEGO1\legoanimationmanager.h"\ ".\LEGO1\legobuildingmanager.h"\ ".\LEGO1\legoentity.h"\ @@ -767,6 +784,7 @@ DEP_CPP_ISLE_=\ ".\LEGO1\mxvariabletable.h"\ ".\LEGO1\mxvideoparam.h"\ ".\LEGO1\mxvideoparamflags.h"\ + ".\LEGO1\viewmanager.h"\ "$(INTDIR)\isle.obj" : $(SOURCE) $(DEP_CPP_ISLE_) "$(INTDIR)" diff --git a/isle.mdp b/isle.mdp index 1855de7a87900545fb1a465f01ced5ce017dc802..2520cf5165bbf68e03a2a0df01abb5c4dfd38e51 100644 GIT binary patch literal 48640 zcmeHQS$7mg6uy&<1W?Grsv@}ImI+A^5EUeoh+q&*z_^S{XS&I>>19q&Ck$`?1^o^F z5Z`^_C+L&s_~;Wa9;~XK>aOmp>U8HIk<1-Vk~zb7Yx(AO-MaTy-@d+l^-Mnuz;^(B zfUllo;1Rxhnt|VYdiFT^+weAg3opS@pjD$e(arD<4idN1F%O>0ep)L zAOpw%GJp&q1IPd}fD9l5$N(~c3?Ku$nSn=p;NedX`{7sEga?y<_Boc(wg#aRzou&! z>v!5#(5}~-f!z*m!>iBx_dLfp%y!*wJ68SL^5R0>wC>uTRc*9dmC95>87f^)!ZmC! zl9(yjM_@&xtOkur<;vDViwjq8PS@Rz?|OD4u#C`Z8G+%h5?Z2;FBNUWvDSRUvt1*! zea|&KW6cVx%@4|muWs0mX?tt2^!YNKz@c+jIhz1 z=5J>Bn_2$mEN|z=;`K%T9{(Z($N(~c3?Ku@05X6KAOpw%GJp&q1IWP6Gl22G-i-ep zgX8cVJP$9x33w4s!l|8CMI6BsV_*bEe|ch^VMoXSGJp&q1IPd}fD9l5$N(~c3?Ku@ z05Y({3}F1PH{*XV!z=JAyauP?b$A2bgtvBB53&0v$v_nUqlf(_=*{~lCr_@}-t5fD zB@6HW?~VKaBj%nTIHoYt!o;{8BlKO{tTyM0661DO zjmG*~;BR=Qv0>WDkW2KsY7-S`Rhwr@^y>RgDS?I`klGaIiuYjJfz=4jz_?d!o-HBP zHX5`DM+tp&J7)W?P0Ev$A)urJi$zB6I>uVNgz}5BtUyV%dAT?ts^TWi+2Zmo!?8kI zSEPhO(Qj^crld%F!wIX+!b_0bX@{g{i`($MFz_9RE)vEwbuytTTqCKf0vp@M9^VHJuB>$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Fo0}`~SJ{TU5Km$m+a6sSYXaKpnN&`qquS5gL>i^dOaxOcQM;gf3 zv|8DTKw{|E$Vm=ZI`3MLom6%KpQ5x*8_9OF|JW!+|hJ|_~Xbd_d_Ou8nsKnAUVPpQf) zFbl+n1O1|SR16t)DzeCWQ}|gDWi@3{inDSd((1_~+4Hh&ezjzg_yt*9^<34{xY9Po zYR_90cEhUJi*mk-_o~XHNyK4omTls{s!}=S`aM`xJg1!M!>S2VVzntlxb#ysjTTPRmHkb3ZRXGWV%-`NdOnBU?SZb-liI&!u6t*wv zdC6Y4nzK~T%<<^bGBV43HlD=@+KP-uu8f!0VnzBRw6Ki!&cA@8>NTv9eCPs92C^S zNrx$gRh7l_dIQ{@b1O0alpkSq&t@N@xPyeeElVF4E58oUed!TWF> zegrq*1Naa=f{)=7_!K^an^1)%ScY408}7hexCcLm6}S%%;B)u_egdnowukkmqILs; zR{>dS;28Yw$o27~5aqJ0zEgd3H`ySc$K2V@FL4)z8S<{=S0g@qb`m#wIlTxsdapbF zmWP~t0B!@QT(No-o+J-isEoDvCmY8cUN$8p5>ehaY;1mBJ=ok=*|L>_p?uVN{ s#9nmW&XY3_;Y-+npTf`J=kN=t!B_B0_!aybY^d**>p|u08v@7Se_8{EQ~&?~ From 170ca99390c1d8241cc7a2e2321773ab8780d404 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 18 Jun 2023 14:02:16 +0200 Subject: [PATCH 3/3] forgot updated viewmanager.h --- LEGO1/viewmanager.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LEGO1/viewmanager.h b/LEGO1/viewmanager.h index 3554c6c9..9abe5612 100644 --- a/LEGO1/viewmanager.h +++ b/LEGO1/viewmanager.h @@ -1,6 +1,8 @@ #ifndef VIEWMANAGER_H #define VIEWMANAGER_H +class ViewROI; + class ViewManager { public: