forked from github/server
remove global variable `verbosity` in favor of static in main.c (use log_* functions everywhere)
This commit is contained in:
parent
06a04d0e20
commit
a027139057
|
@ -3757,8 +3757,6 @@ static int battle_report(battle * b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbosity > 0)
|
|
||||||
log_printf(stdout, " %d", b->turn);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
for (bf = b->factions; bf; bf = bf->next) {
|
for (bf = b->factions; bf; bf = bf->next) {
|
||||||
|
@ -4349,8 +4347,7 @@ void do_battle(region * r)
|
||||||
do_combatmagic(b, DO_PRECOMBATSPELL);
|
do_combatmagic(b, DO_PRECOMBATSPELL);
|
||||||
|
|
||||||
print_stats(b); /* gibt die Kampfaufstellung aus */
|
print_stats(b); /* gibt die Kampfaufstellung aus */
|
||||||
if (verbosity > 0)
|
log_debug("battle in %s (%d, %d) : ", regionname(r, 0), r->x, r->y);
|
||||||
log_printf(stdout, "%s (%d, %d) : ", rname(r, default_locale), r->x, r->y);
|
|
||||||
|
|
||||||
for (; battle_report(b) && b->turn <= max_turns; ++b->turn) {
|
for (; battle_report(b) && b->turn <= max_turns; ++b->turn) {
|
||||||
if (bdebug) {
|
if (bdebug) {
|
||||||
|
@ -4362,9 +4359,6 @@ void do_battle(region * r)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbosity > 0)
|
|
||||||
log_printf(stdout, "\n");
|
|
||||||
|
|
||||||
/* Auswirkungen berechnen: */
|
/* Auswirkungen berechnen: */
|
||||||
aftermath(b);
|
aftermath(b);
|
||||||
if (rule_force_leave(FORCE_LEAVE_POSTCOMBAT)) {
|
if (rule_force_leave(FORCE_LEAVE_POSTCOMBAT)) {
|
||||||
|
|
|
@ -438,8 +438,6 @@ static attrib_type at_npcfaction = {
|
||||||
ATF_UNIQUE
|
ATF_UNIQUE
|
||||||
};
|
};
|
||||||
|
|
||||||
int verbosity = 1;
|
|
||||||
|
|
||||||
FILE *debug;
|
FILE *debug;
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
|
@ -313,28 +313,10 @@ extern "C" {
|
||||||
extern bool battledebug;
|
extern bool battledebug;
|
||||||
extern bool sqlpatch;
|
extern bool sqlpatch;
|
||||||
extern bool lomem; /* save memory */
|
extern bool lomem; /* save memory */
|
||||||
|
|
||||||
extern int turn;
|
extern int turn;
|
||||||
extern int verbosity;
|
|
||||||
|
|
||||||
/** report options **/
|
|
||||||
extern const char *options[MAXOPTIONS];
|
|
||||||
|
|
||||||
extern struct helpmode helpmodes[];
|
|
||||||
extern const char *parameters[];
|
|
||||||
extern const char *localenames[];
|
|
||||||
extern settings global;
|
|
||||||
|
|
||||||
extern bool battledebug;
|
|
||||||
extern bool sqlpatch;
|
|
||||||
extern bool lomem; /* save memory */
|
|
||||||
|
|
||||||
extern int turn;
|
|
||||||
extern int verbosity;
|
|
||||||
extern bool getunitpeasants;
|
extern bool getunitpeasants;
|
||||||
|
|
||||||
/** report options **/
|
extern const char *options[MAXOPTIONS]; /* report options */
|
||||||
extern const char *options[MAXOPTIONS];
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -4064,10 +4064,10 @@ void process(void)
|
||||||
region *r;
|
region *r;
|
||||||
processor *pglobal = proc;
|
processor *pglobal = proc;
|
||||||
|
|
||||||
log_debug("- Step %u\n", prio);
|
log_debug("- Step %u", prio);
|
||||||
while (proc && proc->priority == prio) {
|
while (proc && proc->priority == prio) {
|
||||||
if (proc->name && verbosity >= 1)
|
if (proc->name)
|
||||||
log_debug(" - %s\n", proc->name);
|
log_debug(" - %s", proc->name);
|
||||||
proc = proc->next;
|
proc = proc->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ static const char *logfile = "eressea.log";
|
||||||
static const char *luafile = 0;
|
static const char *luafile = 0;
|
||||||
static const char *inifile = "eressea.ini";
|
static const char *inifile = "eressea.ini";
|
||||||
static int memdebug = 0;
|
static int memdebug = 0;
|
||||||
|
static int verbosity = 1;
|
||||||
|
|
||||||
static void load_inifile(dictionary * d)
|
static void load_inifile(dictionary * d)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,7 +96,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
extern int verbosity;
|
|
||||||
extern int *storms;
|
extern int *storms;
|
||||||
extern int weeks_per_month;
|
extern int weeks_per_month;
|
||||||
extern int months_per_year;
|
extern int months_per_year;
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
ERESSEA 72vx "naeg86"
|
||||||
|
EINHEIT nqLx
|
||||||
|
BENENNEN EINHEIT 'Goldene Herde'
|
|
@ -0,0 +1,9 @@
|
||||||
|
@ECHO OFF
|
||||||
|
SET BUILD=..\build-vs12\eressea\Debug\
|
||||||
|
SET SERVER=%BUILD%\eressea.exe
|
||||||
|
%BUILD%\test_eressea.exe
|
||||||
|
%SERVER% ..\scripts\run-tests.lua
|
||||||
|
%SERVER% ..\scripts\run-tests-e2.lua
|
||||||
|
%SERVER% ..\scripts\run-tests-e3.lua
|
||||||
|
PAUSE
|
||||||
|
RMDIR /s /q reports
|
Loading…
Reference in New Issue