we dont need to be too picky with translations which are mainly meant for logfiles

This commit is contained in:
Titus Tscharntke 2011-11-04 01:12:05 +00:00
parent f0fb35b64d
commit cbdde66999
7 changed files with 24 additions and 24 deletions

View File

@ -223,7 +223,7 @@ void Game::endGame() {
logger.loadLoadingScreen("");
logger.setState(Lang::getInstance().get("Deleting"));
//logger.add("Game", true);
logger.add(Lang::getInstance().get("LogScreenGameLoading"), false);
logger.add(Lang::getInstance().get("LogScreenGameLoading","",true), false);
logger.hideProgress();
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
@ -286,7 +286,7 @@ Game::~Game() {
logger.loadLoadingScreen("");
logger.setState(Lang::getInstance().get("Deleting"));
//logger.add("Game", true);
logger.add(Lang::getInstance().get("LogScreenGameLoading"), false);
logger.add(Lang::getInstance().get("LogScreenGameLoading","",true), false);
logger.hideProgress();
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
@ -913,14 +913,14 @@ void Game::init(bool initForPreviewOnly) {
if(withRainEffect){
//weather particle systems
if(world.getTileset()->getWeather() == wRainy) {
logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingRainParticles"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingRainParticles","",true), true);
weatherParticleSystem= new RainParticleSystem();
weatherParticleSystem->setSpeed(12.f / GameConstants::updateFps);
weatherParticleSystem->setPos(gameCamera.getPos());
renderer.manageParticleSystem(weatherParticleSystem, rsGame);
}
else if(world.getTileset()->getWeather() == wSnowy) {
logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingSnowParticles"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingSnowParticles","",true), true);
weatherParticleSystem= new SnowParticleSystem(1200);
weatherParticleSystem->setSpeed(1.5f / GameConstants::updateFps);
weatherParticleSystem->setPos(gameCamera.getPos());
@ -932,7 +932,7 @@ void Game::init(bool initForPreviewOnly) {
//init renderer state
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Initializing renderer\n",__FILE__,__FUNCTION__);
logger.add(Lang::getInstance().get("LogScreenGameLoadingInitRenderer"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingInitRenderer","",true), true);
renderer.initGame(this);
for(int i=0; i < world.getFactionCount(); ++i) {
@ -951,13 +951,13 @@ void Game::init(bool initForPreviewOnly) {
SDL_PumpEvents();
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] Waiting for network\n",__FILE__,__FUNCTION__);
logger.add(Lang::getInstance().get("LogScreenGameLoadingWaitForNetworkPlayers"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingWaitForNetworkPlayers","",true), true);
networkManager.getGameNetworkInterface()->waitUntilReady(&checksum);
//std::string worldLog = world.DumpWorldToLog(true);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Starting music stream\n",__FILE__,__FUNCTION__,__LINE__);
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingMusic"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingMusic","",true), true);
if(this->masterserverMode == false) {
if(world.getThisFaction() == NULL) {
@ -981,7 +981,7 @@ void Game::init(bool initForPreviewOnly) {
//rain
if(tileset->getWeather() == wRainy && ambientSounds->isEnabledRain()) {
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingAmbient"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingAmbient","",true), true);
currentAmbientSound = ambientSounds->getRain();
//printf("In [%s:%s] Line: %d currentAmbientSound = [%p]\n",__FILE__,__FUNCTION__,__LINE__,currentAmbientSound);
soundRenderer.playAmbient(currentAmbientSound);
@ -989,7 +989,7 @@ void Game::init(bool initForPreviewOnly) {
//snow
if(tileset->getWeather() == wSnowy && ambientSounds->isEnabledSnow()) {
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingAmbient"), true);
logger.add(Lang::getInstance().get("LogScreenGameLoadingStartingAmbient","",true), true);
currentAmbientSound = ambientSounds->getSnow();
//printf("In [%s:%s] Line: %d currentAmbientSound = [%p]\n",__FILE__,__FUNCTION__,__LINE__,currentAmbientSound);
soundRenderer.playAmbient(currentAmbientSound);
@ -1000,7 +1000,7 @@ void Game::init(bool initForPreviewOnly) {
soundRenderer.playMusic(gameMusic);
}
logger.add(Lang::getInstance().get("LogScreenGameLoadingLaunchGame"));
logger.add(Lang::getInstance().get("LogScreenGameLoadingLaunchGame","",true));
}
logger.setCancelLoadingEnabled(false);

View File

@ -89,7 +89,7 @@ void CoreData::load() {
}
//const string dir = data_path + "data/core";
Logger::getInstance().add(Lang::getInstance().get("LogScreenCoreDataLoading"));
Logger::getInstance().add(Lang::getInstance().get("LogScreenCoreDataLoading","",true));
Renderer &renderer= Renderer::getInstance();

View File

@ -203,7 +203,7 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
TechTree::~TechTree() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingTechtree"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingTechtree","",true), true);
}
std::vector<std::string> TechTree::validateFactionTypes() {

View File

@ -155,7 +155,7 @@ Map::Map() {
}
Map::~Map() {
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMapCells"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMapCells","",true), true);
delete [] cells;
cells = NULL;
@ -167,7 +167,7 @@ Map::~Map() {
void Map::end(){
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMap"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMap","",true), true);
//read heightmap
for(int j = 0; j < surfaceH; ++j) {
for(int i = 0; i < surfaceW; ++i) {
@ -358,7 +358,7 @@ Checksum Map::load(const string &path, TechTree *techTree, Tileset *tileset) {
}
void Map::init(Tileset *tileset) {
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMap"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMap","",true), true);
maxMapHeight=0.0f;
smoothSurface(tileset);
computeNormals();

View File

@ -109,7 +109,7 @@ void Minimap::init(int w, int h, const World *world, bool fogOfWar) {
}
Minimap::~Minimap() {
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMiniMap"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingMiniMap","",true), true);
delete fowPixmap0;
fowPixmap0=NULL;
delete fowPixmap1;

View File

@ -350,7 +350,7 @@ void Tileset::load(const string &dir, Checksum *checksum, Checksum *tilesetCheck
}
Tileset::~Tileset() {
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingTileset"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingTileset","",true), true);
}
const Pixmap2D *Tileset::getSurfPixmap(int type, int var) const{

View File

@ -149,7 +149,7 @@ World::~World() {
void World::endScenario() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingWorld"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingWorld","",true), true);
ExploredCellsLookupItemCache.clear();
ExploredCellsLookupItemCacheTimer.clear();
@ -165,7 +165,7 @@ void World::endScenario() {
void World::end(){
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingWorld"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameUnLoadingWorld","",true), true);
ExploredCellsLookupItemCache.clear();
ExploredCellsLookupItemCacheTimer.clear();
@ -1187,7 +1187,7 @@ int World::getUnitCountOfType(int factionIndex, const string &typeName) {
void World::initCells(bool fogOfWar) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingStateCells"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingStateCells","",true), true);
for(int i=0; i< map.getSurfaceW(); ++i) {
for(int j=0; j< map.getSurfaceH(); ++j) {
@ -1255,7 +1255,7 @@ void World::initSplattedTextures() {
//creates each faction looking at each faction name contained in GameSettings
void World::initFactionTypes(GameSettings *gs) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingFactionTypes"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingFactionTypes","",true), true);
if(gs == NULL) {
throw runtime_error("gs == NULL");
@ -1311,14 +1311,14 @@ void World::initMinimap() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
minimap.init(map.getW(), map.getH(), this, game->getGameSettings()->getFogOfWar());
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingMinimapSurface"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingMinimapSurface","",true), true);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
void World::initUnitsForScenario() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingGenerateGameElements"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingGenerateGameElements","",true), true);
//put starting units
for(int i = 0; i < getFactionCount(); ++i) {
@ -1363,7 +1363,7 @@ void World::initUnitsForScenario() {
//place units randomly aroud start location
void World::initUnits() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingGenerateGameElements"), true);
Logger::getInstance().add(Lang::getInstance().get("LogScreenGameLoadingGenerateGameElements","",true), true);
//put starting units
for(int i = 0; i < getFactionCount(); ++i) {