From dc3500f631e141b5811d7946999c9a3a3413aa5d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten <madebr@users.noreply.github.com> Date: Sat, 6 Jan 2024 18:56:15 +0100 Subject: [PATCH] Fixes for building isle with mingw on Linux (#410) * Add LEGO1.DLL resources * Rename smack files to lowercase This fixes casing issues with mingw on Linux Also use double quotes for #error * cmake: dxguid must come after dinput * cmake: create LEGO1.DLL instead of libLEGO1.DLL, when using mingw * act3actor.h was not including mxcore.h, and using incorrect override * g_mcoreCount seem to be signed integers * LegoCameraController: return references to static data in stub functions * Include string.h, stdlib.h and stdio.h for use of libc functions * Override MxAtomId::operator!= * Fix use of STL's std::map + std::vector * Fix template functions for mingw * iterator object is used after the for loop * IDirectDrawSurface::BltFast's first 2 arguments are x/y coordinates, not pointers * Add stub ViewLODListManager::Lookup * Fixes * Format * Remove unnecessary COMPAT_CONST use --------- Co-authored-by: Christian Semmler <mail@csemmler.com> --- 3rdparty/flic/flic.h | 2 +- 3rdparty/smack/{RAD.H => rad.h} | 2 +- 3rdparty/smack/{SMACK.H => smack.h} | 0 3rdparty/smack/{SMACK.LIB => smack.lib} | Bin CMakeLists.txt | 4 ++- LEGO1/act3actor.h | 4 ++- LEGO1/define.cpp | 2 +- LEGO1/define.h | 2 +- LEGO1/legocameracontroller.cpp | 12 ++++++-- LEGO1/legoeventnotificationparam.h | 2 ++ LEGO1/legogamestate.cpp | 6 ++-- LEGO1/legogamestate.h | 4 +-- LEGO1/mxatomid.h | 1 + LEGO1/mxcore.cpp | 2 +- LEGO1/mxlist.h | 5 ++- LEGO1/mxqueue.h | 8 ++--- LEGO1/mxstl/stlcompat.h | 4 +++ LEGO1/mxstreamlist.cpp | 5 +++ LEGO1/mxstreamlist.h | 6 ++-- LEGO1/mxtransitionmanager.cpp | 4 +-- LEGO1/res/arrow.cur | Bin 0 -> 326 bytes LEGO1/res/busy.cur | Bin 0 -> 326 bytes LEGO1/res/leaf_0.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_1.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_2.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_3.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_4.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_5.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_6.cur | Bin 0 -> 766 bytes LEGO1/res/leaf_7.cur | Bin 0 -> 766 bytes LEGO1/res/lego1.rc | 39 ++++++++++++++++++++++++ LEGO1/res/resource.h | 12 ++++++++ LEGO1/viewmanager/viewlodlist.cpp | 6 ++++ LEGO1/viewmanager/viewlodlist.h | 2 ++ util/compat.h | 4 +++ 35 files changed, 114 insertions(+), 24 deletions(-) rename 3rdparty/smack/{RAD.H => rad.h} (99%) rename 3rdparty/smack/{SMACK.H => smack.h} (100%) rename 3rdparty/smack/{SMACK.LIB => smack.lib} (100%) create mode 100644 LEGO1/res/arrow.cur create mode 100644 LEGO1/res/busy.cur create mode 100644 LEGO1/res/leaf_0.cur create mode 100644 LEGO1/res/leaf_1.cur create mode 100644 LEGO1/res/leaf_2.cur create mode 100644 LEGO1/res/leaf_3.cur create mode 100644 LEGO1/res/leaf_4.cur create mode 100644 LEGO1/res/leaf_5.cur create mode 100644 LEGO1/res/leaf_6.cur create mode 100644 LEGO1/res/leaf_7.cur create mode 100644 LEGO1/res/lego1.rc create mode 100644 LEGO1/res/resource.h diff --git a/3rdparty/flic/flic.h b/3rdparty/flic/flic.h index 6d8495f4..42969e5c 100644 --- a/3rdparty/flic/flic.h +++ b/3rdparty/flic/flic.h @@ -33,4 +33,4 @@ typedef struct { BYTE reserved3[40]; /* Set to zero */ } FLIC_HEADER; -#endif FLIC_H // FLIC_H \ No newline at end of file +#endif // FLIC_H diff --git a/3rdparty/smack/RAD.H b/3rdparty/smack/rad.h similarity index 99% rename from 3rdparty/smack/RAD.H rename to 3rdparty/smack/rad.h index f041dc1c..610bd794 100644 --- a/3rdparty/smack/RAD.H +++ b/3rdparty/smack/rad.h @@ -82,7 +82,7 @@ #endif #if !defined(__RADDOS__) && !defined(__RADWIN__) && !defined(__RADMAC__) - #error RAD.H didn'y detect your platform. Define __DOS__, __WINDOWS__, WIN32, macintosh, or powerc. + #error "RAD.H didn'y detect your platform. Define __DOS__, __WINDOWS__, WIN32, macintosh, or powerc." #endif #ifdef __RADMAC__ diff --git a/3rdparty/smack/SMACK.H b/3rdparty/smack/smack.h similarity index 100% rename from 3rdparty/smack/SMACK.H rename to 3rdparty/smack/smack.h diff --git a/3rdparty/smack/SMACK.LIB b/3rdparty/smack/smack.lib similarity index 100% rename from 3rdparty/smack/SMACK.LIB rename to 3rdparty/smack/smack.lib diff --git a/CMakeLists.txt b/CMakeLists.txt index 61a70e1c..4e509e01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,6 +207,7 @@ add_library(lego1 SHARED LEGO1/realtime/realtimeview.cpp LEGO1/realtime/vector.cpp LEGO1/registrationbook.cpp + LEGO1/res/lego1.rc LEGO1/score.cpp LEGO1/scorestate.cpp LEGO1/skateboard.cpp @@ -254,10 +255,11 @@ endif() target_link_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/smack") # Link libraries -target_link_libraries(lego1 PRIVATE ddraw dsound dxguid dinput winmm d3drm smack) +target_link_libraries(lego1 PRIVATE ddraw dsound dinput dxguid winmm d3drm smack) # Make sure filenames are ALL CAPS set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1) +set_property(TARGET lego1 PROPERTY PREFIX "") set_property(TARGET lego1 PROPERTY SUFFIX ".DLL") if (ISLE_BUILD_APP) diff --git a/LEGO1/act3actor.h b/LEGO1/act3actor.h index cd1e1fcd..00d06495 100644 --- a/LEGO1/act3actor.h +++ b/LEGO1/act3actor.h @@ -1,12 +1,14 @@ #ifndef ACT3ACTOR_H #define ACT3ACTOR_H +#include "mxcore.h" + // FIXME: Uncertain location. There are three vtables which eventually call this // class' ClassName() function, but none of them call it directly. class Act3Actor : public MxCore { public: // FUNCTION: LEGO1 0x100431b0 - inline virtual const char* ClassName() override + inline virtual const char* ClassName() const override { // STRING: LEGO1 0x100f03ac return "Act3Actor"; diff --git a/LEGO1/define.cpp b/LEGO1/define.cpp index acd811a8..3f3f70ac 100644 --- a/LEGO1/define.cpp +++ b/LEGO1/define.cpp @@ -1,7 +1,7 @@ #include "define.h" // GLOBAL: LEGO1 0x1010141c -MxU32 g_mxcoreCount[101] = {0, -6643, -5643, -5058, -4643, -4321, -4058, -3836, -3643, -3473, -3321, -3184, -3058, +MxS32 g_mxcoreCount[101] = {0, -6643, -5643, -5058, -4643, -4321, -4058, -3836, -3643, -3473, -3321, -3184, -3058, -2943, -2836, -2736, -2643, -2556, -2473, -2395, -2321, -2251, -2184, -2120, -2058, -2000, -1943, -1888, -1836, -1785, -1736, -1689, -1643, -1599, -1556, -1514, -1473, -1434, -1395, -1358, -1321, -1286, -1251, -1217, -1184, -1152, -1120, -1089, -1058, -1029, -1000, -971, diff --git a/LEGO1/define.h b/LEGO1/define.h index 45a536a9..d45d02c3 100644 --- a/LEGO1/define.h +++ b/LEGO1/define.h @@ -3,7 +3,7 @@ #include "mxtypes.h" -extern MxU32 g_mxcoreCount[101]; +extern MxS32 g_mxcoreCount[101]; extern const char* g_parseExtraTokens; extern const char* g_strWORLD; extern const char* g_strSOUND; diff --git a/LEGO1/legocameracontroller.cpp b/LEGO1/legocameracontroller.cpp index a182d025..ad1dbb67 100644 --- a/LEGO1/legocameracontroller.cpp +++ b/LEGO1/legocameracontroller.cpp @@ -25,17 +25,23 @@ void LegoCameraController::FUN_100123e0(Matrix4Data& p_transform, MxU32) // STUB: LEGO1 0x10012740 Vector3Data& LegoCameraController::FUN_10012740() { - return Vector3Data(); + // Actually returns reference to a member + static Vector3Data g_v; + return g_v; } // STUB: LEGO1 0x100127f0 Vector3Data& LegoCameraController::FUN_100127f0() { - return Vector3Data(); + // Actually returns reference to a member + static Vector3Data g_v; + return g_v; } // STUB: LEGO1 0x100128a0 Vector3Data& LegoCameraController::FUN_100128a0() { - return Vector3Data(); + // Actually returns reference to a member + static Vector3Data g_v; + return g_v; } diff --git a/LEGO1/legoeventnotificationparam.h b/LEGO1/legoeventnotificationparam.h index 5f0195ec..c9087909 100644 --- a/LEGO1/legoeventnotificationparam.h +++ b/LEGO1/legoeventnotificationparam.h @@ -4,6 +4,8 @@ #include "mxnotificationparam.h" #include "mxtypes.h" +#include <stdlib.h> + // VTABLE: LEGO1 0x100d6aa0 class LegoEventNotificationParam : public MxNotificationParam { public: diff --git a/LEGO1/legogamestate.cpp b/LEGO1/legogamestate.cpp index 62a30db4..23e04601 100644 --- a/LEGO1/legogamestate.cpp +++ b/LEGO1/legogamestate.cpp @@ -9,6 +9,8 @@ #include "mxstring.h" #include "mxvariabletable.h" +#include <stdio.h> + // Based on the highest dword offset (0x42c) referenced in the constructor. // There may be other members that come after. DECOMP_SIZE_ASSERT(LegoGameState, 0x430) @@ -217,7 +219,7 @@ MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen) } // FUNCTION: LEGO1 0x1003bbb0 -LegoState* LegoGameState::GetState(COMPAT_CONST char* p_stateName) +LegoState* LegoGameState::GetState(const char* p_stateName) { for (MxS32 i = 0; i < m_stateCount; ++i) if (m_stateArray[i]->IsA(p_stateName)) @@ -226,7 +228,7 @@ LegoState* LegoGameState::GetState(COMPAT_CONST char* p_stateName) } // FUNCTION: LEGO1 0x1003bc00 -LegoState* LegoGameState::CreateState(COMPAT_CONST char* p_stateName) +LegoState* LegoGameState::CreateState(const char* p_stateName) { LegoState* newState = (LegoState*) ObjectFactory()->Create(p_stateName); RegisterState(newState); diff --git a/LEGO1/legogamestate.h b/LEGO1/legogamestate.h index 656b990c..5f62b107 100644 --- a/LEGO1/legogamestate.h +++ b/LEGO1/legogamestate.h @@ -27,8 +27,8 @@ public: __declspec(dllexport) void SerializeScoreHistory(MxS16 p_flags); __declspec(dllexport) void SetSavePath(char*); - LegoState* GetState(COMPAT_CONST char* p_stateName); - LegoState* CreateState(COMPAT_CONST char* p_stateName); + LegoState* GetState(const char* p_stateName); + LegoState* CreateState(const char* p_stateName); void GetFileSavePath(MxString* p_outPath, MxULong p_slotn); void FUN_1003a720(MxU32); diff --git a/LEGO1/mxatomid.h b/LEGO1/mxatomid.h index 5d4cd10f..3abe6479 100644 --- a/LEGO1/mxatomid.h +++ b/LEGO1/mxatomid.h @@ -20,6 +20,7 @@ public: MxAtomId() { this->m_internal = 0; } inline MxBool operator==(const MxAtomId& p_atomId) const { return this->m_internal == p_atomId.m_internal; } + inline MxBool operator!=(const MxAtomId& p_atomId) const { return this->m_internal != p_atomId.m_internal; } void Clear(); diff --git a/LEGO1/mxcore.cpp b/LEGO1/mxcore.cpp index 18c37597..237ed1da 100644 --- a/LEGO1/mxcore.cpp +++ b/LEGO1/mxcore.cpp @@ -11,7 +11,7 @@ MxResult MxCore::Tickle() // FUNCTION: LEGO1 0x100ae1a0 MxCore::MxCore() { - m_id = g_mxcoreCount[0]; + m_id = (MxU32) g_mxcoreCount[0]; g_mxcoreCount[0]++; } diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 33fbbcd0..911d5a36 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -76,7 +76,10 @@ public: static void Destroy(T* p_obj) { delete p_obj; }; - void SetOwnership(MxBool p_ownership) { SetDestroy(p_ownership ? Destroy : MxCollection<T*>::Destroy); } + void SetOwnership(MxBool p_ownership) + { + MxCollection<T*>::SetDestroy(p_ownership ? MxPtrList<T>::Destroy : MxCollection<T*>::Destroy); + } }; template <class T> diff --git a/LEGO1/mxqueue.h b/LEGO1/mxqueue.h index b6eaad55..4e45c035 100644 --- a/LEGO1/mxqueue.h +++ b/LEGO1/mxqueue.h @@ -13,10 +13,10 @@ public: MxBool Dequeue(T& p_obj) { - MxBool hasNext = (m_first != NULL); - if (m_first) { - p_obj = m_first->GetValue(); - DeleteEntry(m_first); + MxBool hasNext = (this->m_first != NULL); + if (this->m_first) { + p_obj = this->m_first->GetValue(); + this->DeleteEntry(this->m_first); } return hasNext; diff --git a/LEGO1/mxstl/stlcompat.h b/LEGO1/mxstl/stlcompat.h index bc0076bf..29c31549 100644 --- a/LEGO1/mxstl/stlcompat.h +++ b/LEGO1/mxstl/stlcompat.h @@ -10,9 +10,13 @@ #else #include <algorithm> #include <list> +#include <map> #include <set> +#include <vector> using std::list; +using std::map; using std::set; +using std::vector; #endif #endif // STLCOMPAT_H diff --git a/LEGO1/mxstreamlist.cpp b/LEGO1/mxstreamlist.cpp index 729b0d7b..46e9841b 100644 --- a/LEGO1/mxstreamlist.cpp +++ b/LEGO1/mxstreamlist.cpp @@ -26,7 +26,12 @@ MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete) MxDSAction* found = NULL; +#ifdef COMPAT_MODE + iterator it; + for (it = begin(); it != end(); it++) { +#else for (iterator it = begin(); it != end(); it++) { +#endif if (p_action->GetObjectId() == -1 || p_action->GetObjectId() == (*it)->GetObjectId()) { if (p_action->GetUnknown24() == -2 || p_action->GetUnknown24() == -3 || p_action->GetUnknown24() == (*it)->GetUnknown24()) { diff --git a/LEGO1/mxstreamlist.h b/LEGO1/mxstreamlist.h index f9164bfb..cbe53eae 100644 --- a/LEGO1/mxstreamlist.h +++ b/LEGO1/mxstreamlist.h @@ -11,11 +11,11 @@ class MxStreamList : public list<T> { public: MxBool PopFront(T& p_obj) { - if (empty()) + if (this->empty()) return FALSE; - p_obj = front(); - pop_front(); + p_obj = this->front(); + this->pop_front(); return TRUE; } }; diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index b10ac7c1..db658249 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -229,7 +229,7 @@ void MxTransitionManager::TransitionDissolve() if (VideoManager()->GetVideoParam().Flags().GetFlipSurfaces()) { LPDIRECTDRAWSURFACE surf = VideoManager()->GetDisplaySurface()->GetDirectDrawSurface1(); - surf->BltFast(NULL, NULL, m_ddSurface, &g_fullScreenRect, DDBLTFAST_WAIT); + surf->BltFast(0, 0, m_ddSurface, &g_fullScreenRect, DDBLTFAST_WAIT); } m_animationTimer++; @@ -346,7 +346,7 @@ void MxTransitionManager::TransitionPixelation() if (VideoManager()->GetVideoParam().Flags().GetFlipSurfaces()) { LPDIRECTDRAWSURFACE surf = VideoManager()->GetDisplaySurface()->GetDirectDrawSurface1(); - surf->BltFast(NULL, NULL, m_ddSurface, &g_fullScreenRect, DDBLTFAST_WAIT); + surf->BltFast(0, 0, m_ddSurface, &g_fullScreenRect, DDBLTFAST_WAIT); } m_animationTimer++; diff --git a/LEGO1/res/arrow.cur b/LEGO1/res/arrow.cur new file mode 100644 index 0000000000000000000000000000000000000000..15f687a1502fd874b0ea6471e16713a5ac593630 GIT binary patch literal 326 zcmZ|JF$%&!5QX8lDp;CIQm9F3X=$fN@&*Zbu~k9K93et3kkUdN{|OPn;4I(1Wrkf= z8Yw8xMNYH{(p=ISw6sTHd6nHh+{|p)T+njc-ho7Nmr^XFl(`q4c%TKdu3wUpR`6$1 uB=}eS;ad&IQ}0Nko|;v-&dkn;8B~A_7=wBI%yyg$aNVD};D!n{e(Mc!(S2h8 literal 0 HcmV?d00001 diff --git a/LEGO1/res/busy.cur b/LEGO1/res/busy.cur new file mode 100644 index 0000000000000000000000000000000000000000..2a63b536f2ab9db09fd5de69c43b0c707b96728e GIT binary patch literal 326 zcmZQzU}9ioP*7k10|Q0|1~DK@1BexX*a3(cfe-{5z$7N||Nno8;Q#*(Kt&KZ{||(Y zTFbx?8_U2Dx0ivzzmkDL{SyO&a0&wh=LrS|mI<gBBnFaG+r+@&8_B>B{}+Klroqev zvFm|$ApxKpK(46Azzqx_S0V5L#{d5xF#rGmf&KsgAN;5oBnFZLsX^8QVq-HKY$=2Q E06(H~eE<Le literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_0.cur b/LEGO1/res/leaf_0.cur new file mode 100644 index 0000000000000000000000000000000000000000..e8735671d7a27c35e51a55f3dcf9d81ec63f2b6d GIT binary patch literal 766 zcmd5)F%H5o47^6DNEu*bZIq!x`2;)#b<8KoQ&7jgB2QstWMn`xHdQ63MGQ>1IVWew zK36SZP{BE1g9bMP>;UW;9Kw-NVa1+}bDu2%ypYnkvF9TrA?M5qdM^;kiNTMA#Qleb zatsqMMWD6i1s4l$>d@-~<73dgt*zGut_y?azO{Z(g6<T0oo|f|nj06r?!VCQN_{Nm zFXZ{dTHTKM?ERtDWzad7*iS}J{tLe0aVEMSh_20uyd@H(^%7G~_UXRV3Z#!fYZ1{4 Di<go& literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_1.cur b/LEGO1/res/leaf_1.cur new file mode 100644 index 0000000000000000000000000000000000000000..e7e0cde9de1663265be0e75474369832746e24cb GIT binary patch literal 766 zcmdUtK~BRk5Ji6sDv~$s*w&f_Lb*gaOD<9$rSftvL5{+bWtK&%`uiPF<5uk!iHV;* zf4(P<tN;NWQUV^a!dC!Z0K5s6@Gd$zbI7|L8PGt^KZ|CiB4Zp!8Jq{mnh8C%RHuIt z(cPO5jb6+e?bdsHH|D+@7C*RKX#7~L42@sZy|QJ0?>igPS?lm%q0uE-YPOgD)oiiR zSO46NsP0BWr?(REQZ9{ulIb6~jt><!<Z(+Llzx-@2lDfY97X;GTE%hZnFmzX++!oQ PoH}ySmT4{Yrh9P$Ss0P- literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_2.cur b/LEGO1/res/leaf_2.cur new file mode 100644 index 0000000000000000000000000000000000000000..1abce39b3826001de417273af9b4777de106bdbe GIT binary patch literal 766 zcmdT?u?@m75Inz7kkX{1#d2YxOu;Bo7Qv%LDKmvfp=1Oqp8GgKAW@{v+4ugxdt0_- zK;Ym#7#lnUI03kjlyD^-4vYl7|40BQQYs50Q!*jvOhe}hRm(^YlPv5L^)!87ydK*y z4IiZ*#~*=(3GLFs%?pYkUEg`%cSG;X5wVI<swhhdG1spydxUmaUE3oe*s?$H4{XD$ bQGGhqJ8qhB)`Vl?bB&hInt9e^y&LfcyV#Y_ literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_3.cur b/LEGO1/res/leaf_3.cur new file mode 100644 index 0000000000000000000000000000000000000000..25e6935f16c0e6ec51d7a2acc978e09107e6f892 GIT binary patch literal 766 zcmdUtO$x#=5QSgkA7tasZA%s+xkNom@gmJlELr9hJ&H@0E-OgK*9z?jT?<a~O=j|D zl2QT~WGD(?!*Msj0l<lH3ulsHO;4k?Yysdz2%m+XAqi;PmV%5EB11$thONQ<&TRU+ z%lfEu8<SHx)kfteChv+#r<$C~llN(>{tl}fH@EX_Z&bOBJY45KI;YyLZ>nl;hxO*D z%3+J@qGVX7E}K5`F9N=S1?zK>j@(GdrAICuN_mhQ>XDYuXC&h~up&FMC#A?$M7Z>| K$cy2VEZG~(Ws<=F literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_4.cur b/LEGO1/res/leaf_4.cur new file mode 100644 index 0000000000000000000000000000000000000000..73ec0799ea68db62028b6973dfc34db6a5ec6564 GIT binary patch literal 766 zcmcgqF%H5o47^&XNEu*bCCU(?d;*?=I_4APDX3##k*6>+GBO|;hpK84RZIvc=lJ5Y z<4Oex4YUR}0PY0r<U9!E3MWB>m3T49En5I&BZTn~FQFhH#wZE?Y%r%tAS+!Z_ZxFn zn~Iaa76MWw*F#xgRl%wAE-#?g^##}7<lK^Sc>{fRea?+lX25K^bHxC*RVLSy`Tjn% y&*eZhKkDyCDW50#dnEq=^DD#i!kq9pj=1fa6XJG8STom{@{>N*r#^Y_h4>BI8<H3R literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_5.cur b/LEGO1/res/leaf_5.cur new file mode 100644 index 0000000000000000000000000000000000000000..8d8df94ec1b4e68f516c19cb86399687777d3745 GIT binary patch literal 766 zcmdUtF>b>!3`M`yGy%M1%aEml2BYvL+_U5&(M@7_<SBfUcFfo@gAwJaO%NIB+99+a zDe_A+3{!Hd<h``jtBy|ENO}iK`hZFcJcjnSMTw;te*>N^M2+K!kbag@$~)l6rR@IS zhA@AJg?YjHdBIt5<%v2ByV;4XJAZF#bnwLuXXctBuY>h|S6&Eh(-e7YgU>(UX0A0` z7I{774mXu(d_$R2u)ffrXUhyc*r`kDw1yX8N+xyimd;wkimAyU#w#N+^9A29RrH+T MyvKELfKPa^3&UBIJ^%m! literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_6.cur b/LEGO1/res/leaf_6.cur new file mode 100644 index 0000000000000000000000000000000000000000..04615d16e1ab2a8021d63f221bb9dcc22c844983 GIT binary patch literal 766 zcmdT?F%H5o47?arq%3TV5Ot_fU%^wVe1tp&b<8XJ6h=lyCd|133K9crFFD7)v!y5s zAaDo)*kX-~02=^%k`fN2!;+Dp_Ztb|MoQ&iWJ)Fs!$3pF4OPoXE|V<G5;>nf?(K8k zx05iI?OX6Y-Igp9KEF^Vr14cFQZ-d54H9A(V(elm`RWZ_k*7^nYBo$ImAd{asmulZ f1OMTAR82d*W2HAN^bBX8#~Cd*%{=Q->-`fC#X*xA literal 0 HcmV?d00001 diff --git a/LEGO1/res/leaf_7.cur b/LEGO1/res/leaf_7.cur new file mode 100644 index 0000000000000000000000000000000000000000..9795b1dfeba0d18bd81b3daf831dddb7a8367bdc GIT binary patch literal 766 zcmds#F%E)25Jf+$!Gy-nL>o3!7{ev>D8`GhH<3{8DL9Iyr6neW@q-4IsGXI=zM1*^ zhux3>7(}oZ*kFyT0agHZgj+a}2y<ozz0ctQE;#or%xsB6RaG>!Ur_Bj!l&En(tm`A z6v3CsHa3Aaa<XNhC61F&Tahf#MkL9yao&h6eV}PmkJs6wFH1jYzV4^TaoP?xczAFb z!0BRifvF4li5pJ-pyxmEEzUIds%@^?u)VX)RBz-$D&k&%m9$v&G+1hbRBPl~N2>LL Jq$Jn3cmRiNm81Xw literal 0 HcmV?d00001 diff --git a/LEGO1/res/lego1.rc b/LEGO1/res/lego1.rc new file mode 100644 index 00000000..44e07d7c --- /dev/null +++ b/LEGO1/res/lego1.rc @@ -0,0 +1,39 @@ +#include "resource.h" + +LEGO1_LEAF4 CURSOR "leaf_4.cur" +LEGO1_LEAF7 CURSOR "leaf_7.cur" +LEGO1_LEAF1 CURSOR "leaf_1.cur" +LEGO1_LEAF2 CURSOR "leaf_2.cur" +LEGO1_LEAF6 CURSOR "leaf_6.cur" +LEGO1_LEAF0 CURSOR "leaf_0.cur" +LEGO1_LEAF5 CURSOR "leaf_5.cur" +LEGO1_LEAF3 CURSOR "leaf_3.cur" +LEGO1_ARROW CURSOR "arrow.cur" +LEGO1_BUSY CURSOR "busy.cur" + +1 VERSIONINFO +FILEVERSION 1,1,0,0 +PRODUCTVERSION 1,1,0,0 +FILEOS 0x40004 +FILETYPE 0x2 +{ +BLOCK "StringFileInfo" +{ + BLOCK "040904b0" + { + VALUE "CompanyName", "Mindscape, Inc." + VALUE "FileDescription", "LegoOmni Library" + VALUE "FileVersion", "1, 1, 0, 0" + VALUE "InternalName", "LegoOmni Library" + VALUE "LegalCopyright", "Copyright \xA9 1997" + VALUE "OriginalFilename", "LegoOmni Library" + VALUE "ProductName", "LegoOmni Library" + VALUE "ProductVersion", "1, 1, 0, 0" + } +} + +BLOCK "VarFileInfo" +{ + VALUE "Translation", 0x0409, 0x04B0 +} +} diff --git a/LEGO1/res/resource.h b/LEGO1/res/resource.h new file mode 100644 index 00000000..d11b6281 --- /dev/null +++ b/LEGO1/res/resource.h @@ -0,0 +1,12 @@ +#define LEGO1_ARROW 101 +#define LEGO1_LEAF4 102 +#define LEGO1_LEAF7 103 +#define LEGO1_LEAF1 104 +#define LEGO1_LEAF2 105 +#define LEGO1_LEAF6 106 +#define LEGO1_LEAF0 107 +#define LEGO1_LEAF5 108 +#define LEGO1_LEAF3 109 +#define LEGO1_BUSY 111 + +#define APP_ICON 105 diff --git a/LEGO1/viewmanager/viewlodlist.cpp b/LEGO1/viewmanager/viewlodlist.cpp index 9a8456fc..1cd0783e 100644 --- a/LEGO1/viewmanager/viewlodlist.cpp +++ b/LEGO1/viewmanager/viewlodlist.cpp @@ -42,6 +42,12 @@ ViewLODList* ViewLODListManager::Create(const ROIName& rROIName, int lodCount) return pLODList; } +// STUB: LEGO1 0x100a75b0 +ViewLODList* ViewLODListManager::Lookup(const ROIName&) const +{ + return NULL; +} + // STUB: LEGO1 0x100a7680 void ViewLODListManager::Destroy(ViewLODList* lodList) { diff --git a/LEGO1/viewmanager/viewlodlist.h b/LEGO1/viewmanager/viewlodlist.h index c0d5ed82..4d848533 100644 --- a/LEGO1/viewmanager/viewlodlist.h +++ b/LEGO1/viewmanager/viewlodlist.h @@ -6,6 +6,8 @@ #include "assert.h" #include "compat.h" +#include <string.h> + #pragma warning(disable : 4237) #pragma warning(disable : 4786) diff --git a/util/compat.h b/util/compat.h index e83b115e..3c83def6 100644 --- a/util/compat.h +++ b/util/compat.h @@ -3,6 +3,10 @@ // Various macros to enable compiling with other/newer compilers. +#ifdef __MINGW32__ +#define COMPAT_MODE +#endif + // Use `COMPAT_CONST` where something ought to be 'const', and a newer compiler would complain if it // wasn't, but we know it isn't 'const' in the original code. #ifdef __MINGW32__