diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..189ddf5a --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,6 @@ +Checks: > + -*, + readability-braces-around-statements, + modernize-use-override +WarningsAsErrors: '-*,readability-braces-around-statements,modernize-use-override' +HeaderFilterRegex: ".*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3f81642..9a21e56e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,18 +14,20 @@ jobs: matrix: toolchain: - { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true } - - { name: 'msys2 mingw32', shell: 'msys2 {0}', setup-msys2: true } + - { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true, werror: true } + - { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true } steps: - name: Set up MSYS2 - if: matrix.toolchain.setup-msys2 + if: ${{ !!matrix.toolchain.msystem }} uses: msys2/setup-msys2@v2 with: - msystem: mingw32 + msystem: ${{ matrix.toolchain.msystem }} install: >- - mingw-w64-i686-cc - mingw-w64-i686-cmake - mingw-w64-i686-ninja + ${{ matrix.toolchain.msys-env }}-cc + ${{ matrix.toolchain.msys-env }}-cmake + ${{ matrix.toolchain.msys-env }}-ninja + ${{ matrix.toolchain.msys-env }}-clang-tools-extra - name: Setup cmake if: matrix.toolchain.setup-cmake @@ -45,8 +47,13 @@ jobs: - name: Build run: | - cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -GNinja -Werror=dev - cmake --build build + cmake -S . -B build -GNinja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DISLE_USE_DX5_LIBS=${{ !matrix.toolchain.no-dx5-libs }} \ + -DENABLE_CLANG_TIDY=${{ !!matrix.toolchain.clang-tidy }} \ + -DISLE_WERROR=${{ !!matrix.toolchain.werror }} \ + -Werror=dev + cmake --build build -- -k0 build: name: 'MSVC 4.20' diff --git a/CMakeLists.txt b/CMakeLists.txt index eeee76d5..eb509e5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,18 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(isle CXX) +include(CheckCXXSourceCompiles) +include(CMakeDependentOption) +include(CMakePushCheckState) + +set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) +option(ENABLE_CLANG_TIDY "Enable clang-tidy") +if (ENABLE_CLANG_TIDY) + find_program(CLANG_TIDY_BIN NAMES "clang-tidy") + set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_BIN}") + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}") +endif() + math(EXPR bits "8 * ${CMAKE_SIZEOF_VOID_P}") message(STATUS "Building ${bits}-bit LEGO Island") if (NOT bits EQUAL 32) @@ -21,15 +33,44 @@ macro(register_lego1_target __target) list(APPEND lego1_targets ${__target}) endmacro() +function(add_cxx_warning WARNING) + if(ISLE_WERROR) + set(compiler_option "-Werror=${WARNING}") + else() + set(compiler_option "-W${WARNING}") + endif() + string(MAKE_C_IDENTIFIER "COMPILER_SUPPORTS${compiler_option}" varname) + + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_FLAGS "${compiler_option} ") + if(MSVC) + string(APPEND CMAKE_REQUIRED_FLAGS "/WX") + else() + string(APPEND CMAKE_REQUIRED_FLAGS "-Werror") + endif() + check_cxx_source_compiles("int main() { return 0; }" ${varname}) + cmake_pop_check_state() + + if(${varname}) + add_compile_options(${compiler_option}) + endif() +endfunction() + message(STATUS "MSVC for decompilation: ${MSVC_FOR_DECOMP}") +option(ISLE_WERROR "Treat warnings as errors" OFF) option(ISLE_BUILD_APP "Build ISLE.EXE application" ON) option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC_FOR_DECOMP}) option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON) +cmake_dependent_option(ISLE_USE_DX5_LIBS "Build with internal DirectX 5 SDK Libraries" ON ISLE_USE_DX5 OFF) + +add_cxx_warning(parentheses) add_library(DirectX5::DirectX5 INTERFACE IMPORTED) target_include_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc") -target_link_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib") +if(ISLE_USE_DX5_LIBS) + target_link_directories(DirectX5::DirectX5 INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib") +endif() add_library(Smacker::Smacker STATIC IMPORTED) set_property(TARGET Smacker::Smacker PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/3rdparty/smacker/smack.lib") diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 32b19164..c4897a2b 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -770,12 +770,15 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame) return; } - if (!Lego()) + if (!Lego()) { return; - if (!TickleManager()) + } + if (!TickleManager()) { return; - if (!Timer()) + } + if (!Timer()) { return; + } MxLong currentTime = Timer()->GetRealTime(); if (currentTime < g_lastFrameTime) { @@ -828,8 +831,9 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame) this->m_gameStarted = 1; } } - else if (sleepIfNotNextFrame != 0) + else if (sleepIfNotNextFrame != 0) { Sleep(0); + } } // FUNCTION: ISLE 0x402e80 diff --git a/LEGO1/LegoOmni.mingw.def b/LEGO1/LegoOmni.mingw.def index d5d9e052..e2c4ce5f 100644 --- a/LEGO1/LegoOmni.mingw.def +++ b/LEGO1/LegoOmni.mingw.def @@ -1,6 +1,6 @@ ; LegoOmni.def : Declares the module paarameters for the LEGO1.DLL. -DESCRIPTION " Lego OMNI Windows Dynamic Link Library" +; DESCRIPTION " Lego OMNI Windows Dynamic Link Library" EXPORTS @@ -42,9 +42,6 @@ _Z5Timerv _Z7PickROIii _Z8Streamerv _Z9GameStatev -_ZN10LegoEntityD0Ev -_ZN10LegoEntityD1Ev -_ZN10LegoEntityD2Ev _ZN10MxDSActionC1Ev _ZN10MxDSActionC2Ev _ZN10MxDSActionD0Ev @@ -60,9 +57,6 @@ _ZN11MxPresenter4InitEv _ZN11MxPresenter6EnableEh _ZN11MxPresenter6TickleEv _ZN11MxPresenter9EndActionEv -_ZN11MxPresenterD0Ev -_ZN11MxPresenterD1Ev -_ZN11MxPresenterD2Ev _ZN11MxScheduler11GetInstanceEv _ZN11MxScheduler17StartMultiTaskingEj _ZN11ViewManager9RemoveAllEP7ViewROI diff --git a/LEGO1/lego/legoomni/include/act1state.h b/LEGO1/lego/legoomni/include/act1state.h index 988eb8c7..1ad86c64 100644 --- a/LEGO1/lego/legoomni/include/act1state.h +++ b/LEGO1/lego/legoomni/include/act1state.h @@ -10,20 +10,20 @@ public: Act1State(); // FUNCTION: LEGO1 0x100338a0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0154 return "Act1State"; } // FUNCTION: LEGO1 0x100338b0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act1State::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool SetFlag() override; // vtable+0x18 - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxBool SetFlag() override; // vtable+0x18 + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c inline void SetUnknown18(MxU32 p_unk0x18) { m_unk0x18 = p_unk0x18; } inline MxU32 GetUnknown18() { return m_unk0x18; } diff --git a/LEGO1/lego/legoomni/include/act2brick.h b/LEGO1/lego/legoomni/include/act2brick.h index 635fac2d..32856732 100644 --- a/LEGO1/lego/legoomni/include/act2brick.h +++ b/LEGO1/lego/legoomni/include/act2brick.h @@ -8,25 +8,25 @@ class Act2Brick : public LegoPathActor { public: Act2Brick(); - virtual ~Act2Brick() override; // vtable+0x00 + ~Act2Brick() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1007a360 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0438 return "Act2Brick"; } // FUNCTION: LEGO1 0x1007a370 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act2Brick::ClassName()) || LegoEntity::IsA(p_name); } - virtual MxS32 VTable0x94() override; // vtable+0x94 + MxS32 VTable0x94() override; // vtable+0x94 // SYNTHETIC: LEGO1 0x1007a450 // Act2Brick::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/act2policestation.h b/LEGO1/lego/legoomni/include/act2policestation.h index 3fa7ebb4..02d95e5b 100644 --- a/LEGO1/lego/legoomni/include/act2policestation.h +++ b/LEGO1/lego/legoomni/include/act2policestation.h @@ -7,17 +7,17 @@ // SIZE 0x68 class Act2PoliceStation : public LegoEntity { public: - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1000e200 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03fc return "Act2PoliceStation"; } // FUNCTION: LEGO1 0x1000e210 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act2PoliceStation::ClassName()) || LegoEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/act3.h b/LEGO1/lego/legoomni/include/act3.h index fe27b743..1d109052 100644 --- a/LEGO1/lego/legoomni/include/act3.h +++ b/LEGO1/lego/legoomni/include/act3.h @@ -9,31 +9,31 @@ class Act3 : public LegoWorld { public: Act3(); - virtual ~Act3() override; // vtable+00 + ~Act3() override; // vtable+00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10072510 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f013c return "Act3"; } // FUNCTION: LEGO1 0x10072520 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act3::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual void VTable0x60() override; // vtable+0x60 - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + void VTable0x60() override; // vtable+0x60 + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 inline void SetUnkown420c(MxEntity* p_entity) { m_unk0x420c = p_entity; } inline void SetUnkown4270(MxU32 p_unk0x4270) { m_unk0x4270 = p_unk0x4270; } diff --git a/LEGO1/lego/legoomni/include/act3actor.h b/LEGO1/lego/legoomni/include/act3actor.h index 00d06495..3d146cb7 100644 --- a/LEGO1/lego/legoomni/include/act3actor.h +++ b/LEGO1/lego/legoomni/include/act3actor.h @@ -8,7 +8,7 @@ class Act3Actor : public MxCore { public: // FUNCTION: LEGO1 0x100431b0 - inline virtual const char* ClassName() const override + inline const char* ClassName() const override { // STRING: LEGO1 0x100f03ac return "Act3Actor"; diff --git a/LEGO1/lego/legoomni/include/act3shark.h b/LEGO1/lego/legoomni/include/act3shark.h index 5ba5a6f2..b0b26a48 100644 --- a/LEGO1/lego/legoomni/include/act3shark.h +++ b/LEGO1/lego/legoomni/include/act3shark.h @@ -7,22 +7,22 @@ class Act3Shark : public LegoAnimActor { public: // FUNCTION: LEGO1 0x100430c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03a0 return "Act3Shark"; } // FUNCTION: LEGO1 0x1001a130 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act3Shark::ClassName()) || LegoAnimActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + void ParseAction(char*) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 // SYNTHETIC: LEGO1 0x10043020 // Act3Shark::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/act3state.h b/LEGO1/lego/legoomni/include/act3state.h index 1c8643f7..d1c83e48 100644 --- a/LEGO1/lego/legoomni/include/act3state.h +++ b/LEGO1/lego/legoomni/include/act3state.h @@ -10,19 +10,19 @@ public: inline Act3State() { m_unk0x08 = 0; } // FUNCTION: LEGO1 0x1000e300 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03f0 return "Act3State"; } // FUNCTION: LEGO1 0x1000e310 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Act3State::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool VTable0x14() override; + MxBool VTable0x14() override; // SYNTHETIC: LEGO1 0x1000e3c0 // Act3State::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/ambulance.h b/LEGO1/lego/legoomni/include/ambulance.h index 5429cc66..17175b03 100644 --- a/LEGO1/lego/legoomni/include/ambulance.h +++ b/LEGO1/lego/legoomni/include/ambulance.h @@ -9,29 +9,29 @@ class Ambulance : public IslePathActor { public: Ambulance(); - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10035fa0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03c4 return "Ambulance"; } // FUNCTION: LEGO1 0x10035fb0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Ambulance::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c + void VTable0x70(float p_float) override; // vtable+0x70 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x10036130 // Ambulance::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/ambulancemissionstate.h b/LEGO1/lego/legoomni/include/ambulancemissionstate.h index cefc3c21..aca6120b 100644 --- a/LEGO1/lego/legoomni/include/ambulancemissionstate.h +++ b/LEGO1/lego/legoomni/include/ambulancemissionstate.h @@ -10,19 +10,19 @@ public: AmbulanceMissionState(); // FUNCTION: LEGO1 0x10037600 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f00e8 return "AmbulanceMissionState"; } // FUNCTION: LEGO1 0x10037610 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, AmbulanceMissionState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c inline MxU16 GetColor(MxU8 p_id) { diff --git a/LEGO1/lego/legoomni/include/animstate.h b/LEGO1/lego/legoomni/include/animstate.h index 8d785b11..63b884d8 100644 --- a/LEGO1/lego/legoomni/include/animstate.h +++ b/LEGO1/lego/legoomni/include/animstate.h @@ -8,23 +8,23 @@ class AnimState : public LegoState { public: AnimState(); - virtual ~AnimState() override; // vtable+0x00 + ~AnimState() override; // vtable+0x00 // FUNCTION: LEGO1 0x10065070 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0460 return "AnimState"; } // FUNCTION: LEGO1 0x10065080 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, AnimState::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool SetFlag() override; // vtable+0x18 - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C + MxBool SetFlag() override; // vtable+0x18 + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C // SYNTHETIC: LEGO1 0x10065130 // AnimState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/beachhouseentity.h b/LEGO1/lego/legoomni/include/beachhouseentity.h index 1c92fc17..0910f49e 100644 --- a/LEGO1/lego/legoomni/include/beachhouseentity.h +++ b/LEGO1/lego/legoomni/include/beachhouseentity.h @@ -8,14 +8,14 @@ class BeachHouseEntity : public BuildingEntity { public: // FUNCTION: LEGO1 0x1000ee80 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0314 return "BeachHouseEntity"; } // FUNCTION: LEGO1 0x1000ee90 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/bike.h b/LEGO1/lego/legoomni/include/bike.h index 3e3f1359..bfc634b4 100644 --- a/LEGO1/lego/legoomni/include/bike.h +++ b/LEGO1/lego/legoomni/include/bike.h @@ -11,22 +11,22 @@ public: Bike(); // FUNCTION: LEGO1 0x100766f0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03d0 return "Bike"; } // FUNCTION: LEGO1 0x10076700 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Bike::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x10076880 // Bike::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/buildingentity.h b/LEGO1/lego/legoomni/include/buildingentity.h index 490c6a0d..d07d9f5d 100644 --- a/LEGO1/lego/legoomni/include/buildingentity.h +++ b/LEGO1/lego/legoomni/include/buildingentity.h @@ -8,19 +8,19 @@ class BuildingEntity : public LegoEntity { public: BuildingEntity(); - virtual ~BuildingEntity() override; // vtable+0x00 + ~BuildingEntity() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10014f20 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f07e8 return "BuildingEntity"; } // FUNCTION: LEGO1 0x10014f30 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, BuildingEntity::ClassName()) || LegoEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/bumpbouy.h b/LEGO1/lego/legoomni/include/bumpbouy.h index 7dc02c82..c6308d57 100644 --- a/LEGO1/lego/legoomni/include/bumpbouy.h +++ b/LEGO1/lego/legoomni/include/bumpbouy.h @@ -7,25 +7,25 @@ // VTABLE: LEGO1 0x100d6790 class BumpBouy : public LegoAnimActor { public: - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x100274e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0394 return "BumpBouy"; } // FUNCTION: LEGO1 0x10027500 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, BumpBouy::ClassName()) || LegoAnimActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + void ParseAction(char*) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 // SYNTHETIC: LEGO1 0x10027490 // BumpBouy::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/carrace.h b/LEGO1/lego/legoomni/include/carrace.h index 42a981bc..c5af66e8 100644 --- a/LEGO1/lego/legoomni/include/carrace.h +++ b/LEGO1/lego/legoomni/include/carrace.h @@ -11,25 +11,25 @@ public: CarRace(); // FUNCTION: LEGO1 0x10016b20 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0528 return "CarRace"; } // FUNCTION: LEGO1 0x10016b30 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual undefined4 VTable0x6c(undefined4) override; // vtable+0x6c - virtual undefined4 VTable0x70(undefined4) override; // vtable+0x70 - virtual undefined4 VTable0x74(undefined4) override; // vtable+0x74 - virtual undefined4 VTable0x78(undefined4) override; // vtable+0x78 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x64() override; // vtable+0x64 + undefined4 VTable0x6c(undefined4) override; // vtable+0x6c + undefined4 VTable0x70(undefined4) override; // vtable+0x70 + undefined4 VTable0x74(undefined4) override; // vtable+0x74 + undefined4 VTable0x78(undefined4) override; // vtable+0x78 // SYNTHETIC: LEGO1 0x10016c70 // CarRace::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/carracestate.h b/LEGO1/lego/legoomni/include/carracestate.h index 490900dd..c7a1e376 100644 --- a/LEGO1/lego/legoomni/include/carracestate.h +++ b/LEGO1/lego/legoomni/include/carracestate.h @@ -8,14 +8,14 @@ class CarRaceState : public RaceState { public: // FUNCTION: LEGO1 0x1000dd30 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f009c return "CarRaceState"; } // FUNCTION: LEGO1 0x1000dd40 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, CarRaceState::ClassName()) || RaceState::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/doors.h b/LEGO1/lego/legoomni/include/doors.h index dc98a866..35958455 100644 --- a/LEGO1/lego/legoomni/include/doors.h +++ b/LEGO1/lego/legoomni/include/doors.h @@ -8,21 +8,21 @@ class Doors : public LegoPathActor { public: // FUNCTION: LEGO1 0x1000e430 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03e8 return "Doors"; } // FUNCTION: LEGO1 0x1000e440 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Doors::ClassName()) || LegoPathActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxS32 VTable0x94() override; // vtable+0x94 + void ParseAction(char*) override; // vtable+0x20 + void VTable0x70(float p_float) override; // vtable+0x70 + MxS32 VTable0x94() override; // vtable+0x94 // SYNTHETIC: LEGO1 0x1000e580 // Doors::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/dunebuggy.h b/LEGO1/lego/legoomni/include/dunebuggy.h index 3aaf7a87..27c0cdb5 100644 --- a/LEGO1/lego/legoomni/include/dunebuggy.h +++ b/LEGO1/lego/legoomni/include/dunebuggy.h @@ -11,24 +11,24 @@ public: DuneBuggy(); // FUNCTION: LEGO1 0x10067c30 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0410 return "DuneBuggy"; } // FUNCTION: LEGO1 0x10067c40 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, DuneBuggy::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x10067dc0 // DuneBuggy::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/elevatorbottom.h b/LEGO1/lego/legoomni/include/elevatorbottom.h index 2c8711a3..80ea3fe0 100644 --- a/LEGO1/lego/legoomni/include/elevatorbottom.h +++ b/LEGO1/lego/legoomni/include/elevatorbottom.h @@ -11,31 +11,31 @@ class LegoControlManagerEvent; class ElevatorBottom : public LegoWorld { public: ElevatorBottom(); - virtual ~ElevatorBottom() override; // vtable+0x00 + ~ElevatorBottom() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10017f20 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04ac return "ElevatorBottom"; } // FUNCTION: LEGO1 0x10017f30 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, ElevatorBottom::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 // FUNCTION: LEGO1 0x10017f10 - virtual MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c + MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x10018040 // ElevatorBottom::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/gasstation.h b/LEGO1/lego/legoomni/include/gasstation.h index baa42ab2..f8115487 100644 --- a/LEGO1/lego/legoomni/include/gasstation.h +++ b/LEGO1/lego/legoomni/include/gasstation.h @@ -11,29 +11,29 @@ class GasStation : public LegoWorld { public: GasStation(); - virtual ~GasStation() override; // vtable+0x00 + ~GasStation() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10004780 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0168 return "GasStation"; } // FUNCTION: LEGO1 0x10004790 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, GasStation::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x100048a0 // GasStation::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/gasstationentity.h b/LEGO1/lego/legoomni/include/gasstationentity.h index 7ab807cd..0b271d46 100644 --- a/LEGO1/lego/legoomni/include/gasstationentity.h +++ b/LEGO1/lego/legoomni/include/gasstationentity.h @@ -8,14 +8,14 @@ class GasStationEntity : public BuildingEntity { public: // FUNCTION: LEGO1 0x1000eb20 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0348 return "GasStationEntity"; } // FUNCTION: LEGO1 0x1000eb30 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, GasStationEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/gasstationstate.h b/LEGO1/lego/legoomni/include/gasstationstate.h index a756e783..e9bbd0df 100644 --- a/LEGO1/lego/legoomni/include/gasstationstate.h +++ b/LEGO1/lego/legoomni/include/gasstationstate.h @@ -10,19 +10,19 @@ public: GasStationState(); // FUNCTION: LEGO1 0x100061d0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0174 return "GasStationState"; } // FUNCTION: LEGO1 0x100061e0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, GasStationState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x10006290 // GasStationState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/gifmanager.h b/LEGO1/lego/legoomni/include/gifmanager.h index 1d424fb7..ce600a62 100644 --- a/LEGO1/lego/legoomni/include/gifmanager.h +++ b/LEGO1/lego/legoomni/include/gifmanager.h @@ -77,7 +77,7 @@ protected: class GifManager : public GifManagerBase { public: GifManager() { m_ownership = TRUE; } - virtual ~GifManager() override; + ~GifManager() override; // SYNTHETIC: LEGO1 0x1005a580 // GifManager::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/helicopter.h b/LEGO1/lego/legoomni/include/helicopter.h index 74670324..6c917aec 100644 --- a/LEGO1/lego/legoomni/include/helicopter.h +++ b/LEGO1/lego/legoomni/include/helicopter.h @@ -22,28 +22,28 @@ private: class Helicopter : public IslePathActor { public: Helicopter(); - virtual ~Helicopter() override; // vtable+0x00 + ~Helicopter() override; // vtable+0x00 // FUNCTION: LEGO1 0x10003070 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0130 return "Helicopter"; } // FUNCTION: LEGO1 0x10003080 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Helicopter::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8 - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8 + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x10003210 // Helicopter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/helicopterstate.h b/LEGO1/lego/legoomni/include/helicopterstate.h index a1562157..993b8f7c 100644 --- a/LEGO1/lego/legoomni/include/helicopterstate.h +++ b/LEGO1/lego/legoomni/include/helicopterstate.h @@ -9,23 +9,23 @@ class HelicopterState : public LegoState { public: // FUNCTION: LEGO1 0x1000e0d0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0144 return "HelicopterState"; } // FUNCTION: LEGO1 0x1000e0e0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, HelicopterState::ClassName()) || LegoState::IsA(p_name); } // FUNCTION: LEGO1 0x1000e0b0 - virtual MxBool VTable0x14() override { return FALSE; } // vtable+0x14 + MxBool VTable0x14() override { return FALSE; } // vtable+0x14 // FUNCTION: LEGO1 0x1000e0c0 - virtual MxBool SetFlag() override + MxBool SetFlag() override { m_unk0x08 = 0; return TRUE; diff --git a/LEGO1/lego/legoomni/include/historybook.h b/LEGO1/lego/legoomni/include/historybook.h index 9152e07a..862be059 100644 --- a/LEGO1/lego/legoomni/include/historybook.h +++ b/LEGO1/lego/legoomni/include/historybook.h @@ -8,26 +8,26 @@ class HistoryBook : public LegoWorld { public: HistoryBook(); - virtual ~HistoryBook() override; // vtable+0x00 + ~HistoryBook() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10082390 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04bc return "HistoryBook"; } // FUNCTION: LEGO1 0x100823a0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, HistoryBook::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x64() override; // vtable+0x64 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x64() override; // vtable+0x64 // SYNTHETIC: LEGO1 0x100824b0 // HistoryBook::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/hospital.h b/LEGO1/lego/legoomni/include/hospital.h index ad8bd137..ebf802a9 100644 --- a/LEGO1/lego/legoomni/include/hospital.h +++ b/LEGO1/lego/legoomni/include/hospital.h @@ -9,29 +9,29 @@ class Hospital : public LegoWorld { public: Hospital(); - virtual ~Hospital() override; // vtable+0x00 + ~Hospital() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x100746b0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0490 return "Hospital"; } // FUNCTION: LEGO1 0x100746c0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Hospital::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x100747d0 // Hospital::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/hospitalentity.h b/LEGO1/lego/legoomni/include/hospitalentity.h index fea461d8..a837bd7b 100644 --- a/LEGO1/lego/legoomni/include/hospitalentity.h +++ b/LEGO1/lego/legoomni/include/hospitalentity.h @@ -8,14 +8,14 @@ class HospitalEntity : public BuildingEntity { public: // FUNCTION: LEGO1 0x1000ec40 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0338 return "HospitalEntity"; } // FUNCTION: LEGO1 0x1000ec50 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, HospitalEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/hospitalstate.h b/LEGO1/lego/legoomni/include/hospitalstate.h index a6ccd77a..980007e3 100644 --- a/LEGO1/lego/legoomni/include/hospitalstate.h +++ b/LEGO1/lego/legoomni/include/hospitalstate.h @@ -9,22 +9,22 @@ class HospitalState : public LegoState { public: HospitalState(); - virtual ~HospitalState() override {} + ~HospitalState() override {} // FUNCTION: LEGO1 0x10076400 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0480 return "HospitalState"; } // FUNCTION: LEGO1 0x10076410 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, HospitalState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x100764c0 // HospitalState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/infocenter.h b/LEGO1/lego/legoomni/include/infocenter.h index 56f01e09..bd06f5bf 100644 --- a/LEGO1/lego/legoomni/include/infocenter.h +++ b/LEGO1/lego/legoomni/include/infocenter.h @@ -148,29 +148,29 @@ public: }; Infocenter(); - virtual ~Infocenter() override; + ~Infocenter() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1006eb40 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04ec return "Infocenter"; } // FUNCTION: LEGO1 0x1006eb50 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Infocenter::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1006ec60 // Infocenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/infocenterdoor.h b/LEGO1/lego/legoomni/include/infocenterdoor.h index 0869d4e4..3335731c 100644 --- a/LEGO1/lego/legoomni/include/infocenterdoor.h +++ b/LEGO1/lego/legoomni/include/infocenterdoor.h @@ -10,31 +10,31 @@ class LegoControlManagerEvent; class InfocenterDoor : public LegoWorld { public: InfocenterDoor(); - virtual ~InfocenterDoor(); // vtable+0x00 + ~InfocenterDoor() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x100377b0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f049c return "InfocenterDoor"; } // FUNCTION: LEGO1 0x100377c0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, InfocenterDoor::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 // FUNCTION: LEGO1 0x100377a0 - virtual MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c + MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x100378d0 // InfocenterDoor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/infocenterentity.h b/LEGO1/lego/legoomni/include/infocenterentity.h index 91fe03ff..85bcbce5 100644 --- a/LEGO1/lego/legoomni/include/infocenterentity.h +++ b/LEGO1/lego/legoomni/include/infocenterentity.h @@ -8,14 +8,14 @@ class InfoCenterEntity : public BuildingEntity { public: // FUNCTION: LEGO1 0x1000ea00 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f035c return "InfoCenterEntity"; } // FUNCTION: LEGO1 0x1000ea10 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/infocenterstate.h b/LEGO1/lego/legoomni/include/infocenterstate.h index ed23acef..49ca0988 100644 --- a/LEGO1/lego/legoomni/include/infocenterstate.h +++ b/LEGO1/lego/legoomni/include/infocenterstate.h @@ -10,23 +10,23 @@ class InfocenterState : public LegoState { public: InfocenterState(); - virtual ~InfocenterState() override; + ~InfocenterState() override; // FUNCTION: LEGO1 0x10071840 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04dc return "InfocenterState"; } // FUNCTION: LEGO1 0x10071850 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, InfocenterState::ClassName()) || LegoState::IsA(p_name); } // FUNCTION: LEGO1 0x10071830 - virtual MxBool VTable0x14() override { return FALSE; } // vtable+0x14 + MxBool VTable0x14() override { return FALSE; } // vtable+0x14 inline MxS16 GetInfocenterBufferSize() { return sizeof(m_buffer) / sizeof(m_buffer[0]); } inline MxStillPresenter* GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; } diff --git a/LEGO1/lego/legoomni/include/isle.h b/LEGO1/lego/legoomni/include/isle.h index 04871028..e62577d6 100644 --- a/LEGO1/lego/legoomni/include/isle.h +++ b/LEGO1/lego/legoomni/include/isle.h @@ -23,31 +23,31 @@ class Act1State; class Isle : public LegoWorld { public: Isle(); - virtual ~Isle() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + ~Isle() override; + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10030910 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0458 return "Isle"; } // FUNCTION: LEGO1 0x10030920 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Isle::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+50 - virtual void Add(MxCore* p_object) override; // vtable+58 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+50 + void Add(MxCore* p_object) override; // vtable+58 // FUNCTION: LEGO1 0x10030900 - virtual MxBool VTable0x5c() override { return TRUE; } // vtable+5c + MxBool VTable0x5c() override { return TRUE; } // vtable+5c // FUNCTION: LEGO1 0x10033170 - virtual void VTable0x60() override {} // vtable+60 - virtual MxBool VTable0x64() override; // vtable+64 - virtual void VTable0x68(MxBool p_add) override; // vtable+68 + void VTable0x60() override {} // vtable+60 + MxBool VTable0x64() override; // vtable+64 + void VTable0x68(MxBool p_add) override; // vtable+68 virtual void VTable0x6c(IslePathActor* p_actor); // vtable+6c inline void SetUnknown13c(MxU32 p_unk0x13c) { m_unk0x13c = p_unk0x13c; } diff --git a/LEGO1/lego/legoomni/include/isleactor.h b/LEGO1/lego/legoomni/include/isleactor.h index d8253821..c51946d3 100644 --- a/LEGO1/lego/legoomni/include/isleactor.h +++ b/LEGO1/lego/legoomni/include/isleactor.h @@ -6,22 +6,22 @@ // VTABLE: LEGO1 0x100d5178 class IsleActor : public LegoActor { public: - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1000e660 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f07dc return "IsleActor"; } // FUNCTION: LEGO1 0x1000e670 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, IsleActor::ClassName()) || LegoActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 }; // SYNTHETIC: LEGO1 0x1000e940 diff --git a/LEGO1/lego/legoomni/include/islepathactor.h b/LEGO1/lego/legoomni/include/islepathactor.h index 2770b457..a7fabbfa 100644 --- a/LEGO1/lego/legoomni/include/islepathactor.h +++ b/LEGO1/lego/legoomni/include/islepathactor.h @@ -15,25 +15,25 @@ public: IslePathActor(); // FUNCTION: LEGO1 0x10002e10 - inline virtual ~IslePathActor() override { IslePathActor::Destroy(TRUE); } // vtable+0x00 + inline ~IslePathActor() override { IslePathActor::Destroy(TRUE); } // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10002ea0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0104 return "IslePathActor"; } // FUNCTION: LEGO1 0x10002eb0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, IslePathActor::ClassName()) || LegoPathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c // FUNCTION: LEGO1 0x10002e70 virtual MxU32 VTable0xcc() { return 0; } // vtable+0xcc // FUNCTION: LEGO1 0x10002df0 diff --git a/LEGO1/lego/legoomni/include/jetski.h b/LEGO1/lego/legoomni/include/jetski.h index 91de4b91..b71e43cf 100644 --- a/LEGO1/lego/legoomni/include/jetski.h +++ b/LEGO1/lego/legoomni/include/jetski.h @@ -12,23 +12,23 @@ public: Jetski(); // FUNCTION: LEGO1 0x1007e430 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03d8 return "Jetski"; } // FUNCTION: LEGO1 0x1007e440 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Jetski::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent&) override; // vtable+0xd4 - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent&) override; // vtable+0xd4 + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x1007e5c0 // Jetski::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/jetskirace.h b/LEGO1/lego/legoomni/include/jetskirace.h index 9b16d9a7..d926e871 100644 --- a/LEGO1/lego/legoomni/include/jetskirace.h +++ b/LEGO1/lego/legoomni/include/jetskirace.h @@ -8,14 +8,14 @@ class JetskiRace : public LegoRace { public: // FUNCTION: LEGO1 0x1000daf0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0530 return "JetskiRace"; } // FUNCTION: LEGO1 0x1000db00 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, JetskiRace::ClassName()) || LegoRace::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/jetskiracestate.h b/LEGO1/lego/legoomni/include/jetskiracestate.h index ccb60112..812a0a0f 100644 --- a/LEGO1/lego/legoomni/include/jetskiracestate.h +++ b/LEGO1/lego/legoomni/include/jetskiracestate.h @@ -8,14 +8,14 @@ class JetskiRaceState : public RaceState { public: // FUNCTION: LEGO1 0x1000dc40 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f00ac return "JetskiRaceState"; } // FUNCTION: LEGO1 0x1000dc50 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, JetskiRaceState::ClassName()) || RaceState::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/jukebox.h b/LEGO1/lego/legoomni/include/jukebox.h index 9879a446..f1335262 100644 --- a/LEGO1/lego/legoomni/include/jukebox.h +++ b/LEGO1/lego/legoomni/include/jukebox.h @@ -10,27 +10,27 @@ class JukeBox : public LegoWorld { public: JukeBox(); - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1005d6f0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f02cc return "JukeBox"; } // FUNCTION: LEGO1 0x1005d700 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, JukeBox::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1005d810 // JukeBox::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/jukeboxentity.h b/LEGO1/lego/legoomni/include/jukeboxentity.h index 38691ba6..8afee4b5 100644 --- a/LEGO1/lego/legoomni/include/jukeboxentity.h +++ b/LEGO1/lego/legoomni/include/jukeboxentity.h @@ -8,19 +8,19 @@ class JukeBoxEntity : public LegoEntity { public: JukeBoxEntity(); - virtual ~JukeBoxEntity() override; // vtable+0x00 + ~JukeBoxEntity() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10085cc0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f02f0 return "JukeBoxEntity"; } // FUNCTION: LEGO1 0x10085cd0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, JukeBoxEntity::ClassName()) || LegoEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/jukeboxstate.h b/LEGO1/lego/legoomni/include/jukeboxstate.h index 8263e97c..7f157bd0 100644 --- a/LEGO1/lego/legoomni/include/jukeboxstate.h +++ b/LEGO1/lego/legoomni/include/jukeboxstate.h @@ -8,19 +8,19 @@ class JukeBoxState : public LegoState { public: // FUNCTION: LEGO1 0x1000f310 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f02bc return "JukeBoxState"; } // FUNCTION: LEGO1 0x1000f320 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, JukeBoxState::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool VTable0x14() override; // vtable+0x14 + MxBool VTable0x14() override; // vtable+0x14 // SYNTHETIC: LEGO1 0x1000f3d0 // JukeBoxState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/lego3dwavepresenter.h b/LEGO1/lego/legoomni/include/lego3dwavepresenter.h index bf771d45..22b39156 100644 --- a/LEGO1/lego/legoomni/include/lego3dwavepresenter.h +++ b/LEGO1/lego/legoomni/include/lego3dwavepresenter.h @@ -8,22 +8,22 @@ class Lego3DWavePresenter : public MxWavePresenter { public: // FUNCTION: LEGO1 0x1000d890 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f058c return "Lego3DWavePresenter"; } // FUNCTION: LEGO1 0x1000d8a0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Lego3DWavePresenter::ClassName()) || MxWavePresenter::IsA(p_name); } - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 // SYNTHETIC: LEGO1 0x1000f4b0 // Lego3DWavePresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoact2.h b/LEGO1/lego/legoomni/include/legoact2.h index 0ac22875..5e89e06e 100644 --- a/LEGO1/lego/legoomni/include/legoact2.h +++ b/LEGO1/lego/legoomni/include/legoact2.h @@ -9,14 +9,14 @@ // SIZE 0x1154 class LegoAct2 : public LegoWorld { - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual void VTable0x60() override; // vtable+0x60 - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + void VTable0x60() override; // vtable+0x60 + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1004fe20 // LegoAct2::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoact2state.h b/LEGO1/lego/legoomni/include/legoact2state.h index e37af2dc..78101599 100644 --- a/LEGO1/lego/legoomni/include/legoact2state.h +++ b/LEGO1/lego/legoomni/include/legoact2state.h @@ -7,22 +7,22 @@ // SIZE 0x10 class LegoAct2State : public LegoState { public: - virtual ~LegoAct2State() override {} + ~LegoAct2State() override {} // FUNCTION: LEGO1 0x1000df80 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0428 return "LegoAct2State"; } // FUNCTION: LEGO1 0x1000df90 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoAct2State::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool VTable0x14() override; // vtable+0x14 + MxBool VTable0x14() override; // vtable+0x14 // SYNTHETIC: LEGO1 0x1000e040 // LegoAct2State::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h b/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h index 633fc5eb..3dcbfecb 100644 --- a/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h +++ b/LEGO1/lego/legoomni/include/legoactioncontrolpresenter.h @@ -10,25 +10,25 @@ class LegoActionControlPresenter : public MxMediaPresenter { public: inline LegoActionControlPresenter() { m_unk0x50 = Extra::ActionType::e_none; } - virtual ~LegoActionControlPresenter() override { Destroy(TRUE); } // vtable+0x00 + ~LegoActionControlPresenter() override { Destroy(TRUE); } // vtable+0x00 // FUNCTION: LEGO1 0x1000d0e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f05bc return "LegoActionControlPresenter"; } // FUNCTION: LEGO1 0x1000d0f0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoActionControlPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult AddToManager() override; // vtable+0x34 + void ReadyTickle() override; // vtable+0x18 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 + MxResult AddToManager() override; // vtable+0x34 virtual void Destroy(MxBool p_fromDestructor); // vtable+0x5c private: diff --git a/LEGO1/lego/legoomni/include/legoactor.h b/LEGO1/lego/legoomni/include/legoactor.h index 76beb249..0f048619 100644 --- a/LEGO1/lego/legoomni/include/legoactor.h +++ b/LEGO1/lego/legoomni/include/legoactor.h @@ -9,23 +9,23 @@ class LegoActor : public LegoEntity { public: LegoActor(); - virtual ~LegoActor() override; + ~LegoActor() override; // FUNCTION: LEGO1 0x1002d210 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0124 return "LegoActor"; } // FUNCTION: LEGO1 0x1002d220 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoActor::ClassName()) || LegoEntity::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 + void ParseAction(char*) override; // vtable+0x20 + void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 // FUNCTION: LEGO1 0x10002cc0 virtual MxFloat VTable0x50() { return m_unk0x68; } // vtable+0x50 diff --git a/LEGO1/lego/legoomni/include/legoactorpresenter.h b/LEGO1/lego/legoomni/include/legoactorpresenter.h index a9b8ae7e..9c3b35bf 100644 --- a/LEGO1/lego/legoomni/include/legoactorpresenter.h +++ b/LEGO1/lego/legoomni/include/legoactorpresenter.h @@ -7,24 +7,24 @@ // SIZE 0x50 class LegoActorPresenter : public LegoEntityPresenter { public: - virtual ~LegoActorPresenter() override{}; + ~LegoActorPresenter() override{}; // FUNCTION: LEGO1 0x1000cb10 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f06a4 return "LegoActorPresenter"; } // FUNCTION: LEGO1 0x1000cb20 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void ParseExtra() override; // vtable+0x30 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void ParseExtra() override; // vtable+0x30 }; // SYNTHETIC: LEGO1 0x1000cc30 diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index c8ad60cd..85f1d8ec 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -9,20 +9,20 @@ class LegoAnimationManager : public MxCore { public: LegoAnimationManager(); - virtual ~LegoAnimationManager() override; // vtable+0x00 + ~LegoAnimationManager() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1005ec80 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f7508 return "LegoAnimationManager"; } // FUNCTION: LEGO1 0x1005ec90 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h index 790ee92c..c79c8043 100644 --- a/LEGO1/lego/legoomni/include/legoanimmmpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimmmpresenter.h @@ -9,30 +9,30 @@ class LegoAnimMMPresenter : public MxCompositePresenter { public: LegoAnimMMPresenter(); - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1004a950 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f046c return "LegoAnimMMPresenter"; } // FUNCTION: LEGO1 0x1004a960 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoAnimMMPresenter::ClassName()) || MxCompositePresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void DoneTickle() override; // vtable+0x2c - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c - virtual void EndAction() override; // vtable+0x40 - virtual void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void DoneTickle() override; // vtable+0x2c + void ParseExtra() override; // vtable+0x30 + MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c + void EndAction() override; // vtable+0x40 + void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60 // SYNTHETIC: LEGO1 0x1004aa40 // LegoAnimMMPresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoanimpresenter.h b/LEGO1/lego/legoomni/include/legoanimpresenter.h index 2a2845cf..221dfeb0 100644 --- a/LEGO1/lego/legoomni/include/legoanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimpresenter.h @@ -14,32 +14,32 @@ class LegoAnimClass; class LegoAnimPresenter : public MxVideoPresenter { public: LegoAnimPresenter(); - virtual ~LegoAnimPresenter() override; + ~LegoAnimPresenter() override; // FUNCTION: LEGO1 0x10068530 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f071c return "LegoAnimPresenter"; } // FUNCTION: LEGO1 0x10068540 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoAnimPresenter::ClassName()) || MxVideoPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void DoneTickle() override; // vtable+0x2c - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c - virtual void EndAction() override; // vtable+0x40 - virtual void PutFrame() override; // vtable+0x6c - virtual MxResult VTable0x88(MxStreamChunk* p_chunk); // vtable+0x88 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void DoneTickle() override; // vtable+0x2c + void ParseExtra() override; // vtable+0x30 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c + void EndAction() override; // vtable+0x40 + void PutFrame() override; // vtable+0x6c + virtual MxResult VTable0x88(MxStreamChunk* p_chunk); // vtable+0x88 inline LegoAnimClass* GetUnknown0x64() { return m_unk0x64; } @@ -81,11 +81,11 @@ protected: class LegoAnimClass : public LegoTree { public: LegoAnimClass(); - virtual ~LegoAnimClass() override; + ~LegoAnimClass() override; - virtual LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08 - virtual LegoTreeNodeData* CreateData() override; // vtable+0x0c - virtual MxResult VTable0x10(LegoMemory* p_stream, MxS32); // vtable+0x10 + LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08 + LegoTreeNodeData* CreateData() override; // vtable+0x0c + virtual MxResult VTable0x10(LegoMemory* p_stream, MxS32); // vtable+0x10 inline MxLong GetUnknown0x8() { return m_unk0x08; } diff --git a/LEGO1/lego/legoomni/include/legobackgroundcolor.h b/LEGO1/lego/legoomni/include/legobackgroundcolor.h index 5d05618b..672e39be 100644 --- a/LEGO1/lego/legoomni/include/legobackgroundcolor.h +++ b/LEGO1/lego/legoomni/include/legobackgroundcolor.h @@ -8,7 +8,7 @@ class LegoBackgroundColor : public MxVariable { public: LegoBackgroundColor(const char* p_key, const char* p_value); - virtual void SetValue(const char* p_colorString) override; + void SetValue(const char* p_colorString) override; private: float m_h; diff --git a/LEGO1/lego/legoomni/include/legobuildingmanager.h b/LEGO1/lego/legoomni/include/legobuildingmanager.h index 7bde7ad9..4559d41d 100644 --- a/LEGO1/lego/legoomni/include/legobuildingmanager.h +++ b/LEGO1/lego/legoomni/include/legobuildingmanager.h @@ -8,12 +8,12 @@ class LegoBuildingManager : public MxCore { public: LegoBuildingManager(); - virtual ~LegoBuildingManager() override; + ~LegoBuildingManager() override; - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1002f930 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f37d0 return "LegoBuildingManager"; diff --git a/LEGO1/lego/legoomni/include/legocachesound.h b/LEGO1/lego/legoomni/include/legocachesound.h index 44ddb859..2d7c932c 100644 --- a/LEGO1/lego/legoomni/include/legocachesound.h +++ b/LEGO1/lego/legoomni/include/legocachesound.h @@ -9,17 +9,17 @@ class LegoCacheSound : public MxCore { public: LegoCacheSound(); - virtual ~LegoCacheSound() override; // vtable+0x00 + ~LegoCacheSound() override; // vtable+0x00 // FUNCTION: LEGO1 0x10006580 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f01c4 return "LegoCacheSound"; } // FUNCTION: LEGO1 0x10006590 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoCacheSound::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/legocachesoundlist.h b/LEGO1/lego/legoomni/include/legocachesoundlist.h index 2080ae14..25459911 100644 --- a/LEGO1/lego/legoomni/include/legocachesoundlist.h +++ b/LEGO1/lego/legoomni/include/legocachesoundlist.h @@ -22,7 +22,7 @@ public: LegoCacheSoundList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} // FUNCTION: LEGO1 0x1001e650 - virtual MxS8 Compare(LegoCacheSound* p_a, LegoCacheSound* p_b) override + MxS8 Compare(LegoCacheSound* p_a, LegoCacheSound* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/lego/legoomni/include/legocameracontroller.h b/LEGO1/lego/legoomni/include/legocameracontroller.h index a3ef12a7..0032092b 100644 --- a/LEGO1/lego/legoomni/include/legocameracontroller.h +++ b/LEGO1/lego/legoomni/include/legocameracontroller.h @@ -12,19 +12,19 @@ class LegoCameraController : public LegoPointOfViewController { public: LegoCameraController(); - virtual ~LegoCameraController() override; // vtable+0x00 + ~LegoCameraController() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+04 + MxLong Notify(MxParam& p_param) override; // vtable+04 // FUNCTION: LEGO1 0x10011ec0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0850 return "LegoCameraController"; } // FUNCTION: LEGO1 0x10011ed0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/legocarbuild.h b/LEGO1/lego/legoomni/include/legocarbuild.h index 3ce04e02..8314b149 100644 --- a/LEGO1/lego/legoomni/include/legocarbuild.h +++ b/LEGO1/lego/legoomni/include/legocarbuild.h @@ -8,29 +8,29 @@ class LegoCarBuild : public LegoWorld { public: LegoCarBuild(); - virtual ~LegoCarBuild() override; + ~LegoCarBuild() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10022940 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0504 return "LegoCarBuild"; } // FUNCTION: LEGO1 0x10022950 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoCarBuild::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x10022a60 // LegoCarBuild::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legocarbuildanimpresenter.h b/LEGO1/lego/legoomni/include/legocarbuildanimpresenter.h index d15e2f19..fd5f8148 100644 --- a/LEGO1/lego/legoomni/include/legocarbuildanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legocarbuildanimpresenter.h @@ -8,26 +8,26 @@ class LegoCarBuildAnimPresenter : public LegoAnimPresenter { public: LegoCarBuildAnimPresenter(); - virtual ~LegoCarBuildAnimPresenter() override; // vtable+0x00 + ~LegoCarBuildAnimPresenter() override; // vtable+0x00 // FUNCTION: LEGO1 0x10078510 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f05ec return "LegoCarBuildAnimPresenter"; } // FUNCTION: LEGO1 0x10078520 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoCarBuildAnimPresenter::ClassName()) || LegoAnimPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void EndAction() override; // vtable+0x40 - virtual void PutFrame() override; // vtable+0x6c + void ReadyTickle() override; // vtable+0x18 + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void EndAction() override; // vtable+0x40 + void PutFrame() override; // vtable+0x6c // SYNTHETIC: LEGO1 0x10078660 // LegoCarBuildAnimPresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legocarraceactor.h b/LEGO1/lego/legoomni/include/legocarraceactor.h index 5f2756a3..3905be16 100644 --- a/LEGO1/lego/legoomni/include/legocarraceactor.h +++ b/LEGO1/lego/legoomni/include/legocarraceactor.h @@ -7,25 +7,25 @@ class LegoCarRaceActor : public LegoRaceActor { public: // FUNCTION: LEGO1 0x10081650 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0568 return "LegoCarRaceActor"; } // FUNCTION: LEGO1 0x10081670 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoCarRaceActor::ClassName()) || LegoRaceActor::IsA(p_name); } - virtual void VTable0x68() override; // vtable+0x68 - virtual void VTable0x6c() override; // vtable+0x6c - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxS32 VTable0x90() override; // vtable+0x90 - virtual MxS32 VTable0x94() override; // vtable+0x94 - virtual void VTable0x98() override; // vtable+0x98 - virtual void VTable0x9c() override; // vtable+0x9c + void VTable0x68() override; // vtable+0x68 + void VTable0x6c() override; // vtable+0x6c + void VTable0x70(float p_float) override; // vtable+0x70 + MxS32 VTable0x90() override; // vtable+0x90 + MxS32 VTable0x94() override; // vtable+0x94 + void VTable0x98() override; // vtable+0x98 + void VTable0x9c() override; // vtable+0x9c // SYNTHETIC: LEGO1 0x10081610 // LegoCarRaceActor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legocontrolmanager.h b/LEGO1/lego/legoomni/include/legocontrolmanager.h index 0206c520..b4222164 100644 --- a/LEGO1/lego/legoomni/include/legocontrolmanager.h +++ b/LEGO1/lego/legoomni/include/legocontrolmanager.h @@ -40,19 +40,19 @@ private: class LegoControlManager : public MxCore { public: LegoControlManager(); - virtual ~LegoControlManager() override; // vtable+0x00 + ~LegoControlManager() override; // vtable+0x00 - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10028cb0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f31b8 return "LegoControlManager"; } // FUNCTION: LEGO1 0x10028cc0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoControlManager::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/legoentity.h b/LEGO1/lego/legoomni/include/legoentity.h index c5088097..e132a113 100644 --- a/LEGO1/lego/legoomni/include/legoentity.h +++ b/LEGO1/lego/legoomni/include/legoentity.h @@ -20,9 +20,9 @@ public: inline LegoEntity() { Init(); } // FUNCTION: LEGO1 0x1000c290 - virtual ~LegoEntity() override { Destroy(TRUE); } + ~LegoEntity() override { Destroy(TRUE); } - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1000c2f0 inline const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/legoentitylist.h b/LEGO1/lego/legoomni/include/legoentitylist.h index d1c1383f..ef64b06c 100644 --- a/LEGO1/lego/legoomni/include/legoentitylist.h +++ b/LEGO1/lego/legoomni/include/legoentitylist.h @@ -22,7 +22,7 @@ public: LegoEntityList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} // FUNCTION: LEGO1 0x1001e2d0 - virtual MxS8 Compare(LegoEntity* p_a, LegoEntity* p_b) override + MxS8 Compare(LegoEntity* p_a, LegoEntity* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/lego/legoomni/include/legoentitypresenter.h b/LEGO1/lego/legoomni/include/legoentitypresenter.h index 291809ab..565e7878 100644 --- a/LEGO1/lego/legoomni/include/legoentitypresenter.h +++ b/LEGO1/lego/legoomni/include/legoentitypresenter.h @@ -10,7 +10,7 @@ class LegoEntity; class LegoEntityPresenter : public MxCompositePresenter { public: LegoEntityPresenter(); - virtual ~LegoEntityPresenter() override; // vtable+0x00 + ~LegoEntityPresenter() override; // vtable+0x00 // FUNCTION: LEGO1 0x100534b0 inline const char* ClassName() const override // vtable+0x0c @@ -25,13 +25,13 @@ public: return !strcmp(p_name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 - virtual void Destroy() override; // vtable+0x38 - virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c - virtual void Init(); // vtable+0x68 - virtual undefined4 SetEntity(LegoEntity* p_entity); // vtable+0x6c + void ReadyTickle() override; // vtable+0x18 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 + void Destroy() override; // vtable+0x38 + MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c + virtual void Init(); // vtable+0x68 + virtual undefined4 SetEntity(LegoEntity* p_entity); // vtable+0x6c void SetEntityLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up); diff --git a/LEGO1/lego/legoomni/include/legoeventnotificationparam.h b/LEGO1/lego/legoomni/include/legoeventnotificationparam.h index 650ef8f6..a9c13632 100644 --- a/LEGO1/lego/legoomni/include/legoeventnotificationparam.h +++ b/LEGO1/lego/legoomni/include/legoeventnotificationparam.h @@ -12,7 +12,7 @@ class LegoEventNotificationParam : public MxNotificationParam { public: // FUNCTION: LEGO1 0x10028690 - virtual MxNotificationParam* Clone() override + MxNotificationParam* Clone() override { LegoEventNotificationParam* clone = new LegoEventNotificationParam(m_type, m_sender, m_modifier, m_x, m_y, m_key); diff --git a/LEGO1/lego/legoomni/include/legoflctexturepresenter.h b/LEGO1/lego/legoomni/include/legoflctexturepresenter.h index f86cf448..70f8a309 100644 --- a/LEGO1/lego/legoomni/include/legoflctexturepresenter.h +++ b/LEGO1/lego/legoomni/include/legoflctexturepresenter.h @@ -17,9 +17,9 @@ public: return "LegoFlcTexturePresenter"; } - virtual void StartingTickle() override; // vtable+0x1c - virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 - virtual void PutFrame() override; // vtable+0x6c + void StartingTickle() override; // vtable+0x1c + void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 + void PutFrame() override; // vtable+0x6c // SYNTHETIC: LEGO1 0x1005df00 // LegoFlcTexturePresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legofullscreenmovie.h b/LEGO1/lego/legoomni/include/legofullscreenmovie.h index f2cdaae4..2f2f7614 100644 --- a/LEGO1/lego/legoomni/include/legofullscreenmovie.h +++ b/LEGO1/lego/legoomni/include/legofullscreenmovie.h @@ -8,7 +8,7 @@ class LegoFullScreenMovie : public MxVariable { public: LegoFullScreenMovie(const char* p_key, const char* p_value); - virtual void SetValue(const char* p_option) override; + void SetValue(const char* p_option) override; }; #endif // LEGOFULLSCREENMOVIE_H diff --git a/LEGO1/lego/legoomni/include/legohideanimpresenter.h b/LEGO1/lego/legoomni/include/legohideanimpresenter.h index 29232923..37b8c475 100644 --- a/LEGO1/lego/legoomni/include/legohideanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legohideanimpresenter.h @@ -9,7 +9,7 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter { public: LegoHideAnimPresenter(); - virtual ~LegoHideAnimPresenter() override; + ~LegoHideAnimPresenter() override; // FUNCTION: LEGO1 0x1006d880 inline const char* ClassName() const override // vtable+0x0c @@ -24,12 +24,12 @@ public: return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x18 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual void EndAction() override; // vtable+0x40 - virtual void PutFrame() override; // vtable+0x6c + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x18 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + void EndAction() override; // vtable+0x40 + void PutFrame() override; // vtable+0x6c private: void Init(); diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index e872eff6..69a9dc64 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -42,7 +42,7 @@ class LegoEventQueue : public MxQueue {}; class LegoNotifyList : public MxPtrList { protected: // FUNCTION: LEGO1 0x10028830 - virtual MxS8 Compare(MxCore* p_element1, MxCore* p_element2) override + MxS8 Compare(MxCore* p_element1, MxCore* p_element2) override { return p_element1 == p_element2 ? 0 : p_element1 < p_element2 ? -1 : 1; } // vtable+0x14 @@ -69,19 +69,19 @@ public: class LegoInputManager : public MxPresenter { public: LegoInputManager(); - virtual ~LegoInputManager() override; + ~LegoInputManager() override; void QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key); void Register(MxCore*); void UnRegister(MxCore*); - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1005b8c0 - virtual MxResult PutData() override { return SUCCESS; } // vtable+0x4c + MxResult PutData() override { return SUCCESS; } // vtable+0x4c MxResult Create(HWND p_hwnd); - void Destroy(); + void Destroy() override; void CreateAndAcquireKeyboard(HWND p_hwnd); void ReleaseDX(); MxResult GetJoystickId(); diff --git a/LEGO1/lego/legoomni/include/legojetski.h b/LEGO1/lego/legoomni/include/legojetski.h index a4699945..1ec0b9bb 100644 --- a/LEGO1/lego/legoomni/include/legojetski.h +++ b/LEGO1/lego/legoomni/include/legojetski.h @@ -6,7 +6,7 @@ // VTABLE: LEGO1 0x100d5a40 class LegoJetski : public LegoJetskiRaceActor { public: - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10013e80 inline const char* ClassName() const override // vtable+0x0c @@ -21,13 +21,13 @@ public: return !strcmp(p_name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - virtual void VTable0x6c() override; // vtable+0x6c - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxS32 VTable0x94() override; // vtable+0x94 - virtual void VTable0x98() override; // vtable+0x98 - virtual void VTable0x9c() override; // vtable+0x9c + void ParseAction(char*) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void VTable0x6c() override; // vtable+0x6c + void VTable0x70(float p_float) override; // vtable+0x70 + MxS32 VTable0x94() override; // vtable+0x94 + void VTable0x98() override; // vtable+0x98 + void VTable0x9c() override; // vtable+0x9c // SYNTHETIC: LEGO1 0x10013e20 // LegoJetski::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legojetskiraceactor.h b/LEGO1/lego/legoomni/include/legojetskiraceactor.h index 149b7011..fd7d88bb 100644 --- a/LEGO1/lego/legoomni/include/legojetskiraceactor.h +++ b/LEGO1/lego/legoomni/include/legojetskiraceactor.h @@ -19,10 +19,10 @@ public: return !strcmp(p_name, LegoJetskiRaceActor::ClassName()) || LegoCarRaceActor::IsA(p_name); } - virtual void VTable0x6c() override; // vtable+0x6c - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual void VTable0x98() override; // vtable+0x98 - virtual void VTable0x9c() override; // vtable+0x9c + void VTable0x6c() override; // vtable+0x6c + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x98() override; // vtable+0x98 + void VTable0x9c() override; // vtable+0x9c // SYNTHETIC: LEGO1 0x10081d40 // LegoJetskiRaceActor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoloadcachesoundpresenter.h b/LEGO1/lego/legoomni/include/legoloadcachesoundpresenter.h index b0fc9db9..cb6ad80a 100644 --- a/LEGO1/lego/legoomni/include/legoloadcachesoundpresenter.h +++ b/LEGO1/lego/legoomni/include/legoloadcachesoundpresenter.h @@ -11,7 +11,7 @@ class LegoCacheSound; class LegoLoadCacheSoundPresenter : public MxWavePresenter { public: LegoLoadCacheSoundPresenter(); - virtual ~LegoLoadCacheSoundPresenter() override; + ~LegoLoadCacheSoundPresenter() override; // FUNCTION: LEGO1 0x10018450 inline const char* ClassName() const override // vtable+0x0c @@ -20,10 +20,10 @@ public: return "LegoLoadCacheSoundPresenter"; } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StreamingTickle() override; // vtable+0x20 - virtual void DoneTickle() override; // vtable+0x2c - virtual MxResult PutData() override; // vtable+0x4c + void ReadyTickle() override; // vtable+0x18 + void StreamingTickle() override; // vtable+0x20 + void DoneTickle() override; // vtable+0x2c + MxResult PutData() override; // vtable+0x4c private: void Init(); diff --git a/LEGO1/lego/legoomni/include/legolocomotionanimpresenter.h b/LEGO1/lego/legoomni/include/legolocomotionanimpresenter.h index 34b6ed2e..2a78176d 100644 --- a/LEGO1/lego/legoomni/include/legolocomotionanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legolocomotionanimpresenter.h @@ -8,7 +8,7 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter { public: LegoLocomotionAnimPresenter(); - virtual ~LegoLocomotionAnimPresenter() override; + ~LegoLocomotionAnimPresenter() override; // FUNCTION: LEGO1 0x1006ce50 inline const char* ClassName() const override // vtable+0x0c @@ -23,22 +23,23 @@ public: return !strcmp(p_name, ClassName()) || LegoLoopingAnimPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual void EndAction() override; // vtable+0x40 - virtual void PutFrame() override; // vtable+0x6c - virtual MxResult VTable0x88(MxStreamChunk* p_chunk) override; // vtable+0x88 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + void EndAction() override; // vtable+0x40 + void PutFrame() override; // vtable+0x6c + MxResult VTable0x88(MxStreamChunk* p_chunk) override; // vtable+0x88 // SYNTHETIC: LEGO1 0x1006cfe0 // LegoLocomotionAnimPresenter::`scalar deleting destructor' inline void DecrementUnknown0xd4() { - if (m_unk0xd4) + if (m_unk0xd4) { --m_unk0xd4; + } } inline undefined2 GetUnknown0xd4() { return m_unk0xd4; } diff --git a/LEGO1/lego/legoomni/include/legoloopinganimpresenter.h b/LEGO1/lego/legoomni/include/legoloopinganimpresenter.h index 22bdffc9..50815015 100644 --- a/LEGO1/lego/legoomni/include/legoloopinganimpresenter.h +++ b/LEGO1/lego/legoomni/include/legoloopinganimpresenter.h @@ -20,8 +20,8 @@ public: return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name); } - virtual void StreamingTickle() override; // vtable+0x20 - virtual void PutFrame() override; // vtable+0x6c + void StreamingTickle() override; // vtable+0x20 + void PutFrame() override; // vtable+0x6c }; // SYNTHETIC: LEGO1 0x1006d000 diff --git a/LEGO1/lego/legoomni/include/legometerpresenter.h b/LEGO1/lego/legoomni/include/legometerpresenter.h index 33c7aa37..378c0574 100644 --- a/LEGO1/lego/legoomni/include/legometerpresenter.h +++ b/LEGO1/lego/legoomni/include/legometerpresenter.h @@ -8,13 +8,13 @@ class LegoMeterPresenter : public MxStillPresenter { public: LegoMeterPresenter(); - virtual ~LegoMeterPresenter() override; + ~LegoMeterPresenter() override; // MxStillPresenter's `::ClassName` and `::IsA` are used. - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 private: void FUN_10043a50(); diff --git a/LEGO1/lego/legoomni/include/legomodelpresenter.h b/LEGO1/lego/legoomni/include/legomodelpresenter.h index e0480d23..c94be713 100644 --- a/LEGO1/lego/legoomni/include/legomodelpresenter.h +++ b/LEGO1/lego/legoomni/include/legomodelpresenter.h @@ -24,9 +24,9 @@ public: return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void ParseExtra() override; // vtable+0x30 - virtual void Destroy() override; // vtable+0x38 + void ReadyTickle() override; // vtable+0x18 + void ParseExtra() override; // vtable+0x30 + void Destroy() override; // vtable+0x38 // SYNTHETIC: LEGO1 0x1000cdd0 // LegoModelPresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legonavcontroller.h b/LEGO1/lego/legoomni/include/legonavcontroller.h index 5e251563..58ace217 100644 --- a/LEGO1/lego/legoomni/include/legonavcontroller.h +++ b/LEGO1/lego/legoomni/include/legonavcontroller.h @@ -37,8 +37,8 @@ public: ); LegoNavController(); - virtual ~LegoNavController() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + ~LegoNavController() override; // vtable+0x00 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10054b80 inline const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/legoobjectfactory.h b/LEGO1/lego/legoomni/include/legoobjectfactory.h index 9357ce34..66006588 100644 --- a/LEGO1/lego/legoomni/include/legoobjectfactory.h +++ b/LEGO1/lego/legoomni/include/legoobjectfactory.h @@ -105,8 +105,8 @@ class LegoObjectFactory : public MxObjectFactory { public: LegoObjectFactory(); - virtual MxCore* Create(const char* p_name) override; // vtable 0x14 - virtual void Destroy(MxCore* p_object) override; // vtable 0x18 + MxCore* Create(const char* p_name) override; // vtable 0x14 + void Destroy(MxCore* p_object) override; // vtable 0x18 // SYNTHETIC: LEGO1 0x10009000 // LegoObjectFactory::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoomni.h b/LEGO1/lego/legoomni/include/legoomni.h index f27bf140..33fc6a46 100644 --- a/LEGO1/lego/legoomni/include/legoomni.h +++ b/LEGO1/lego/legoomni/include/legoomni.h @@ -75,33 +75,33 @@ public: static LegoOmni* GetInstance(); LegoOmni(); - virtual ~LegoOmni(); // vtable+00 + ~LegoOmni() override; // vtable+00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+04 + MxLong Notify(MxParam& p_param) override; // vtable+04 // FUNCTION: LEGO1 0x10058aa0 - inline virtual const char* ClassName() const override // vtable+0c + inline const char* ClassName() const override // vtable+0c { // STRING: LEGO1 0x100f671c return "LegoOmni"; } // FUNCTION: LEGO1 0x10058ab0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+10 + inline MxBool IsA(const char* p_name) const override // vtable+10 { return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name); } - virtual void Init() override; // vtable+14 - virtual MxResult Create(MxOmniCreateParam& p_param) override; // vtable+18 - virtual void Destroy() override; // vtable+1c - virtual MxResult Start(MxDSAction* p_dsAction) override; // vtable+20 - virtual void DeleteObject(MxDSAction& p_dsAction) override; // vtable+24 - virtual MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+28 - virtual MxEntity* AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+30 - virtual void NotifyCurrentEntity(MxNotificationParam* p_param) override; // vtable+34 - virtual void StartTimer() override; // vtable+38 - virtual void StopTimer() override; // vtable+3c + void Init() override; // vtable+14 + MxResult Create(MxOmniCreateParam& p_param) override; // vtable+18 + void Destroy() override; // vtable+1c + MxResult Start(MxDSAction* p_dsAction) override; // vtable+20 + void DeleteObject(MxDSAction& p_dsAction) override; // vtable+24 + MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+28 + MxEntity* AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+30 + void NotifyCurrentEntity(MxNotificationParam* p_param) override; // vtable+34 + void StartTimer() override; // vtable+38 + void StopTimer() override; // vtable+3c LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid); void AddWorld(LegoWorld* p_world); diff --git a/LEGO1/lego/legoomni/include/legopalettepresenter.h b/LEGO1/lego/legoomni/include/legopalettepresenter.h index 04ee620b..c9e7fb81 100644 --- a/LEGO1/lego/legoomni/include/legopalettepresenter.h +++ b/LEGO1/lego/legoomni/include/legopalettepresenter.h @@ -10,7 +10,7 @@ class LegoPalettePresenter : public MxVideoPresenter { public: LegoPalettePresenter(); - virtual ~LegoPalettePresenter() override; // vtable+0x00 + ~LegoPalettePresenter() override; // vtable+0x00 // FUNCTION: LEGO1 0x10079f30 inline const char* ClassName() const override // vtable+0x0c @@ -25,8 +25,8 @@ public: return !strcmp(p_name, ClassName()) || MxVideoPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void Destroy() override; // vtable+0x38 + void ReadyTickle() override; // vtable+0x18 + void Destroy() override; // vtable+0x38 MxResult ParsePalette(MxStreamChunk* p_chunk); diff --git a/LEGO1/lego/legoomni/include/legopartpresenter.h b/LEGO1/lego/legoomni/include/legopartpresenter.h index 8f14633d..ab27b0e9 100644 --- a/LEGO1/lego/legoomni/include/legopartpresenter.h +++ b/LEGO1/lego/legoomni/include/legopartpresenter.h @@ -20,9 +20,9 @@ public: return !strcmp(p_name, LegoPartPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 + void ReadyTickle() override; // vtable+0x18 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 static void configureLegoPartPresenter(MxS32, MxS32); diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index adc1c392..c2a2026c 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -10,7 +10,7 @@ class LegoPathActor : public LegoActor { public: LegoPathActor(); - virtual ~LegoPathActor() override; + ~LegoPathActor() override; // FUNCTION: LEGO1 0x1000c430 inline const char* ClassName() const override // vtable+0x0c @@ -25,7 +25,7 @@ public: return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 + void ParseAction(char*) override; // vtable+0x20 virtual void VTable0x68(); // vtable+0x68 virtual void VTable0x6c(); // vtable+0x6c virtual void VTable0x70(float p_float); // vtable+0x70 diff --git a/LEGO1/lego/legoomni/include/legopathcontroller.h b/LEGO1/lego/legoomni/include/legopathcontroller.h index 86298726..8363ee7a 100644 --- a/LEGO1/lego/legoomni/include/legopathcontroller.h +++ b/LEGO1/lego/legoomni/include/legopathcontroller.h @@ -8,9 +8,9 @@ class LegoPathController : public MxCore { public: LegoPathController(); - virtual ~LegoPathController() override { Destroy(); } + ~LegoPathController() override { Destroy(); } - virtual MxResult Tickle() override; // vtable+08 + MxResult Tickle() override; // vtable+08 // FUNCTION: LEGO1 0x10045110 inline const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/legopathcontrollerlist.h b/LEGO1/lego/legoomni/include/legopathcontrollerlist.h index a13557b8..0bcd9c09 100644 --- a/LEGO1/lego/legoomni/include/legopathcontrollerlist.h +++ b/LEGO1/lego/legoomni/include/legopathcontrollerlist.h @@ -15,7 +15,7 @@ public: LegoPathControllerList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} // FUNCTION: LEGO1 0x1001d210 - virtual MxS8 Compare(LegoPathController* p_a, LegoPathController* p_b) override + MxS8 Compare(LegoPathController* p_a, LegoPathController* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/lego/legoomni/include/legopathpresenter.h b/LEGO1/lego/legoomni/include/legopathpresenter.h index ab66a5df..e6c5da14 100644 --- a/LEGO1/lego/legoomni/include/legopathpresenter.h +++ b/LEGO1/lego/legoomni/include/legopathpresenter.h @@ -8,7 +8,7 @@ class LegoPathPresenter : public MxMediaPresenter { public: LegoPathPresenter(); - virtual ~LegoPathPresenter() override; + ~LegoPathPresenter() override; // FUNCTION: LEGO1 0x100449a0 inline const char* ClassName() const override // vtable+0x0c @@ -23,12 +23,12 @@ public: return !strcmp(p_name, LegoPathPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 + void ReadyTickle() override; // vtable+0x18 + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 // SYNTHETIC: LEGO1 0x10044a90 // LegoPathPresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legophonemepresenter.h b/LEGO1/lego/legoomni/include/legophonemepresenter.h index 2a2ec497..db86a1e5 100644 --- a/LEGO1/lego/legoomni/include/legophonemepresenter.h +++ b/LEGO1/lego/legoomni/include/legophonemepresenter.h @@ -11,7 +11,7 @@ class LegoPhonemePresenter : public MxFlcPresenter { public: LegoPhonemePresenter(); - virtual ~LegoPhonemePresenter() override; // vtable+0x00 + ~LegoPhonemePresenter() override; // vtable+0x00 // FUNCTION: LEGO1 0x1004e310 inline const char* ClassName() const override // vtable+0x0c @@ -20,10 +20,10 @@ public: return "LegoPhonemePresenter"; } - virtual void StartingTickle() override; // vtable+0x1c - virtual void EndAction() override; // vtable+0x40 - virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 - virtual void PutFrame() override; // vtable+0x6c + void StartingTickle() override; // vtable+0x1c + void EndAction() override; // vtable+0x40 + void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 + void PutFrame() override; // vtable+0x6c // SYNTHETIC: LEGO1 0x1004e320 // LegoPhonemePresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoplantmanager.h b/LEGO1/lego/legoomni/include/legoplantmanager.h index e1335e33..bc96de5a 100644 --- a/LEGO1/lego/legoomni/include/legoplantmanager.h +++ b/LEGO1/lego/legoomni/include/legoplantmanager.h @@ -9,9 +9,9 @@ class LegoPlantManager : public MxCore { public: LegoPlantManager(); - virtual ~LegoPlantManager() override; // vtable+0x00 + ~LegoPlantManager() override; // vtable+0x00 - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10026290 inline const char* ClassName() const override // vtable+0x0c diff --git a/LEGO1/lego/legoomni/include/legopointofviewcontroller.h b/LEGO1/lego/legoomni/include/legopointofviewcontroller.h index 27a58291..650ca90b 100644 --- a/LEGO1/lego/legoomni/include/legopointofviewcontroller.h +++ b/LEGO1/lego/legoomni/include/legopointofviewcontroller.h @@ -20,7 +20,7 @@ class LegoNavController; class LegoMouseController : public MxCore { public: LegoMouseController(); - virtual ~LegoMouseController() override; + ~LegoMouseController() override; virtual void LeftDown(int, int); // vtable+0x14 virtual void LeftDrag(int, int); // vtable+0x18 @@ -44,14 +44,14 @@ private: class LegoPointOfViewController : public LegoMouseController { public: LegoPointOfViewController(); - virtual ~LegoPointOfViewController() override; + ~LegoPointOfViewController() override; - virtual MxResult Tickle() override; // vtable+0x08 - virtual void LeftDown(int p_x, int p_y) override; // vtable+0x0c - virtual void LeftDrag(int p_x, int p_y) override; // vtable+0x10 + MxResult Tickle() override; // vtable+0x08 + void LeftDown(int p_x, int p_y) override; // vtable+0x0c + void LeftDrag(int p_x, int p_y) override; // vtable+0x10 // FUNCTION: LEGO1 0x10011e40 - virtual void LeftUp(int p_x, int p_y) override + void LeftUp(int p_x, int p_y) override { LegoMouseController::LeftUp(p_x, p_y); AffectPointOfView(); @@ -59,7 +59,7 @@ public: // vtable+0x14 // FUNCTION: LEGO1 0x10011e60 - virtual void RightDown(int p_x, int p_y) override + void RightDown(int p_x, int p_y) override { LegoMouseController::RightDown(p_x, p_y); AffectPointOfView(); @@ -67,7 +67,7 @@ public: // vtable+0x20 // FUNCTION: LEGO1 0x10011e80 - virtual void RightDrag(int p_x, int p_y) override + void RightDrag(int p_x, int p_y) override { LegoMouseController::RightDrag(p_x, p_y); AffectPointOfView(); @@ -75,7 +75,7 @@ public: // vtable+0x24 // FUNCTION: LEGO1 0x10011ea0 - virtual void RightUp(int p_x, int p_y) override + void RightUp(int p_x, int p_y) override { LegoMouseController::RightUp(p_x, p_y); AffectPointOfView(); diff --git a/LEGO1/lego/legoomni/include/legorace.h b/LEGO1/lego/legoomni/include/legorace.h index 1ebf015a..8a6eed8a 100644 --- a/LEGO1/lego/legoomni/include/legorace.h +++ b/LEGO1/lego/legoomni/include/legorace.h @@ -11,9 +11,9 @@ class LegoRace : public LegoWorld { public: LegoRace(); - virtual ~LegoRace() override; // vtable+0x00 + ~LegoRace() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10015ba0 inline const char* ClassName() const override // vtable+0x0c @@ -28,15 +28,15 @@ public: return !strcmp(p_name, LegoRace::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 - virtual undefined4 VTable0x6c(undefined4) = 0; // vtable+0x6c - virtual undefined4 VTable0x70(undefined4); // vtable+0x70 - virtual undefined4 VTable0x74(undefined4); // vtable+0x74 - virtual undefined4 VTable0x78(undefined4); // vtable+0x78 - virtual void VTable0x7c(undefined4, undefined4); // vtable+0x7c + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 + virtual undefined4 VTable0x6c(undefined4) = 0; // vtable+0x6c + virtual undefined4 VTable0x70(undefined4); // vtable+0x70 + virtual undefined4 VTable0x74(undefined4); // vtable+0x74 + virtual undefined4 VTable0x78(undefined4); // vtable+0x78 + virtual void VTable0x7c(undefined4, undefined4); // vtable+0x7c // SYNTHETIC: LEGO1 0x10015cc0 // LegoRace::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoraceactor.h b/LEGO1/lego/legoomni/include/legoraceactor.h index 40eb6ef6..48f66b26 100644 --- a/LEGO1/lego/legoomni/include/legoraceactor.h +++ b/LEGO1/lego/legoomni/include/legoraceactor.h @@ -20,13 +20,13 @@ public: return !strcmp(p_name, LegoRaceActor::ClassName()) || LegoAnimActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - virtual void VTable0x68() override; // vtable+0x68 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 - virtual MxS32 VTable0x90() override; // vtable+0x90 - virtual MxS32 VTable0x94() override; // vtable+0x94 + void ParseAction(char*) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void VTable0x68() override; // vtable+0x68 + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + MxS32 VTable0x90() override; // vtable+0x90 + MxS32 VTable0x94() override; // vtable+0x94 // SYNTHETIC: LEGO1 0x10014ab0 // LegoRaceActor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoracecar.h b/LEGO1/lego/legoomni/include/legoracecar.h index beb70632..f90c4cad 100644 --- a/LEGO1/lego/legoomni/include/legoracecar.h +++ b/LEGO1/lego/legoomni/include/legoracecar.h @@ -8,7 +8,7 @@ // SIZE 0x200 class LegoRaceCar : public LegoCarRaceActor { public: - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x10014290 inline const char* ClassName() const override // vtable+0x0c @@ -23,13 +23,13 @@ public: return !strcmp(p_name, LegoCarRaceActor::ClassName()) || LegoCarRaceActor::IsA(p_name); } - virtual void ParseAction(char*) override; // vtable+0x20 - virtual void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - virtual void VTable0x6c() override; // vtable+0x6c - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxS32 VTable0x94() override; // vtable+0x94 - virtual void VTable0x98() override; // vtable+0x98 - virtual void VTable0x9c() override; // vtable+0x9c + void ParseAction(char*) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void VTable0x6c() override; // vtable+0x6c + void VTable0x70(float p_float) override; // vtable+0x70 + MxS32 VTable0x94() override; // vtable+0x94 + void VTable0x98() override; // vtable+0x98 + void VTable0x9c() override; // vtable+0x9c // SYNTHETIC: LEGO1 0x10014230 // LegoRaceCar::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legosoundmanager.h b/LEGO1/lego/legoomni/include/legosoundmanager.h index b1afffe3..83a4ea7d 100644 --- a/LEGO1/lego/legoomni/include/legosoundmanager.h +++ b/LEGO1/lego/legoomni/include/legosoundmanager.h @@ -9,11 +9,11 @@ class LegoSoundManager : public MxSoundManager { public: LegoSoundManager(); - virtual ~LegoSoundManager() override; + ~LegoSoundManager() override; - virtual MxResult Tickle() override; // vtable+08 - virtual void Destroy() override; // vtable+18 - virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x30 + MxResult Tickle() override; // vtable+08 + void Destroy() override; // vtable+18 + MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x30 // SYNTHETIC: LEGO1 0x10029920 // LegoSoundManager::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legostate.h b/LEGO1/lego/legoomni/include/legostate.h index fe10bbf7..8aa55226 100644 --- a/LEGO1/lego/legoomni/include/legostate.h +++ b/LEGO1/lego/legoomni/include/legostate.h @@ -11,17 +11,17 @@ class LegoState : public MxCore { public: // FUNCTION: LEGO1 0x10005f40 - virtual ~LegoState() override {} + ~LegoState() override {} // FUNCTION: LEGO1 0x100060d0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f01b8 return "LegoState"; } // FUNCTION: LEGO1 0x100060e0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoState::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/legotexturepresenter.h b/LEGO1/lego/legoomni/include/legotexturepresenter.h index ca6541df..472c5828 100644 --- a/LEGO1/lego/legoomni/include/legotexturepresenter.h +++ b/LEGO1/lego/legoomni/include/legotexturepresenter.h @@ -7,24 +7,24 @@ // SIZE 0x54 (from inlined construction at 0x10009bb5) class LegoTexturePresenter : public MxMediaPresenter { public: - virtual ~LegoTexturePresenter() override; + ~LegoTexturePresenter() override; // FUNCTION: LEGO1 0x1000ce50 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0664 return "LegoTexturePresenter"; } // FUNCTION: LEGO1 0x1000ce60 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoTexturePresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void DoneTickle() override; // vtable+0x2c - virtual MxResult AddToManager() override; // vtable+0x34 - virtual MxResult PutData() override; // vtable+0x4c + void DoneTickle() override; // vtable+0x2c + MxResult AddToManager() override; // vtable+0x34 + MxResult PutData() override; // vtable+0x4c // SYNTHETIC: LEGO1 0x1000cf40 // LegoTexturePresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legounknown100d9d00.h b/LEGO1/lego/legoomni/include/legounknown100d9d00.h index 394ffbbd..0c567b17 100644 --- a/LEGO1/lego/legoomni/include/legounknown100d9d00.h +++ b/LEGO1/lego/legoomni/include/legounknown100d9d00.h @@ -18,7 +18,7 @@ public: LegoUnknown100d9d00() { SetDestroy(Destroy); } // STUB: LEGO1 0x1007b210 - virtual MxS8 Compare(LegoUnknown100d7c88* p_a, LegoUnknown100d7c88* p_b) override { return -1; } // vtable+0x14 + MxS8 Compare(LegoUnknown100d7c88* p_a, LegoUnknown100d7c88* p_b) override { return -1; } // vtable+0x14 // FUNCTION: LEGO1 0x1007b2e0 static void Destroy(LegoUnknown100d7c88* p_element) { delete p_element; } diff --git a/LEGO1/lego/legoomni/include/legovehiclebuildstate.h b/LEGO1/lego/legoomni/include/legovehiclebuildstate.h index 7a78b4ed..83032325 100644 --- a/LEGO1/lego/legoomni/include/legovehiclebuildstate.h +++ b/LEGO1/lego/legoomni/include/legovehiclebuildstate.h @@ -12,18 +12,18 @@ public: LegoVehicleBuildState(char* p_classType); // FUNCTION: LEGO1 0x10025ff0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { return this->m_className.GetData(); } // FUNCTION: LEGO1 0x10026000 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, this->m_className.GetData()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x100260a0 // LegoVehicleBuildState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legovideomanager.h b/LEGO1/lego/legoomni/include/legovideomanager.h index 42a065b9..bb43c05c 100644 --- a/LEGO1/lego/legoomni/include/legovideomanager.h +++ b/LEGO1/lego/legoomni/include/legovideomanager.h @@ -17,7 +17,7 @@ class LegoROI; class LegoVideoManager : public MxVideoManager { public: LegoVideoManager(); - virtual ~LegoVideoManager() override; + ~LegoVideoManager() override; int EnableRMDevice(); int DisableRMDevice(); @@ -25,13 +25,12 @@ public: void EnableFullScreenMovie(MxBool p_enable, MxBool p_scale); void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY); - virtual MxResult Tickle() override; // vtable+0x08 - virtual void Destroy() override; // vtable+0x18 - virtual MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread) - override; // vtable+0x2c - virtual MxResult RealizePalette(MxPalette*) override; // vtable+0x30 - virtual void UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) override; // vtable+0x34 - virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38 + MxResult Tickle() override; // vtable+0x08 + void Destroy() override; // vtable+0x18 + MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread) override; // vtable+0x2c + MxResult RealizePalette(MxPalette*) override; // vtable+0x30 + void UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) override; // vtable+0x34 + virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y); // vtable+0x38 // FUNCTION: LEGO1 0x1007ab10 virtual LegoUnknown100d9d00* VTable0x3c() { return m_unk0x100d9d00; } // vtable+0x3c diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 7e995e73..0690f570 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -33,30 +33,30 @@ public: }; LegoWorld(); - virtual ~LegoWorld() override; // vtable+0x00 + ~LegoWorld() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1001d690 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0058 return "LegoWorld"; } // FUNCTION: LEGO1 0x1001d6a0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoWorld::ClassName()) || LegoEntity::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c - virtual void ReadyWorld(); // vtable+0x50 - virtual LegoCameraController* VTable0x54(); // vtable+0x54 - virtual void Add(MxCore* p_object); // vtable+0x58 - virtual MxBool VTable0x5c(); // vtable+0x5c + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c + virtual void ReadyWorld(); // vtable+0x50 + virtual LegoCameraController* VTable0x54(); // vtable+0x54 + virtual void Add(MxCore* p_object); // vtable+0x58 + virtual MxBool VTable0x5c(); // vtable+0x5c // FUNCTION: LEGO1 0x100010a0 virtual void VTable0x60() {} // vtable+0x60 diff --git a/LEGO1/lego/legoomni/include/legoworldlist.h b/LEGO1/lego/legoomni/include/legoworldlist.h index 6467859c..bd8197bc 100644 --- a/LEGO1/lego/legoomni/include/legoworldlist.h +++ b/LEGO1/lego/legoomni/include/legoworldlist.h @@ -22,10 +22,7 @@ public: LegoWorldList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} // FUNCTION: LEGO1 0x100598d0 - virtual MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override - { - return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; - } // vtable+0x14 + MxS8 Compare(LegoWorld* p_a, LegoWorld* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 // SYNTHETIC: LEGO1 0x10059a00 // LegoWorldList::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legoworldpresenter.h b/LEGO1/lego/legoomni/include/legoworldpresenter.h index 3d0fba37..a9a7f324 100644 --- a/LEGO1/lego/legoomni/include/legoworldpresenter.h +++ b/LEGO1/lego/legoomni/include/legoworldpresenter.h @@ -8,28 +8,28 @@ class LegoWorldPresenter : public LegoEntityPresenter { public: LegoWorldPresenter(); - virtual ~LegoWorldPresenter() override; // vtable+0x00 + ~LegoWorldPresenter() override; // vtable+0x00 static void configureLegoWorldPresenter(MxS32 p_legoWorldPresenterQuality); // FUNCTION: LEGO1 0x10066630 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0608 return "LegoWorldPresenter"; } // FUNCTION: LEGO1 0x10066640 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, LegoWorldPresenter::ClassName()) || LegoEntityPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c - virtual void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void ParseExtra() override; // vtable+0x30 + MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c + void VTable0x60(MxPresenter* p_presenter) override; // vtable+0x60 // SYNTHETIC: LEGO1 0x10066750 // LegoWorldPresenter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/motocycle.h b/LEGO1/lego/legoomni/include/motocycle.h index 6505f35b..cf3f376f 100644 --- a/LEGO1/lego/legoomni/include/motocycle.h +++ b/LEGO1/lego/legoomni/include/motocycle.h @@ -11,24 +11,24 @@ public: Motocycle(); // FUNCTION: LEGO1 0x10035840 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f38e8 return "Motorcycle"; } // FUNCTION: LEGO1 0x10035850 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Motocycle::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + MxU32 VTable0xdc(MxType19NotificationParam&) override; // vtable+0xdc + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x100359d0 // Motocycle::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/mxbackgroundaudiomanager.h b/LEGO1/lego/legoomni/include/mxbackgroundaudiomanager.h index cb2e3435..31fa01e5 100644 --- a/LEGO1/lego/legoomni/include/mxbackgroundaudiomanager.h +++ b/LEGO1/lego/legoomni/include/mxbackgroundaudiomanager.h @@ -13,20 +13,20 @@ class MxBackgroundAudioManager : public MxCore { public: MxBackgroundAudioManager(); - virtual ~MxBackgroundAudioManager() override; + ~MxBackgroundAudioManager() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1007eb70 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f7ac4 return "MxBackgroundAudioManager"; } // FUNCTION: LEGO1 0x1007eb80 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxBackgroundAudioManager::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/mxcompositemediapresenter.h b/LEGO1/lego/legoomni/include/mxcompositemediapresenter.h index ed6f1335..efba804f 100644 --- a/LEGO1/lego/legoomni/include/mxcompositemediapresenter.h +++ b/LEGO1/lego/legoomni/include/mxcompositemediapresenter.h @@ -8,26 +8,26 @@ class MxCompositeMediaPresenter : public MxCompositePresenter { public: MxCompositeMediaPresenter(); - virtual ~MxCompositeMediaPresenter() override; + ~MxCompositeMediaPresenter() override; - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10073f10 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f02d4 return "MxCompositeMediaPresenter"; } // FUNCTION: LEGO1 0x10073f20 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxCompositeMediaPresenter::ClassName()) || MxCompositePresenter::IsA(p_name); } - virtual void StartingTickle() override; // vtable+0x1c - virtual MxResult StartAction(MxStreamController*, MxDSAction* p_action) override; // vtable+0x3c - virtual MxResult PutData() override; // vtable+0x4c + void StartingTickle() override; // vtable+0x1c + MxResult StartAction(MxStreamController*, MxDSAction* p_action) override; // vtable+0x3c + MxResult PutData() override; // vtable+0x4c private: MxS16 m_unk0x4c; // 0x4c diff --git a/LEGO1/lego/legoomni/include/mxcontrolpresenter.h b/LEGO1/lego/legoomni/include/mxcontrolpresenter.h index 1ead16da..b1c01fab 100644 --- a/LEGO1/lego/legoomni/include/mxcontrolpresenter.h +++ b/LEGO1/lego/legoomni/include/mxcontrolpresenter.h @@ -12,32 +12,32 @@ class MxVideoPresenter; class MxControlPresenter : public MxCompositePresenter { public: MxControlPresenter(); - virtual ~MxControlPresenter() override; + ~MxControlPresenter() override; // FUNCTION: LEGO1 0x10044000 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0514 return "MxControlPresenter"; } // FUNCTION: LEGO1 0x10044010 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxControlPresenter::ClassName()) || MxCompositePresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c - virtual void EndAction() override; // vtable+0x40 - virtual MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48 - virtual void Enable(MxBool p_enable) override; // vtable+0x54 - virtual MxBool VTable0x64(undefined4 p_undefined) override; // vtable+0x64 - virtual void VTable0x68(MxBool p_unk0x50); // vtable+0x68 - virtual void VTable0x6c(MxS16); // vtable+0x6c + void ReadyTickle() override; // vtable+0x18 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 + MxResult AddToManager() override; // vtable+0x34 + MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c + void EndAction() override; // vtable+0x40 + MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48 + void Enable(MxBool p_enable) override; // vtable+0x54 + MxBool VTable0x64(undefined4 p_undefined) override; // vtable+0x64 + virtual void VTable0x68(MxBool p_unk0x50); // vtable+0x68 + virtual void VTable0x6c(MxS16); // vtable+0x6c MxBool FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter); diff --git a/LEGO1/lego/legoomni/include/mxtransitionmanager.h b/LEGO1/lego/legoomni/include/mxtransitionmanager.h index ab673b11..89f0d73b 100644 --- a/LEGO1/lego/legoomni/include/mxtransitionmanager.h +++ b/LEGO1/lego/legoomni/include/mxtransitionmanager.h @@ -11,20 +11,20 @@ class MxTransitionManager : public MxCore { public: MxTransitionManager(); - virtual ~MxTransitionManager() override; // vtable+0x00 + ~MxTransitionManager() override; // vtable+0x00 void SetWaitIndicator(MxVideoPresenter* p_waitIndicator); - virtual MxResult Tickle(); // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1004b950 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { return "MxTransitionManager"; } // FUNCTION: LEGO1 0x1004b960 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxTransitionManager::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index b2679fd1..5ba1da94 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -13,12 +13,12 @@ class Pizza : public IsleActor { public: Pizza(); - virtual ~Pizza() override; + ~Pizza() override; - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10037f90 - inline const char* ClassName() const // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f038c return "Pizza"; @@ -30,7 +30,7 @@ public: return !strcmp(p_name, Pizza::ClassName()) || IsleActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 // SYNTHETIC: LEGO1 0x100380e0 // Pizza::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/pizzamissionstate.h b/LEGO1/lego/legoomni/include/pizzamissionstate.h index e8668544..1b111c43 100644 --- a/LEGO1/lego/legoomni/include/pizzamissionstate.h +++ b/LEGO1/lego/legoomni/include/pizzamissionstate.h @@ -18,19 +18,19 @@ public: class PizzaMissionState : public LegoState { public: // FUNCTION: LEGO1 0x10039290 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f00d4 return "PizzaMissionState"; } // FUNCTION: LEGO1 0x100392a0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, PizzaMissionState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c inline MxU16 GetColor(MxU8 p_id) { return GetState(p_id)->m_color; } diff --git a/LEGO1/lego/legoomni/include/pizzeria.h b/LEGO1/lego/legoomni/include/pizzeria.h index f75cf0a7..49c4960a 100644 --- a/LEGO1/lego/legoomni/include/pizzeria.h +++ b/LEGO1/lego/legoomni/include/pizzeria.h @@ -8,19 +8,19 @@ class Pizzeria : public IsleActor { public: // FUNCTION: LEGO1 0x1000e780 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0380 return "Pizzeria"; } // FUNCTION: LEGO1 0x1000e790 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Pizzeria::ClassName()) || IsleActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 // SYNTHETIC: LEGO1 0x1000e8d0 // Pizzeria::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/pizzeriastate.h b/LEGO1/lego/legoomni/include/pizzeriastate.h index 1e9da6d3..b4d6b0fe 100644 --- a/LEGO1/lego/legoomni/include/pizzeriastate.h +++ b/LEGO1/lego/legoomni/include/pizzeriastate.h @@ -10,19 +10,19 @@ public: PizzeriaState(); // FUNCTION: LEGO1 0x10017c20 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0370 return "PizzeriaState"; } // FUNCTION: LEGO1 0x10017c30 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, PizzeriaState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x10017ce0 // PizzeriaState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/police.h b/LEGO1/lego/legoomni/include/police.h index cb82ee35..dd5c10e6 100644 --- a/LEGO1/lego/legoomni/include/police.h +++ b/LEGO1/lego/legoomni/include/police.h @@ -13,28 +13,28 @@ class Police : public LegoWorld { public: Police(); - virtual ~Police() override; // vtable+0x00 + ~Police() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1005e1e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0450 return "Police"; } // FUNCTION: LEGO1 0x1005e1f0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Police::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x5c() override; // vtable+0x5c - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1005e300 // Police::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/policeentity.h b/LEGO1/lego/legoomni/include/policeentity.h index 490e35a3..acf0937b 100644 --- a/LEGO1/lego/legoomni/include/policeentity.h +++ b/LEGO1/lego/legoomni/include/policeentity.h @@ -8,14 +8,14 @@ class PoliceEntity : public BuildingEntity { public: // FUNCTION: LEGO1 0x1000ed60 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0328 return "PoliceEntity"; } // FUNCTION: LEGO1 0x1000ed70 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, PoliceEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/policestate.h b/LEGO1/lego/legoomni/include/policestate.h index 33799092..551d83c4 100644 --- a/LEGO1/lego/legoomni/include/policestate.h +++ b/LEGO1/lego/legoomni/include/policestate.h @@ -9,22 +9,22 @@ class PoliceState : public LegoState { public: PoliceState(); - virtual ~PoliceState() override {} + ~PoliceState() override {} // FUNCTION: LEGO1 0x1005e860 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0444 return "PoliceState"; } // FUNCTION: LEGO1 0x1005e870 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, PoliceState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x1005e920 // PoliceState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/racecar.h b/LEGO1/lego/legoomni/include/racecar.h index 596473b4..462c2dbe 100644 --- a/LEGO1/lego/legoomni/include/racecar.h +++ b/LEGO1/lego/legoomni/include/racecar.h @@ -9,23 +9,23 @@ class RaceCar : public IslePathActor { public: RaceCar(); - virtual ~RaceCar() override; // vtable+0x00 + ~RaceCar() override; // vtable+0x00 // FUNCTION: LEGO1 0x10028270 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03e0 return "RaceCar"; } // FUNCTION: LEGO1 0x10028280 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, RaceCar::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual MxU32 VTable0xcc() override; // vtable+0xcc + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxU32 VTable0xcc() override; // vtable+0xcc // SYNTHETIC: LEGO1 0x10028400 // RaceCar::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/racestandsentity.h b/LEGO1/lego/legoomni/include/racestandsentity.h index b2ca8ef3..5b5b83e5 100644 --- a/LEGO1/lego/legoomni/include/racestandsentity.h +++ b/LEGO1/lego/legoomni/include/racestandsentity.h @@ -7,14 +7,14 @@ // SIZE 0x68 class RaceStandsEntity : public BuildingEntity { // FUNCTION: LEGO1 0x1000efa0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0300 return "RaceStandsEntity"; } // FUNCTION: LEGO1 0x1000efb0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, RaceStandsEntity::ClassName()) || BuildingEntity::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/racestate.h b/LEGO1/lego/legoomni/include/racestate.h index 3bbb86f6..987d3a69 100644 --- a/LEGO1/lego/legoomni/include/racestate.h +++ b/LEGO1/lego/legoomni/include/racestate.h @@ -18,19 +18,19 @@ public: RaceState(); // FUNCTION: LEGO1 0x10016010 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f07d0 return "RaceState"; } // FUNCTION: LEGO1 0x10016020 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, RaceState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1c inline MxU16 GetColor(MxU8 p_id) { return GetState(p_id)->m_color; } diff --git a/LEGO1/lego/legoomni/include/radio.h b/LEGO1/lego/legoomni/include/radio.h index dd37ba44..fe06be9b 100644 --- a/LEGO1/lego/legoomni/include/radio.h +++ b/LEGO1/lego/legoomni/include/radio.h @@ -11,19 +11,19 @@ class Radio : public MxCore { public: Radio(); - virtual ~Radio() override; + ~Radio() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x1002c8e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f328c return "Radio"; } // FUNCTION: LEGO1 0x1002c8f0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Radio::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/lego/legoomni/include/radiostate.h b/LEGO1/lego/legoomni/include/radiostate.h index adfbe623..cffef003 100644 --- a/LEGO1/lego/legoomni/include/radiostate.h +++ b/LEGO1/lego/legoomni/include/radiostate.h @@ -11,19 +11,19 @@ public: RadioState(); // FUNCTION: LEGO1 0x1002cf60 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04f8 return "RadioState"; } // FUNCTION: LEGO1 0x1002cf70 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, RadioState::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool VTable0x14() override; // vtable+0x14 + MxBool VTable0x14() override; // vtable+0x14 // SYNTHETIC: LEGO1 0x1002d020 // RadioState::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/registrationbook.h b/LEGO1/lego/legoomni/include/registrationbook.h index d47dbf28..a712fdc6 100644 --- a/LEGO1/lego/legoomni/include/registrationbook.h +++ b/LEGO1/lego/legoomni/include/registrationbook.h @@ -8,28 +8,28 @@ class RegistrationBook : public LegoWorld { public: RegistrationBook(); - virtual ~RegistrationBook() override; // vtable+0x00 + ~RegistrationBook() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Tickle() override; // vtable+0x08 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x10076e10 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f04c8 return "RegistrationBook"; } // FUNCTION: LEGO1 0x10076e20 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, RegistrationBook::ClassName()) || LegoWorld::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void ReadyWorld() override; // vtable+0x50 - virtual MxBool VTable0x64() override; // vtable+0x64 - virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x64() override; // vtable+0x64 + void VTable0x68(MxBool p_add) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x10076f30 // RegistrationBook::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/score.h b/LEGO1/lego/legoomni/include/score.h index 03d69eb8..98774249 100644 --- a/LEGO1/lego/legoomni/include/score.h +++ b/LEGO1/lego/legoomni/include/score.h @@ -12,18 +12,18 @@ class Score : public LegoWorld { public: Score(); - virtual ~Score() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + ~Score() override; // vtable+0x00 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x100010c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0050 return "Score"; } // FUNCTION: LEGO1 0x100010d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, Score::ClassName()) || LegoWorld::IsA(p_name); } @@ -31,11 +31,11 @@ public: // SYNTHETIC: LEGO1 0x100011e0 // Score::`scalar deleting destructor' - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+18 - virtual void ReadyWorld() override; // vtable+50 - virtual MxBool VTable0x5c() override; // vtable+5c - virtual MxBool VTable0x64() override; // vtable+64 - virtual void VTable0x68(MxBool p_add) override; // vtable+68 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+18 + void ReadyWorld() override; // vtable+50 + MxBool VTable0x5c() override; // vtable+5c + MxBool VTable0x64() override; // vtable+64 + void VTable0x68(MxBool p_add) override; // vtable+68 void Paint(); MxLong FUN_10001510(MxEndActionNotificationParam& p_param); diff --git a/LEGO1/lego/legoomni/include/scorestate.h b/LEGO1/lego/legoomni/include/scorestate.h index e02c2e56..78609c02 100644 --- a/LEGO1/lego/legoomni/include/scorestate.h +++ b/LEGO1/lego/legoomni/include/scorestate.h @@ -8,20 +8,20 @@ class ScoreState : public LegoState { public: // FUNCTION: LEGO1 0x1000de40 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0084 return "ScoreState"; } // FUNCTION: LEGO1 0x1000de50 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, ScoreState::ClassName()) || LegoState::IsA(p_name); } - virtual MxBool VTable0x14() override; // vtable+0x14 - virtual MxBool SetFlag() override; // vtable+0x18 + MxBool VTable0x14() override; // vtable+0x14 + MxBool SetFlag() override; // vtable+0x18 inline MxBool GetTutorialFlag() { return m_playCubeTutorial; } inline void SetTutorialFlag(MxBool p_playCubeTutorial) { m_playCubeTutorial = p_playCubeTutorial; } diff --git a/LEGO1/lego/legoomni/include/skateboard.h b/LEGO1/lego/legoomni/include/skateboard.h index 4f97d87c..628e26f5 100644 --- a/LEGO1/lego/legoomni/include/skateboard.h +++ b/LEGO1/lego/legoomni/include/skateboard.h @@ -11,23 +11,23 @@ public: SkateBoard(); // FUNCTION: LEGO1 0x1000fdd0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f041c return "SkateBoard"; } // FUNCTION: LEGO1 0x1000fde0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, SkateBoard::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd0() override; // vtable+0xd0 - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual void VTable0xe4() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd0() override; // vtable+0xd0 + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x1000ff60 // SkateBoard::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/towtrack.h b/LEGO1/lego/legoomni/include/towtrack.h index a79f75fb..85e54e6b 100644 --- a/LEGO1/lego/legoomni/include/towtrack.h +++ b/LEGO1/lego/legoomni/include/towtrack.h @@ -11,26 +11,26 @@ public: TowTrack(); // FUNCTION: LEGO1 0x1004c7c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f03b8 return "TowTrack"; } // FUNCTION: LEGO1 0x1004c7d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, TowTrack::ClassName()) || IslePathActor::IsA(p_name); } - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 - virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - virtual void VTable0x70(float p_float) override; // vtable+0x70 - virtual MxU32 VTable0xcc() override; // vtable+0xcc - virtual MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - virtual MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8 - virtual MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc - virtual void VTable0xe4() override; // vtable+0xe4 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxU32 VTable0xcc() override; // vtable+0xcc + MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 + MxU32 VTable0xd8(MxType18NotificationParam& p_param) override; // vtable+0xd8 + MxU32 VTable0xdc(MxType19NotificationParam& p_param) override; // vtable+0xdc + void VTable0xe4() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x1004c950 // TowTrack::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/towtrackmissionstate.h b/LEGO1/lego/legoomni/include/towtrackmissionstate.h index 9e3b78f3..e96e87be 100644 --- a/LEGO1/lego/legoomni/include/towtrackmissionstate.h +++ b/LEGO1/lego/legoomni/include/towtrackmissionstate.h @@ -10,19 +10,19 @@ public: TowTrackMissionState(); // FUNCTION: LEGO1 0x1004dfa0 - inline virtual const char* ClassName() const // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f00bc return "TowTrackMissionState"; } // FUNCTION: LEGO1 0x1004dfb0 - inline virtual MxBool IsA(const char* p_name) const // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, TowTrackMissionState::ClassName()) || LegoState::IsA(p_name); } - virtual MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C + MxResult VTable0x1c(LegoFile* p_legoFile) override; // vtable+0x1C inline MxU16 GetColor(MxU8 p_id) { diff --git a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp index 74f8c146..e51e2519 100644 --- a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp @@ -47,8 +47,9 @@ MxResult MxBackgroundAudioManager::Create(MxAtomId& p_script, MxU32 p_frequencyM // FUNCTION: LEGO1 0x1007ed20 MxResult MxBackgroundAudioManager::OpenMusic(MxAtomId& p_script) { - if (m_script.GetInternal()) + if (m_script.GetInternal()) { DestroyMusic(); + } MxResult result = FAILURE; @@ -264,15 +265,17 @@ MxResult MxBackgroundAudioManager::PlayMusic(MxDSAction& p_action, undefined4 p_ // FUNCTION: LEGO1 0x1007f470 void MxBackgroundAudioManager::Stop() { - if (m_action2.GetObjectId() != -1) + if (m_action2.GetObjectId() != -1) { DeleteObject(m_action2); + } m_unk0x138 = 0; m_action2.SetAtomId(MxAtomId()); m_action2.SetObjectId(-1); - if (m_action1.GetObjectId() != -1) + if (m_action1.GetObjectId() != -1) { DeleteObject(m_action1); + } m_unk0xa0 = 0; m_action1.SetAtomId(MxAtomId()); diff --git a/LEGO1/lego/legoomni/src/build/helicopter.cpp b/LEGO1/lego/legoomni/src/build/helicopter.cpp index 9f11ace4..2b7be890 100644 --- a/LEGO1/lego/legoomni/src/build/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/build/helicopter.cpp @@ -40,8 +40,9 @@ MxResult Helicopter::Create(MxDSAction& p_dsAction) ((Act3*) GetWorld())->SetUnkown420c(this); } world = GetWorld(); - if (world) + if (world) { world->Add(this); + } GetState(); return result; } @@ -50,8 +51,9 @@ MxResult Helicopter::Create(MxDSAction& p_dsAction) void Helicopter::GetState() { m_state = (HelicopterState*) GameState()->GetState("HelicopterState"); - if (!m_state) + if (!m_state) { m_state = (HelicopterState*) GameState()->CreateState("HelicopterState"); + } } // FUNCTION: LEGO1 0x10003360 @@ -87,10 +89,12 @@ void Helicopter::VTable0xe4() // FUNCTION: LEGO1 0x10003480 MxU32 Helicopter::VTable0xcc() { - if (!FUN_1003ef60()) + if (!FUN_1003ef60()) { return 1; - if (!m_world) + } + if (!m_world) { m_world = GetCurrentWorld(); + } AnimationManager()->FUN_1005f6d0(FALSE); if (GetCurrentVehicle()) { if (GetCurrentVehicle()->VTable0x60() != GameState()->GetUnknownC()) { @@ -145,15 +149,17 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) ((Act3*) GetCurrentWorld())->SetUnkown4270(2); TransitionManager()->StartTransition(MxTransitionManager::e_pixelation, 50, FALSE, FALSE); } - else if (m_state->GetUnkown8() != 0) + else if (m_state->GetUnkown8() != 0) { break; + } VTable0xe4(); GameState()->SetCurrentArea(0x42); ret = 1; break; case 0x18: { - if (*g_act3Script == script) + if (*g_act3Script == script) { break; + } Act1State* state = (Act1State*) GameState()->GetState("Act1State"); if (m_state->GetUnkown8() == 0) { state->SetUnknown18(4); @@ -166,8 +172,9 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) break; } case 0x19: - if (*g_act3Script == script) + if (*g_act3Script == script) { break; + } if (m_state->GetUnkown8() == 2) { m_state->SetUnknown8(3); m_world->FUN_1001fc80(this); @@ -177,13 +184,15 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) ret = 1; break; case 0x1a: - if (*g_act3Script != script) + if (*g_act3Script != script) { break; + } ret = 1; /* fall through */ case 0x1b: - if (*g_act3Script != script) + if (*g_act3Script != script) { break; + } if (m_world && m_world->GetCamera()) { Mx3DPointFloat loc, dir, lookat; loc.CopyFrom(m_world->GetCamera()->GetWorldLocation()); @@ -196,11 +205,14 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param) v68.CopyFrom(m_world->GetCamera()->GetWorldUp()); va4.EqualsCross(v68, dir); v7c.EqualsCross(va4, v90); - if (ret) - if (((Act3*) m_world)->FUN_100727e0(m_unk0x138, loc, dir, v7c)) + if (ret) { + if (((Act3*) m_world)->FUN_100727e0(m_unk0x138, loc, dir, v7c)) { break; - else if (((Act3*) m_world)->FUN_10072980(m_unk0x138, loc, dir, v7c)) + } + else if (((Act3*) m_world)->FUN_10072980(m_unk0x138, loc, dir, v7c)) { break; + } + } } ret = 1; break; @@ -231,8 +243,9 @@ MxU32 Helicopter::VTable0xd8(MxType18NotificationParam& p_param) ((Act1State*) GameState()->GetState("Act1State"))->SetUnknown18(4); VTable0xe8(0x2a, TRUE, 7); } - else + else { VTable0xe8(0x31, TRUE, 7); + } m_state->SetUnknown8(2); @@ -267,8 +280,9 @@ MxU32 Helicopter::VTable0xd8(MxType18NotificationParam& p_param) ((Act1State*) GameState()->GetState("Act1State"))->SetUnknown18(0); VTable0xe8(0x29, TRUE, 7); } - else + else { VTable0xe8(0x30, TRUE, 7); + } m_state->SetUnknown8(0); ret = 1; @@ -289,8 +303,9 @@ void Helicopter::VTable0x74(Matrix4& p_transform) else { m_roi->FUN_100a58f0(p_transform); m_roi->VTable0x14(); - if (m_cameraFlag) + if (m_cameraFlag) { FUN_10010c30(); + } } } @@ -307,10 +322,12 @@ void Helicopter::VTable0x70(float p_float) float f = m_unk0x1f0 - p_float + 3000; if (f >= 0) { float f2 = f / 3000 + 1; - if (f2 < 0) + if (f2 < 0) { f2 = 0; - if (1.0f < f2) + } + if (1.0f < f2) { f2 = 1.0f; + } Vector3 v(m_unk0x160[3]); MxMatrix mat; Vector3 v2(m_unk0x1a8[3]); @@ -328,10 +345,12 @@ void Helicopter::VTable0x70(float p_float) m_world->GetCamera()->FUN_100123e0(mat, 0); } else { - if (state == 4) + if (state == 4) { ((Act3*) m_world)->FUN_10073400(); - else + } + else { ((Act3*) m_world)->FUN_10073430(); + } m_unk0xdc = 4; } } @@ -380,6 +399,7 @@ MxResult HelicopterSubclass::FUN_100040a0(Vector4& p_v, float p_f) } return SUCCESS; } - else + else { return FAILURE; + } } diff --git a/LEGO1/lego/legoomni/src/common/gifmanager.cpp b/LEGO1/lego/legoomni/src/common/gifmanager.cpp index 821a97d2..09e25c5e 100644 --- a/LEGO1/lego/legoomni/src/common/gifmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/gifmanager.cpp @@ -37,8 +37,9 @@ GifManager::~GifManager() // FUNCTION: LEGO1 0x10099cc0 void GifManager::FUN_10099cc0(GifData* p_data) { - if (p_data == NULL) + if (p_data == NULL) { return; + } #ifdef COMPAT_MODE GifList::iterator it; diff --git a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp index 1407de1b..370b54c7 100644 --- a/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/legoactioncontrolpresenter.cpp @@ -80,8 +80,9 @@ void LegoActionControlPresenter::ParseExtra() { MxU32 len = m_action->GetExtraLength(); - if (len == 0) + if (len == 0) { return; + } len &= MAXWORD; diff --git a/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp b/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp index 5d594eaa..461e84db 100644 --- a/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp +++ b/LEGO1/lego/legoomni/src/common/legobackgroundcolor.cpp @@ -34,8 +34,9 @@ void LegoBackgroundColor::SetValue(const char* p_colorString) m_value.ToLowerCase(); LegoVideoManager* videomanager = VideoManager(); - if (!videomanager || !p_colorString) + if (!videomanager || !p_colorString) { return; + } float convertedR, convertedG, convertedB; char* colorStringCopy = strcpy(new char[strlen(p_colorString) + 1], p_colorString); @@ -43,14 +44,17 @@ void LegoBackgroundColor::SetValue(const char* p_colorString) if (!strcmp(colorStringSplit, g_set)) { colorStringSplit = strtok(0, g_delimiter); - if (colorStringSplit) + if (colorStringSplit) { m_h = (float) (atoi(colorStringSplit) * 0.01); + } colorStringSplit = strtok(0, g_delimiter); - if (colorStringSplit) + if (colorStringSplit) { m_s = (float) (atoi(colorStringSplit) * 0.01); + } colorStringSplit = strtok(0, g_delimiter); - if (colorStringSplit) + if (colorStringSplit) { m_v = (float) (atoi(colorStringSplit) * 0.01); + } ConvertHSVToRGB(m_h, m_s, m_v, &convertedR, &convertedG, &convertedB); videomanager->SetSkyColor(convertedR, convertedG, convertedB); diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 0a884a53..28453d61 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -96,8 +96,9 @@ LegoGameState::~LegoGameState() if (m_stateCount) { for (MxS16 i = 0; i < m_stateCount; i++) { LegoState* state = m_stateArray[i]; - if (state) + if (state) { delete state; + } } delete[] m_stateArray; @@ -118,8 +119,9 @@ MxResult LegoGameState::Save(MxULong p_slot) MxResult result; InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState"); - if (!infocenterState || infocenterState->GetInfocenterBufferElement(0) == NULL) + if (!infocenterState || infocenterState->GetInfocenterBufferElement(0) == NULL) { result = SUCCESS; + } else { result = FAILURE; MxVariableTable* variableTable = VariableTable(); @@ -134,8 +136,9 @@ MxResult LegoGameState::Save(MxULong p_slot) fileStream.Write(&m_unk0x0c, 1); for (MxS32 i = 0; i < sizeof(g_colorSaveData) / sizeof(g_colorSaveData[0]); ++i) { - if (WriteVariable(&fileStream, variableTable, g_colorSaveData[i].m_targetName) == FAILURE) + if (WriteVariable(&fileStream, variableTable, g_colorSaveData[i].m_targetName) == FAILURE) { return result; + } } if (WriteVariable(&fileStream, variableTable, "backgroundcolor") != FAILURE) { @@ -161,15 +164,17 @@ MxResult LegoGameState::Load(MxULong) // FUNCTION: LEGO1 0x10039f00 void LegoGameState::SetSavePath(char* p_savePath) { - if (m_savePath != NULL) + if (m_savePath != NULL) { delete[] m_savePath; + } if (p_savePath) { m_savePath = new char[strlen(p_savePath) + 1]; strcpy(m_savePath, p_savePath); } - else + else { m_savePath = NULL; + } } // FUNCTION: LEGO1 0x10039f70 @@ -183,8 +188,9 @@ MxResult LegoGameState::WriteVariable(LegoStorage* p_stream, MxVariableTable* p_ if (p_stream->Write((char*) &length, 1) == SUCCESS) { if (p_stream->Write(p_variableName, length) == SUCCESS) { length = strlen(variableValue); - if (p_stream->Write((char*) &length, 1) == SUCCESS) + if (p_stream->Write((char*) &length, 1) == SUCCESS) { result = p_stream->Write((char*) variableValue, length); + } } } } @@ -195,8 +201,9 @@ MxResult LegoGameState::WriteVariable(LegoStorage* p_stream, MxVariableTable* p_ MxResult LegoGameState::WriteEndOfVariables(LegoStorage* p_stream) { MxU8 len = strlen(g_endOfVariables); - if (p_stream->Write(&len, 1) == SUCCESS) + if (p_stream->Write(&len, 1) == SUCCESS) { return p_stream->Write(g_endOfVariables, len); + } return FAILURE; } @@ -212,9 +219,10 @@ MxS32 LegoGameState::ReadVariable(LegoStorage* p_stream, MxVariableTable* p_to) char nameBuffer[256]; if (p_stream->Read(nameBuffer, length) == SUCCESS) { nameBuffer[length] = '\0'; - if (strcmp(nameBuffer, g_endOfVariables) == 0) + if (strcmp(nameBuffer, g_endOfVariables) == 0) { // 2 -> "This was the last entry, done reading." result = 2; + } else { if (p_stream->Read((char*) &length, 1) == SUCCESS) { char valueBuffer[256]; @@ -237,8 +245,9 @@ void LegoGameState::GetFileSavePath(MxString* p_outPath, MxULong p_slotn) char path[1024] = ""; // Save path base - if (m_savePath != NULL) + if (m_savePath != NULL) { strcpy(path, m_savePath); + } // Slot: "G0", "G1", ... strcat(path, "\\G"); @@ -491,9 +500,11 @@ MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen) // FUNCTION: LEGO1 0x1003bbb0 LegoState* LegoGameState::GetState(const char* p_stateName) { - for (MxS32 i = 0; i < m_stateCount; ++i) - if (m_stateArray[i]->IsA(p_stateName)) + for (MxS32 i = 0; i < m_stateCount; ++i) { + if (m_stateArray[i]->IsA(p_stateName)) { return m_stateArray[i]; + } + } return NULL; } @@ -510,9 +521,11 @@ LegoState* LegoGameState::CreateState(const char* p_stateName) void LegoGameState::RegisterState(LegoState* p_state) { MxS32 targetIndex; - for (targetIndex = 0; targetIndex < m_stateCount; ++targetIndex) - if (m_stateArray[targetIndex]->IsA(p_state->ClassName())) + for (targetIndex = 0; targetIndex < m_stateCount; ++targetIndex) { + if (m_stateArray[targetIndex]->IsA(p_state->ClassName())) { break; + } + } if (targetIndex == m_stateCount) { LegoState** newBuffer = new LegoState*[m_stateCount + 1]; @@ -527,8 +540,9 @@ void LegoGameState::RegisterState(LegoState* p_state) return; } - if (m_stateArray[targetIndex]) + if (m_stateArray[targetIndex]) { delete m_stateArray[targetIndex]; + } m_stateArray[targetIndex] = p_state; } diff --git a/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp b/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp index 551dea32..c7154155 100644 --- a/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp +++ b/LEGO1/lego/legoomni/src/common/legounksavedatawriter.cpp @@ -19,26 +19,36 @@ MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStorage* p_stream) const LegoSaveDataEntry3* end = &g_saveData3[66]; while (TRUE) { - if (p_stream->Write(&entry->m_savePart1, 4) != SUCCESS) + if (p_stream->Write(&entry->m_savePart1, 4) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart2, 4) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart2, 4) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart3, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart3, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_currentFrame, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_currentFrame, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart5, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart5, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart6, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart6, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart7, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart7, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart8, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart8, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart9, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart9, 1) != SUCCESS) { break; - if (p_stream->Write(&entry->m_savePart10, 1) != SUCCESS) + } + if (p_stream->Write(&entry->m_savePart10, 1) != SUCCESS) { break; + } if (++entry >= end) { result = SUCCESS; break; diff --git a/LEGO1/lego/legoomni/src/common/legoutil.cpp b/LEGO1/lego/legoomni/src/common/legoutil.cpp index 9f388ad5..251942fb 100644 --- a/LEGO1/lego/legoomni/src/common/legoutil.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutil.cpp @@ -21,26 +21,36 @@ Extra::ActionType MatchActionString(const char* p_str) { Extra::ActionType result = Extra::ActionType::e_unknown; - if (!strcmpi("openram", p_str)) + if (!strcmpi("openram", p_str)) { result = Extra::ActionType::e_openram; - else if (!strcmpi("opendisk", p_str)) + } + else if (!strcmpi("opendisk", p_str)) { result = Extra::ActionType::e_opendisk; - else if (!strcmpi("close", p_str)) + } + else if (!strcmpi("close", p_str)) { result = Extra::ActionType::e_close; - else if (!strcmpi("start", p_str)) + } + else if (!strcmpi("start", p_str)) { result = Extra::ActionType::e_start; - else if (!strcmpi("stop", p_str)) + } + else if (!strcmpi("stop", p_str)) { result = Extra::ActionType::e_stop; - else if (!strcmpi("run", p_str)) + } + else if (!strcmpi("run", p_str)) { result = Extra::ActionType::e_run; - else if (!strcmpi("exit", p_str)) + } + else if (!strcmpi("exit", p_str)) { result = Extra::ActionType::e_exit; - else if (!strcmpi("enable", p_str)) + } + else if (!strcmpi("enable", p_str)) { result = Extra::ActionType::e_enable; - else if (!strcmpi("disable", p_str)) + } + else if (!strcmpi("disable", p_str)) { result = Extra::ActionType::e_disable; - else if (!strcmpi("notify", p_str)) + } + else if (!strcmpi("notify", p_str)) { result = Extra::ActionType::e_notify; + } return result; } @@ -133,10 +143,12 @@ void ConvertHSVToRGB(float p_h, float p_s, float p_v, float* p_rOut, float* p_bO double sDbl = p_s; - if (p_s > 0.5f) + if (p_s > 0.5f) { calc = (1.0f - p_v) * p_s + p_v; - else + } + else { calc = (p_v + 1.0) * sDbl; + } if (calc <= 0.0) { *p_gOut = 0.0f; *p_bOut = 0.0f; diff --git a/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp b/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp index d3971150..fe1543a2 100644 --- a/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp @@ -57,10 +57,12 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller if (presenter->StartAction(p_controller, action) == SUCCESS) { presenter->SetTickleState(e_idle); - if (presenter->IsA("MxVideoPresenter")) + if (presenter->IsA("MxVideoPresenter")) { VideoManager()->UnregisterPresenter(*presenter); - else if (presenter->IsA("MxAudioPresenter")) + } + else if (presenter->IsA("MxAudioPresenter")) { SoundManager()->UnregisterPresenter(*presenter); + } success = TRUE; } @@ -70,8 +72,9 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller action->SetOrigin(this); m_list.push_back(presenter); } - else if (presenter) + else if (presenter) { delete presenter; + } } if (!m_compositePresenter) { @@ -97,8 +100,9 @@ void MxCompositeMediaPresenter::StartingTickle() (*it)->Tickle(); if ((*it)->GetCurrentTickleState() == e_streaming || - ((*it)->GetAction() && (*it)->GetAction()->GetStartTime())) + ((*it)->GetAction() && (*it)->GetAction()->GetStartTime())) { m_unk0x4c++; + } } } @@ -107,8 +111,9 @@ void MxCompositeMediaPresenter::StartingTickle() m_unk0x4c = 0; for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { - if (!(*it)->GetAction()->GetStartTime()) + if (!(*it)->GetAction()->GetStartTime()) { m_unk0x4c++; + } } } } @@ -145,8 +150,9 @@ MxResult MxCompositeMediaPresenter::Tickle() case e_repeating: case e_unk5: case e_done: { - for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) + for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { (*it)->Tickle(); + } break; } default: @@ -162,8 +168,9 @@ MxResult MxCompositeMediaPresenter::PutData() MxAutoLocker lock(&m_criticalSection); if (m_currentTickleState >= e_streaming && m_currentTickleState <= e_done) { - for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) + for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { (*it)->PutData(); + } } return SUCCESS; diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index e296ad91..8bcf9999 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -43,8 +43,9 @@ void LegoControlManager::Register(MxCore* p_listener) void LegoControlManager::Unregister(MxCore* p_listener) { LegoNotifyListCursor cursor(&m_notifyList); - if (cursor.Find(p_listener)) + if (cursor.Find(p_listener)) { cursor.Detach(); + } } // FUNCTION: LEGO1 0x10029210 diff --git a/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp b/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp index 39fb5eee..ae131445 100644 --- a/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp @@ -58,8 +58,9 @@ void MxControlPresenter::VTable0x68(MxBool p_unk0x50) // FUNCTION: LEGO1 0x10044110 MxControlPresenter::~MxControlPresenter() { - if (m_unk0x58) + if (m_unk0x58) { delete m_unk0x58; + } } // FUNCTION: LEGO1 0x10044180 @@ -238,7 +239,7 @@ void MxControlPresenter::VTable0x6c(MxS16 p_val) MxS16 i = 0; for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { - (*it)->Enable((m_unk0x4c == 3 && m_unk0x4e == 0 || !IsEnabled()) ? FALSE : m_unk0x4e == i); + (*it)->Enable(((m_unk0x4c == 3 && m_unk0x4e == 0) || !IsEnabled()) ? FALSE : m_unk0x4e == i); i++; } } @@ -322,8 +323,9 @@ void MxControlPresenter::Enable(MxBool p_enable) MxBool MxControlPresenter::HasTickleStatePassed(TickleState p_tickleState) { MxCompositePresenterList::iterator it = m_list.begin(); - for (MxS16 i = m_unk0x4e; i > 0; i--, it++) + for (MxS16 i = m_unk0x4e; i > 0; i--, it++) { ; + } return (*it)->HasTickleStatePassed(p_tickleState); } diff --git a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp index d48d22ff..b68d0a01 100644 --- a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp @@ -64,10 +64,12 @@ void LegoCameraController::OnRButtonUp(MxPoint32 p_point) // FUNCTION: LEGO1 0x10012230 void LegoCameraController::OnMouseMove(MxU8 p_modifier, MxPoint32 p_point) { - if (p_modifier & c_lButtonState) + if (p_modifier & c_lButtonState) { LeftDrag(p_point.GetX(), p_point.GetY()); - else if (p_modifier & c_rButtonState) + } + else if (p_modifier & c_rButtonState) { RightDrag(p_point.GetX(), p_point.GetY()); + } } // FUNCTION: LEGO1 0x10012260 @@ -90,8 +92,9 @@ Mx3DPointFloat LegoCameraController::GetWorldUp() vec = m_lego3DView->GetPointOfView()->GetWorldUp(); return Mx3DPointFloat(vec[0], vec[1], vec[2]); } - else + else { return Mx3DPointFloat(0, 0, 0); + } } // FUNCTION: LEGO1 0x100127f0 @@ -102,8 +105,9 @@ Mx3DPointFloat LegoCameraController::GetWorldLocation() vec = m_lego3DView->GetPointOfView()->GetWorldPosition(); return Mx3DPointFloat(vec[0], vec[1] - m_entityOffsetUp, vec[2]); } - else + else { return Mx3DPointFloat(0, 0, 0); + } } // FUNCTION: LEGO1 0x100128a0 @@ -114,6 +118,7 @@ Mx3DPointFloat LegoCameraController::GetWorldDirection() vec = m_lego3DView->GetPointOfView()->GetWorldDirection(); return Mx3DPointFloat(vec[0], vec[1], vec[2]); } - else + else { return Mx3DPointFloat(0, 0, 0); + } } diff --git a/LEGO1/lego/legoomni/src/entity/legoentity.cpp b/LEGO1/lego/legoomni/src/entity/legoentity.cpp index 8ad66afb..3057a71f 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentity.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -51,8 +51,9 @@ void LegoEntity::Destroy(MxBool p_fromDestructor) { if (m_roi) { if (m_flags & c_bit1) { - if (m_roi->GetUnknown0x104() == this) + if (m_roi->GetUnknown0x104() == this) { m_roi->SetUnknown0x104(NULL); + } GetUnkSaveDataWriter()->FUN_10083db0(m_roi); } @@ -92,8 +93,9 @@ void LegoEntity::FUN_10010c30() { LegoWorld* world = GetCurrentWorld(); - if (m_cameraFlag && world && world->GetCamera() && m_roi) + if (m_cameraFlag && world && world->GetCamera() && m_roi) { world->GetCamera()->FUN_100123e0(m_roi->GetLocal2World(), 1); + } } // FUNCTION: LEGO1 0x10010e10 diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index 6a6a035c..8a9ec812 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -148,8 +148,9 @@ void LegoNavController::SetDefaults( // FUNCTION: LEGO1 0x10054e40 void LegoNavController::SetTargets(int p_hPos, int p_vPos, MxBool p_accel) { - if (this->m_trackDefault != FALSE) + if (this->m_trackDefault != FALSE) { ResetToDefault(); + } if (p_accel != FALSE) { this->m_targetTurnSpeed = CalculateNewTargetSpeed(p_hPos, this->m_hMax / 2, this->m_turnMaxSpeed); @@ -178,12 +179,15 @@ float LegoNavController::CalculateNewTargetSpeed(int p_pos, int p_center, float float result; int diff = p_pos - p_center; - if (diff > this->m_mouseDeadzone) + if (diff > this->m_mouseDeadzone) { result = (diff - m_mouseDeadzone) * p_maxSpeed / (p_center - m_mouseDeadzone); - else if (diff < -m_mouseDeadzone) + } + else if (diff < -m_mouseDeadzone) { result = (diff + m_mouseDeadzone) * p_maxSpeed / (p_center - m_mouseDeadzone); - else + } + else { result = 0.0f; + } return result; } @@ -196,8 +200,9 @@ float LegoNavController::CalculateNewAccel(int p_pos, int p_center, float p_maxA result = Abs(diff) * p_maxAccel / p_center; - if (result < p_minAccel) + if (result < p_minAccel) { result = (float) p_minAccel; + } return result; } @@ -214,10 +219,12 @@ float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel, float deltaVel = p_accel * p_time; newVel = p_currentVel + (deltaVel * vSign); - if (vSign > 0) + if (vSign > 0) { newVel = Min(newVel, p_targetVel); - else + } + else { newVel = Max(newVel, p_targetVel); + } } return newVel; diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index deaf0ce7..a8111dc8 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -65,16 +65,19 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction) m_entityList = new LegoEntityList(TRUE); - if (!m_entityList) + if (!m_entityList) { return FAILURE; + } m_cacheSoundList = new LegoCacheSoundList(TRUE); - if (!m_cacheSoundList) + if (!m_cacheSoundList) { return FAILURE; + } - if (!VTable0x54()) + if (!VTable0x54()) { return FAILURE; + } if (p_dsAction.GetFlags() & MxDSAction::c_enabled) { if (GetCurrentWorld()) { @@ -146,8 +149,9 @@ void LegoWorld::Destroy(MxBool p_fromDestructor) presenter->EndAction(); } } - else + else { delete object; + } } MxPresenterListCursor controlPresenterCursor(&m_controlPresenters); @@ -174,8 +178,9 @@ void LegoWorld::Destroy(MxBool p_fromDestructor) while (cursor.First(entity)) { cursor.Detach(); - if (!(entity->GetFlags() & LegoEntity::c_bit2)) + if (!(entity->GetFlags() & LegoEntity::c_bit2)) { delete entity; + } } delete m_entityList; @@ -201,8 +206,9 @@ void LegoWorld::Destroy(MxBool p_fromDestructor) delete roi; } - if (!p_fromDestructor) + if (!p_fromDestructor) { LegoEntity::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x1001f5e0 @@ -284,42 +290,48 @@ void LegoWorld::Add(MxCore* p_object) if (p_object->IsA("MxControlPresenter")) { MxPresenterListCursor cursor(&m_controlPresenters); - if (cursor.Find((MxPresenter*) p_object)) + if (cursor.Find((MxPresenter*) p_object)) { return; + } m_controlPresenters.Append((MxPresenter*) p_object); } else if (p_object->IsA("MxEntity")) { LegoEntityListCursor cursor(m_entityList); - if (cursor.Find((LegoEntity*) p_object)) + if (cursor.Find((LegoEntity*) p_object)) { return; + } m_entityList->Append((LegoEntity*) p_object); } else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") || p_object->IsA("LegoLoopingAnimPresenter")) { MxPresenterListCursor cursor(&m_animPresenters); - if (cursor.Find((MxPresenter*) p_object)) + if (cursor.Find((MxPresenter*) p_object)) { return; + } ((MxPresenter*) p_object)->SendToCompositePresenter(Lego()); m_animPresenters.Append(((MxPresenter*) p_object)); - if (p_object->IsA("LegoHideAnimPresenter")) + if (p_object->IsA("LegoHideAnimPresenter")) { m_hideAnimPresenter = (LegoHideAnimPresenter*) p_object; + } } else if (p_object->IsA("LegoCacheSound")) { LegoCacheSoundListCursor cursor(m_cacheSoundList); - if (cursor.Find((LegoCacheSound*) p_object)) + if (cursor.Find((LegoCacheSound*) p_object)) { return; + } m_cacheSoundList->Append((LegoCacheSound*) p_object); } else { - if (m_set0xa8.find(p_object) == m_set0xa8.end()) + if (m_set0xa8.find(p_object) == m_set0xa8.end()) { m_set0xa8.insert(p_object); + } } if (!m_set0xd0.empty() && p_object->IsA("MxPresenter")) { @@ -349,38 +361,45 @@ void LegoWorld::Remove(MxCore* p_object) else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") || p_object->IsA("LegoLoopingAnimPresenter")) { MxPresenterListCursor cursor(&m_animPresenters); - if (cursor.Find((MxPresenter*) p_object)) + if (cursor.Find((MxPresenter*) p_object)) { cursor.Detach(); + } - if (p_object->IsA("LegoHideAnimPresenter")) + if (p_object->IsA("LegoHideAnimPresenter")) { m_hideAnimPresenter = NULL; + } } else if (p_object->IsA("MxEntity")) { - if (p_object->IsA("LegoPathActor")) + if (p_object->IsA("LegoPathActor")) { FUN_1001fc80((IslePathActor*) p_object); + } if (m_entityList) { LegoEntityListCursor cursor(m_entityList); - if (cursor.Find((LegoEntity*) p_object)) + if (cursor.Find((LegoEntity*) p_object)) { cursor.Detach(); + } } } else if (p_object->IsA("LegoCacheSound")) { LegoCacheSoundListCursor cursor(m_cacheSoundList); - if (cursor.Find((LegoCacheSound*) p_object)) + if (cursor.Find((LegoCacheSound*) p_object)) { cursor.Detach(); + } } else { it = m_set0xa8.find(p_object); - if (it != m_set0xa8.end()) + if (it != m_set0xa8.end()) { m_set0xa8.erase(it); + } } it = m_set0xd0.find(p_object); - if (it != m_set0xd0.end()) + if (it != m_set0xd0.end()) { m_set0xd0.erase(it); + } } } @@ -393,8 +412,9 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name) while (cursor.Next(presenter)) { MxDSAction* action = presenter->GetAction(); - if (!strcmp(action->GetObjectName(), p_name)) + if (!strcmp(action->GetObjectName(), p_name)) { return presenter; + } } return NULL; @@ -404,12 +424,14 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name) LegoEntity* entity; while (cursor.Next(entity)) { - if (!p_name) + if (!p_name) { return entity; + } LegoROI* roi = entity->GetROI(); - if (roi && !strcmpi(roi->GetUnknown0xe4(), p_name)) + if (roi && !strcmpi(roi->GetUnknown0xe4(), p_name)) { return entity; + } } return NULL; @@ -419,8 +441,9 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name) MxPresenter* presenter; while (cursor.Next(presenter)) { - if (!strcmpi(((LegoAnimPresenter*) presenter)->GetActionObjectName(), p_name)) + if (!strcmpi(((LegoAnimPresenter*) presenter)->GetActionObjectName(), p_name)) { return presenter; + } } return NULL; @@ -431,8 +454,9 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name) MxPresenter* presenter = (MxPresenter*) *it; MxDSAction* action = presenter->GetAction(); - if (!strcmp(action->GetObjectName(), p_name)) + if (!strcmp(action->GetObjectName(), p_name)) { return *it; + } } } @@ -447,8 +471,9 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId) LegoEntity* entity; while (entityCursor.Next(entity)) { - if (entity->GetAtom() == p_atom && entity->GetEntityId() == p_entityId) + if (entity->GetAtom() == p_atom && entity->GetEntityId() == p_entityId) { return entity; + } } MxPresenterListCursor controlPresenterCursor(&m_controlPresenters); @@ -457,8 +482,9 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId) while (controlPresenterCursor.Next(presenter)) { MxDSAction* action = presenter->GetAction(); - if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) + if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) { return presenter; + } } MxPresenterListCursor animPresenterCursor(&m_animPresenters); @@ -466,8 +492,9 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId) while (animPresenterCursor.Next(presenter)) { MxDSAction* action = presenter->GetAction(); - if (action && action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) + if (action && action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) { return presenter; + } } for (MxCoreSet::iterator it = m_set0xa8.begin(); it != m_set0xa8.end(); it++) { @@ -477,8 +504,9 @@ MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId) MxPresenter* presenter = (MxPresenter*) *it; MxDSAction* action = presenter->GetAction(); - if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) + if (action->GetAtomId() == p_atom && action->GetObjectId() == p_entityId) { return *it; + } } } @@ -502,8 +530,9 @@ MxResult LegoWorld::Tickle() ReadyWorld(); return TRUE; case e_two: - if (PresentersPending()) + if (PresentersPending()) { break; + } default: m_startupTicks--; } @@ -519,8 +548,9 @@ MxBool LegoWorld::PresentersPending() MxPresenter* presenter; while (controlPresenterCursor.Next(presenter)) { - if (presenter->IsEnabled() && !presenter->HasTickleStatePassed(MxPresenter::e_starting)) + if (presenter->IsEnabled() && !presenter->HasTickleStatePassed(MxPresenter::e_starting)) { return TRUE; + } } MxPresenterListCursor animPresenterCursor(&m_animPresenters); @@ -528,12 +558,14 @@ MxBool LegoWorld::PresentersPending() while (animPresenterCursor.Next(presenter)) { if (presenter->IsEnabled()) { if (presenter->IsA("LegoLocomotionAnimPresenter")) { - if (!presenter->HasTickleStatePassed(MxPresenter::e_ready)) + if (!presenter->HasTickleStatePassed(MxPresenter::e_ready)) { return TRUE; + } } else { - if (!presenter->HasTickleStatePassed(MxPresenter::e_starting)) + if (!presenter->HasTickleStatePassed(MxPresenter::e_starting)) { return TRUE; + } } } } @@ -542,8 +574,9 @@ MxBool LegoWorld::PresentersPending() if ((*it)->IsA("MxPresenter")) { presenter = (MxPresenter*) *it; - if (presenter->IsEnabled() && !presenter->HasTickleStatePassed(MxPresenter::e_starting)) + if (presenter->IsEnabled() && !presenter->HasTickleStatePassed(MxPresenter::e_starting)) { return TRUE; + } } } diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index 072da137..d4e002de 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -100,8 +100,9 @@ MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSA action->SetOrigin(this); m_list.push_back(presenter); } - else if (presenter) + else if (presenter) { delete presenter; + } } VideoManager()->RegisterPresenter(*this); diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp index 2a98f5af..0e90c761 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp @@ -195,8 +195,9 @@ MxLong Infocenter::HandleEndAction(MxParam& p_param) MxLong result = m_radio.Notify(p_param); - if (result || (action->GetAtomId() != m_atom && action->GetAtomId() != *g_introScript)) + if (result || (action->GetAtomId() != m_atom && action->GetAtomId() != *g_introScript)) { return result; + } if (action->GetObjectId() == c_returnBackGuidanceDialogue2) { ControlManager()->FUN_100293c0(0x10, action->GetAtomId().GetInternal(), 0); @@ -747,8 +748,9 @@ void Infocenter::FUN_10070d10(MxS32 p_x, MxS32 p_y) MxS32 left = m_mapAreas[i].m_area.GetLeft(); MxS32 top = m_mapAreas[i].m_area.GetTop(); - if (left <= p_x && p_x <= right && top <= p_y && p_y <= bottom) + if (left <= p_x && p_x <= right && top <= p_y && p_y <= bottom) { break; + } } if (i == 7) { diff --git a/LEGO1/lego/legoomni/src/infocenter/score.cpp b/LEGO1/lego/legoomni/src/infocenter/score.cpp index ce378399..197cd7ae 100644 --- a/LEGO1/lego/legoomni/src/infocenter/score.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/score.cpp @@ -32,8 +32,9 @@ MxBool Score::VTable0x5c() // FUNCTION: LEGO1 0x10001200 Score::~Score() { - if (InputManager()->GetWorld() == this) + if (InputManager()->GetWorld() == this) { InputManager()->ClearWorld(); + } InputManager()->UnRegister(this); ControlManager()->Unregister(this); NotificationManager()->Unregister(this); @@ -87,8 +88,9 @@ MxLong Score::Notify(MxParam& p_param) ret = FUN_10001510((MxEndActionNotificationParam&) p_param); break; case c_notificationKeyPress: - if (((LegoEventNotificationParam&) p_param).GetKey() == 0x20) + if (((LegoEventNotificationParam&) p_param).GetKey() == 0x20) { DeleteScript(); // Shutting down + } ret = 1; break; case c_notificationClick: @@ -96,8 +98,9 @@ MxLong Score::Notify(MxParam& p_param) break; case c_notificationTransitioned: DeleteObjects(g_infoscorScript, 7, 9); - if (m_unk0xf8) + if (m_unk0xf8) { GameState()->SwitchArea(m_unk0xf8); + } ret = 1; break; default: @@ -145,8 +148,9 @@ void Score::ReadyWorld() action.SetAtomId(*g_infoscorScript); Start(&action); } - else + else { PlayMusic(JukeBox::e_informationCenter); + } FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); } @@ -221,8 +225,9 @@ void Score::VTable0x68(MxBool p_add) InputManager()->SetWorld(this); SetIsWorldActive(FALSE); } - else if (InputManager()->GetWorld() == this) + else if (InputManager()->GetWorld() == this) { InputManager()->ClearWorld(); + } } // FUNCTION: LEGO1 0x100019d0 @@ -249,25 +254,30 @@ void Score::Paint() for (MxU8 id = 1; id <= 5; id++) { m_surface = (MxU8*) desc.lpSurface; MxU16 color = 0; - if (l70) + if (l70) { color = l70->GetColor(id); + } MxU32 row = id - 1; FillArea(0, row, color); color = 0; - if (l78) + if (l78) { color = l78->GetColor(id); + } FillArea(1, row, color); color = 0; - if (l74) + if (l74) { color = l74->GetColor(id); + } FillArea(2, row, color); color = 0; - if (lesi) + if (lesi) { color = lesi->GetColor(id); + } FillArea(3, row, color); color = 0; - if (lebp) + if (lebp) { color = lebp->GetColor(id); + } FillArea(4, row, color); } diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index 783bbfe3..45801476 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -64,11 +64,13 @@ MxResult LegoInputManager::Create(HWND p_hwnd) m_controlManager = new LegoControlManager; - if (!m_keyboardNotifyList) + if (!m_keyboardNotifyList) { m_keyboardNotifyList = new LegoNotifyList; + } - if (!m_eventQueue) + if (!m_eventQueue) { m_eventQueue = new LegoEventQueue; + } CreateAndAcquireKeyboard(p_hwnd); GetJoystickId(); @@ -86,16 +88,19 @@ void LegoInputManager::Destroy() { ReleaseDX(); - if (m_keyboardNotifyList) + if (m_keyboardNotifyList) { delete m_keyboardNotifyList; + } m_keyboardNotifyList = NULL; - if (m_eventQueue) + if (m_eventQueue) { delete m_eventQueue; + } m_eventQueue = NULL; - if (m_controlManager) + if (m_controlManager) { delete m_controlManager; + } } // FUNCTION: LEGO1 0x1005c030 @@ -183,8 +188,9 @@ MxResult LegoInputManager::GetJoystickState( if ((capabilities & JOYCAPS_HASPOV) != 0) { joyinfoex.dwFlags = JOY_RETURNX | JOY_RETURNY | JOY_RETURNPOV | JOY_RETURNBUTTONS; - if ((capabilities & JOYCAPS_POVCTS) != 0) + if ((capabilities & JOYCAPS_POVCTS) != 0) { joyinfoex.dwFlags = JOY_RETURNX | JOY_RETURNY | JOY_RETURNPOV | JOY_RETURNBUTTONS | JOY_RETURNPOVCTS; + } } MMRESULT mmresult = joyGetPosEx(m_joyid, &joyinfoex); @@ -220,8 +226,9 @@ void LegoInputManager::Register(MxCore* p_notify) MxAutoLocker lock(&m_criticalSection); LegoNotifyListCursor cursor(m_keyboardNotifyList); - if (!cursor.Find(p_notify)) + if (!cursor.Find(p_notify)) { m_keyboardNotifyList->Append(p_notify); + } } // FUNCTION: LEGO1 0x1005c5c0 @@ -230,8 +237,9 @@ void LegoInputManager::UnRegister(MxCore* p_notify) MxAutoLocker lock(&m_criticalSection); LegoNotifyListCursor cursor(m_keyboardNotifyList); - if (cursor.Find(p_notify)) + if (cursor.Find(p_notify)) { cursor.Detach(); + } } // FUNCTION: LEGO1 0x1005c700 @@ -276,8 +284,9 @@ void LegoInputManager::ProcessEvents() LegoEventNotificationParam event; while (m_eventQueue->Dequeue(event)) { - if (ProcessOneEvent(event)) + if (ProcessOneEvent(event)) { break; + } } } @@ -379,8 +388,9 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param) p_param.SetROI(roi); if (roi && roi->GetUnk0x0c() == 1) { - for (OrientableROI* oroi = roi->GetUnknown0xd4(); oroi; oroi = oroi->GetUnknown0xd4()) + for (OrientableROI* oroi = roi->GetUnknown0xd4(); oroi; oroi = oroi->GetUnknown0xd4()) { roi = (LegoROI*) oroi; + } LegoEntity* entity = roi->GetUnknown0x104(); if (entity && entity->Notify(p_param) != 0) { @@ -415,8 +425,9 @@ void LegoInputManager::StartAutoDragTimer() // FUNCTION: LEGO1 0x1005cfd0 void LegoInputManager::StopAutoDragTimer() { - if (m_autoDragTimerID) + if (m_autoDragTimerID) { ::KillTimer(LegoOmni::GetInstance()->GetWindowHandle(), m_autoDragTimerID); + } } // FUNCTION: LEGO1 0x1005cff0 diff --git a/LEGO1/lego/legoomni/src/isle/islepathactor.cpp b/LEGO1/lego/legoomni/src/isle/islepathactor.cpp index b93535f6..55ef5b71 100644 --- a/LEGO1/lego/legoomni/src/isle/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/isle/islepathactor.cpp @@ -20,8 +20,9 @@ MxResult IslePathActor::Create(MxDSAction& p_dsAction) // FUNCTION: LEGO1 0x1001a2a0 void IslePathActor::Destroy(MxBool p_fromDestructor) { - if (!p_fromDestructor) + if (!p_fromDestructor) { LegoPathActor::Destroy(FALSE); + } } // STUB: LEGO1 0x1001a2c0 diff --git a/LEGO1/lego/legoomni/src/isle/radio.cpp b/LEGO1/lego/legoomni/src/isle/radio.cpp index 2f18ae59..86561c16 100644 --- a/LEGO1/lego/legoomni/src/isle/radio.cpp +++ b/LEGO1/lego/legoomni/src/isle/radio.cpp @@ -79,8 +79,9 @@ void Radio::Stop() MxControlPresenter* presenter = (MxControlPresenter*) world->Find(world->GetAtom(), 18); - if (presenter) + if (presenter) { presenter->VTable0x6c(0); + } BackgroundAudioManager()->Stop(); BackgroundAudioManager()->Enable(m_bgAudioPreviouslyEnabled); diff --git a/LEGO1/lego/legoomni/src/isle/radiostate.cpp b/LEGO1/lego/legoomni/src/isle/radiostate.cpp index cb692fcf..74094c2c 100644 --- a/LEGO1/lego/legoomni/src/isle/radiostate.cpp +++ b/LEGO1/lego/legoomni/src/isle/radiostate.cpp @@ -106,9 +106,11 @@ MxU32 RadioState::FUN_1002d090() MxBool RadioState::FUN_1002d0c0(const MxAtomId& p_atom, MxU32 p_objectId) { if (*g_jukeboxScript == p_atom) { - for (MxS16 i = 0; i < 3; i++) - if (m_unk0x08[i].FUN_10014de0(p_objectId)) + for (MxS16 i = 0; i < 3; i++) { + if (m_unk0x08[i].FUN_10014de0(p_objectId)) { return TRUE; + } + } } return FALSE; diff --git a/LEGO1/lego/legoomni/src/main/legoomni.cpp b/LEGO1/lego/legoomni/src/main/legoomni.cpp index 743489a0..153d5522 100644 --- a/LEGO1/lego/legoomni/src/main/legoomni.cpp +++ b/LEGO1/lego/legoomni/src/main/legoomni.cpp @@ -257,8 +257,9 @@ void PlayMusic(MxU32 p_index) // FUNCTION: LEGO1 0x100159c0 void SetIsWorldActive(MxBool p_isWorldActive) { - if (!p_isWorldActive) + if (!p_isWorldActive) { LegoOmni::GetInstance()->GetInputManager()->SetCamera(NULL); + } g_isWorldActive = p_isWorldActive; } @@ -523,17 +524,20 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) p_param.CreateFlags().CreateSoundManager(FALSE); p_param.CreateFlags().CreateTickleManager(FALSE); - if (!(m_tickleManager = new MxTickleManager())) + if (!(m_tickleManager = new MxTickleManager())) { return FAILURE; + } - if (MxOmni::Create(p_param) != SUCCESS) + if (MxOmni::Create(p_param) != SUCCESS) { return FAILURE; + } m_objectFactory = new LegoObjectFactory(); - if (m_objectFactory == NULL) + if (m_objectFactory == NULL) { return FAILURE; + } - if (m_soundManager = new LegoSoundManager()) { + if ((m_soundManager = new LegoSoundManager())) { if (m_soundManager->Create(10, 0) != SUCCESS) { delete m_soundManager; m_soundManager = NULL; @@ -541,14 +545,14 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) } } - if (m_videoManager = new LegoVideoManager()) { + if ((m_videoManager = new LegoVideoManager())) { if (m_videoManager->Create(p_param.GetVideoParam(), 100, 0) != SUCCESS) { delete m_videoManager; m_videoManager = NULL; } } - if (m_inputMgr = new LegoInputManager()) { + if ((m_inputMgr = new LegoInputManager())) { if (m_inputMgr->Create(p_param.GetWindowHandle()) != SUCCESS) { delete m_inputMgr; m_inputMgr = NULL; @@ -657,8 +661,9 @@ LegoWorld* LegoOmni::FindWorld(const MxAtomId& p_atom, MxS32 p_entityid) while (cursor.Next(world)) { if ((p_entityid == -1 || world->GetEntityId() == p_entityid) && - (!p_atom.GetInternal() || world->GetAtom() == p_atom)) + (!p_atom.GetInternal() || world->GetAtom() == p_atom)) { return world; + } } } @@ -716,8 +721,9 @@ MxEntity* LegoOmni::AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* // FUNCTION: LEGO1 0x1005b3a0 void LegoOmni::NotifyCurrentEntity(MxNotificationParam* p_param) { - if (m_currentWorld) + if (m_currentWorld) { NotificationManager()->Send(m_currentWorld, p_param); + } } // FUNCTION: LEGO1 0x1005b3c0 @@ -767,8 +773,9 @@ void LegoOmni::FUN_1005b4f0(MxBool p_disable, MxU16 p_flags) // FUNCTION: LEGO1 0x1005b560 void LegoOmni::CreateBackgroundAudio() { - if (m_bkgAudioManager) + if (m_bkgAudioManager) { m_bkgAudioManager->Create(*g_jukeboxScript, 100); + } } // FUNCTION: LEGO1 0x1005b580 diff --git a/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp b/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp index 48d592a3..f0ff859f 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathpresenter.cpp @@ -39,16 +39,18 @@ MxResult LegoPathPresenter::AddToManager() // FUNCTION: LEGO1 0x10044b70 void LegoPathPresenter::Destroy(MxBool p_fromDestructor) { - if (VideoManager()) + if (VideoManager()) { VideoManager()->UnregisterPresenter(*this); + } { MxAutoLocker lock(&this->m_criticalSection); Init(); } - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x10044c10 @@ -81,8 +83,9 @@ void LegoPathPresenter::StreamingTickle() // FUNCTION: LEGO1 0x10044d40 void LegoPathPresenter::RepeatingTickle() { - if (this->m_action->GetDuration() == -1) + if (this->m_action->GetDuration() == -1) { return; + } EndAction(); } diff --git a/LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp b/LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp index 6d1cac49..c1804a4f 100644 --- a/LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp +++ b/LEGO1/lego/legoomni/src/pizzeria/pizzamissionstate.cpp @@ -13,8 +13,10 @@ MxResult PizzaMissionState::VTable0x1c(LegoFile* p_legoFile) // FUNCTION: LEGO1 0x10039510 PizzaMissionStateEntry* PizzaMissionState::GetState(MxU8 p_id) { - for (MxS16 i = 0; i < 5; i++) - if (m_state[i].m_id == p_id) + for (MxS16 i = 0; i < 5; i++) { + if (m_state[i].m_id == p_id) { return m_state + i; + } + } return NULL; } diff --git a/LEGO1/lego/legoomni/src/race/racestate.cpp b/LEGO1/lego/legoomni/src/race/racestate.cpp index db6d96dc..39e6c51c 100644 --- a/LEGO1/lego/legoomni/src/race/racestate.cpp +++ b/LEGO1/lego/legoomni/src/race/racestate.cpp @@ -22,9 +22,11 @@ MxResult RaceState::VTable0x1c(LegoFile* p_legoFile) RaceStateEntry* RaceState::GetState(MxU8 p_id) { for (MxS16 i = 0;; i++) { - if (i >= 5) + if (i >= 5) { return NULL; - if (m_state[i].m_id == p_id) + } + if (m_state[i].m_id == p_id) { return m_state + i; + } } } diff --git a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp index 07035332..81a854f8 100644 --- a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp @@ -25,15 +25,17 @@ void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor) { m_criticalSection.Enter(); - if (m_unk0xc0) + if (m_unk0xc0) { delete m_unk0xc0; + } Init(); m_criticalSection.Leave(); // This appears to be a bug, since it results in an endless loop - if (!p_fromDestructor) + if (!p_fromDestructor) { LegoHideAnimPresenter::Destroy(); + } } // STUB: LEGO1 0x1006dab0 diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index cbb68b79..e80b7eed 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -50,8 +50,9 @@ LegoVideoManager::~LegoVideoManager() // FUNCTION: LEGO1 0x1007abb0 MxResult LegoVideoManager::CreateDirect3D() { - if (!m_direct3d) + if (!m_direct3d) { m_direct3d = new MxDirect3D; + } return m_direct3d ? SUCCESS : FAILURE; } @@ -77,25 +78,29 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM MxPalette* palette = new MxPalette; p_videoParam.SetPalette(palette); - if (!palette) + if (!palette) { goto done; + } paletteCreated = TRUE; } PALETTEENTRY paletteEntries[256]; p_videoParam.GetPalette()->GetEntries(paletteEntries); - if (CreateDirect3D() != SUCCESS) + if (CreateDirect3D() != SUCCESS) { goto done; + } - if (deviceEnumerate.DoEnumerate() != SUCCESS) + if (deviceEnumerate.DoEnumerate() != SUCCESS) { goto done; + } if (p_videoParam.GetDeviceName()) { deviceNum = deviceEnumerate.ParseDeviceName(p_videoParam.GetDeviceName()); if (deviceNum >= 0) { - if ((deviceNum = deviceEnumerate.GetDevice(deviceNum, driver, device)) != SUCCESS) + if ((deviceNum = deviceEnumerate.GetDevice(deviceNum, driver, device)) != SUCCESS) { deviceNum = -1; + } } } @@ -107,10 +112,12 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM m_direct3d->SetDevice(deviceEnumerate, driver, device); - if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) + if (!driver->m_ddCaps.dwCaps2 && driver->m_ddCaps.dwSVBRops[7] != 2) { p_videoParam.Flags().SetF2bit0(TRUE); - else + } + else { p_videoParam.Flags().SetF2bit0(FALSE); + } ViewROI::SetUnk101013d8(p_videoParam.Flags().GetF2bit0() == FALSE); @@ -124,8 +131,9 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM bits, paletteEntries, sizeof(paletteEntries) / sizeof(paletteEntries[0]) - )) + )) { goto done; + } if (MxVideoManager::VTable0x28( p_videoParam, @@ -136,18 +144,21 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM m_direct3d->GetClipper(), p_frequencyMS, p_createThread - ) != SUCCESS) + ) != SUCCESS) { goto done; + } m_renderer = Tgl::CreateRenderer(); - if (!m_renderer) + if (!m_renderer) { goto done; + } m_3dManager = new Lego3DManager; - if (!m_3dManager) + if (!m_3dManager) { goto done; + } Lego3DManager::CreateStruct createStruct; memset(&createStruct, 0, sizeof(createStruct)); @@ -161,13 +172,15 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM createStruct.m_direct3d = m_direct3d->GetDirect3D(); createStruct.m_d3dDevice = m_direct3d->GetDirect3DDevice(); - if (!m_3dManager->Create(createStruct)) + if (!m_3dManager->Create(createStruct)) { goto done; + } ViewLODList* pLODList; - if (ConfigureD3DRM() != SUCCESS) + if (ConfigureD3DRM() != SUCCESS) { goto done; + } pLODList = m_3dManager->GetViewLODListManager()->Create("CameraROI", 1); m_viewROI = new LegoROI(m_renderer, pLODList, Timer()->GetTime()); @@ -219,19 +232,22 @@ void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY) m_cursorY = p_cursorY; m_drawCursor = TRUE; - if (623 < p_cursorX) + if (623 < p_cursorX) { m_cursorX = 623; + } - if (463 < p_cursorY) + if (463 < p_cursorY) { m_cursorY = 463; + } } // FUNCTION: LEGO1 0x1007b770 MxResult LegoVideoManager::Tickle() { if (m_unk0x554 && !m_videoParam.Flags().GetFlipSurfaces() && - TransitionManager()->GetTransitionType() == MxTransitionManager::e_notTransitioning) + TransitionManager()->GetTransitionType() == MxTransitionManager::e_notTransitioning) { Sleep(30); + } m_stopWatch->Stop(); m_elapsedSeconds = m_stopWatch->ElapsedSeconds(); @@ -245,11 +261,13 @@ MxResult LegoVideoManager::Tickle() MxPresenter* presenter; MxPresenterListCursor cursor(m_presenters); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->Tickle(); + } - if (m_render3d && !m_paused) + if (m_render3d && !m_paused) { m_3dManager->GetLego3DView()->GetView()->Clear(); + } MxRect32 rect(0, 0, m_videoParam.GetRect().GetWidth() - 1, m_videoParam.GetRect().GetHeight() - 1); InvalidateRect(rect); @@ -257,8 +275,9 @@ MxResult LegoVideoManager::Tickle() if (!m_paused && (m_render3d || m_unk0xe5)) { cursor.Reset(); - while (cursor.Next(presenter) && presenter->GetDisplayZ() >= 0) + while (cursor.Next(presenter) && presenter->GetDisplayZ() >= 0) { presenter->PutData(); + } if (!m_unk0xe5) { m_3dManager->Render(0.0); @@ -267,21 +286,25 @@ MxResult LegoVideoManager::Tickle() cursor.Prev(); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->PutData(); + } - if (m_drawCursor) + if (m_drawCursor) { DrawCursor(); + } - if (m_drawFPS) + if (m_drawFPS) { DrawFPS(); + } } else if (m_fullScreenMovie) { MxPresenter* presenter; MxPresenterListCursor cursor(m_presenters); - if (cursor.Last(presenter)) + if (cursor.Last(presenter)) { presenter->PutData(); + } } if (!m_paused) { @@ -316,8 +339,9 @@ inline void LegoVideoManager::DrawCursor() m_cursorRect.right = 16; m_cursorSurface = MxDisplaySurface::CreateCursorSurface(); - if (!m_cursorSurface) + if (!m_cursorSurface) { m_drawCursor = FALSE; + } } ddSurface2 @@ -467,19 +491,22 @@ MxResult LegoVideoManager::ConfigureD3DRM() IDirect3DRMDevice2* d3drm = ((TglImpl::DeviceImpl*) m_3dManager->GetLego3DView()->GetDevice())->ImplementationData(); - if (!d3drm) + if (!d3drm) { return FAILURE; + } MxAssignedDevice* assignedDevice = m_direct3d->GetAssignedDevice(); if (assignedDevice && assignedDevice->GetFlags() & MxAssignedDevice::c_hardwareMode) { - if (assignedDevice->GetDesc().dpcTriCaps.dwTextureFilterCaps & D3DPTFILTERCAPS_LINEAR) + if (assignedDevice->GetDesc().dpcTriCaps.dwTextureFilterCaps & D3DPTFILTERCAPS_LINEAR) { d3drm->SetTextureQuality(D3DRMTEXTURE_LINEAR); + } d3drm->SetDither(TRUE); - if (assignedDevice->GetDesc().dpcTriCaps.dwShadeCaps & D3DPSHADECAPS_ALPHAFLATBLEND) + if (assignedDevice->GetDesc().dpcTriCaps.dwShadeCaps & D3DPSHADECAPS_ALPHAFLATBLEND) { d3drm->SetRenderMode(D3DRMRENDERMODE_BLENDEDTRANSPARENCY); + } } return SUCCESS; diff --git a/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp b/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp index d0b3aa96..56fc3c9a 100644 --- a/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp +++ b/LEGO1/lego/legoomni/src/video/mxtransitionmanager.cpp @@ -209,11 +209,13 @@ void MxTransitionManager::TransitionDissolve() for (MxS32 col = 0; col < 640; col++) { // Select 16 columns on each tick - if (m_animationTimer * 16 > m_columnOrder[col]) + if (m_animationTimer * 16 > m_columnOrder[col]) { continue; + } - if (m_animationTimer * 16 + 15 < m_columnOrder[col]) + if (m_animationTimer * 16 + 15 < m_columnOrder[col]) { continue; + } for (MxS32 row = 0; row < 480; row++) { // Shift the chosen column a different amount at each scanline. @@ -291,11 +293,13 @@ void MxTransitionManager::TransitionPixelation() for (MxS32 col = 0; col < 64; col++) { // Select 4 columns on each tick - if (m_animationTimer * 4 > m_columnOrder[col]) + if (m_animationTimer * 4 > m_columnOrder[col]) { continue; + } - if (m_animationTimer * 4 + 3 < m_columnOrder[col]) + if (m_animationTimer * 4 + 3 < m_columnOrder[col]) { continue; + } for (MxS32 row = 0; row < 48; row++) { // To do the pixelation, we subdivide the 640x480 surface into @@ -549,8 +553,9 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc) (const MxU8*) p_ddsc->lpSurface + m_copyRect.top * p_ddsc->lPitch + bytesPerPixel * m_copyRect.left; m_copyBuffer = new MxU8[bytesPerPixel * width * height]; - if (!m_copyBuffer) + if (!m_copyBuffer) { return; + } // Copy into the copy buffer MxU8* dst = m_copyBuffer; diff --git a/LEGO1/lego/sources/3dmanager/lego3dview.cpp b/LEGO1/lego/sources/3dmanager/lego3dview.cpp index cfa274f6..34f699d8 100644 --- a/LEGO1/lego/sources/3dmanager/lego3dview.cpp +++ b/LEGO1/lego/sources/3dmanager/lego3dview.cpp @@ -29,8 +29,9 @@ Lego3DView::~Lego3DView() BOOL Lego3DView::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer) { double viewAngle = 45; - if (rCreateStruct.m_isWideViewAngle) + if (rCreateStruct.m_isWideViewAngle) { viewAngle = 90; + } float frontClippingDistance = 0.1; float backClippingDistance = 500; diff --git a/LEGO1/lego/sources/3dmanager/lego3dview.h b/LEGO1/lego/sources/3dmanager/lego3dview.h index 7e68bdcb..cbbde4a8 100644 --- a/LEGO1/lego/sources/3dmanager/lego3dview.h +++ b/LEGO1/lego/sources/3dmanager/lego3dview.h @@ -13,10 +13,10 @@ class Lego3DView : public LegoView1 { public: Lego3DView(); - virtual ~Lego3DView() override; + ~Lego3DView() override; BOOL Create(const CreateStruct&, Tgl::Renderer*); - virtual void Destroy() override; // vtable+0x08 + void Destroy() override; // vtable+0x08 BOOL Add(ViewROI&); BOOL Remove(ViewROI&); diff --git a/LEGO1/lego/sources/3dmanager/legoview1.cpp b/LEGO1/lego/sources/3dmanager/legoview1.cpp index 97114469..28ffb911 100644 --- a/LEGO1/lego/sources/3dmanager/legoview1.cpp +++ b/LEGO1/lego/sources/3dmanager/legoview1.cpp @@ -42,8 +42,9 @@ LegoView::~LegoView() BOOL LegoView::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer) { float viewAngle = 45; - if (rCreateStruct.m_isWideViewAngle) + if (rCreateStruct.m_isWideViewAngle) { viewAngle = 90; + } float frontClippingDistance = 0.1; float backClippingDistance = 500; diff --git a/LEGO1/lego/sources/3dmanager/legoview1.h b/LEGO1/lego/sources/3dmanager/legoview1.h index 4060e54f..34b8f026 100644 --- a/LEGO1/lego/sources/3dmanager/legoview1.h +++ b/LEGO1/lego/sources/3dmanager/legoview1.h @@ -18,16 +18,16 @@ class Camera; class LegoView : public TglSurface { public: LegoView(); - virtual ~LegoView() override; + ~LegoView() override; BOOL Create(const CreateStruct&, Tgl::Renderer*); - virtual void Destroy() override; // vtable+0x08 + void Destroy() override; // vtable+0x08 Tgl::Group* GetScene() const; Tgl::Camera* GetCamera() const; protected: - virtual Tgl::View* CreateView(Tgl::Renderer*, Tgl::Device*); // vtable+0x10 + Tgl::View* CreateView(Tgl::Renderer*, Tgl::Device*) override; // vtable+0x10 private: Tgl::Group* m_pScene; // 0x70 @@ -58,11 +58,11 @@ inline Tgl::Camera* LegoView::GetCamera() const class LegoView1 : public LegoView { public: LegoView1(); - virtual ~LegoView1() override; + ~LegoView1() override; BOOL AddLightsToViewport(); BOOL Create(const TglSurface::CreateStruct&, Tgl::Renderer*); - virtual void Destroy() override; // vtable+0x08 + void Destroy() override; // vtable+0x08 private: Tgl::Light* m_pSunLight; // 0x78 diff --git a/LEGO1/lego/sources/misc/legostorage.cpp b/LEGO1/lego/sources/misc/legostorage.cpp index d8749dc1..8fa71553 100644 --- a/LEGO1/lego/sources/misc/legostorage.cpp +++ b/LEGO1/lego/sources/misc/legostorage.cpp @@ -109,14 +109,17 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode) strcat(mode, "r"); } if (p_mode & c_write) { - if (m_mode != c_read) + if (m_mode != c_read) { m_mode = c_write; + } strcat(mode, "w"); } - if ((p_mode & c_text) != 0) + if ((p_mode & c_text) != 0) { strcat(mode, "t"); - else + } + else { strcat(mode, "b"); + } if (!(m_file = fopen(p_name, mode))) { return FAILURE; diff --git a/LEGO1/lego/sources/misc/legostorage.h b/LEGO1/lego/sources/misc/legostorage.h index 5bd6ea67..97dcc538 100644 --- a/LEGO1/lego/sources/misc/legostorage.h +++ b/LEGO1/lego/sources/misc/legostorage.h @@ -44,10 +44,10 @@ protected: class LegoMemory : public LegoStorage { public: LegoMemory(void* p_buffer); - virtual LegoResult Read(void* p_buffer, LegoU32 p_size); - virtual LegoResult Write(const void* p_buffer, LegoU32 p_size); - virtual LegoResult GetPosition(LegoU32& p_position); - virtual LegoResult SetPosition(LegoU32 p_position); + LegoResult Read(void* p_buffer, LegoU32 p_size) override; + LegoResult Write(const void* p_buffer, LegoU32 p_size) override; + LegoResult GetPosition(LegoU32& p_position) override; + LegoResult SetPosition(LegoU32 p_position) override; // SYNTHETIC: LEGO1 0x10045a80 // LegoMemory::~LegoMemory @@ -65,11 +65,11 @@ protected: class LegoFile : public LegoStorage { public: LegoFile(); - virtual ~LegoFile() override; - virtual LegoResult Read(void* p_buffer, LegoU32 p_size); - virtual LegoResult Write(const void* p_buffer, LegoU32 p_size); - virtual LegoResult GetPosition(LegoU32& p_position); - virtual LegoResult SetPosition(LegoU32 p_position); + ~LegoFile() override; + LegoResult Read(void* p_buffer, LegoU32 p_size) override; + LegoResult Write(const void* p_buffer, LegoU32 p_size) override; + LegoResult GetPosition(LegoU32& p_position) override; + LegoResult SetPosition(LegoU32 p_position) override; LegoResult Open(const char* p_name, LegoU32 p_mode); // FUNCTION: LEGO1 0x10006030 diff --git a/LEGO1/lego/sources/roi/legoroi.cpp b/LEGO1/lego/sources/roi/legoroi.cpp index 8dab4657..e54696a8 100644 --- a/LEGO1/lego/sources/roi/legoroi.cpp +++ b/LEGO1/lego/sources/roi/legoroi.cpp @@ -75,13 +75,15 @@ unsigned char LegoROI::CallTheHandlerFunction( ) { // TODO - if (p_param == NULL) + if (p_param == NULL) { return FALSE; + } if (g_someHandlerFunction) { char buf[32]; - if (g_someHandlerFunction(p_param, buf, 32)) + if (g_someHandlerFunction(p_param, buf, 32)) { p_param = buf; + } } return ColorAliasLookup(p_param, p_red, p_green, p_blue, p_other); diff --git a/LEGO1/lego/sources/roi/legoroi.h b/LEGO1/lego/sources/roi/legoroi.h index a750b949..cfaa21c0 100644 --- a/LEGO1/lego/sources/roi/legoroi.h +++ b/LEGO1/lego/sources/roi/legoroi.h @@ -19,9 +19,9 @@ class LegoROI : public ViewROI { public: LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, int p_time); - virtual float IntrinsicImportance() const override; // vtable+0x04 + float IntrinsicImportance() const override; // vtable+0x04 // Note: Actually part of parent class (doesn't exist yet) - virtual void UpdateWorldBoundingVolumes() override; // vtable+0x18 + void UpdateWorldBoundingVolumes() override; // vtable+0x18 void SetDisplayBB(int p_displayBB); static void configureLegoROI(int p_roi); diff --git a/LEGO1/mxdirectx/mxdirect3d.cpp b/LEGO1/mxdirectx/mxdirect3d.cpp index b2166ca1..a224158b 100644 --- a/LEGO1/mxdirectx/mxdirect3d.cpp +++ b/LEGO1/mxdirectx/mxdirect3d.cpp @@ -50,11 +50,13 @@ BOOL MxDirect3D::Create( paletteEntryCount ); - if (ret && CreateIDirect3D() && D3DSetMode()) + if (ret && CreateIDirect3D() && D3DSetMode()) { success = TRUE; + } - if (!success) + if (!success) { FUN_1009d920(); + } return success; } @@ -77,8 +79,9 @@ void MxDirect3D::Destroy() this->m_assignedDevice = NULL; } - if (m_pCurrentDeviceModesList) + if (m_pCurrentDeviceModesList) { m_pCurrentDeviceModesList = NULL; + } MxDirectDraw::Destroy(); } @@ -119,24 +122,30 @@ BOOL MxDirect3D::D3DSetMode() return FALSE; } - if (m_assignedDevice->m_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE) + if (m_assignedDevice->m_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE) { m_unk0x88c = FALSE; - else + } + else { m_unk0x88c = TRUE; + } DWORD bitDepth = GetZBufferBitDepth(m_assignedDevice); - if (!CreateZBuffer(DDSCAPS_VIDEOMEMORY, bitDepth)) + if (!CreateZBuffer(DDSCAPS_VIDEOMEMORY, bitDepth)) { return FALSE; + } } else { - if (m_assignedDevice->m_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE) + if (m_assignedDevice->m_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_PERSPECTIVE) { m_unk0x88c = FALSE; - else + } + else { m_unk0x88c = TRUE; + } DWORD bitDepth = GetZBufferBitDepth(m_assignedDevice); - if (!CreateZBuffer(DDSCAPS_SYSTEMMEMORY, bitDepth)) + if (!CreateZBuffer(DDSCAPS_SYSTEMMEMORY, bitDepth)) { return FALSE; + } } HRESULT result = m_pDirect3d->CreateDevice(m_assignedDevice->m_guid, m_pBackBuffer, &m_pDirect3dDevice); @@ -201,19 +210,25 @@ DWORD MxDirect3D::GetZBufferBitDepth(MxAssignedDevice* p_assignedDevice) { DWORD bitDepth; - if (p_assignedDevice->m_desc.dwFlags & D3DDD_DEVICEZBUFFERBITDEPTH) + if (p_assignedDevice->m_desc.dwFlags & D3DDD_DEVICEZBUFFERBITDEPTH) { bitDepth = p_assignedDevice->m_desc.dwDeviceZBufferBitDepth; - else + } + else { bitDepth = 0; + } - if (bitDepth & DDBD_32) + if (bitDepth & DDBD_32) { return 32; - if (bitDepth & DDBD_24) + } + if (bitDepth & DDBD_24) { return 24; - if (bitDepth & DDBD_16) + } + if (bitDepth & DDBD_16) { return 16; - if (bitDepth & DDBD_8) + } + if (bitDepth & DDBD_8) { return 8; + } return -1; } @@ -264,13 +279,15 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri sizeof(assignedDevice->m_deviceInfo->m_ddcaps) ); - if (i == 0) + if (i == 0) { assignedDevice->m_flags |= MxAssignedDevice::c_primaryDevice; + } for (list::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) { MxDevice& device = *it2; - if (&device != p_device) + if (&device != p_device) { continue; + } memcpy(&assignedDevice->m_guid, device.m_guid, sizeof(assignedDevice->m_guid)); @@ -279,8 +296,9 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_dri assignedDevice->m_flags |= MxAssignedDevice::c_hardwareMode; desc = &device.m_HWDesc; } - else + else { desc = &device.m_HELDesc; + } memcpy(&assignedDevice->m_desc, desc, sizeof(assignedDevice->m_desc)); m_assignedDevice = assignedDevice; @@ -329,12 +347,15 @@ MxDriver::MxDriver(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName) // FUNCTION: LEGO1 0x1009bb80 MxDriver::~MxDriver() { - if (m_guid) + if (m_guid) { delete m_guid; - if (m_driverDesc) + } + if (m_driverDesc) { delete[] m_driverDesc; - if (m_driverName) + } + if (m_driverName) { delete[] m_driverName; + } } // FUNCTION: LEGO1 0x1009bc30 @@ -383,12 +404,15 @@ MxDevice::MxDevice( // FUNCTION: LEGO1 0x1009bd60 MxDevice::~MxDevice() { - if (m_guid) + if (m_guid) { delete m_guid; - if (m_deviceDesc) + } + if (m_deviceDesc) { delete[] m_deviceDesc; - if (m_deviceName) + } + if (m_deviceName) { delete[] m_deviceName; + } } // FUNCTION: LEGO1 0x1009bda0 @@ -425,11 +449,13 @@ void MxDevice::Init( strcpy(m_deviceName, p_deviceName); } - if (p_HWDesc) + if (p_HWDesc) { memcpy(&m_HWDesc, p_HWDesc, sizeof(m_HWDesc)); + } - if (p_HELDesc) + if (p_HELDesc) { memcpy(&m_HELDesc, p_HELDesc, sizeof(m_HELDesc)); + } } // FUNCTION: LEGO1 0x1009bec0 @@ -456,25 +482,29 @@ BOOL MxDeviceEnumerate::EnumDirectDrawCallback(LPGUID p_guid, LPSTR p_driverDesc MxDriver& newDevice = m_list.back(); HRESULT result = DirectDrawCreate(newDevice.m_guid, &lpDD, NULL); - if (result != DD_OK) + if (result != DD_OK) { BuildErrorString("DirectDraw Create failed: %s\n", EnumerateErrorToString(result)); + } else { lpDD->EnumDisplayModes(0, NULL, this, DisplayModesEnumerateCallback); newDevice.m_ddCaps.dwSize = sizeof(newDevice.m_ddCaps); result = lpDD->GetCaps(&newDevice.m_ddCaps, NULL); - if (result != DD_OK) + if (result != DD_OK) { BuildErrorString("GetCaps failed: %s\n", EnumerateErrorToString(result)); + } else { result = lpDD->QueryInterface(IID_IDirect3D2, (LPVOID*) &lpDirect3d2); - if (result != DD_OK) + if (result != DD_OK) { BuildErrorString("D3D creation failed: %s\n", EnumerateErrorToString(result)); + } else { result = lpDirect3d2->EnumDevices(DevicesEnumerateCallback, this); - if (result != DD_OK) + if (result != DD_OK) { BuildErrorString("D3D enum devices failed: %s\n", EnumerateErrorToString(result)); + } else { if (newDevice.m_devices.empty()) { m_list.pop_back(); @@ -484,11 +514,13 @@ BOOL MxDeviceEnumerate::EnumDirectDrawCallback(LPGUID p_guid, LPSTR p_driverDesc } } - if (lpDirect3d2) + if (lpDirect3d2) { lpDirect3d2->Release(); + } - if (lpDD) + if (lpDD) { lpDD->Release(); + } return DDENUMRET_OK; } @@ -557,8 +589,9 @@ HRESULT MxDeviceEnumerate::EnumDevicesCallback( // FUNCTION: LEGO1 0x1009c6c0 int MxDeviceEnumerate::DoEnumerate() { - if (m_initialized) + if (m_initialized) { return -1; + } HRESULT ret = DirectDrawEnumerate(DirectDrawEnumerateCallback, this); if (ret != DD_OK) { @@ -590,33 +623,38 @@ const char* MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error) // FUNCTION: LEGO1 0x1009ce60 int MxDeviceEnumerate::ParseDeviceName(const char* p_deviceId) { - if (!m_initialized) + if (!m_initialized) { return -1; + } int num = -1; int hex[4]; - if (sscanf(p_deviceId, "%d 0x%x 0x%x 0x%x 0x%x", &num, &hex[0], &hex[1], &hex[2], &hex[3]) != 5) + if (sscanf(p_deviceId, "%d 0x%x 0x%x 0x%x 0x%x", &num, &hex[0], &hex[1], &hex[2], &hex[3]) != 5) { return -1; + } - if (num < 0) + if (num < 0) { return -1; + } GUID guid; memcpy(&guid, hex, sizeof(guid)); int result = ProcessDeviceBytes(num, guid); - if (result < 0) + if (result < 0) { return ProcessDeviceBytes(-1, guid); + } return result; } // FUNCTION: LEGO1 0x1009cf20 int MxDeviceEnumerate::ProcessDeviceBytes(int p_deviceNum, GUID& p_guid) { - if (!m_initialized) + if (!m_initialized) { return -1; + } int i = 0; int j = 0; @@ -634,8 +672,9 @@ int MxDeviceEnumerate::ProcessDeviceBytes(int p_deviceNum, GUID& p_guid) memcpy(&deviceGuid, &p_guid, sizeof(GUID4)); for (list::iterator it = m_list.begin(); it != m_list.end(); it++) { - if (p_deviceNum >= 0 && p_deviceNum < i) + if (p_deviceNum >= 0 && p_deviceNum < i) { return -1; + } GUID4 compareGuid; MxDriver& driver = *it; @@ -644,8 +683,9 @@ int MxDeviceEnumerate::ProcessDeviceBytes(int p_deviceNum, GUID& p_guid) if (compareGuid.m_data1 == deviceGuid.m_data1 && compareGuid.m_data2 == deviceGuid.m_data2 && compareGuid.m_data3 == deviceGuid.m_data3 && compareGuid.m_data4 == deviceGuid.m_data4 && - i == p_deviceNum) + i == p_deviceNum) { return j; + } j++; } @@ -683,11 +723,13 @@ int MxDeviceEnumerate::GetDevice(int p_deviceNum, MxDriver*& p_driver, MxDevice* // FUNCTION: LEGO1 0x1009d0d0 int MxDeviceEnumerate::FUN_1009d0d0() { - if (!m_initialized) + if (!m_initialized) { return -1; + } - if (m_list.empty()) + if (m_list.empty()) { return -1; + } int i = 0; int j = 0; @@ -695,16 +737,19 @@ int MxDeviceEnumerate::FUN_1009d0d0() unsigned int und = FUN_1009d1a0(); for (list::iterator it = m_list.begin();; it++) { - if (it == m_list.end()) + if (it == m_list.end()) { return k; + } for (list::iterator it2 = (*it).m_devices.begin(); it2 != (*it).m_devices.end(); it2++) { - if ((*it2).m_HWDesc.dcmColorModel) + if ((*it2).m_HWDesc.dcmColorModel) { return j; + } if ((und && (*it2).m_HELDesc.dcmColorModel == D3DCOLOR_RGB && i == 0) || - (*it2).m_HELDesc.dcmColorModel == D3DCOLOR_MONO && i == 0 && k < 0) + ((*it2).m_HELDesc.dcmColorModel == D3DCOLOR_MONO && i == 0 && k < 0)) { k = j; + } j++; } @@ -730,28 +775,34 @@ undefined4 MxDeviceEnumerate::FUN_1009d1e0() // FUNCTION: LEGO1 0x1009d210 int MxDeviceEnumerate::FUN_1009d210() { - if (!m_initialized) + if (!m_initialized) { return -1; + } for (list::iterator it = m_list.begin(); it != m_list.end();) { MxDriver& driver = *it; - if (!FUN_1009d370(driver)) + if (!FUN_1009d370(driver)) { m_list.erase(it++); + } else { for (list::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end();) { MxDevice& device = *it2; - if (!FUN_1009d3d0(device)) + if (!FUN_1009d3d0(device)) { driver.m_devices.erase(it2++); - else + } + else { it2++; + } } - if (driver.m_devices.empty()) + if (driver.m_devices.empty()) { m_list.erase(it++); - else + } + else { it++; + } } } @@ -764,8 +815,9 @@ unsigned char MxDeviceEnumerate::FUN_1009d370(MxDriver& p_driver) for (list::iterator it = p_driver.m_displayModes.begin(); it != p_driver.m_displayModes.end(); it++) { if ((*it).m_width == 640 && (*it).m_height == 480) { - if ((*it).m_bitsPerPixel == 8 || (*it).m_bitsPerPixel == 16) + if ((*it).m_bitsPerPixel == 8 || (*it).m_bitsPerPixel == 16) { return TRUE; + } } } @@ -775,15 +827,18 @@ unsigned char MxDeviceEnumerate::FUN_1009d370(MxDriver& p_driver) // FUNCTION: LEGO1 0x1009d3d0 unsigned char MxDeviceEnumerate::FUN_1009d3d0(MxDevice& p_device) { - if (m_list.size() <= 0) + if (m_list.size() <= 0) { return FALSE; + } - if (p_device.m_HWDesc.dcmColorModel) + if (p_device.m_HWDesc.dcmColorModel) { return p_device.m_HWDesc.dwDeviceZBufferBitDepth & DDBD_16 && p_device.m_HWDesc.dpcTriCaps.dwTextureCaps & 1; + } for (list::iterator it = m_list.front().m_devices.begin(); it != m_list.front().m_devices.end(); it++) { - if ((&*it) == &p_device) + if ((&*it) == &p_device) { return TRUE; + } } return FALSE; diff --git a/LEGO1/mxdirectx/mxdirect3d.h b/LEGO1/mxdirectx/mxdirect3d.h index 4de9f058..6ebf46f9 100644 --- a/LEGO1/mxdirectx/mxdirect3d.h +++ b/LEGO1/mxdirectx/mxdirect3d.h @@ -41,9 +41,9 @@ struct MxDevice; class MxDirect3D : public MxDirectDraw { public: MxDirect3D(); - virtual ~MxDirect3D(); + ~MxDirect3D() override; - virtual BOOL Create( + BOOL Create( HWND hWnd, BOOL fullscreen_1, BOOL surface_fullscreen, @@ -53,9 +53,9 @@ public: int bpp, const PALETTEENTRY* pPaletteEntries, int paletteEntryCount - ) override; // vtable+0x04 - virtual void Destroy() override; // vtable+0x08 - virtual void DestroyButNotDirectDraw() override; // vtable+0x0c + ) override; // vtable+0x04 + void Destroy() override; // vtable+0x08 + void DestroyButNotDirectDraw() override; // vtable+0x0c BOOL CreateIDirect3D(); BOOL D3DSetMode(); diff --git a/LEGO1/mxdirectx/mxdirectdraw.cpp b/LEGO1/mxdirectx/mxdirectdraw.cpp index 7e78cf69..7b64afe3 100644 --- a/LEGO1/mxdirectx/mxdirectdraw.cpp +++ b/LEGO1/mxdirectx/mxdirectdraw.cpp @@ -510,8 +510,9 @@ BOOL MxDirectDraw::DDCreateSurfaces() ddsd.dwWidth = m_currentMode.width; ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; - if (m_bOnlySystemMemory) + if (m_bOnlySystemMemory) { ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY; + } result = CreateDDSurface(&ddsd, &m_pBackBuffer, NULL); if (result != DD_OK) { Error("CreateSurface for window back buffer failed", result); @@ -666,8 +667,9 @@ BOOL MxDirectDraw::CreateTextSurfaces() ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - if (m_bOnlySystemMemory) + if (m_bOnlySystemMemory) { ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; + } ddsd.dwHeight = m_text1SizeOnSurface.cy; ddsd.dwWidth = m_text1SizeOnSurface.cx; @@ -687,8 +689,9 @@ BOOL MxDirectDraw::CreateTextSurfaces() ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - if (m_bOnlySystemMemory) + if (m_bOnlySystemMemory) { ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; + } ddsd.dwHeight = m_text2SizeOnSurface.cy; ddsd.dwWidth = m_text2SizeOnSurface.cx; diff --git a/LEGO1/mxgeometry/mxgeometry3d.h b/LEGO1/mxgeometry/mxgeometry3d.h index d96d302a..837a5b3a 100644 --- a/LEGO1/mxgeometry/mxgeometry3d.h +++ b/LEGO1/mxgeometry/mxgeometry3d.h @@ -28,8 +28,9 @@ public: float* dest = m_elements; const float* src = p_other.m_elements; - for (size_t i = sizeof(m_elements) / sizeof(float); i > 0; --i) + for (size_t i = sizeof(m_elements) / sizeof(float); i > 0; --i) { *dest++ = *src++; + } } inline void EqualsCross(Mx3DPointFloat& p_a, Mx3DPointFloat& p_b) { EqualsCrossImpl(p_a.m_data, p_b.m_data); } diff --git a/LEGO1/mxgeometry/mxmatrix.h b/LEGO1/mxgeometry/mxmatrix.h index 3ae03404..81cdaa2c 100644 --- a/LEGO1/mxgeometry/mxmatrix.h +++ b/LEGO1/mxgeometry/mxmatrix.h @@ -11,7 +11,7 @@ public: inline MxMatrix(const MxMatrix& p_matrix) : Matrix4(m_elements) { Equals(p_matrix); } // FUNCTION: LEGO1 0x10002850 - virtual void operator=(const Matrix4& p_matrix) { Equals(p_matrix); } // vtable+0x28 + void operator=(const Matrix4& p_matrix) override { Equals(p_matrix); } // vtable+0x28 // No idea why there's another equals. Maybe to some other type like the // DirectX Retained Mode Matrix type which is also a float* alias? diff --git a/LEGO1/omni/include/mxactionnotificationparam.h b/LEGO1/omni/include/mxactionnotificationparam.h index f53ac728..96c44a93 100644 --- a/LEGO1/omni/include/mxactionnotificationparam.h +++ b/LEGO1/omni/include/mxactionnotificationparam.h @@ -21,8 +21,9 @@ public: MxDSAction* oldAction = p_action; this->m_realloc = p_reallocAction; - if (p_reallocAction) + if (p_reallocAction) { this->m_action = new MxDSAction(); + } else { this->m_action = oldAction; return; @@ -34,17 +35,19 @@ public: } // FUNCTION: LEGO1 0x10051050 - inline virtual ~MxActionNotificationParam() override + inline ~MxActionNotificationParam() override { - if (!this->m_realloc) + if (!this->m_realloc) { return; + } - if (this->m_action) + if (this->m_action) { delete this->m_action; + } } // FUNCTION: LEGO1 0x100510c0 - virtual MxNotificationParam* Clone() override + MxNotificationParam* Clone() override { return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc); } // vtable+0x04 @@ -70,7 +73,7 @@ public: { } - virtual MxNotificationParam* Clone() override; // vtable+0x04 + MxNotificationParam* Clone() override; // vtable+0x04 }; // VTABLE: LEGO1 0x100d8358 @@ -88,7 +91,7 @@ public: } // FUNCTION: LEGO1 0x10051270 - virtual MxNotificationParam* Clone() override + MxNotificationParam* Clone() override { return new MxEndActionNotificationParam( c_notificationEndAction, @@ -109,7 +112,7 @@ public: m_unk0x14 = p_unk0x14; } - virtual MxNotificationParam* Clone() override; // vtable+0x04 + MxNotificationParam* Clone() override; // vtable+0x04 private: MxPresenter* m_unk0x14; // 0x14 diff --git a/LEGO1/omni/include/mxaudiomanager.h b/LEGO1/omni/include/mxaudiomanager.h index d2b97d1a..020bda54 100644 --- a/LEGO1/omni/include/mxaudiomanager.h +++ b/LEGO1/omni/include/mxaudiomanager.h @@ -9,10 +9,10 @@ class MxAudioManager : public MxMediaManager { public: MxAudioManager(); - virtual ~MxAudioManager() override; + ~MxAudioManager() override; - virtual MxResult InitPresenters() override; // vtable+14 - virtual void Destroy() override; // vtable+18 + MxResult InitPresenters() override; // vtable+14 + void Destroy() override; // vtable+18 // FUNCTION: LEGO1 0x10029910 virtual MxS32 GetVolume() { return this->m_volume; } // vtable+28 diff --git a/LEGO1/omni/include/mxaudiopresenter.h b/LEGO1/omni/include/mxaudiopresenter.h index bf127d2b..873871ec 100644 --- a/LEGO1/omni/include/mxaudiopresenter.h +++ b/LEGO1/omni/include/mxaudiopresenter.h @@ -11,14 +11,14 @@ public: MxAudioPresenter() { m_volume = 100; } // FUNCTION: LEGO1 0x1000d280 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f078c return "MxAudioPresenter"; } // FUNCTION: LEGO1 0x1000d290 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } diff --git a/LEGO1/omni/include/mxbitmap.h b/LEGO1/omni/include/mxbitmap.h index 7045c01e..465b2026 100644 --- a/LEGO1/omni/include/mxbitmap.h +++ b/LEGO1/omni/include/mxbitmap.h @@ -35,7 +35,7 @@ struct MxBITMAPINFO { class MxBitmap : public MxCore { public: MxBitmap(); - virtual ~MxBitmap(); // vtable+00 + ~MxBitmap() override; // vtable+00 virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+14 virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+18 @@ -102,30 +102,37 @@ public: } inline MxLong GetAdjustedStride() { - if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) + if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) { return GetBmiStride(); - else + } + else { return -GetBmiStride(); + } } inline MxLong GetLine(MxS32 p_top) { MxS32 height; - if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) + if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) { height = p_top; - else + } + else { height = GetBmiHeightAbs() - p_top - 1; + } return GetBmiStride() * height; } inline MxU8* GetStart(MxS32 p_left, MxS32 p_top) { - if (m_bmiHeader->biCompression == BI_RGB) + if (m_bmiHeader->biCompression == BI_RGB) { return GetLine(p_top) + m_data + p_left; - else if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN) + } + else if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN) { return m_data; - else + } + else { return GetLine(0) + m_data; + } } // SYNTHETIC: LEGO1 0x100bc9f0 diff --git a/LEGO1/omni/include/mxcollection.h b/LEGO1/omni/include/mxcollection.h index 58647ed4..84acdeef 100644 --- a/LEGO1/omni/include/mxcollection.h +++ b/LEGO1/omni/include/mxcollection.h @@ -16,7 +16,7 @@ public: void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; } - virtual ~MxCollection() {} + ~MxCollection() override {} virtual MxS8 Compare(T, T) { return 0; } protected: diff --git a/LEGO1/omni/include/mxcompositepresenter.h b/LEGO1/omni/include/mxcompositepresenter.h index 122778d6..a39507c0 100644 --- a/LEGO1/omni/include/mxcompositepresenter.h +++ b/LEGO1/omni/include/mxcompositepresenter.h @@ -12,37 +12,38 @@ class MxCompositePresenterList : public list {}; class MxCompositePresenter : public MxPresenter { public: MxCompositePresenter(); - virtual ~MxCompositePresenter() override; // vtable+0x00 + ~MxCompositePresenter() override; // vtable+0x00 - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x100b6210 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0774 return "MxCompositePresenter"; } // FUNCTION: LEGO1 0x100b6220 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(p_name); } - virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c - virtual void EndAction() override; // vtable+0x40 - virtual void SetTickleState(TickleState p_tickleState) override; // vtable+0x44 - virtual MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48 - virtual void Enable(MxBool p_enable) override; // vtable+0x54 - virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58 - virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c - virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60 + MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c + void EndAction() override; // vtable+0x40 + void SetTickleState(TickleState p_tickleState) override; // vtable+0x44 + MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48 + void Enable(MxBool p_enable) override; // vtable+0x54 + virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58 + virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c + virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60 // FUNCTION: LEGO1 0x1000caf0 virtual MxBool VTable0x64(undefined4 p_undefined) { - if (m_compositePresenter) + if (m_compositePresenter) { return m_compositePresenter->VTable0x64(p_undefined); + } return TRUE; } // vtable+0x64 diff --git a/LEGO1/omni/include/mxdiskstreamcontroller.h b/LEGO1/omni/include/mxdiskstreamcontroller.h index c571882a..ab13c73d 100644 --- a/LEGO1/omni/include/mxdiskstreamcontroller.h +++ b/LEGO1/omni/include/mxdiskstreamcontroller.h @@ -15,30 +15,30 @@ class MxDiskStreamController : public MxStreamController { public: MxDiskStreamController(); - virtual ~MxDiskStreamController() override; + ~MxDiskStreamController() override; - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x100c7360 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102144 return "MxDiskStreamController"; } // FUNCTION: LEGO1 0x100c7370 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDiskStreamController::ClassName()) || MxStreamController::IsA(p_name); } - virtual MxResult Open(const char* p_filename) override; // vtable+0x14 - virtual MxResult VTable0x18(undefined4, undefined4) override; // vtable+0x18 - virtual MxResult VTable0x20(MxDSAction* p_action) override; // vtable+0x20 - virtual MxResult VTable0x24(MxDSAction* p_action) override; // vtable+0x24 - virtual MxDSStreamingAction* VTable0x28() override; // vtable+0x28 - virtual MxResult VTable0x30(MxDSAction* p_action) override; // vtable+0x30 - virtual MxResult VTable0x34(undefined4); // vtable+0x34 + MxResult Open(const char* p_filename) override; // vtable+0x14 + MxResult VTable0x18(undefined4, undefined4) override; // vtable+0x18 + MxResult VTable0x20(MxDSAction* p_action) override; // vtable+0x20 + MxResult VTable0x24(MxDSAction* p_action) override; // vtable+0x24 + MxDSStreamingAction* VTable0x28() override; // vtable+0x28 + MxResult VTable0x30(MxDSAction* p_action) override; // vtable+0x30 + virtual MxResult VTable0x34(undefined4); // vtable+0x34 inline MxBool GetUnk0xc4() const { return m_unk0xc4; } diff --git a/LEGO1/omni/include/mxdiskstreamprovider.h b/LEGO1/omni/include/mxdiskstreamprovider.h index 517fa463..7bac3a0b 100644 --- a/LEGO1/omni/include/mxdiskstreamprovider.h +++ b/LEGO1/omni/include/mxdiskstreamprovider.h @@ -27,17 +27,17 @@ public: class MxDiskStreamProvider : public MxStreamProvider { public: MxDiskStreamProvider(); - virtual ~MxDiskStreamProvider() override; + ~MxDiskStreamProvider() override; // FUNCTION: LEGO1 0x100d1160 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x1010287c return "MxDiskStreamProvider"; } // FUNCTION: LEGO1 0x100d1170 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDiskStreamProvider::ClassName()) || MxStreamProvider::IsA(p_name); } @@ -48,12 +48,12 @@ public: static MxBool FUN_100d1af0(MxDSStreamingAction* p_action); MxResult FUN_100d1b20(MxDSStreamingAction* p_action); - virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14 - virtual MxU32 GetFileSize() override; // vtable+0x18 - virtual MxS32 GetStreamBuffersNum() override; // vtable+0x1c - virtual void VTable0x20(MxDSAction* p_action) override; // vtable+0x20 - virtual MxU32 GetLengthInDWords() override; // vtable+0x24 - virtual MxU32* GetBufferForDWords() override; // vtable+0x28 + MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14 + MxU32 GetFileSize() override; // vtable+0x18 + MxS32 GetStreamBuffersNum() override; // vtable+0x1c + void VTable0x20(MxDSAction* p_action) override; // vtable+0x20 + MxU32 GetLengthInDWords() override; // vtable+0x24 + MxU32* GetBufferForDWords() override; // vtable+0x28 private: MxDiskStreamProviderThread m_thread; // 0x10 diff --git a/LEGO1/omni/include/mxdisplaysurface.h b/LEGO1/omni/include/mxdisplaysurface.h index 69706126..4e107f60 100644 --- a/LEGO1/omni/include/mxdisplaysurface.h +++ b/LEGO1/omni/include/mxdisplaysurface.h @@ -14,7 +14,7 @@ class MxDisplaySurface : public MxCore { public: MxDisplaySurface(); - virtual ~MxDisplaySurface() override; + ~MxDisplaySurface() override; virtual MxResult Init( MxVideoParam& p_videoParam, diff --git a/LEGO1/omni/include/mxdsaction.h b/LEGO1/omni/include/mxdsaction.h index 75b3cc2c..0146ba04 100644 --- a/LEGO1/omni/include/mxdsaction.h +++ b/LEGO1/omni/include/mxdsaction.h @@ -25,35 +25,35 @@ public: }; MxDSAction(); - virtual ~MxDSAction(); + ~MxDSAction() override; void CopyFrom(MxDSAction& p_dsAction); MxDSAction& operator=(MxDSAction& p_dsAction); // FUNCTION: LEGO1 0x100ad980 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101013f4 return "MxDSAction"; } // FUNCTION: LEGO1 0x100ad990 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSAction::ClassName()) || MxDSObject::IsA(p_name); } - virtual undefined4 VTable0x14() override; // vtable+14; - virtual MxU32 GetSizeOnDisk() override; // vtable+18; - virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; - virtual MxLong GetDuration(); // vtable+24; - virtual void SetDuration(MxLong p_duration); // vtable+28; - virtual MxDSAction* Clone(); // vtable+2c; - virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+30; - virtual MxBool HasId(MxU32 p_objectId); // vtable+34; - virtual void SetUnknown90(MxLong p_unk0x90); // vtable+38; - virtual MxLong GetUnknown90(); // vtable+3c; - virtual MxLong GetElapsedTime(); // vtable+40; + undefined4 VTable0x14() override; // vtable+14; + MxU32 GetSizeOnDisk() override; // vtable+18; + void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; + virtual MxLong GetDuration(); // vtable+24; + virtual void SetDuration(MxLong p_duration); // vtable+28; + virtual MxDSAction* Clone(); // vtable+2c; + virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+30; + virtual MxBool HasId(MxU32 p_objectId); // vtable+34; + virtual void SetUnknown90(MxLong p_unk0x90); // vtable+38; + virtual MxLong GetUnknown90(); // vtable+3c; + virtual MxLong GetElapsedTime(); // vtable+40; void AppendData(MxU16 p_extraLength, const char* p_extraData); @@ -77,10 +77,12 @@ public: inline void CopyFlags(MxU32 p_flags) { - if (p_flags & MxDSAction::c_looping) + if (p_flags & MxDSAction::c_looping) { SetFlags(GetFlags() | MxDSAction::c_looping); - else if (p_flags & MxDSAction::c_bit3) + } + else if (p_flags & MxDSAction::c_bit3) { SetFlags(GetFlags() | MxDSAction::c_bit3); + } } // SYNTHETIC: LEGO1 0x100ada60 diff --git a/LEGO1/omni/include/mxdsactionlist.h b/LEGO1/omni/include/mxdsactionlist.h index 75d96842..b413cd2b 100644 --- a/LEGO1/omni/include/mxdsactionlist.h +++ b/LEGO1/omni/include/mxdsactionlist.h @@ -19,7 +19,7 @@ public: MxDSActionList() { this->m_unk0x18 = 0; } // FUNCTION: LEGO1 0x100c9c90 - virtual MxS8 Compare(MxDSAction* p_a, MxDSAction* p_b) override + MxS8 Compare(MxDSAction* p_a, MxDSAction* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/omni/include/mxdsanim.h b/LEGO1/omni/include/mxdsanim.h index 0e5b9a0c..09f9c72c 100644 --- a/LEGO1/omni/include/mxdsanim.h +++ b/LEGO1/omni/include/mxdsanim.h @@ -8,25 +8,25 @@ class MxDSAnim : public MxDSMediaAction { public: MxDSAnim(); - virtual ~MxDSAnim() override; + ~MxDSAnim() override; void CopyFrom(MxDSAnim& p_dsAnim); MxDSAnim& operator=(MxDSAnim& p_dsAnim); // FUNCTION: LEGO1 0x100c9060 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025d8 return "MxDSAnim"; } // FUNCTION: LEGO1 0x100c9070 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(p_name); } - virtual MxDSAction* Clone() override; // vtable+2c; + MxDSAction* Clone() override; // vtable+2c; // SYNTHETIC: LEGO1 0x100c9180 // MxDSAnim::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxdsbuffer.h b/LEGO1/omni/include/mxdsbuffer.h index 01696471..79dee7d7 100644 --- a/LEGO1/omni/include/mxdsbuffer.h +++ b/LEGO1/omni/include/mxdsbuffer.h @@ -22,10 +22,10 @@ public: }; MxDSBuffer(); - virtual ~MxDSBuffer() override; + ~MxDSBuffer() override; // FUNCTION: LEGO1 0x100c6500 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025b8 return "MxDSBuffer"; diff --git a/LEGO1/omni/include/mxdschunk.h b/LEGO1/omni/include/mxdschunk.h index 1933df93..c21816e6 100644 --- a/LEGO1/omni/include/mxdschunk.h +++ b/LEGO1/omni/include/mxdschunk.h @@ -18,17 +18,17 @@ public: }; MxDSChunk(); - virtual ~MxDSChunk() override; + ~MxDSChunk() override; // FUNCTION: LEGO1 0x100be0c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e6c return "MxDSChunk"; } // FUNCTION: LEGO1 0x100be0d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSChunk::ClassName()) || MxCore::IsA(p_name); } @@ -53,8 +53,9 @@ public: inline void Release() { - if (m_data) + if (m_data) { delete[] m_data; + } } // SYNTHETIC: LEGO1 0x100be150 diff --git a/LEGO1/omni/include/mxdsevent.h b/LEGO1/omni/include/mxdsevent.h index 1a197496..492cfd10 100644 --- a/LEGO1/omni/include/mxdsevent.h +++ b/LEGO1/omni/include/mxdsevent.h @@ -7,25 +7,25 @@ class MxDSEvent : public MxDSMediaAction { public: MxDSEvent(); - virtual ~MxDSEvent() override; + ~MxDSEvent() override; void CopyFrom(MxDSEvent& p_dsEvent); MxDSEvent& operator=(MxDSEvent& p_dsEvent); // FUNCTION: LEGO1 0x100c9660 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025f0 return "MxDSEvent"; } // FUNCTION: LEGO1 0x100c9670 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(p_name); } - virtual MxDSAction* Clone() override; // vtable+2c; + MxDSAction* Clone() override; // vtable+2c; // SYNTHETIC: LEGO1 0x100c9780 // MxDSEvent::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxdsfile.h b/LEGO1/omni/include/mxdsfile.h index 4242fe0d..d1c93771 100644 --- a/LEGO1/omni/include/mxdsfile.h +++ b/LEGO1/omni/include/mxdsfile.h @@ -12,27 +12,27 @@ class MxDSFile : public MxDSSource { public: MxDSFile(const char* p_filename, MxULong p_skipReadingChunks); - virtual ~MxDSFile(); // vtable+0x00 + ~MxDSFile() override; // vtable+0x00 // FUNCTION: LEGO1 0x100c0120 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102594 return "MxDSFile"; } // FUNCTION: LEGO1 0x100c0130 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSFile::ClassName()) || MxDSSource::IsA(p_name); } - virtual MxLong Open(MxULong); // vtable+0x14 - virtual MxLong Close(); // vtable+0x18 - virtual MxResult Read(unsigned char*, MxULong); // vtable+0x20 - virtual MxLong Seek(MxLong, int); // vtable+0x24 - virtual MxULong GetBufferSize(); // vtable+0x28 - virtual MxULong GetStreamBuffersNum(); // vtable+0x2c + MxLong Open(MxULong) override; // vtable+0x14 + MxLong Close() override; // vtable+0x18 + MxResult Read(unsigned char*, MxULong) override; // vtable+0x20 + MxLong Seek(MxLong, int) override; // vtable+0x24 + MxULong GetBufferSize() override; // vtable+0x28 + MxULong GetStreamBuffersNum() override; // vtable+0x2c inline void SetFileName(const char* p_filename) { m_filename = p_filename; } diff --git a/LEGO1/omni/include/mxdsmediaaction.h b/LEGO1/omni/include/mxdsmediaaction.h index 7422ec2d..32664156 100644 --- a/LEGO1/omni/include/mxdsmediaaction.h +++ b/LEGO1/omni/include/mxdsmediaaction.h @@ -10,20 +10,20 @@ class MxDSMediaAction : public MxDSAction { public: MxDSMediaAction(); - virtual ~MxDSMediaAction() override; + ~MxDSMediaAction() override; void CopyFrom(MxDSMediaAction& p_dsMediaAction); MxDSMediaAction& operator=(MxDSMediaAction& p_dsMediaAction); // FUNCTION: LEGO1 0x100c8be0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f7624 return "MxDSMediaAction"; } // FUNCTION: LEGO1 0x100c8bf0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(p_name); } @@ -31,10 +31,10 @@ public: // SYNTHETIC: LEGO1 0x100c8cd0 // MxDSMediaAction::`scalar deleting destructor' - virtual undefined4 VTable0x14(); // vtable+14; - virtual MxU32 GetSizeOnDisk() override; // vtable+18; - virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; - virtual MxDSAction* Clone() override; // vtable+2c; + undefined4 VTable0x14() override; // vtable+14; + MxU32 GetSizeOnDisk() override; // vtable+18; + void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; + MxDSAction* Clone() override; // vtable+2c; void CopyMediaSrcPath(const char* p_mediaSrcPath); diff --git a/LEGO1/omni/include/mxdsmultiaction.h b/LEGO1/omni/include/mxdsmultiaction.h index 22a04feb..d97e6116 100644 --- a/LEGO1/omni/include/mxdsmultiaction.h +++ b/LEGO1/omni/include/mxdsmultiaction.h @@ -9,32 +9,32 @@ class MxDSMultiAction : public MxDSAction { public: MxDSMultiAction(); - virtual ~MxDSMultiAction() override; + ~MxDSMultiAction() override; void CopyFrom(MxDSMultiAction& p_dsMultiAction); MxDSMultiAction& operator=(MxDSMultiAction& p_dsMultiAction); // FUNCTION: LEGO1 0x100c9f50 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101dbc return "MxDSMultiAction"; } // FUNCTION: LEGO1 0x100c9f60 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSMultiAction::ClassName()) || MxDSAction::IsA(p_name); } - virtual undefined4 VTable0x14() override; // vtable+14; - virtual MxU32 GetSizeOnDisk() override; // vtable+18; - virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; - virtual void SetAtomId(MxAtomId p_atomId) override; // vtable+20; - virtual MxDSAction* Clone() override; // vtable+2c; - virtual void MergeFrom(MxDSAction& p_dsAction) override; // vtable+30; - virtual MxBool HasId(MxU32 p_objectId) override; // vtable+34; - virtual void SetUnknown90(MxLong p_unk0x90) override; // vtable+38; + undefined4 VTable0x14() override; // vtable+14; + MxU32 GetSizeOnDisk() override; // vtable+18; + void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; + void SetAtomId(MxAtomId p_atomId) override; // vtable+20; + MxDSAction* Clone() override; // vtable+2c; + void MergeFrom(MxDSAction& p_dsAction) override; // vtable+30; + MxBool HasId(MxU32 p_objectId) override; // vtable+34; + void SetUnknown90(MxLong p_unk0x90) override; // vtable+38; inline MxDSActionList* GetActionList() const { return m_actions; } diff --git a/LEGO1/omni/include/mxdsobject.h b/LEGO1/omni/include/mxdsobject.h index 9ede2f11..c7156004 100644 --- a/LEGO1/omni/include/mxdsobject.h +++ b/LEGO1/omni/include/mxdsobject.h @@ -27,7 +27,7 @@ public: }; MxDSObject(); - virtual ~MxDSObject() override; + ~MxDSObject() override; void CopyFrom(MxDSObject& p_dsObject); MxDSObject& operator=(MxDSObject& p_dsObject); @@ -36,10 +36,10 @@ public: void SetSourceName(const char* p_sourceName); // FUNCTION: LEGO1 0x100bf730 - inline virtual const char* ClassName() const override { return "MxDSObject"; } // vtable+0c + inline const char* ClassName() const override { return "MxDSObject"; } // vtable+0c // FUNCTION: LEGO1 0x100bf740 - inline virtual MxBool IsA(const char* p_name) const override + inline MxBool IsA(const char* p_name) const override { return !strcmp(p_name, MxDSObject::ClassName()) || MxCore::IsA(p_name); } // vtable+10; diff --git a/LEGO1/omni/include/mxdsobjectaction.h b/LEGO1/omni/include/mxdsobjectaction.h index 77480452..205c6d81 100644 --- a/LEGO1/omni/include/mxdsobjectaction.h +++ b/LEGO1/omni/include/mxdsobjectaction.h @@ -8,24 +8,24 @@ class MxDSObjectAction : public MxDSMediaAction { public: MxDSObjectAction(); - virtual ~MxDSObjectAction() override; + ~MxDSObjectAction() override; MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction); // FUNCTION: LEGO1 0x100c88e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025c4 return "MxDSObjectAction"; } // FUNCTION: LEGO1 0x100c88f0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(p_name); } - virtual MxDSAction* Clone() override; // vtable+2c; + MxDSAction* Clone() override; // vtable+2c; virtual void CopyFrom(MxDSObjectAction& p_dsObjectAction); // vtable+44; // SYNTHETIC: LEGO1 0x100c8a00 diff --git a/LEGO1/omni/include/mxdsparallelaction.h b/LEGO1/omni/include/mxdsparallelaction.h index 0386de7f..212fb8f0 100644 --- a/LEGO1/omni/include/mxdsparallelaction.h +++ b/LEGO1/omni/include/mxdsparallelaction.h @@ -8,20 +8,20 @@ class MxDSParallelAction : public MxDSMultiAction { public: MxDSParallelAction(); - virtual ~MxDSParallelAction() override; + ~MxDSParallelAction() override; void CopyFrom(MxDSParallelAction& p_dsParallelAction); MxDSParallelAction& operator=(MxDSParallelAction& p_dsParallelAction); // FUNCTION: LEGO1 0x100caf00 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102608 return "MxDSParallelAction"; } // FUNCTION: LEGO1 0x100caf10 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(p_name); } @@ -29,12 +29,12 @@ public: // SYNTHETIC: LEGO1 0x100cb020 // MxDSParallelAction::`scalar deleting destructor' - virtual MxLong GetDuration() override; // vtable+24; + MxLong GetDuration() override; // vtable+24; // FUNCTION: LEGO1 0x100caef0 - virtual void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28 + void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28 - virtual MxDSAction* Clone() override; // vtable+2c; + MxDSAction* Clone() override; // vtable+2c; }; #endif // MXDSPARALLELACTION_H diff --git a/LEGO1/omni/include/mxdsselectaction.h b/LEGO1/omni/include/mxdsselectaction.h index f7c6a148..ab2e6609 100644 --- a/LEGO1/omni/include/mxdsselectaction.h +++ b/LEGO1/omni/include/mxdsselectaction.h @@ -10,27 +10,27 @@ class MxDSSelectAction : public MxDSParallelAction { public: MxDSSelectAction(); - virtual ~MxDSSelectAction() override; + ~MxDSSelectAction() override; void CopyFrom(MxDSSelectAction& p_dsSelectAction); MxDSSelectAction& operator=(MxDSSelectAction& p_dsSelectAction); // FUNCTION: LEGO1 0x100cb6f0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x1010261c return "MxDSSelectAction"; } // FUNCTION: LEGO1 0x100cb700 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(p_name); } - virtual MxU32 GetSizeOnDisk() override; // vtable+18; - virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; - virtual MxDSAction* Clone() override; // vtable+2c; + MxU32 GetSizeOnDisk() override; // vtable+18; + void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; + MxDSAction* Clone() override; // vtable+2c; // SYNTHETIC: LEGO1 0x100cb840 // MxDSSelectAction::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxdsserialaction.h b/LEGO1/omni/include/mxdsserialaction.h index 694c9afa..b1c2a695 100644 --- a/LEGO1/omni/include/mxdsserialaction.h +++ b/LEGO1/omni/include/mxdsserialaction.h @@ -9,27 +9,27 @@ class MxDSSerialAction : public MxDSMultiAction { public: MxDSSerialAction(); - virtual ~MxDSSerialAction() override; + ~MxDSSerialAction() override; void CopyFrom(MxDSSerialAction& p_dsSerialAction); MxDSSerialAction& operator=(MxDSSerialAction& p_dsSerialAction); // FUNCTION: LEGO1 0x100caad0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f75dc return "MxDSSerialAction"; } // FUNCTION: LEGO1 0x100caae0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSSerialAction::ClassName()) || MxDSMultiAction::IsA(p_name); } - virtual MxLong GetDuration() override; // vtable+24; - virtual void SetDuration(MxLong p_duration) override; // vtable+28; - virtual MxDSAction* Clone() override; // vtable+2c; + MxLong GetDuration() override; // vtable+24; + void SetDuration(MxLong p_duration) override; // vtable+28; + MxDSAction* Clone() override; // vtable+2c; // SYNTHETIC: LEGO1 0x100cabf0 // MxDSSerialAction::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxdssound.h b/LEGO1/omni/include/mxdssound.h index 3d1fa31d..193fde3a 100644 --- a/LEGO1/omni/include/mxdssound.h +++ b/LEGO1/omni/include/mxdssound.h @@ -8,27 +8,27 @@ class MxDSSound : public MxDSMediaAction { public: MxDSSound(); - virtual ~MxDSSound() override; + ~MxDSSound() override; void CopyFrom(MxDSSound& p_dsSound); MxDSSound& operator=(MxDSSound& p_dsSound); // FUNCTION: LEGO1 0x100c9330 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025e4 return "MxDSSound"; } // FUNCTION: LEGO1 0x100c9340 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(p_name); } - virtual MxU32 GetSizeOnDisk() override; // vtable+18; - virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; - virtual MxDSAction* Clone() override; // vtable+2c; + MxU32 GetSizeOnDisk() override; // vtable+18; + void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c; + MxDSAction* Clone() override; // vtable+2c; inline MxS32 GetVolume() const { return m_volume; } diff --git a/LEGO1/omni/include/mxdssource.h b/LEGO1/omni/include/mxdssource.h index 143b9c78..d3b9474b 100644 --- a/LEGO1/omni/include/mxdssource.h +++ b/LEGO1/omni/include/mxdssource.h @@ -12,17 +12,17 @@ public: MxDSSource() : m_lengthInDWords(0), m_pBuffer(NULL), m_position(-1) {} // FUNCTION: LEGO1 0x100bff60 - virtual ~MxDSSource() override { delete[] m_pBuffer; } + ~MxDSSource() override { delete[] m_pBuffer; } // FUNCTION: LEGO1 0x100c0010 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102588 return "MxDSSource"; } // FUNCTION: LEGO1 0x100c0020 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSSource::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxdsstill.h b/LEGO1/omni/include/mxdsstill.h index 4de69475..f46fff32 100644 --- a/LEGO1/omni/include/mxdsstill.h +++ b/LEGO1/omni/include/mxdsstill.h @@ -8,25 +8,25 @@ class MxDSStill : public MxDSMediaAction { public: MxDSStill(); - virtual ~MxDSStill() override; + ~MxDSStill() override; void CopyFrom(MxDSStill& p_dsStill); MxDSStill& operator=(MxDSStill& p_dsStill); // FUNCTION: LEGO1 0x100c9930 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025fc return "MxDSStill"; } // FUNCTION: LEGO1 0x100c9940 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(p_name); } - virtual MxDSAction* Clone() override; // vtable+2c; + MxDSAction* Clone() override; // vtable+2c; // SYNTHETIC: LEGO1 0x100c9a50 // MxDSStill::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxdsstreamingaction.h b/LEGO1/omni/include/mxdsstreamingaction.h index 074bd5ed..94e652ae 100644 --- a/LEGO1/omni/include/mxdsstreamingaction.h +++ b/LEGO1/omni/include/mxdsstreamingaction.h @@ -11,7 +11,7 @@ class MxDSStreamingAction : public MxDSAction { public: MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset); MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingAction); - virtual ~MxDSStreamingAction(); + ~MxDSStreamingAction() override; MxDSStreamingAction* CopyFrom(MxDSStreamingAction& p_dsStreamingAction); MxDSStreamingAction& operator=(MxDSAction& p_dsAction) @@ -25,7 +25,7 @@ public: return *this; } - virtual MxBool HasId(MxU32 p_objectId) override; // vtable+34; + MxBool HasId(MxU32 p_objectId) override; // vtable+34; MxResult Init(); void SetInternalAction(MxDSAction* p_dsAction); diff --git a/LEGO1/omni/include/mxdssubscriber.h b/LEGO1/omni/include/mxdssubscriber.h index 1156be36..4f8d0843 100644 --- a/LEGO1/omni/include/mxdssubscriber.h +++ b/LEGO1/omni/include/mxdssubscriber.h @@ -14,17 +14,17 @@ class MxStreamController; class MxDSSubscriber : public MxCore { public: MxDSSubscriber(); - virtual ~MxDSSubscriber() override; + ~MxDSSubscriber() override; // FUNCTION: LEGO1 0x100b7d50 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101020f8 return "MxDSSubscriber"; } // FUNCTION: LEGO1 0x100b7d60 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxDSSubscriber::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxentity.h b/LEGO1/omni/include/mxentity.h index df36ea37..ed75d148 100644 --- a/LEGO1/omni/include/mxentity.h +++ b/LEGO1/omni/include/mxentity.h @@ -15,17 +15,17 @@ public: MxEntity() { this->m_mxEntityId = -1; } // FUNCTION: LEGO1 0x1000c110 - virtual ~MxEntity() override{}; + ~MxEntity() override{}; // FUNCTION: LEGO1 0x1000c180 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0070 return "MxEntity"; } // FUNCTION: LEGO1 0x1000c190 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxEntity::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxeventmanager.h b/LEGO1/omni/include/mxeventmanager.h index c21e92bc..b23a2ad0 100644 --- a/LEGO1/omni/include/mxeventmanager.h +++ b/LEGO1/omni/include/mxeventmanager.h @@ -9,9 +9,9 @@ class MxEventManager : public MxMediaManager { public: MxEventManager(); - virtual ~MxEventManager() override; + ~MxEventManager() override; - virtual void Destroy() override; // vtable+18 + void Destroy() override; // vtable+18 virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+28 // SYNTHETIC: LEGO1 0x100c03d0 diff --git a/LEGO1/omni/include/mxeventpresenter.h b/LEGO1/omni/include/mxeventpresenter.h index 06599693..1812280f 100644 --- a/LEGO1/omni/include/mxeventpresenter.h +++ b/LEGO1/omni/include/mxeventpresenter.h @@ -9,26 +9,26 @@ class MxEventPresenter : public MxMediaPresenter { public: MxEventPresenter(); - virtual ~MxEventPresenter() override; + ~MxEventPresenter() override; // FUNCTION: LEGO1 0x100c2c30 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101dcc return "MxEventPresenter"; } // FUNCTION: LEGO1 0x100c2c40 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual MxResult PutData() override; // vtable+0x4c + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + MxResult PutData() override; // vtable+0x4c virtual void CopyData(MxStreamChunk* p_chunk); // vtable+0x5c // SYNTHETIC: LEGO1 0x100c2d20 diff --git a/LEGO1/omni/include/mxflcpresenter.h b/LEGO1/omni/include/mxflcpresenter.h index 2c4063f9..569fa06c 100644 --- a/LEGO1/omni/include/mxflcpresenter.h +++ b/LEGO1/omni/include/mxflcpresenter.h @@ -11,25 +11,25 @@ class MxFlcPresenter : public MxVideoPresenter { public: MxFlcPresenter(); - virtual ~MxFlcPresenter() override; + ~MxFlcPresenter() override; // FUNCTION: LEGO1 0x1004e200 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxFlcPresenter::ClassName()) || MxVideoPresenter::IsA(p_name); } // FUNCTION: LEGO1 0x100b33f0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f43c8 return "MxFlcPresenter"; } - virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c - virtual void CreateBitmap() override; // vtable+0x60 - virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 - virtual void RealizePalette() override; // vtable+0x70 + void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c + void CreateBitmap() override; // vtable+0x60 + void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 + void RealizePalette() override; // vtable+0x70 // SYNTHETIC: LEGO1 0x100b3400 // MxFlcPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxhashtable.h b/LEGO1/omni/include/mxhashtable.h index 056ff402..f2506758 100644 --- a/LEGO1/omni/include/mxhashtable.h +++ b/LEGO1/omni/include/mxhashtable.h @@ -46,7 +46,7 @@ public: m_resizeOption = e_noExpand; } - virtual ~MxHashTable() override; + ~MxHashTable() override; void Resize(); void Add(T); @@ -99,8 +99,9 @@ MxBool MxHashTableCursor::Find(T p_obj) MxHashTableNode* t = m_table->m_slots[bucket]; while (t) { - if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj)) + if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj)) { m_match = t; + } t = t->m_next; } @@ -122,8 +123,9 @@ void MxHashTableCursor::DeleteMatch() { // Cut the matching node out of the linked list // by updating pointer references. - if (m_match == NULL) + if (m_match == NULL) { return; + } if (m_match->m_prev) { m_match->m_prev->m_next = m_match->m_next; @@ -134,8 +136,9 @@ void MxHashTableCursor::DeleteMatch() m_table->m_slots[bucket] = m_match->m_next; } - if (m_match->m_next) + if (m_match->m_next) { m_match->m_next->m_prev = m_match->m_prev; + } m_table->m_customDestructor(m_match->m_obj); delete m_match; @@ -210,8 +213,9 @@ inline void MxHashTable::NodeInsert(MxHashTableNode* p_node) p_node->m_next = m_slots[bucket]; - if (m_slots[bucket]) + if (m_slots[bucket]) { m_slots[bucket]->m_prev = p_node; + } m_slots[bucket] = p_node; this->m_count++; @@ -220,8 +224,9 @@ inline void MxHashTable::NodeInsert(MxHashTableNode* p_node) template inline void MxHashTable::Add(T p_newobj) { - if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio) + if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio) { MxHashTable::Resize(); + } MxU32 hash = Hash(p_newobj); MxHashTableNode* node = new MxHashTableNode(p_newobj, hash); diff --git a/LEGO1/omni/include/mxlist.h b/LEGO1/omni/include/mxlist.h index b25c1ce2..5ad02492 100644 --- a/LEGO1/omni/include/mxlist.h +++ b/LEGO1/omni/include/mxlist.h @@ -51,7 +51,7 @@ public: m_first = NULL; } - virtual ~MxList() override; + ~MxList() override; void Append(T p_obj) { InsertEntry(p_obj, this->m_last, NULL); } void Prepend(T p_obj) { InsertEntry(p_obj, NULL, this->m_first); } @@ -121,8 +121,9 @@ public: // TODO: Probably shouldn't exist void NextFragment() { - if (m_match) + if (m_match) { m_match = m_match->GetNext(); + } } private: @@ -147,13 +148,15 @@ template inline void MxList::DeleteAll(MxBool p_destroy) { for (MxListEntry* t = m_first;;) { - if (!t) + if (!t) { break; + } MxListEntry* next = t->GetNext(); - if (p_destroy) + if (p_destroy) { this->m_customDestructor(t->GetValue()); + } delete t; t = next; @@ -169,15 +172,19 @@ inline MxListEntry* MxList::InsertEntry(T p_newobj, MxListEntry* p_prev { MxListEntry* newEntry = new MxListEntry(p_newobj, p_prev, p_next); - if (p_prev) + if (p_prev) { p_prev->SetNext(newEntry); - else + } + else { this->m_first = newEntry; + } - if (p_next) + if (p_next) { p_next->SetPrev(newEntry); - else + } + else { this->m_last = newEntry; + } this->m_count++; return newEntry; @@ -186,15 +193,19 @@ inline MxListEntry* MxList::InsertEntry(T p_newobj, MxListEntry* p_prev template inline void MxList::DeleteEntry(MxListEntry* p_match) { - if (p_match->GetPrev()) + if (p_match->GetPrev()) { p_match->GetPrev()->SetNext(p_match->GetNext()); - else + } + else { m_first = p_match->GetNext(); + } - if (p_match->GetNext()) + if (p_match->GetNext()) { p_match->GetNext()->SetPrev(p_match->GetPrev()); - else + } + else { m_last = p_match->GetPrev(); + } delete p_match; this->m_count--; @@ -204,8 +215,9 @@ template inline MxBool MxListCursor::Find(T p_obj) { for (m_match = m_list->m_first; m_match && m_list->Compare(m_match->GetValue(), p_obj); - m_match = m_match->GetNext()) + m_match = m_match->GetNext()) { ; + } return m_match != NULL; } @@ -232,10 +244,12 @@ inline void MxListCursor::Destroy() template inline MxBool MxListCursor::Next() { - if (!m_match) + if (!m_match) { m_match = m_list->m_first; - else + } + else { m_match = m_match->GetNext(); + } return m_match != NULL; } @@ -243,13 +257,16 @@ inline MxBool MxListCursor::Next() template inline MxBool MxListCursor::Next(T& p_obj) { - if (!m_match) + if (!m_match) { m_match = m_list->m_first; - else + } + else { m_match = m_match->GetNext(); + } - if (m_match) + if (m_match) { p_obj = m_match->GetValue(); + } return m_match != NULL; } @@ -257,10 +274,12 @@ inline MxBool MxListCursor::Next(T& p_obj) template inline MxBool MxListCursor::Prev() { - if (!m_match) + if (!m_match) { m_match = m_list->m_last; - else + } + else { m_match = m_match->GetPrev(); + } return m_match != NULL; } @@ -268,13 +287,16 @@ inline MxBool MxListCursor::Prev() template inline MxBool MxListCursor::Prev(T& p_obj) { - if (!m_match) + if (!m_match) { m_match = m_list->m_last; - else + } + else { m_match = m_match->GetPrev(); + } - if (m_match) + if (m_match) { p_obj = m_match->GetValue(); + } return m_match != NULL; } @@ -282,8 +304,9 @@ inline MxBool MxListCursor::Prev(T& p_obj) template inline MxBool MxListCursor::Current(T& p_obj) { - if (m_match) + if (m_match) { p_obj = m_match->GetValue(); + } return m_match != NULL; } @@ -292,8 +315,9 @@ template inline MxBool MxListCursor::First(T& p_obj) { m_match = m_list->m_first; - if (m_match) + if (m_match) { p_obj = m_match->GetValue(); + } return m_match != NULL; } @@ -302,8 +326,9 @@ template inline MxBool MxListCursor::Last(T& p_obj) { m_match = m_list->m_last; - if (m_match) + if (m_match) { p_obj = m_match->GetValue(); + } return m_match != NULL; } @@ -311,15 +336,17 @@ inline MxBool MxListCursor::Last(T& p_obj) template inline void MxListCursor::SetValue(T p_obj) { - if (m_match) + if (m_match) { m_match->SetValue(p_obj); + } } template inline void MxListCursor::Prepend(T p_newobj) { - if (m_match) + if (m_match) { m_list->InsertEntry(p_newobj, m_match->GetPrev(), m_match); + } } #endif // MXLIST_H diff --git a/LEGO1/omni/include/mxloopingflcpresenter.h b/LEGO1/omni/include/mxloopingflcpresenter.h index e9cfac1a..1bc76e18 100644 --- a/LEGO1/omni/include/mxloopingflcpresenter.h +++ b/LEGO1/omni/include/mxloopingflcpresenter.h @@ -9,20 +9,20 @@ class MxLoopingFlcPresenter : public MxFlcPresenter { public: MxLoopingFlcPresenter(); - virtual ~MxLoopingFlcPresenter() override; + ~MxLoopingFlcPresenter() override; // FUNCTION: LEGO1 0x100b4380 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e20 return "MxLoopingFlcPresenter"; } - virtual void RepeatingTickle() override; // vtable+0x24 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual void NextFrame() override; // vtable+0x64 - virtual void VTable0x88(); // vtable+0x88 + void RepeatingTickle() override; // vtable+0x24 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + void NextFrame() override; // vtable+0x64 + virtual void VTable0x88(); // vtable+0x88 // SYNTHETIC: LEGO1 0x100b4390 // MxLoopingFlcPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxloopingmidipresenter.h b/LEGO1/omni/include/mxloopingmidipresenter.h index 81ccab74..1a9eff73 100644 --- a/LEGO1/omni/include/mxloopingmidipresenter.h +++ b/LEGO1/omni/include/mxloopingmidipresenter.h @@ -8,21 +8,21 @@ class MxLoopingMIDIPresenter : public MxMIDIPresenter { public: // FUNCTION: LEGO1 0x100b1830 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101de0 return "MxLoopingMIDIPresenter"; } // FUNCTION: LEGO1 0x100b1840 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxLoopingMIDIPresenter::ClassName()) || MxMIDIPresenter::IsA(p_name); } - virtual void StreamingTickle() override; // vtable+0x20 - virtual void DoneTickle() override; // vtable+0x2c - virtual MxResult PutData() override; // vtable+0x4c + void StreamingTickle() override; // vtable+0x20 + void DoneTickle() override; // vtable+0x2c + MxResult PutData() override; // vtable+0x4c }; // SYNTHETIC: LEGO1 0x100b19c0 diff --git a/LEGO1/omni/include/mxloopingsmkpresenter.h b/LEGO1/omni/include/mxloopingsmkpresenter.h index 832b4263..de0f506f 100644 --- a/LEGO1/omni/include/mxloopingsmkpresenter.h +++ b/LEGO1/omni/include/mxloopingsmkpresenter.h @@ -9,21 +9,21 @@ class MxLoopingSmkPresenter : public MxSmkPresenter { public: MxLoopingSmkPresenter(); - virtual ~MxLoopingSmkPresenter() override; // vtable+0x00 + ~MxLoopingSmkPresenter() override; // vtable+0x00 // FUNCTION: LEGO1 0x100b4920 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e08 return "MxLoopingSmkPresenter"; } - virtual void RepeatingTickle() override; // vtable+0x24 - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual void NextFrame() override; // vtable+0x64 - virtual void VTable0x88() override; // vtable+0x88 - virtual void VTable0x8c(); // vtable+0x8c + void RepeatingTickle() override; // vtable+0x24 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + void NextFrame() override; // vtable+0x64 + void VTable0x88() override; // vtable+0x88 + virtual void VTable0x8c(); // vtable+0x8c private: void Init(); diff --git a/LEGO1/omni/include/mxmediamanager.h b/LEGO1/omni/include/mxmediamanager.h index d531e5c7..77720bf3 100644 --- a/LEGO1/omni/include/mxmediamanager.h +++ b/LEGO1/omni/include/mxmediamanager.h @@ -12,9 +12,9 @@ class MxMediaManager : public MxCore { public: MxMediaManager(); - virtual ~MxMediaManager() override; + ~MxMediaManager() override; - virtual MxResult Tickle() override; // vtable+08 + MxResult Tickle() override; // vtable+08 virtual MxResult InitPresenters(); // vtable+14 virtual void Destroy(); // vtable+18 virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c diff --git a/LEGO1/omni/include/mxmediapresenter.h b/LEGO1/omni/include/mxmediapresenter.h index f73cf2bf..fba44880 100644 --- a/LEGO1/omni/include/mxmediapresenter.h +++ b/LEGO1/omni/include/mxmediapresenter.h @@ -13,34 +13,34 @@ public: inline MxMediaPresenter() { Init(); } // FUNCTION: LEGO1 0x1000c550 - virtual ~MxMediaPresenter() override { Destroy(TRUE); } + ~MxMediaPresenter() override { Destroy(TRUE); } - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1000c5c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f074c return "MxMediaPresenter"; } // FUNCTION: LEGO1 0x1000c5d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxMediaPresenter::ClassName()) || MxPresenter::IsA(p_name); } - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void DoneTickle() override; // vtable+0x2c + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void DoneTickle() override; // vtable+0x2c // FUNCTION: LEGO1 0x1000c5b0 - virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38 + void Destroy() override { Destroy(FALSE); } // vtable+0x38 - virtual MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c - virtual void EndAction() override; // vtable+0x40 - virtual void Enable(MxBool p_enable) override; // vtable+0x54 - virtual void LoopChunk(MxStreamChunk* p_chunk); // vtable+0x58 + MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c + void EndAction() override; // vtable+0x40 + void Enable(MxBool p_enable) override; // vtable+0x54 + virtual void LoopChunk(MxStreamChunk* p_chunk); // vtable+0x58 // SYNTHETIC: LEGO1 0x1000c680 // MxMediaPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxmidipresenter.h b/LEGO1/omni/include/mxmidipresenter.h index 1abab9d1..3dabbc0e 100644 --- a/LEGO1/omni/include/mxmidipresenter.h +++ b/LEGO1/omni/include/mxmidipresenter.h @@ -9,29 +9,29 @@ class MxMIDIPresenter : public MxMusicPresenter { public: MxMIDIPresenter(); - virtual ~MxMIDIPresenter() override; + ~MxMIDIPresenter() override; // FUNCTION: LEGO1 0x100c2650 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101df8 return "MxMIDIPresenter"; } // FUNCTION: LEGO1 0x100c2660 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void DoneTickle() override; // vtable+0x2c - virtual void Destroy() override; // vtable+0x38 - virtual void EndAction() override; // vtable+0x40 - virtual MxResult PutData() override; // vtable+0x4c - virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void DoneTickle() override; // vtable+0x2c + void Destroy() override; // vtable+0x38 + void EndAction() override; // vtable+0x40 + MxResult PutData() override; // vtable+0x4c + void SetVolume(MxS32 p_volume) override; // vtable+0x60 // SYNTHETIC: LEGO1 0x100c27a0 // MxMIDIPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxmusicmanager.h b/LEGO1/omni/include/mxmusicmanager.h index 2a8b30e5..1107e7e3 100644 --- a/LEGO1/omni/include/mxmusicmanager.h +++ b/LEGO1/omni/include/mxmusicmanager.h @@ -11,10 +11,10 @@ class MxMusicManager : public MxAudioManager { public: MxMusicManager(); - virtual ~MxMusicManager() override; + ~MxMusicManager() override; - virtual void Destroy() override; // vtable+18 - virtual void SetVolume(MxS32 p_volume) override; // vtable+2c + void Destroy() override; // vtable+18 + void SetVolume(MxS32 p_volume) override; // vtable+2c virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+30 inline MxBool GetMIDIInitialized() { return m_midiInitialized; } diff --git a/LEGO1/omni/include/mxmusicpresenter.h b/LEGO1/omni/include/mxmusicpresenter.h index 7b8948cd..a66afa78 100644 --- a/LEGO1/omni/include/mxmusicpresenter.h +++ b/LEGO1/omni/include/mxmusicpresenter.h @@ -8,23 +8,23 @@ class MxMusicPresenter : public MxAudioPresenter { public: MxMusicPresenter(); - virtual ~MxMusicPresenter() override; + ~MxMusicPresenter() override; // FUNCTION: LEGO1 0x100c23a0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e48 return "MxMusicPresenter"; } // FUNCTION: LEGO1 0x100c23b0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxMusicPresenter::ClassName()) || MxAudioPresenter::IsA(p_name); } - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 // SYNTHETIC: LEGO1 0x100c24c0 // MxMusicPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxnextactiondatastart.h b/LEGO1/omni/include/mxnextactiondatastart.h index de425989..0f08ec75 100644 --- a/LEGO1/omni/include/mxnextactiondatastart.h +++ b/LEGO1/omni/include/mxnextactiondatastart.h @@ -16,14 +16,14 @@ public: } // FUNCTION: LEGO1 0x100c1900 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x101025a0 return "MxNextActionDataStart"; } // FUNCTION: LEGO1 0x100c1910 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxNextActionDataStart::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxnotificationmanager.h b/LEGO1/omni/include/mxnotificationmanager.h index 829473b8..287ae40b 100644 --- a/LEGO1/omni/include/mxnotificationmanager.h +++ b/LEGO1/omni/include/mxnotificationmanager.h @@ -36,9 +36,9 @@ private: public: MxNotificationManager(); - virtual ~MxNotificationManager(); // vtable+0x00 (scalar deleting destructor) + ~MxNotificationManager() override; // vtable+0x00 (scalar deleting destructor) - virtual MxResult Tickle(); // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // TODO: Where does this method come from? virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x14 void Register(MxCore* p_listener); diff --git a/LEGO1/omni/include/mxobjectfactory.h b/LEGO1/omni/include/mxobjectfactory.h index 3f74f1c4..aed354c4 100644 --- a/LEGO1/omni/include/mxobjectfactory.h +++ b/LEGO1/omni/include/mxobjectfactory.h @@ -24,14 +24,14 @@ public: MxObjectFactory(); // FUNCTION: LEGO1 0x10008f70 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0730 return "MxObjectFactory"; } // FUNCTION: LEGO1 0x10008f80 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxObjectFactory::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxomni.h b/LEGO1/omni/include/mxomni.h index a2092168..7f0a0362 100644 --- a/LEGO1/omni/include/mxomni.h +++ b/LEGO1/omni/include/mxomni.h @@ -38,9 +38,9 @@ public: static void SetSound3D(MxBool p_use3dSound); MxOmni(); - virtual ~MxOmni() override; + ~MxOmni() override; - virtual MxLong Notify(MxParam& p_param) override; // vtable+04 + MxLong Notify(MxParam& p_param) override; // vtable+04 virtual void Init(); // vtable+14 virtual MxResult Create(MxOmniCreateParam& p_param); // vtable+18 virtual void Destroy(); // vtable+1c diff --git a/LEGO1/omni/include/mxpalette.h b/LEGO1/omni/include/mxpalette.h index 4a1eebf0..4f38c91b 100644 --- a/LEGO1/omni/include/mxpalette.h +++ b/LEGO1/omni/include/mxpalette.h @@ -15,7 +15,7 @@ public: MxPalette(); MxPalette(const RGBQUAD*); - virtual ~MxPalette(); + ~MxPalette() override; void ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries); MxPalette* Clone(); diff --git a/LEGO1/omni/include/mxpresenter.h b/LEGO1/omni/include/mxpresenter.h index 6198cd09..cd403949 100644 --- a/LEGO1/omni/include/mxpresenter.h +++ b/LEGO1/omni/include/mxpresenter.h @@ -29,19 +29,19 @@ public: MxPresenter() { Init(); } // FUNCTION: LEGO1 0x1000bf00 - virtual ~MxPresenter() override{}; // vtable+0x00 + ~MxPresenter() override{}; // vtable+0x00 - virtual MxResult Tickle() override; // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 // FUNCTION: LEGO1 0x1000bfe0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0740 return "MxPresenter"; } // FUNCTION: LEGO1 0x1000bff0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxPresenter::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxpresenterlist.h b/LEGO1/omni/include/mxpresenterlist.h index dd119621..1c52f360 100644 --- a/LEGO1/omni/include/mxpresenterlist.h +++ b/LEGO1/omni/include/mxpresenterlist.h @@ -14,7 +14,7 @@ public: MxPresenterList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} // FUNCTION: LEGO1 0x1001cd00 - virtual MxS8 Compare(MxPresenter* p_a, MxPresenter* p_b) override + MxS8 Compare(MxPresenter* p_a, MxPresenter* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/omni/include/mxramstreamcontroller.h b/LEGO1/omni/include/mxramstreamcontroller.h index 00e1b06d..820fc3f7 100644 --- a/LEGO1/omni/include/mxramstreamcontroller.h +++ b/LEGO1/omni/include/mxramstreamcontroller.h @@ -12,22 +12,22 @@ public: inline MxRAMStreamController() {} // FUNCTION: LEGO1 0x100b9430 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102118 return "MxRAMStreamController"; } // FUNCTION: LEGO1 0x100b9440 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxRAMStreamController::ClassName()) || !strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name); } - virtual MxResult Open(const char* p_filename) override; - virtual MxResult VTable0x20(MxDSAction* p_action) override; - virtual MxResult VTable0x24(MxDSAction* p_action) override; + MxResult Open(const char* p_filename) override; + MxResult VTable0x20(MxDSAction* p_action) override; + MxResult VTable0x24(MxDSAction* p_action) override; private: MxDSBuffer m_buffer; // 0x64 diff --git a/LEGO1/omni/include/mxramstreamprovider.h b/LEGO1/omni/include/mxramstreamprovider.h index c994b848..08c1ea95 100644 --- a/LEGO1/omni/include/mxramstreamprovider.h +++ b/LEGO1/omni/include/mxramstreamprovider.h @@ -8,26 +8,26 @@ class MxRAMStreamProvider : public MxStreamProvider { public: MxRAMStreamProvider(); - virtual ~MxRAMStreamProvider() override; + ~MxRAMStreamProvider() override; // FUNCTION: LEGO1 0x100d0970 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102864 return "MxRAMStreamProvider"; } // FUNCTION: LEGO1 0x100d0980 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxRAMStreamProvider::ClassName()) || MxStreamProvider::IsA(p_name); } - virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14 - virtual MxU32 GetFileSize() override; // vtable+0x18 - virtual MxS32 GetStreamBuffersNum() override; // vtable+0x1c - virtual MxU32 GetLengthInDWords() override; // vtable+0x24 - virtual MxU32* GetBufferForDWords() override; // vtable+0x28 + MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14 + MxU32 GetFileSize() override; // vtable+0x18 + MxS32 GetStreamBuffersNum() override; // vtable+0x1c + MxU32 GetLengthInDWords() override; // vtable+0x24 + MxU32* GetBufferForDWords() override; // vtable+0x28 inline MxU8* GetBufferOfFileSize() { return m_pBufferOfFileSize; } diff --git a/LEGO1/omni/include/mxregion.h b/LEGO1/omni/include/mxregion.h index 5659ba81..3bf639e1 100644 --- a/LEGO1/omni/include/mxregion.h +++ b/LEGO1/omni/include/mxregion.h @@ -11,7 +11,7 @@ class MxRegion : public MxCore { public: MxRegion(); - virtual ~MxRegion() override; + ~MxRegion() override; virtual void Reset(); // vtable+0x14 virtual void VTable0x18(MxRect32& p_rect); // vtable+0x18 diff --git a/LEGO1/omni/include/mxregioncursor.h b/LEGO1/omni/include/mxregioncursor.h index 5f4a24b8..e114c7ed 100644 --- a/LEGO1/omni/include/mxregioncursor.h +++ b/LEGO1/omni/include/mxregioncursor.h @@ -8,7 +8,7 @@ class MxRegionCursor : public MxCore { public: MxRegionCursor(MxRegion* p_region); - virtual ~MxRegionCursor() override; + ~MxRegionCursor() override; virtual MxRect32* VTable0x14(MxRect32& p_rect); // vtable+0x14 virtual MxRect32* VTable0x18(); // vtable+0x18 diff --git a/LEGO1/omni/include/mxsmkpresenter.h b/LEGO1/omni/include/mxsmkpresenter.h index b9dcc341..d17ce59d 100644 --- a/LEGO1/omni/include/mxsmkpresenter.h +++ b/LEGO1/omni/include/mxsmkpresenter.h @@ -10,28 +10,28 @@ class MxSmkPresenter : public MxVideoPresenter { public: MxSmkPresenter(); - virtual ~MxSmkPresenter() override; + ~MxSmkPresenter() override; // FUNCTION: LEGO1 0x100b3730 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e38 return "MxSmkPresenter"; } // FUNCTION: LEGO1 0x100b3740 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxSmkPresenter::ClassName()) || MxVideoPresenter::IsA(p_name); } - virtual MxResult AddToManager() override; // vtable+0x34 - virtual void Destroy() override; // vtable+0x38 - virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c - virtual void CreateBitmap() override; // vtable+0x60 - virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 - virtual void RealizePalette() override; // vtable+0x70 - virtual void VTable0x88(); // vtable+0x88 + MxResult AddToManager() override; // vtable+0x34 + void Destroy() override; // vtable+0x38 + void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c + void CreateBitmap() override; // vtable+0x60 + void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 + void RealizePalette() override; // vtable+0x70 + virtual void VTable0x88(); // vtable+0x88 // SYNTHETIC: LEGO1 0x100b3850 // MxSmkPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxsoundmanager.h b/LEGO1/omni/include/mxsoundmanager.h index c0bec1bb..9e065ef0 100644 --- a/LEGO1/omni/include/mxsoundmanager.h +++ b/LEGO1/omni/include/mxsoundmanager.h @@ -12,10 +12,10 @@ class MxSoundManager : public MxAudioManager { public: MxSoundManager(); - virtual ~MxSoundManager() override; // vtable+0x00 + ~MxSoundManager() override; // vtable+0x00 - virtual void Destroy() override; // vtable+0x18 - virtual void SetVolume(MxS32 p_volume) override; // vtable+0x2c + void Destroy() override; // vtable+0x18 + void SetVolume(MxS32 p_volume) override; // vtable+0x2c virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x30 virtual void Pause(); // vtable+0x34 virtual void Resume(); // vtable+0x38 diff --git a/LEGO1/omni/include/mxsoundpresenter.h b/LEGO1/omni/include/mxsoundpresenter.h index 4d1ab300..1281b2be 100644 --- a/LEGO1/omni/include/mxsoundpresenter.h +++ b/LEGO1/omni/include/mxsoundpresenter.h @@ -9,25 +9,25 @@ class MxSoundPresenter : public MxAudioPresenter { public: // FUNCTION: LEGO1 0x1000d430 - virtual ~MxSoundPresenter() override { Destroy(TRUE); } + ~MxSoundPresenter() override { Destroy(TRUE); } // FUNCTION: LEGO1 0x1000d4a0 - inline virtual const char* ClassName() const // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f07a0 return "MxSoundPresenter"; } // FUNCTION: LEGO1 0x1000d4b0 - inline virtual MxBool IsA(const char* p_name) const // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxSoundPresenter::ClassName()) || MxAudioPresenter::IsA(p_name); } - virtual MxResult AddToManager() override; // vtable+0x34 + MxResult AddToManager() override; // vtable+0x34 // FUNCTION: LEGO1 0x1000d490 - virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38 + void Destroy() override { Destroy(FALSE); } // vtable+0x38 // SYNTHETIC: LEGO1 0x1000d5c0 // MxSoundPresenter::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxstillpresenter.h b/LEGO1/omni/include/mxstillpresenter.h index a559b7e5..2a64aa09 100644 --- a/LEGO1/omni/include/mxstillpresenter.h +++ b/LEGO1/omni/include/mxstillpresenter.h @@ -11,37 +11,37 @@ public: MxStillPresenter() { m_bitmapInfo = NULL; } // FUNCTION: LEGO1 0x10043550 - virtual ~MxStillPresenter() override { Destroy(TRUE); } // vtable+0x00 + ~MxStillPresenter() override { Destroy(TRUE); } // vtable+0x00 // FUNCTION: LEGO1 0x100435c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0184 return "MxStillPresenter"; } // FUNCTION: LEGO1 0x100435d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStillPresenter::ClassName()) || MxVideoPresenter::IsA(p_name); } - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void ParseExtra() override; // vtable+0x30 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void ParseExtra() override; // vtable+0x30 // FUNCTION: LEGO1 0x100435b0 - virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38 + void Destroy() override { Destroy(FALSE); } // vtable+0x38 - virtual void Enable(MxBool p_enable) override; // vtable+0x54 - virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c - virtual void CreateBitmap() override; // vtable+0x60 - virtual void NextFrame() override; // vtable+0x64 - virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 - virtual void RealizePalette() override; // vtable+0x70 - virtual void VTable0x88(MxS32 p_x, MxS32 p_y); // vtable+0x88 - virtual MxStillPresenter* Clone(); // vtable+0x8c + void Enable(MxBool p_enable) override; // vtable+0x54 + void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c + void CreateBitmap() override; // vtable+0x60 + void NextFrame() override; // vtable+0x64 + void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68 + void RealizePalette() override; // vtable+0x70 + virtual void VTable0x88(MxS32 p_x, MxS32 p_y); // vtable+0x88 + virtual MxStillPresenter* Clone(); // vtable+0x8c private: void Destroy(MxBool p_fromDestructor); diff --git a/LEGO1/omni/include/mxstreamchunk.h b/LEGO1/omni/include/mxstreamchunk.h index baa5edda..00e242d0 100644 --- a/LEGO1/omni/include/mxstreamchunk.h +++ b/LEGO1/omni/include/mxstreamchunk.h @@ -12,17 +12,17 @@ class MxStreamListMxDSSubscriber; class MxStreamChunk : public MxDSChunk { public: inline MxStreamChunk() : m_buffer(NULL) {} - virtual ~MxStreamChunk() override; + ~MxStreamChunk() override; // FUNCTION: LEGO1 0x100b1fe0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10101e5c return "MxStreamChunk"; } // FUNCTION: LEGO1 0x100b1ff0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(p_name); } diff --git a/LEGO1/omni/include/mxstreamchunklist.h b/LEGO1/omni/include/mxstreamchunklist.h index 9d8aec0e..defdd4a0 100644 --- a/LEGO1/omni/include/mxstreamchunklist.h +++ b/LEGO1/omni/include/mxstreamchunklist.h @@ -19,7 +19,7 @@ public: MxStreamChunkList() { m_customDestructor = Destroy; } // FUNCTION: LEGO1 0x100b5900 - virtual MxS8 Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) override + MxS8 Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) override { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } // vtable+0x14 diff --git a/LEGO1/omni/include/mxstreamcontroller.h b/LEGO1/omni/include/mxstreamcontroller.h index a23c2537..f4bd328f 100644 --- a/LEGO1/omni/include/mxstreamcontroller.h +++ b/LEGO1/omni/include/mxstreamcontroller.h @@ -19,17 +19,17 @@ class MxDSStreamingAction; class MxStreamController : public MxCore { public: MxStreamController(); - virtual ~MxStreamController() override; // vtable+0x00 + ~MxStreamController() override; // vtable+0x00 // FUNCTION: LEGO1 0x100c0f10 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x10102130 return "MxStreamController"; } // FUNCTION: LEGO1 0x100c0f20 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxstreamer.h b/LEGO1/omni/include/mxstreamer.h index 86c8956e..2308981d 100644 --- a/LEGO1/omni/include/mxstreamer.h +++ b/LEGO1/omni/include/mxstreamer.h @@ -58,7 +58,7 @@ public: m_controller = p_ctrlr; } - virtual MxNotificationParam* Clone() override; + MxNotificationParam* Clone() override; MxStreamController* GetController() { return m_controller; } @@ -76,22 +76,22 @@ public: }; MxStreamer(); - virtual ~MxStreamer() override; // vtable+0x00 + ~MxStreamer() override; // vtable+0x00 MxStreamController* Open(const char* p_name, MxU16 p_openMode); MxLong Close(const char* p_name); - virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 // FUNCTION: LEGO1 0x100b9000 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x1010210c return "MxStreamer"; } // FUNCTION: LEGO1 0x100b9010 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStreamer::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxstreamlist.h b/LEGO1/omni/include/mxstreamlist.h index 08cee5bc..0e0f1e9f 100644 --- a/LEGO1/omni/include/mxstreamlist.h +++ b/LEGO1/omni/include/mxstreamlist.h @@ -11,8 +11,9 @@ class MxStreamList : public list { public: MxBool PopFront(T& p_obj) { - if (this->empty()) + if (this->empty()) { return FALSE; + } p_obj = this->front(); this->pop_front(); @@ -29,8 +30,9 @@ public: // instead of MxDSAction. Until then, we use this helper. MxBool PopFrontStreamingAction(MxDSStreamingAction*& p_obj) { - if (empty()) + if (empty()) { return FALSE; + } p_obj = (MxDSStreamingAction*) front(); pop_front(); diff --git a/LEGO1/omni/include/mxstreamprovider.h b/LEGO1/omni/include/mxstreamprovider.h index 803038e3..1082fffe 100644 --- a/LEGO1/omni/include/mxstreamprovider.h +++ b/LEGO1/omni/include/mxstreamprovider.h @@ -15,13 +15,13 @@ public: inline MxStreamProvider() : m_pLookup(NULL), m_pFile(NULL) {} // FUNCTION: LEGO1 0x100d07e0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { return "MxStreamProvider"; } // FUNCTION: LEGO1 0x100d07f0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStreamProvider::ClassName()) || MxCore::IsA(p_name); } diff --git a/LEGO1/omni/include/mxstring.h b/LEGO1/omni/include/mxstring.h index 1c745845..3ad5ac4e 100644 --- a/LEGO1/omni/include/mxstring.h +++ b/LEGO1/omni/include/mxstring.h @@ -8,7 +8,7 @@ class MxString : public MxCore { public: MxString(const MxString& p_str); - virtual ~MxString(); + ~MxString() override; const MxString& operator=(const char* p_data); MxString(); diff --git a/LEGO1/omni/include/mxthread.h b/LEGO1/omni/include/mxthread.h index 5ab80041..93b14fb1 100644 --- a/LEGO1/omni/include/mxthread.h +++ b/LEGO1/omni/include/mxthread.h @@ -47,7 +47,7 @@ protected: class MxTickleThread : public MxThread { public: MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS); - virtual ~MxTickleThread() {} + ~MxTickleThread() override {} MxResult Run() override; diff --git a/LEGO1/omni/include/mxticklemanager.h b/LEGO1/omni/include/mxticklemanager.h index dba9b029..f07d0dc3 100644 --- a/LEGO1/omni/include/mxticklemanager.h +++ b/LEGO1/omni/include/mxticklemanager.h @@ -36,9 +36,9 @@ typedef list MxTickleClientPtrList; class MxTickleManager : public MxCore { public: inline MxTickleManager() {} - virtual ~MxTickleManager(); // vtable+0x00 (scalar deleting destructor) + ~MxTickleManager() override; // vtable+0x00 (scalar deleting destructor) - virtual MxResult Tickle(); // vtable+0x08 + MxResult Tickle() override; // vtable+0x08 virtual void RegisterClient(MxCore* p_client, MxTime p_interval); // vtable+0x14 virtual void UnregisterClient(MxCore* p_client); // vtable+0x18 virtual void SetClientTickleInterval(MxCore* p_client, MxTime p_interval); // vtable+0x1c diff --git a/LEGO1/omni/include/mxtimer.h b/LEGO1/omni/include/mxtimer.h index f9851c44..468cd602 100644 --- a/LEGO1/omni/include/mxtimer.h +++ b/LEGO1/omni/include/mxtimer.h @@ -16,10 +16,12 @@ public: inline MxLong GetTime() { - if (this->m_isRunning) + if (this->m_isRunning) { return g_lastTimeTimerStarted; - else + } + else { return g_lastTimeCalculated - this->m_startTime; + } } // SYNTHETIC: LEGO1 0x100ae0d0 diff --git a/LEGO1/omni/include/mxvariabletable.h b/LEGO1/omni/include/mxvariabletable.h index 1eec195f..81059f9d 100644 --- a/LEGO1/omni/include/mxvariabletable.h +++ b/LEGO1/omni/include/mxvariabletable.h @@ -16,8 +16,8 @@ public: static void Destroy(MxVariable* p_obj) { p_obj->Destroy(); } - virtual MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14 - virtual MxU32 Hash(MxVariable*) override; // vtable+0x18 + MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14 + MxU32 Hash(MxVariable*) override; // vtable+0x18 // SYNTHETIC: LEGO1 0x100afdd0 // MxVariableTable::`scalar deleting destructor' diff --git a/LEGO1/omni/include/mxvideomanager.h b/LEGO1/omni/include/mxvideomanager.h index b2719529..a915f5f5 100644 --- a/LEGO1/omni/include/mxvideomanager.h +++ b/LEGO1/omni/include/mxvideomanager.h @@ -14,10 +14,10 @@ class MxVideoManager : public MxMediaManager { public: MxVideoManager(); - virtual ~MxVideoManager() override; + ~MxVideoManager() override; - virtual MxResult Tickle() override; // vtable+0x08 - virtual void Destroy() override; // vtable+0x18 + MxResult Tickle() override; // vtable+0x08 + void Destroy() override; // vtable+0x18 virtual MxResult VTable0x28( MxVideoParam& p_videoParam, LPDIRECTDRAW p_pDirectDraw, diff --git a/LEGO1/omni/include/mxvideopresenter.h b/LEGO1/omni/include/mxvideopresenter.h index 2fc3b1f4..06436163 100644 --- a/LEGO1/omni/include/mxvideopresenter.h +++ b/LEGO1/omni/include/mxvideopresenter.h @@ -13,34 +13,34 @@ public: MxVideoPresenter() { Init(); } // FUNCTION: LEGO1 0x1000c740 - virtual ~MxVideoPresenter() override { Destroy(TRUE); } // vtable+0x00 + ~MxVideoPresenter() override { Destroy(TRUE); } // vtable+0x00 // FUNCTION: LEGO1 0x1000c820 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f0760 return "MxVideoPresenter"; } // FUNCTION: LEGO1 0x1000c830 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxVideoPresenter::ClassName()) || MxMediaPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void RepeatingTickle() override; // vtable+0x24 - virtual void Unk5Tickle() override; // vtable+0x28 - virtual MxResult AddToManager() override; // vtable+0x34 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void RepeatingTickle() override; // vtable+0x24 + void Unk5Tickle() override; // vtable+0x28 + MxResult AddToManager() override; // vtable+0x34 // FUNCTION: LEGO1 0x1000c7a0 - virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38 + void Destroy() override { Destroy(FALSE); } // vtable+0x38 - virtual void EndAction() override; // vtable+0x40 - virtual MxResult PutData() override; // vtable+0x4c - virtual MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50 + void EndAction() override; // vtable+0x40 + MxResult PutData() override; // vtable+0x4c + MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50 // FUNCTION: LEGO1 0x1000c700 virtual void LoadHeader(MxStreamChunk* p_chunk){}; // vtable+0x5c diff --git a/LEGO1/omni/include/mxwavepresenter.h b/LEGO1/omni/include/mxwavepresenter.h index 8976b458..982914bf 100644 --- a/LEGO1/omni/include/mxwavepresenter.h +++ b/LEGO1/omni/include/mxwavepresenter.h @@ -13,38 +13,38 @@ public: MxWavePresenter() { Init(); } // FUNCTION: LEGO1 0x1000d640 - virtual ~MxWavePresenter() override { Destroy(TRUE); } // vtable+0x00 + ~MxWavePresenter() override { Destroy(TRUE); } // vtable+0x00 // FUNCTION: LEGO1 0x1000d6c0 - inline virtual const char* ClassName() const override // vtable+0x0c + inline const char* ClassName() const override // vtable+0x0c { // STRING: LEGO1 0x100f07b4 return "MxWavePresenter"; } // FUNCTION: LEGO1 0x1000d6d0 - inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 + inline MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxWavePresenter::ClassName()) || MxSoundPresenter::IsA(p_name); } - virtual void ReadyTickle() override; // vtable+0x18 - virtual void StartingTickle() override; // vtable+0x1c - virtual void StreamingTickle() override; // vtable+0x20 - virtual void DoneTickle() override; // vtable+0x2c - virtual void ParseExtra() override; // vtable+0x30 - virtual MxResult AddToManager() override; // vtable+0x34 + void ReadyTickle() override; // vtable+0x18 + void StartingTickle() override; // vtable+0x1c + void StreamingTickle() override; // vtable+0x20 + void DoneTickle() override; // vtable+0x2c + void ParseExtra() override; // vtable+0x30 + MxResult AddToManager() override; // vtable+0x34 // FUNCTION: LEGO1 0x1000d6a0 - virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38 + void Destroy() override { Destroy(FALSE); } // vtable+0x38 - virtual void EndAction() override; // vtable+0x40 - virtual MxResult PutData() override; // vtable+0x4c - virtual void Enable(MxBool p_enable) override; // vtable+0x54 - virtual void LoopChunk(MxStreamChunk* p_chunk) override; // vtable+0x58 - virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60 - virtual void Pause(); // vtable+0x64 - virtual void Resume(); // vtable+0x68 + void EndAction() override; // vtable+0x40 + MxResult PutData() override; // vtable+0x4c + void Enable(MxBool p_enable) override; // vtable+0x54 + void LoopChunk(MxStreamChunk* p_chunk) override; // vtable+0x58 + void SetVolume(MxS32 p_volume) override; // vtable+0x60 + virtual void Pause(); // vtable+0x64 + virtual void Resume(); // vtable+0x68 // FUNCTION: LEGO1 0x1000d6b0 virtual MxBool IsPaused() { return m_paused; } // vtable+0x6c diff --git a/LEGO1/omni/src/action/mxdsaction.cpp b/LEGO1/omni/src/action/mxdsaction.cpp index cea02696..49f40561 100644 --- a/LEGO1/omni/src/action/mxdsaction.cpp +++ b/LEGO1/omni/src/action/mxdsaction.cpp @@ -108,8 +108,9 @@ MxU32 MxDSAction::GetSizeOnDisk() // FUNCTION: LEGO1 0x100adc10 MxDSAction& MxDSAction::operator=(MxDSAction& p_dsAction) { - if (this == &p_dsAction) + if (this == &p_dsAction) { return *this; + } MxDSObject::operator=(p_dsAction); this->CopyFrom(p_dsAction); @@ -121,8 +122,9 @@ MxDSAction* MxDSAction::Clone() { MxDSAction* clone = new MxDSAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -136,35 +138,47 @@ MxLong MxDSAction::GetElapsedTime() // FUNCTION: LEGO1 0x100add00 void MxDSAction::MergeFrom(MxDSAction& p_dsAction) { - if (p_dsAction.m_startTime != INT_MIN) + if (p_dsAction.m_startTime != INT_MIN) { this->m_startTime = p_dsAction.m_startTime; + } - if (p_dsAction.GetDuration() != INT_MIN) + if (p_dsAction.GetDuration() != INT_MIN) { this->m_duration = p_dsAction.GetDuration(); + } - if (p_dsAction.m_loopCount != -1) + if (p_dsAction.m_loopCount != -1) { this->m_loopCount = p_dsAction.m_loopCount; + } - if (p_dsAction.m_location[0] != FLT_MAX) + if (p_dsAction.m_location[0] != FLT_MAX) { this->m_location[0] = p_dsAction.m_location[0]; - if (p_dsAction.m_location[1] != FLT_MAX) + } + if (p_dsAction.m_location[1] != FLT_MAX) { this->m_location[1] = p_dsAction.m_location[1]; - if (p_dsAction.m_location[2] != FLT_MAX) + } + if (p_dsAction.m_location[2] != FLT_MAX) { this->m_location[2] = p_dsAction.m_location[2]; + } - if (p_dsAction.m_direction[0] != FLT_MAX) + if (p_dsAction.m_direction[0] != FLT_MAX) { this->m_direction[0] = p_dsAction.m_direction[0]; - if (p_dsAction.m_direction[1] != FLT_MAX) + } + if (p_dsAction.m_direction[1] != FLT_MAX) { this->m_direction[1] = p_dsAction.m_direction[1]; - if (p_dsAction.m_direction[2] != FLT_MAX) + } + if (p_dsAction.m_direction[2] != FLT_MAX) { this->m_direction[2] = p_dsAction.m_up[2]; // This is correct + } - if (p_dsAction.m_up[0] != FLT_MAX) + if (p_dsAction.m_up[0] != FLT_MAX) { this->m_up[0] = p_dsAction.m_up[0]; - if (p_dsAction.m_up[1] != FLT_MAX) + } + if (p_dsAction.m_up[1] != FLT_MAX) { this->m_up[1] = p_dsAction.m_up[1]; - if (p_dsAction.m_up[2] != FLT_MAX) + } + if (p_dsAction.m_up[2] != FLT_MAX) { this->m_up[2] = p_dsAction.m_up[2]; + } MxU16 extraLength = p_dsAction.m_extraLength; char* extraData = p_dsAction.m_extraData; @@ -185,8 +199,9 @@ void MxDSAction::MergeFrom(MxDSAction& p_dsAction) // FUNCTION: LEGO1 0x100ade60 void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData) { - if (this->m_extraData == p_extraData || !p_extraData) + if (this->m_extraData == p_extraData || !p_extraData) { return; + } if (this->m_extraLength) { char* concat = new char[p_extraLength + this->m_extraLength + sizeof(g_sep)]; diff --git a/LEGO1/omni/src/action/mxdsanim.cpp b/LEGO1/omni/src/action/mxdsanim.cpp index cef2321c..c90933b1 100644 --- a/LEGO1/omni/src/action/mxdsanim.cpp +++ b/LEGO1/omni/src/action/mxdsanim.cpp @@ -21,8 +21,9 @@ void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim) // FUNCTION: LEGO1 0x100c9200 MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim) { - if (this == &p_dsAnim) + if (this == &p_dsAnim) { return *this; + } MxDSMediaAction::operator=(p_dsAnim); this->CopyFrom(p_dsAnim); @@ -34,8 +35,9 @@ MxDSAction* MxDSAnim::Clone() { MxDSAnim* clone = new MxDSAnim(); - if (clone) + if (clone) { *clone = *this; + } return clone; } diff --git a/LEGO1/omni/src/action/mxdsevent.cpp b/LEGO1/omni/src/action/mxdsevent.cpp index bc925369..64702e65 100644 --- a/LEGO1/omni/src/action/mxdsevent.cpp +++ b/LEGO1/omni/src/action/mxdsevent.cpp @@ -21,8 +21,9 @@ void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent) // FUNCTION: LEGO1 0x100c9800 MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent) { - if (this == &p_dsEvent) + if (this == &p_dsEvent) { return *this; + } MxDSMediaAction::operator=(p_dsEvent); this->CopyFrom(p_dsEvent); @@ -34,8 +35,9 @@ MxDSAction* MxDSEvent::Clone() { MxDSEvent* clone = new MxDSEvent(); - if (clone) + if (clone) { *clone = *this; + } return clone; } diff --git a/LEGO1/omni/src/action/mxdsmediaaction.cpp b/LEGO1/omni/src/action/mxdsmediaaction.cpp index fda2721a..c563b380 100644 --- a/LEGO1/omni/src/action/mxdsmediaaction.cpp +++ b/LEGO1/omni/src/action/mxdsmediaaction.cpp @@ -39,8 +39,9 @@ void MxDSMediaAction::CopyFrom(MxDSMediaAction& p_dsMediaAction) // FUNCTION: LEGO1 0x100c8dc0 MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction) { - if (this == &p_dsMediaAction) + if (this == &p_dsMediaAction) { return *this; + } MxDSAction::operator=(p_dsMediaAction); this->CopyFrom(p_dsMediaAction); @@ -52,8 +53,9 @@ MxDSAction* MxDSMediaAction::Clone() { MxDSMediaAction* clone = new MxDSMediaAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -61,18 +63,21 @@ MxDSAction* MxDSMediaAction::Clone() // FUNCTION: LEGO1 0x100c8e80 void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath) { - if (this->m_mediaSrcPath == p_mediaSrcPath) + if (this->m_mediaSrcPath == p_mediaSrcPath) { return; + } delete[] this->m_mediaSrcPath; if (p_mediaSrcPath) { this->m_mediaSrcPath = new char[strlen(p_mediaSrcPath) + 1]; - if (this->m_mediaSrcPath) + if (this->m_mediaSrcPath) { strcpy(this->m_mediaSrcPath, p_mediaSrcPath); + } } - else + else { this->m_mediaSrcPath = NULL; + } } // FUNCTION: LEGO1 0x100c8f00 @@ -86,10 +91,12 @@ MxU32 MxDSMediaAction::GetSizeOnDisk() { MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk(); - if (this->m_mediaSrcPath) + if (this->m_mediaSrcPath) { totalSizeOnDisk += strlen(this->m_mediaSrcPath) + 1; - else + } + else { totalSizeOnDisk++; + } totalSizeOnDisk += 24; this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk(); diff --git a/LEGO1/omni/src/action/mxdsmultiaction.cpp b/LEGO1/omni/src/action/mxdsmultiaction.cpp index 64e20a55..40216ae7 100644 --- a/LEGO1/omni/src/action/mxdsmultiaction.cpp +++ b/LEGO1/omni/src/action/mxdsmultiaction.cpp @@ -15,8 +15,9 @@ MxDSMultiAction::MxDSMultiAction() // FUNCTION: LEGO1 0x100ca060 MxDSMultiAction::~MxDSMultiAction() { - if (this->m_actions) + if (this->m_actions) { delete this->m_actions; + } } // FUNCTION: LEGO1 0x100ca0d0 @@ -26,15 +27,17 @@ void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction) MxDSActionListCursor cursor(p_dsMultiAction.m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { this->m_actions->Append(action->Clone()); + } } // FUNCTION: LEGO1 0x100ca260 MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction) { - if (this == &p_dsMultiAction) + if (this == &p_dsMultiAction) { return *this; + } MxDSAction::operator=(p_dsMultiAction); this->CopyFrom(p_dsMultiAction); @@ -48,8 +51,9 @@ void MxDSMultiAction::SetUnknown90(MxLong p_unk0x90) MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { action->SetUnknown90(p_unk0x90); + } } // FUNCTION: LEGO1 0x100ca370 @@ -59,21 +63,24 @@ void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction) MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { action->MergeFrom(p_dsMultiAction); + } } // FUNCTION: LEGO1 0x100ca450 MxBool MxDSMultiAction::HasId(MxU32 p_objectId) { - if (this->GetObjectId() == p_objectId) + if (this->GetObjectId() == p_objectId) { return TRUE; + } MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; while (cursor.Next(action)) { - if (action->HasId(p_objectId)) + if (action->HasId(p_objectId)) { return TRUE; + } } return FALSE; @@ -84,8 +91,9 @@ MxDSAction* MxDSMultiAction::Clone() { MxDSMultiAction* clone = new MxDSMultiAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -97,8 +105,9 @@ undefined4 MxDSMultiAction::VTable0x14() MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { result += action->VTable0x14(); + } return result; } @@ -110,8 +119,9 @@ MxU32 MxDSMultiAction::GetSizeOnDisk() MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { totalSizeOnDisk += action->GetSizeOnDisk(); + } this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk(); @@ -151,6 +161,7 @@ void MxDSMultiAction::SetAtomId(MxAtomId p_atomId) MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; - while (cursor.Next(action)) + while (cursor.Next(action)) { action->SetAtomId(p_atomId); + } } diff --git a/LEGO1/omni/src/action/mxdsobject.cpp b/LEGO1/omni/src/action/mxdsobject.cpp index 6d11476d..9bbdf195 100644 --- a/LEGO1/omni/src/action/mxdsobject.cpp +++ b/LEGO1/omni/src/action/mxdsobject.cpp @@ -52,8 +52,9 @@ void MxDSObject::CopyFrom(MxDSObject& p_dsObject) // FUNCTION: LEGO1 0x100bf8c0 MxDSObject& MxDSObject::operator=(MxDSObject& p_dsObject) { - if (this == &p_dsObject) + if (this == &p_dsObject) { return *this; + } this->CopyFrom(p_dsObject); return *this; @@ -108,17 +109,21 @@ MxU32 MxDSObject::GetSizeOnDisk() { MxU32 sizeOnDisk; - if (this->m_sourceName) + if (this->m_sourceName) { sizeOnDisk = strlen(this->m_sourceName) + 3; - else + } + else { sizeOnDisk = 3; + } sizeOnDisk += 4; - if (this->m_objectName) + if (this->m_objectName) { sizeOnDisk += strlen(this->m_objectName) + 1; - else + } + else { sizeOnDisk++; + } sizeOnDisk += 4; this->m_sizeOnDisk = sizeOnDisk; diff --git a/LEGO1/omni/src/action/mxdsobjectaction.cpp b/LEGO1/omni/src/action/mxdsobjectaction.cpp index db8b149f..40eadec3 100644 --- a/LEGO1/omni/src/action/mxdsobjectaction.cpp +++ b/LEGO1/omni/src/action/mxdsobjectaction.cpp @@ -21,8 +21,9 @@ void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction) // FUNCTION: LEGO1 0x100c8a80 MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction) { - if (this == &p_dsObjectAction) + if (this == &p_dsObjectAction) { return *this; + } MxDSMediaAction::operator=(p_dsObjectAction); this->CopyFrom(p_dsObjectAction); @@ -34,8 +35,9 @@ MxDSAction* MxDSObjectAction::Clone() { MxDSObjectAction* clone = new MxDSObjectAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } diff --git a/LEGO1/omni/src/action/mxdsparallelaction.cpp b/LEGO1/omni/src/action/mxdsparallelaction.cpp index a14a326f..f4e61245 100644 --- a/LEGO1/omni/src/action/mxdsparallelaction.cpp +++ b/LEGO1/omni/src/action/mxdsparallelaction.cpp @@ -23,8 +23,9 @@ void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction) // FUNCTION: LEGO1 0x100cb0a0 MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction) { - if (this == &p_dsParallelAction) + if (this == &p_dsParallelAction) { return *this; + } MxDSMultiAction::operator=(p_dsParallelAction); this->CopyFrom(p_dsParallelAction); @@ -36,8 +37,9 @@ MxDSAction* MxDSParallelAction::Clone() { MxDSParallelAction* clone = new MxDSParallelAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -45,15 +47,17 @@ MxDSAction* MxDSParallelAction::Clone() // FUNCTION: LEGO1 0x100cb160 MxLong MxDSParallelAction::GetDuration() { - if (this->m_duration) + if (this->m_duration) { return this->m_duration; + } MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; while (cursor.Next(action)) { - if (!action) + if (!action) { continue; + } MxLong duration = action->GetDuration(); if (duration == -1) { @@ -65,10 +69,12 @@ MxLong MxDSParallelAction::GetDuration() if (action->IsA("MxDSMediaAction")) { MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime(); - if (sustainTime == -1) + if (sustainTime == -1) { duration = -1; - else if (sustainTime) + } + else if (sustainTime) { duration += sustainTime; + } } if (duration == -1) { @@ -76,12 +82,14 @@ MxLong MxDSParallelAction::GetDuration() break; } - if (this->m_duration < duration) + if (this->m_duration < duration) { this->m_duration = duration; + } } - if (this->IsBit3()) + if (this->IsBit3()) { this->m_duration *= this->m_loopCount; + } return this->m_duration; } diff --git a/LEGO1/omni/src/action/mxdsselectaction.cpp b/LEGO1/omni/src/action/mxdsselectaction.cpp index ddadde84..97e9ff73 100644 --- a/LEGO1/omni/src/action/mxdsselectaction.cpp +++ b/LEGO1/omni/src/action/mxdsselectaction.cpp @@ -19,8 +19,9 @@ MxDSSelectAction::MxDSSelectAction() // FUNCTION: LEGO1 0x100cb8d0 MxDSSelectAction::~MxDSSelectAction() { - if (this->m_unk0xac) + if (this->m_unk0xac) { delete this->m_unk0xac; + } } // FUNCTION: LEGO1 0x100cb950 @@ -32,8 +33,9 @@ void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction) MxStringListCursor cursor(p_dsSelectAction.m_unk0xac); MxString string; - while (cursor.Next(string)) + while (cursor.Next(string)) { this->m_unk0xac->Append(string); + } } // FUNCTION: LEGO1 0x100cbd50 @@ -51,8 +53,9 @@ MxDSAction* MxDSSelectAction::Clone() { MxDSSelectAction* clone = new MxDSSelectAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -66,8 +69,9 @@ MxU32 MxDSSelectAction::GetSizeOnDisk() MxStringListCursor cursor(this->m_unk0xac); MxString string; - while (cursor.Next(string)) + while (cursor.Next(string)) { totalSizeOnDisk += strlen(string.GetData()) + 1; + } // Note: unlike the other classes, MxDSSelectAction does not have its own // sizeOnDisk member. Instead, it overrides the one from MxDSMultiAction. @@ -95,8 +99,9 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24) MxS32 random = rand() % value; string = itoa((MxS16) random, buffer, 10); } - else + else { string = VariableTable()->GetVariable((char*) *p_source); + } *p_source += strlen((char*) *p_source) + 1; @@ -109,8 +114,9 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24) MxU32 i; for (i = 0; i < count; i++) { - if (!strcmp(string.GetData(), (char*) *p_source)) + if (!strcmp(string.GetData(), (char*) *p_source)) { index = i; + } this->m_unk0xac->Append((char*) *p_source); *p_source += strlen((char*) *p_source) + 1; @@ -122,10 +128,12 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24) MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24); - if (index == i) + if (index == i) { this->m_actions->Append(action); - else + } + else { delete action; + } *p_source += extraFlag; } diff --git a/LEGO1/omni/src/action/mxdsserialaction.cpp b/LEGO1/omni/src/action/mxdsserialaction.cpp index 24513f48..b03efdf0 100644 --- a/LEGO1/omni/src/action/mxdsserialaction.cpp +++ b/LEGO1/omni/src/action/mxdsserialaction.cpp @@ -21,8 +21,9 @@ void MxDSSerialAction::SetDuration(MxLong p_duration) // FUNCTION: LEGO1 0x100cac10 MxDSSerialAction::~MxDSSerialAction() { - if (this->m_cursor) + if (this->m_cursor) { delete this->m_cursor; + } this->m_cursor = NULL; } @@ -35,8 +36,9 @@ void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction) // FUNCTION: LEGO1 0x100caca0 MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction) { - if (this == &p_dsSerialAction) + if (this == &p_dsSerialAction) { return *this; + } MxDSMultiAction::operator=(p_dsSerialAction); this->CopyFrom(p_dsSerialAction); @@ -48,8 +50,9 @@ MxDSAction* MxDSSerialAction::Clone() { MxDSSerialAction* clone = new MxDSSerialAction(); - if (clone) + if (clone) { *clone = *this; + } return clone; } @@ -57,23 +60,26 @@ MxDSAction* MxDSSerialAction::Clone() // FUNCTION: LEGO1 0x100cad60 MxLong MxDSSerialAction::GetDuration() { - if (this->m_duration) + if (this->m_duration) { return this->m_duration; + } MxDSActionListCursor cursor(this->m_actions); MxDSAction* action; while (cursor.Next(action)) { - if (!action) + if (!action) { continue; + } this->m_duration += action->GetDuration() + action->GetStartTime(); if (action->IsA("MxDSMediaAction")) { MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime(); - if (sustainTime && sustainTime != -1) + if (sustainTime && sustainTime != -1) { this->m_duration += sustainTime; + } } } diff --git a/LEGO1/omni/src/action/mxdssound.cpp b/LEGO1/omni/src/action/mxdssound.cpp index 61022cab..e75ad0c9 100644 --- a/LEGO1/omni/src/action/mxdssound.cpp +++ b/LEGO1/omni/src/action/mxdssound.cpp @@ -26,8 +26,9 @@ void MxDSSound::CopyFrom(MxDSSound& p_dsSound) // FUNCTION: LEGO1 0x100c94e0 MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound) { - if (this == &p_dsSound) + if (this == &p_dsSound) { return *this; + } MxDSMediaAction::operator=(p_dsSound); this->CopyFrom(p_dsSound); @@ -39,8 +40,9 @@ MxDSAction* MxDSSound::Clone() { MxDSSound* clone = new MxDSSound(); - if (clone) + if (clone) { *clone = *this; + } return clone; } diff --git a/LEGO1/omni/src/action/mxdsstill.cpp b/LEGO1/omni/src/action/mxdsstill.cpp index 59a78ffc..c044a2e6 100644 --- a/LEGO1/omni/src/action/mxdsstill.cpp +++ b/LEGO1/omni/src/action/mxdsstill.cpp @@ -21,8 +21,9 @@ void MxDSStill::CopyFrom(MxDSStill& p_dsStill) // FUNCTION: LEGO1 0x100c9ad0 MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill) { - if (this == &p_dsStill) + if (this == &p_dsStill) { return *this; + } MxDSMediaAction::operator=(p_dsStill); this->CopyFrom(p_dsStill); @@ -34,8 +35,9 @@ MxDSAction* MxDSStill::Clone() { MxDSStill* clone = new MxDSStill(); - if (clone) + if (clone) { *clone = *this; + } return clone; } diff --git a/LEGO1/omni/src/action/mxdsstreamingaction.cpp b/LEGO1/omni/src/action/mxdsstreamingaction.cpp index e8eb4dc1..85759897 100644 --- a/LEGO1/omni/src/action/mxdsstreamingaction.cpp +++ b/LEGO1/omni/src/action/mxdsstreamingaction.cpp @@ -17,8 +17,9 @@ MxDSStreamingAction::MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset) // FUNCTION: LEGO1 0x100cd090 MxBool MxDSStreamingAction::HasId(MxU32 p_objectId) { - if (this->m_internalAction) + if (this->m_internalAction) { return this->m_internalAction->HasId(p_objectId); + } return FALSE; } @@ -32,12 +33,15 @@ MxDSStreamingAction::MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingActio // FUNCTION: LEGO1 0x100cd150 MxDSStreamingAction::~MxDSStreamingAction() { - if (this->m_unk0xa0) + if (this->m_unk0xa0) { delete this->m_unk0xa0; - if (this->m_unk0xa4) + } + if (this->m_unk0xa4) { delete this->m_unk0xa4; - if (this->m_internalAction) + } + if (this->m_internalAction) { delete this->m_internalAction; + } } // FUNCTION: LEGO1 0x100cd1e0 @@ -73,16 +77,18 @@ MxDSStreamingAction* MxDSStreamingAction::CopyFrom(MxDSStreamingAction& p_dsStre // FUNCTION: LEGO1 0x100cd2a0 void MxDSStreamingAction::SetInternalAction(MxDSAction* p_dsAction) { - if (this->m_internalAction) + if (this->m_internalAction) { delete this->m_internalAction; + } this->m_internalAction = p_dsAction; } // FUNCTION: LEGO1 0x100cd2d0 void MxDSStreamingAction::FUN_100cd2d0() { - if (this->m_duration == -1) + if (this->m_duration == -1) { return; + } MxLong duration = this->m_duration / this->m_loopCount; this->m_loopCount--; diff --git a/LEGO1/omni/src/audio/mxaudiomanager.cpp b/LEGO1/omni/src/audio/mxaudiomanager.cpp index a2d6072a..0be79a24 100644 --- a/LEGO1/omni/src/audio/mxaudiomanager.cpp +++ b/LEGO1/omni/src/audio/mxaudiomanager.cpp @@ -31,8 +31,9 @@ void MxAudioManager::Destroy(MxBool p_fromDestructor) Init(); this->m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaManager::Destroy(); + } } // FUNCTION: LEGO1 0x100b8e40 @@ -48,11 +49,13 @@ MxResult MxAudioManager::InitPresenters() g_count++; } - if (result) + if (result) { Destroy(); + } - if (success) + if (success) { this->m_criticalSection.Leave(); + } return result; } diff --git a/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp b/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp index 77b32506..c7f4ea1c 100644 --- a/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp +++ b/LEGO1/omni/src/audio/mxloopingmidipresenter.cpp @@ -20,17 +20,20 @@ void MxLoopingMIDIPresenter::StreamingTickle() return; } - if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) + if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) { ProgressTickleState(e_done); + } } // FUNCTION: LEGO1 0x100c2ae0 void MxLoopingMIDIPresenter::DoneTickle() { - if (m_action->GetLoopCount()) + if (m_action->GetLoopCount()) { MxMIDIPresenter::DoneTickle(); - else + } + else { EndAction(); + } } // FUNCTION: LEGO1 0x100c2b00 diff --git a/LEGO1/omni/src/audio/mxmidipresenter.cpp b/LEGO1/omni/src/audio/mxmidipresenter.cpp index 5796fb67..b281ac64 100644 --- a/LEGO1/omni/src/audio/mxmidipresenter.cpp +++ b/LEGO1/omni/src/audio/mxmidipresenter.cpp @@ -34,14 +34,16 @@ void MxMIDIPresenter::Destroy(MxBool p_fromDestructor) m_criticalSection.Enter(); - if (m_subscriber && m_chunk) + if (m_subscriber && m_chunk) { m_subscriber->DestroyChunk(m_chunk); + } Init(); m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMusicPresenter::Destroy(); + } } // FUNCTION: LEGO1 0x100c2890 @@ -61,24 +63,28 @@ void MxMIDIPresenter::StartingTickle() { MxStreamChunk* chunk = CurrentChunk(); - if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) + if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) { ProgressTickleState(e_streaming); + } } // FUNCTION: LEGO1 0x100c2910 void MxMIDIPresenter::StreamingTickle() { - if (m_chunk) + if (m_chunk) { ProgressTickleState(e_done); - else + } + else { m_chunk = NextChunk(); + } } // FUNCTION: LEGO1 0x100c2940 void MxMIDIPresenter::DoneTickle() { - if (!MusicManager()->GetMIDIInitialized()) + if (!MusicManager()->GetMIDIInitialized()) { EndAction(); + } } // FUNCTION: LEGO1 0x100c2960 @@ -95,8 +101,9 @@ MxResult MxMIDIPresenter::PutData() if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) { SetVolume(((MxDSSound*) m_action)->GetVolume()); - if (MusicManager()->InitializeMIDI(m_chunk->GetData(), 1) != SUCCESS) + if (MusicManager()->InitializeMIDI(m_chunk->GetData(), 1) != SUCCESS) { EndAction(); + } } m_criticalSection.Leave(); diff --git a/LEGO1/omni/src/audio/mxmusicmanager.cpp b/LEGO1/omni/src/audio/mxmusicmanager.cpp index 7a0684f8..23562678 100644 --- a/LEGO1/omni/src/audio/mxmusicmanager.cpp +++ b/LEGO1/omni/src/audio/mxmusicmanager.cpp @@ -82,8 +82,9 @@ MxResult MxMusicManager::ResetStream() } if (m_midiHdrP->dwFlags & MHDR_DONE || m_midiHdrP->dwFlags & MHDR_PREPARED) { - if (midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR)) != MMSYSERR_NOERROR) + if (midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR)) != MMSYSERR_NOERROR) { goto done; + } memset(m_midiHdrP, 0, sizeof(MIDIHDR)); } @@ -131,8 +132,9 @@ void MxMusicManager::SetMIDIVolume() // FUNCTION: LEGO1 0x100c0820 void CALLBACK MxMusicManager::MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2) { - if (p_uMsg == MOM_DONE) + if (p_uMsg == MOM_DONE) { ((MxMusicManager*) p_dwUser)->ResetStream(); + } } // FUNCTION: LEGO1 0x100c0840 @@ -147,21 +149,25 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) locked = TRUE; m_thread = new MxTickleThread(this, p_frequencyMS); - if (!m_thread || m_thread->Start(0, 0) != SUCCESS) + if (!m_thread || m_thread->Start(0, 0) != SUCCESS) { goto done; + } } - else + else { TickleManager()->RegisterClient(this, p_frequencyMS); + } status = SUCCESS; } done: - if (status != SUCCESS) + if (status != SUCCESS) { Destroy(); + } - if (locked) + if (locked) { m_criticalSection.Leave(); + } return status; } @@ -211,22 +217,26 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount) for (; device < total; device++) { MIDIOUTCAPSA caps; midiOutGetDevCapsA(device, &caps, sizeof(MIDIOUTCAPSA)); - if (caps.wTechnology == MOD_FMSYNTH) + if (caps.wTechnology == MOD_FMSYNTH) { break; + } } - if (device >= total) + if (device >= total) { device = -1; + } if (midiStreamOpen(&m_midiStreamH, &device, 1, (DWORD) MidiCallbackProc, (DWORD) this, CALLBACK_FUNCTION) != - MMSYSERR_NOERROR) + MMSYSERR_NOERROR) { goto done; + } GetMIDIVolume(m_midiVolume); m_midiHdrP = new MIDIHDR(); - if (!m_midiHdrP) + if (!m_midiHdrP) { goto done; + } memset(m_midiHdrP, 0, sizeof(MIDIHDR)); @@ -236,8 +246,9 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount) m_bufferOffset += 0x14; timediv.dwTimeDiv = *((DWORD*) m_bufferOffset); - if (midiStreamProperty(m_midiStreamH, (LPBYTE) &timediv, MIDIPROP_SET | MIDIPROP_TIMEDIV) != MMSYSERR_NOERROR) + if (midiStreamProperty(m_midiStreamH, (LPBYTE) &timediv, MIDIPROP_SET | MIDIPROP_TIMEDIV) != MMSYSERR_NOERROR) { goto done; + } m_bufferOffset += 0x14; m_bufferSize = *((MxU32*) m_bufferOffset); @@ -246,12 +257,14 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount) m_midiInitialized = TRUE; ResetBuffer(); - if (ResetStream() != SUCCESS) + if (ResetStream() != SUCCESS) { goto done; + } SetMIDIVolume(); - if (midiStreamRestart(m_midiStreamH) != MMSYSERR_NOERROR) + if (midiStreamRestart(m_midiStreamH) != MMSYSERR_NOERROR) { goto done; + } result = SUCCESS; } diff --git a/LEGO1/omni/src/audio/mxsoundmanager.cpp b/LEGO1/omni/src/audio/mxsoundmanager.cpp index b06c5e37..55055107 100644 --- a/LEGO1/omni/src/audio/mxsoundmanager.cpp +++ b/LEGO1/omni/src/audio/mxsoundmanager.cpp @@ -59,46 +59,55 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) MxResult status = FAILURE; MxBool locked = FALSE; - if (MxAudioManager::InitPresenters() != SUCCESS) + if (MxAudioManager::InitPresenters() != SUCCESS) { goto done; + } m_criticalSection.Enter(); locked = TRUE; - if (DirectSoundCreate(NULL, &m_directSound, NULL) != DS_OK) + if (DirectSoundCreate(NULL, &m_directSound, NULL) != DS_OK) { goto done; + } - if (m_directSound->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DSSCL_PRIORITY) != DS_OK) + if (m_directSound->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DSSCL_PRIORITY) != DS_OK) { goto done; + } DSBUFFERDESC desc; memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - if (MxOmni::IsSound3D()) + if (MxOmni::IsSound3D()) { desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRL3D; - else + } + else { desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLVOLUME; + } if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK) { - if (!MxOmni::IsSound3D()) + if (!MxOmni::IsSound3D()) { goto done; + } MxOmni::SetSound3D(FALSE); desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLVOLUME; - if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK) + if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK) { goto done; + } } WAVEFORMATEX format; format.wFormatTag = WAVE_FORMAT_PCM; - if (MxOmni::IsSound3D()) + if (MxOmni::IsSound3D()) { format.nChannels = 2; - else + } + else { format.nChannels = 1; + } format.nSamplesPerSec = 11025; // KHz format.wBitsPerSample = 16; @@ -111,20 +120,24 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) if (p_createThread) { m_thread = new MxTickleThread(this, p_frequencyMS); - if (!m_thread || m_thread->Start(0, 0) != SUCCESS) + if (!m_thread || m_thread->Start(0, 0) != SUCCESS) { goto done; + } } - else + else { TickleManager()->RegisterClient(this, p_frequencyMS); + } status = SUCCESS; done: - if (status != SUCCESS) + if (status != SUCCESS) { Destroy(); + } - if (locked) + if (locked) { m_criticalSection.Leave(); + } return status; } @@ -144,8 +157,9 @@ void MxSoundManager::SetVolume(MxS32 p_volume) MxPresenter* presenter; MxPresenterListCursor cursor(m_presenters); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { ((MxAudioPresenter*) presenter)->SetVolume(((MxAudioPresenter*) presenter)->GetVolume()); + } m_criticalSection.Leave(); } @@ -160,8 +174,9 @@ MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_obje while (cursor.Next(presenter)) { if (presenter->GetAction()->GetAtomId().GetInternal() == p_atomId.GetInternal() && - presenter->GetAction()->GetObjectId() == p_objectId) + presenter->GetAction()->GetObjectId() == p_objectId) { return presenter; + } } return NULL; @@ -170,8 +185,9 @@ MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_obje // FUNCTION: LEGO1 0x100aecf0 MxS32 MxSoundManager::FUN_100aecf0(MxU32 p_undefined) { - if (!p_undefined) + if (!p_undefined) { return -10000; + } return g_mxcoreCount[p_undefined]; } @@ -183,9 +199,11 @@ void MxSoundManager::Pause() MxPresenter* presenter; MxPresenterListCursor cursor(m_presenters); - while (cursor.Next(presenter)) - if (presenter->IsA("MxWavePresenter")) + while (cursor.Next(presenter)) { + if (presenter->IsA("MxWavePresenter")) { ((MxWavePresenter*) presenter)->Pause(); + } + } } // FUNCTION: LEGO1 0x100aee10 @@ -196,7 +214,9 @@ void MxSoundManager::Resume() MxPresenter* presenter; MxPresenterListCursor cursor(m_presenters); - while (cursor.Next(presenter)) - if (presenter->IsA("MxWavePresenter")) + while (cursor.Next(presenter)) { + if (presenter->IsA("MxWavePresenter")) { ((MxWavePresenter*) presenter)->Resume(); + } + } } diff --git a/LEGO1/omni/src/audio/mxsoundpresenter.cpp b/LEGO1/omni/src/audio/mxsoundpresenter.cpp index b0376331..60459d2c 100644 --- a/LEGO1/omni/src/audio/mxsoundpresenter.cpp +++ b/LEGO1/omni/src/audio/mxsoundpresenter.cpp @@ -8,15 +8,17 @@ DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54) // FUNCTION: LEGO1 0x100b1a50 void MxSoundPresenter::Destroy(MxBool p_fromDestructor) { - if (MSoundManager()) + if (MSoundManager()) { MSoundManager()->UnregisterPresenter(*this); + } this->m_criticalSection.Enter(); MxMediaPresenter::Init(); this->m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x100b1aa0 diff --git a/LEGO1/omni/src/audio/mxwavepresenter.cpp b/LEGO1/omni/src/audio/mxwavepresenter.cpp index c0aaca7c..cb9f4d56 100644 --- a/LEGO1/omni/src/audio/mxwavepresenter.cpp +++ b/LEGO1/omni/src/audio/mxwavepresenter.cpp @@ -40,13 +40,15 @@ void MxWavePresenter::Destroy(MxBool p_fromDestructor) m_dsBuffer->Release(); } - if (m_waveFormat) + if (m_waveFormat) { delete[] ((MxU8*) m_waveFormat); + } Init(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxSoundPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x100b1b60 @@ -55,8 +57,9 @@ MxS8 MxWavePresenter::GetPlayedChunks() DWORD dwCurrentPlayCursor, dwCurrentWriteCursor; MxS8 playedChunks = -1; - if (m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor) == DS_OK) + if (m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor) == DS_OK) { playedChunks = dwCurrentPlayCursor / m_chunkLength; + } return playedChunks; } @@ -141,26 +144,32 @@ void MxWavePresenter::StartingTickle() waveFormatEx.nBlockAlign = m_waveFormat->m_pcmWaveFormat.wf.nBlockAlign; waveFormatEx.wBitsPerSample = m_waveFormat->m_pcmWaveFormat.wBitsPerSample; - if (waveFormatEx.wBitsPerSample == 8) + if (waveFormatEx.wBitsPerSample == 8) { m_silenceData = 0x7F; + } - if (waveFormatEx.wBitsPerSample == 16) + if (waveFormatEx.wBitsPerSample == 16) { m_silenceData = 0; + } DSBUFFERDESC desc; memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - if (m_unk0x66) + if (m_unk0x66) { desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME; - else + } + else { desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME; + } - if (m_action->GetFlags() & MxDSAction::c_looping) + if (m_action->GetFlags() & MxDSAction::c_looping) { desc.dwBufferBytes = m_waveFormat->m_pcmWaveFormat.wf.nAvgBytesPerSec * (m_action->GetDuration() / m_action->GetLoopCount()) / 1000; - else + } + else { desc.dwBufferBytes = 2 * length; + } desc.lpwfxFormat = &waveFormatEx; @@ -209,19 +218,22 @@ void MxWavePresenter::DoneTickle() MxS8 playedChunks = dwCurrentPlayCursor / m_chunkLength; if (m_action->GetFlags() & MxDSAction::c_bit7 || m_action->GetFlags() & MxDSAction::c_looping || - m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor) + m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor) { MxMediaPresenter::DoneTickle(); + } } - else + else { MxMediaPresenter::DoneTickle(); + } } // FUNCTION: LEGO1 0x100b2130 void MxWavePresenter::LoopChunk(MxStreamChunk* p_chunk) { WriteToSoundBuffer(p_chunk->GetData(), p_chunk->GetLength()); - if (IsEnabled()) + if (IsEnabled()) { m_subscriber->DestroyChunk(p_chunk); + } } // FUNCTION: LEGO1 0x100b2160 @@ -241,18 +253,21 @@ MxResult MxWavePresenter::PutData() if (!m_started) { m_dsBuffer->SetCurrentPosition(0); - if (m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING) == DS_OK) + if (m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING) == DS_OK) { m_started = TRUE; + } } break; case e_repeating: - if (m_started) + if (m_started) { break; + } m_dsBuffer->SetCurrentPosition(0); - if (m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1) == DS_OK) + if (m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1) == DS_OK) { m_started = TRUE; + } } } @@ -266,8 +281,9 @@ void MxWavePresenter::EndAction() MxAutoLocker lock(&m_criticalSection); MxMediaPresenter::EndAction(); - if (m_dsBuffer) + if (m_dsBuffer) { m_dsBuffer->Stop(); + } } } @@ -296,8 +312,9 @@ void MxWavePresenter::Enable(MxBool p_enable) m_writtenChunks = 0; m_started = FALSE; } - else if (m_dsBuffer) + else if (m_dsBuffer) { m_dsBuffer->Stop(); + } } } @@ -317,8 +334,9 @@ void MxWavePresenter::ParseExtra() char soundValue[512]; if (KeyValueStringParse(soundValue, g_strSOUND, extraCopy)) { - if (!strcmpi(soundValue, "FALSE")) + if (!strcmpi(soundValue, "FALSE")) { Enable(FALSE); + } } } } @@ -327,8 +345,9 @@ void MxWavePresenter::ParseExtra() void MxWavePresenter::Pause() { if (!m_paused && m_started) { - if (m_dsBuffer) + if (m_dsBuffer) { m_dsBuffer->Stop(); + } m_paused = TRUE; } } diff --git a/LEGO1/omni/src/common/mxatomid.cpp b/LEGO1/omni/src/common/mxatomid.cpp index 6c400eed..c5b7412c 100644 --- a/LEGO1/omni/src/common/mxatomid.cpp +++ b/LEGO1/omni/src/common/mxatomid.cpp @@ -5,11 +5,13 @@ // FUNCTION: LEGO1 0x100acf90 MxAtomId::MxAtomId(const char* p_str, LookupMode p_mode) { - if (!MxOmni::GetInstance()) + if (!MxOmni::GetInstance()) { return; + } - if (!AtomIdCounterSet()) + if (!AtomIdCounterSet()) { return; + } MxAtomIdCounter* counter = GetCounter(p_str, p_mode); m_internal = counter->GetKey()->GetData(); @@ -25,14 +27,17 @@ MxAtomId::~MxAtomId() // FUNCTION: LEGO1 0x100acfe0 void MxAtomId::Destroy() { - if (!m_internal) + if (!m_internal) { return; + } - if (!MxOmni::GetInstance()) + if (!MxOmni::GetInstance()) { return; + } - if (!AtomIdCounterSet()) + if (!AtomIdCounterSet()) { return; + } #ifdef COMPAT_MODE MxAtomIdCounterSet::iterator it; @@ -51,8 +56,9 @@ void MxAtomId::Destroy() // FUNCTION: LEGO1 0x100ad1c0 MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId) { - if (m_internal) + if (m_internal) { Destroy(); + } if (p_atomId.m_internal && MxOmni::GetInstance() && AtomIdCounterSet()) { MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, e_exact); diff --git a/LEGO1/omni/src/common/mxatomidcounter.cpp b/LEGO1/omni/src/common/mxatomidcounter.cpp index f3be8764..cfec47b1 100644 --- a/LEGO1/omni/src/common/mxatomidcounter.cpp +++ b/LEGO1/omni/src/common/mxatomidcounter.cpp @@ -14,6 +14,7 @@ void MxAtomIdCounter::Inc() // FUNCTION: LEGO1 0x100ad800 void MxAtomIdCounter::Dec() { - if (m_value) + if (m_value) { m_value--; + } } diff --git a/LEGO1/omni/src/common/mxcompositepresenter.cpp b/LEGO1/omni/src/common/mxcompositepresenter.cpp index 5c5b612e..5996f634 100644 --- a/LEGO1/omni/src/common/mxcompositepresenter.cpp +++ b/LEGO1/omni/src/common/mxcompositepresenter.cpp @@ -50,16 +50,18 @@ MxResult MxCompositePresenter::StartAction(MxStreamController* p_controller, MxD if (presenter && presenter->AddToManager() == SUCCESS) { presenter->SetCompositePresenter(this); - if (presenter->StartAction(p_controller, action) == SUCCESS) + if (presenter->StartAction(p_controller, action) == SUCCESS) { success = TRUE; + } } if (success) { action->SetOrigin(this); m_list.push_back(presenter); } - else if (presenter) + else if (presenter) { delete presenter; + } } result = SUCCESS; @@ -73,8 +75,9 @@ void MxCompositePresenter::EndAction() { MxAutoLocker lock(&m_criticalSection); - if (!m_action) + if (!m_action) { return; + } ((MxDSMultiAction*) m_action)->GetActionList()->DeleteAll(FALSE); @@ -139,15 +142,18 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param) MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList(); MxDSActionListCursor cursor(actions); - if (cursor.Find(action)) + if (cursor.Find(action)) { cursor.Detach(); + } } - if (presenter) + if (presenter) { delete presenter; + } - if (action) + if (action) { delete action; + } if (m_list.empty()) { EndAction(); @@ -155,8 +161,9 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param) else { if (m_action->IsA("MxDSSerialAction") && it != m_list.end()) { MxPresenter* presenter = *it; - if (presenter->GetCurrentTickleState() == e_idle) + if (presenter->GetCurrentTickleState() == e_idle) { presenter->SetTickleState(e_ready); + } } } } @@ -171,14 +178,16 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param) if (*it == presenter) { m_list.erase(it++); - if (presenter->GetCurrentTickleState() == e_idle) + if (presenter->GetCurrentTickleState() == e_idle) { presenter->SetTickleState(e_ready); + } MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList(); MxDSActionListCursor cursor(actions); - if (cursor.Find(presenter->GetAction())) + if (cursor.Find(presenter->GetAction())) { cursor.Detach(); + } if (m_list.empty()) { EndAction(); @@ -186,8 +195,9 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param) else { if (m_action->IsA("MxDSSerialAction")) { MxPresenter* presenter = *it; - if (presenter->GetCurrentTickleState() == e_idle) + if (presenter->GetCurrentTickleState() == e_idle) { presenter->SetTickleState(e_ready); + } } } @@ -205,13 +215,15 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter) for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { if (*it == p_presenter) { if (++it == m_list.end()) { - if (m_compositePresenter) + if (m_compositePresenter) { m_compositePresenter->VTable0x60(this); + } } else if (m_action->IsA("MxDSSerialAction")) { MxPresenter* presenter = *it; - if (presenter->GetCurrentTickleState() == e_idle) + if (presenter->GetCurrentTickleState() == e_idle) { presenter->SetTickleState(e_ready); + } } return; } @@ -227,8 +239,9 @@ void MxCompositePresenter::SetTickleState(TickleState p_tickleState) MxPresenter* presenter = *it; presenter->SetTickleState(p_tickleState); - if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready) + if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready) { return; + } } } @@ -248,8 +261,9 @@ MxBool MxCompositePresenter::HasTickleStatePassed(TickleState p_tickleState) { for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) { MxPresenter* presenter = *it; - if (!presenter->HasTickleStatePassed(p_tickleState)) + if (!presenter->HasTickleStatePassed(p_tickleState)) { return FALSE; + } } return TRUE; diff --git a/LEGO1/omni/src/common/mxmediamanager.cpp b/LEGO1/omni/src/common/mxmediamanager.cpp index 778d7f86..6a9d99c5 100644 --- a/LEGO1/omni/src/common/mxmediamanager.cpp +++ b/LEGO1/omni/src/common/mxmediamanager.cpp @@ -50,8 +50,9 @@ void MxMediaManager::Destroy() { MxAutoLocker lock(&this->m_criticalSection); - if (this->m_presenters) + if (this->m_presenters) { delete this->m_presenters; + } Init(); } @@ -63,13 +64,15 @@ MxResult MxMediaManager::Tickle() MxPresenter* presenter; MxPresenterListCursor cursor(this->m_presenters); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->Tickle(); + } cursor.Reset(); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->PutData(); + } return SUCCESS; } @@ -88,8 +91,9 @@ void MxMediaManager::UnregisterPresenter(MxPresenter& p_presenter) MxAutoLocker lock(&this->m_criticalSection); MxPresenterListCursor cursor(this->m_presenters); - if (cursor.Find(&p_presenter)) + if (cursor.Find(&p_presenter)) { cursor.Detach(); + } } // FUNCTION: LEGO1 0x100b8ac0 @@ -99,6 +103,7 @@ void MxMediaManager::StopPresenters() MxPresenter* presenter; MxPresenterListCursor cursor(this->m_presenters); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->EndAction(); + } } diff --git a/LEGO1/omni/src/common/mxmediapresenter.cpp b/LEGO1/omni/src/common/mxmediapresenter.cpp index 2abc5007..17caece5 100644 --- a/LEGO1/omni/src/common/mxmediapresenter.cpp +++ b/LEGO1/omni/src/common/mxmediapresenter.cpp @@ -26,21 +26,25 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor) { MxAutoLocker lock(&m_criticalSection); - if (m_currentChunk && m_subscriber) + if (m_currentChunk && m_subscriber) { m_subscriber->DestroyChunk(m_currentChunk); + } - if (m_subscriber) + if (m_subscriber) { delete m_subscriber; + } - if (m_loopingChunkCursor) + if (m_loopingChunkCursor) { delete m_loopingChunkCursor; + } if (m_loopingChunks) { MxStreamChunkListCursor cursor(m_loopingChunks); MxStreamChunk* chunk; - while (cursor.Next(chunk)) + while (cursor.Next(chunk)) { chunk->Release(); + } delete m_loopingChunks; } @@ -48,8 +52,9 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor) Init(); } - if (!p_fromDestructor) + if (!p_fromDestructor) { MxPresenter::Destroy(); + } } // FUNCTION: LEGO1 0x100b5650 @@ -102,16 +107,18 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct m_loopingChunks = new MxStreamChunkList; m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks); - if (!m_loopingChunks && !m_loopingChunkCursor) + if (!m_loopingChunks && !m_loopingChunkCursor) { goto done; + } } if (p_controller) { m_subscriber = new MxDSSubscriber; if (!m_subscriber || - m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS) + m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS) { goto done; + } } result = SUCCESS; @@ -126,8 +133,9 @@ void MxMediaPresenter::EndAction() { MxAutoLocker lock(&m_criticalSection); - if (!m_action) + if (!m_action) { return; + } m_currentChunk = NULL; @@ -198,18 +206,22 @@ void MxMediaPresenter::StreamingTickle() void MxMediaPresenter::RepeatingTickle() { if (IsEnabled() && !m_currentChunk) { - if (m_loopingChunkCursor) - if (!m_loopingChunkCursor->Next(m_currentChunk)) + if (m_loopingChunkCursor) { + if (!m_loopingChunkCursor->Next(m_currentChunk)) { m_loopingChunkCursor->Next(m_currentChunk); + } + } if (m_currentChunk) { MxLong time = m_currentChunk->GetTime(); - if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) + if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) { ProgressTickleState(e_unk5); + } } else { - if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) + if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) { ProgressTickleState(e_unk5); + } } } } @@ -248,8 +260,9 @@ void MxMediaPresenter::Enable(MxBool p_enable) SetTickleState(e_repeating); } else { - if (m_loopingChunkCursor) + if (m_loopingChunkCursor) { m_loopingChunkCursor->Reset(); + } m_currentChunk = NULL; SetTickleState(e_done); } diff --git a/LEGO1/omni/src/common/mxpresenter.cpp b/LEGO1/omni/src/common/mxpresenter.cpp index ab803493..794d1227 100644 --- a/LEGO1/omni/src/common/mxpresenter.cpp +++ b/LEGO1/omni/src/common/mxpresenter.cpp @@ -49,8 +49,9 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action) // FUNCTION: LEGO1 0x100b4e40 void MxPresenter::EndAction() { - if (this->m_action == NULL) + if (this->m_action == NULL) { return; + } MxAutoLocker lock(&this->m_criticalSection); @@ -98,8 +99,9 @@ void MxPresenter::ParseExtra() m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_world); - if (result) + if (result) { SendToCompositePresenter(MxOmni::GetInstance()); + } } } } @@ -133,28 +135,33 @@ MxResult MxPresenter::Tickle() case e_ready: this->ReadyTickle(); - if (m_currentTickleState != e_starting) + if (m_currentTickleState != e_starting) { break; + } case e_starting: this->StartingTickle(); - if (m_currentTickleState != e_streaming) + if (m_currentTickleState != e_streaming) { break; + } case e_streaming: this->StreamingTickle(); - if (m_currentTickleState != e_repeating) + if (m_currentTickleState != e_repeating) { break; + } case e_repeating: this->RepeatingTickle(); - if (m_currentTickleState != e_unk5) + if (m_currentTickleState != e_unk5) { break; + } case e_unk5: this->Unk5Tickle(); - if (m_currentTickleState != e_done) + if (m_currentTickleState != e_done) { break; + } case e_done: this->DoneTickle(); default: @@ -170,10 +177,12 @@ void MxPresenter::Enable(MxBool p_enable) if (this->m_action && this->IsEnabled() != p_enable) { MxU32 flags = this->m_action->GetFlags(); - if (p_enable) + if (p_enable) { this->m_action->SetFlags(flags | MxDSAction::c_enabled); - else + } + else { this->m_action->SetFlags(flags & ~MxDSAction::c_enabled); + } } } diff --git a/LEGO1/omni/src/common/mxticklemanager.cpp b/LEGO1/omni/src/common/mxticklemanager.cpp index 667902c8..e8b0d410 100644 --- a/LEGO1/omni/src/common/mxticklemanager.cpp +++ b/LEGO1/omni/src/common/mxticklemanager.cpp @@ -45,8 +45,9 @@ MxResult MxTickleManager::Tickle() else { it++; - if (client->GetLastUpdateTime() > time) + if (client->GetLastUpdateTime() > time) { client->SetLastUpdateTime(-client->GetTickleInterval()); + } if ((client->GetTickleInterval() + client->GetLastUpdateTime()) < time) { client->GetClient()->Tickle(); @@ -64,8 +65,9 @@ void MxTickleManager::RegisterClient(MxCore* p_client, MxTime p_interval) MxTime interval = GetClientTickleInterval(p_client); if (interval == TICKLE_MANAGER_NOT_FOUND) { MxTickleClient* client = new MxTickleClient(p_client, p_interval); - if (client != NULL) + if (client != NULL) { m_clients.push_back(client); + } } } @@ -102,8 +104,9 @@ MxTime MxTickleManager::GetClientTickleInterval(MxCore* p_client) MxTickleClientPtrList::iterator it = m_clients.begin(); while (it != m_clients.end()) { MxTickleClient* client = *it; - if ((client->GetClient() == p_client) && ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0)) + if ((client->GetClient() == p_client) && ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0)) { return client->GetTickleInterval(); + } it++; } diff --git a/LEGO1/omni/src/common/mxutil.cpp b/LEGO1/omni/src/common/mxutil.cpp index d06b2653..5ffab77c 100644 --- a/LEGO1/omni/src/common/mxutil.cpp +++ b/LEGO1/omni/src/common/mxutil.cpp @@ -35,15 +35,17 @@ MxBool GetRectIntersection( MxRect32 rect(0, 0, *p_width, *p_height); rect.AddPoint(rect1Origin); - if (!rect.IntersectsWith(rect1)) + if (!rect.IntersectsWith(rect1)) { return FALSE; + } rect.Intersect(rect1); rect.SubtractPoint(rect1Origin); rect.AddPoint(rect2Origin); - if (!rect.IntersectsWith(rect2)) + if (!rect.IntersectsWith(rect2)) { return FALSE; + } rect.Intersect(rect2); rect.SubtractPoint(rect2Origin); @@ -93,8 +95,9 @@ MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p char* cur = &token[strlen(p_key)]; cur++; while (*cur != ',') { - if (*cur == ' ' || *cur == '\0' || *cur == '\t' || *cur == '\n' || *cur == '\r') + if (*cur == ' ' || *cur == '\0' || *cur == '\t' || *cur == '\n' || *cur == '\r') { break; + } *p_outputValue++ = *cur++; } *p_outputValue = '\0'; @@ -115,8 +118,8 @@ MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter) { for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) { - if (p_presenter == *it || (*it)->IsA("MxCompositePresenter") && - ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter)) { + if (p_presenter == *it || ((*it)->IsA("MxCompositePresenter") && + ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter))) { return TRUE; } } diff --git a/LEGO1/omni/src/common/mxvariabletable.cpp b/LEGO1/omni/src/common/mxvariabletable.cpp index 9503ee5e..94bdbacb 100644 --- a/LEGO1/omni/src/common/mxvariabletable.cpp +++ b/LEGO1/omni/src/common/mxvariabletable.cpp @@ -41,8 +41,9 @@ void MxVariableTable::SetVariable(MxVariable* p_var) MxHashTableCursor cursor(this); MxBool found = cursor.Find(p_var); - if (found) + if (found) { cursor.DeleteMatch(); + } MxHashTable::Add(p_var); } diff --git a/LEGO1/omni/src/event/mxeventmanager.cpp b/LEGO1/omni/src/event/mxeventmanager.cpp index 7819c38f..c0ee3229 100644 --- a/LEGO1/omni/src/event/mxeventmanager.cpp +++ b/LEGO1/omni/src/event/mxeventmanager.cpp @@ -30,11 +30,13 @@ void MxEventManager::Destroy(MxBool p_fromDestructor) m_thread->Terminate(); delete m_thread; } - else + else { TickleManager()->UnregisterClient(this); + } - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaManager::Destroy(); + } } // FUNCTION: LEGO1 0x100c04a0 @@ -50,21 +52,25 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) locked = TRUE; this->m_thread = new MxTickleThread(this, p_frequencyMS); - if (!this->m_thread || this->m_thread->Start(0, 0) != SUCCESS) + if (!this->m_thread || this->m_thread->Start(0, 0) != SUCCESS) { goto done; + } } - else + else { TickleManager()->RegisterClient(this, p_frequencyMS); + } status = SUCCESS; } done: - if (status != SUCCESS) + if (status != SUCCESS) { Destroy(); + } - if (locked) + if (locked) { this->m_criticalSection.Leave(); + } return status; } diff --git a/LEGO1/omni/src/event/mxeventpresenter.cpp b/LEGO1/omni/src/event/mxeventpresenter.cpp index 03b0de14..6072bdd5 100644 --- a/LEGO1/omni/src/event/mxeventpresenter.cpp +++ b/LEGO1/omni/src/event/mxeventpresenter.cpp @@ -42,13 +42,15 @@ MxResult MxEventPresenter::AddToManager() // FUNCTION: LEGO1 0x100c2de0 void MxEventPresenter::Destroy() { - if (EventManager()) + if (EventManager()) { EventManager()->UnregisterPresenter(*this); + } m_criticalSection.Enter(); - if (m_data) + if (m_data) { delete[] m_data; + } Init(); @@ -80,8 +82,9 @@ void MxEventPresenter::StartingTickle() { MxStreamChunk* chunk = CurrentChunk(); - if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) + if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) { ProgressTickleState(e_streaming); + } } // FUNCTION: LEGO1 0x100c2ef0 @@ -103,8 +106,9 @@ MxResult MxEventPresenter::PutData() variableTable->SetVariable(key, value); } - if (m_currentTickleState == e_streaming) + if (m_currentTickleState == e_streaming) { m_subscriber->DestroyChunk(m_currentChunk); + } m_currentChunk = NULL; } } diff --git a/LEGO1/omni/src/main/mxomni.cpp b/LEGO1/omni/src/main/mxomni.cpp index 2b266b3b..c04425b1 100644 --- a/LEGO1/omni/src/main/mxomni.cpp +++ b/LEGO1/omni/src/main/mxomni.cpp @@ -158,48 +158,56 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param) { MxResult result = FAILURE; - if (!(m_atomIdCounterSet = new MxAtomIdCounterSet())) + if (!(m_atomIdCounterSet = new MxAtomIdCounterSet())) { goto done; + } m_mediaPath = p_param.GetMediaPath(); m_windowHandle = p_param.GetWindowHandle(); if (p_param.CreateFlags().CreateObjectFactory()) { - if (!(m_objectFactory = new MxObjectFactory())) + if (!(m_objectFactory = new MxObjectFactory())) { goto done; + } } if (p_param.CreateFlags().CreateVariableTable()) { - if (!(m_variableTable = new MxVariableTable())) + if (!(m_variableTable = new MxVariableTable())) { goto done; + } } if (p_param.CreateFlags().CreateTimer()) { - if (!(m_timer = new MxTimer())) + if (!(m_timer = new MxTimer())) { goto done; + } } if (p_param.CreateFlags().CreateTickleManager()) { - if (!(m_tickleManager = new MxTickleManager())) + if (!(m_tickleManager = new MxTickleManager())) { goto done; + } } if (p_param.CreateFlags().CreateNotificationManager()) { - if (m_notificationManager = new MxNotificationManager()) { - if (m_notificationManager->Create(100, 0) != SUCCESS) + if ((m_notificationManager = new MxNotificationManager())) { + if (m_notificationManager->Create(100, 0) != SUCCESS) { goto done; + } } - else + else { goto done; + } } if (p_param.CreateFlags().CreateStreamer()) { - if (!(m_streamer = new MxStreamer()) || m_streamer->Create() != SUCCESS) + if (!(m_streamer = new MxStreamer()) || m_streamer->Create() != SUCCESS) { goto done; + } } if (p_param.CreateFlags().CreateVideoManager()) { - if (m_videoManager = new MxVideoManager()) { + if ((m_videoManager = new MxVideoManager())) { if (m_videoManager->Create(p_param.GetVideoParam(), 100, 0) != SUCCESS) { delete m_videoManager; m_videoManager = NULL; @@ -208,7 +216,7 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param) } if (p_param.CreateFlags().CreateSoundManager()) { - if (m_soundManager = new MxSoundManager()) { + if ((m_soundManager = new MxSoundManager())) { if (m_soundManager->Create(10, 0) != SUCCESS) { delete m_soundManager; m_soundManager = NULL; @@ -217,7 +225,7 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param) } if (p_param.CreateFlags().CreateMusicManager()) { - if (m_musicManager = new MxMusicManager()) { + if ((m_musicManager = new MxMusicManager())) { if (m_musicManager->Create(50, 0) != SUCCESS) { delete m_musicManager; m_musicManager = NULL; @@ -226,7 +234,7 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param) } if (p_param.CreateFlags().CreateEventManager()) { - if (m_eventManager = new MxEventManager()) { + if ((m_eventManager = new MxEventManager())) { if (m_eventManager->Create(50, 0) != SUCCESS) { delete m_eventManager; m_eventManager = NULL; @@ -235,9 +243,11 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param) } result = SUCCESS; + done: - if (result != SUCCESS) + if (result != SUCCESS) { Destroy(); + } return result; } @@ -255,8 +265,9 @@ void MxOmni::Destroy() // TODO: private members if (m_notificationManager) { while (m_notificationManager->GetQueue()) { - if (m_notificationManager->GetQueue()->size() == 0) + if (m_notificationManager->GetQueue()->size() == 0) { break; + } m_notificationManager->Tickle(); } @@ -317,16 +328,18 @@ MxResult MxOmni::CreatePresenter(MxStreamController* p_controller, MxDSAction& p if (object) { if (object->AddToManager() == SUCCESS) { MxPresenter* sender = p_action.GetUnknown28(); - if (!sender) + if (!sender) { sender = p_controller->FUN_100c1e70(p_action); + } if (sender) { p_action.SetOrigin(sender); object->SetCompositePresenter((MxCompositePresenter*) sender); } else { - if (!p_action.GetOrigin()) + if (!p_action.GetOrigin()) { p_action.SetOrigin(this); + } object->SetCompositePresenter(NULL); } @@ -381,16 +394,18 @@ void MxOmni::DestroyInstance() // FUNCTION: LEGO1 0x100b06b0 MxBool MxOmni::ActionSourceEquals(MxDSAction* p_action, const char* p_name) { - if (!strcmp(p_action->GetSourceName(), p_name)) + if (!strcmp(p_action->GetSourceName(), p_name)) { return TRUE; + } if (p_action->IsA("MxDSMultiAction")) { MxDSActionListCursor cursor(((MxDSMultiAction*) p_action)->GetActionList()); MxDSAction* action; while (cursor.Next(action)) { - if (ActionSourceEquals(action, p_name)) + if (ActionSourceEquals(action, p_name)) { return TRUE; + } } } @@ -402,8 +417,9 @@ MxLong MxOmni::Notify(MxParam& p_param) { MxAutoLocker lock(&this->m_criticalsection); - if (((MxNotificationParam&) p_param).GetNotification() != c_notificationEndAction) + if (((MxNotificationParam&) p_param).GetNotification() != c_notificationEndAction) { return 0; + } return HandleActionEnd(p_param); } @@ -476,8 +492,9 @@ MxBool MxOmni::DoesEntityExist(MxDSAction& p_dsAction) if (m_streamer->FUN_100b9b30(p_dsAction)) { MxNotificationPtrList* queue = m_notificationManager->GetQueue(); - if (!queue || queue->size() == 0) + if (!queue || queue->size() == 0) { return TRUE; + } } return FALSE; } diff --git a/LEGO1/omni/src/notify/mxnotificationmanager.cpp b/LEGO1/omni/src/notify/mxnotificationmanager.cpp index 9e4858df..fe10a82c 100644 --- a/LEGO1/omni/src/notify/mxnotificationmanager.cpp +++ b/LEGO1/omni/src/notify/mxnotificationmanager.cpp @@ -128,9 +128,9 @@ void MxNotificationManager::FlushPending(MxCore* p_listener) MxNotificationPtrList::iterator it = m_sendList->begin(); while (it != m_sendList->end()) { notif = *it; - if ((notif->GetTarget()->GetId() == p_listener->GetId()) || - (notif->GetParam()->GetSender()) && - (notif->GetParam()->GetSender()->GetId() == p_listener->GetId())) { + if (notif->GetTarget()->GetId() == p_listener->GetId() || + (notif->GetParam()->GetSender() && notif->GetParam()->GetSender()->GetId() == p_listener->GetId() + )) { m_sendList->erase(it++); pending.push_back(notif); } @@ -143,8 +143,8 @@ void MxNotificationManager::FlushPending(MxCore* p_listener) MxNotificationPtrList::iterator it = m_queue->begin(); while (it != m_queue->end()) { notif = *it; - if ((notif->GetTarget()->GetId() == p_listener->GetId()) || - (notif->GetParam()->GetSender()) && (notif->GetParam()->GetSender()->GetId() == p_listener->GetId())) { + if (notif->GetTarget()->GetId() == p_listener->GetId() || + (notif->GetParam()->GetSender() && notif->GetParam()->GetSender()->GetId() == p_listener->GetId())) { m_queue->erase(it++); pending.push_back(notif); } @@ -169,8 +169,9 @@ void MxNotificationManager::Register(MxCore* p_listener) MxAutoLocker lock(&m_lock); MxIdList::iterator it = find(m_listenerIds.begin(), m_listenerIds.end(), p_listener->GetId()); - if (it != m_listenerIds.end()) + if (it != m_listenerIds.end()) { return; + } m_listenerIds.push_back(p_listener->GetId()); } diff --git a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp index 5833d18f..a2b2edf9 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamcontroller.cpp @@ -35,8 +35,9 @@ MxDiskStreamController::~MxDiskStreamController() } MxDSAction* action; - while (m_unk0x3c.PopFront(action)) + while (m_unk0x3c.PopFront(action)) { delete action; + } if (m_provider) { delete m_provider; @@ -45,11 +46,13 @@ MxDiskStreamController::~MxDiskStreamController() FUN_100c8720(); - while (m_list0x80.PopFront(action)) + while (m_list0x80.PopFront(action)) { FUN_100c7cb0((MxDSStreamingAction*) action); + } - while (m_list0x64.PopFront(action)) + while (m_list0x64.PopFront(action)) { FUN_100c7cb0((MxDSStreamingAction*) action); + } while (!m_list0x74.empty()) { MxDSBuffer* buffer = m_list0x74.front(); @@ -130,15 +133,17 @@ void MxDiskStreamController::FUN_100c7980() buffer = new MxDSBuffer(); if (buffer->AllocateBuffer(m_provider->GetFileSize(), MxDSBuffer::e_chunk) != SUCCESS) { - if (buffer) + if (buffer) { delete buffer; + } return; } action = VTable0x28(); if (!action) { - if (buffer) + if (buffer) { delete buffer; + } return; } @@ -228,8 +233,9 @@ MxResult MxDiskStreamController::FUN_100c7d10() MxAutoLocker lock(&this->m_criticalSection); MxDSStreamingAction* action = FUN_100c7db0(); - if (!action) + if (!action) { return FAILURE; + } if (FUN_100c8360(action) != SUCCESS) { VTable0x24(action); @@ -290,11 +296,13 @@ MxResult MxDiskStreamController::VTable0x20(MxDSAction* p_action) FUN_100c7f40(action); - if (VTable0x2c(p_action, entry->GetUnknown94()) != SUCCESS) + if (VTable0x2c(p_action, entry->GetUnknown94()) != SUCCESS) { return FAILURE; + } } - else if (MxStreamController::VTable0x20(p_action) != SUCCESS) + else if (MxStreamController::VTable0x20(p_action) != SUCCESS) { return FAILURE; + } m_unk0x70 = TRUE; m_unk0xc4 = TRUE; @@ -312,8 +320,9 @@ void MxDiskStreamController::FUN_100c8120(MxDSAction* p_action) while (TRUE) { MxDSAction* found = m_unk0x54.Find(p_action, TRUE); - if (!found) + if (!found) { break; + } delete found; } } @@ -408,8 +417,9 @@ void MxDiskStreamController::FUN_100c8540() m_list0x74.erase(it++); FUN_100c7ce0(buf); } - else + else { it++; + } } if (m_nextActionList.empty()) { diff --git a/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp b/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp index 7b4b6ef5..88f70c7d 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp @@ -19,8 +19,9 @@ MxU32 g_unk0x10102878 = 0; // FUNCTION: LEGO1 0x100d0f30 MxResult MxDiskStreamProviderThread::Run() { - if (m_target) + if (m_target) { ((MxDiskStreamProvider*) m_target)->WaitForWorkToComplete(); + } MxThread::Run(); // They should probably have writen "return MxThread::Run()" but they didn't. return SUCCESS; @@ -55,11 +56,13 @@ MxDiskStreamProvider::~MxDiskStreamProvider() m_list.PopFrontStreamingAction(action); } - if (!action) + if (!action) { break; + } - if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) + if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) { g_unk0x10102878--; + } ((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action); } while (action); @@ -70,8 +73,9 @@ MxDiskStreamProvider::~MxDiskStreamProvider() m_thread.Terminate(); } - if (m_pFile) + if (m_pFile) { delete m_pFile; + } m_pFile = NULL; } @@ -91,8 +95,9 @@ MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource) path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si"; m_pFile->SetFileName(path.GetData()); - if (m_pFile->Open(0) != 0) + if (m_pFile->Open(0) != 0) { goto done; + } } m_remainingWork = TRUE; @@ -123,11 +128,13 @@ void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action) m_list.PopFrontStreamingAction(action); } - if (!action) + if (!action) { return; + } - if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) + if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) { g_unk0x10102878--; + } ((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action); } while (action); @@ -139,11 +146,13 @@ void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action) action = (MxDSStreamingAction*) m_list.Find(p_action, TRUE); } - if (!action) + if (!action) { return; + } - if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) + if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) { g_unk0x10102878--; + } ((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action); } while (action); @@ -155,8 +164,9 @@ MxResult MxDiskStreamProvider::WaitForWorkToComplete() { while (m_remainingWork) { m_busySemaphore.Wait(INFINITE); - if (m_unk0x35) + if (m_unk0x35) { PerformWork(); + } } return SUCCESS; @@ -165,14 +175,16 @@ MxResult MxDiskStreamProvider::WaitForWorkToComplete() // FUNCTION: LEGO1 0x100d1780 MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action) { - if (!m_remainingWork) + if (!m_remainingWork) { return FAILURE; + } if (p_action->GetUnknown9c() > 0 && !p_action->GetUnknowna0()) { MxDSBuffer* buffer = new MxDSBuffer(); - if (!buffer) + if (!buffer) { return FAILURE; + } if (buffer->AllocateBuffer(GetFileSize(), MxDSBuffer::e_allocate) != SUCCESS) { delete buffer; @@ -220,8 +232,9 @@ void MxDiskStreamProvider::PerformWork() { MxAutoLocker lock(&m_criticalSection); - if (!m_list.PopFrontStreamingAction(streamingAction)) + if (!m_list.PopFrontStreamingAction(streamingAction)) { goto done; + } } if (streamingAction->GetUnknowna0()->GetWriteOffset() < 0x20000) { @@ -276,15 +289,17 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action) { MxDSBuffer* buffer = new MxDSBuffer(); - if (!buffer) + if (!buffer) { return FAILURE; + } MxU32 size = p_action->GetUnknowna0()->GetWriteOffset() - p_action->GetUnknown94() + p_action->GetBufferOffset() + (p_action->GetUnknowna4() ? p_action->GetUnknowna4()->GetWriteOffset() : 0); if (buffer->AllocateBuffer(size, MxDSBuffer::e_allocate) != SUCCESS) { - if (!buffer) + if (!buffer) { return FAILURE; + } delete buffer; return FAILURE; @@ -327,8 +342,9 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action) size = ReadData(*pdata, buffer->GetWriteOffset()); MxDSBuffer* buffer3 = new MxDSBuffer(); - if (!buffer3) + if (!buffer3) { return FAILURE; + } if (buffer3->AllocateBuffer(size, MxDSBuffer::e_allocate) == SUCCESS) { memcpy(buffer3->GetBuffer(), p_action->GetUnknowna4()->GetBuffer(), size); @@ -342,8 +358,9 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action) MxU8* data2 = buffer4->GetBuffer(); while (TRUE) { - if (*MxStreamChunk::IntoTime(data2) > p_action->GetUnknown9c()) + if (*MxStreamChunk::IntoTime(data2) > p_action->GetUnknown9c()) { break; + } data += MxDSChunk::Size(*MxDSChunk::IntoLength(data)); unk0x14 += MxDSChunk::Size(*MxDSChunk::IntoLength(data)); diff --git a/LEGO1/omni/src/stream/mxdsbuffer.cpp b/LEGO1/omni/src/stream/mxdsbuffer.cpp index 380cc1e0..106964b2 100644 --- a/LEGO1/omni/src/stream/mxdsbuffer.cpp +++ b/LEGO1/omni/src/stream/mxdsbuffer.cpp @@ -164,19 +164,22 @@ MxResult MxDSBuffer::FUN_100c67b0( MxResult result = FAILURE; m_unk0x30 = (MxDSStreamingAction*) p_controller->GetUnk0x3c().Find(p_action, FALSE); - if (m_unk0x30 == NULL) + if (m_unk0x30 == NULL) { return FAILURE; + } MxU8* data; - while (data = (MxU8*) SkipToData()) { + while ((data = (MxU8*) SkipToData())) { if (*p_streamingAction == NULL) { result = CreateObject(p_controller, (MxU32*) data, p_action, p_streamingAction); - if (result == FAILURE) + if (result == FAILURE) { return result; + } // TODO: Not a MxResult value? - if (result == 1) + if (result == 1) { break; + } } else { MxDSBuffer* buffer = (*p_streamingAction)->GetUnknowna0(); @@ -226,8 +229,9 @@ MxResult MxDSBuffer::CreateObject( return FAILURE; } - if (*p_data == FOURCC('M', 'x', 'O', 'b')) + if (*p_data == FOURCC('M', 'x', 'O', 'b')) { return StartPresenterFromAction(p_controller, p_action, (MxDSAction*) header); + } else if (*p_data == FOURCC('M', 'x', 'C', 'h')) { MxStreamChunk* chunk = (MxStreamChunk*) header; if (!m_unk0x30->HasId((chunk)->GetObjectId())) { @@ -316,8 +320,9 @@ MxResult MxDSBuffer::ParseChunk( } } - if (buffer) + if (buffer) { delete buffer; + } delete p_header; return FAILURE; @@ -337,8 +342,9 @@ MxResult MxDSBuffer::ParseChunk( MxNextActionDataStart* data = p_controller->FindNextActionDataStartFromStreamingAction(m_unk0x30); - if (data) + if (data) { data->SetData(m_unk0x30->GetBufferOffset()); + } m_unk0x30->FUN_100cd2d0(); } @@ -472,8 +478,9 @@ MxResult MxDSBuffer::CalcBytesRemaining(MxU8* p_data) if (bytesRead <= m_bytesRemaining) { memcpy(m_pBuffer + m_writeOffset - m_bytesRemaining, ptr, bytesRead); - if (m_writeOffset == m_bytesRemaining) + if (m_writeOffset == m_bytesRemaining) { *(MxU32*) (m_pBuffer + 4) = *MxStreamChunk::IntoLength(m_pBuffer) + MxStreamChunk::GetHeaderSize(); + } m_bytesRemaining -= bytesRead; result = SUCCESS; @@ -510,8 +517,9 @@ MxU8* MxDSBuffer::FUN_100c6fa0(MxU8* p_data) break; case FOURCC('M', 'x', 'O', 'b'): case FOURCC('M', 'x', 'C', 'h'): - if (current != p_data) + if (current != p_data) { return current; + } current = ((MxU32) current & 1) + current; current += 8; break; diff --git a/LEGO1/omni/src/stream/mxdschunk.cpp b/LEGO1/omni/src/stream/mxdschunk.cpp index fede0762..a964d0fa 100644 --- a/LEGO1/omni/src/stream/mxdschunk.cpp +++ b/LEGO1/omni/src/stream/mxdschunk.cpp @@ -15,8 +15,9 @@ MxDSChunk::MxDSChunk() // FUNCTION: LEGO1 0x100be170 MxDSChunk::~MxDSChunk() { - if (m_flags & c_bit1) + if (m_flags & c_bit1) { delete[] m_data; + } } // FUNCTION: LEGO1 0x100be1e0 diff --git a/LEGO1/omni/src/stream/mxdsfile.cpp b/LEGO1/omni/src/stream/mxdsfile.cpp index 33b85929..b422f45e 100644 --- a/LEGO1/omni/src/stream/mxdsfile.cpp +++ b/LEGO1/omni/src/stream/mxdsfile.cpp @@ -98,8 +98,9 @@ MxLong MxDSFile::Close() // FUNCTION: LEGO1 0x100cc780 MxResult MxDSFile::Read(unsigned char* p_buf, MxULong p_nbytes) { - if (m_io.Read(p_buf, p_nbytes) != p_nbytes) + if (m_io.Read(p_buf, p_nbytes) != p_nbytes) { return FAILURE; + } m_position += p_nbytes; return SUCCESS; diff --git a/LEGO1/omni/src/stream/mxdssubscriber.cpp b/LEGO1/omni/src/stream/mxdssubscriber.cpp index 82ca1730..488ff02c 100644 --- a/LEGO1/omni/src/stream/mxdssubscriber.cpp +++ b/LEGO1/omni/src/stream/mxdssubscriber.cpp @@ -16,17 +16,20 @@ MxDSSubscriber::MxDSSubscriber() // FUNCTION: LEGO1 0x100b7e00 MxDSSubscriber::~MxDSSubscriber() { - if (m_controller) + if (m_controller) { m_controller->RemoveSubscriber(this); + } DeleteChunks(); - if (m_pendingChunkCursor) + if (m_pendingChunkCursor) { delete m_pendingChunkCursor; + } m_pendingChunkCursor = NULL; - if (m_consumedChunkCursor) + if (m_consumedChunkCursor) { delete m_consumedChunkCursor; + } m_consumedChunkCursor = NULL; } @@ -36,17 +39,20 @@ MxResult MxDSSubscriber::Create(MxStreamController* p_controller, MxU32 p_object m_objectId = p_objectId; m_unk0x48 = p_unk0x48; - if (!p_controller) + if (!p_controller) { return FAILURE; + } m_controller = p_controller; m_pendingChunkCursor = new MxStreamChunkListCursor(&m_pendingChunks); - if (!m_pendingChunkCursor) + if (!m_pendingChunkCursor) { return FAILURE; + } m_consumedChunkCursor = new MxStreamChunkListCursor(&m_consumedChunks); - if (!m_consumedChunkCursor) + if (!m_consumedChunkCursor) { return FAILURE; + } m_controller->AddSubscriber(this); return SUCCESS; @@ -74,10 +80,12 @@ void MxDSSubscriber::DeleteChunks() MxResult MxDSSubscriber::AddChunk(MxStreamChunk* p_chunk, MxBool p_append) { if (m_pendingChunkCursor) { - if (p_append) + if (p_append) { m_pendingChunks.Append(p_chunk); - else + } + else { m_pendingChunks.Prepend(p_chunk); + } } return SUCCESS; @@ -88,8 +96,9 @@ MxStreamChunk* MxDSSubscriber::NextChunk() { MxStreamChunk* chunk = NULL; - if (m_pendingChunkCursor) + if (m_pendingChunkCursor) { m_pendingChunkCursor->First(chunk); + } if (chunk) { m_pendingChunkCursor->Detach(); @@ -104,8 +113,9 @@ MxStreamChunk* MxDSSubscriber::CurrentChunk() { MxStreamChunk* chunk = NULL; - if (m_pendingChunkCursor) + if (m_pendingChunkCursor) { m_pendingChunkCursor->First(chunk); + } return chunk; } @@ -116,10 +126,12 @@ void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk) if (p_chunk) { if (m_consumedChunkCursor->Find(p_chunk)) { m_consumedChunkCursor->Detach(); - if (p_chunk) + if (p_chunk) { delete p_chunk; + } } - else if (p_chunk->GetFlags() & MxDSChunk::c_bit1 && p_chunk) + else if (p_chunk->GetFlags() & MxDSChunk::c_bit1 && p_chunk) { delete p_chunk; + } } } diff --git a/LEGO1/omni/src/stream/mxioinfo.cpp b/LEGO1/omni/src/stream/mxioinfo.cpp index 9951c174..a040bc41 100644 --- a/LEGO1/omni/src/stream/mxioinfo.cpp +++ b/LEGO1/omni/src/stream/mxioinfo.cpp @@ -72,8 +72,9 @@ MxU16 MXIOINFO::Close(MxLong p_unused) _lclose((HFILE) m_info.hmmio); m_info.hmmio = 0; - if (m_info.dwFlags & MMIO_ALLOCBUF) + if (m_info.dwFlags & MMIO_ALLOCBUF) { delete[] m_info.pchBuffer; + } m_info.pchEndWrite = 0; m_info.pchEndRead = 0; @@ -95,8 +96,9 @@ MxLong MXIOINFO::Read(void* p_buf, MxLong p_len) while (p_len > 0) { if (bytesLeft > 0) { - if (p_len < bytesLeft) + if (p_len < bytesLeft) { bytesLeft = p_len; + } memcpy(p_buf, m_info.pchNext, bytesLeft); p_len -= bytesLeft; @@ -105,12 +107,14 @@ MxLong MXIOINFO::Read(void* p_buf, MxLong p_len) bytesRead += bytesLeft; } - if (p_len <= 0 || Advance(0)) + if (p_len <= 0 || Advance(0)) { break; + } bytesLeft = m_info.pchEndRead - m_info.pchNext; - if (bytesLeft <= 0) + if (bytesLeft <= 0) { break; + } } } else if (m_info.hmmio && p_len > 0) { @@ -381,8 +385,9 @@ MxU16 MXIOINFO::Descend(MMCKINFO* p_chunkInfo, const MMCKINFO* p_parentInfo, MxU { MxU16 result = 0; - if (!p_chunkInfo) + if (!p_chunkInfo) { return MMIOERR_BASE; // ? + } if (!p_descend) { p_chunkInfo->dwFlags = 0; @@ -406,8 +411,9 @@ MxU16 MXIOINFO::Descend(MMCKINFO* p_chunkInfo, const MMCKINFO* p_parentInfo, MxU else { MxULong ofs = MAXLONG; - if (p_parentInfo) + if (p_parentInfo) { ofs = p_parentInfo->cksize + p_parentInfo->dwDataOffset; + } BOOL running = TRUE; BOOL readOk = FALSE; @@ -452,8 +458,9 @@ MxU16 MXIOINFO::Descend(MMCKINFO* p_chunkInfo, const MMCKINFO* p_parentInfo, MxU } } - if (!result) + if (!result) { memcpy(p_chunkInfo, &tmp, sizeof(MMCKINFO)); + } } return result; diff --git a/LEGO1/omni/src/stream/mxramstreamprovider.cpp b/LEGO1/omni/src/stream/mxramstreamprovider.cpp index ca091d12..472930c7 100644 --- a/LEGO1/omni/src/stream/mxramstreamprovider.cpp +++ b/LEGO1/omni/src/stream/mxramstreamprovider.cpp @@ -71,8 +71,9 @@ MxResult MxRAMStreamProvider::SetResourceToGet(MxStreamController* p_resource) path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si"; m_pFile->SetFileName(path.GetData()); - if (m_pFile->Open(0) != 0) + if (m_pFile->Open(0) != 0) { goto done; + } } m_fileSize = m_pFile->CalcFileSize(); @@ -131,23 +132,27 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size) MxDSBuffer::Append(data2, data3); continue; } - else + else { *MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split; + } } data2 += MxDSChunk::Size(*MxDSChunk::IntoLength(data2)); memcpy(data2, data3, MxDSChunk::Size(*psize)); if (*MxStreamChunk::IntoObjectId(data2) == id && - (*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_end)) + (*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_end)) { break; + } } - else + else { data++; + } } } - else + else { data++; + } } while (data < end); } diff --git a/LEGO1/omni/src/stream/mxstreamcontroller.cpp b/LEGO1/omni/src/stream/mxstreamcontroller.cpp index 204bdab8..977db130 100644 --- a/LEGO1/omni/src/stream/mxstreamcontroller.cpp +++ b/LEGO1/omni/src/stream/mxstreamcontroller.cpp @@ -45,12 +45,14 @@ MxStreamController::~MxStreamController() MxAutoLocker lock(&m_criticalSection); MxDSSubscriber* subscriber; - while (m_subscriberList.PopFront(subscriber)) + while (m_subscriberList.PopFront(subscriber)) { delete subscriber; + } MxDSAction* action; - while (m_unk0x3c.PopFront(action)) + while (m_unk0x3c.PopFront(action)) { delete action; + } if (m_provider) { MxStreamProvider* provider = m_provider; @@ -71,8 +73,9 @@ MxStreamController::~MxStreamController() m_unk0x2c = NULL; } - while (m_unk0x54.PopFront(action)) + while (m_unk0x54.PopFront(action)) { delete action; + } } // FUNCTION: LEGO1 0x100c1520 @@ -109,13 +112,16 @@ MxResult MxStreamController::VTable0x20(MxDSAction* p_action) MxS32 objectId = p_action->GetObjectId(); MxStreamProvider* provider = m_provider; - if ((MxS32) provider->GetLengthInDWords() > objectId) + if ((MxS32) provider->GetLengthInDWords() > objectId) { offset = provider->GetBufferForDWords()[objectId]; + } - if (offset) + if (offset) { result = VTable0x2c(p_action, offset); - else + } + else { result = FAILURE; + } return result; } @@ -159,16 +165,18 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) for (MxStreamListMxDSAction::iterator it = m_unk0x54.begin(); it != m_unk0x54.end(); it++) { MxDSAction* action = *it; - if (action->GetObjectId() == p_action->GetObjectId()) + if (action->GetObjectId() == p_action->GetObjectId()) { newUnknown24 = Max(newUnknown24, action->GetUnknown24()); + } } if (newUnknown24 == -1) { for (MxStreamListMxDSAction::iterator it = m_unk0x3c.begin(); it != m_unk0x3c.end(); it++) { MxDSAction* action = *it; - if (action->GetObjectId() == p_action->GetObjectId()) + if (action->GetObjectId() == p_action->GetObjectId()) { newUnknown24 = Max(newUnknown24, action->GetUnknown24()); + } } if (newUnknown24 == -1) { @@ -176,8 +184,9 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) it++) { MxDSSubscriber* subscriber = *it; - if (subscriber->GetObjectId() == p_action->GetObjectId()) + if (subscriber->GetObjectId() == p_action->GetObjectId()) { newUnknown24 = Max(newUnknown24, subscriber->GetUnknown48()); + } } } } @@ -185,14 +194,16 @@ MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_offset) p_action->SetUnknown24(newUnknown24 + 1); } else { - if (m_unk0x3c.Find(p_action, FALSE)) + if (m_unk0x3c.Find(p_action, FALSE)) { return FAILURE; + } } MxDSStreamingAction* streamingAction = new MxDSStreamingAction(*p_action, p_offset); - if (!streamingAction) + if (!streamingAction) { return FAILURE; + } MxU32 fileSize = m_provider->GetFileSize(); streamingAction->SetBufferOffset(fileSize * (p_offset / fileSize)); @@ -268,14 +279,16 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action) MxU32 objectId = p_action->GetObjectId(); MxStreamChunk* chunk = new MxStreamChunk; - if (!chunk) + if (!chunk) { return FAILURE; + } chunk->SetFlags(MxDSChunk::c_bit3); chunk->SetObjectId(objectId); - if (chunk->SendChunk(m_subscriberList, FALSE, p_action->GetUnknown24()) != SUCCESS) + if (chunk->SendChunk(m_subscriberList, FALSE, p_action->GetUnknown24()) != SUCCESS) { delete chunk; + } if (p_action->IsA("MxDSMultiAction")) { MxDSActionList* actions = ((MxDSMultiAction*) p_action)->GetActionList(); @@ -283,8 +296,9 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action) MxDSAction* action; while (cursor.Next(action)) { - if (FUN_100c1f00(action) != SUCCESS) + if (FUN_100c1f00(action) != SUCCESS) { return FAILURE; + } } } @@ -300,8 +314,9 @@ MxNextActionDataStart* MxStreamController::FindNextActionDataStartFromStreamingA // FUNCTION: LEGO1 0x100c20d0 MxBool MxStreamController::FUN_100c20d0(MxDSObject& p_obj) { - if (m_subscriberList.Find(&p_obj)) + if (m_subscriberList.Find(&p_obj)) { return FALSE; + } if (p_obj.IsA("MxDSMultiAction")) { MxDSActionList* actions = ((MxDSMultiAction&) p_obj).GetActionList(); @@ -309,8 +324,9 @@ MxBool MxStreamController::FUN_100c20d0(MxDSObject& p_obj) MxDSAction* action; while (cursor.Next(action)) { - if (!FUN_100c20d0(*action)) + if (!FUN_100c20d0(*action)) { return FALSE; + } } } diff --git a/LEGO1/omni/src/stream/mxstreamer.cpp b/LEGO1/omni/src/stream/mxstreamer.cpp index d8d64fb5..76aa7862 100644 --- a/LEGO1/omni/src/stream/mxstreamer.cpp +++ b/LEGO1/omni/src/stream/mxstreamer.cpp @@ -79,8 +79,9 @@ MxLong MxStreamer::Close(const char* p_name) if (!p_name || !strcmp(p_name, c->GetAtom().GetInternal())) { m_openStreams.erase(it); - if (c->FUN_100c20d0(ds)) + if (c->FUN_100c20d0(ds)) { delete c; + } else { #ifdef COMPAT_MODE { @@ -185,8 +186,9 @@ MxResult MxStreamer::DeleteObject(MxDSAction* p_dsAction) MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject) { MxStreamController* controller = GetOpenStream(p_dsObject.GetAtomId().GetInternal()); - if (controller) + if (controller) { return controller->FUN_100c20d0(p_dsObject); + } return TRUE; } @@ -200,8 +202,9 @@ MxLong MxStreamer::Notify(MxParam& p_param) MxStreamController* c = static_cast(p_param).GetController(); - if (c->FUN_100c20d0(ds)) + if (c->FUN_100c20d0(ds)) { delete c; + } else { #ifdef COMPAT_MODE { diff --git a/LEGO1/omni/src/stream/mxstreamlist.cpp b/LEGO1/omni/src/stream/mxstreamlist.cpp index 531d0446..effa987a 100644 --- a/LEGO1/omni/src/stream/mxstreamlist.cpp +++ b/LEGO1/omni/src/stream/mxstreamlist.cpp @@ -36,8 +36,9 @@ MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete) if (p_action->GetUnknown24() == -2 || p_action->GetUnknown24() == -3 || p_action->GetUnknown24() == (*it)->GetUnknown24()) { found = *it; - if (p_action->GetUnknown24() != -3) + if (p_action->GetUnknown24() != -3) { break; + } } } } @@ -53,8 +54,9 @@ MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete) MxNextActionDataStart* MxStreamListMxNextActionDataStart::Find(MxU32 p_id, MxS16 p_value) { for (iterator it = begin(); it != end(); it++) { - if (p_id == (*it)->GetObjectId() && p_value == (*it)->GetUnknown24()) + if (p_id == (*it)->GetObjectId() && p_value == (*it)->GetUnknown24()) { return *it; + } } return NULL; diff --git a/LEGO1/omni/src/system/mxautolocker.cpp b/LEGO1/omni/src/system/mxautolocker.cpp index d5749ad5..3c5a2afb 100644 --- a/LEGO1/omni/src/system/mxautolocker.cpp +++ b/LEGO1/omni/src/system/mxautolocker.cpp @@ -4,13 +4,15 @@ MxAutoLocker::MxAutoLocker(MxCriticalSection* p_criticalSection) { this->m_criticalSection = p_criticalSection; - if (this->m_criticalSection != 0) + if (this->m_criticalSection != 0) { this->m_criticalSection->Enter(); + } } // FUNCTION: LEGO1 0x100b8ef0 MxAutoLocker::~MxAutoLocker() { - if (this->m_criticalSection != 0) + if (this->m_criticalSection != 0) { this->m_criticalSection->Leave(); + } } diff --git a/LEGO1/omni/src/system/mxsemaphore.cpp b/LEGO1/omni/src/system/mxsemaphore.cpp index 5692a888..daba60f4 100644 --- a/LEGO1/omni/src/system/mxsemaphore.cpp +++ b/LEGO1/omni/src/system/mxsemaphore.cpp @@ -15,8 +15,9 @@ MxSemaphore::MxSemaphore() MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount) { MxResult result = FAILURE; - if (m_hSemaphore = CreateSemaphoreA(NULL, p_initialCount, p_maxCount, NULL)) + if ((m_hSemaphore = CreateSemaphoreA(NULL, p_initialCount, p_maxCount, NULL))) { result = SUCCESS; + } return result; } diff --git a/LEGO1/omni/src/system/mxthread.cpp b/LEGO1/omni/src/system/mxthread.cpp index 158c0cf6..14c4ea82 100644 --- a/LEGO1/omni/src/system/mxthread.cpp +++ b/LEGO1/omni/src/system/mxthread.cpp @@ -51,8 +51,9 @@ MxThread::MxThread() // FUNCTION: LEGO1 0x100bf5a0 MxThread::~MxThread() { - if (m_hThread) + if (m_hThread) { CloseHandle((HANDLE) m_hThread); + } } typedef unsigned(__stdcall* ThreadFunc)(void*); @@ -62,9 +63,10 @@ MxResult MxThread::Start(MxS32 p_stack, MxS32 p_flag) { MxResult result = FAILURE; if (m_semaphore.Init(0, 1) == SUCCESS) { - if (m_hThread = - _beginthreadex(NULL, p_stack << 2, (ThreadFunc) &MxThread::ThreadProc, this, p_flag, &m_threadId)) + if ((m_hThread = + _beginthreadex(NULL, p_stack << 2, (ThreadFunc) &MxThread::ThreadProc, this, p_flag, &m_threadId))) { result = SUCCESS; + } } return result; } diff --git a/LEGO1/omni/src/video/mxbitmap.cpp b/LEGO1/omni/src/video/mxbitmap.cpp index 0d83bba2..98f1f6b2 100644 --- a/LEGO1/omni/src/video/mxbitmap.cpp +++ b/LEGO1/omni/src/video/mxbitmap.cpp @@ -25,12 +25,15 @@ MxBitmap::MxBitmap() // FUNCTION: LEGO1 0x100bca10 MxBitmap::~MxBitmap() { - if (this->m_info) + if (this->m_info) { delete m_info; - if (this->m_data) + } + if (this->m_data) { delete m_data; - if (this->m_palette) + } + if (this->m_palette) { delete m_palette; + } } // FUNCTION: LEGO1 0x100bcaa0 @@ -152,11 +155,13 @@ MxLong MxBitmap::Read(const char* p_filename) HANDLE handle = CreateFileA(p_filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (handle != INVALID_HANDLE_VALUE && !LoadFile(handle)) + if (handle != INVALID_HANDLE_VALUE && !LoadFile(handle)) { result = SUCCESS; + } - if (handle) + if (handle) { CloseHandle(handle); + } return result; } @@ -280,8 +285,9 @@ void MxBitmap::BitBltTransparent( for (MxS32 h = 0; h < p_height; h++) { for (MxS32 w = 0; w < p_width; w++) { - if (*srcStart) + if (*srcStart) { *dstStart = *srcStart; + } srcStart++; dstStart++; } @@ -302,15 +308,17 @@ MxPalette* MxBitmap::CreatePalette() case FALSE: palette = new MxPalette(this->m_paletteData); - if (!palette) + if (!palette) { goto done; + } break; case TRUE: palette = this->m_palette->Clone(); - if (!palette) + if (!palette) { goto done; + } break; default: @@ -361,8 +369,9 @@ MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor) switch (p_isHighColor) { case FALSE: ImportColorsToPalette(m_paletteData, m_palette); - if (m_palette) + if (m_palette) { delete m_palette; + } m_palette = NULL; break; @@ -370,8 +379,9 @@ MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor) pal = NULL; pal = new MxPalette(m_paletteData); - if (!pal) + if (!pal) { goto done; + } m_palette = pal; @@ -392,8 +402,9 @@ MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor) done: // If we were unsuccessful overall but did manage to alloc // the MxPalette, free it. - if (ret && pal) + if (ret && pal) { delete pal; + } return ret; } @@ -438,13 +449,15 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett PALETTEENTRY entries[256]; if (p_palette) { - if (p_palette->GetEntries(entries)) + if (p_palette->GetEntries(entries)) { goto done; + } } else { MxPalette palette; - if (palette.GetEntries(entries)) + if (palette.GetEntries(entries)) { goto done; + } } MxS32 i; diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index e2965826..0cb88f6d 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -81,8 +81,9 @@ MxU8 MxDisplaySurface::CountTotalBitsSetTo1(MxU32 p_param) { MxU8 count = 0; - for (; p_param; p_param >>= 1) + for (; p_param; p_param >>= 1) { count += ((MxU8) p_param & 1); + } return count; } @@ -92,8 +93,9 @@ MxU8 MxDisplaySurface::CountContiguousBitsSetTo1(MxU32 p_param) { MxU8 count = 0; - for (; (p_param & 1) == 0; p_param >>= 1) + for (; (p_param & 1) == 0; p_param >>= 1) { count++; + } return count; } @@ -117,8 +119,9 @@ MxResult MxDisplaySurface::Init( memset(&this->m_surfaceDesc, 0, sizeof(this->m_surfaceDesc)); this->m_surfaceDesc.dwSize = sizeof(this->m_surfaceDesc); - if (this->m_ddSurface2->GetSurfaceDesc(&this->m_surfaceDesc)) + if (this->m_ddSurface2->GetSurfaceDesc(&this->m_surfaceDesc)) { result = FAILURE; + } return result; } @@ -134,8 +137,9 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) this->m_initialized = TRUE; this->m_videoParam = p_videoParam; - if (!this->m_videoParam.Flags().GetFullScreen()) + if (!this->m_videoParam.Flags().GetFullScreen()) { this->m_videoParam.Flags().SetFlipSurfaces(FALSE); + } if (!this->m_videoParam.Flags().GetFlipSurfaces()) { this->m_videoParam.SetBackBuffers(1); @@ -143,10 +147,12 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) else { MxU32 backBuffers = this->m_videoParam.GetBackBuffers(); - if (backBuffers < 1) + if (backBuffers < 1) { this->m_videoParam.SetBackBuffers(1); - else if (backBuffers > 2) + } + else if (backBuffers > 2) { this->m_videoParam.SetBackBuffers(2); + } this->m_videoParam.Flags().SetBackBuffers(TRUE); } @@ -155,20 +161,23 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) MxS32 width = this->m_videoParam.GetRect().GetWidth(); MxS32 height = this->m_videoParam.GetRect().GetHeight(); - if (lpDirectDraw->SetCooperativeLevel(hWnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN)) + if (lpDirectDraw->SetCooperativeLevel(hWnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN)) { goto done; + } memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - if (lpDirectDraw->GetDisplayMode(&ddsd)) + if (lpDirectDraw->GetDisplayMode(&ddsd)) { goto done; + } MxS32 bitdepth = !this->m_videoParam.Flags().Get16Bit() ? 8 : 16; if (ddsd.dwWidth != width || ddsd.dwHeight != height || ddsd.ddpfPixelFormat.dwRGBBitCount != bitdepth) { - if (lpDirectDraw->SetDisplayMode(width, height, bitdepth)) + if (lpDirectDraw->SetDisplayMode(width, height, bitdepth)) { goto done; + } } } @@ -179,13 +188,15 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; ddsd.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; - if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface1, NULL)) + if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface1, NULL)) { goto done; + } ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER; - if (this->m_ddSurface1->GetAttachedSurface(&ddsd.ddsCaps, &this->m_ddSurface2)) + if (this->m_ddSurface1->GetAttachedSurface(&ddsd.ddsCaps, &this->m_ddSurface2)) { goto done; + } } else { memset(&ddsd, 0, sizeof(ddsd)); @@ -193,8 +204,9 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface1, NULL)) + if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface1, NULL)) { goto done; + } memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); @@ -203,11 +215,13 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) ddsd.dwHeight = this->m_videoParam.GetRect().GetHeight(); ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN; - if (!this->m_videoParam.Flags().GetBackBuffers()) + if (!this->m_videoParam.Flags().GetBackBuffers()) { ddsd.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; + } - if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface2, NULL)) + if (lpDirectDraw->CreateSurface(&ddsd, &this->m_ddSurface2, NULL)) { goto done; + } } memset(&this->m_surfaceDesc, 0, sizeof(this->m_surfaceDesc)); @@ -215,8 +229,9 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) if (!this->m_ddSurface2->GetSurfaceDesc(&this->m_surfaceDesc)) { if (!lpDirectDraw->CreateClipper(0, &this->m_ddClipper, NULL) && !this->m_ddClipper->SetHWnd(0, hWnd) && - !this->m_ddSurface1->SetClipper(this->m_ddClipper)) + !this->m_ddSurface1->SetClipper(this->m_ddClipper)) { result = SUCCESS; + } } done: @@ -227,18 +242,22 @@ done: void MxDisplaySurface::Destroy() { if (this->m_initialized) { - if (this->m_ddSurface2) + if (this->m_ddSurface2) { this->m_ddSurface2->Release(); + } - if (this->m_ddSurface1) + if (this->m_ddSurface1) { this->m_ddSurface1->Release(); + } - if (this->m_ddClipper) + if (this->m_ddClipper) { this->m_ddClipper->Release(); + } } - if (this->m_16bitPal) + if (this->m_16bitPal) { delete[] this->m_16bitPal; + } this->Init(); } @@ -273,8 +292,9 @@ void MxDisplaySurface::SetPalette(MxPalette* p_palette) } if (m_surfaceDesc.ddpfPixelFormat.dwRGBBitCount == 16) { - if (!m_16bitPal) + if (!m_16bitPal) { m_16bitPal = new MxU16[256]; + } PALETTEENTRY palette[256]; p_palette->GetEntries(palette); @@ -287,9 +307,9 @@ void MxDisplaySurface::SetPalette(MxPalette* p_palette) MxU8 totalBitsBlue = CountTotalBitsSetTo1(m_surfaceDesc.ddpfPixelFormat.dwBBitMask); for (MxS32 i = 0; i < 256; i++) { - m_16bitPal[i] = (((palette[i].peRed >> (8 - totalBitsRed & 0x1f)) << (contiguousBitsRed & 0x1f))) | - (((palette[i].peGreen >> (8 - totalBitsGreen & 0x1f)) << (contiguousBitsGreen & 0x1f))) | - (((palette[i].peBlue >> (8 - totalBitsBlue & 0x1f)) << (contiguousBitsBlue & 0x1f))); + m_16bitPal[i] = (((palette[i].peRed >> ((8 - totalBitsRed) & 0x1f)) << (contiguousBitsRed & 0x1f))) | + (((palette[i].peGreen >> ((8 - totalBitsGreen) & 0x1f)) << (contiguousBitsGreen & 0x1f))) | + (((palette[i].peBlue >> ((8 - totalBitsBlue) & 0x1f)) << (contiguousBitsBlue & 0x1f))); } } } @@ -528,8 +548,9 @@ void MxDisplaySurface::Display(MxS32 p_left, MxS32 p_top, MxS32 p_left2, MxS32 p // FUNCTION: LEGO1 0x100bbc10 void MxDisplaySurface::GetDC(HDC* p_hdc) { - if (this->m_ddSurface2 && !this->m_ddSurface2->GetDC(p_hdc)) + if (this->m_ddSurface2 && !this->m_ddSurface2->GetDC(p_hdc)) { return; + } *p_hdc = NULL; } @@ -537,8 +558,9 @@ void MxDisplaySurface::GetDC(HDC* p_hdc) // FUNCTION: LEGO1 0x100bbc40 void MxDisplaySurface::ReleaseDC(HDC p_hdc) { - if (this->m_ddSurface2 && p_hdc) + if (this->m_ddSurface2 && p_hdc) { this->m_ddSurface2->ReleaseDC(p_hdc); + } } // FUNCTION: LEGO1 0x100bbc60 @@ -557,8 +579,9 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::VTable0x44( memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - if (draw->GetDisplayMode(&ddsd)) + if (draw->GetDisplayMode(&ddsd)) { return NULL; + } ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; ddsd.dwWidth = p_bitmap->GetBmiWidth(); @@ -579,8 +602,9 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::VTable0x44( surface = NULL; } } - else + else { surface = NULL; + } } if (surface) { @@ -604,8 +628,9 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::VTable0x44( // TODO: Probably p_bitmap->GetAdjustedStride() MxS32 rowSeek = p_bitmap->GetBmiStride(); - if (p_bitmap->GetBmiHeader()->biCompression != BI_RGB_TOPDOWN && p_bitmap->GetBmiHeight() >= 0) + if (p_bitmap->GetBmiHeader()->biCompression != BI_RGB_TOPDOWN && p_bitmap->GetBmiHeight() >= 0) { rowSeek = -rowSeek; + } MxLong newPitch = ddsd.lPitch; switch (ddsd.ddpfPixelFormat.dwRGBBitCount) { @@ -714,15 +739,17 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CreateCursorSurface() ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; - if (draw->CreateSurface(&ddsd, &newSurface, NULL) != DD_OK) + if (draw->CreateSurface(&ddsd, &newSurface, NULL) != DD_OK) { goto done; + } } memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - if (newSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL) != DD_OK) + if (newSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL) != DD_OK) { goto done; + } else { MxU16* surface = (MxU16*) ddsd.lpSurface; MxLong pitch = ddsd.lPitch; @@ -732,10 +759,12 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::CreateCursorSurface() MxU16* surface2 = surface; for (MxS32 y = 0; y < 16; y++) { if ((y > 10 || x) && (x > 10 || y) && x + y != 10) { - if (x + y > 10) + if (x + y > 10) { *surface2 = 31775; - else + } + else { *surface2 = -1; + } } else { *surface2 = 0; diff --git a/LEGO1/omni/src/video/mxflcpresenter.cpp b/LEGO1/omni/src/video/mxflcpresenter.cpp index ff82aa60..5cc4ee6a 100644 --- a/LEGO1/omni/src/video/mxflcpresenter.cpp +++ b/LEGO1/omni/src/video/mxflcpresenter.cpp @@ -35,8 +35,9 @@ void MxFlcPresenter::LoadHeader(MxStreamChunk* p_chunk) // FUNCTION: LEGO1 0x100b34d0 void MxFlcPresenter::CreateBitmap() { - if (m_bitmap) + if (m_bitmap) { delete m_bitmap; + } m_bitmap = new MxBitmap; m_bitmap->SetSize(m_flcHeader->width, m_flcHeader->height, NULL, FALSE); @@ -62,8 +63,9 @@ void MxFlcPresenter::LoadFrame(MxStreamChunk* p_chunk) &decodedColorMap ); - if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && decodedColorMap) + if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && decodedColorMap) { RealizePalette(); + } for (MxS32 i = 0; i < rectCount; i++) { MxRect32 rect(rects[i]); diff --git a/LEGO1/omni/src/video/mxloopingflcpresenter.cpp b/LEGO1/omni/src/video/mxloopingflcpresenter.cpp index cc36792d..6d70842c 100644 --- a/LEGO1/omni/src/video/mxloopingflcpresenter.cpp +++ b/LEGO1/omni/src/video/mxloopingflcpresenter.cpp @@ -31,8 +31,9 @@ void MxLoopingFlcPresenter::Destroy(MxBool p_fromDestructor) Init(); m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxFlcPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x100b4470 @@ -40,8 +41,9 @@ void MxLoopingFlcPresenter::NextFrame() { MxStreamChunk* chunk = NextChunk(); - if (chunk->GetFlags() & MxDSChunk::c_end) + if (chunk->GetFlags() & MxDSChunk::c_end) { ProgressTickleState(e_repeating); + } else { LoadFrame(chunk); LoopChunk(chunk); @@ -54,8 +56,9 @@ void MxLoopingFlcPresenter::NextFrame() // FUNCTION: LEGO1 0x100b44c0 void MxLoopingFlcPresenter::VTable0x88() { - if (m_action->GetDuration() < m_elapsedDuration) + if (m_action->GetDuration() < m_elapsedDuration) { ProgressTickleState(e_unk5); + } else { MxStreamChunk* chunk; m_loopingChunkCursor->Current(chunk); @@ -81,8 +84,9 @@ void MxLoopingFlcPresenter::RepeatingTickle() time += m_flcHeader->speed; cursor.Reset(); - while (cursor.Next(chunk)) + while (cursor.Next(chunk)) { chunk->SetTime(chunk->GetTime() + time); + } m_loopingChunkCursor->Next(); } @@ -90,15 +94,17 @@ void MxLoopingFlcPresenter::RepeatingTickle() MxStreamChunk* chunk; m_loopingChunkCursor->Current(chunk); - if (m_action->GetElapsedTime() < chunk->GetTime()) + if (m_action->GetElapsedTime() < chunk->GetTime()) { break; + } VTable0x88(); m_loopingChunkCursor->Next(chunk); - if (m_currentTickleState != e_repeating) + if (m_currentTickleState != e_repeating) { break; + } } } @@ -114,8 +120,9 @@ MxResult MxLoopingFlcPresenter::AddToManager() result = SUCCESS; } - if (locked) + if (locked) { m_criticalSection.Leave(); + } return result; } diff --git a/LEGO1/omni/src/video/mxloopingsmkpresenter.cpp b/LEGO1/omni/src/video/mxloopingsmkpresenter.cpp index 86b93544..2f4a5087 100644 --- a/LEGO1/omni/src/video/mxloopingsmkpresenter.cpp +++ b/LEGO1/omni/src/video/mxloopingsmkpresenter.cpp @@ -32,8 +32,9 @@ void MxLoopingSmkPresenter::Destroy(MxBool p_fromDestructor) Init(); m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxSmkPresenter::Destroy(); + } } // FUNCTION: LEGO1 0x100b4a00 @@ -51,8 +52,9 @@ void MxLoopingSmkPresenter::NextFrame() { MxStreamChunk* chunk = NextChunk(); - if (chunk->GetFlags() & MxDSChunk::c_end) + if (chunk->GetFlags() & MxDSChunk::c_end) { ProgressTickleState(e_repeating); + } else { LoadFrame(chunk); LoopChunk(chunk); @@ -65,8 +67,9 @@ void MxLoopingSmkPresenter::NextFrame() // FUNCTION: LEGO1 0x100b4a90 void MxLoopingSmkPresenter::VTable0x8c() { - if (m_action->GetDuration() < m_elapsedDuration) + if (m_action->GetDuration() < m_elapsedDuration) { ProgressTickleState(e_unk5); + } else { MxStreamChunk* chunk; m_loopingChunkCursor->Current(chunk); @@ -92,8 +95,9 @@ void MxLoopingSmkPresenter::RepeatingTickle() time += 1000 / ((MxDSMediaAction*) m_action)->GetFramesPerSecond(); cursor.Reset(); - while (cursor.Next(chunk)) + while (cursor.Next(chunk)) { chunk->SetTime(chunk->GetTime() + time); + } m_loopingChunkCursor->Next(); } @@ -101,15 +105,17 @@ void MxLoopingSmkPresenter::RepeatingTickle() MxStreamChunk* chunk; m_loopingChunkCursor->Current(chunk); - if (m_action->GetElapsedTime() < chunk->GetTime()) + if (m_action->GetElapsedTime() < chunk->GetTime()) { break; + } VTable0x8c(); m_loopingChunkCursor->Next(chunk); - if (m_currentTickleState != e_repeating) + if (m_currentTickleState != e_repeating) { break; + } } } diff --git a/LEGO1/omni/src/video/mxpalette.cpp b/LEGO1/omni/src/video/mxpalette.cpp index 8431fb76..76b9a779 100644 --- a/LEGO1/omni/src/video/mxpalette.cpp +++ b/LEGO1/omni/src/video/mxpalette.cpp @@ -110,18 +110,23 @@ LPDIRECTDRAWPALETTE MxPalette::CreateNativePalette() { MxS32 i; if (this->m_palette == NULL) { - for (i = 0; i < 10; i++) + for (i = 0; i < 10; i++) { this->m_entries[i].peFlags = 0x80; - for (i = 10; i < 136; i++) + } + for (i = 10; i < 136; i++) { this->m_entries[i].peFlags = 0x44; - for (i = 136; i < 140; i++) + } + for (i = 136; i < 140; i++) { this->m_entries[i].peFlags = 0x84; + } this->m_entries[140].peFlags = 0x84; this->m_entries[141].peFlags = 0x44; - for (i = 142; i < 246; i++) + for (i = 142; i < 246; i++) { this->m_entries[i].peFlags = 0x84; - for (i = 246; i < 256; i++) + } + for (i = 246; i < 256; i++) { this->m_entries[i].peFlags = 0x80; + } if (MVideoManager() && MVideoManager()->GetDirectDraw()) { MVideoManager()->GetDirectDraw()->CreatePalette(4, this->m_entries, &this->m_palette, NULL); @@ -154,8 +159,9 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) MxResult status = SUCCESS; if (this->m_palette) { - for (i = 0; i < 10; i++) + for (i = 0; i < 10; i++) { this->m_entries[i].peFlags = 0x80; + } for (i = 10; i < 136; i++) { this->m_entries[i].peFlags = 68; this->m_entries[i].peRed = p_entries[i].peRed; @@ -186,11 +192,13 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) this->m_entries[i].peBlue = p_entries[i].peBlue; } - for (i = 246; i < 256; i++) + for (i = 246; i < 256; i++) { this->m_entries[i].peFlags = 0x80; + } - if (this->m_palette->SetEntries(0, 0, 256, this->m_entries)) + if (this->m_palette->SetEntries(0, 0, 256, this->m_entries)) { status = FAILURE; + } } return status; @@ -222,12 +230,15 @@ void MxPalette::Detach() MxBool MxPalette::operator==(MxPalette& p_other) { for (MxS32 i = 0; i < 256; i++) { - if (this->m_entries[i].peRed != p_other.m_entries[i].peRed) + if (this->m_entries[i].peRed != p_other.m_entries[i].peRed) { return FALSE; - if (this->m_entries[i].peGreen != p_other.m_entries[i].peGreen) + } + if (this->m_entries[i].peGreen != p_other.m_entries[i].peGreen) { return FALSE; - if (this->m_entries[i].peBlue != p_other.m_entries[i].peBlue) + } + if (this->m_entries[i].peBlue != p_other.m_entries[i].peBlue) { return FALSE; + } } return TRUE; } diff --git a/LEGO1/omni/src/video/mxregion.cpp b/LEGO1/omni/src/video/mxregion.cpp index ea7fab55..ca3698e9 100644 --- a/LEGO1/omni/src/video/mxregion.cpp +++ b/LEGO1/omni/src/video/mxregion.cpp @@ -22,8 +22,9 @@ MxBool MxRegion::VTable0x20() // FUNCTION: LEGO1 0x100c3690 MxRegion::~MxRegion() { - if (m_list) + if (m_list) { delete m_list; + } } // FUNCTION: LEGO1 0x100c3700 @@ -88,17 +89,20 @@ void MxRegion::VTable0x18(MxRect32& p_rect) // FUNCTION: LEGO1 0x100c3e20 MxBool MxRegion::VTable0x1c(MxRect32& p_rect) { - if (!m_rect.IntersectsWith(p_rect)) + if (!m_rect.IntersectsWith(p_rect)) { return FALSE; + } MxRegionTopBottomListCursor cursor(m_list); MxRegionTopBottom* topBottom; while (cursor.Next(topBottom)) { - if (topBottom->GetTop() >= p_rect.GetBottom()) + 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->FUN_100c57b0(p_rect)) { return TRUE; + } } return FALSE; @@ -130,27 +134,31 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right) MxRegionLeftRightListCursor b(m_leftRightList); MxRegionLeftRight* leftRight; - while (a.Next(leftRight) && leftRight->GetRight() < p_left) + while (a.Next(leftRight) && leftRight->GetRight() < p_left) { ; + } if (!a.HasMatch()) { MxRegionLeftRight* copy = new MxRegionLeftRight(p_left, p_right); m_leftRightList->Append(copy); } else { - if (p_left > leftRight->GetLeft()) + if (p_left > leftRight->GetLeft()) { p_left = leftRight->GetLeft(); + } while (leftRight->GetLeft() < p_right) { - if (p_right < leftRight->GetRight()) + if (p_right < leftRight->GetRight()) { p_right = leftRight->GetRight(); + } b = a; b.Next(); a.Destroy(); - if (!b.Current(leftRight)) + if (!b.Current(leftRight)) { break; + } a = b; } @@ -174,8 +182,9 @@ MxRegionTopBottom* MxRegionTopBottom::Clone() MxRegionLeftRightListCursor cursor(m_leftRightList); MxRegionLeftRight* leftRight; - while (cursor.Next(leftRight)) + while (cursor.Next(leftRight)) { clone->m_leftRightList->Append(leftRight->Clone()); + } return clone; } @@ -187,10 +196,12 @@ MxBool MxRegionTopBottom::FUN_100c57b0(MxRect32& p_rect) MxRegionLeftRight* leftRight; while (cursor.Next(leftRight)) { - if (p_rect.GetRight() <= leftRight->GetLeft()) + if (p_rect.GetRight() <= leftRight->GetLeft()) { return FALSE; - if (leftRight->GetRight() > p_rect.GetLeft()) + } + if (leftRight->GetRight() > p_rect.GetLeft()) { return TRUE; + } } return FALSE; diff --git a/LEGO1/omni/src/video/mxregioncursor.cpp b/LEGO1/omni/src/video/mxregioncursor.cpp index 89c90403..6b74ee3f 100644 --- a/LEGO1/omni/src/video/mxregioncursor.cpp +++ b/LEGO1/omni/src/video/mxregioncursor.cpp @@ -14,14 +14,17 @@ MxRegionCursor::MxRegionCursor(MxRegion* p_region) // FUNCTION: LEGO1 0x100c40b0 MxRegionCursor::~MxRegionCursor() { - if (m_rect) + if (m_rect) { delete m_rect; + } - if (m_topBottomCursor) + if (m_topBottomCursor) { delete m_topBottomCursor; + } - if (m_leftRightCursor) + if (m_leftRightCursor) { delete m_leftRightCursor; + } } // FUNCTION: LEGO1 0x100c4140 @@ -38,8 +41,9 @@ MxRect32* MxRegionCursor::VTable0x18() UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom()); } - else + else { Reset(); + } return m_rect; } @@ -58,8 +62,9 @@ MxRect32* MxRegionCursor::VTable0x20() UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom()); } - else + else { Reset(); + } return m_rect; } @@ -144,11 +149,13 @@ MxRect32* MxRegionCursor::VTable0x24(MxRect32& p_rect) UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom()); m_rect->Intersect(p_rect); } - else + else { FUN_100c4a20(p_rect); + } } - else + else { FUN_100c4a20(p_rect); + } return m_rect; } @@ -167,11 +174,13 @@ MxRect32* MxRegionCursor::VTable0x2c(MxRect32& p_rect) UpdateRect(leftRight->GetLeft(), topBottom->GetTop(), leftRight->GetRight(), topBottom->GetBottom()); m_rect->Intersect(p_rect); } - else + else { FUN_100c4b50(p_rect); + } } - else + else { FUN_100c4b50(p_rect); + } return m_rect; } @@ -195,8 +204,9 @@ void MxRegionCursor::Reset() // FUNCTION: LEGO1 0x100c46c0 void MxRegionCursor::FUN_100c46c0(MxRegionLeftRightList& p_leftRightList) { - if (m_leftRightCursor) + if (m_leftRightCursor) { delete m_leftRightCursor; + } m_leftRightCursor = new MxRegionLeftRightListCursor(&p_leftRightList); } @@ -204,8 +214,9 @@ void MxRegionCursor::FUN_100c46c0(MxRegionLeftRightList& p_leftRightList) // FUNCTION: LEGO1 0x100c4980 void MxRegionCursor::UpdateRect(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom) { - if (!m_rect) + if (!m_rect) { m_rect = new MxRect32; + } m_rect->SetLeft(p_left); m_rect->SetTop(p_top); @@ -228,8 +239,9 @@ void MxRegionCursor::FUN_100c4a20(MxRect32& p_rect) MxRegionLeftRight* leftRight; while (m_leftRightCursor->Next(leftRight)) { - if (p_rect.GetRight() <= leftRight->GetLeft()) + if (p_rect.GetRight() <= leftRight->GetLeft()) { break; + } if (p_rect.GetLeft() < leftRight->GetRight()) { UpdateRect( @@ -263,8 +275,9 @@ void MxRegionCursor::FUN_100c4b50(MxRect32& p_rect) MxRegionLeftRight* leftRight; while (m_leftRightCursor->Prev(leftRight)) { - if (leftRight->GetRight() <= p_rect.GetLeft()) + if (leftRight->GetRight() <= p_rect.GetLeft()) { break; + } if (leftRight->GetLeft() < p_rect.GetRight()) { UpdateRect( diff --git a/LEGO1/omni/src/video/mxsmack.cpp b/LEGO1/omni/src/video/mxsmack.cpp index 551b87c9..8d1835fe 100644 --- a/LEGO1/omni/src/video/mxsmack.cpp +++ b/LEGO1/omni/src/video/mxsmack.cpp @@ -40,8 +40,9 @@ MxResult MxSmack::LoadHeader(MxU8* p_data, MxSmack* p_mxSmack) // TODO for (MxU32 i = 0; i < FRAME_COUNT(p_mxSmack); i++) { - if (p_mxSmack->m_maxFrameSize < frameSizes[i]) + if (p_mxSmack->m_maxFrameSize < frameSizes[i]) { p_mxSmack->m_maxFrameSize = frameSizes[i]; + } } frameTypes = new MxU8[FRAME_COUNT(p_mxSmack)]; @@ -54,8 +55,9 @@ MxResult MxSmack::LoadHeader(MxU8* p_data, MxSmack* p_mxSmack) p_data += FRAME_COUNT(p_mxSmack); MxU32 treeSize = p_mxSmack->m_smackTag.tablesize + 0x1000; - if (treeSize <= 0x2000) + if (treeSize <= 0x2000) { treeSize = 0x2000; + } huffmanTrees = new MxU8[treeSize]; @@ -127,16 +129,21 @@ MxResult MxSmack::LoadHeader(MxU8* p_data, MxSmack* p_mxSmack) // FUNCTION: LEGO1 0x100c5d40 void MxSmack::Destroy(MxSmack* p_mxSmack) { - if (p_mxSmack->m_frameSizes) + if (p_mxSmack->m_frameSizes) { delete[] p_mxSmack->m_frameSizes; - if (p_mxSmack->m_frameTypes) + } + if (p_mxSmack->m_frameTypes) { delete[] p_mxSmack->m_frameTypes; - if (p_mxSmack->m_huffmanTrees) + } + if (p_mxSmack->m_huffmanTrees) { delete[] p_mxSmack->m_huffmanTrees; - if (p_mxSmack->m_huffmanTables) + } + if (p_mxSmack->m_huffmanTables) { delete[] p_mxSmack->m_huffmanTables; - if (p_mxSmack->m_unk0x6b4) + } + if (p_mxSmack->m_unk0x6b4) { delete[] p_mxSmack->m_unk0x6b4; + } } // This should be refactored to somewhere else @@ -223,12 +230,14 @@ MxBool MxSmack::GetRect(MxU8* p_unk0x6b4, MxU16* p_und, u32* p_smackRect, MxRect { u32 left, bottom, top, right; - if (!*p_und) + if (!*p_und) { return FALSE; + } if (*p_und == 1) { - if (!SmackGetRect(p_unk0x6b4, p_smackRect)) + if (!SmackGetRect(p_unk0x6b4, p_smackRect)) { return FALSE; + } *p_und = 2; } @@ -238,10 +247,12 @@ MxBool MxSmack::GetRect(MxU8* p_unk0x6b4, MxU16* p_und, u32* p_smackRect, MxRect bottom = p_smackRect[3] + p_smackRect[1]; while (SmackGetRect(p_unk0x6b4, p_smackRect)) { - if (left > p_smackRect[0]) + if (left > p_smackRect[0]) { left = p_smackRect[0]; - if (right < p_smackRect[0] + p_smackRect[2]) + } + if (right < p_smackRect[0] + p_smackRect[2]) { right = p_smackRect[0] + p_smackRect[2]; + } bottom = p_smackRect[1] + p_smackRect[3]; } diff --git a/LEGO1/omni/src/video/mxsmkpresenter.cpp b/LEGO1/omni/src/video/mxsmkpresenter.cpp index 1779fe82..8bb2ed6f 100644 --- a/LEGO1/omni/src/video/mxsmkpresenter.cpp +++ b/LEGO1/omni/src/video/mxsmkpresenter.cpp @@ -51,8 +51,9 @@ void MxSmkPresenter::LoadHeader(MxStreamChunk* p_chunk) // FUNCTION: LEGO1 0x100b3960 void MxSmkPresenter::CreateBitmap() { - if (m_bitmap) + if (m_bitmap) { delete m_bitmap; + } m_bitmap = new MxBitmap; m_bitmap->SetSize(m_mxSmack.m_smackTag.Width, m_mxSmack.m_smackTag.Height, NULL, FALSE); @@ -72,8 +73,9 @@ void MxSmkPresenter::LoadFrame(MxStreamChunk* p_chunk) MxRectList list(TRUE); MxSmack::LoadFrame(bitmapInfo, bitmapData, &m_mxSmack, chunkData, paletteChanged, &list); - if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && paletteChanged) + if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && paletteChanged) { RealizePalette(); + } MxRect32 invalidateRect; MxRectListCursor cursor(&list); @@ -91,8 +93,9 @@ void MxSmkPresenter::VTable0x88() { if ((m_mxSmack.m_smackTag.SmackerType & 1) != 0) { MxU32 und = (m_currentFrame % m_mxSmack.m_smackTag.Frames); - if (1 < m_currentFrame && und == 1) + if (1 < m_currentFrame && und == 1) { m_currentFrame = 1; + } } else { if (m_mxSmack.m_smackTag.Frames == m_currentFrame) { diff --git a/LEGO1/omni/src/video/mxstillpresenter.cpp b/LEGO1/omni/src/video/mxstillpresenter.cpp index 83b1a87e..ca749578 100644 --- a/LEGO1/omni/src/video/mxstillpresenter.cpp +++ b/LEGO1/omni/src/video/mxstillpresenter.cpp @@ -19,21 +19,24 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor) { m_criticalSection.Enter(); - if (m_bitmapInfo) + if (m_bitmapInfo) { delete m_bitmapInfo; + } m_bitmapInfo = NULL; m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxVideoPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x100b9cc0 void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk) { - if (m_bitmapInfo) + if (m_bitmapInfo) { delete m_bitmapInfo; + } MxU8* data = new MxU8[p_chunk->GetLength()]; m_bitmapInfo = (MxBITMAPINFO*) data; @@ -43,8 +46,9 @@ void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk) // FUNCTION: LEGO1 0x100b9d10 void MxStillPresenter::CreateBitmap() { - if (m_bitmap) + if (m_bitmap) { delete m_bitmap; + } m_bitmap = new MxBitmap; m_bitmap->ImportBitmapInfo(m_bitmapInfo); @@ -90,10 +94,12 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk) delete m_bitmap; m_bitmap = NULL; - if (m_unk0x58 && und) + if (m_unk0x58 && und) { SetBit2(TRUE); - else + } + else { SetBit2(FALSE); + } } } @@ -110,8 +116,9 @@ void MxStillPresenter::StartingTickle() { MxVideoPresenter::StartingTickle(); - if (m_currentTickleState == e_streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement()) + if (m_currentTickleState == e_streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement()) { RealizePalette(); + } } // FUNCTION: LEGO1 0x100b9f90 @@ -124,8 +131,9 @@ void MxStillPresenter::StreamingTickle() NextFrame(); ProgressTickleState(e_repeating); - if (m_action->GetDuration() == -1 && m_compositePresenter) + if (m_action->GetDuration() == -1 && m_compositePresenter) { m_compositePresenter->VTable0x60(this); + } } } @@ -133,8 +141,9 @@ void MxStillPresenter::StreamingTickle() void MxStillPresenter::RepeatingTickle() { if (m_action->GetDuration() != -1) { - if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) + if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) { ProgressTickleState(e_unk5); + } } } @@ -185,13 +194,15 @@ void MxStillPresenter::ParseExtra() { MxPresenter::ParseExtra(); - if (m_action->GetFlags() & MxDSAction::c_bit5) + if (m_action->GetFlags() & MxDSAction::c_bit5) { SetBit3(TRUE); + } MxU32 len = m_action->GetExtraLength(); - if (len == 0) + if (len == 0) { return; + } len &= MAXWORD; @@ -233,15 +244,18 @@ MxStillPresenter* MxStillPresenter::Clone() if (m_bitmap) { presenter->m_bitmap = new MxBitmap; - if (!presenter->m_bitmap || presenter->m_bitmap->ImportBitmap(m_bitmap) != SUCCESS) + if (!presenter->m_bitmap || presenter->m_bitmap->ImportBitmap(m_bitmap) != SUCCESS) { goto done; + } } - if (m_unk0x58) + if (m_unk0x58) { presenter->m_unk0x58 = MxDisplaySurface::FUN_100bbfb0(m_unk0x58); + } - if (m_alpha) + if (m_alpha) { presenter->m_alpha = new MxVideoPresenter::AlphaMask(*m_alpha); + } result = SUCCESS; } diff --git a/LEGO1/omni/src/video/mxvideomanager.cpp b/LEGO1/omni/src/video/mxvideomanager.cpp index 9a2a6cee..f2c9ddfa 100644 --- a/LEGO1/omni/src/video/mxvideomanager.cpp +++ b/LEGO1/omni/src/video/mxvideomanager.cpp @@ -42,32 +42,39 @@ void MxVideoManager::Destroy(MxBool p_fromDestructor) m_thread->Terminate(); delete m_thread; } - else + else { TickleManager()->UnregisterClient(this); + } m_criticalSection.Enter(); - if (m_displaySurface) + if (m_displaySurface) { delete m_displaySurface; + } - if (m_region) + if (m_region) { delete m_region; + } - if (m_videoParam.GetPalette()) + if (m_videoParam.GetPalette()) { delete m_videoParam.GetPalette(); + } if (m_unk0x60) { - if (m_pDirectDraw) + if (m_pDirectDraw) { m_pDirectDraw->Release(); - if (m_pDirect3D) + } + if (m_pDirect3D) { m_pDirect3D->Release(); + } } Init(); m_criticalSection.Leave(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaManager::Destroy(); + } } // FUNCTION: LEGO1 0x100be3e0 @@ -85,8 +92,9 @@ void MxVideoManager::UpdateRegion() // FUNCTION: LEGO1 0x100be440 void MxVideoManager::SortPresenterList() { - if (this->m_presenters->GetCount() <= 1) + if (this->m_presenters->GetCount() <= 1) { return; + } MxPresenterListCursor a(this->m_presenters); MxPresenterListCursor b(this->m_presenters); @@ -132,8 +140,9 @@ MxResult MxVideoManager::VTable0x28( m_unk0x60 = FALSE; - if (MxMediaManager::InitPresenters() != SUCCESS) + if (MxMediaManager::InitPresenters() != SUCCESS) { goto done; + } m_criticalSection.Enter(); locked = TRUE; @@ -141,8 +150,9 @@ MxResult MxVideoManager::VTable0x28( m_videoParam = p_videoParam; m_region = new MxRegion(); - if (!m_region) + if (!m_region) { goto done; + } m_pDirectDraw = p_pDirectDraw; m_pDirect3D = p_pDirect3D; @@ -152,15 +162,17 @@ MxResult MxVideoManager::VTable0x28( palette = new MxPalette(); m_videoParam.SetPalette(palette); - if (!palette) + if (!palette) { goto done; + } } else { palette = p_videoParam.GetPalette()->Clone(); m_videoParam.SetPalette(palette); - if (!palette) + if (!palette) { goto done; + } } m_displaySurface = new MxDisplaySurface(); @@ -170,21 +182,25 @@ MxResult MxVideoManager::VTable0x28( if (p_createThread) { m_thread = new MxTickleThread(this, p_frequencyMS); - if (!m_thread || m_thread->Start(0, 0) != SUCCESS) + if (!m_thread || m_thread->Start(0, 0) != SUCCESS) { goto done; + } } - else + else { TickleManager()->RegisterClient(this, p_frequencyMS); + } status = SUCCESS; } done: - if (status != SUCCESS) + if (status != SUCCESS) { Destroy(); + } - if (locked) + if (locked) { m_criticalSection.Leave(); + } return status; } @@ -197,8 +213,9 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, m_unk0x60 = TRUE; - if (MxMediaManager::InitPresenters() != SUCCESS) + if (MxMediaManager::InitPresenters() != SUCCESS) { goto done; + } m_criticalSection.Enter(); locked = TRUE; @@ -206,29 +223,34 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, m_videoParam = p_videoParam; m_region = new MxRegion(); - if (!m_region) + if (!m_region) { goto done; + } - if (DirectDrawCreate(NULL, &m_pDirectDraw, NULL) != DD_OK) + if (DirectDrawCreate(NULL, &m_pDirectDraw, NULL) != DD_OK) { goto done; + } - if (m_pDirectDraw->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DDSCL_NORMAL) != DD_OK) + if (m_pDirectDraw->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DDSCL_NORMAL) != DD_OK) { goto done; + } MxPalette* palette; if (p_videoParam.GetPalette() == NULL) { palette = new MxPalette(); m_videoParam.SetPalette(palette); - if (!palette) + if (!palette) { goto done; + } } else { palette = p_videoParam.GetPalette()->Clone(); m_videoParam.SetPalette(palette); - if (!palette) + if (!palette) { goto done; + } } m_displaySurface = new MxDisplaySurface(); @@ -238,21 +260,25 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, if (p_createThread) { m_thread = new MxTickleThread(this, p_frequencyMS); - if (!m_thread || m_thread->Start(0, 0) != SUCCESS) + if (!m_thread || m_thread->Start(0, 0) != SUCCESS) { goto done; + } } - else + else { TickleManager()->RegisterClient(this, p_frequencyMS); + } status = SUCCESS; } done: - if (status != SUCCESS) + if (status != SUCCESS) { Destroy(); + } - if (locked) + if (locked) { m_criticalSection.Leave(); + } return status; } @@ -268,8 +294,9 @@ void MxVideoManager::InvalidateRect(MxRect32& p_rect) { m_criticalSection.Enter(); - if (m_region) + if (m_region) { m_region->VTable0x18(p_rect); + } m_criticalSection.Leave(); } @@ -284,13 +311,15 @@ MxResult MxVideoManager::Tickle() MxPresenter* presenter; MxPresenterListCursor cursor(this->m_presenters); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->Tickle(); + } cursor.Reset(); - while (cursor.Next(presenter)) + while (cursor.Next(presenter)) { presenter->PutData(); + } UpdateRegion(); m_region->Reset(); diff --git a/LEGO1/omni/src/video/mxvideoparam.cpp b/LEGO1/omni/src/video/mxvideoparam.cpp index cc833727..8e48773f 100644 --- a/LEGO1/omni/src/video/mxvideoparam.cpp +++ b/LEGO1/omni/src/video/mxvideoparam.cpp @@ -46,15 +46,17 @@ MxVideoParam::MxVideoParam(MxVideoParam& p_videoParam) // FUNCTION: LEGO1 0x100bed50 MxVideoParam::~MxVideoParam() { - if (this->m_deviceId != NULL) + if (this->m_deviceId != NULL) { delete[] this->m_deviceId; + } } // FUNCTION: LEGO1 0x100bed70 void MxVideoParam::SetDeviceName(char* p_deviceId) { - if (this->m_deviceId != NULL) + if (this->m_deviceId != NULL) { delete[] this->m_deviceId; + } if (p_deviceId != NULL) { this->m_deviceId = new char[strlen(p_deviceId) + 1]; diff --git a/LEGO1/omni/src/video/mxvideopresenter.cpp b/LEGO1/omni/src/video/mxvideopresenter.cpp index 546b7ea4..dcccf8f6 100644 --- a/LEGO1/omni/src/video/mxvideopresenter.cpp +++ b/LEGO1/omni/src/video/mxvideopresenter.cpp @@ -33,10 +33,12 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap) switch (p_bitmap.GetBmiHeader()->biCompression) { case BI_RGB: { - if (p_bitmap.GetBmiHeight() < 0) + if (p_bitmap.GetBmiHeight() < 0) { rowsBeforeTop = 0; - else + } + else { rowsBeforeTop = p_bitmap.GetBmiHeightAbs() - 1; + } bitmapSrcPtr = p_bitmap.GetBitmapData() + (p_bitmap.GetBmiStride() * rowsBeforeTop); break; } @@ -44,10 +46,12 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap) bitmapSrcPtr = p_bitmap.GetBitmapData(); break; default: { - if (p_bitmap.GetBmiHeight() < 0) + if (p_bitmap.GetBmiHeight() < 0) { rowsBeforeTop = 0; - else + } + else { rowsBeforeTop = p_bitmap.GetBmiHeightAbs() - 1; + } bitmapSrcPtr = p_bitmap.GetBitmapData() + (p_bitmap.GetBmiStride() * rowsBeforeTop); } } @@ -57,8 +61,9 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap) // If this is a bottom-up DIB, we will walk it in reverse. // TODO: Same rounding trick as in MxBitmap MxS32 rowSeek = ((m_width + 3) & -4); - if (p_bitmap.GetBmiHeader()->biCompression != BI_RGB_TOPDOWN && p_bitmap.GetBmiHeight() > 0) + if (p_bitmap.GetBmiHeader()->biCompression != BI_RGB_TOPDOWN && p_bitmap.GetBmiHeight() > 0) { rowSeek = -rowSeek; + } // The actual offset into the m_bitmask array. The two for-loops // are just for counting the pixels. @@ -95,15 +100,17 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxVideoPresenter::AlphaMask& p_alph // FUNCTION: LEGO1 0x100b26d0 MxVideoPresenter::AlphaMask::~AlphaMask() { - if (m_bitmask) + if (m_bitmask) { delete[] m_bitmask; + } } // FUNCTION: LEGO1 0x100b26f0 MxS32 MxVideoPresenter::AlphaMask::IsHit(MxU32 p_x, MxU32 p_y) { - if (p_x >= m_width || p_y >= m_height) + if (p_x >= m_width || p_y >= m_height) { return 0; + } MxS32 pos = p_y * m_width + p_x; return m_bitmask[pos / 8] & (1 << abs(abs(pos) & 7)) ? 1 : 0; @@ -132,8 +139,9 @@ void MxVideoPresenter::Init() // FUNCTION: LEGO1 0x100b27b0 void MxVideoPresenter::Destroy(MxBool p_fromDestructor) { - if (MVideoManager() != NULL) + if (MVideoManager() != NULL) { MVideoManager()->UnregisterPresenter(*this); + } if (m_unk0x58) { m_unk0x58->Release(); @@ -159,8 +167,9 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor) Init(); - if (!p_fromDestructor) + if (!p_fromDestructor) { MxMediaPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x100b28b0 @@ -183,11 +192,13 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) { MxDSAction* action = GetAction(); if ((action == NULL) || (((action->GetFlags() & MxDSAction::c_bit11) == 0) && !IsEnabled()) || - (!m_bitmap && !m_alpha)) + (!m_bitmap && !m_alpha)) { return FALSE; + } - if (!m_bitmap) + if (!m_bitmap) { return m_alpha->IsHit(p_x - m_location.GetX(), p_y - m_location.GetY()); + } MxLong heightAbs = m_bitmap->GetBmiHeightAbs(); @@ -197,8 +208,9 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) MxLong maxY = minY + heightAbs; MxLong maxX = minX + m_bitmap->GetBmiWidth(); - if (p_x < minX || p_x >= maxX || p_y < minY || p_y >= maxY) + if (p_x < minX || p_x >= maxX || p_y < minY || p_y >= maxY) { return FALSE; + } MxU8* pixel; @@ -230,11 +242,13 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) pixel = m_bitmap->GetBmiStride() * height + m_bitmap->GetBitmapData(); } - if (GetBit4()) + if (GetBit4()) { return (MxBool) *pixel; + } - if ((GetAction()->GetFlags() & MxDSAction::c_bit4) && *pixel == 0) + if ((GetAction()->GetFlags() & MxDSAction::c_bit4) && *pixel == 0) { return FALSE; + } return TRUE; } @@ -242,32 +256,40 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) inline MxS32 MxVideoPresenter::PrepareRects(MxRect32& p_rectDest, MxRect32& p_rectSrc) { if (p_rectDest.GetTop() > 480 || p_rectDest.GetLeft() > 640 || p_rectSrc.GetTop() > 480 || - p_rectSrc.GetLeft() > 640) + p_rectSrc.GetLeft() > 640) { return -1; + } - if (p_rectDest.GetBottom() > 480) + if (p_rectDest.GetBottom() > 480) { p_rectDest.SetBottom(480); + } - if (p_rectDest.GetRight() > 640) + if (p_rectDest.GetRight() > 640) { p_rectDest.SetRight(640); + } - if (p_rectSrc.GetBottom() > 480) + if (p_rectSrc.GetBottom() > 480) { p_rectSrc.SetBottom(480); + } - if (p_rectSrc.GetRight() > 640) + if (p_rectSrc.GetRight() > 640) { p_rectSrc.SetRight(640); + } MxS32 height = p_rectDest.GetHeight(); - if (height <= 1) + if (height <= 1) { return -1; + } MxS32 width = p_rectDest.GetWidth(); - if (width <= 1) + if (width <= 1) { return -1; + } if (p_rectSrc.GetRight() - width - p_rectSrc.GetLeft() == -1 && - p_rectSrc.GetBottom() - height - p_rectSrc.GetTop() == -1) + p_rectSrc.GetBottom() - height - p_rectSrc.GetTop() == -1) { return 1; + } p_rectSrc.SetRight(p_rectSrc.GetLeft() + width - 1); p_rectSrc.SetBottom(p_rectSrc.GetTop() + height - 1); @@ -325,7 +347,7 @@ void MxVideoPresenter::PutFrame() MxRegionCursor cursor(region); MxRect32* regionRect; - while (regionRect = cursor.VTable0x24(rect)) { + while ((regionRect = cursor.VTable0x24(rect))) { if (regionRect->GetWidth() >= 1 && regionRect->GetHeight() >= 1) { if (m_unk0x58) { rectSrc.SetLeft(regionRect->GetLeft() - m_location.GetX()); @@ -341,8 +363,9 @@ void MxVideoPresenter::PutFrame() if (m_action->GetFlags() & MxDSAction::c_bit4) { if (m_unk0x58) { - if (PrepareRects(rectDest, rectSrc) >= 0) + if (PrepareRects(rectDest, rectSrc) >= 0) { ddSurface->Blt((LPRECT) &rectDest, m_unk0x58, (LPRECT) &rectSrc, DDBLT_KEYSRC, NULL); + } } else { displaySurface->VTable0x30( @@ -358,8 +381,9 @@ void MxVideoPresenter::PutFrame() } } else if (m_unk0x58) { - if (PrepareRects(rectDest, rectSrc) >= 0) + if (PrepareRects(rectDest, rectSrc) >= 0) { ddSurface->Blt((LPRECT) &rectDest, m_unk0x58, (LPRECT) &rectSrc, 0, NULL); + } } else { displaySurface->VTable0x28( @@ -405,8 +429,9 @@ void MxVideoPresenter::StartingTickle() void MxVideoPresenter::StreamingTickle() { if (m_action->GetFlags() & MxDSAction::c_bit10) { - if (!m_currentChunk) + if (!m_currentChunk) { MxMediaPresenter::StreamingTickle(); + } if (m_currentChunk) { LoadFrame(m_currentChunk); @@ -418,24 +443,28 @@ void MxVideoPresenter::StreamingTickle() if (!m_currentChunk) { MxMediaPresenter::StreamingTickle(); - if (!m_currentChunk) + if (!m_currentChunk) { break; + } } - if (m_action->GetElapsedTime() < m_currentChunk->GetTime()) + if (m_action->GetElapsedTime() < m_currentChunk->GetTime()) { break; + } LoadFrame(m_currentChunk); m_subscriber->DestroyChunk(m_currentChunk); m_currentChunk = NULL; SetBit0(TRUE); - if (m_currentTickleState != e_streaming) + if (m_currentTickleState != e_streaming) { break; + } } - if (GetBit0()) + if (GetBit0()) { m_unk0x5c = 5; + } } } @@ -444,8 +473,9 @@ void MxVideoPresenter::RepeatingTickle() { if (IsEnabled()) { if (m_action->GetFlags() & MxDSAction::c_bit10) { - if (!m_currentChunk) + if (!m_currentChunk) { MxMediaPresenter::RepeatingTickle(); + } if (m_currentChunk) { LoadFrame(m_currentChunk); @@ -457,23 +487,27 @@ void MxVideoPresenter::RepeatingTickle() if (!m_currentChunk) { MxMediaPresenter::RepeatingTickle(); - if (!m_currentChunk) + if (!m_currentChunk) { break; + } } - if (m_action->GetElapsedTime() % m_action->GetLoopCount() < m_currentChunk->GetTime()) + if (m_action->GetElapsedTime() % m_action->GetLoopCount() < m_currentChunk->GetTime()) { break; + } LoadFrame(m_currentChunk); m_currentChunk = NULL; SetBit0(TRUE); - if (m_currentTickleState != e_repeating) + if (m_currentTickleState != e_repeating) { break; + } } - if (GetBit0()) + if (GetBit0()) { m_unk0x5c = 5; + } } } } @@ -485,14 +519,17 @@ void MxVideoPresenter::Unk5Tickle() if (sustainTime != -1) { if (sustainTime) { - if (m_unk0x60 == -1) + if (m_unk0x60 == -1) { m_unk0x60 = m_action->GetElapsedTime(); + } - if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime()) + if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime()) { ProgressTickleState(e_done); + } } - else + else { ProgressTickleState(e_done); + } } } @@ -534,8 +571,9 @@ MxResult MxVideoPresenter::PutData() { MxAutoLocker lock(&m_criticalSection); - if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5) + if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5) { PutFrame(); + } return SUCCESS; } diff --git a/LEGO1/realtime/matrix.h b/LEGO1/realtime/matrix.h index edca5395..266b2fa6 100644 --- a/LEGO1/realtime/matrix.h +++ b/LEGO1/realtime/matrix.h @@ -64,8 +64,9 @@ public: // FUNCTION: LEGO1 0x10002430 virtual Matrix4& operator+=(float (*p_data)[4]) { - for (int i = 0; i < 16; i++) + for (int i = 0; i < 16; i++) { ((float*) m_data)[i] += ((float*) p_data)[i]; + } return *this; } // vtable+0x2c diff --git a/LEGO1/realtime/orientableroi.cpp b/LEGO1/realtime/orientableroi.cpp index 4f48c333..4a2c979b 100644 --- a/LEGO1/realtime/orientableroi.cpp +++ b/LEGO1/realtime/orientableroi.cpp @@ -53,11 +53,12 @@ void OrientableROI::UpdateWorldData(const MxMatrix& p_transform) UpdateWorldVelocity(); // iterate over comps - if (m_comp) + if (m_comp) { for (CompoundObject::iterator iter = m_comp->begin(); !(iter == m_comp->end()); iter++) { ROI* child = *iter; static_cast(child)->UpdateWorldData(p_transform); } + } } // FUNCTION: LEGO1 0x100a5a50 diff --git a/LEGO1/realtime/orientableroi.h b/LEGO1/realtime/orientableroi.h index f218cdf4..005ec4dc 100644 --- a/LEGO1/realtime/orientableroi.h +++ b/LEGO1/realtime/orientableroi.h @@ -16,9 +16,9 @@ public: OrientableROI(); - virtual const float* GetWorldVelocity() const override; // vtable+0x08 - virtual const BoundingBox& GetWorldBoundingBox() const override; // vtable+0x0c - virtual const BoundingSphere& GetWorldBoundingSphere() const override; // vtable+0x10 + const float* GetWorldVelocity() const override; // vtable+0x08 + const BoundingBox& GetWorldBoundingBox() const override; // vtable+0x0c + const BoundingSphere& GetWorldBoundingSphere() const override; // vtable+0x10 // FUNCTION: LEGO1 0x100a5db0 virtual void VTable0x14() { VTable0x1c(); } // vtable+0x14 virtual void UpdateWorldBoundingVolumes() = 0; // vtable+0x18 diff --git a/LEGO1/realtime/vector.h b/LEGO1/realtime/vector.h index 91403ee8..a28a9874 100644 --- a/LEGO1/realtime/vector.h +++ b/LEGO1/realtime/vector.h @@ -192,7 +192,7 @@ public: // Vector2 overrides // FUNCTION: LEGO1 0x10003a60 - virtual void AddImpl(float* p_value) override + void AddImpl(float* p_value) override { m_data[0] += p_value[0]; m_data[1] += p_value[1]; @@ -200,7 +200,7 @@ public: } // vtable+0x04 // FUNCTION: LEGO1 0x10003a90 - virtual void AddImpl(float p_value) override + void AddImpl(float p_value) override { m_data[0] += p_value; m_data[1] += p_value; @@ -208,7 +208,7 @@ public: } // vtable+0x00 // FUNCTION: LEGO1 0x10003ac0 - virtual void SubImpl(float* p_value) override + void SubImpl(float* p_value) override { m_data[0] -= p_value[0]; m_data[1] -= p_value[1]; @@ -216,7 +216,7 @@ public: } // vtable+0x08 // FUNCTION: LEGO1 0x10003b20 - virtual void MulScalarImpl(float* p_value) override + void MulScalarImpl(float* p_value) override { m_data[0] *= *p_value; m_data[1] *= *p_value; @@ -224,7 +224,7 @@ public: } // vtable+0x0c // FUNCTION: LEGO1 0x10003af0 - virtual void MulVectorImpl(float* p_value) override + void MulVectorImpl(float* p_value) override { m_data[0] *= p_value[0]; m_data[1] *= p_value[1]; @@ -232,7 +232,7 @@ public: } // vtable+0x10 // FUNCTION: LEGO1 0x10003b50 - virtual void DivScalarImpl(float* p_value) override + void DivScalarImpl(float* p_value) override { m_data[0] /= *p_value; m_data[1] /= *p_value; @@ -240,19 +240,19 @@ public: } // vtable+0x14 // FUNCTION: LEGO1 0x10003b80 - virtual float DotImpl(float* p_a, float* p_b) const override + float DotImpl(float* p_a, float* p_b) const override { return p_a[0] * p_b[0] + p_a[2] * p_b[2] + p_a[1] * p_b[1]; } // vtable+0x18 // FUNCTION: LEGO1 0x10003ba0 - virtual void EqualsImpl(float* p_data) override { memcpy(m_data, p_data, sizeof(float) * 3); } // vtable+0x20 + void EqualsImpl(float* p_data) override { memcpy(m_data, p_data, sizeof(float) * 3); } // vtable+0x20 // FUNCTION: LEGO1 0x10003bc0 - virtual void Clear() override { memset(m_data, 0, sizeof(float) * 3); } // vtable+0x2c + void Clear() override { memset(m_data, 0, sizeof(float) * 3); } // vtable+0x2c // FUNCTION: LEGO1 0x10003bd0 - virtual float LenSquared() const override + float LenSquared() const override { return m_data[1] * m_data[1] + m_data[0] * m_data[0] + m_data[2] * m_data[2]; } // vtable+0x40 @@ -289,7 +289,7 @@ public: // Vector3 overrides // FUNCTION: LEGO1 0x10002870 - virtual void AddImpl(float* p_value) override + void AddImpl(float* p_value) override { m_data[0] += p_value[0]; m_data[1] += p_value[1]; @@ -298,7 +298,7 @@ public: } // vtable+0x04 // FUNCTION: LEGO1 0x100028b0 - virtual void AddImpl(float p_value) override + void AddImpl(float p_value) override { m_data[0] += p_value; m_data[1] += p_value; @@ -307,7 +307,7 @@ public: } // vtable+0x00 // FUNCTION: LEGO1 0x100028f0 - virtual void SubImpl(float* p_value) override + void SubImpl(float* p_value) override { m_data[0] -= p_value[0]; m_data[1] -= p_value[1]; @@ -316,7 +316,7 @@ public: } // vtable+0x08 // FUNCTION: LEGO1 0x10002970 - virtual void MulScalarImpl(float* p_value) override + void MulScalarImpl(float* p_value) override { m_data[0] *= *p_value; m_data[1] *= *p_value; @@ -325,7 +325,7 @@ public: } // vtable+0x0c // FUNCTION: LEGO1 0x10002930 - virtual void MulVectorImpl(float* p_value) override + void MulVectorImpl(float* p_value) override { m_data[0] *= p_value[0]; m_data[1] *= p_value[1]; @@ -334,7 +334,7 @@ public: } // vtable+0x10 // FUNCTION: LEGO1 0x100029b0 - virtual void DivScalarImpl(float* p_value) override + void DivScalarImpl(float* p_value) override { m_data[0] /= *p_value; m_data[1] /= *p_value; @@ -343,25 +343,25 @@ public: } // vtable+0x14 // FUNCTION: LEGO1 0x100029f0 - virtual float DotImpl(float* p_a, float* p_b) const override + float DotImpl(float* p_a, float* p_b) const override { return p_a[0] * p_b[0] + p_a[2] * p_b[2] + (p_a[1] * p_b[1] + p_a[3] * p_b[3]); } // vtable+0x18 // FUNCTION: LEGO1 0x10002a20 - virtual void EqualsImpl(float* p_data) override { memcpy(m_data, p_data, sizeof(float) * 4); } // vtable+0x20 + void EqualsImpl(float* p_data) override { memcpy(m_data, p_data, sizeof(float) * 4); } // vtable+0x20 // FUNCTION: LEGO1 0x10002b00 - virtual void Clear() override { memset(m_data, 0, sizeof(float) * 4); } // vtable+0x2c + void Clear() override { memset(m_data, 0, sizeof(float) * 4); } // vtable+0x2c // FUNCTION: LEGO1 0x10002b20 - virtual float LenSquared() const override + float LenSquared() const override { return m_data[1] * m_data[1] + m_data[0] * m_data[0] + m_data[2] * m_data[2] + m_data[3] * m_data[3]; } // vtable+0x40 // FUNCTION: LEGO1 0x10002b40 - virtual void EqualsScalar(float* p_value) override + void EqualsScalar(float* p_value) override { m_data[0] = *p_value; m_data[1] = *p_value; diff --git a/LEGO1/tgl/d3drm/impl.h b/LEGO1/tgl/d3drm/impl.h index 002ee7e9..d1e2e7fc 100644 --- a/LEGO1/tgl/d3drm/impl.h +++ b/LEGO1/tgl/d3drm/impl.h @@ -40,16 +40,16 @@ class UnkImpl; class RendererImpl : public Renderer { public: RendererImpl() : m_data(0) {} - ~RendererImpl() { Destroy(); } + ~RendererImpl() override { Destroy(); } - virtual void* ImplementationDataPtr() override; + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Device* CreateDevice(const DeviceDirectDrawCreateData&) override; - virtual Device* CreateDevice(const DeviceDirect3DCreateData&) override; + Device* CreateDevice(const DeviceDirectDrawCreateData&) override; + Device* CreateDevice(const DeviceDirect3DCreateData&) override; // vtable+0x10 - virtual View* CreateView( + View* CreateView( const Device*, const Camera*, unsigned long x, @@ -57,13 +57,13 @@ public: unsigned long width, unsigned long height ) override; - virtual Camera* CreateCamera() override; - virtual Light* CreateLight(LightType, float r, float g, float b) override; - virtual Group* CreateGroup(const Group* pParent) override; + Camera* CreateCamera() override; + Light* CreateLight(LightType, float r, float g, float b) override; + Group* CreateGroup(const Group* pParent) override; // vtable+0x20 - virtual Unk* CreateUnk() override; - virtual Texture* CreateTexture( + Unk* CreateUnk() override; + Texture* CreateTexture( int width, int height, int bitsPerTexel, @@ -72,12 +72,12 @@ public: int paletteEntryCount, const PaletteEntry* pEntries ) override; - virtual Texture* CreateTexture() override; + Texture* CreateTexture() override; - virtual Result SetTextureDefaultShadeCount(unsigned long) override; + Result SetTextureDefaultShadeCount(unsigned long) override; // vtable+0x30 - virtual Result SetTextureDefaultColorCount(unsigned long) override; + Result SetTextureDefaultColorCount(unsigned long) override; public: inline Result Create(); @@ -110,7 +110,7 @@ void RendererImpl::Destroy() class DeviceImpl : public Device { public: DeviceImpl() : m_data(0) {} - ~DeviceImpl() + ~DeviceImpl() override { if (m_data) { m_data->Release(); @@ -118,22 +118,22 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual unsigned long GetWidth(); - virtual unsigned long GetHeight(); + unsigned long GetWidth() override; + unsigned long GetHeight() override; // vtable+0x10 - virtual Result SetColorModel(ColorModel); - virtual Result SetShadingModel(ShadingModel); - virtual Result SetShadeCount(unsigned long); - virtual Result SetDither(int); + Result SetColorModel(ColorModel) override; + Result SetShadingModel(ShadingModel) override; + Result SetShadeCount(unsigned long) override; + Result SetDither(int) override; // vtable+0x20 - virtual Result Update(); - virtual void InitFromD3DDevice(Device*); - virtual void InitFromWindowsDevice(Device*); + Result Update() override; + void InitFromD3DDevice(Device*) override; + void InitFromWindowsDevice(Device*) override; inline IDirect3DRMDevice2* ImplementationData() const { return m_data; } @@ -147,7 +147,7 @@ private: class ViewImpl : public View { public: ViewImpl() : m_data(0) {} - ~ViewImpl() + ~ViewImpl() override { if (m_data) { m_data->Release(); @@ -155,35 +155,35 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result Add(const Light*); - virtual Result Remove(const Light*); + Result Add(const Light*) override; + Result Remove(const Light*) override; // vtable+0x10 - virtual Result SetCamera(const Camera*); - virtual Result SetProjection(ProjectionType); - virtual Result SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees); - virtual Result SetBackgroundColor(float r, float g, float b); + Result SetCamera(const Camera*) override; + Result SetProjection(ProjectionType) override; + Result SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees) override; + Result SetBackgroundColor(float r, float g, float b) override; // vtable+0x20 - virtual Result GetBackgroundColor(float* r, float* g, float* b); - virtual Result Clear(); - virtual Result Render(const Light*); - virtual Result ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height); + Result GetBackgroundColor(float* r, float* g, float* b) override; + Result Clear() override; + Result Render(const Light*) override; + Result ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height) override; // vtable+0x30 - virtual Result TransformWorldToScreen(const float world[3], float screen[4]); - virtual Result TransformScreenToWorld(const float screen[4], float world[3]); - virtual Result Pick( + Result TransformWorldToScreen(const float world[3], float screen[4]) override; + Result TransformScreenToWorld(const float screen[4], float world[3]) override; + Result Pick( unsigned long x, unsigned long y, const Group** ppGroupsToPickFrom, int groupsToPickFromCount, const Group**& rppPickedGroups, int& rPickedGroupCount - ); + ) override; inline IDirect3DRMViewport* ImplementationData() const { return m_data; } @@ -199,7 +199,7 @@ private: class CameraImpl : public Camera { public: CameraImpl() : m_data(0) {} - ~CameraImpl() + ~CameraImpl() override { if (m_data) { m_data->Release(); @@ -207,10 +207,10 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetTransformation(FloatMatrix4&); + Result SetTransformation(FloatMatrix4&) override; inline IDirect3DRMFrame2* ImplementationData() const { return m_data; } @@ -224,7 +224,7 @@ private: class LightImpl : public Light { public: LightImpl() : m_data(0) {} - ~LightImpl() + ~LightImpl() override { if (m_data) { m_data->Release(); @@ -232,11 +232,11 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetTransformation(FloatMatrix4&); - virtual Result SetColor(float r, float g, float b); + Result SetTransformation(FloatMatrix4&) override; + Result SetColor(float r, float g, float b) override; inline IDirect3DRMFrame2* ImplementationData() const { return m_data; } @@ -250,7 +250,7 @@ private: class MeshImpl : public Mesh { public: MeshImpl() : m_data(0) {} - ~MeshImpl() + ~MeshImpl() override { if (m_data) { delete m_data; @@ -258,20 +258,20 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetColor(float r, float g, float b, float a); - virtual Result SetTexture(const Texture*); + Result SetColor(float r, float g, float b, float a) override; + Result SetTexture(const Texture*) override; // vtable+0x10 - virtual Result GetTexture(Texture*&); - virtual Result SetTextureMappingMode(ProjectionType); - virtual Result SetShadingModel(ShadingModel); - virtual Mesh* DeepClone(Unk*); + Result GetTexture(Texture*&) override; + Result SetTextureMappingMode(ProjectionType) override; + Result SetShadingModel(ShadingModel) override; + Mesh* DeepClone(Unk*) override; // vtable+0x20 - virtual Mesh* ShallowClone(Unk*); + Mesh* ShallowClone(Unk*) override; struct MeshData { IDirect3DRMMesh* groupMesh; @@ -290,7 +290,7 @@ private: class GroupImpl : public Group { public: GroupImpl() : m_data(0) {} - ~GroupImpl() + ~GroupImpl() override { if (m_data) { m_data->Release(); @@ -298,26 +298,26 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetTransformation(FloatMatrix4&); - virtual Result SetColor(float r, float g, float b, float a); + Result SetTransformation(FloatMatrix4&) override; + Result SetColor(float r, float g, float b, float a) override; // vtable+0x10 - virtual Result SetTexture(const Texture*); - virtual Result GetTexture(Texture*&); - virtual Result SetMaterialMode(MaterialMode); - virtual Result Add(const Mesh*); + Result SetTexture(const Texture*) override; + Result GetTexture(Texture*&) override; + Result SetMaterialMode(MaterialMode) override; + Result Add(const Mesh*) override; // vtable+0x20 - virtual Result Add(const Group*); - virtual Result Remove(const Mesh*); - virtual Result Remove(const Group*); - virtual Result RemoveAll(); + Result Add(const Group*) override; + Result Remove(const Mesh*) override; + Result Remove(const Group*) override; + Result RemoveAll() override; // vtable+0x30 - virtual Result Unknown(); + Result Unknown() override; friend class RendererImpl; @@ -329,7 +329,7 @@ private: class UnkImpl : public Unk { public: UnkImpl() : m_data(0) {} - ~UnkImpl() + ~UnkImpl() override { if (m_data) { m_data->Release(); @@ -337,10 +337,10 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetMeshData( + Result SetMeshData( unsigned long faceCount, unsigned long vertexCount, const float (*pPositions)[3], @@ -348,11 +348,11 @@ public: const float (*pTextureCoordinates)[2], unsigned long vertexPerFaceCount, unsigned long* pFaceData - ); - virtual Result GetBoundingBox(float min[3], float max[3]); + ) override; + Result GetBoundingBox(float min[3], float max[3]) override; // vtable+0x10 - virtual Unk* Clone(); + Unk* Clone() override; inline IDirect3DRMMesh* ImplementationData() const { return m_data; } @@ -389,7 +389,7 @@ public: class TextureImpl : public Texture { public: TextureImpl() : m_data(0) {} - ~TextureImpl() + ~TextureImpl() override { if (m_data) { m_data->Release(); @@ -397,23 +397,23 @@ public: } } - virtual void* ImplementationDataPtr(); + void* ImplementationDataPtr() override; // vtable+0x08 - virtual Result SetTexels(int width, int height, int bitsPerTexel, void* pTexels); - virtual void FillRowsOfTexture(int y, int height, void* pBuffer); + Result SetTexels(int width, int height, int bitsPerTexel, void* pTexels) override; + void FillRowsOfTexture(int y, int height, void* pBuffer) override; // vtable+0x10 - virtual Result Changed(int texelsChanged, int paletteChanged); - virtual Result GetBufferAndPalette( + Result Changed(int texelsChanged, int paletteChanged) override; + Result GetBufferAndPalette( int* pWidth, int* pHeight, int* pDepth, void** ppBuffer, int* ppPaletteSize, PaletteEntry** ppPalette - ); - virtual Result SetPalette(int entryCount, PaletteEntry* entries); + ) override; + Result SetPalette(int entryCount, PaletteEntry* entries) override; inline IDirect3DRMTexture* ImplementationData() const { return m_data; } inline void SetImplementation(IDirect3DRMTexture* pData) { m_data = pData; } diff --git a/LEGO1/viewmanager/viewlodlist.h b/LEGO1/viewmanager/viewlodlist.h index df918350..d8516955 100644 --- a/LEGO1/viewmanager/viewlodlist.h +++ b/LEGO1/viewmanager/viewlodlist.h @@ -27,7 +27,7 @@ class ViewLODList : public LODList { protected: ViewLODList(size_t capacity); - ~ViewLODList(); + ~ViewLODList() override; public: inline int AddRef(); @@ -133,8 +133,9 @@ inline int ViewLODList::AddRef() inline int ViewLODList::Release() { assert(m_refCount > 0); - if (!--m_refCount) + if (!--m_refCount) { m_owner->Destroy(this); + } return m_refCount; } diff --git a/LEGO1/viewmanager/viewroi.h b/LEGO1/viewmanager/viewroi.h index 8e6d78a9..cec1ba0e 100644 --- a/LEGO1/viewmanager/viewroi.h +++ b/LEGO1/viewmanager/viewroi.h @@ -21,7 +21,7 @@ public: SetLODList(lodList); geometry = pRenderer->CreateGroup(); } - inline ~ViewROI() + inline ~ViewROI() override { // SetLODList() will decrease refCount of LODList SetLODList(0); @@ -44,18 +44,18 @@ public: reinterpret_cast(m_lods)->AddRef(); } } - virtual float IntrinsicImportance() const override; // vtable+0x04 - virtual void VTable0x1c() override; // vtable+0x1c - virtual void SetLocalTransform(const Matrix4& p_transform) override; // vtable+0x20 - virtual void VTable0x24(const MxMatrix& p_transform) override; // vtable+0x24 - virtual const Tgl::Group* GetGeometry() const; // vtable+0x34 - virtual Tgl::Group* GetGeometry(); // vtable+0x30 + float IntrinsicImportance() const override; // vtable+0x04 + void VTable0x1c() override; // vtable+0x1c + void SetLocalTransform(const Matrix4& p_transform) override; // vtable+0x20 + void VTable0x24(const MxMatrix& p_transform) override; // vtable+0x24 + virtual const Tgl::Group* GetGeometry() const; // vtable+0x34 + virtual Tgl::Group* GetGeometry(); // vtable+0x30 static undefined SetUnk101013d8(undefined p_flag); protected: Tgl::Group* geometry; - void UpdateWorldData(const MxMatrix& parent2world); + void UpdateWorldData(const MxMatrix& parent2world) override; }; // SYNTHETIC: LEGO1 0x100aa250