- Removed deprecated parameter

- Added more debug logging for LUA functions
This commit is contained in:
Mark Vejvoda
2010-10-04 18:31:17 +00:00
parent 8d053ba314
commit d38b46a529
4 changed files with 72 additions and 28 deletions

View File

@@ -1372,7 +1372,7 @@ void Game::render3d(){
//surface //surface
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
renderer.renderSurface(avgRenderFps,world.getFrameCount()); renderer.renderSurface(avgRenderFps);
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderSurface]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis()); if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderSurface]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
if(chrono.getMillis() > 0) chrono.start(); if(chrono.getMillis() > 0) chrono.start();
@@ -1384,13 +1384,13 @@ void Game::render3d(){
//units //units
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
renderer.renderUnits(avgRenderFps,world.getFrameCount()); renderer.renderUnits(avgRenderFps);
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderUnits]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis()); if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderUnits]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
if(chrono.getMillis() > 0) chrono.start(); if(chrono.getMillis() > 0) chrono.start();
//objects //objects
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
renderer.renderObjects(avgRenderFps,world.getFrameCount()); renderer.renderObjects(avgRenderFps);
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis()); if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] renderFps = %d took msecs: %lld [renderObjects]\n",__FILE__,__FUNCTION__,__LINE__,renderFps,chrono.getMillis());
if(chrono.getMillis() > 0) chrono.start(); if(chrono.getMillis() > 0) chrono.start();

View File

@@ -61,6 +61,8 @@ const int ScriptManager::messageWrapCount= 30;
const int ScriptManager::displayTextWrapCount= 64; const int ScriptManager::displayTextWrapCount= 64;
void ScriptManager::init(World* world, GameCamera *gameCamera){ void ScriptManager::init(World* world, GameCamera *gameCamera){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
const Scenario* scenario= world->getScenario(); const Scenario* scenario= world->getScenario();
this->world= world; this->world= world;
@@ -140,14 +142,20 @@ void ScriptManager::init(World* world, GameCamera *gameCamera){
gameOver= false; gameOver= false;
gameWon = false; gameWon = false;
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
//call startup function //call startup function
luaScript.beginCall("startup"); luaScript.beginCall("startup");
luaScript.endCall(); luaScript.endCall();
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
} }
// ========================== events =============================================== // ========================== events ===============================================
void ScriptManager::onMessageBoxOk(){ void ScriptManager::onMessageBoxOk(){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Lang &lang= Lang::getInstance(); Lang &lang= Lang::getInstance();
if(!messageQueue.empty()){ if(!messageQueue.empty()){
@@ -160,11 +168,15 @@ void ScriptManager::onMessageBoxOk(){
} }
void ScriptManager::onResourceHarvested(){ void ScriptManager::onResourceHarvested(){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
luaScript.beginCall("resourceHarvested"); luaScript.beginCall("resourceHarvested");
luaScript.endCall(); luaScript.endCall();
} }
void ScriptManager::onUnitCreated(const Unit* unit){ void ScriptManager::onUnitCreated(const Unit* unit){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
lastCreatedUnitName= unit->getType()->getName(); lastCreatedUnitName= unit->getType()->getName();
lastCreatedUnitId= unit->getId(); lastCreatedUnitId= unit->getId();
luaScript.beginCall("unitCreated"); luaScript.beginCall("unitCreated");
@@ -174,6 +186,8 @@ void ScriptManager::onUnitCreated(const Unit* unit){
} }
void ScriptManager::onUnitDied(const Unit* unit){ void ScriptManager::onUnitDied(const Unit* unit){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
lastDeadUnitName= unit->getType()->getName(); lastDeadUnitName= unit->getType()->getName();
lastDeadUnitId= unit->getId(); lastDeadUnitId= unit->getId();
luaScript.beginCall("unitDied"); luaScript.beginCall("unitDied");
@@ -181,17 +195,20 @@ void ScriptManager::onUnitDied(const Unit* unit){
} }
void ScriptManager::onGameOver(bool won) { void ScriptManager::onGameOver(bool won) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
gameWon = won; gameWon = won;
luaScript.beginCall("gameOver"); luaScript.beginCall("gameOver");
luaScript.endCall(); luaScript.endCall();
} }
void ScriptManager::onTimerTriggerEvent() { void ScriptManager::onTimerTriggerEvent() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] TimerTriggerEventList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,TimerTriggerEventList.size());
if(TimerTriggerEventList.size() <= 0) { if(TimerTriggerEventList.size() <= 0) {
return; return;
} }
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] TimerTriggerEventList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,TimerTriggerEventList.size());
for(std::map<int,TimerTriggerEvent>::iterator iterMap = TimerTriggerEventList.begin(); for(std::map<int,TimerTriggerEvent>::iterator iterMap = TimerTriggerEventList.begin();
iterMap != TimerTriggerEventList.end(); iterMap++) { iterMap != TimerTriggerEventList.end(); iterMap++) {
@@ -212,14 +229,14 @@ void ScriptManager::onTimerTriggerEvent() {
} }
void ScriptManager::onCellTriggerEvent(Unit *movingUnit) { void ScriptManager::onCellTriggerEvent(Unit *movingUnit) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] movingUnit = %p, CellTriggerEventList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,movingUnit,CellTriggerEventList.size());
if(CellTriggerEventList.size() <= 0) { if(CellTriggerEventList.size() <= 0) {
return; return;
} }
else {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] movingUnit = %p, CellTriggerEventList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,movingUnit,CellTriggerEventList.size());
// remove any delayed removals // remove any delayed removals
unregisterCellTriggerEvent(-1); unregisterCellTriggerEvent(-1);
}
inCellTriggerEvent = true; inCellTriggerEvent = true;
if(movingUnit != NULL) { if(movingUnit != NULL) {
@@ -365,6 +382,8 @@ void ScriptManager::setDisplayText(const string &text){
} }
void ScriptManager::DisplayFormattedText(const char *fmt, ...) { void ScriptManager::DisplayFormattedText(const char *fmt, ...) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
va_list argList; va_list argList;
@@ -381,42 +400,50 @@ void ScriptManager::DisplayFormattedText(const char *fmt, ...) {
} }
void ScriptManager::setCameraPosition(const Vec2i &pos){ void ScriptManager::setCameraPosition(const Vec2i &pos){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
gameCamera->centerXZ(pos.x, pos.y); gameCamera->centerXZ(pos.x, pos.y);
} }
void ScriptManager::createUnit(const string &unitName, int factionIndex, Vec2i pos){ void ScriptManager::createUnit(const string &unitName, int factionIndex, Vec2i pos){
//SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] unit [%s] factionIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,unitName.c_str(),factionIndex); SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] unit [%s] factionIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,unitName.c_str(),factionIndex);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->createUnit(unitName, factionIndex, pos); world->createUnit(unitName, factionIndex, pos);
} }
void ScriptManager::giveResource(const string &resourceName, int factionIndex, int amount){ void ScriptManager::giveResource(const string &resourceName, int factionIndex, int amount){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->giveResource(resourceName, factionIndex, amount); world->giveResource(resourceName, factionIndex, amount);
} }
void ScriptManager::givePositionCommand(int unitId, const string &commandName, const Vec2i &pos){ void ScriptManager::givePositionCommand(int unitId, const string &commandName, const Vec2i &pos){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->givePositionCommand(unitId, commandName, pos); world->givePositionCommand(unitId, commandName, pos);
} }
void ScriptManager::giveAttackCommand(int unitId, int unitToAttackId) { void ScriptManager::giveAttackCommand(int unitId, int unitToAttackId) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->giveAttackCommand(unitId, unitToAttackId); world->giveAttackCommand(unitId, unitToAttackId);
} }
void ScriptManager::giveProductionCommand(int unitId, const string &producedName){ void ScriptManager::giveProductionCommand(int unitId, const string &producedName){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->giveProductionCommand(unitId, producedName); world->giveProductionCommand(unitId, producedName);
} }
void ScriptManager::giveUpgradeCommand(int unitId, const string &producedName){ void ScriptManager::giveUpgradeCommand(int unitId, const string &producedName){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
world->giveUpgradeCommand(unitId, producedName); world->giveUpgradeCommand(unitId, producedName);
} }
void ScriptManager::disableAi(int factionIndex){ void ScriptManager::disableAi(int factionIndex){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
if(factionIndex<GameConstants::maxPlayers){ if(factionIndex<GameConstants::maxPlayers){
playerModifiers[factionIndex].disableAi(); playerModifiers[factionIndex].disableAi();
@@ -425,6 +452,7 @@ void ScriptManager::disableAi(int factionIndex){
} }
void ScriptManager::enableAi(int factionIndex){ void ScriptManager::enableAi(int factionIndex){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
if(factionIndex<GameConstants::maxPlayers){ if(factionIndex<GameConstants::maxPlayers){
playerModifiers[factionIndex].enableAi(); playerModifiers[factionIndex].enableAi();
@@ -439,6 +467,7 @@ bool ScriptManager::getAiEnabled(int factionIndex){
} }
void ScriptManager::disableConsume(int factionIndex){ void ScriptManager::disableConsume(int factionIndex){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
if(factionIndex<GameConstants::maxPlayers){ if(factionIndex<GameConstants::maxPlayers){
playerModifiers[factionIndex].disableConsume(); playerModifiers[factionIndex].disableConsume();
@@ -446,6 +475,7 @@ void ScriptManager::disableConsume(int factionIndex){
} }
void ScriptManager::enableConsume(int factionIndex){ void ScriptManager::enableConsume(int factionIndex){
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
if(factionIndex<GameConstants::maxPlayers){ if(factionIndex<GameConstants::maxPlayers){
playerModifiers[factionIndex].enableConsume(); playerModifiers[factionIndex].enableConsume();
@@ -606,6 +636,8 @@ int ScriptManager::getTimerEventSecondsElapsed(int eventId) {
} }
void ScriptManager::setPlayerAsWinner(int factionIndex) { void ScriptManager::setPlayerAsWinner(int factionIndex) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
if(factionIndex<GameConstants::maxPlayers){ if(factionIndex<GameConstants::maxPlayers){
playerModifiers[factionIndex].setAsWinner(); playerModifiers[factionIndex].setAsWinner();
@@ -613,6 +645,7 @@ void ScriptManager::setPlayerAsWinner(int factionIndex){
} }
void ScriptManager::endGame() { void ScriptManager::endGame() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
gameOver= true; gameOver= true;
} }
@@ -644,27 +677,32 @@ Vec2i ScriptManager::getPerformanceTimerResults() {
} }
Vec2i ScriptManager::getStartLocation(int factionIndex) { Vec2i ScriptManager::getStartLocation(int factionIndex) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getStartLocation(factionIndex); return world->getStartLocation(factionIndex);
} }
Vec2i ScriptManager::getUnitPosition(int unitId) { Vec2i ScriptManager::getUnitPosition(int unitId) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getUnitPosition(unitId); return world->getUnitPosition(unitId);
} }
int ScriptManager::getUnitFaction(int unitId) { int ScriptManager::getUnitFaction(int unitId) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getUnitFactionIndex(unitId); return world->getUnitFactionIndex(unitId);
} }
int ScriptManager::getResourceAmount(const string &resourceName, int factionIndex) { int ScriptManager::getResourceAmount(const string &resourceName, int factionIndex) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getResourceAmount(resourceName, factionIndex); return world->getResourceAmount(resourceName, factionIndex);
} }
const string &ScriptManager::getLastCreatedUnitName() { const string &ScriptManager::getLastCreatedUnitName() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return lastCreatedUnitName; return lastCreatedUnitName;
} }
@@ -685,26 +723,31 @@ bool ScriptManager::getGameWon() {
} }
int ScriptManager::getLastCreatedUnitId() { int ScriptManager::getLastCreatedUnitId() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return lastCreatedUnitId; return lastCreatedUnitId;
} }
const string &ScriptManager::getLastDeadUnitName() { const string &ScriptManager::getLastDeadUnitName() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return lastDeadUnitName; return lastDeadUnitName;
} }
int ScriptManager::getLastDeadUnitId() { int ScriptManager::getLastDeadUnitId() {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return lastDeadUnitId; return lastDeadUnitId;
} }
int ScriptManager::getUnitCount(int factionIndex) { int ScriptManager::getUnitCount(int factionIndex) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getUnitCount(factionIndex); return world->getUnitCount(factionIndex);
} }
int ScriptManager::getUnitCountOfType(int factionIndex, const string &typeName) { int ScriptManager::getUnitCountOfType(int factionIndex, const string &typeName) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ScriptManager_STREFLOP_Wrapper streflopWrapper; ScriptManager_STREFLOP_Wrapper streflopWrapper;
return world->getUnitCountOfType(factionIndex, typeName); return world->getUnitCountOfType(factionIndex, typeName);
} }
@@ -1000,6 +1043,7 @@ int ScriptManager::getUnitCountOfType(LuaHandle* luaHandle){
} }
int ScriptManager::DisplayFormattedText(LuaHandle* luaHandle) { int ScriptManager::DisplayFormattedText(LuaHandle* luaHandle) {
SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
//const char *ret; //const char *ret;
//lua_lock(luaHandle); //lua_lock(luaHandle);

View File

@@ -1261,7 +1261,7 @@ void Renderer::renderMessageBox(const GraphicMessageBox *messageBox) {
// ==================== complex rendering ==================== // ==================== complex rendering ====================
void Renderer::renderSurface(const int renderFps, const int worldFrameCount) { void Renderer::renderSurface(const int renderFps) {
IF_DEBUG_EDITION( IF_DEBUG_EDITION(
if (getDebugRenderer().willRenderSurface()) { if (getDebugRenderer().willRenderSurface()) {
getDebugRenderer().renderSurface(visibleQuad / Map::cellScale); getDebugRenderer().renderSurface(visibleQuad / Map::cellScale);
@@ -1457,7 +1457,7 @@ void Renderer::renderSurface(const int renderFps, const int worldFrameCount) {
) )
} }
void Renderer::renderObjects(const int renderFps, const int worldFrameCount) { void Renderer::renderObjects(const int renderFps) {
const World *world= game->getWorld(); const World *world= game->getWorld();
const Map *map= world->getMap(); const Map *map= world->getMap();
@@ -1738,7 +1738,7 @@ void Renderer::renderWater() {
assertGl(); assertGl();
} }
void Renderer::renderUnits(const int renderFps, const int worldFrameCount) { void Renderer::renderUnits(const int renderFps) {
Unit *unit=NULL; Unit *unit=NULL;
const World *world= game->getWorld(); const World *world= game->getWorld();
MeshCallbackTeamColor meshCallbackTeamColor; MeshCallbackTeamColor meshCallbackTeamColor;

View File

@@ -321,11 +321,11 @@ public:
void renderMessageBox(const GraphicMessageBox *listBox); void renderMessageBox(const GraphicMessageBox *listBox);
//complex rendering //complex rendering
void renderSurface(const int renderFps, const int worldFrameCount); void renderSurface(const int renderFps);
void renderObjects(const int renderFps, const int worldFrameCount); void renderObjects(const int renderFps);
void renderWater(); void renderWater();
void renderUnits(const int renderFps, const int worldFrameCount); void renderUnits(const int renderFps);
void renderSelectionEffects(); void renderSelectionEffects();
void renderWaterEffects(); void renderWaterEffects();