mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Usunięcie pozostałych jeszcze słów kluczowych __fastcall.
This commit is contained in:
@@ -531,7 +531,7 @@ bool TAnimModel::Load(cParser *parser, bool ter)
|
||||
return true;
|
||||
}
|
||||
|
||||
TAnimContainer *__fastcall TAnimModel::AddContainer(char *pName)
|
||||
TAnimContainer * TAnimModel::AddContainer(char *pName)
|
||||
{ // dodanie sterowania submodelem dla egzemplarza
|
||||
if (!pModel)
|
||||
return NULL;
|
||||
@@ -547,7 +547,7 @@ TAnimContainer *__fastcall TAnimModel::AddContainer(char *pName)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TAnimContainer *__fastcall TAnimModel::GetContainer(char *pName)
|
||||
TAnimContainer * TAnimModel::GetContainer(char *pName)
|
||||
{ // szukanie/dodanie sterowania submodelem dla egzemplarza
|
||||
if (!pName)
|
||||
return pRoot; // pobranie pierwszego (dla obrotnicy)
|
||||
@@ -691,7 +691,7 @@ int TAnimModel::TerrainCount()
|
||||
{ // zliczanie kwadratów kilometrowych (główna linia po Next) do tworznia tablicy
|
||||
return pModel ? pModel->TerrainCount() : 0;
|
||||
};
|
||||
TSubModel *__fastcall TAnimModel::TerrainSquare(int n)
|
||||
TSubModel * TAnimModel::TerrainSquare(int n)
|
||||
{ // pobieranie wskaźników do pierwszego submodelu
|
||||
return pModel ? pModel->TerrainSquare(n) : 0;
|
||||
};
|
||||
|
||||
10
AnimModel.h
10
AnimModel.h
@@ -80,7 +80,7 @@ class TAnimContainer
|
||||
// std::string(pSubModel?pSubModel->asName.c_str():""); };
|
||||
// std::string inline GetName() { return std::string(pSubModel?pSubModel->pName:"");
|
||||
// };
|
||||
char *__fastcall NameGet()
|
||||
char * NameGet()
|
||||
{
|
||||
return (pSubModel ? pSubModel->pName : NULL);
|
||||
};
|
||||
@@ -107,7 +107,7 @@ class TAnimContainer
|
||||
pSubModel->WillBeAnimated();
|
||||
};
|
||||
void EventAssign(TEvent *ev);
|
||||
TEvent *__fastcall Event()
|
||||
TEvent * Event()
|
||||
{
|
||||
return evDone;
|
||||
};
|
||||
@@ -156,8 +156,8 @@ class TAnimModel
|
||||
bool Init(TModel3d *pNewModel);
|
||||
bool Init(AnsiString asName, AnsiString asReplacableTexture);
|
||||
bool Load(cParser *parser, bool ter = false);
|
||||
TAnimContainer *__fastcall AddContainer(char *pName);
|
||||
TAnimContainer *__fastcall GetContainer(char *pName);
|
||||
TAnimContainer * AddContainer(char *pName);
|
||||
TAnimContainer * GetContainer(char *pName);
|
||||
void RenderDL(vector3 pPosition = vector3(0, 0, 0), double fAngle = 0);
|
||||
void RenderAlphaDL(vector3 pPosition = vector3(0, 0, 0), double fAngle = 0);
|
||||
void RenderVBO(vector3 pPosition = vector3(0, 0, 0), double fAngle = 0);
|
||||
@@ -175,7 +175,7 @@ class TAnimModel
|
||||
};
|
||||
bool TerrainLoaded();
|
||||
int TerrainCount();
|
||||
TSubModel *__fastcall TerrainSquare(int n);
|
||||
TSubModel * TerrainSquare(int n);
|
||||
void TerrainRenderVBO(int n);
|
||||
void AnimationVND(void *pData, double a, double b, double c, double d);
|
||||
void LightSet(int n, float v);
|
||||
|
||||
@@ -13,14 +13,14 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#include "Curve.h"
|
||||
|
||||
__fastcall TCurve::TCurve()
|
||||
TCurve::TCurve()
|
||||
{
|
||||
Values = NULL;
|
||||
iNumValues = 0;
|
||||
iNumCols = 0;
|
||||
}
|
||||
|
||||
__fastcall TCurve::~TCurve()
|
||||
TCurve::~TCurve()
|
||||
{
|
||||
for (int i = 0; i < iNumValues; i++)
|
||||
SafeDelete(Values[i]);
|
||||
|
||||
@@ -386,7 +386,7 @@ void TController::TableClear()
|
||||
eSignSkip = NULL; // nic nie pomijamy
|
||||
};
|
||||
|
||||
TEvent *__fastcall TController::CheckTrackEvent(double fDirection, TTrack *Track)
|
||||
TEvent * TController::CheckTrackEvent(double fDirection, TTrack *Track)
|
||||
{ // sprawdzanie eventów na podanym torze do podstawowego skanowania
|
||||
TEvent *e = (fDirection > 0) ? Track->evEvent2 : Track->evEvent1;
|
||||
if (!e)
|
||||
@@ -4994,7 +4994,7 @@ bool TController::BackwardTrackBusy(TTrack *Track)
|
||||
return false; // wolny
|
||||
};
|
||||
|
||||
TEvent *__fastcall TController::CheckTrackEventBackward(double fDirection, TTrack *Track)
|
||||
TEvent * TController::CheckTrackEventBackward(double fDirection, TTrack *Track)
|
||||
{ // sprawdzanie eventu w torze, czy jest sygnałowym - skanowanie do tyłu
|
||||
TEvent *e = (fDirection > 0) ? Track->evEvent2 : Track->evEvent1;
|
||||
if (e)
|
||||
@@ -5004,7 +5004,7 @@ TEvent *__fastcall TController::CheckTrackEventBackward(double fDirection, TTrac
|
||||
return NULL;
|
||||
};
|
||||
|
||||
TTrack *__fastcall TController::BackwardTraceRoute(double &fDistance, double &fDirection,
|
||||
TTrack * TController::BackwardTraceRoute(double &fDistance, double &fDirection,
|
||||
TTrack *Track, TEvent *&Event)
|
||||
{ // szukanie sygnalizatora w kierunku przeciwnym jazdy (eventu odczytu komórki pamięci)
|
||||
TTrack *pTrackChVel = Track; // tor ze zmianą prędkości
|
||||
|
||||
10
Driver.h
10
Driver.h
@@ -309,7 +309,7 @@ class TController
|
||||
void ControllingSet(); // znajduje człon do sterowania
|
||||
void AutoRewident(); // ustawia hamulce w składzie
|
||||
public:
|
||||
Mtable::TTrainParameters *__fastcall Timetable()
|
||||
Mtable::TTrainParameters * Timetable()
|
||||
{
|
||||
return TrainParams;
|
||||
};
|
||||
@@ -355,12 +355,12 @@ class TController
|
||||
double Distance(vector3 &p1, vector3 &n, vector3 &p2);
|
||||
|
||||
private: // Ra: metody obsługujące skanowanie toru
|
||||
TEvent *__fastcall CheckTrackEvent(double fDirection, TTrack *Track);
|
||||
TEvent * CheckTrackEvent(double fDirection, TTrack *Track);
|
||||
bool TableCheckEvent(TEvent *e);
|
||||
bool TableAddNew();
|
||||
bool TableNotFound(TEvent *e);
|
||||
void TableClear();
|
||||
TEvent *__fastcall TableCheckTrackEvent(double fDirection, TTrack *Track);
|
||||
TEvent * TableCheckTrackEvent(double fDirection, TTrack *Track);
|
||||
void TableTraceRoute(double fDistance, TDynamicObject *pVehicle = NULL);
|
||||
void TableCheck(double fDistance);
|
||||
TCommandType TableUpdate(double &fVelDes, double &fDist, double &fNext, double &fAcc);
|
||||
@@ -368,8 +368,8 @@ class TController
|
||||
|
||||
private: // Ra: stare funkcje skanujące, używane do szukania sygnalizatora z tyłu
|
||||
bool BackwardTrackBusy(TTrack *Track);
|
||||
TEvent *__fastcall CheckTrackEventBackward(double fDirection, TTrack *Track);
|
||||
TTrack *__fastcall BackwardTraceRoute(double &fDistance, double &fDirection, TTrack *Track,
|
||||
TEvent * CheckTrackEventBackward(double fDirection, TTrack *Track);
|
||||
TTrack * BackwardTraceRoute(double &fDistance, double &fDirection, TTrack *Track,
|
||||
TEvent *&Event);
|
||||
void SetProximityVelocity(double dist, double vel, const vector3 *pos);
|
||||
TCommandType BackwardScan();
|
||||
|
||||
@@ -192,11 +192,11 @@ class float4x4
|
||||
for (int i = 0; i < 16; ++i)
|
||||
e[i] = f[i];
|
||||
};
|
||||
float *__fastcall operator()(int i)
|
||||
float * operator()(int i)
|
||||
{
|
||||
return &e[i << 2];
|
||||
}
|
||||
const float *__fastcall readArray(void)
|
||||
const float * readArray(void)
|
||||
{
|
||||
return e;
|
||||
}
|
||||
|
||||
4
Geom.cpp
4
Geom.cpp
@@ -19,11 +19,11 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "Globals.h"
|
||||
#include "Geom.h"
|
||||
|
||||
__fastcall TGeometry::TGeometry()
|
||||
TGeometry::TGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
__fastcall TGeometry::~TGeometry()
|
||||
TGeometry::~TGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -725,12 +725,12 @@ void Global::TrainDelete(TDynamicObject *d)
|
||||
pWorld->TrainDelete(d);
|
||||
};
|
||||
|
||||
TDynamicObject *__fastcall Global::DynamicNearest()
|
||||
TDynamicObject * Global::DynamicNearest()
|
||||
{ // ustalenie pojazdu najbli¿szego kamerze
|
||||
return pGround->DynamicNearest(pCamera->Pos);
|
||||
};
|
||||
|
||||
TDynamicObject *__fastcall Global::CouplerNearest()
|
||||
TDynamicObject * Global::CouplerNearest()
|
||||
{ // ustalenie pojazdu najbli¿szego kamerze
|
||||
return pGround->CouplerNearest(pCamera->Pos);
|
||||
};
|
||||
|
||||
@@ -313,8 +313,8 @@ class Global
|
||||
static void TrainDelete(TDynamicObject *d);
|
||||
static void ConfigParse(Queryparsercomp::TQueryParserComp *qp, cParser *cp = NULL);
|
||||
static AnsiString GetNextSymbol();
|
||||
static TDynamicObject *__fastcall DynamicNearest();
|
||||
static TDynamicObject *__fastcall CouplerNearest();
|
||||
static TDynamicObject * DynamicNearest();
|
||||
static TDynamicObject * CouplerNearest();
|
||||
static bool AddToQuery(TEvent *event, TDynamicObject *who);
|
||||
static bool DoEvents();
|
||||
static AnsiString Bezogonkow(AnsiString str, bool _ = false);
|
||||
|
||||
30
Ground.cpp
30
Ground.cpp
@@ -975,7 +975,7 @@ void TSubRect::Sort()
|
||||
};
|
||||
}
|
||||
|
||||
TTrack *__fastcall TSubRect::FindTrack(vector3 *Point, int &iConnection, TTrack *Exclude)
|
||||
TTrack * TSubRect::FindTrack(vector3 *Point, int &iConnection, TTrack *Exclude)
|
||||
{ // szukanie toru, którego koniec jest najbli¿szy (*Point)
|
||||
TTrack *Track;
|
||||
for (int i = 0; i < iTracks; ++i)
|
||||
@@ -1022,7 +1022,7 @@ void TSubRect::RaAnimate()
|
||||
tTrackAnim = tTrackAnim->RaAnimate(); // przeliczenie animacji kolejnego
|
||||
};
|
||||
|
||||
TTraction *__fastcall TSubRect::FindTraction(vector3 *Point, int &iConnection, TTraction *Exclude)
|
||||
TTraction * TSubRect::FindTraction(vector3 *Point, int &iConnection, TTraction *Exclude)
|
||||
{ // szukanie przês³a w sektorze, którego koniec jest najbli¿szy (*Point)
|
||||
TGroundNode *Current;
|
||||
for (Current = nRenderWires; Current; Current = Current->nNext3)
|
||||
@@ -1360,7 +1360,7 @@ void TGround::Free()
|
||||
delete sTracks;
|
||||
}
|
||||
|
||||
TGroundNode *__fastcall TGround::DynamicFindAny(AnsiString asNameToFind)
|
||||
TGroundNode * TGround::DynamicFindAny(AnsiString asNameToFind)
|
||||
{ // wyszukanie pojazdu o podanej nazwie, szukanie po wszystkich (u¿yæ drzewa!)
|
||||
for (TGroundNode *Current = nRootDynamic; Current; Current = Current->nNext)
|
||||
if ((Current->asName == asNameToFind))
|
||||
@@ -1368,7 +1368,7 @@ TGroundNode *__fastcall TGround::DynamicFindAny(AnsiString asNameToFind)
|
||||
return NULL;
|
||||
};
|
||||
|
||||
TGroundNode *__fastcall TGround::DynamicFind(AnsiString asNameToFind)
|
||||
TGroundNode * TGround::DynamicFind(AnsiString asNameToFind)
|
||||
{ // wyszukanie pojazdu z obsad¹ o podanej nazwie (u¿yæ drzewa!)
|
||||
for (TGroundNode *Current = nRootDynamic; Current; Current = Current->nNext)
|
||||
if (Current->DynamicObject->Mechanik)
|
||||
@@ -1386,7 +1386,7 @@ void TGround::DynamicList(bool all)
|
||||
WyslijString("none", 6); // informacja o koñcu listy
|
||||
};
|
||||
|
||||
TGroundNode *__fastcall TGround::FindGroundNode(AnsiString asNameToFind, TGroundNodeType iNodeType)
|
||||
TGroundNode * TGround::FindGroundNode(AnsiString asNameToFind, TGroundNodeType iNodeType)
|
||||
{ // wyszukiwanie obiektu o podanej nazwie i konkretnym typie
|
||||
if ((iNodeType == TP_TRACK) || (iNodeType == TP_MEMCELL) || (iNodeType == TP_MODEL))
|
||||
{ // wyszukiwanie w drzewie binarnym
|
||||
@@ -1540,7 +1540,7 @@ void TGround::RaTriangleDivider(TGroundNode *node)
|
||||
RaTriangleDivider(ntri);
|
||||
};
|
||||
|
||||
TGroundNode *__fastcall TGround::AddGroundNode(cParser *parser)
|
||||
TGroundNode * TGround::AddGroundNode(cParser *parser)
|
||||
{ // wczytanie wpisu typu "node"
|
||||
// parser->LoadTraction=Global::bLoadTraction; //Ra: tu nie potrzeba powtarzaæ
|
||||
AnsiString str, str1, str2, str3, str4, Skin, DriverType, asNodeName;
|
||||
@@ -2199,7 +2199,7 @@ TGroundNode *__fastcall TGround::AddGroundNode(cParser *parser)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
TSubRect *__fastcall TGround::FastGetSubRect(int iCol, int iRow)
|
||||
TSubRect * TGround::FastGetSubRect(int iCol, int iRow)
|
||||
{
|
||||
int br, bc, sr, sc;
|
||||
br = iRow / iNumSubRects;
|
||||
@@ -2211,7 +2211,7 @@ TSubRect *__fastcall TGround::FastGetSubRect(int iCol, int iRow)
|
||||
return (Rects[br][bc].FastGetRect(sc, sr));
|
||||
}
|
||||
|
||||
TSubRect *__fastcall TGround::GetSubRect(int iCol, int iRow)
|
||||
TSubRect * TGround::GetSubRect(int iCol, int iRow)
|
||||
{ // znalezienie ma³ego kwadratu mapy
|
||||
int br, bc, sr, sc;
|
||||
br = iRow / iNumSubRects; // wspó³rzêdne kwadratu kilometrowego
|
||||
@@ -2223,7 +2223,7 @@ TSubRect *__fastcall TGround::GetSubRect(int iCol, int iRow)
|
||||
return (Rects[br][bc].SafeGetRect(sc, sr)); // pobranie ma³ego kwadratu
|
||||
}
|
||||
|
||||
TEvent *__fastcall TGround::FindEvent(const AnsiString &asEventName)
|
||||
TEvent * TGround::FindEvent(const AnsiString &asEventName)
|
||||
{
|
||||
return (TEvent *)sTracks->Find(0, asEventName.c_str()); // wyszukiwanie w drzewie
|
||||
/* //powolna wyszukiwarka
|
||||
@@ -2236,7 +2236,7 @@ TEvent *__fastcall TGround::FindEvent(const AnsiString &asEventName)
|
||||
*/
|
||||
}
|
||||
|
||||
TEvent *__fastcall TGround::FindEventScan(const AnsiString &asEventName)
|
||||
TEvent * TGround::FindEventScan(const AnsiString &asEventName)
|
||||
{ // wyszukanie eventu z opcj¹ utworzenia niejawnego dla komórek skanowanych
|
||||
TEvent *e = (TEvent *)sTracks->Find(0, asEventName.c_str()); // wyszukiwanie w drzewie eventów
|
||||
if (e)
|
||||
@@ -3619,7 +3619,7 @@ bool TGround::InitLaunchers()
|
||||
return true;
|
||||
}
|
||||
|
||||
TTrack *__fastcall TGround::FindTrack(vector3 Point, int &iConnection, TGroundNode *Exclude)
|
||||
TTrack * TGround::FindTrack(vector3 Point, int &iConnection, TGroundNode *Exclude)
|
||||
{ // wyszukiwanie innego toru koñcz¹cego siê w (Point)
|
||||
TTrack *Track;
|
||||
TGroundNode *Current;
|
||||
@@ -3667,7 +3667,7 @@ TTrack *__fastcall TGround::FindTrack(vector3 Point, int &iConnection, TGroundNo
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TTraction *__fastcall TGround::FindTraction(vector3 *Point, int &iConnection, TGroundNode *Exclude)
|
||||
TTraction * TGround::FindTraction(vector3 *Point, int &iConnection, TGroundNode *Exclude)
|
||||
{ // wyszukiwanie innego przês³a koñcz¹cego siê w (Point)
|
||||
TTraction *Traction;
|
||||
TGroundNode *Current;
|
||||
@@ -3705,7 +3705,7 @@ TTraction *__fastcall TGround::FindTraction(vector3 *Point, int &iConnection, TG
|
||||
return NULL;
|
||||
};
|
||||
|
||||
TTraction *__fastcall TGround::TractionNearestFind(vector3 &p, int dir, TGroundNode *n)
|
||||
TTraction * TGround::TractionNearestFind(vector3 &p, int dir, TGroundNode *n)
|
||||
{ // wyszukanie najbli¿szego do (p) przês³a o tej samej nazwie sekcji (ale innego ni¿ pod³¹czone)
|
||||
// oraz zasilanego z kierunku (dir)
|
||||
TGroundNode *nCurrent, *nBest = NULL;
|
||||
@@ -4971,7 +4971,7 @@ void TGround::RadioStop(vector3 pPosition)
|
||||
node->pTrack->RadioStop(); // przekazanie do ka¿dego toru w ka¿dym segmencie
|
||||
};
|
||||
|
||||
TDynamicObject *__fastcall TGround::DynamicNearest(vector3 pPosition, double distance, bool mech)
|
||||
TDynamicObject * TGround::DynamicNearest(vector3 pPosition, double distance, bool mech)
|
||||
{ // wyszukanie pojazdu najbli¿szego wzglêdem (pPosition)
|
||||
TGroundNode *node;
|
||||
TSubRect *tmp;
|
||||
@@ -4997,7 +4997,7 @@ TDynamicObject *__fastcall TGround::DynamicNearest(vector3 pPosition, double dis
|
||||
}
|
||||
return dyn;
|
||||
};
|
||||
TDynamicObject *__fastcall TGround::CouplerNearest(vector3 pPosition, double distance, bool mech)
|
||||
TDynamicObject * TGround::CouplerNearest(vector3 pPosition, double distance, bool mech)
|
||||
{ // wyszukanie pojazdu, którego sprzêg jest najbli¿ej wzglêdem (pPosition)
|
||||
TGroundNode *node;
|
||||
TSubRect *tmp;
|
||||
|
||||
44
Ground.h
44
Ground.h
@@ -156,7 +156,7 @@ class TGroundNode : public Resource
|
||||
void MoveMe(vector3 pPosition); // przesuwanie (nie działa)
|
||||
|
||||
// bool Disable();
|
||||
inline TGroundNode *__fastcall Find(const AnsiString &asNameToFind, TGroundNodeType iNodeType)
|
||||
inline TGroundNode * Find(const AnsiString &asNameToFind, TGroundNodeType iNodeType)
|
||||
{ // wyszukiwanie czołgowe z typem
|
||||
if ((iNodeType == iType) && (asNameToFind == asName))
|
||||
return this;
|
||||
@@ -208,8 +208,8 @@ class TSubRect : public Resource, public CMesh
|
||||
void NodeAdd(TGroundNode *Node); // dodanie obiektu do sektora na etapie rozdzielania na sektory
|
||||
void RaNodeAdd(TGroundNode *Node); // dodanie obiektu do listy renderowania
|
||||
void Sort(); // optymalizacja obiektów w sektorze (sortowanie wg tekstur)
|
||||
TTrack *__fastcall FindTrack(vector3 *Point, int &iConnection, TTrack *Exclude);
|
||||
TTraction *__fastcall FindTraction(vector3 *Point, int &iConnection, TTraction *Exclude);
|
||||
TTrack * FindTrack(vector3 *Point, int &iConnection, TTrack *Exclude);
|
||||
TTraction * FindTraction(vector3 *Point, int &iConnection, TTraction *Exclude);
|
||||
bool StartVBO(); // ustwienie VBO sektora dla (nRenderRect), (nRenderRectAlpha) i
|
||||
// (nRenderWires)
|
||||
bool RaTrackAnimAdd(TTrack *t); // zgłoszenie toru do animacji
|
||||
@@ -249,13 +249,13 @@ class TGroundRect : public TSubRect
|
||||
TGroundRect();
|
||||
virtual ~TGroundRect();
|
||||
|
||||
TSubRect *__fastcall SafeGetRect(int iCol, int iRow)
|
||||
TSubRect * SafeGetRect(int iCol, int iRow)
|
||||
{ // pobranie wskaźnika do małego kwadratu, utworzenie jeśli trzeba
|
||||
if (!pSubRects)
|
||||
Init(); // utworzenie małych kwadratów
|
||||
return pSubRects + iRow * iNumSubRects + iCol; // zwrócenie właściwego
|
||||
};
|
||||
TSubRect *__fastcall FastGetRect(int iCol, int iRow)
|
||||
TSubRect * FastGetRect(int iCol, int iRow)
|
||||
{ // pobranie wskaźnika do małego kwadratu, bez tworzenia jeśli nie ma
|
||||
return (pSubRects ? pSubRects + iRow * iNumSubRects + iCol : NULL);
|
||||
};
|
||||
@@ -308,11 +308,11 @@ class TGround
|
||||
void InitTraction();
|
||||
bool InitEvents();
|
||||
bool InitLaunchers();
|
||||
TTrack *__fastcall FindTrack(vector3 Point, int &iConnection, TGroundNode *Exclude);
|
||||
TTraction *__fastcall FindTraction(vector3 *Point, int &iConnection, TGroundNode *Exclude);
|
||||
TTraction *__fastcall TractionNearestFind(vector3 &p, int dir, TGroundNode *n);
|
||||
TTrack * FindTrack(vector3 Point, int &iConnection, TGroundNode *Exclude);
|
||||
TTraction * FindTraction(vector3 *Point, int &iConnection, TGroundNode *Exclude);
|
||||
TTraction * TractionNearestFind(vector3 &p, int dir, TGroundNode *n);
|
||||
// TGroundNode* CreateGroundNode();
|
||||
TGroundNode *__fastcall AddGroundNode(cParser *parser);
|
||||
TGroundNode * AddGroundNode(cParser *parser);
|
||||
bool AddGroundNode(double x, double z, TGroundNode *Node)
|
||||
{
|
||||
TSubRect *tmp = GetSubRect(x, z);
|
||||
@@ -326,7 +326,7 @@ class TGround
|
||||
};
|
||||
// bool Include(TQueryParserComp *Parser);
|
||||
// TGroundNode* GetVisible(AnsiString asName);
|
||||
TGroundNode *__fastcall GetNode(AnsiString asName);
|
||||
TGroundNode * GetNode(AnsiString asName);
|
||||
bool AddDynamic(TGroundNode *Node);
|
||||
void MoveGroundNode(vector3 pPosition);
|
||||
void UpdatePhys(double dt, int iter); // aktualizacja fizyki stałym krokiem
|
||||
@@ -355,24 +355,24 @@ class TGround
|
||||
return NULL;
|
||||
}
|
||||
*/
|
||||
TGroundNode *__fastcall DynamicFindAny(AnsiString asNameToFind);
|
||||
TGroundNode *__fastcall DynamicFind(AnsiString asNameToFind);
|
||||
TGroundNode * DynamicFindAny(AnsiString asNameToFind);
|
||||
TGroundNode * DynamicFind(AnsiString asNameToFind);
|
||||
void DynamicList(bool all = false);
|
||||
TGroundNode *__fastcall FindGroundNode(AnsiString asNameToFind, TGroundNodeType iNodeType);
|
||||
TGroundRect *__fastcall GetRect(double x, double z)
|
||||
TGroundNode * FindGroundNode(AnsiString asNameToFind, TGroundNodeType iNodeType);
|
||||
TGroundRect * GetRect(double x, double z)
|
||||
{
|
||||
return &Rects[GetColFromX(x) / iNumSubRects][GetRowFromZ(z) / iNumSubRects];
|
||||
};
|
||||
TSubRect *__fastcall GetSubRect(double x, double z)
|
||||
TSubRect * GetSubRect(double x, double z)
|
||||
{
|
||||
return GetSubRect(GetColFromX(x), GetRowFromZ(z));
|
||||
};
|
||||
TSubRect *__fastcall FastGetSubRect(double x, double z)
|
||||
TSubRect * FastGetSubRect(double x, double z)
|
||||
{
|
||||
return FastGetSubRect(GetColFromX(x), GetRowFromZ(z));
|
||||
};
|
||||
TSubRect *__fastcall GetSubRect(int iCol, int iRow);
|
||||
TSubRect *__fastcall FastGetSubRect(int iCol, int iRow);
|
||||
TSubRect * GetSubRect(int iCol, int iRow);
|
||||
TSubRect * FastGetSubRect(int iCol, int iRow);
|
||||
int GetRowFromZ(double z)
|
||||
{
|
||||
return (z / fSubRectSize + fHalfTotalNumSubRects);
|
||||
@@ -381,8 +381,8 @@ class TGround
|
||||
{
|
||||
return (x / fSubRectSize + fHalfTotalNumSubRects);
|
||||
};
|
||||
TEvent *__fastcall FindEvent(const AnsiString &asEventName);
|
||||
TEvent *__fastcall FindEventScan(const AnsiString &asEventName);
|
||||
TEvent * FindEvent(const AnsiString &asEventName);
|
||||
TEvent * FindEventScan(const AnsiString &asEventName);
|
||||
void TrackJoin(TGroundNode *Current);
|
||||
|
||||
private:
|
||||
@@ -402,9 +402,9 @@ class TGround
|
||||
void WyslijPojazdy(int nr); // -> skladanie wielu pojazdow
|
||||
void WyslijObsadzone(); // -> skladanie wielu pojazdow
|
||||
void RadioStop(vector3 pPosition);
|
||||
TDynamicObject *__fastcall DynamicNearest(vector3 pPosition, double distance = 20.0,
|
||||
TDynamicObject * DynamicNearest(vector3 pPosition, double distance = 20.0,
|
||||
bool mech = false);
|
||||
TDynamicObject *__fastcall CouplerNearest(vector3 pPosition, double distance = 20.0,
|
||||
TDynamicObject * CouplerNearest(vector3 pPosition, double distance = 20.0,
|
||||
bool mech = false);
|
||||
void DynamicRemove(TDynamicObject *dyn);
|
||||
void TerrainRead(const AnsiString &f);
|
||||
|
||||
@@ -15,12 +15,12 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "Timer.h"
|
||||
#include "Globals.h"
|
||||
|
||||
__fastcall TMachajka::TMachajka() : TTrain()
|
||||
TMachajka::TMachajka() : TTrain()
|
||||
{
|
||||
TTrain::TTrain();
|
||||
}
|
||||
|
||||
__fastcall TMachajka::~TMachajka()
|
||||
TMachajka::~TMachajka()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
10
MdlMngr.cpp
10
MdlMngr.cpp
@@ -23,7 +23,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#define SeekFiles AnsiString("*.t3d")
|
||||
|
||||
TModel3d *__fastcall TMdlContainer::LoadModel(char *newName, bool dynamic)
|
||||
TModel3d * TMdlContainer::LoadModel(char *newName, bool dynamic)
|
||||
{ // wczytanie modelu do kontenerka
|
||||
SafeDeleteArray(Name);
|
||||
SafeDelete(Model);
|
||||
@@ -45,14 +45,14 @@ void TModelsManager::Init()
|
||||
Count = 0;
|
||||
}
|
||||
/*
|
||||
__fastcall TModelsManager::TModelsManager()
|
||||
TModelsManager::TModelsManager()
|
||||
{
|
||||
// Models= NULL;
|
||||
Models= new TMdlContainer[MAX_MODELS];
|
||||
Count= 0;
|
||||
};
|
||||
|
||||
__fastcall TModelsManager::~TModelsManager()
|
||||
TModelsManager::~TModelsManager()
|
||||
{
|
||||
Free();
|
||||
};
|
||||
@@ -62,7 +62,7 @@ void TModelsManager::Free()
|
||||
SafeDeleteArray(Models);
|
||||
}
|
||||
|
||||
TModel3d *__fastcall TModelsManager::LoadModel(char *Name, bool dynamic)
|
||||
TModel3d * TModelsManager::LoadModel(char *Name, bool dynamic)
|
||||
{ // wczytanie modelu do tablicy
|
||||
TModel3d *mdl = NULL;
|
||||
if (Count >= MAX_MODELS)
|
||||
@@ -76,7 +76,7 @@ TModel3d *__fastcall TModelsManager::LoadModel(char *Name, bool dynamic)
|
||||
return mdl;
|
||||
}
|
||||
|
||||
TModel3d *__fastcall TModelsManager::GetModel(const char *Name, bool dynamic)
|
||||
TModel3d * TModelsManager::GetModel(const char *Name, bool dynamic)
|
||||
{ // model mo¿e byæ we wpisie "node...model" albo "node...dynamic", a tak¿e byæ dodatkowym w dynamic
|
||||
// (kabina, wnêtrze, ³adunek)
|
||||
// dla "node...dynamic" mamy podan¹ œcie¿kê w "\dynamic\" i musi byæ co najmniej 1 poziom, zwkle
|
||||
|
||||
@@ -25,7 +25,7 @@ class TMdlContainer
|
||||
SafeDeleteArray(Name);
|
||||
SafeDelete(Model);
|
||||
};
|
||||
TModel3d *__fastcall LoadModel(char *newName, bool dynamic);
|
||||
TModel3d * LoadModel(char *newName, bool dynamic);
|
||||
TModel3d *Model;
|
||||
char *Name;
|
||||
};
|
||||
@@ -35,7 +35,7 @@ class TModelsManager
|
||||
private:
|
||||
static TMdlContainer *Models;
|
||||
static int Count;
|
||||
static TModel3d *__fastcall LoadModel(char *Name, bool dynamic);
|
||||
static TModel3d * LoadModel(char *Name, bool dynamic);
|
||||
|
||||
public:
|
||||
// TModelsManager();
|
||||
@@ -43,7 +43,7 @@ class TModelsManager
|
||||
static void Init();
|
||||
static void Free();
|
||||
// McZapkie: dodalem sciezke, notabene Path!=Patch :)
|
||||
static TModel3d *__fastcall GetModel(const char *Name, bool dynamic = false);
|
||||
static TModel3d * GetModel(const char *Name, bool dynamic = false);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,7 @@ class TMemCell
|
||||
void PutCommand(TController *Mech, vector3 *Loc);
|
||||
bool Compare(char *szTestText, double fTestValue1, double fTestValue2, int CheckMask);
|
||||
bool Render();
|
||||
inline char *__fastcall Text()
|
||||
inline char * Text()
|
||||
{
|
||||
return szText;
|
||||
};
|
||||
|
||||
14
Model3d.cpp
14
Model3d.cpp
@@ -657,7 +657,7 @@ int TSubModel::TriangleAdd(TModel3d *m, int tex, int tri)
|
||||
return s->iNumVerts - tri; // zwraca pozycjê tych trójk¹tów w submodelu
|
||||
};
|
||||
|
||||
float8 *__fastcall TSubModel::TrianglePtr(int tex, int pos, int *la, int *ld, int *ls)
|
||||
float8 * TSubModel::TrianglePtr(int tex, int pos, int *la, int *ld, int *ls)
|
||||
{ // zwraca wskaŸnik do wype³nienia tabeli wierzcho³ków, u¿ywane
|
||||
// przy tworzeniu E3D terenu
|
||||
TSubModel *s = this;
|
||||
@@ -959,12 +959,12 @@ struct ToLower
|
||||
}
|
||||
};
|
||||
|
||||
TSubModel *__fastcall TSubModel::GetFromName(AnsiString search, bool i)
|
||||
TSubModel * TSubModel::GetFromName(AnsiString search, bool i)
|
||||
{
|
||||
return GetFromName(search.c_str(), i);
|
||||
};
|
||||
|
||||
TSubModel *__fastcall TSubModel::GetFromName(char *search, bool i)
|
||||
TSubModel * TSubModel::GetFromName(char *search, bool i)
|
||||
{
|
||||
TSubModel *result;
|
||||
// std::transform(search.begin(),search.end(),search.begin(),ToLower());
|
||||
@@ -1724,7 +1724,7 @@ TModel3d::TModel3d()
|
||||
iNumVerts = 0; // nie ma jeszcze wierzcho³ków
|
||||
};
|
||||
/*
|
||||
__fastcall TModel3d::TModel3d(char *FileName)
|
||||
TModel3d::TModel3d(char *FileName)
|
||||
{
|
||||
// Root=NULL;
|
||||
// Materials=NULL;
|
||||
@@ -1752,7 +1752,7 @@ TModel3d::~TModel3d()
|
||||
// póŸniej siê jeszcze usuwa obiekt z którego dziedziczymy tabelê VBO
|
||||
};
|
||||
|
||||
TSubModel *__fastcall TModel3d::AddToNamed(const char *Name, TSubModel *SubModel)
|
||||
TSubModel * TModel3d::AddToNamed(const char *Name, TSubModel *SubModel)
|
||||
{
|
||||
TSubModel *sm = Name ? GetFromName(Name) : NULL;
|
||||
AddTo(sm, SubModel); // szukanie nadrzêdnego
|
||||
@@ -1776,7 +1776,7 @@ void TModel3d::AddTo(TSubModel *tmp, TSubModel *SubModel)
|
||||
iFlags |= 0x0200; // submodele s¹ oddzielne
|
||||
};
|
||||
|
||||
TSubModel *__fastcall TModel3d::GetFromName(const char *sName)
|
||||
TSubModel * TModel3d::GetFromName(const char *sName)
|
||||
{ // wyszukanie submodelu po nazwie
|
||||
if (!sName)
|
||||
return Root; // potrzebne do terenu z E3D
|
||||
@@ -2347,7 +2347,7 @@ int TModel3d::TerrainCount()
|
||||
}
|
||||
return i;
|
||||
};
|
||||
TSubModel *__fastcall TModel3d::TerrainSquare(int n)
|
||||
TSubModel * TModel3d::TerrainSquare(int n)
|
||||
{ // pobieranie wskaŸnika do submodelu (n)
|
||||
int i = 0;
|
||||
TSubModel *r = Root;
|
||||
|
||||
22
Model3d.h
22
Model3d.h
@@ -262,16 +262,16 @@ class TSubModel
|
||||
int Load(cParser &Parser, TModel3d *Model, int Pos, bool dynamic);
|
||||
void ChildAdd(TSubModel *SubModel);
|
||||
void NextAdd(TSubModel *SubModel);
|
||||
TSubModel *__fastcall NextGet()
|
||||
TSubModel * NextGet()
|
||||
{
|
||||
return Next;
|
||||
};
|
||||
TSubModel *__fastcall ChildGet()
|
||||
TSubModel * ChildGet()
|
||||
{
|
||||
return Child;
|
||||
};
|
||||
int TriangleAdd(TModel3d *m, int tex, int tri);
|
||||
float8 *__fastcall TrianglePtr(int tex, int pos, int *la, int *ld, int *ls);
|
||||
float8 * TrianglePtr(int tex, int pos, int *la, int *ld, int *ls);
|
||||
// float8* TrianglePtr(const char *tex,int tri);
|
||||
// void SetRotate(vector3 vNewRotateAxis,float fNewAngle);
|
||||
void SetRotate(float3 vNewRotateAxis, float fNewAngle);
|
||||
@@ -280,14 +280,14 @@ class TSubModel
|
||||
void SetTranslate(vector3 vNewTransVector);
|
||||
void SetTranslate(float3 vNewTransVector);
|
||||
void SetRotateIK1(float3 vNewAngles);
|
||||
TSubModel *__fastcall GetFromName(AnsiString search, bool i = true);
|
||||
TSubModel *__fastcall GetFromName(char *search, bool i = true);
|
||||
TSubModel * GetFromName(AnsiString search, bool i = true);
|
||||
TSubModel * GetFromName(char *search, bool i = true);
|
||||
void RenderDL();
|
||||
void RenderAlphaDL();
|
||||
void RenderVBO();
|
||||
void RenderAlphaVBO();
|
||||
// inline matrix4x4* GetMatrix() {return dMatrix;};
|
||||
inline float4x4 *__fastcall GetMatrix()
|
||||
inline float4x4 * GetMatrix()
|
||||
{
|
||||
return fMatrix;
|
||||
};
|
||||
@@ -390,7 +390,7 @@ class TModel3d : public CMesh
|
||||
int iSubModelsCount; // Ra: używane do tworzenia binarnych
|
||||
AnsiString asBinary; // nazwa pod którą zapisać model binarny
|
||||
public:
|
||||
inline TSubModel *__fastcall GetSMRoot()
|
||||
inline TSubModel * GetSMRoot()
|
||||
{
|
||||
return (Root);
|
||||
};
|
||||
@@ -398,9 +398,9 @@ class TModel3d : public CMesh
|
||||
TModel3d();
|
||||
TModel3d(char *FileName);
|
||||
~TModel3d();
|
||||
TSubModel *__fastcall GetFromName(const char *sName);
|
||||
TSubModel * GetFromName(const char *sName);
|
||||
// TMaterial* GetMaterialFromName(char *sName);
|
||||
TSubModel *__fastcall AddToNamed(const char *Name, TSubModel *SubModel);
|
||||
TSubModel * AddToNamed(const char *Name, TSubModel *SubModel);
|
||||
void AddTo(TSubModel *tmp, TSubModel *SubModel);
|
||||
void LoadFromTextFile(char *FileName, bool dynamic);
|
||||
void LoadFromBinFile(char *FileName, bool dynamic);
|
||||
@@ -438,12 +438,12 @@ class TModel3d : public CMesh
|
||||
return iFlags;
|
||||
};
|
||||
void Init();
|
||||
char *__fastcall NameGet()
|
||||
char * NameGet()
|
||||
{
|
||||
return Root ? Root->pName : NULL;
|
||||
};
|
||||
int TerrainCount();
|
||||
TSubModel *__fastcall TerrainSquare(int n);
|
||||
TSubModel * TerrainSquare(int n);
|
||||
void TerrainRenderVBO(int n);
|
||||
};
|
||||
|
||||
|
||||
2
Mover.h
2
Mover.h
@@ -169,7 +169,7 @@ class TMoverParameters : public T_MoverParameters
|
||||
// &Track, const
|
||||
// TLocation &NewLoc, TRotation &NewRot);
|
||||
// bool ChangeOffsetH(double DeltaOffset);
|
||||
//__fastcall T_MoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit,
|
||||
// T_MoverParameters(double VelInitial, AnsiString TypeNameInit, AnsiString NameInit,
|
||||
// int LoadInitial
|
||||
// , AnsiString LoadTypeInitial, int Cab);
|
||||
// bool LoadChkFile(AnsiString chkpath);
|
||||
|
||||
@@ -69,13 +69,13 @@ void ItemRecord::ListGet(ItemRecord *r, int *&n)
|
||||
rNext->ListGet(r, n); // dodanie wszystkich późniejszych
|
||||
};
|
||||
|
||||
void *__fastcall ItemRecord::TreeFind(const char *n)
|
||||
void * ItemRecord::TreeFind(const char *n)
|
||||
{ // wyszukanie ciągu (n)
|
||||
ItemRecord *r = TreeFindRecord(n);
|
||||
return r ? r->pData : NULL;
|
||||
};
|
||||
|
||||
ItemRecord *__fastcall ItemRecord::TreeFindRecord(const char *n)
|
||||
ItemRecord * ItemRecord::TreeFindRecord(const char *n)
|
||||
{ // wyszukanie ciągu (n)
|
||||
ItemRecord *r = this; //żeby nie robić rekurencji
|
||||
int i = 0;
|
||||
@@ -147,7 +147,7 @@ bool TNames::Update(int t, const char *n, void *d)
|
||||
return false; // został dodany nowy
|
||||
};
|
||||
|
||||
ItemRecord *__fastcall TNames::TreeSet(int *n, int d, int u)
|
||||
ItemRecord * TNames::TreeSet(int *n, int d, int u)
|
||||
{ // rekurencyjne wypełnianie drzewa pozycjami od (d) do (u)
|
||||
if (d == u)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ void TNames::Sort(int t)
|
||||
return;
|
||||
};
|
||||
|
||||
ItemRecord *__fastcall TNames::FindRecord(const int t, const char *n)
|
||||
ItemRecord * TNames::FindRecord(const int t, const char *n)
|
||||
{ // poszukiwanie rekordu w celu np. zmiany wskaźnika
|
||||
return rTypes[t] ? rTypes[t]->TreeFindRecord(n) : NULL;
|
||||
};
|
||||
|
||||
10
Names.h
10
Names.h
@@ -34,8 +34,8 @@ class ItemRecord
|
||||
{
|
||||
pData = (void *)x;
|
||||
};
|
||||
void *__fastcall TreeFind(const char *n);
|
||||
ItemRecord *__fastcall TreeFindRecord(const char *n);
|
||||
void * TreeFind(const char *n);
|
||||
ItemRecord * TreeFindRecord(const char *n);
|
||||
};
|
||||
|
||||
class TNames
|
||||
@@ -54,14 +54,14 @@ class TNames
|
||||
int Add(int t, const char *n, int d); // dodanie obiektu z numerem
|
||||
bool Update(int t, const char *n, void *d); // dodanie jeœli nie ma, wymiana (d), gdy jest
|
||||
void TreeSet();
|
||||
ItemRecord *__fastcall TreeSet(int *n, int d, int u);
|
||||
ItemRecord * TreeSet(int *n, int d, int u);
|
||||
void Sort(int t); // przebudowa drzewa typu (t)
|
||||
ItemRecord *__fastcall Item(int n); // rekord o numerze (n)
|
||||
ItemRecord * Item(int n); // rekord o numerze (n)
|
||||
inline void *Find(const int t, const char *n)
|
||||
{
|
||||
return rTypes[t] ? rTypes[t]->TreeFind(n) : NULL;
|
||||
};
|
||||
ItemRecord *__fastcall FindRecord(const int t, const char *n);
|
||||
ItemRecord * FindRecord(const int t, const char *n);
|
||||
// template <typename TOut> inline TOut* Find(const int t,const char *n)
|
||||
//{return (TOut*)(rTypes[t]->TreeFind(n));};
|
||||
};
|
||||
|
||||
@@ -182,7 +182,7 @@ void TSoundsManager::Free()
|
||||
SAFE_RELEASE(pDS);
|
||||
};
|
||||
|
||||
TSoundContainer *__fastcall TSoundsManager::LoadFromFile(char *Dir, char *Name, int Concurrent)
|
||||
TSoundContainer * TSoundsManager::LoadFromFile(char *Dir, char *Name, int Concurrent)
|
||||
{
|
||||
TSoundContainer *Tmp = First;
|
||||
First = new TSoundContainer(pDS, Dir, Name, Concurrent);
|
||||
@@ -303,7 +303,7 @@ void TSoundsManager::RestoreAll()
|
||||
};
|
||||
|
||||
// void TSoundsManager::Init(char *Name, int Concurrent)
|
||||
//__fastcall TSoundsManager::TSoundsManager(HWND hWnd)
|
||||
// TSoundsManager::TSoundsManager(HWND hWnd)
|
||||
// void TSoundsManager::Init(HWND hWnd, char *NDirectory)
|
||||
|
||||
void TSoundsManager::Init(HWND hWnd)
|
||||
|
||||
2
Sound.h
2
Sound.h
@@ -51,7 +51,7 @@ class TSoundsManager
|
||||
// static char Directory[80];
|
||||
static int Count;
|
||||
static TSoundContainer *First;
|
||||
static TSoundContainer *__fastcall LoadFromFile(char *Dir, char *Name, int Concurrent);
|
||||
static TSoundContainer * LoadFromFile(char *Dir, char *Name, int Concurrent);
|
||||
|
||||
public:
|
||||
// TSoundsManager(HWND hWnd);
|
||||
|
||||
14
Spline.cpp
14
Spline.cpp
@@ -47,7 +47,7 @@ float CurveLength(vector3 p1, vector3 cp1, vector3 cp2, vector3 p2)
|
||||
return (l);
|
||||
}
|
||||
|
||||
__fastcall TKnot::TKnot()
|
||||
TKnot::TKnot()
|
||||
{
|
||||
Next = Prev = NULL;
|
||||
Length = -1;
|
||||
@@ -58,7 +58,7 @@ __fastcall TKnot::TKnot()
|
||||
bSwitchDirectionBackward = false;
|
||||
}
|
||||
|
||||
__fastcall TKnot::TKnot(int n)
|
||||
TKnot::TKnot(int n)
|
||||
{
|
||||
bSwitchDirectionForward = false;
|
||||
bSwitchDirectionBackward = false;
|
||||
@@ -73,7 +73,7 @@ __fastcall TKnot::TKnot(int n)
|
||||
}
|
||||
}
|
||||
|
||||
__fastcall TKnot::~TKnot()
|
||||
TKnot::~TKnot()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ float TKnot::RombergIntegral(float fA, float fB)
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
__fastcall TSpline::TSpline()
|
||||
TSpline::TSpline()
|
||||
{
|
||||
// Closed= true;
|
||||
// asName= "foo";
|
||||
@@ -252,7 +252,7 @@ __fastcall TSpline::TSpline()
|
||||
// Next=Prev= this;
|
||||
}
|
||||
|
||||
__fastcall TSpline::TSpline(AnsiString asNName)
|
||||
TSpline::TSpline(AnsiString asNName)
|
||||
{
|
||||
// Closed= true;
|
||||
// asName= asNName;
|
||||
@@ -263,7 +263,7 @@ __fastcall TSpline::TSpline(AnsiString asNName)
|
||||
// Next=Prev= this;
|
||||
}
|
||||
|
||||
__fastcall TSpline::~TSpline()
|
||||
TSpline::~TSpline()
|
||||
{
|
||||
// if (KnotsAllocated)
|
||||
// SafeDeleteArray(Knots);
|
||||
@@ -473,7 +473,7 @@ vector3 TSpline::GetCenter()
|
||||
pt /= iNumKnots;
|
||||
}
|
||||
|
||||
TKnot *__fastcall TSpline::GetLastKnot()
|
||||
TKnot * TSpline::GetLastKnot()
|
||||
{
|
||||
TKnot *ck;
|
||||
ck = RootKnot;
|
||||
|
||||
2
Spline.h
2
Spline.h
@@ -74,7 +74,7 @@ class TSpline
|
||||
int Load(TQueryParserComp *Parser, AnsiString asEndString = "endspline");
|
||||
float GetLength();
|
||||
vector3 GetCenter();
|
||||
TKnot *__fastcall GetLastKnot();
|
||||
TKnot * GetLastKnot();
|
||||
bool Render();
|
||||
|
||||
// inline int NextIndex(int n) { return (n<KnotsCount-1 ? n+1 : 0); };
|
||||
|
||||
10
Track.cpp
10
Track.cpp
@@ -115,7 +115,7 @@ TIsolated::~TIsolated(){
|
||||
*/
|
||||
};
|
||||
|
||||
TIsolated *__fastcall TIsolated::Find(const AnsiString &n)
|
||||
TIsolated * TIsolated::Find(const AnsiString &n)
|
||||
{ // znalezienie obiektu albo utworzenie nowego
|
||||
TIsolated *p = pRoot;
|
||||
while (p)
|
||||
@@ -248,7 +248,7 @@ void TTrack::Init()
|
||||
}
|
||||
}
|
||||
|
||||
TTrack *__fastcall TTrack::Create400m(int what, double dx)
|
||||
TTrack * TTrack::Create400m(int what, double dx)
|
||||
{ // tworzenie toru do wstawiania taboru podczas konwersji na E3D
|
||||
TGroundNode *tmp = new TGroundNode(TP_TRACK); // node
|
||||
TTrack *trk = tmp->pTrack;
|
||||
@@ -264,7 +264,7 @@ TTrack *__fastcall TTrack::Create400m(int what, double dx)
|
||||
return trk;
|
||||
};
|
||||
|
||||
TTrack *__fastcall TTrack::NullCreate(int dir)
|
||||
TTrack * TTrack::NullCreate(int dir)
|
||||
{ // tworzenie toru wykolejającego od strony (dir), albo pętli dla samochodów
|
||||
TGroundNode *tmp = new TGroundNode(TP_TRACK), *tmp2 = NULL; // node
|
||||
TTrack *trk = tmp->pTrack; // tor; UWAGA! obrotnica może generować duże ilości tego
|
||||
@@ -2828,7 +2828,7 @@ void TTrack::RaAnimListAdd(TTrack *t)
|
||||
}
|
||||
};
|
||||
|
||||
TTrack *__fastcall TTrack::RaAnimate()
|
||||
TTrack * TTrack::RaAnimate()
|
||||
{ // wykonanie rekurencyjne animacji, wywoływane przed wyświetleniem sektora
|
||||
// zwraca wskaźnik toru wymagającego dalszej animacji
|
||||
if (SwitchExtension->pNextAnim)
|
||||
@@ -3146,7 +3146,7 @@ void TTrack::ConnectionsLog()
|
||||
}
|
||||
};
|
||||
|
||||
TTrack *__fastcall TTrack::Neightbour(int s, double &d)
|
||||
TTrack * TTrack::Neightbour(int s, double &d)
|
||||
{ // zwraca wskaźnik na sąsiedni tor, w kierunku określonym znakiem (s), odwraca (d) w razie
|
||||
// niezgodności kierunku torów
|
||||
TTrack *t; // nie zmieniamy kierunku (d), jeśli nie ma toru dalej
|
||||
|
||||
20
Track.h
20
Track.h
@@ -108,18 +108,18 @@ class TIsolated
|
||||
TIsolated();
|
||||
TIsolated(const AnsiString &n, TIsolated *i);
|
||||
~TIsolated();
|
||||
static TIsolated *__fastcall Find(
|
||||
static TIsolated * Find(
|
||||
const AnsiString &n); // znalezienie obiektu albo utworzenie nowego
|
||||
void Modify(int i, TDynamicObject *o); // dodanie lub odjęcie osi
|
||||
bool Busy()
|
||||
{
|
||||
return (iAxles > 0);
|
||||
};
|
||||
static TIsolated *__fastcall Root()
|
||||
static TIsolated * Root()
|
||||
{
|
||||
return (pRoot);
|
||||
};
|
||||
TIsolated *__fastcall Next()
|
||||
TIsolated * Next()
|
||||
{
|
||||
return (pNext);
|
||||
};
|
||||
@@ -192,8 +192,8 @@ class TTrack : public Resource
|
||||
TTrack(TGroundNode *g);
|
||||
~TTrack();
|
||||
void Init();
|
||||
static TTrack *__fastcall Create400m(int what, double dx);
|
||||
TTrack *__fastcall NullCreate(int dir);
|
||||
static TTrack * Create400m(int what, double dx);
|
||||
TTrack * NullCreate(int dir);
|
||||
inline bool IsEmpty()
|
||||
{
|
||||
return (iNumDynamics <= 0);
|
||||
@@ -206,19 +206,19 @@ class TTrack : public Resource
|
||||
{
|
||||
return Segment->GetLength();
|
||||
};
|
||||
inline TSegment *__fastcall CurrentSegment()
|
||||
inline TSegment * CurrentSegment()
|
||||
{
|
||||
return Segment;
|
||||
};
|
||||
inline TTrack *__fastcall CurrentNext()
|
||||
inline TTrack * CurrentNext()
|
||||
{
|
||||
return (trNext);
|
||||
};
|
||||
inline TTrack *__fastcall CurrentPrev()
|
||||
inline TTrack * CurrentPrev()
|
||||
{
|
||||
return (trPrev);
|
||||
};
|
||||
TTrack *__fastcall Neightbour(int s, double &d);
|
||||
TTrack * Neightbour(int s, double &d);
|
||||
bool SetConnections(int i);
|
||||
bool Switch(int i, double t = -1.0, double d = -1.0);
|
||||
bool SwitchForced(int i, TDynamicObject *o);
|
||||
@@ -257,7 +257,7 @@ class TTrack : public Resource
|
||||
void RaAssign(TGroundNode *gn, TAnimContainer *ac);
|
||||
void RaAssign(TGroundNode *gn, TAnimModel *am, TEvent *done, TEvent *joined);
|
||||
void RaAnimListAdd(TTrack *t);
|
||||
TTrack *__fastcall RaAnimate();
|
||||
TTrack * RaAnimate();
|
||||
|
||||
void RadioStop();
|
||||
void AxleCounter(int i, TDynamicObject *o)
|
||||
|
||||
@@ -95,7 +95,7 @@ TCab::~TCab()
|
||||
delete[] btList;
|
||||
};
|
||||
|
||||
TGauge *__fastcall TCab::Gauge(int n)
|
||||
TGauge * TCab::Gauge(int n)
|
||||
{ // pobranie adresu obiektu aniomowanego ruchem
|
||||
if (n < 0)
|
||||
{ // rezerwacja wolnego
|
||||
@@ -106,7 +106,7 @@ TGauge *__fastcall TCab::Gauge(int n)
|
||||
return ggList + n;
|
||||
return NULL;
|
||||
};
|
||||
TButton *__fastcall TCab::Button(int n)
|
||||
TButton * TCab::Button(int n)
|
||||
{ // pobranie adresu obiektu animowanego wyborem 1 z 2
|
||||
if (n < 0)
|
||||
{ // rezerwacja wolnego
|
||||
|
||||
8
Train.h
8
Train.h
@@ -62,8 +62,8 @@ class TCab
|
||||
TButton *btList; // Ra 2014-08: lista animacji dwustanowych (lampek) w kabinie
|
||||
int iButtonsMax, iButtons; // ile miejsca w tablicy i ile jest w u篡ciu
|
||||
public:
|
||||
TGauge *__fastcall Gauge(int n = -1); // pobranie adresu obiektu
|
||||
TButton *__fastcall Button(int n = -1); // pobranie adresu obiektu
|
||||
TGauge * Gauge(int n = -1); // pobranie adresu obiektu
|
||||
TButton * Button(int n = -1); // pobranie adresu obiektu
|
||||
void Update();
|
||||
};
|
||||
|
||||
@@ -410,11 +410,11 @@ class TTrain
|
||||
{
|
||||
return iRadioChannel;
|
||||
};
|
||||
inline TDynamicObject *__fastcall Dynamic()
|
||||
inline TDynamicObject * Dynamic()
|
||||
{
|
||||
return DynamicObject;
|
||||
};
|
||||
inline TMoverParameters *__fastcall Controlled()
|
||||
inline TMoverParameters * Controlled()
|
||||
{
|
||||
return mvControlled;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ bool TTrackFollower::Init(TTrack *pTrack, TDynamicObject *NewOwner, double fDir)
|
||||
return true;
|
||||
}
|
||||
|
||||
TTrack *__fastcall TTrackFollower::SetCurrentTrack(TTrack *pTrack, int end)
|
||||
TTrack * TTrackFollower::SetCurrentTrack(TTrack *pTrack, int end)
|
||||
{ // przejechanie na inny odcinkek toru, z ewentualnym rozpruciem
|
||||
if (pTrack)
|
||||
switch (pTrack->eType)
|
||||
|
||||
@@ -33,9 +33,9 @@ class TTrackFollower
|
||||
vector3 vAngles; // x:przechy³ka, y:pochylenie, z:kierunek w planie (w radianach)
|
||||
TTrackFollower();
|
||||
~TTrackFollower();
|
||||
TTrack *__fastcall SetCurrentTrack(TTrack *pTrack, int end);
|
||||
TTrack * SetCurrentTrack(TTrack *pTrack, int end);
|
||||
bool Move(double fDistance, bool bPrimary);
|
||||
inline TTrack *__fastcall GetTrack()
|
||||
inline TTrack * GetTrack()
|
||||
{
|
||||
return pCurrentTrack;
|
||||
};
|
||||
|
||||
16
geometry.cpp
16
geometry.cpp
@@ -16,15 +16,15 @@ inline double sqr(double a)
|
||||
return (a * a);
|
||||
};
|
||||
|
||||
__fastcall TLine::TLine(){};
|
||||
TLine::TLine(){};
|
||||
|
||||
__fastcall TLine::TLine(vector3 NPoint, vector3 NVector)
|
||||
TLine::TLine(vector3 NPoint, vector3 NVector)
|
||||
{
|
||||
Vector = NVector;
|
||||
Point = NPoint;
|
||||
};
|
||||
|
||||
__fastcall TLine::~TLine(){};
|
||||
TLine::~TLine(){};
|
||||
|
||||
TPlane TLine::GetPlane()
|
||||
{
|
||||
@@ -42,31 +42,31 @@ double TLine::GetDistance(vector3 Point1)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
__fastcall TPlane::TPlane()
|
||||
TPlane::TPlane()
|
||||
{
|
||||
Vector = vector3(0, 0, 0);
|
||||
d = 0;
|
||||
};
|
||||
|
||||
__fastcall TPlane::TPlane(vector3 NVector, double nd)
|
||||
TPlane::TPlane(vector3 NVector, double nd)
|
||||
{
|
||||
Vector = NVector;
|
||||
d = nd;
|
||||
}
|
||||
|
||||
__fastcall TPlane::TPlane(vector3 Point, vector3 NVector)
|
||||
TPlane::TPlane(vector3 Point, vector3 NVector)
|
||||
{
|
||||
Vector = NVector;
|
||||
d = -NVector.x * Point.x - NVector.y * Point.y - NVector.z * Point.z;
|
||||
};
|
||||
|
||||
__fastcall TPlane::TPlane(vector3 Point1, vector3 Vector1, vector3 Vector2)
|
||||
TPlane::TPlane(vector3 Point1, vector3 Vector1, vector3 Vector2)
|
||||
{
|
||||
Vector = CrossProduct(Vector1, Vector2);
|
||||
d = -Vector.x * Point1.x - Vector.y * Point1.y - Vector.z * Point1.z;
|
||||
};
|
||||
|
||||
__fastcall TPlane::~TPlane(){};
|
||||
TPlane::~TPlane(){};
|
||||
|
||||
void TPlane::Normalize()
|
||||
{
|
||||
|
||||
@@ -272,8 +272,8 @@ typedef Py_intptr_t Py_ssize_t;
|
||||
/* ignore warnings if the compiler decides not to inline a function */
|
||||
#pragma warning(disable: 4710)
|
||||
/* fastest possible local call under MSVC */
|
||||
#define Py_LOCAL(type) static type __fastcall
|
||||
#define Py_LOCAL_INLINE(type) static __inline type __fastcall
|
||||
#define Py_LOCAL(type) static type
|
||||
#define Py_LOCAL_INLINE(type) static __inline type
|
||||
#elif defined(USE_INLINE)
|
||||
#define Py_LOCAL(type) static type
|
||||
#define Py_LOCAL_INLINE(type) static inline type
|
||||
|
||||
Reference in New Issue
Block a user