From 8a4fa58cd42b7cca4a86fe2d9913b839b554bf10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 11 May 2020 05:55:57 +0300 Subject: Linux build support --- src/core/Streaming.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/Streaming.cpp') diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index f24192ef..ed3892a6 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1465,7 +1465,7 @@ CStreaming::GetCdImageOffset(int32 lastPosn) int dist, mindist; img = -1; - mindist = INT_MAX; + mindist = INT32_MAX; offset = ms_imageOffsets[ms_lastImageRead]; if(lastPosn <= offset || lastPosn > offset + ms_imageSize){ // last read position is not in last image @@ -1513,8 +1513,8 @@ CStreaming::GetNextFileOnCd(int32 lastPosn, bool priority) streamIdFirst = -1; streamIdNext = -1; - posnFirst = UINT_MAX; - posnNext = UINT_MAX; + posnFirst = UINT32_MAX; + posnNext = UINT32_MAX; for(si = ms_startRequestedList.m_next; si != &ms_endRequestedList; si = next){ next = si->m_next; @@ -1834,7 +1834,7 @@ CStreaming::LoadAllRequestedModels(bool priority) status = CdStreamRead(0, ms_pStreamingBuffer[0], imgOffset+posn, size); while(CdStreamSync(0) || status == STREAM_NONE); ms_aInfoForModel[streamId].m_loadState = STREAMSTATE_READING; - + MakeSpaceFor(size * CDSTREAM_SECTOR_SIZE); ConvertBufferToObject(ms_pStreamingBuffer[0], streamId); if(ms_aInfoForModel[streamId].m_loadState == STREAMSTATE_STARTED) -- cgit v1.2.3 From c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Tue, 12 May 2020 01:24:57 +0200 Subject: Fix linux warnings --- src/core/Streaming.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/Streaming.cpp') diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index a2e6048b..c961f53d 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -710,6 +710,7 @@ CStreaming::RequestSubway(void) RequestModel(MI_SUBPLATFORM_SUB, STREAMFLAGS_NOFADE); RequestModel(MI_SUBPLATFORM_SUB2, STREAMFLAGS_NOFADE); break; + default: break; } } @@ -747,6 +748,7 @@ CStreaming::RequestIslands(eLevelName level) RequestModel(islandLODindust, BIGBUILDINGFLAGS); RequestModel(islandLODcomSub, BIGBUILDINGFLAGS); break; + default: break; } } @@ -1750,7 +1752,7 @@ CStreaming::ProcessLoadingChannel(int32 ch) void CStreaming::RetryLoadFile(int32 ch) { - char *key; + Const char *key; CPad::StopPadsShaking(); -- cgit v1.2.3