Project modernization (#630)

* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
This commit is contained in:
ModMaker101
2026-03-07 21:56:03 -05:00
committed by GitHub
parent 1be5faaea7
commit a9be52c41a
1373 changed files with 19903 additions and 19449 deletions

View File

@@ -120,7 +120,7 @@ public:
// ACHIEVEMENTS & AWARDS
void RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardType eType, bool bLeaderboardAffected=false,
CXuiStringTable*pStringTable=NULL, int iTitleStr=-1, int iTextStr=-1, int iAcceptStr=-1, char *pszThemeName=NULL, unsigned int uiThemeSize=0L);
CXuiStringTable*pStringTable=nullptr, int iTitleStr=-1, int iTextStr=-1, int iAcceptStr=-1, char *pszThemeName=nullptr, unsigned int uiThemeSize=0L);
int GetAwardId(int iAwardNumber);
eAwardType GetAwardType(int iAwardNumber);
bool CanBeAwarded(int iQuadrant, int iAwardNumber);

View File

@@ -19,8 +19,8 @@ public:
int GetType() { return m_type; }
void *GetBufferPointer() { return m_pBuffer; }
int GetBufferSize() { return m_bufferSize; }
void Release() { free(m_pBuffer); m_pBuffer = NULL; }
bool Allocated() { return m_pBuffer != NULL; }
void Release() { free(m_pBuffer); m_pBuffer = nullptr; }
bool Allocated() { return m_pBuffer != nullptr; }
};
typedef struct
@@ -62,7 +62,7 @@ public:
void InitialiseContext();
void StartFrame(bool actualFrameStart = true);
void Present();
void Clear(int flags);//, D3D11_RECT *pRect = NULL);
void Clear(int flags);//, D3D11_RECT *pRect = nullptr);
void SetClearColour(const float colourRGBA[4]);
bool IsWidescreen();
bool IsHiDef();

View File

@@ -28,7 +28,7 @@ typedef struct
int newSaveBlocksUsed;
int iSaveC;
PSAVE_INFO SaveInfoA;
PSAVE_INFO pCurrentSaveInfo; // Pointer to SAVE_INFO for the save that has just been loaded, or NULL if no save has been loaded (ie this is a newly created game)
PSAVE_INFO pCurrentSaveInfo; // Pointer to SAVE_INFO for the save that has just been loaded, or nullptr if no save has been loaded (ie this is a newly created game)
}
SAVE_DETAILS,*PSAVE_DETAILS;
@@ -315,7 +315,7 @@ public:
// Get details of existing savedata
C4JStorage::ESaveGameState GetSavesInfo(int iPad,int ( *Func)(LPVOID lpParam,SAVE_DETAILS *pSaveDetails,const bool),LPVOID lpParam,char *pszSavePackName); // Start search
PSAVE_DETAILS ReturnSavesInfo(); // Returns result of search (or NULL if not yet received)
PSAVE_DETAILS ReturnSavesInfo(); // Returns result of search (or nullptr if not yet received)
void ClearSavesInfo(); // Clears results
C4JStorage::ESaveGameState LoadSaveDataThumbnail(PSAVE_INFO pSaveInfo,int( *Func)(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes), LPVOID lpParam); // Get the thumbnail for an individual save referenced by pSaveInfo
@@ -398,8 +398,8 @@ public:
EDLCStatus GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam);
CONTENT_DATA& GetDLC(DWORD dw);
DWORD GetAvailableDLCCount( int iPad );
DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive = NULL);
DWORD UnmountInstalledDLC(LPCSTR szMountDrive = NULL);
DWORD MountInstalledDLC(int iPad,DWORD dwDLC,int( *Func)(LPVOID, int, DWORD,DWORD),LPVOID lpParam,LPCSTR szMountDrive = nullptr);
DWORD UnmountInstalledDLC(LPCSTR szMountDrive = nullptr);
void GetMountedDLCFileList(const char* szMountDrive, std::vector<std::string>& fileList);
std::string GetMountedPath(std::string szMount);
void SetDLCProductCode(const char* szProductCode);