Skip to content

Commit

Permalink
Merge pull request #8 from firleju/master
Browse files Browse the repository at this point in the history
Source files license, event0 fix
  • Loading branch information
shaxbee committed Apr 17, 2015
2 parents 9eb087b + 049455a commit ef4e168
Show file tree
Hide file tree
Showing 113 changed files with 1,085 additions and 205 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ install_manifest.txt
*.out
*.app

*.dcu
*.~cpp
*.~h
*.~bpr
*.~pas
13 changes: 10 additions & 3 deletions AdvSound.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include "system.hpp"
#include "classes.hpp"
Expand All @@ -9,7 +16,7 @@
//---------------------------------------------------------------------------
#pragma package(smart_init)

__fastcall TAdvancedSound::TAdvancedSound()
TAdvancedSound::TAdvancedSound()
{
// SoundStart=SoundCommencing=SoundShut= NULL;
State = ss_Off;
Expand All @@ -18,7 +25,7 @@ __fastcall TAdvancedSound::TAdvancedSound()
fShutLength = 0;
}

__fastcall TAdvancedSound::~TAdvancedSound()
TAdvancedSound::~TAdvancedSound()
{ // Ra: stopowanie siê sypie
// SoundStart.Stop();
// SoundCommencing.Stop();
Expand Down
10 changes: 9 additions & 1 deletion AdvSound.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef AdvSoundH
#define AdvSoundH

Expand Down
13 changes: 10 additions & 3 deletions AirCoupler.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include "system.hpp"
#include "classes.hpp"
Expand All @@ -7,9 +14,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
Expand Down
9 changes: 8 additions & 1 deletion AirCoupler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef AirCouplerH
#define AirCouplerH
Expand Down
25 changes: 17 additions & 8 deletions AnimModel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
/*
MaSzyna EU07 locomotive simulator
Copyright (C) 2001-2004 Marcin Wozniak and others
Expand All @@ -20,8 +27,8 @@
#pragma package(smart_init)
//---------------------------------------------------------------------------

__fastcall TAnimAdvanced::TAnimAdvanced(){};
__fastcall TAnimAdvanced::~TAnimAdvanced(){
TAnimAdvanced::TAnimAdvanced(){};
TAnimAdvanced::~TAnimAdvanced(){
// delete[] pVocaloidMotionData; //plik został zmodyfikowany
};

Expand Down Expand Up @@ -64,7 +71,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
Expand All @@ -82,7 +89,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
Expand Down Expand Up @@ -390,13 +397,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;
Expand All @@ -419,7 +428,7 @@ __fastcall TAnimModel::TAnimModel()
fOffTime = fOnTime + 0.66;
}

__fastcall TAnimModel::~TAnimModel()
TAnimModel::~TAnimModel()
{
delete pAdvanced; // nie ma zaawansowanej animacji
SafeDelete(pRoot);
Expand Down
14 changes: 13 additions & 1 deletion AnimModel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
/*
MaSzyna EU07 locomotive simulator
Copyright (C) 2001-2004 Marcin Wozniak and others
*/

#ifndef AnimModelH
#define AnimModelH
Expand Down
13 changes: 10 additions & 3 deletions Button.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include "system.hpp"
#include "classes.hpp"
Expand All @@ -11,13 +18,13 @@

#pragma package(smart_init)

__fastcall TButton::TButton()
TButton::TButton()
{
iFeedbackBit = 0;
Clear();
};

__fastcall TButton::~TButton(){};
TButton::~TButton(){};

void TButton::Clear(int i)
{
Expand Down
9 changes: 8 additions & 1 deletion Button.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef ButtonH
#define ButtonH
Expand Down
10 changes: 9 additions & 1 deletion Camera.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include "system.hpp"
#include "classes.hpp"

Expand Down
10 changes: 9 additions & 1 deletion Camera.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef CameraH
#define CameraH

Expand Down
9 changes: 8 additions & 1 deletion Classes.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include <vcl.h>
#pragma hdrstop
Expand Down
9 changes: 8 additions & 1 deletion Classes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef ClassesH
#define ClassesH
Expand Down
15 changes: 11 additions & 4 deletions Console.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include <vcl.h>
#pragma hdrstop
Expand Down Expand Up @@ -104,7 +111,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)
Expand All @@ -114,7 +121,7 @@ __fastcall Console::Console()
}
};

__fastcall Console::~Console()
Console::~Console()
{
delete PoKeys55[0];
delete PoKeys55[1];
Expand Down Expand Up @@ -267,7 +274,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)
Expand Down
9 changes: 8 additions & 1 deletion Console.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef ConsoleH
#define ConsoleH
Expand Down
11 changes: 9 additions & 2 deletions Console/LPT.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include "LPT.h"
#include <windows.h>
Expand Down Expand Up @@ -41,4 +48,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
9 changes: 8 additions & 1 deletion Console/LPT.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#ifndef LPTH
#define LPTH
Expand Down
14 changes: 11 additions & 3 deletions Console/PoKeys55.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
//---------------------------------------------------------------------------
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/

#include <vcl.h>
#pragma hdrstop

Expand All @@ -17,7 +25,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;
Expand All @@ -31,7 +39,7 @@ __fastcall TPoKeys55::TPoKeys55()
bNoError = true;
};
//---------------------------------------------------------------------------
__fastcall TPoKeys55::~TPoKeys55() { Close(); };
TPoKeys55::~TPoKeys55() { Close(); };
//---------------------------------------------------------------------------
bool TPoKeys55::Close()
{ // roz³¹czenie komunikacji
Expand Down
Loading

0 comments on commit ef4e168

Please sign in to comment.