forked from github/server
reduzierte warnings unter visual C
This commit is contained in:
parent
9a70cdedab
commit
62e08f00c8
|
@ -117,6 +117,10 @@ SOURCE=.\reduceproduction.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\roadsoverride.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\targetregion.h
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -158,6 +162,10 @@ SOURCE=.\reduceproduction.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\roadsoverride.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\targetregion.c
|
||||
# End Source File
|
||||
# End Target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: attributes.c,v 1.5 2001/02/04 08:42:36 enno Exp $
|
||||
* $Id: attributes.c,v 1.6 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -24,6 +24,7 @@
|
|||
#include "follow.h"
|
||||
#include "iceberg.h"
|
||||
#include "hate.h"
|
||||
#include "overrideroads.h"
|
||||
|
||||
/* util includes */
|
||||
#include <attrib.h>
|
||||
|
@ -32,13 +33,11 @@
|
|||
* library initialization
|
||||
*/
|
||||
|
||||
extern attrib_type at_roads_override;
|
||||
|
||||
void
|
||||
init_attributes(void)
|
||||
{
|
||||
at_register(&at_orcification);
|
||||
at_register(&at_roads_override);
|
||||
at_register(&at_overrideroads);
|
||||
/* at_iceberg */
|
||||
init_iceberg();
|
||||
/* at_key */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: creport.c,v 1.5 2001/02/05 16:11:57 enno Exp $
|
||||
* $Id: creport.c,v 1.6 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -20,46 +20,46 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "eressea.h"
|
||||
#include <eressea.h>
|
||||
#include "creport.h"
|
||||
|
||||
#include <reports.h>
|
||||
#include <plane.h>
|
||||
#include <render.h>
|
||||
#include "movement.h"
|
||||
#include "item.h"
|
||||
#include "faction.h"
|
||||
#include "alchemy.h"
|
||||
#include "magic.h"
|
||||
#include "race.h"
|
||||
#include "building.h"
|
||||
#include "economy.h"
|
||||
#include "goodies.h"
|
||||
#include "region.h"
|
||||
#include "unit.h"
|
||||
#include "skill.h"
|
||||
#include "message.h"
|
||||
#include "border.h"
|
||||
#include "teleport.h"
|
||||
#include "ship.h"
|
||||
#include "karma.h"
|
||||
#ifdef GROUPS
|
||||
#include "group.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* modules include */
|
||||
#include <modules/score.h>
|
||||
|
||||
/* attributes include */
|
||||
#include <attributes/follow.h>
|
||||
|
||||
/* gamecode includes */
|
||||
#include "laws.h"
|
||||
#include "economy.h"
|
||||
|
||||
/* kernel includes */
|
||||
#include <alchemy.h>
|
||||
#include <border.h>
|
||||
#include <building.h>
|
||||
#include <faction.h>
|
||||
#include <group.h>
|
||||
#include <item.h>
|
||||
#include <karma.h>
|
||||
#include <magic.h>
|
||||
#include <message.h>
|
||||
#include <movement.h>
|
||||
#include <plane.h>
|
||||
#include <race.h>
|
||||
#include <region.h>
|
||||
#include <render.h>
|
||||
#include <reports.h>
|
||||
#include <ship.h>
|
||||
#include <skill.h>
|
||||
#include <teleport.h>
|
||||
#include <unit.h>
|
||||
|
||||
/* util includes */
|
||||
#include <goodies.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: economy.c,v 1.3 2001/02/03 13:45:29 enno Exp $
|
||||
* $Id: economy.c,v 1.4 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -46,6 +46,9 @@
|
|||
#include "reports.h"
|
||||
#include "karma.h"
|
||||
|
||||
/* gamecode includes */
|
||||
#include "laws.h"
|
||||
|
||||
/* util includes */
|
||||
#include <attrib.h>
|
||||
#include <base36.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: laws.c,v 1.8 2001/02/09 15:17:30 corwin Exp $
|
||||
* $Id: laws.c,v 1.9 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -2980,3 +2980,24 @@ processorders (void)
|
|||
write_skillfix();
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
count_migrants (const faction * f)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
unit *u = f->units;
|
||||
int n = 0;
|
||||
while (u) {
|
||||
assert(u->faction == f);
|
||||
if (u->race != f->race && u->race != RC_ILLUSION && u->race != RC_SPELL
|
||||
&& !nonplayer(u) && !(is_cursed(u->attribs, C_SLAVE, 0)))
|
||||
{
|
||||
n += u->number;
|
||||
}
|
||||
u = u->nextF;
|
||||
}
|
||||
if (f->num_migrants != n)
|
||||
puts("FEHLER: Anzahl Migranten falsch");
|
||||
#endif
|
||||
return f->num_migrants;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: laws.h,v 1.2 2001/01/26 16:19:39 enno Exp $
|
||||
* $Id: laws.h,v 1.3 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -42,5 +42,6 @@ extern void sinkships(void);
|
|||
extern void * resolve_ship(void * data);
|
||||
|
||||
void processorders(void);
|
||||
extern int count_migrants (const struct faction * f);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: randenc.c,v 1.6 2001/02/03 13:45:30 enno Exp $
|
||||
* $Id: randenc.c,v 1.7 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -1305,7 +1305,10 @@ randomevents(void)
|
|||
if(is_cursed(r->attribs, C_HOLYGROUND, 0)) continue;
|
||||
|
||||
/* Chance 0.1% * chaosfactor */
|
||||
if (unburied && r->land && rand() % 10000 < (100 + 100 * chaosfactor(r))) {
|
||||
if (r->land && unburied > r->land->peasants / 20 && rand() % 10000 < (100 + 100 * chaosfactor(r))) {
|
||||
/* es ist sinnfrei, wenn irgendwo im Wald 3er-Einheiten Untote entstehen.
|
||||
* Lieber sammeln lassen, bis sie mindestens 5% der Bevölkerung sind, und
|
||||
* dann erst auferstehen. */
|
||||
int undead = unburied / (rand() % 2 + 1);
|
||||
race_t rc;
|
||||
int i;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: report.c,v 1.11 2001/02/05 16:11:57 enno Exp $
|
||||
* $Id: report.c,v 1.12 2001/02/10 10:40:10 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -23,42 +23,47 @@
|
|||
#define INDENT 0
|
||||
|
||||
#include <config.h>
|
||||
#include "eressea.h"
|
||||
#include "reports.h"
|
||||
|
||||
#include "item.h"
|
||||
#include "alchemy.h"
|
||||
#include "faction.h"
|
||||
#include "region.h"
|
||||
#include "unit.h"
|
||||
#include "skill.h"
|
||||
#include "movement.h"
|
||||
#include "message.h"
|
||||
#include "ship.h"
|
||||
#include "building.h"
|
||||
#include "economy.h"
|
||||
#include "build.h"
|
||||
#include "creation.h"
|
||||
#include "save.h"
|
||||
#include "build.h"
|
||||
#include "magic.h"
|
||||
#include "race.h"
|
||||
#include "monster.h"
|
||||
#include "plane.h"
|
||||
#include "pool.h"
|
||||
#include "teleport.h"
|
||||
#include "border.h"
|
||||
#include "objtypes.h"
|
||||
#include "goodies.h"
|
||||
#include "karma.h"
|
||||
#include "render.h"
|
||||
#ifdef GROUPS
|
||||
#include "group.h"
|
||||
#endif
|
||||
#include <eressea.h>
|
||||
|
||||
/* modules includes */
|
||||
#include <modules/score.h>
|
||||
|
||||
/* attributes includes */
|
||||
#include <attributes/overrideroads.h>
|
||||
|
||||
/* gamecode includes */
|
||||
#include "creation.h"
|
||||
#include "economy.h"
|
||||
#include "monster.h"
|
||||
#include "laws.h"
|
||||
|
||||
/* kernel includes */
|
||||
#include <alchemy.h>
|
||||
#include <border.h>
|
||||
#include <build.h>
|
||||
#include <building.h>
|
||||
#include <faction.h>
|
||||
#include <group.h>
|
||||
#include <item.h>
|
||||
#include <karma.h>
|
||||
#include <magic.h>
|
||||
#include <message.h>
|
||||
#include <movement.h>
|
||||
#include <objtypes.h>
|
||||
#include <plane.h>
|
||||
#include <pool.h>
|
||||
#include <race.h>
|
||||
#include <region.h>
|
||||
#include <render.h>
|
||||
#include <reports.h>
|
||||
#include <save.h>
|
||||
#include <ship.h>
|
||||
#include <skill.h>
|
||||
#include <teleport.h>
|
||||
#include <unit.h>
|
||||
|
||||
/* util includes */
|
||||
#include <goodies.h>
|
||||
#include <base36.h>
|
||||
|
||||
/* libc includes */
|
||||
|
@ -861,8 +866,6 @@ see_border(border * b, faction * f, region * r)
|
|||
return cs;
|
||||
}
|
||||
|
||||
extern attrib_type at_roads_override;
|
||||
|
||||
static void
|
||||
describe(FILE * F, region * r, int partial, faction * f)
|
||||
{
|
||||
|
@ -1025,7 +1028,7 @@ describe(FILE * F, region * r, int partial, faction * f)
|
|||
}
|
||||
|
||||
if (!is_cursed(r->attribs, C_REGCONF, 0)) {
|
||||
attrib *a_do = a_find(r->attribs, &at_roads_override);
|
||||
attrib *a_do = a_find(r->attribs, &at_overrideroads);
|
||||
if(a_do) {
|
||||
scat(" ");
|
||||
scat((char *)a_do->data.v);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: alchemy.c,v 1.4 2001/02/09 13:53:51 corwin Exp $
|
||||
* $Id: alchemy.c,v 1.5 2001/02/10 10:40:11 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -178,8 +178,9 @@ a_readeffect(attrib *a, FILE *f)
|
|||
ptype = oldpotiontype[data.sa[0]];
|
||||
power = data.sa[1];
|
||||
} else {
|
||||
fscanf(f, "%s %d", buf, &power);
|
||||
ptype = pt_find(buf);
|
||||
char zText[32];
|
||||
fscanf(f, "%s %d", zText, &power);
|
||||
ptype = pt_find(zText);
|
||||
}
|
||||
if (ptype==NULL || power==0) return 0;
|
||||
edata->type = ptype;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: battle.c,v 1.8 2001/02/09 15:17:31 corwin Exp $
|
||||
* $Id: battle.c,v 1.9 2001/02/10 10:40:11 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -2449,8 +2449,9 @@ print_fighters(battle * b, cvector * fighters)
|
|||
int row = get_unitrow(df);
|
||||
|
||||
if (row != lastrow) {
|
||||
sprintf(buf, "... in der %d. Kampflinie:", row);
|
||||
battlerecord(b, buf);
|
||||
char zText[32];
|
||||
sprintf(zText, "... in der %d. Kampflinie:", row);
|
||||
battlerecord(b, zText);
|
||||
lastrow = row;
|
||||
}
|
||||
battle_punit(du, b);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: border.c,v 1.3 2001/01/28 08:01:51 enno Exp $
|
||||
* $Id: border.c,v 1.4 2001/02/10 10:40:11 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -89,18 +89,20 @@ read_borders(FILE * f)
|
|||
for (;;) {
|
||||
int fx, fy, tx, ty;
|
||||
unsigned int bid = 0;
|
||||
char zText[32];
|
||||
border * b;
|
||||
region * from, * to;
|
||||
border_type * type;
|
||||
fscanf(f, "%s", buf);
|
||||
if (!strcmp(buf, "end")) break;
|
||||
|
||||
fscanf(f, "%s", zText);
|
||||
if (!strcmp(zText, "end")) break;
|
||||
if (global.data_version<BORDERID_VERSION) {
|
||||
fscanf(f, "%d %d %d %d ", &fx, &fy, &tx, &ty);
|
||||
bid = ++nextborder;
|
||||
} else {
|
||||
fscanf(f, "%d %d %d %d %d", &bid, &fx, &fy, &tx, &ty);
|
||||
}
|
||||
type = find_bordertype(buf);
|
||||
type = find_bordertype(zText);
|
||||
assert(type || !"border type not registered");
|
||||
from = findregion(fx, fy);
|
||||
if (!from) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: eressea.c,v 1.10 2001/02/05 19:10:46 reich Exp $
|
||||
* $Id: eressea.c,v 1.11 2001/02/10 10:40:11 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -1028,27 +1028,6 @@ update_lighthouse(building * lh)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
count_migrants (const faction * f)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
region *r;
|
||||
unit *u;
|
||||
int n = 0;
|
||||
region *last = lastregion(f);
|
||||
for (r = firstregion(f); r != last; r = r->next)
|
||||
for (u = r->units; u; u = u->next)
|
||||
if (u->faction == f && u->race != f->race
|
||||
&& u->race != RC_ILLUSION && u->race != RC_SPELL
|
||||
&& !nonplayer(u))
|
||||
if(!(is_cursed(u->attribs, C_SLAVE, 0)))
|
||||
n += u->number;
|
||||
if (f->num_migrants != n)
|
||||
puts("FEHLER: Anzahl Migranten falsch");
|
||||
#endif
|
||||
return f->num_migrants;
|
||||
}
|
||||
|
||||
int
|
||||
count_all(const faction * f)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: eressea.h,v 1.12 2001/02/05 16:11:58 enno Exp $
|
||||
* $Id: eressea.h,v 1.13 2001/02/10 10:40:11 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -995,7 +995,6 @@ char *shipname(const ship * sh);
|
|||
|
||||
struct building *largestbuilding(const struct region * r, boolean img);
|
||||
|
||||
int count_migrants(const struct faction * f);
|
||||
int count_all(const struct faction * f);
|
||||
int teure_talente(struct unit * u);
|
||||
int count_maxmigrants(const struct faction * f);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: event.h,v 1.2 2001/01/26 16:19:41 enno Exp $
|
||||
* $Id: event.h,v 1.3 2001/02/10 10:40:12 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -21,12 +21,12 @@ struct attrib;
|
|||
struct trigger;
|
||||
|
||||
typedef union {
|
||||
void * v;
|
||||
int i;
|
||||
char c;
|
||||
void *v;
|
||||
int i;
|
||||
char c;
|
||||
short s;
|
||||
short sa[2];
|
||||
char ca[4];
|
||||
char ca[4];
|
||||
} variant;
|
||||
|
||||
typedef struct trigger_type {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vi: set ts=2:
|
||||
*
|
||||
* $Id: umlaut.c,v 1.2 2001/01/26 16:19:41 enno Exp $
|
||||
* $Id: umlaut.c,v 1.3 2001/02/10 10:40:12 enno Exp $
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
|
@ -30,7 +30,7 @@
|
|||
void
|
||||
addtoken(tnode * root, const char* str, void * id)
|
||||
{
|
||||
static char buf[1024];
|
||||
static char zText[1024];
|
||||
static struct replace {
|
||||
char c;
|
||||
const char * str;
|
||||
|
@ -66,8 +66,8 @@ addtoken(tnode * root, const char* str, void * id)
|
|||
addtoken(tk, str+1, id);
|
||||
while (replace[i].str) {
|
||||
if (*str==replace[i].c) {
|
||||
strcat(strcpy(buf, replace[i].str), str+1);
|
||||
addtoken(root, buf, id);
|
||||
strcat(strcpy(zText, replace[i].str), str+1);
|
||||
addtoken(root, zText, id);
|
||||
break;
|
||||
}
|
||||
++i;
|
||||
|
|
|
@ -112,7 +112,7 @@ LIB32=link.exe -lib
|
|||
# PROP Intermediate_Dir "Profile"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /I "../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /GX- /Z7 /O2 /I "../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /Za /W4 /Z7 /O2 /I "../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x407
|
||||
# ADD RSC /l 0x407
|
||||
BSC32=bscmake.exe
|
||||
|
@ -236,6 +236,10 @@ SOURCE=.\resolve.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\translation.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\umlaut.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Reference in New Issue