clang-format

This commit is contained in:
Anonymous Maarten 2024-12-24 01:01:15 +01:00
parent 3ab4b264ad
commit c77b769790
23 changed files with 42 additions and 41 deletions

View File

@ -189,9 +189,7 @@ MxS32 IsleApp::SetupLegoOmni()
failure = Lego()->Create(param) == FAILURE; failure = Lego()->Create(param) == FAILURE;
} }
#else #else
MxS32 failure = MxS32 failure = Lego()->Create(MxOmniCreateParam(mediaPath, hwnd, m_videoParam, MxOmniCreateFlags())) == FAILURE;
Lego()->Create(MxOmniCreateParam(mediaPath, hwnd, m_videoParam, MxOmniCreateFlags())) ==
FAILURE;
#endif #endif
if (!failure) { if (!failure) {

View File

@ -5,8 +5,8 @@
#include "lego1_export.h" #include "lego1_export.h"
#include "mxcore.h" #include "mxcore.h"
#include <ddraw.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <ddraw.h>
class MxVideoPresenter; class MxVideoPresenter;

View File

@ -23,8 +23,8 @@
#include "mxvariabletable.h" #include "mxvariabletable.h"
#include "scripts.h" #include "scripts.h"
#include <stdio.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <stdio.h>
DECOMP_SIZE_ASSERT(Ambulance, 0x184) DECOMP_SIZE_ASSERT(Ambulance, 0x184)
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24) DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24)

View File

@ -6,8 +6,8 @@
#include "roi/legoroi.h" #include "roi/legoroi.h"
#include "tgl/tglvector.h" #include "tgl/tglvector.h"
#include <assert.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <assert.h>
DECOMP_SIZE_ASSERT(Doors, 0x1f8) DECOMP_SIZE_ASSERT(Doors, 0x1f8)

View File

@ -18,8 +18,8 @@
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "mxvariabletable.h" #include "mxvariabletable.h"
#include <stdio.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <stdio.h>
DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c) DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c)

View File

@ -30,13 +30,12 @@
#include "racecar_actions.h" #include "racecar_actions.h"
#include "scripts.h" #include "scripts.h"
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_timer.h>
#include <isle.h> #include <isle.h>
#include <stdio.h> #include <stdio.h>
#include <vec.h> #include <vec.h>
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_timer.h>
// Names and values verified by BETA10 0x1006d742. // Names and values verified by BETA10 0x1006d742.
// Note that these were probably hard-coded numbers in the original. // Note that these were probably hard-coded numbers in the original.
#define Helicopter_Actor CopterScript::c_Helicopter_Actor #define Helicopter_Actor CopterScript::c_Helicopter_Actor

View File

@ -28,9 +28,9 @@
#include "realtime/realtime.h" #include "realtime/realtime.h"
#include "viewmanager/viewmanager.h" #include "viewmanager/viewmanager.h"
#include <SDL3/SDL_stdinc.h>
#include <io.h> #include <io.h>
#include <stdio.h> #include <stdio.h>
#include <SDL3/SDL_stdinc.h>
#include <vec.h> #include <vec.h>
DECOMP_SIZE_ASSERT(LegoAnimationManager, 0x500) DECOMP_SIZE_ASSERT(LegoAnimationManager, 0x500)

View File

@ -16,8 +16,8 @@
#include "roi/legolod.h" #include "roi/legolod.h"
#include "viewmanager/viewmanager.h" #include "viewmanager/viewmanager.h"
#include <stdio.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <stdio.h>
#include <vec.h> #include <vec.h>
DECOMP_SIZE_ASSERT(LegoCharacter, 0x08) DECOMP_SIZE_ASSERT(LegoCharacter, 0x08)

View File

@ -61,9 +61,9 @@
#include "sndanim_actions.h" #include "sndanim_actions.h"
#include "towtrack.h" #include "towtrack.h"
#include <SDL3/SDL_stdinc.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <SDL3/SDL_stdinc.h>
DECOMP_SIZE_ASSERT(LegoGameState::Username, 0x0e) DECOMP_SIZE_ASSERT(LegoGameState::Username, 0x0e)
DECOMP_SIZE_ASSERT(LegoGameState::ScoreItem, 0x2c) DECOMP_SIZE_ASSERT(LegoGameState::ScoreItem, 0x2c)

View File

@ -8,8 +8,8 @@
#include "mxutilities.h" #include "mxutilities.h"
#include "mxvariabletable.h" #include "mxvariabletable.h"
#include <assert.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <assert.h>
DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94) DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94)

View File

@ -27,8 +27,8 @@
#include "mxstl/stlcompat.h" #include "mxstl/stlcompat.h"
#include "mxutilities.h" #include "mxutilities.h"
#include <stdio.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <stdio.h>
DECOMP_SIZE_ASSERT(LegoWorldPresenter, 0x54) DECOMP_SIZE_ASSERT(LegoWorldPresenter, 0x54)

View File

@ -8,11 +8,10 @@
#include "shape/legobox.h" #include "shape/legobox.h"
#include "shape/legosphere.h" #include "shape/legosphere.h"
#include <SDL3/SDL_stdinc.h>
#include <string.h> #include <string.h>
#include <vec.h> #include <vec.h>
#include <SDL3/SDL_stdinc.h>
DECOMP_SIZE_ASSERT(LegoROI, 0x108) DECOMP_SIZE_ASSERT(LegoROI, 0x108)
DECOMP_SIZE_ASSERT(TimeROI, 0x10c) DECOMP_SIZE_ASSERT(TimeROI, 0x10c)

View File

@ -2,19 +2,19 @@
#define LEGO1_EXPORT_H #define LEGO1_EXPORT_H
#ifdef LEGO1_STATIC #ifdef LEGO1_STATIC
# define LEGO1_EXPORT #define LEGO1_EXPORT
#elif defined(LEGO1_DLL) #elif defined(LEGO1_DLL)
# ifdef _WIN32 #ifdef _WIN32
# define LEGO1_EXPORT __declspec(dllexport) #define LEGO1_EXPORT __declspec(dllexport)
# else
# define LEGO1_EXPORT __attribute__((visibility("default")))
# endif
#else #else
# ifdef _WIN32 #define LEGO1_EXPORT __attribute__((visibility("default")))
# define LEGO1_EXPORT __declspec(dllimport) #endif
# else #else
# define LEGO1_EXPORT #ifdef _WIN32
# endif #define LEGO1_EXPORT __declspec(dllimport)
#else
#define LEGO1_EXPORT
#endif
#endif #endif
#endif #endif

View File

@ -1,7 +1,7 @@
#include "mxdirectxinfo.h" #include "mxdirectxinfo.h"
#include <assert.h>
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
#include <assert.h>
#include <stdio.h> // for vsprintf #include <stdio.h> // for vsprintf
DECOMP_SIZE_ASSERT(MxAssignedDevice, 0xe4) DECOMP_SIZE_ASSERT(MxAssignedDevice, 0xe4)

View File

@ -4,8 +4,8 @@
#include "mxcore.h" #include "mxcore.h"
#include "mxtypes.h" #include "mxtypes.h"
#include <ddraw.h>
#include <SDL3/SDL_iostream.h> #include <SDL3/SDL_iostream.h>
#include <ddraw.h>
#include <stdlib.h> #include <stdlib.h>
class MxPalette; class MxPalette;
@ -44,7 +44,7 @@ class MxBitmap : public MxCore {
virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+14 virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+14
virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+18 virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+18
virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool); // vtable+1c virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool); // vtable+1c
virtual MxResult LoadFile(SDL_IOStream* p_handle); // vtable+20 virtual MxResult LoadFile(SDL_IOStream* p_handle); // vtable+20
virtual MxLong Read(const char* p_filename); // vtable+24 virtual MxLong Read(const char* p_filename); // vtable+24
// FUNCTION: LEGO1 0x1004e0d0 // FUNCTION: LEGO1 0x1004e0d0

View File

@ -14,9 +14,9 @@ class MxDSFile : public MxDSSource {
public: public:
MxDSFile(const char* p_filename, MxULong p_skipReadingChunks); MxDSFile(const char* p_filename, MxULong p_skipReadingChunks);
enum { enum {
OPEN_READ = 0, OPEN_READ = 0,
}; };
#ifdef ISLE_APP #ifdef ISLE_APP
~MxDSFile() override { Close(); } ~MxDSFile() override { Close(); }

View File

@ -15,7 +15,12 @@ class MxPalette;
class MxVideoParam { class MxVideoParam {
public: public:
LEGO1_EXPORT MxVideoParam(); LEGO1_EXPORT MxVideoParam();
LEGO1_EXPORT MxVideoParam(MxRect32& p_rect, MxPalette* p_palette, MxULong p_backBuffers, MxVideoParamFlags& p_flags); LEGO1_EXPORT MxVideoParam(
MxRect32& p_rect,
MxPalette* p_palette,
MxULong p_backBuffers,
MxVideoParamFlags& p_flags
);
MxVideoParam(MxVideoParam& p_videoParam); MxVideoParam(MxVideoParam& p_videoParam);
LEGO1_EXPORT ~MxVideoParam(); LEGO1_EXPORT ~MxVideoParam();
LEGO1_EXPORT void SetDeviceName(char* p_deviceId); LEGO1_EXPORT void SetDeviceName(char* p_deviceId);

View File

@ -10,8 +10,8 @@
#include "mxsoundmanager.h" #include "mxsoundmanager.h"
#include "mxutilities.h" #include "mxutilities.h"
#include <assert.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <assert.h>
DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c); DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c);
DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x18); DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x18);

View File

@ -6,8 +6,8 @@
// Identical functions at BETA10 0x100ec9fe and 0x101741b5 are more limited in scope. // Identical functions at BETA10 0x100ec9fe and 0x101741b5 are more limited in scope.
// This is the most widely used version. // This is the most widely used version.
#include <stdio.h>
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
#include <stdio.h>
// FUNCTION: BETA10 0x10124cb9 // FUNCTION: BETA10 0x10124cb9
int DebugHeapState() int DebugHeapState()

View File

@ -9,8 +9,8 @@
#include "mxpresenterlist.h" #include "mxpresenterlist.h"
#include "mxrect32.h" #include "mxrect32.h"
#include <assert.h>
#include <SDL3/SDL_stdinc.h> #include <SDL3/SDL_stdinc.h>
#include <assert.h>
// GLOBAL: LEGO1 0x101020e8 // GLOBAL: LEGO1 0x101020e8
void (*g_omniUserMessage)(const char*, MxS32) = NULL; void (*g_omniUserMessage)(const char*, MxS32) = NULL;

View File

@ -3,7 +3,7 @@
#include "decomp.h" #include "decomp.h"
DECOMP_SIZE_ASSERT(MxOmniCreateFlags, 0x02) DECOMP_SIZE_ASSERT(MxOmniCreateFlags, 0x02)
//
// FUNCTION: LEGO1 0x100b0a30 // FUNCTION: LEGO1 0x100b0a30
// FUNCTION: BETA10 0x10130a1c // FUNCTION: BETA10 0x10130a1c
MxOmniCreateFlags::MxOmniCreateFlags() MxOmniCreateFlags::MxOmniCreateFlags()

View File

@ -175,7 +175,7 @@ MxResult MxBitmap::ImportBitmap(MxBitmap* p_bitmap)
MxLong MxBitmap::Read(const char* p_filename) MxLong MxBitmap::Read(const char* p_filename)
{ {
MxResult result = FAILURE; MxResult result = FAILURE;
SDL_IOStream *handle; SDL_IOStream* handle;
handle = SDL_IOFromFile(p_filename, "rb"); handle = SDL_IOFromFile(p_filename, "rb");

View File

@ -8,8 +8,8 @@
#include "mxutilities.h" #include "mxutilities.h"
#include "mxvideomanager.h" #include "mxvideomanager.h"
#include <assert.h>
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
#include <assert.h>
#include <windows.h> #include <windows.h>
DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac); DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac);