diff options
-rw-r--r-- | src/control/Replay.cpp | 20 | ||||
-rw-r--r-- | src/control/Replay.h | 6 | ||||
-rw-r--r-- | src/core/Game.cpp | 2 | ||||
-rw-r--r-- | src/render/Font.cpp | 122 | ||||
-rw-r--r-- | src/render/WaterLevel.cpp | 68 | ||||
-rw-r--r-- | src/render/WaterLevel.h | 3 | ||||
-rw-r--r-- | src/vehicles/Cranes.h | 2 | ||||
-rw-r--r-- | src/vehicles/Heli.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/Heli.h | 3 |
9 files changed, 144 insertions, 86 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 7adb4999..aef48217 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -1729,7 +1729,7 @@ void CReplay::SaveReplayToHD(void) CFileMgr::SetDir(""); } -void PlayReplayFromHD(void) +void CReplay::PlayReplayFromHD(void) { CFileMgr::SetDirMyDocuments(); int fr = CFileMgr::OpenFile("replay.rep", "rb"); @@ -1748,17 +1748,17 @@ void PlayReplayFromHD(void) return; } int slot; - for (slot = 0; CFileMgr::Read(fr, (char*)CReplay::Buffers[slot], sizeof(CReplay::Buffers[slot])); slot++) - CReplay::BufferStatus[slot] = CReplay::REPLAYBUFFER_PLAYBACK; - CReplay::BufferStatus[slot - 1] = CReplay::REPLAYBUFFER_RECORD; - while (slot < CReplay::NUM_REPLAYBUFFERS) - CReplay::BufferStatus[slot++] = CReplay::REPLAYBUFFER_UNUSED; + for (slot = 0; CFileMgr::Read(fr, (char*)Buffers[slot], sizeof(Buffers[slot])); slot++) + BufferStatus[slot] = REPLAYBUFFER_PLAYBACK; + BufferStatus[slot - 1] = REPLAYBUFFER_RECORD; + while (slot < NUM_REPLAYBUFFERS) + BufferStatus[slot++] = REPLAYBUFFER_UNUSED; CFileMgr::CloseFile(fr); CFileMgr::SetDir(""); - CReplay::TriggerPlayback(CReplay::REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false); - CReplay::bPlayingBackFromFile = true; - CReplay::bAllowLookAroundCam = true; - CReplay::StreamAllNecessaryCarsAndPeds(); + TriggerPlayback(REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false); + bPlayingBackFromFile = true; + bAllowLookAroundCam = true; + StreamAllNecessaryCarsAndPeds(); } void CReplay::StreamAllNecessaryCarsAndPeds(void) diff --git a/src/control/Replay.h b/src/control/Replay.h index 84a6bef0..5dd8b651 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -64,8 +64,6 @@ struct CStoredDetailedAnimationState uint8 aGroupId2[NUM_PARTIAL_ANIMS_IN_REPLAY]; }; -void PlayReplayFromHD(void); - #ifdef GTA_REPLAY #define REPLAY_STUB #else @@ -410,12 +408,10 @@ private: static void EmptyAllPools(void); static void MarkEverythingAsNew(void); static void SaveReplayToHD(void); + static void PlayReplayFromHD(void); // out of class in III PC and later because of SecuROM static void FindFirstFocusCoordinate(CVector *coord); static void ProcessLookAroundCam(void); static size_t FindSizeOfPacket(uint8); static void GoToNextBlock(void); - - /* Absolute nonsense, but how could this function end up being outside of class? */ - friend void PlayReplayFromHD(void); #endif }; diff --git a/src/core/Game.cpp b/src/core/Game.cpp index c5154bd4..43e5856c 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -462,7 +462,7 @@ bool CGame::Initialise(const char* datFile) TestModelIndices(); LoadingScreen("Loading the Game", "Setup water", nil); - WaterLevelInitialise("DATA\\WATER.DAT"); + CWaterLevel::Initialise("DATA\\WATER.DAT"); TheConsole.Init(); CDraw::SetFOV(120.0f); CDraw::ms_fLODDistance = 500.0f; diff --git a/src/render/Font.cpp b/src/render/Font.cpp index 6d569591..d15dc7d3 100644 --- a/src/render/Font.cpp +++ b/src/render/Font.cpp @@ -274,13 +274,13 @@ CFont::Initialise(void) SetScale(1.0f, 1.0f); SetSlantRefPoint(SCREEN_WIDTH, 0.0f); SetSlant(0.0f); - SetColor(CRGBA(0xFF, 0xFF, 0xFF, 0)); + SetColor(CRGBA(255, 255, 255, 0)); SetJustifyOff(); SetCentreOff(); SetWrapx(SCREEN_WIDTH); SetCentreSize(SCREEN_WIDTH); SetBackgroundOff(); - SetBackgroundColor(CRGBA(0x80, 0x80, 0x80, 0x80)); + SetBackgroundColor(CRGBA(128, 128, 128, 128)); SetBackGroundOnlyTextOff(); SetPropOn(); SetFontStyle(FONT_BANK); @@ -614,10 +614,10 @@ CFont::PrintString(float xstart, float ystart, wchar *s) x = xstart; #ifdef MORE_LANGUAGES if (IsJapaneseFont()) - y += 32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY; else #endif - y += 32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY; start = s; }else break; @@ -653,7 +653,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) else x = 0.0f; - y += 32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY; numSpaces = 0; first = true; lineLength = 0.0f; @@ -676,7 +676,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s) x = xstart; else x = 0.0f; - y += 32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY; numSpaces = 0; first = true; lineLength = 0.0f; @@ -753,10 +753,10 @@ CFont::GetNumberLines(float xstart, float ystart, wchar *s) // Why even? #ifdef MORE_LANGUAGES if (IsJapanese()) - y += 32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY; else #endif - y += 32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY; }else{ // still space in current line t = GetNextSpace(s); @@ -827,7 +827,7 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) else x = xstart; numLines++; - y += 32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY; + y += 32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY; }else{ // still space in current line t = GetNextSpace(s); @@ -855,11 +855,11 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) rect->right = xstart + maxlength/2 + 4.0f; #ifdef MORE_LANGUAGES if (IsJapaneseFont()) { - rect->bottom = (32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY) * numLines + ystart + (4.0f / 2.75f); + rect->bottom = (32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY) * numLines + ystart + (4.0f / 2.75f); rect->top = ystart - (4.0f / 2.75f); } else { #endif - rect->bottom = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines + ystart + 2.0f; + rect->bottom = (32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY) * numLines + ystart + 2.0f; rect->top = ystart - 2.0f; #ifdef MORE_LANGUAGES } @@ -869,11 +869,11 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) rect->right = xstart + Details.centreSize*0.5f + 4.0f; #ifdef MORE_LANGUAGES if (IsJapaneseFont()) { - rect->bottom = (32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY) * numLines + ystart + (4.0f / 2.75f); + rect->bottom = (32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY) * numLines + ystart + (4.0f / 2.75f); rect->top = ystart - (4.0f / 2.75f); } else { #endif - rect->bottom = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines + ystart + 2.0f; + rect->bottom = (32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY) * numLines + ystart + 2.0f; rect->top = ystart - 2.0f; #ifdef MORE_LANGUAGES } @@ -886,10 +886,10 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, wchar *s) rect->bottom = ystart - 4.0f + 4.0f; #ifdef MORE_LANGUAGES if (IsJapaneseFont()) - rect->top = (32.0f * CFont::Details.scaleY / 2.75f + 2.0f * CFont::Details.scaleY) * numLines + ystart + 2.0f + (4.0f / 2.75f); + rect->top = (32.0f * Details.scaleY / 2.75f + 2.0f * Details.scaleY) * numLines + ystart + 2.0f + (4.0f / 2.75f); else #endif - rect->top = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines + ystart + 2.0f + 2.0f; + rect->top = (32.0f * Details.scaleY * 0.5f + 2.0f * Details.scaleY) * numLines + ystart + 2.0f + 2.0f; } } @@ -1315,27 +1315,89 @@ CFont::ParseToken(wchar *s) case 'n': NewLine = 1; break; - case 'b': SetColor(CRGBA(27, 89, 130, 255)); Details.anonymous_23 = true; break; + case 'b': + Details.color.r = 27; + Details.color.g = 89; + Details.color.b = 130; + Details.anonymous_23 = true; + break; case 'f': Details.bFlash = !Details.bFlash; if (!Details.bFlash) Details.color.a = 255; break; - case 'g': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = true; break; - case 'h': SetColor(CRGBA(225, 225, 225, 255)); Details.anonymous_23 = true; break; - case 'l': SetColor(CRGBA(0, 0, 0, 255)); Details.anonymous_23 = true; break; - case 'o': SetColor(CRGBA(229, 125, 126, 255)); Details.anonymous_23 = true; break; - case 'p': SetColor(CRGBA(168, 110, 252, 255)); Details.anonymous_23 = true; break; - case 'q': SetColor(CRGBA(199, 144, 203, 255)); Details.anonymous_23 = true; break; - case 'r': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = true; break; - case 't': SetColor(CRGBA(86, 212, 146, 255)); Details.anonymous_23 = true; break; - case 'w': SetColor(CRGBA(175, 175, 175, 255)); Details.anonymous_23 = true; break; + case 'g': + Details.color.r = 255; + Details.color.g = 150; + Details.color.b = 225; + Details.anonymous_23 = true; + break; + case 'h': + Details.color.r = 225; + Details.color.g = 225; + Details.color.b = 225; + Details.anonymous_23 = true; + break; + case 'l': + Details.color.r = 0; + Details.color.g = 0; + Details.color.b = 0; + Details.anonymous_23 = true; + break; + case 'o': + Details.color.r = 229; + Details.color.g = 125; + Details.color.b = 126; + Details.anonymous_23 = true; + break; + case 'p': + Details.color.r = 168; + Details.color.g = 110; + Details.color.b = 252; + Details.anonymous_23 = true; + break; + case 'q': + Details.color.r = 199; + Details.color.g = 144; + Details.color.b = 203; + Details.anonymous_23 = true; + break; + case 'r': + Details.color.r = 255; + Details.color.g = 150; + Details.color.b = 225; + Details.anonymous_23 = true; + break; + case 't': + Details.color.r = 86; + Details.color.g = 212; + Details.color.b = 146; + Details.anonymous_23 = true; + break; + case 'w': + Details.color.r = 175; + Details.color.g = 175; + Details.color.b = 175; + Details.anonymous_23 = true; + break; + case 'x': #ifdef FIX_BUGS - case 'x': SetColor(CRGBA(0, 255, 255, 255)); Details.anonymous_23 = true; break; + Details.color.r = 0; + Details.color.g = 255; + Details.color.b = 255; #else - case 'x': SetColor(CRGBA(132, 146, 197, 255)); Details.anonymous_23 = true; break; + Details.color.r = 132; + Details.color.g = 146; + Details.color.b = 197; #endif - case 'y': SetColor(CRGBA(255, 227, 79, 255)); Details.anonymous_23 = true; break; + Details.anonymous_23 = true; + break; + case 'y': + Details.color.r = 255; + Details.color.g = 227; + Details.color.b = 79; + Details.anonymous_23 = true; + break; #ifdef BUTTON_ICONS case 'U': PS2Symbol = BUTTON_UP; break; case 'D': PS2Symbol = BUTTON_DOWN; break; @@ -1542,7 +1604,7 @@ CFont::RenderFontBuffer() if (RenderState.bFontHalfTexture) c = FindNewCharacter(c); else if (c > 155) - c = 0; + c = '\0'; if (RenderState.slant != 0.0f) textPosY = (RenderState.slantRefX - textPosX) * RenderState.slant + RenderState.slantRefY; @@ -1556,7 +1618,7 @@ CFont::RenderFontBuffer() // PS2 uses different chars for some symbols if (!RenderState.bFontHalfTexture && c == 30) c = 61; // wanted star #endif - textPosX += RenderState.scaleX * (RenderState.proportional ? Size[RenderState.style][c] : Size[RenderState.style][209]); + textPosX += RenderState.scaleX * GetCharacterWidth(c); if (c == '\0') textPosX += RenderState.fExtraSpace; } diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index 6caac31e..6247c611 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -113,9 +113,9 @@ float fMinWaterAlphaMult = -30.0f; void -WaterLevelInitialise(Const char *pWaterDat) +CWaterLevel::Initialise(Const char *pWaterDat) { - CWaterLevel::ms_nNoOfWaterLevels = 0; + ms_nNoOfWaterLevels = 0; #ifdef MASTER int32 hFile = -1; @@ -131,11 +131,11 @@ WaterLevelInitialise(Const char *pWaterDat) if (hFile > 0) { - CFileMgr::Read(hFile, (char *)&CWaterLevel::ms_nNoOfWaterLevels, sizeof(CWaterLevel::ms_nNoOfWaterLevels)); - CFileMgr::Read(hFile, (char *)CWaterLevel::ms_aWaterZs, sizeof(CWaterLevel::ms_aWaterZs)); - CFileMgr::Read(hFile, (char *)CWaterLevel::ms_aWaterRects, sizeof(CWaterLevel::ms_aWaterRects)); - CFileMgr::Read(hFile, (char *)CWaterLevel::aWaterBlockList, sizeof(CWaterLevel::aWaterBlockList)); - CFileMgr::Read(hFile, (char *)CWaterLevel::aWaterFineBlockList, sizeof(CWaterLevel::aWaterFineBlockList)); + CFileMgr::Read(hFile, (char *)&ms_nNoOfWaterLevels, sizeof(ms_nNoOfWaterLevels)); + CFileMgr::Read(hFile, (char *)ms_aWaterZs, sizeof(ms_aWaterZs)); + CFileMgr::Read(hFile, (char *)ms_aWaterRects, sizeof(ms_aWaterRects)); + CFileMgr::Read(hFile, (char *)aWaterBlockList, sizeof(aWaterBlockList)); + CFileMgr::Read(hFile, (char *)aWaterFineBlockList, sizeof(aWaterFineBlockList)); CFileMgr::CloseFile(hFile); } #ifndef MASTER @@ -157,7 +157,7 @@ WaterLevelInitialise(Const char *pWaterDat) { float z, l, b, r, t; sscanf(line, "%f %f %f %f %f", &z, &l, &b, &r, &t); - CWaterLevel::AddWaterLevel(l, b, r, t, z); + AddWaterLevel(l, b, r, t, z); } } @@ -167,17 +167,17 @@ WaterLevelInitialise(Const char *pWaterDat) { for (int32 y = 0; y < MAX_SMALL_SECTORS; y++) { - CWaterLevel::aWaterFineBlockList[x][y] = NO_WATER; + aWaterFineBlockList[x][y] = NO_WATER; } } // rasterize water rects read from file - for (int32 i = 0; i < CWaterLevel::ms_nNoOfWaterLevels; i++) + for (int32 i = 0; i < ms_nNoOfWaterLevels; i++) { - int32 l = WATER_HUGE_X(CWaterLevel::ms_aWaterRects[i].left + WATER_X_OFFSET); - int32 r = WATER_HUGE_X(CWaterLevel::ms_aWaterRects[i].right + WATER_X_OFFSET) + 1.0f; - int32 t = WATER_HUGE_Y(CWaterLevel::ms_aWaterRects[i].top); - int32 b = WATER_HUGE_Y(CWaterLevel::ms_aWaterRects[i].bottom) + 1.0f; + int32 l = WATER_HUGE_X(ms_aWaterRects[i].left + WATER_X_OFFSET); + int32 r = WATER_HUGE_X(ms_aWaterRects[i].right + WATER_X_OFFSET) + 1.0f; + int32 t = WATER_HUGE_Y(ms_aWaterRects[i].top); + int32 b = WATER_HUGE_Y(ms_aWaterRects[i].bottom) + 1.0f; l = clamp(l, 0, MAX_SMALL_SECTORS - 1); r = clamp(r, 0, MAX_SMALL_SECTORS - 1); @@ -188,7 +188,7 @@ WaterLevelInitialise(Const char *pWaterDat) { for (int32 y = t; y <= b; y++) { - CWaterLevel::aWaterFineBlockList[x][y] = i; + aWaterFineBlockList[x][y] = i; } } } @@ -209,10 +209,10 @@ WaterLevelInitialise(Const char *pWaterDat) { for (int32 j = 0; j <= 8; j++) { - CVector worldPos = CVector(worldX + i * (SMALL_SECTOR_SIZE / 8), worldY + j * (SMALL_SECTOR_SIZE / 8), CWaterLevel::ms_aWaterZs[CWaterLevel::aWaterFineBlockList[x][y]]); + CVector worldPos = CVector(worldX + i * (SMALL_SECTOR_SIZE / 8), worldY + j * (SMALL_SECTOR_SIZE / 8), ms_aWaterZs[aWaterFineBlockList[x][y]]); if ((worldPos.x > WORLD_MIN_X && worldPos.x < WORLD_MAX_X) && (worldPos.y > WORLD_MIN_Y && worldPos.y < WORLD_MAX_Y) && - (!CWaterLevel::WaterLevelAccordingToRectangles(worldPos.x, worldPos.y) || CWaterLevel::TestVisibilityForFineWaterBlocks(worldPos))) + (!WaterLevelAccordingToRectangles(worldPos.x, worldPos.y) || TestVisibilityForFineWaterBlocks(worldPos))) continue; // at least one point in the tile wasn't blocked, so don't remove water @@ -222,37 +222,37 @@ WaterLevelInitialise(Const char *pWaterDat) } if (i < 1000) - CWaterLevel::aWaterFineBlockList[x][y] = NO_WATER; + aWaterFineBlockList[x][y] = NO_WATER; } } } - CWaterLevel::RemoveIsolatedWater(); + RemoveIsolatedWater(); // calculate coarse tiles from fine tiles for (int32 x = 0; x < MAX_LARGE_SECTORS; x++) { for (int32 y = 0; y < MAX_LARGE_SECTORS; y++) { - if (CWaterLevel::aWaterFineBlockList[x * 2][y * 2] >= 0) + if (aWaterFineBlockList[x * 2][y * 2] >= 0) { - CWaterLevel::aWaterBlockList[x][y] = CWaterLevel::aWaterFineBlockList[x * 2][y * 2]; + aWaterBlockList[x][y] = aWaterFineBlockList[x * 2][y * 2]; } - else if (CWaterLevel::aWaterFineBlockList[x * 2 + 1][y * 2] >= 0) + else if (aWaterFineBlockList[x * 2 + 1][y * 2] >= 0) { - CWaterLevel::aWaterBlockList[x][y] = CWaterLevel::aWaterFineBlockList[x * 2 + 1][y * 2]; + aWaterBlockList[x][y] = aWaterFineBlockList[x * 2 + 1][y * 2]; } - else if (CWaterLevel::aWaterFineBlockList[x * 2][y * 2 + 1] >= 0) + else if (aWaterFineBlockList[x * 2][y * 2 + 1] >= 0) { - CWaterLevel::aWaterBlockList[x][y] = CWaterLevel::aWaterFineBlockList[x * 2][y * 2 + 1]; + aWaterBlockList[x][y] = aWaterFineBlockList[x * 2][y * 2 + 1]; } - else if (CWaterLevel::aWaterFineBlockList[x * 2 + 1][y * 2 + 1] >= 0) + else if (aWaterFineBlockList[x * 2 + 1][y * 2 + 1] >= 0) { - CWaterLevel::aWaterBlockList[x][y] = CWaterLevel::aWaterFineBlockList[x * 2 + 1][y * 2 + 1]; + aWaterBlockList[x][y] = aWaterFineBlockList[x * 2 + 1][y * 2 + 1]; } else { - CWaterLevel::aWaterBlockList[x][y] = NO_WATER; + aWaterBlockList[x][y] = NO_WATER; } } } @@ -261,11 +261,11 @@ WaterLevelInitialise(Const char *pWaterDat) if (hFile > 0) { - CFileMgr::Write(hFile, (char *)&CWaterLevel::ms_nNoOfWaterLevels, sizeof(CWaterLevel::ms_nNoOfWaterLevels)); - CFileMgr::Write(hFile, (char *)CWaterLevel::ms_aWaterZs, sizeof(CWaterLevel::ms_aWaterZs)); - CFileMgr::Write(hFile, (char *)CWaterLevel::ms_aWaterRects, sizeof(CWaterLevel::ms_aWaterRects)); - CFileMgr::Write(hFile, (char *)CWaterLevel::aWaterBlockList, sizeof(CWaterLevel::aWaterBlockList)); - CFileMgr::Write(hFile, (char *)CWaterLevel::aWaterFineBlockList, sizeof(CWaterLevel::aWaterFineBlockList)); + CFileMgr::Write(hFile, (char *)&ms_nNoOfWaterLevels, sizeof(ms_nNoOfWaterLevels)); + CFileMgr::Write(hFile, (char *)ms_aWaterZs, sizeof(ms_aWaterZs)); + CFileMgr::Write(hFile, (char *)ms_aWaterRects, sizeof(ms_aWaterRects)); + CFileMgr::Write(hFile, (char *)aWaterBlockList, sizeof(aWaterBlockList)); + CFileMgr::Write(hFile, (char *)aWaterFineBlockList, sizeof(aWaterFineBlockList)); CFileMgr::CloseFile(hFile); } @@ -300,7 +300,7 @@ WaterLevelInitialise(Const char *pWaterDat) CTxdStore::PopCurrentTxd(); - CWaterLevel::CreateWavyAtomic(); + CreateWavyAtomic(); printf("Done Initing waterlevels\n"); } diff --git a/src/render/WaterLevel.h b/src/render/WaterLevel.h index d0c64eb4..d12fb9f6 100644 --- a/src/render/WaterLevel.h +++ b/src/render/WaterLevel.h @@ -116,6 +116,7 @@ public: static RpAtomic *ms_pWavyAtomic; static RpAtomic *ms_pMaskAtomic; + static void Initialise(Const char *pWaterDat); // out of class in III PC and later because of SecuROM static void Shutdown(); static void CreateWavyAtomic(); @@ -181,5 +182,3 @@ public: static void HandleBeachToysStuff(void); static CEntity *CreateBeachToy(CVector const &vec, eBeachToy beachtoy); }; - -extern void WaterLevelInitialise(Const char *datFile);
\ No newline at end of file diff --git a/src/vehicles/Cranes.h b/src/vehicles/Cranes.h index 162f9af9..e842ed3f 100644 --- a/src/vehicles/Cranes.h +++ b/src/vehicles/Cranes.h @@ -88,7 +88,7 @@ public: static bool IsThisCarBeingCarriedByAnyCrane(CVehicle* pVehicle); static bool IsThisCarBeingTargettedByAnyCrane(CVehicle* pVehicle); static void Save(uint8* buf, uint32* size); - static void Load(uint8* buf, uint32 size); // on mobile it's CranesLoad outside of the class + static void Load(uint8* buf, uint32 size); // out of class in III PC and later because of SecuROM static uint32 CarsCollectedMilitaryCrane; static int32 NumCranes; diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index 644fdde8..1c1b2617 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -762,7 +762,7 @@ CHeli::InitHelis(void) } CHeli* -GenerateHeli(bool catalina) +CHeli::GenerateHeli(bool catalina) { CHeli *heli; CVector heliPos; @@ -800,7 +800,7 @@ GenerateHeli(bool catalina) id++; found = true; for(i = 0; i < 4; i++) - if(CHeli::pHelis[i] && CHeli::pHelis[i]->m_nHeliId == id) + if(pHelis[i] && pHelis[i]->m_nHeliId == id) found = false; } heli->m_nHeliId = id; diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h index 1f372e42..c5ae08e2 100644 --- a/src/vehicles/Heli.h +++ b/src/vehicles/Heli.h @@ -83,13 +83,14 @@ public: bool SendDownSwat(void); static void InitHelis(void); + static CHeli *GenerateHeli(bool catalina); // out of class in III PC and later because of SecuROM static void UpdateHelis(void); static void SpecialHeliPreRender(void); static bool TestRocketCollision(CVector *coors); static bool TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, int32 damage); static bool TestSniperCollision(CVector *line0, CVector *line1); - static void StartCatalinaFlyBy(void); + static void StartCatalinaFlyBy(void); // out of class in III PC and later because of SecuROM static void RemoveCatalinaHeli(void); static CHeli *FindPointerToCatalinasHeli(void); static void CatalinaTakeOff(void); |