summaryrefslogtreecommitdiffstats
path: root/src/CBot/tests
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-08-11 20:59:35 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-08-11 20:59:35 +0200
commita9186d19609c61c369d881cdbc40cc8973cf883d (patch)
treef55d4b999b036702780f0aa8b91ddeb1fb23d186 /src/CBot/tests
parent7b03a6a2acb9c7ddbae663b27be4b223f984cfcd (diff)
downloadcolobot-a9186d19609c61c369d881cdbc40cc8973cf883d.tar.gz
colobot-a9186d19609c61c369d881cdbc40cc8973cf883d.tar.bz2
colobot-a9186d19609c61c369d881cdbc40cc8973cf883d.zip
Changed GivAttrName() to GetAttrName()
Diffstat (limited to 'src/CBot/tests')
-rw-r--r--src/CBot/tests/CBot_console/src/app/CBotConsole.cpp14
-rw-r--r--src/CBot/tests/CBot_console/src/app/CBotDoc.cpp10
-rw-r--r--src/CBot/tests/CBot_console/src/app/CClass.cpp16
-rw-r--r--src/CBot/tests/CBot_console/src/app/routines.cpp36
4 files changed, 38 insertions, 38 deletions
diff --git a/src/CBot/tests/CBot_console/src/app/CBotConsole.cpp b/src/CBot/tests/CBot_console/src/app/CBotConsole.cpp
index a4a90ae..e9209d3 100644
--- a/src/CBot/tests/CBot_console/src/app/CBotConsole.cpp
+++ b/src/CBot/tests/CBot_console/src/app/CBotConsole.cpp
@@ -50,7 +50,7 @@ uint ThreadProc(ThreadInfo *info)
int level = 0;
do
{
- CBotVar* t = info->m_pProg->GivStackVars(FN, level--);
+ CBotVar* t = info->m_pProg->GetStackVars(FN, level--);
if ( FN != FunctionName ) break;
if ( t != NULL )
{
@@ -59,8 +59,8 @@ uint ThreadProc(ThreadInfo *info)
{
if (s.IsEmpty()) s+= "Stack -> ";
else s+= " , ";
- s += t->GivValString();
- t = t->GivNext();
+ s += t->GetValString();
+ t = t->GetNext();
}
AfxMessageBox(s);
}
@@ -75,7 +75,7 @@ uint ThreadProc(ThreadInfo *info)
{
std::cout << "\nInterrupt\n";
}
- else if (info->m_pProg->GivError() == 0)
+ else if (info->m_pProg->GetError() == 0)
{
time(&t1);
double prog_time = difftime(t0,t1);
@@ -98,7 +98,7 @@ long CBotConsole::EndProg()
if (m_pProg->GetError(m_code, m_start, m_end))
{
CBotString TextError;
- TextError = CBotProgram::GivErrorText(m_code);
+ TextError = CBotProgram::GetErrorText(m_code);
std::cout << TextError;
return 1;
}
@@ -125,7 +125,7 @@ void CBotConsole::OnOK()
if ( m_pProg->GetError(err, start, end) )
{
CBotString TextError;
- TextError = CBotProgram::GivErrorText(err);
+ TextError = CBotProgram::GetErrorText(err);
std::cout << TextError;
return;
}
@@ -162,7 +162,7 @@ bool CBotConsole::OnInitDialog()
// CDialog::OnInitDialog();
std::cout << "Following functions are availible:\n";
- for ( int i = 0; i < m_pListe->GivSize(); i++ )
+ for ( int i = 0; i < m_pListe->GetSize(); i++ )
{
CBotString x = (*m_pListe)[i] + CBotString("\n");
std::cout << x;
diff --git a/src/CBot/tests/CBot_console/src/app/CBotDoc.cpp b/src/CBot/tests/CBot_console/src/app/CBotDoc.cpp
index ad90da2..1c694c9 100644
--- a/src/CBot/tests/CBot_console/src/app/CBotDoc.cpp
+++ b/src/CBot/tests/CBot_console/src/app/CBotDoc.cpp
@@ -46,18 +46,18 @@ void CBotDoc::OnRun()
delete m_pProg;
m_pProg = NULL;
- TextError = CBotProgram::GivErrorText( code );
+ TextError = CBotProgram::GetErrorText( code );
std::cout << TextError << std::endl;
return;
}
- if( m_Liste.GivSize() == 0 )
+ if( m_Liste.GetSize() == 0 )
{
std::cout << "No function marked \"extern\" !\n";
return;
}
- for ( int i = 0; i < m_Liste.GivSize(); i++ )
+ for ( int i = 0; i < m_Liste.GetSize(); i++ )
{
int start, stop;
m_pProg->GetPosition(m_Liste[i], start, stop, GetPosNom, GetPosParam);
@@ -76,7 +76,7 @@ void CBotDoc::OnRun()
// {
// std::string TextError;
//
-// TextError = m_pProg->GivErrorText( dlg.m_code );
+// TextError = m_pProg->GetErrorText( dlg.m_code );
//
// std::cout <<TextError;
// }
@@ -105,7 +105,7 @@ bool CBotDoc::Compile()
// m_pEdit->SetSel( start, end );
// m_pEdit->SetFocus(); // higlights part of problem
- TextError = CBotProgram::GivErrorText( code );
+ TextError = CBotProgram::GetErrorText( code );
std::cout << TextError ;
return false;
diff --git a/src/CBot/tests/CBot_console/src/app/CClass.cpp b/src/CBot/tests/CBot_console/src/app/CClass.cpp
index 414c1e4..9b7c842 100644
--- a/src/CBot/tests/CBot_console/src/app/CClass.cpp
+++ b/src/CBot/tests/CBot_console/src/app/CClass.cpp
@@ -6,20 +6,20 @@ void rMajObject( CBotVar* pThis, void* pUser )
{
if (!pThis->IsElemOfClass("object"))
return ;
- CBotVar* pPos = pThis->GivItem("position");
- CBotVar* pX = pPos->GivItem("x");
- CBotVar* pY = pPos->GivItem("y");
- CBotVar* pZ = pPos->GivItem("z");
-// CBotVar* pPt = pThis->GivItem("transport");
+ CBotVar* pPos = pThis->GetItem("position");
+ CBotVar* pX = pPos->GetItem("x");
+ CBotVar* pY = pPos->GetItem("y");
+ CBotVar* pZ = pPos->GetItem("z");
+// CBotVar* pPt = pThis->GetItem("transport");
- CBotString p = pX->GivValString();
+ CBotString p = pX->GetValString();
// pX->SetValFloat( pUser == (void*)1 ? (float)12.5 : (float)44.4 );
pZ->SetValFloat( (float)0 );
pY->SetValFloat( (float)-3.33 );
- pX->SetValFloat( pX->GivValFloat() + 10 ) ;
+ pX->SetValFloat( pX->GetValFloat() + 10 ) ;
-// pX = pThis->GivItem( "xx" );
+// pX = pThis->GetItem( "xx" );
// pX->SetValFloat( (float)22 );
// crée une instance sur une classe object
diff --git a/src/CBot/tests/CBot_console/src/app/routines.cpp b/src/CBot/tests/CBot_console/src/app/routines.cpp
index 54355c7..8b8a1d4 100644
--- a/src/CBot/tests/CBot_console/src/app/routines.cpp
+++ b/src/CBot/tests/CBot_console/src/app/routines.cpp
@@ -33,16 +33,16 @@ bool rShow( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
{
string::string ss;
- ss.LoadString( TX_TYPENAMES + pVar->GivType() );
+ ss.LoadString( TX_TYPENAMES + pVar->GetType() );
s += ss + " ";
- ss = pVar->GivName();
+ ss = pVar->GetName();
if (ss.IsEmpty()) ss = "<sans nom>";
s += ss + " = ";
- s += pVar->GivValString();
+ s += pVar->GetValString();
s += "\n";
- pVar = pVar->GivNext();
+ pVar = pVar->GetNext();
}
AfxMessageBox(s, MB_OK|MB_ICONINFORMATION);
@@ -70,8 +70,8 @@ bool rPrintLn( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
while ( pVar != NULL )
{
if ( !s.empty() ) s += " ";
- s += pVar->GivValString();
- pVar = pVar->GivNext();
+ s += pVar->GetValString();
+ pVar = pVar->GetNext();
}
s += "\n";
@@ -85,8 +85,8 @@ bool rPrint( CBotVar* pVar, CBotVar* pResult, int& Exception, void* pUser )
while ( pVar != NULL )
{
if ( !s.empty() ) s += " ";
- s += pVar->GivValString();
- pVar = pVar->GivNext();
+ s += pVar->GetValString();
+ pVar = pVar->GetNext();
}
s += " ";
std::cout << s;
@@ -107,13 +107,13 @@ bool rCPoint( CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception )
{
if ( pVar == NULL )return true; // constructor with no parameters is ok
- CBotVar* pX = pThis->GivItem("x");
- pX->SetValFloat( pVar->GivValFloat() );
- pVar = pVar->GivNext();
+ CBotVar* pX = pThis->GetItem("x");
+ pX->SetValFloat( pVar->GetValFloat() );
+ pVar = pVar->GetNext();
- CBotVar* pY = pThis->GivItem("y");
- pY->SetValFloat( pVar->GivValFloat() );
- pVar = pVar->GivNext();
+ CBotVar* pY = pThis->GetItem("y");
+ pY->SetValFloat( pVar->GetValFloat() );
+ pVar = pVar->GetNext();
return true; // pas d'interruption
}
@@ -124,14 +124,14 @@ CBotTypResult cCPoint( CBotVar* pThis, CBotVar* &pVar)
if ( pVar == NULL ) return CBotTypResult(0);
// numeric type of parameter please
- if ( pVar->GivType() > CBotTypDouble ) return CBotTypResult(5011);
- pVar = pVar->GivNext();
+ if ( pVar->GetType() > CBotTypDouble ) return CBotTypResult(5011);
+ pVar = pVar->GetNext();
// there must be a second parameter
if ( pVar == NULL ) return 5028;
// also numeric
- if ( pVar->GivType() > CBotTypDouble )return CBotTypResult(5011);
- pVar = pVar->GivNext();
+ if ( pVar->GetType() > CBotTypDouble )return CBotTypResult(5011);
+ pVar = pVar->GetNext();
// and not more than 2 parameters please
if ( pVar != NULL ) return CBotTypResult(5026);