diff --git a/.gitignore b/.gitignore index fb2cdb29..ec4a4f77 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,8 @@ install_manifest.txt *.out *.app +*.dcu +*.~cpp +*.~h +*.~bpr +*.~pas diff --git a/AdvSound.cpp b/AdvSound.cpp index c59376c3..26e62ce6 100644 --- a/AdvSound.cpp +++ b/AdvSound.cpp @@ -9,7 +9,7 @@ //--------------------------------------------------------------------------- #pragma package(smart_init) -__fastcall TAdvancedSound::TAdvancedSound() +TAdvancedSound::TAdvancedSound() { // SoundStart=SoundCommencing=SoundShut= NULL; State = ss_Off; @@ -18,7 +18,7 @@ __fastcall TAdvancedSound::TAdvancedSound() fShutLength = 0; } -__fastcall TAdvancedSound::~TAdvancedSound() +TAdvancedSound::~TAdvancedSound() { // Ra: stopowanie się sypie // SoundStart.Stop(); // SoundCommencing.Stop(); diff --git a/AirCoupler.cpp b/AirCoupler.cpp index e7fcdfa5..ebc6839b 100644 --- a/AirCoupler.cpp +++ b/AirCoupler.cpp @@ -7,9 +7,9 @@ #include "AirCoupler.h" #include "Timer.h" -__fastcall TAirCoupler::TAirCoupler() { Clear(); } +TAirCoupler::TAirCoupler() { Clear(); } -__fastcall TAirCoupler::~TAirCoupler() {} +TAirCoupler::~TAirCoupler() {} int TAirCoupler::GetStatus() { // zwraca 1, jeśli istnieje model prosty, 2 gdy skośny diff --git a/AnimModel.cpp b/AnimModel.cpp index c0ea0f7f..a2734215 100644 --- a/AnimModel.cpp +++ b/AnimModel.cpp @@ -20,8 +20,8 @@ #pragma package(smart_init) //--------------------------------------------------------------------------- -__fastcall TAnimAdvanced::TAnimAdvanced(){}; -__fastcall TAnimAdvanced::~TAnimAdvanced(){ +TAnimAdvanced::TAnimAdvanced(){}; +TAnimAdvanced::~TAnimAdvanced(){ // delete[] pVocaloidMotionData; //plik został zmodyfikowany }; @@ -64,7 +64,7 @@ int TAnimAdvanced::SortByBone() return swaps; }; -__fastcall TAnimContainer::TAnimContainer() +TAnimContainer::TAnimContainer() { pNext = NULL; vRotateAngles = vector3(0.0f, 0.0f, 0.0f); // aktualne kąty obrotu @@ -82,7 +82,7 @@ __fastcall TAnimContainer::TAnimContainer() acAnimNext = NULL; // na razie jest poza listą } -__fastcall TAnimContainer::~TAnimContainer() +TAnimContainer::~TAnimContainer() { SafeDelete(pNext); delete mAnim; // AnimContainer jest właścicielem takich macierzy @@ -390,13 +390,15 @@ bool TAnimContainer::InMovement() } void TAnimContainer::EventAssign(TEvent *ev) -{ // przypisanie eventu wykonywanego po zakończeniu animacji evDone = ev; }; +{ // przypisanie eventu wykonywanego po zakończeniu animacji + evDone = ev; +}; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -__fastcall TAnimModel::TAnimModel() +TAnimModel::TAnimModel() { pRoot = NULL; pModel = NULL; @@ -419,7 +421,7 @@ __fastcall TAnimModel::TAnimModel() fOffTime = fOnTime + 0.66; } -__fastcall TAnimModel::~TAnimModel() +TAnimModel::~TAnimModel() { delete pAdvanced; // nie ma zaawansowanej animacji SafeDelete(pRoot); diff --git a/Button.cpp b/Button.cpp index b94bb110..bcc71bc1 100644 --- a/Button.cpp +++ b/Button.cpp @@ -11,13 +11,13 @@ #pragma package(smart_init) -__fastcall TButton::TButton() +TButton::TButton() { iFeedbackBit = 0; Clear(); }; -__fastcall TButton::~TButton(){}; +TButton::~TButton(){}; void TButton::Clear(int i) { diff --git a/Console.cpp b/Console.cpp index 69a9c268..0d408102 100644 --- a/Console.cpp +++ b/Console.cpp @@ -104,7 +104,7 @@ TLPT *Console::LPT = NULL; int Console::iSwitch[8]; // bistabilne w kabinie, załączane z [Shift], wyłączane bez int Console::iButton[8]; // monostabilne w kabinie, załączane podczas trzymania klawisza -__fastcall Console::Console() +Console::Console() { PoKeys55[0] = PoKeys55[1] = NULL; for (int i = 0; i < 8; ++i) @@ -114,7 +114,7 @@ __fastcall Console::Console() } }; -__fastcall Console::~Console() +Console::~Console() { delete PoKeys55[0]; delete PoKeys55[1]; @@ -267,7 +267,7 @@ void Console::BitsUpdate(int mask) } }; -bool Console::Pressed(int x) { // na razie tak - czyta się tylko klawiatura return Global::bActive && (GetKeyState(x) < 0); }; +bool Console::Pressed(int x) { return Global::bActive && (GetKeyState(x) < 0); }; // na razie tak - czyta się tylko klawiatura void Console::ValueSet(int x, double y) { // ustawienie wartości (y) na kanale analogowym (x) diff --git a/Console/LPT.cpp b/Console/LPT.cpp index b4d7a484..0716e8b7 100644 --- a/Console/LPT.cpp +++ b/Console/LPT.cpp @@ -41,4 +41,4 @@ bool TLPT::Connect(int port) return bool(OutPort); }; -void TLPT::Out(int x) { // wysłanie bajtu do portu OutPort(address, x); }; +void TLPT::Out(int x) { OutPort(address, x); }; // wysłanie bajtu do portu diff --git a/Console/PoKeys55.cpp b/Console/PoKeys55.cpp index 693f009e..c59b9f9e 100644 --- a/Console/PoKeys55.cpp +++ b/Console/PoKeys55.cpp @@ -17,7 +17,7 @@ HANDLE ReadHandle = INVALID_HANDLE_VALUE; // GUID InterfaceClassGuid={0x4d1e55b2,0xf16f,0x11cf,0x88,0xcb,0x00,0x11,0x11,0x00,0x00,0x30}; //{4d1e55b2-f16f-11cf-88cb-001111000030} -__fastcall TPoKeys55::TPoKeys55() +TPoKeys55::TPoKeys55() { cRequest = 0; iPWMbits = 1; @@ -31,7 +31,7 @@ __fastcall TPoKeys55::TPoKeys55() bNoError = true; }; //--------------------------------------------------------------------------- -__fastcall TPoKeys55::~TPoKeys55() { Close(); }; +TPoKeys55::~TPoKeys55() { Close(); }; //--------------------------------------------------------------------------- bool TPoKeys55::Close() { // rozłączenie komunikacji diff --git a/Driver.cpp b/Driver.cpp index 6974d8cb..4ef5777d 100644 --- a/Driver.cpp +++ b/Driver.cpp @@ -1128,7 +1128,7 @@ void TController::TablePurger() //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -__fastcall TController::TController(bool AI, TDynamicObject *NewControll, bool InitPsyche, +TController::TController(bool AI, TDynamicObject *NewControll, bool InitPsyche, bool primary // czy ma aktywnie prowadzić? ) { @@ -1290,7 +1290,7 @@ void TController::CloseLog() } }; -__fastcall TController::~TController() +TController::~TController() { // wykopanie mechanika z roboty delete tsGuardSignal; delete TrainParams; @@ -5047,15 +5047,15 @@ void TController::DirectionForward(bool forward) mvControlling->IncMainCtrl(1); //żeby nie zgasł }; -AnsiString TController::Relation() { // zwraca relację pociągu return TrainParams->ShowRelation(); }; +AnsiString TController::Relation() { return TrainParams->ShowRelation(); }; // zwraca relację pociągu -AnsiString TController::TrainName() { // zwraca relację pociągu return TrainParams->TrainName; }; +AnsiString TController::TrainName() { return TrainParams->TrainName; }; // zwraca relację pociągu -int TController::StationCount() { // zwraca ilość stacji (miejsc zatrzymania) return TrainParams->StationCount; }; +int TController::StationCount() { return TrainParams->StationCount; }; // zwraca ilość stacji (miejsc zatrzymania) -int TController::StationIndex() { // zwraca indeks aktualnej stacji (miejsca zatrzymania) return TrainParams->StationIndex; }; +int TController::StationIndex() { return TrainParams->StationIndex; }; // zwraca indeks aktualnej stacji (miejsca zatrzymania) -bool TController::IsStop() { // informuje, czy jest zatrzymanie na najbliższej stacji return TrainParams->IsStop(); }; +bool TController::IsStop() { return TrainParams->IsStop(); }; // informuje, czy jest zatrzymanie na najbliższej stacji void TController::MoveTo(TDynamicObject *to) { // przesunięcie AI do innego pojazdu (przy zmianie kabiny) diff --git a/DynObj.cpp b/DynObj.cpp index d3faaed1..a8e36591 100644 --- a/DynObj.cpp +++ b/DynObj.cpp @@ -106,11 +106,11 @@ int TAnim::TypeSet(int i, int fl) yUpdate = NULL; return iFlags & 15; // ile wskaźników rezerwować dla danego typu animacji }; -__fastcall TAnim::TAnim() +TAnim::TAnim() { // potrzebne to w ogóle? iFlags = -1; // nieznany typ - destruktor nic nie usuwa }; -__fastcall TAnim::~TAnim() +TAnim::~TAnim() { // usuwanie animacji switch (iFlags & 0xF0) { // usuwanie struktur, zależnie ile zostało stworzonych @@ -1432,7 +1432,7 @@ void TDynamicObject::ABuScanObjects(int ScanDir, double ScanDist) } //----------ABu: koniec skanowania pojazdow -__fastcall TDynamicObject::TDynamicObject() +TDynamicObject::TDynamicObject() { modelShake = vector3(0, 0, 0); fTrackBlock = 10000.0; // brak przeszkody na drodze @@ -1535,7 +1535,7 @@ __fastcall TDynamicObject::TDynamicObject() fAdjustment = 0.0; // korekcja odległości pomiędzy wózkami (np. na łukach) } -__fastcall TDynamicObject::~TDynamicObject() +TDynamicObject::~TDynamicObject() { // McZapkie-250302 - zamykanie logowania parametrow fizycznych SafeDelete(Mechanik); SafeDelete(MoverParameters); diff --git a/EU07.cpp b/EU07.cpp index 5fa0bffd..e69a82bd 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -747,3 +747,6 @@ int WINAPI WinMain(HINSTANCE hInstance, // instance KillGLWindow(); // kill the window return (msg.wParam); // exit the program } + + + diff --git a/EvLaunch.cpp b/EvLaunch.cpp index 35dcca55..a7b7c910 100644 --- a/EvLaunch.cpp +++ b/EvLaunch.cpp @@ -22,7 +22,7 @@ //--------------------------------------------------------------------------- -__fastcall TEventLauncher::TEventLauncher() +TEventLauncher::TEventLauncher() { // ustawienie początkowych wartości dla wszystkich zmiennych iKey = 0; DeltaTime = -1; @@ -36,7 +36,7 @@ __fastcall TEventLauncher::TEventLauncher() iCheckMask = 0; } -__fastcall TEventLauncher::~TEventLauncher() { SafeDeleteArray(szText); } +TEventLauncher::~TEventLauncher() { SafeDeleteArray(szText); } void TEventLauncher::Init() {} diff --git a/Event.cpp b/Event.cpp index 76315d5d..1c0f8189 100644 --- a/Event.cpp +++ b/Event.cpp @@ -19,7 +19,7 @@ #include "Ground.h" #pragma package(smart_init) -__fastcall TEvent::TEvent(AnsiString m) +TEvent::TEvent(AnsiString m) { // asName=""; //czy nazwa eventu jest niezbędna w tym przypadku? chyba nie evNext = evNext2 = NULL; @@ -44,7 +44,7 @@ __fastcall TEvent::TEvent(AnsiString m) fRandomDelay = 0.0; // standardowo nie będzie dodatkowego losowego opóźnienia }; -__fastcall TEvent::~TEvent() +TEvent::~TEvent() { switch (Type) { // sprzątanie diff --git a/FadeSound.cpp b/FadeSound.cpp index 3486a3ff..d30d3ae0 100644 --- a/FadeSound.cpp +++ b/FadeSound.cpp @@ -12,7 +12,7 @@ #include "Timer.h" #include "FadeSound.h" -__fastcall TFadeSound::TFadeSound() +TFadeSound::TFadeSound() { Sound = NULL; fFade = 0; @@ -20,7 +20,7 @@ __fastcall TFadeSound::TFadeSound() fTime = 0; } -__fastcall TFadeSound::~TFadeSound() { Free(); } +TFadeSound::~TFadeSound() { Free(); } void TFadeSound::Free() {} diff --git a/Float3d.h b/Float3d.h index 70673ee4..559c35db 100644 --- a/Float3d.h +++ b/Float3d.h @@ -82,7 +82,10 @@ inline float4 operator*(const float4 &q1, const float4 &q2) q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x, q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z); } -inline float4 operator-(const float4 &q) { // sprzężony; odwrotny tylko dla znormalizowanych! return float4(-q.x, -q.y, -q.z, q.w); }; +inline float4 operator-(const float4 &q) +{ // sprzężony; odwrotny tylko dla znormalizowanych! + return float4(-q.x, -q.y, -q.z, q.w); +}; inline float4 operator-(const float4 &q1, const float4 &q2) { // z odejmowaniem nie ma lekko return (-q1) * q2; // inwersja tylko dla znormalizowanych! @@ -256,7 +259,10 @@ inline float4x4 operator*(const float4x4 &m1, const float4x4 &m2) }; // From code in Graphics Gems; p. 766 -inline float Det2x2(float a, float b, float c, float d) { // obliczenie wyznacznika macierzy 2×2 return a * d - b * c; }; +inline float Det2x2(float a, float b, float c, float d) +{ // obliczenie wyznacznika macierzy 2×2 + return a * d - b * c; +}; inline float Det3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) diff --git a/Gauge.cpp b/Gauge.cpp index f0ac9c42..03a8dcf9 100644 --- a/Gauge.cpp +++ b/Gauge.cpp @@ -16,7 +16,7 @@ #include "Gauge.h" #include "Console.h" -__fastcall TGauge::TGauge() +TGauge::TGauge() { eType = gt_Unknown; fFriction = 0.0; @@ -29,7 +29,7 @@ __fastcall TGauge::TGauge() SubModel = NULL; }; -__fastcall TGauge::~TGauge(){}; +TGauge::~TGauge(){}; void TGauge::Clear() { diff --git a/Globals.cpp b/Globals.cpp index a6082ef0..b47d346c 100644 --- a/Globals.cpp +++ b/Globals.cpp @@ -692,7 +692,7 @@ bool Global::DoEvents() } //--------------------------------------------------------------------------- -__fastcall TTranscripts::TTranscripts() +TTranscripts::TTranscripts() { iCount = 0; // brak linijek do wyświetlenia iStart = 0; // wypełniać od linijki 0 @@ -703,7 +703,7 @@ __fastcall TTranscripts::TTranscripts() } fRefreshTime = 360.0; // wartośc zaporowa }; -__fastcall TTranscripts::~TTranscripts(){}; +TTranscripts::~TTranscripts(){}; void TTranscripts::AddLine(char *txt, float show, float hide, bool it) { // dodanie linii do tabeli, (show) i (hide) w [s] od aktualnego czasu if (show == hide) diff --git a/Ground.cpp b/Ground.cpp index 19821f3f..266a3492 100644 --- a/Ground.cpp +++ b/Ground.cpp @@ -53,7 +53,7 @@ AnsiString LogComment; // tory są zdublowane jako TP_TRACK oraz TP_DUMMYTRACK. Jeśli tekstura jest // tylko jedna (np. zwrotnice), nie jest używany TP_DUMMYTRACK. //--------------------------------------------------------------------------- -__fastcall TGroundNode::TGroundNode() +TGroundNode::TGroundNode() { // nowy obiekt terenu - pusty iType = GL_POINTS; Vertices = NULL; @@ -83,7 +83,7 @@ __fastcall TGroundNode::TGroundNode() iVersion = 0; // wersja siatki } -__fastcall TGroundNode::~TGroundNode() +TGroundNode::~TGroundNode() { // if (iFlags&0x200) //czy obiekt został utworzony? switch (iType) @@ -140,7 +140,7 @@ void TGroundNode::Init(int n) Vertices = new TGroundVertex[iNumVerts]; } -__fastcall TGroundNode::TGroundNode(TGroundNodeType t, int n) +TGroundNode::TGroundNode(TGroundNodeType t, int n) { // utworzenie obiektu TGroundNode(); // domyślne ustawienia iNumVerts = n; @@ -675,7 +675,7 @@ void TGroundNode::RenderAlphaDL() //------------------------------------------------------------------------------ //------------------ Podstawowy pojemnik terenu - sektor ----------------------- //------------------------------------------------------------------------------ -__fastcall TSubRect::TSubRect() +TSubRect::TSubRect() { nRootNode = NULL; // lista wszystkich obiektów jest pusta nRenderHidden = nRenderRect = nRenderRectAlpha = nRender = nRenderMixed = nRenderAlpha = @@ -686,7 +686,7 @@ __fastcall TSubRect::TSubRect() iNodeCount = 0; // licznik obiektów iTracks = 0; // licznik torów } -__fastcall TSubRect::~TSubRect() +TSubRect::~TSubRect() { if (Global::bManageNodes) // Ra: tu się coś sypie ResourceManager::Unregister(this); // wyrejestrowanie ze sprzątacza @@ -1203,13 +1203,16 @@ void TSubRect::RenderSounds() //--------------------------------------------------------------------------- int TGroundRect::iFrameNumber = 0; // licznik wyświetlanych klatek -__fastcall TGroundRect::TGroundRect() +TGroundRect::TGroundRect() { pSubRects = NULL; nTerrain = NULL; }; -__fastcall TGroundRect::~TGroundRect() { SafeDeleteArray(pSubRects); }; +TGroundRect::~TGroundRect() +{ + SafeDeleteArray(pSubRects); +}; void TGroundRect::RenderDL() { // renderowanie kwadratu kilometrowego (DL), jeśli jeszcze nie zrobione @@ -1294,7 +1297,7 @@ void TGround::MoveGroundNode(vector3 pPosition) */ } -__fastcall TGround::TGround() +TGround::TGround() { // RootNode=NULL; nRootDynamic = NULL; @@ -1313,7 +1316,10 @@ __fastcall TGround::TGround() sTracks = new TNames(); // nazwy torów - na razie tak } -__fastcall TGround::~TGround() { Free(); } +TGround::~TGround() +{ + Free(); +} void TGround::Free() { diff --git a/Logs.cpp b/Logs.cpp index 6694fe76..0ef36bbb 100644 --- a/Logs.cpp +++ b/Logs.cpp @@ -89,7 +89,10 @@ void ErrorLog(const AnsiString &asMessage) WriteLog(asMessage.c_str()); // do "log.txt" ewentualnie też } -void WriteLog(const AnsiString &str) { // Ra: wersja z AnsiString jest zamienna z Error() WriteLog(str.c_str()); }; +void WriteLog(const AnsiString &str) +{ // Ra: wersja z AnsiString jest zamienna z Error() + WriteLog(str.c_str()); +}; //--------------------------------------------------------------------------- #pragma package(smart_init) diff --git a/MemCell.cpp b/MemCell.cpp index 78c4ab13..52486953 100644 --- a/MemCell.cpp +++ b/MemCell.cpp @@ -23,7 +23,7 @@ #pragma package(smart_init) //--------------------------------------------------------------------------- -__fastcall TMemCell::TMemCell(vector3 *p) +TMemCell::TMemCell(vector3 *p) { fValue1 = fValue2 = 0; szText = new char[256]; // musi być dla automatycznie tworzonych komórek dla odcinków @@ -34,7 +34,7 @@ __fastcall TMemCell::TMemCell(vector3 *p) OnSent = NULL; } -__fastcall TMemCell::~TMemCell() { SafeDeleteArray(szText); } +TMemCell::~TMemCell() { SafeDeleteArray(szText); } void TMemCell::Init() {} @@ -174,4 +174,7 @@ void TMemCell::StopCommandSent() Global::AddToQuery(OnSent, NULL); }; -void TMemCell::AssignEvents(TEvent *e) { // powiązanie eventu OnSent = e; }; +void TMemCell::AssignEvents(TEvent *e) +{ // powiązanie eventu + OnSent = e; +}; diff --git a/Model3d.cpp b/Model3d.cpp index 6d5075f5..05af1a78 100644 --- a/Model3d.cpp +++ b/Model3d.cpp @@ -58,7 +58,7 @@ char *TStringPack::String(int n) return ptr; }; -__fastcall TSubModel::TSubModel() +TSubModel::TSubModel() { ZeroMemory(this, sizeof(TSubModel)); // istotne przy zapisywaniu wersji binarnej FirstInit(); @@ -115,7 +115,7 @@ void TSubModel::FirstInit() smLetter = NULL; // używany tylko roboczo dla TP_TEXT, do przyspieszenia wyświetlania }; -__fastcall TSubModel::~TSubModel() +TSubModel::~TSubModel() { if (uiDisplayList) glDeleteLists(uiDisplayList, 1); @@ -1631,7 +1631,7 @@ float TSubModel::MaxY(const float4x4 &m) }; //--------------------------------------------------------------------------- -__fastcall TModel3d::TModel3d() +TModel3d::TModel3d() { // Materials=NULL; // MaterialsCount=0; @@ -1653,7 +1653,7 @@ __fastcall TModel3d::TModel3d(char *FileName) LoadFromFile(FileName); }; */ -__fastcall TModel3d::~TModel3d() +TModel3d::~TModel3d() { // SafeDeleteArray(Materials); if (iFlags & 0x0200) diff --git a/Mover.cpp b/Mover.cpp index 8b94422b..9ae979d6 100644 --- a/Mover.cpp +++ b/Mover.cpp @@ -9,7 +9,7 @@ const dEpsilon = 0.01; // 1cm (zależy od typu sprzęgu...) -__fastcall TMoverParameters::TMoverParameters(double VelInitial, AnsiString TypeNameInit, +TMoverParameters::TMoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit, int LoadInitial, AnsiString LoadTypeInitial, int Cab) : T_MoverParameters(VelInitial, TypeNameInit, NameInit, LoadInitial, LoadTypeInitial, Cab) @@ -229,8 +229,8 @@ bool TMoverParameters::IncBrakeLevel() { // nowa wersja na użytek AI, false gdy osiągnięto pozycję BrakeCtrlPosNo return BrakeLevelAdd(1.0); }; -bool TMoverParameters::DecBrakeLevel() -{ // nowa wersja na użytek AI, false gdy osiągnięto pozycję -1 return BrakeLevelAdd(-1.0); }; +bool TMoverParameters::DecBrakeLevel() +{ return BrakeLevelAdd(-1.0); }; // nowa wersja na użytek AI, false gdy osiągnięto pozycję -1 bool TMoverParameters::ChangeCab(int direction) { // zmiana kabiny i resetowanie ustawien diff --git a/Names.cpp b/Names.cpp index cfa49f69..eb8b7688 100644 --- a/Names.cpp +++ b/Names.cpp @@ -93,7 +93,7 @@ ItemRecord *__fastcall ItemRecord::TreeFindRecord(const char *n) return NULL; }; -__fastcall TNames::TNames() +TNames::TNames() { // tworzenie bufora iSize = 16 * 1024 * 1024; // rozmiar bufora w bajtach cBuffer = new char[iSize]; diff --git a/RealSound.cpp b/RealSound.cpp index dbe9714a..cf5a06b1 100644 --- a/RealSound.cpp +++ b/RealSound.cpp @@ -16,7 +16,7 @@ #include "Logs.h" #include "McZapkie\mctools.hpp" -__fastcall TRealSound::TRealSound() +TRealSound::TRealSound() { pSound = NULL; dSoundAtt = -1; @@ -33,7 +33,7 @@ __fastcall TRealSound::TRealSound() bLoopPlay = false; // dźwięk wyłączony } -__fastcall TRealSound::~TRealSound() +TRealSound::~TRealSound() { // if (this) if (pSound) pSound->Stop(); } diff --git a/Segment.cpp b/Segment.cpp index a66646da..1981942d 100644 --- a/Segment.cpp +++ b/Segment.cpp @@ -23,7 +23,7 @@ AnsiString Where(vector3 p) return AnsiString(p.x) + " " + AnsiString(p.y) + " " + AnsiString(p.z); }; -__fastcall TSegment::TSegment(TTrack *owner) +TSegment::TSegment(TTrack *owner) { Point1 = CPointOut = CPointIn = Point2 = vector3(0.0f, 0.0f, 0.0f); fLength = 0; @@ -34,7 +34,7 @@ __fastcall TSegment::TSegment(TTrack *owner) pOwner = owner; }; -__fastcall TSegment::~TSegment() { SafeDeleteArray(fTsBuffer); }; +TSegment::~TSegment() { SafeDeleteArray(fTsBuffer); }; bool TSegment::Init(vector3 NewPoint1, vector3 NewPoint2, double fNewStep, double fNewRoll1, double fNewRoll2) diff --git a/Sound.cpp b/Sound.cpp index d98e3f67..f0016bd6 100644 --- a/Sound.cpp +++ b/Sound.cpp @@ -26,7 +26,7 @@ LPDIRECTSOUNDNOTIFY TSoundsManager::pDSNotify; int TSoundsManager::Count = 0; TSoundContainer *TSoundsManager::First = NULL; -__fastcall TSoundContainer::TSoundContainer(LPDIRECTSOUND pDS, char *Directory, char *strFileName, +TSoundContainer::TSoundContainer(LPDIRECTSOUND pDS, char *Directory, char *strFileName, int NConcurrent) { // wczytanie pliku dźwiękowego int hr = 111; @@ -139,7 +139,7 @@ __fastcall TSoundContainer::TSoundContainer(LPDIRECTSOUND pDS, char *Directory, };*/ }; -__fastcall TSoundContainer::~TSoundContainer() +TSoundContainer::~TSoundContainer() { // for (int i=Concurrent-1; i>=0; i--) // SAFE_RELEASE( pDSBuffer[i] ); @@ -164,7 +164,7 @@ LPDIRECTSOUNDBUFFER TSoundContainer::GetUnique(LPDIRECTSOUND pDS) return DSBuffers.top(); }; -__fastcall TSoundsManager::~TSoundsManager() { Free(); }; +TSoundsManager::~TSoundsManager() { Free(); }; void TSoundsManager::Free() { diff --git a/Spring.cpp b/Spring.cpp index dc95b1db..14d1acc7 100644 --- a/Spring.cpp +++ b/Spring.cpp @@ -9,7 +9,7 @@ #include "Spring.h" #include "Usefull.h" -__fastcall TSpring::TSpring() +TSpring::TSpring() { vForce1 = vForce2 = vector3(0, 0, 0); Ks = 0; @@ -17,7 +17,7 @@ __fastcall TSpring::TSpring() restLen = 0; } -__fastcall TSpring::~TSpring() {} +TSpring::~TSpring() {} void TSpring::Init(double nrestLen, double nKs, double nKd) { diff --git a/Timer.cpp b/Timer.cpp index ac6783e0..c6f3f011 100644 --- a/Timer.cpp +++ b/Timer.cpp @@ -20,9 +20,15 @@ double fSinceStart = 0; double GetTime() { return fSimulationTime; } -double GetDeltaTime() { // czas symulacji (stoi gdy pauza) return DeltaTime; } +double GetDeltaTime() +{ // czas symulacji (stoi gdy pauza) + return DeltaTime; +} -double GetDeltaRenderTime() { // czas renderowania (do poruszania się) return DeltaRenderTime; } +double GetDeltaRenderTime() +{ // czas renderowania (do poruszania się) + return DeltaRenderTime; +} double GetfSinceStart() { return fSinceStart; } diff --git a/Track.cpp b/Track.cpp index b4b3a01e..76a6b1cc 100644 --- a/Track.cpp +++ b/Track.cpp @@ -41,7 +41,7 @@ const int iEnds3[13] = {3, 0, 2, 1, 2, 0, -1, 1, 0, 2, 0, 3, 1}; // numer sąsiedniego toru na końcu segmentu "-1" TIsolated *TIsolated::pRoot = NULL; -__fastcall TSwitchExtension::TSwitchExtension(TTrack *owner, int what) +TSwitchExtension::TSwitchExtension(TTrack *owner, int what) { // na początku wszystko puste CurrentIndex = 0; pNexts[0] = NULL; // wskaźniki do kolejnych odcinków ruchu @@ -71,7 +71,7 @@ __fastcall TSwitchExtension::TSwitchExtension(TTrack *owner, int what) fVelocity = -1.0; // maksymalne ograniczenie prędkości (ustawianej eventem) vTrans = vector3(0, 0, 0); // docelowa translacja przesuwnicy } -__fastcall TSwitchExtension::~TSwitchExtension() +TSwitchExtension::~TSwitchExtension() { // nie ma nic do usuwania // delete Segments[0]; // delete Segments[1]; @@ -81,8 +81,12 @@ __fastcall TSwitchExtension::~TSwitchExtension() delete Segments[5]; } -__fastcall TIsolated::TIsolated() { // utworznie pustego TIsolated("none", NULL); }; -__fastcall TIsolated::TIsolated(const AnsiString &n, TIsolated *i) +TIsolated::TIsolated() +{ // utworznie pustego + TIsolated("none", NULL); +}; + +TIsolated::TIsolated(const AnsiString &n, TIsolated *i) { // utworznie obwodu izolowanego asName = n; pNext = i; @@ -91,7 +95,7 @@ __fastcall TIsolated::TIsolated(const AnsiString &n, TIsolated *i) pMemCell = NULL; // podpiąć istniejącą albo utworzyć pustą }; -__fastcall TIsolated::~TIsolated(){// usuwanie +TIsolated::~TIsolated(){// usuwanie /* TIsolated *p=pRoot; while (pRoot) @@ -148,7 +152,7 @@ void TIsolated::Modify(int i, TDynamicObject *o) } }; -__fastcall TTrack::TTrack(TGroundNode *g) +TTrack::TTrack(TGroundNode *g) { // tworzenie nowego odcinka ruchu trNext = trPrev = NULL; // sąsiednie Segment = NULL; // dane odcinka @@ -200,7 +204,7 @@ __fastcall TTrack::TTrack(TGroundNode *g) trColides = NULL; // tor kolizyjny, na którym trzeba sprawdzać pojazdy pod kątem zderzenia } -__fastcall TTrack::~TTrack() +TTrack::~TTrack() { // likwidacja odcinka if (eType == tt_Normal) delete Segment; // dla zwrotnic nie usuwać tego (kopiowany) @@ -3087,7 +3091,10 @@ int TTrack::TestPoint(vector3 *Point) return -1; }; -void TTrack::MovedUp1(double dh) { // poprawienie przechyłki wymaga wydłużenia podsypki fTexHeight1 += dh; }; +void TTrack::MovedUp1(double dh) +{ // poprawienie przechyłki wymaga wydłużenia podsypki + fTexHeight1 += dh; +}; AnsiString TTrack::NameGet() { // ustalenie nazwy toru diff --git a/TractionPower.cpp b/TractionPower.cpp index f952317d..8c87d7be 100644 --- a/TractionPower.cpp +++ b/TractionPower.cpp @@ -21,7 +21,7 @@ //--------------------------------------------------------------------------- -__fastcall TTractionPowerSource::TTractionPowerSource() +TTractionPowerSource::TTractionPowerSource() { NominalVoltage = 0; VoltageFrequency = 0; @@ -44,7 +44,7 @@ __fastcall TTractionPowerSource::TTractionPowerSource() bSection = false; // sekcja nie jest źródłem zasilania, tylko grupuje przęsła }; -__fastcall TTractionPowerSource::~TTractionPowerSource(){}; +TTractionPowerSource::~TTractionPowerSource(){}; void TTractionPowerSource::Init(double u, double i) { // ustawianie zasilacza przy braku w scenerii diff --git a/Train.cpp b/Train.cpp index 8bab46e9..af374da2 100644 --- a/Train.cpp +++ b/Train.cpp @@ -21,7 +21,7 @@ using namespace Timer; -__fastcall TCab::TCab() +TCab::TCab() { CabPos1.x = -1.0; CabPos1.y = 1.0; @@ -82,7 +82,7 @@ void TCab::Load(TQueryParserComp *Parser) bOccupied = True; } -__fastcall TCab::~TCab() +TCab::~TCab() { delete[] ggList; delete[] btList; @@ -124,7 +124,7 @@ void TCab::Update() } }; -__fastcall TTrain::TTrain() +TTrain::TTrain() { ActiveUniversal4 = false; ShowNextCurrent = false; @@ -175,7 +175,7 @@ __fastcall TTrain::TTrain() fTachoTimer = 0.0; // włączenie skoków wskazań prędkościomierza } -__fastcall TTrain::~TTrain() +TTrain::~TTrain() { if (DynamicObject) if (DynamicObject->Mechanik) diff --git a/TrkFoll.cpp b/TrkFoll.cpp index 4c53d179..1e0d5666 100644 --- a/TrkFoll.cpp +++ b/TrkFoll.cpp @@ -20,7 +20,7 @@ #include "Ground.h" #include "Event.h" -__fastcall TTrackFollower::TTrackFollower() +TTrackFollower::TTrackFollower() { pCurrentTrack = NULL; pCurrentSegment = NULL; @@ -30,7 +30,7 @@ __fastcall TTrackFollower::TTrackFollower() fOffsetH = 0.0; // na starcie stoi na środku } -__fastcall TTrackFollower::~TTrackFollower() {} +TTrackFollower::~TTrackFollower() {} bool TTrackFollower::Init(TTrack *pTrack, TDynamicObject *NewOwner, double fDir) { diff --git a/VBO.cpp b/VBO.cpp index 3c574c8b..fbe1dc3f 100644 --- a/VBO.cpp +++ b/VBO.cpp @@ -10,14 +10,14 @@ #pragma package(smart_init) -__fastcall CMesh::CMesh() +CMesh::CMesh() { // utworzenie pustego obiektu m_pVNT = NULL; m_nVertexCount = -1; m_nVBOVertices = 0; // nie zarezerwowane }; -__fastcall CMesh::~CMesh() +CMesh::~CMesh() { // usuwanie obiektu Clear(); // zwolnienie zasobów }; diff --git a/World.cpp b/World.cpp index 836bd7dc..ba115c49 100644 --- a/World.cpp +++ b/World.cpp @@ -40,7 +40,7 @@ using namespace Timer; const double fTimeMax = 1.00; //[s] maksymalny czas aktualizacji w jednek klatce -__fastcall TWorld::TWorld() +TWorld::TWorld() { // randomize(); // Randomize(); @@ -60,7 +60,7 @@ __fastcall TWorld::TWorld() fTime50Hz = 0.0; // bufor czasu dla komunikacji z PoKeys } -__fastcall TWorld::~TWorld() +TWorld::~TWorld() { Global::bManageNodes = false; // Ra: wyłączenie wyrejestrowania, bo się sypie TrainDelete(); diff --git a/sky.cpp b/sky.cpp index 52472a85..fd86910f 100644 --- a/sky.cpp +++ b/sky.cpp @@ -10,9 +10,9 @@ //--------------------------------------------------------------------------- GLfloat lightPos[4] = {0.0f, 0.0f, 0.0f, 1.0f}; -__fastcall TSky::~TSky(){}; +TSky::~TSky(){}; -__fastcall TSky::TSky(){}; +TSky::TSky(){}; void TSky::Init() {