diff --git a/src/common/gamecode/gamecode-6.dsp b/src/common/gamecode/gamecode-6.dsp index 0980aa6fb..e8970cd34 100644 --- a/src/common/gamecode/gamecode-6.dsp +++ b/src/common/gamecode/gamecode-6.dsp @@ -66,7 +66,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Za /W4 /Z7 /Od /I "../util" /I "../kernel" /I "../.." /I ".." /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "BETA_CODE" /FR /YX"stdafx.h" /FD /c +# ADD CPP /nologo /Za /W4 /Z7 /Od /I "../kernel" /I "../util" /I ".." /I "../.." /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "BETA_CODE" /FR /YX"stdafx.h" /FD /c # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe @@ -114,7 +114,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Profile" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /I "../util" /I "../kernel" /I "../.." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Za /W4 /GX- /Z7 /O2 /I "../util" /I "../kernel" /I "../.." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /Za /W4 /Z7 /O2 /I "../util" /I "../kernel" /I "../.." /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe diff --git a/src/common/kernel/kernel-6.dsp b/src/common/kernel/kernel-6.dsp index 435a49cab..4f1ea9c72 100644 --- a/src/common/kernel/kernel-6.dsp +++ b/src/common/kernel/kernel-6.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /Za /W4 /GX /Z7 /O2 /I "../util" /I "../.." /I ".." /D "_WINDOWS" /D "WIN32" /D "NDEBUG" /D "CONVERT_TRIGGER" /YX /FD /c +# ADD CPP /nologo /Za /W4 /GX /Z7 /O2 /I "../util" /I "../.." /I ".." /D "_WINDOWS" /D "WIN32" /D "NDEBUG" /YX /FD /c # ADD BASE RSC /l 0x407 # ADD RSC /l 0x407 BSC32=bscmake.exe diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index 105a61695..d540d9b0c 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: magic.c,v 1.8 2001/02/15 02:41:46 enno Exp $ + * $Id: magic.c,v 1.9 2001/02/17 15:02:49 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) @@ -579,7 +579,7 @@ find_spellbyname(unit *u, char *s) } } - if (findtoken(&spellnames, s, (void**)&i) && getspell(u, spelldaten[i].id)) return &spelldaten[i]; + if (findtoken(&spellnames, s, (void**)&i)==0 && getspell(u, spelldaten[i].id)) return &spelldaten[i]; return (spell *) NULL; } diff --git a/src/common/kernel/movement.c b/src/common/kernel/movement.c index 0dda8f7fb..f8fa9eb9c 100644 --- a/src/common/kernel/movement.c +++ b/src/common/kernel/movement.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: movement.c,v 1.9 2001/02/14 07:44:57 enno Exp $ + * $Id: movement.c,v 1.10 2001/02/17 15:02:49 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) @@ -1136,44 +1136,48 @@ travel(region * first, unit * u, region * next, int flucht) ut = getunit(first, u); if (ut) { - if (igetkeyword(ut->thisorder) == K_DRIVE) { - u2 = getunit(first, ut); - if (!u2) { - cmistake(ut, ut->thisorder, 64, MSG_MOVE); - continue; - } else { -#ifndef NEW_DRIVE - restkapazitaet -= weight(ut); - if (restkapazitaet >= 0) { -#endif - add_message(&u->faction->msgs, new_message( - u->faction, "transport%u:unit%u:target%r:start%r:end", - u, ut, first, current)); - - if(!(terrain[current->terrain].flags & WALK_INTO) - && get_item(ut, I_HORSE)) { - cmistake(ut, ut->thisorder, 67, MSG_MOVE); - continue; - } - if(can_survive(ut, current)) { - for (i = 0; i != m; i++) - travelthru(ut, rv[i]); - move_unit(ut, current, NULL); - } else { - cmistake(ut, ut->thisorder, 230, MSG_MOVE); - continue; - } -#ifndef NEW_DRIVE + boolean found = false; + strlist * ot; + for(ot=ut->orders;ot && !found;ot = ot->next) { + if (igetkeyword(ot->s) == K_DRIVE) { + u2 = getunit(first, ut); + if (!u2) { + cmistake(ut, ut->thisorder, 64, MSG_MOVE); + continue; } else { - sprintf(buf, "Keine Transportkapazitäten" - " frei für %s und deren Gepäck.", unitname(ut)); - mistake(u, u->thisorder, buf, MSG_MOVE); - } +#ifndef NEW_DRIVE + restkapazitaet -= weight(ut); + if (restkapazitaet >= 0) { #endif + add_message(&u->faction->msgs, new_message( + u->faction, "transport%u:unit%u:target%r:start%r:end", + u, ut, first, current)); + + if(!(terrain[current->terrain].flags & WALK_INTO) + && get_item(ut, I_HORSE)) { + cmistake(ut, ut->thisorder, 67, MSG_MOVE); + continue; + } + if(can_survive(ut, current)) { + for (i = 0; i != m; i++) + travelthru(ut, rv[i]); + move_unit(ut, current, NULL); + } else { + cmistake(ut, ut->thisorder, 230, MSG_MOVE); + continue; + } +#ifndef NEW_DRIVE + } else { + sprintf(buf, "Keine Transportkapazitäten" + " frei für %s und deren Gepäck.", unitname(ut)); + mistake(u, u->thisorder, buf, MSG_MOVE); + } +#endif + } + found = true; } - } else { - cmistake(u, u->thisorder, 90, MSG_MOVE); } + if (!found) cmistake(u, u->thisorder, 90, MSG_MOVE); } else { if (ut) { sprintf(buf, diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index cd66510b9..da464ff32 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: save.c,v 1.18 2001/02/14 22:34:49 enno Exp $ + * $Id: save.c,v 1.19 2001/02/17 15:02:49 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) @@ -455,7 +455,10 @@ readfaction(void) * muß in "Gänsefüßchen" stehen!! */ /* War vorher in main.c:getgarbage() */ - if (!quiet) { printf(" %4s;", factionid(f)); fflush(stdout); } + if (1 || !quiet) { + printf(" %4s;", factionid(f)); + fflush(stdout); + } freestrlist(f->mistakes); f->mistakes = 0; @@ -488,26 +491,27 @@ int readorders(const char *filename) { FILE * F; - faction *f; char *b; - int p; + int nfactions=0; + struct faction *f = NULL; - F = cfopen(filename, "r"); + F = cfopen(filename, "rt"); if (F==NULL) return 0; - printf(" - lese Befehlsdatei...\n"); + puts(" - lese Befehlsdatei...\n"); b = getbuf(F); /* Auffinden der ersten Partei, und danach abarbeiten bis zur letzten * Partei */ - f = 0; - while (b) { + int p; + switch (igetparam(b)) { case P_FACTION: f = readfaction(); + if (f) ++nfactions; b = getbuf(F); @@ -541,7 +545,8 @@ readorders(const char *filename) } fclose(F); - printf("\n"); + puts("\n"); + printf(" %d Befehlsdateien gelesen\n", nfactions); return 0; } /* ------------------------------------------------------------- */ diff --git a/src/common/util/umlaut.c b/src/common/util/umlaut.c index b7725b376..de954efd4 100644 --- a/src/common/util/umlaut.c +++ b/src/common/util/umlaut.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: umlaut.c,v 1.5 2001/02/15 02:41:47 enno Exp $ + * $Id: umlaut.c,v 1.6 2001/02/17 15:02:50 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) @@ -119,14 +119,12 @@ findtoken(tnode * tk, const char * str, void **result) ++str; if (!ref) return E_TOK_NOMATCH; tk = ref->node; - if (tk && !(tk->flags & SHARED)) { + } + if (tk) { + if (tk->flags & LEAF || !(tk->flags & SHARED)) { *result = tk->id; return E_TOK_SUCCESS; } } - if (tk && (tk->flags & LEAF)) { - *result = tk->id; - return E_TOK_SUCCESS; - } return E_TOK_NOMATCH; } diff --git a/src/eressea-6.opt b/src/eressea-6.opt deleted file mode 100644 index 50127f757..000000000 Binary files a/src/eressea-6.opt and /dev/null differ diff --git a/src/eressea/eressea-6.dsp b/src/eressea/eressea-6.dsp index b304072f7..9b12c2e1c 100644 --- a/src/eressea/eressea-6.dsp +++ b/src/eressea/eressea-6.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /Za /W4 /GX /Z7 /O2 /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "NDEBUG" /D "CONVERT_TRIGGER" /FR /YX /FD /c +# ADD CPP /nologo /Za /W4 /GX /Z7 /O2 /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "NDEBUG" /FR /YX /FD /c # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /Za /W4 /Gm /ZI /Od /I ".." /I "../common" /I "../common/util" /I "../common/kernel" /I "../common/gamecode" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "_DEBUG" /D "BETA_CODE" /FR /YX"stdafx.h" /FD /c +# ADD CPP /nologo /Za /W4 /Gm /ZI /Od /I "../common/gamecode" /I "../common/kernel" /I "../common/util" /I ".." /I "../common" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "_DEBUG" /D "BETA_CODE" /FR /YX"stdafx.h" /FD /c # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe @@ -170,6 +170,8 @@ SOURCE=.\old\pointertags.c !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1 @@ -190,6 +192,8 @@ SOURCE=.\old\pointertags.h !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1 @@ -210,6 +214,8 @@ SOURCE=.\old\relation.c !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1 @@ -230,6 +236,8 @@ SOURCE=.\old\relation.h !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1 @@ -250,6 +258,8 @@ SOURCE=.\old\trigger.c !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1 @@ -270,6 +280,8 @@ SOURCE=.\old\trigger.h !IF "$(CFG)" == "eressea - Win32 Release" +# PROP Exclude_From_Build 1 + !ELSEIF "$(CFG)" == "eressea - Win32 Debug" # PROP Exclude_From_Build 1