Skip to content

Commit 18f34d6

Browse files
committed
Update due to code revision
- Change uint16 to std::uint16_t> - Change the type of the variable g_clothesDirectory to auto
1 parent ec1e0bc commit 18f34d6

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Client/game_sa/CDirectorySA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ DirectoryInfoSA* CDirectorySAInterface::GetModelEntry(std::uint16_t modelId)
2424
return entry;
2525
}
2626

27-
bool CDirectorySAInterface::SetModelStreamingSize(std::uint16_t modelId, uint16 size)
27+
bool CDirectorySAInterface::SetModelStreamingSize(std::uint16_t modelId, std::uint16_t size)
2828
{
2929
DirectoryInfoSA* entry = GetModelEntry(modelId);
3030

@@ -39,7 +39,7 @@ bool CDirectorySAInterface::SetModelStreamingSize(std::uint16_t modelId, uint16
3939
}
4040

4141

42-
uint16 CDirectorySAInterface::GetModelStreamingSize(std::uint16_t modelId)
42+
std::uint16_t CDirectorySAInterface::GetModelStreamingSize(std::uint16_t modelId)
4343
{
4444
DirectoryInfoSA* entry = GetModelEntry(modelId);
4545

Client/game_sa/CDirectorySA.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class CDirectorySAInterface
2222
{
2323
public:
2424
DirectoryInfoSA* GetModelEntry(std::uint16_t modelId);
25-
bool SetModelStreamingSize(std::uint16_t modelId, uint16 size);
26-
uint16 GetModelStreamingSize(std::uint16_t modelId);
25+
bool SetModelStreamingSize(std::uint16_t modelId, std::uint16_t size);
26+
std::uint16_t GetModelStreamingSize(std::uint16_t modelId);
2727

2828
private:
2929
DirectoryInfoSA* m_pEntries{};

Client/game_sa/CRenderWareSA.ClothesReplacing.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ namespace
2929
uint uiLoadflag; // 0-not loaded 2-requested 3-loaded 1-processed
3030
};
3131

32-
std::unordered_map<ushort, char*> ms_ReplacementClothesFileDataMap;
33-
std::unordered_map<ushort, uint16> ms_OriginalStreamingSizesMap;
32+
std::unordered_map<ushort, char*> ms_ReplacementClothesFileDataMap;
33+
std::unordered_map<ushort, std::uint16_t> ms_OriginalStreamingSizesMap;
3434

3535
bool bClothesReplacementChanged = false;
3636

@@ -48,10 +48,10 @@ namespace
4848
uint uiArraySize;
4949
};
5050

51-
DWORD FUNC_CStreamingConvertBufferToObject = 0x40C6B0;
52-
CDirectorySAInterface* g_clothesDirectory = reinterpret_cast<CDirectorySAInterface*>(0xBC12C0);
53-
int iReturnFileId;
54-
char* pReturnBuffer;
51+
DWORD FUNC_CStreamingConvertBufferToObject = 0x40C6B0;
52+
auto g_clothesDirectory = reinterpret_cast<CDirectorySAInterface*>(0xBC12C0);
53+
int iReturnFileId;
54+
char* pReturnBuffer;
5555

5656
size_t GetSizeInBlocks(size_t size)
5757
{
@@ -102,7 +102,7 @@ void CRenderWareSA::ClothesRemoveReplacement(char* pFileData)
102102

103103
if (it != ms_OriginalStreamingSizesMap.end())
104104
{
105-
uint16 originalStreamingSize = it->second;
105+
std::uint16_t originalStreamingSize = it->second;
106106
g_clothesDirectory->SetModelStreamingSize(iter->first, originalStreamingSize);
107107
}
108108

0 commit comments

Comments
 (0)