More OutputDebugString() -> DebugTrace changes.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
// dirty, but I get OS header includes this way
|
||||
#include "JGE.h"
|
||||
|
||||
#include "../include/config.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include "../include/config.h"
|
||||
#include "../include/DebugRoutines.h"
|
||||
#include "../include/GameStateMenu.h"
|
||||
#include "../include/MenuItem.h"
|
||||
#include "../include/GameOptions.h"
|
||||
@@ -415,12 +416,10 @@ void GameStateMenu::Update(float dt)
|
||||
if (!nextDirectory(RESPATH"/sets/","_cards.dat")){
|
||||
//Remove temporary translations
|
||||
Translator::GetInstance()->tempValues.clear();
|
||||
//Debug
|
||||
#ifdef _DEBUG
|
||||
char buf[4096];
|
||||
sprintf(buf, "\n==\nTotal MTGCard: %lu\nTotal CardPrimitives: %lu\n==\n", (long unsigned)mParent->collection->collection.size(), (long unsigned)mParent->collection->primitives.size());
|
||||
OutputDebugString(buf);
|
||||
#endif
|
||||
|
||||
DebugTrace(std::endl << "==" << std::endl <<
|
||||
"Total MTGCards: " << mParent->collection->collection.size() << std::endl <<
|
||||
"Total CardPrimitives: " << mParent->collection->primitives.size() << std::endl << "==");
|
||||
|
||||
//Force default, if necessary.
|
||||
if(options[Options::ACTIVE_PROFILE].str == "")
|
||||
@@ -635,12 +634,9 @@ void GameStateMenu::Render()
|
||||
|
||||
void GameStateMenu::ButtonPressed(int controllerId, int controlId)
|
||||
{
|
||||
WFont * mFont = resources.GetWFont(Constants::MENU_FONT);
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
char buf[4096];
|
||||
sprintf(buf, "cnotrollerId: %i", controllerId);
|
||||
OutputDebugString(buf);
|
||||
#endif
|
||||
WFont * mFont = resources.GetWFont(Constants::MENU_FONT);
|
||||
|
||||
DebugTrace("GameStateMenu: controllerId " << controllerId << " selected");
|
||||
switch (controllerId){
|
||||
case MENU_LANGUAGE_SELECTION:
|
||||
setLang(controlId);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../include/config.h"
|
||||
#include "../include/DebugRoutines.h"
|
||||
#include "../include/ManaCost.h"
|
||||
#include "../include/ManaCostHybrid.h"
|
||||
#include "../include/ExtraCost.h"
|
||||
@@ -490,22 +491,18 @@ ManaCost * ManaCost::Diff(ManaCost * _cost){
|
||||
|
||||
#ifdef WIN32
|
||||
void ManaCost::Dump(){
|
||||
char buf[4096];
|
||||
OutputDebugString("\n===ManaCost===\n");
|
||||
DebugTrace("\n===ManaCost===\n");
|
||||
for (int i=0; i<= Constants::MTG_NB_COLORS; i++){
|
||||
if (cost[i]) {
|
||||
sprintf(buf, "%c:%i - ", Constants::MTGColorChars[i],cost[i]);
|
||||
OutputDebugString(buf);
|
||||
DebugTrace(Constants::MTGColorChars[i] << ":" << cost[i] << " - ");
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int i=0; i< nbhybrids; i++){
|
||||
ManaCostHybrid * h = hybrids[i];
|
||||
|
||||
sprintf(buf, "H:{%c:%i}/{%c:%i}", Constants::MTGColorChars[h->color1], h->value1, Constants::MTGColorChars[h->color2], h->value2);
|
||||
OutputDebugString(buf);
|
||||
DebugTrace("H:{" << Constants::MTGColorChars[h->color1] << ":" << h->value1 << "}/{" << Constants::MTGColorChars[h->color2] << ":" << h->value2 << "}");
|
||||
}
|
||||
OutputDebugString("\n=============\n");
|
||||
DebugTrace("\n=============\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "../include/DebugRoutines.h"
|
||||
#include "../include/PhaseRing.h"
|
||||
#include "../include/MTGDefinitions.h"
|
||||
#include "../include/Player.h"
|
||||
@@ -19,9 +20,8 @@ int PhaseRing::phaseStrToInt(string s){
|
||||
if (s.compare("secondmain") == 0)return Constants::MTG_PHASE_SECONDMAIN;
|
||||
if (s.compare("endofturn") == 0)return Constants::MTG_PHASE_ENDOFTURN;
|
||||
if (s.compare("cleanup") == 0)return Constants::MTG_PHASE_CLEANUP;
|
||||
OutputDebugString("PHASERING: Unknown Phase name:");
|
||||
OutputDebugString(s.c_str());
|
||||
OutputDebugString("\n");
|
||||
DebugTrace("PHASERING: Unknown Phase name: " << s);
|
||||
|
||||
return Constants::MTG_PHASE_FIRSTMAIN;
|
||||
}
|
||||
|
||||
@@ -90,9 +90,9 @@ Phase * PhaseRing::forward(bool sendEvents){
|
||||
Phase * PhaseRing::goToPhase(int id, Player * player, bool sendEvents){
|
||||
Phase * currentPhase = *current;
|
||||
while(currentPhase->id !=id || currentPhase->player != player){ //Dangerous, risk for inifinte loop !
|
||||
#ifdef WIN32
|
||||
OutputDebugString("goto");
|
||||
#endif
|
||||
|
||||
DebugTrace("PhasingRing: goToPhase called, current phase is " << phaseName(currentPhase->id));
|
||||
|
||||
currentPhase = forward(sendEvents);
|
||||
}
|
||||
return currentPhase;
|
||||
|
||||
Reference in New Issue
Block a user