mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 18:19:19 +02:00
partial replacement of char arrays with std::string; minor updates, fixes and cleanup of mctools
This commit is contained in:
21
MemCell.h
21
MemCell.h
@@ -19,7 +19,11 @@ class TMemCell
|
||||
{
|
||||
private:
|
||||
vector3 vPosition;
|
||||
#ifdef EU07_USE_OLD_TMEMCELL_TEXT_ARRAY
|
||||
char *szText;
|
||||
#else
|
||||
std::string szText;
|
||||
#endif
|
||||
double fValue1;
|
||||
double fValue2;
|
||||
TCommandType eCommand;
|
||||
@@ -29,17 +33,30 @@ class TMemCell
|
||||
string
|
||||
asTrackName; // McZapkie-100302 - zeby nazwe toru na ktory jest Putcommand wysylane pamietac
|
||||
TMemCell(vector3 *p);
|
||||
#ifdef EU07_USE_OLD_TMEMCELL_TEXT_ARRAY
|
||||
~TMemCell();
|
||||
#endif
|
||||
void Init();
|
||||
void UpdateValues(char *szNewText, double fNewValue1, double fNewValue2, int CheckMask);
|
||||
#ifdef EU07_USE_OLD_TMEMCELL_TEXT_ARRAY
|
||||
void UpdateValues( char const *szNewText, double const fNewValue1, double const fNewValue2, int const CheckMask );
|
||||
#else
|
||||
void UpdateValues( std::string const &szNewText, double const fNewValue1, double const fNewValue2, int const CheckMask );
|
||||
#endif
|
||||
bool Load(cParser *parser);
|
||||
void PutCommand(TController *Mech, vector3 *Loc);
|
||||
bool Compare(char *szTestText, double fTestValue1, double fTestValue2, int CheckMask);
|
||||
bool Compare( char const *szTestText, double const fTestValue1, double const fTestValue2, int const CheckMask );
|
||||
#ifndef EU07_USE_OLD_TMEMCELL_TEXT_ARRAY
|
||||
bool Compare( std::string const &szTestText, double const fTestValue1, double const fTestValue2, int const CheckMask );
|
||||
#endif
|
||||
bool Render();
|
||||
#ifdef EU07_USE_OLD_TMEMCELL_TEXT_ARRAY
|
||||
inline char * Text()
|
||||
{
|
||||
return szText;
|
||||
};
|
||||
#else
|
||||
inline std::string const &Text() { return szText; }
|
||||
#endif
|
||||
inline double Value1()
|
||||
{
|
||||
return fValue1;
|
||||
|
||||
Reference in New Issue
Block a user