diff options
| author | ModMaker101 <119018978+ModMaker101@users.noreply.github.com> | 2026-03-08 19:08:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-08 18:08:36 -0500 |
| commit | 28614b922fb77149a54da1a87bebfbc98736f296 (patch) | |
| tree | 7f828ba86a4ee18d0a80d29de64f6199a5412512 /Minecraft.Client/Orbis/4JLibs | |
| parent | 88798b501d0cf6287b6f87acb2592676e3cec58d (diff) | |
Modernize project codebase (#906)
* 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
* Add safety checks and fix a issue with vector going OOR
Diffstat (limited to 'Minecraft.Client/Orbis/4JLibs')
| -rw-r--r-- | Minecraft.Client/Orbis/4JLibs/inc/4J_Profile.h | 2 | ||||
| -rw-r--r-- | Minecraft.Client/Orbis/4JLibs/inc/4J_Render.h | 6 | ||||
| -rw-r--r-- | Minecraft.Client/Orbis/4JLibs/inc/4J_Storage.h | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.Client/Orbis/4JLibs/inc/4J_Profile.h b/Minecraft.Client/Orbis/4JLibs/inc/4J_Profile.h index 03651b8f..d988adbf 100644 --- a/Minecraft.Client/Orbis/4JLibs/inc/4J_Profile.h +++ b/Minecraft.Client/Orbis/4JLibs/inc/4J_Profile.h @@ -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); diff --git a/Minecraft.Client/Orbis/4JLibs/inc/4J_Render.h b/Minecraft.Client/Orbis/4JLibs/inc/4J_Render.h index 6083654d..00210f60 100644 --- a/Minecraft.Client/Orbis/4JLibs/inc/4J_Render.h +++ b/Minecraft.Client/Orbis/4JLibs/inc/4J_Render.h @@ -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(); diff --git a/Minecraft.Client/Orbis/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Orbis/4JLibs/inc/4J_Storage.h index d4d845df..467c7a11 100644 --- a/Minecraft.Client/Orbis/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Orbis/4JLibs/inc/4J_Storage.h @@ -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); |
