From d6cce4fb4006c57480478debf9fc131310f4ed0d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 28 Oct 2007 23:13:46 +0000 Subject: [PATCH] converting output to stdio for windows CP1252 --- src/common/gamecode/laws.c | 2 +- src/common/kernel/battle.c | 2 +- src/common/kernel/eressea.c | 4 ++-- src/common/kernel/magic.c | 9 --------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index dada102a8..cc3a5c62b 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3670,7 +3670,7 @@ process(void) printf("- Step %u\n", prio); while (proc && proc->priority==prio) { - if (proc->name) printf(" - %s\n", proc->name); + if (proc->name) log_stdio(stdout, " - %s\n", proc->name); proc = proc->next; } diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 036cc2276..03d511d7b 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -3992,7 +3992,7 @@ do_battle(region * r) do_combatmagic(b, DO_PRECOMBATSPELL); print_stats(b); /* gibt die Kampfaufstellung aus */ - printf("%s (%d, %d) : ", rname(r, NULL), r->x, r->y); + log_stdio(stdout, "%s (%d, %d) : ", rname(r, NULL), r->x, r->y); for (;battle_report(b) && b->turn<=COMBAT_TURNS;++b->turn) { if (bdebug) { diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 7ad7fbc77..06361163b 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -737,7 +737,7 @@ verify_data(void) if (u->number > UNIT_MAXSIZE) { if (lf != f->no) { lf = f->no; - printf("Partei %s:\n", factionid(f)); + log_stdio(stdout, "Partei %s:\n", factionid(f)); } log_warning(("Einheit %s hat %d Personen\n", unitid(u), u->number)); } @@ -2224,7 +2224,7 @@ remove_empty_factions(boolean writedropouts) if ((f->units==NULL || f->alive == 0) && f->no != MONSTER_FACTION) { ursprung * ur = f->ursprung; while (ur && ur->id!=0) ur=ur->next; - if (!quiet) printf("\t%s\n", factionname(f)); + if (!quiet) log_stdio(stdout, "\t%s\n", factionname(f)); /* Einfach in eine Datei schreiben und später vermailen */ diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index aae7a4220..d29d931bc 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -1258,19 +1258,10 @@ fumble(region * r, unit * u, const spell * sp, int cast_grade) /* wenn die Chance kleiner als 0 ist, können wir gleich false * zurückgeben */ if (patzer <= 0) { -#ifdef PATZERDEBUG - printf("%s: Zauber Stufe %d, Talent %d, Patzerchance %d\n", - unitname(u), cast_grade, eff_skill(u, SK_MAGIC, r), patzer); -#endif return false; } rnd = rng_int()%100; -#ifdef PATZERDEBUG - printf("%s: Zauber Stufe %d, Talent %d, Patzerchance %d, rand: %d\n", - unitname(u), cast_grade, eff_skill(u, SK_MAGIC, r), patzer, rnd); -#endif - if (rnd > patzer) { /* Glück gehabt, kein Patzer */ return false;