From 7d45756141022b97ee52e3ddec7162384e42c7ff Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 10 Feb 2001 14:18:01 +0000 Subject: [PATCH] u_setfaction routine --- src/common/gamecode/economy.c | 4 +-- src/common/gamecode/laws.c | 4 +-- src/common/gamecode/randenc.c | 4 +-- src/common/kernel/combatspells.c | 2 +- src/common/kernel/eressea.c | 57 ++--------------------------- src/common/kernel/eressea.h | 6 +--- src/common/kernel/item.c | 4 +-- src/common/kernel/save.c | 8 ++--- src/common/kernel/spell.c | 6 ++-- src/common/kernel/unit.c | 59 +++++++++++++++++++++++++++++-- src/common/kernel/unit.h | 5 ++- src/eressea-6.opt | Bin 134094 -> 125440 bytes src/eressea/korrektur.c | 6 ++-- src/eressea/old/trigger.c | 4 +-- 14 files changed, 84 insertions(+), 85 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 2707bc7eb..4ba41dbde 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: economy.c,v 1.4 2001/02/10 10:40:10 enno Exp $ + * $Id: economy.c,v 1.5 2001/02/10 14:17:59 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) @@ -711,7 +711,7 @@ giveunit(region * r, unit * u, unit * u2, strlist * S) new_message(u2->faction, "give%u:unit%u:target%r:region%X:resource%i:amount", u?&u_peasants:(cansee(u2->faction, u->region, u, 0)?u:NULL), u2, u->region, r_unit, 1)); - set_faction(u, u2->faction); + u_setfaction(u, u2->faction); u2->faction->newbies += n; /* "Ich gebe einer Partei eine Einheit, die den Befehl hat, effektiv diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 17e0c785b..05a9dc7ba 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: laws.c,v 1.9 2001/02/10 10:40:10 enno Exp $ + * $Id: laws.c,v 1.10 2001/02/10 14:18:00 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) @@ -2527,7 +2527,7 @@ new_units (void) u2 = createunitid(r, u->faction, 0, u->faction->race, alias, name); a_add(&u2->attribs, a_new(&at_alias))->data.i = alias; - set_faction(u2, u->faction); + u_setfaction(u2, u->faction); u2->building = u->building; u2->ship = u->ship; diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index 2156ca850..05f615b5a 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: randenc.c,v 1.8 2001/02/10 14:07:29 corwin Exp $ + * $Id: randenc.c,v 1.9 2001/02/10 14:18:00 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) @@ -519,7 +519,7 @@ chaos(region * r) sprintf(buf, "%s scheint von einer seltsamen Krankheit befallen.", unitname(u)); addmessage(0, u->faction, buf, MSG_EVENT, ML_IMPORTANT); - set_faction(u, findfaction(MONSTER_FACTION)); + u_setfaction(u, findfaction(MONSTER_FACTION)); u->race = RC_GHOUL; } } diff --git a/src/common/kernel/combatspells.c b/src/common/kernel/combatspells.c index 08b2bbf91..4ead8a3bb 100644 --- a/src/common/kernel/combatspells.c +++ b/src/common/kernel/combatspells.c @@ -1542,7 +1542,7 @@ sp_undeadhero(fighter * fi, int level, int force, spell * sp) du->race = RC_UNDEAD; setguard(du, GUARD_NONE); - set_faction(du,mage->faction); + u_setfaction(du,mage->faction); if (fval(mage, FL_PARTEITARNUNG)) fset(du, FL_PARTEITARNUNG); df->alive = du->number; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index a7061b7cb..22a830443 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: eressea.c,v 1.11 2001/02/10 10:40:11 enno Exp $ + * $Id: eressea.c,v 1.12 2001/02/10 14:18:00 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) @@ -629,59 +629,6 @@ eff_stealth (const unit * u, const region * r) return e; } -void -set_faction (unit * u, faction * f) -{ - int cnt = u->number; - if (u->faction==f) return; -#ifndef NDEBUG - assert(u->debug_number == u->number); -#endif - if (u->faction) { - set_number(u, 0); - join_group(u, NULL); - } - if (u->prevF) u->prevF->nextF = u->nextF; - else if (u->faction) { - assert(u->faction->units==u); - u->faction->units = u->nextF; - } - if (u->nextF) u->nextF->prevF = u->prevF; - - if (f!=NULL) { - u->nextF = f->units; - f->units = u; - } - else u->nextF = NULL; - if (u->nextF) u->nextF->prevF = u; - u->prevF = NULL; - - u->faction = f; - if (cnt && f) set_number(u, cnt); -} - -/* vorsicht Sprüche können u->number == 0 (RS_FARVISION) haben! */ -void -set_number (unit * u, int count) -{ - assert (count >= 0); -#ifndef NDEBUG - assert (u->debug_number == u->number); - assert (u->faction != 0 || u->number > 0); -#endif - if (u->faction && u->race != u->faction->race && !nonplayer(u) - && u->race != RC_SPELL && u->race != RC_SPECIAL - && !(is_cursed(u->attribs, C_SLAVE, 0))){ - u->faction->num_migrants += count - u->number; - } - - u->faction->num_people += count - u->number; - u->number = count; -#ifndef NDEBUG - u->debug_number = count; -#endif -} - void scale_number (unit * u, int n) { @@ -1577,7 +1524,7 @@ createunitid(region * r1, faction * f, int number, race_t race, int id, const ch unit * u = calloc(1, sizeof(unit)); assert(f->alive); - set_faction(u, f); + u_setfaction(u, f); set_string(&u->thisorder, ""); set_string(&u->lastorder, keywords[K_WORK]); u_seteffstealth(u, -1); diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index d2bc14e00..b5616365e 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: eressea.h,v 1.14 2001/02/10 13:20:09 enno Exp $ + * $Id: eressea.h,v 1.15 2001/02/10 14:18:00 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) @@ -1015,11 +1015,8 @@ char * set_string(char **s, const char *neu); int check_option(struct faction * f, int option); -void set_number(struct unit * u, int number); - /* Anzahl Personen in einer Einheit festlegen. NUR (!) mit dieser Routine, * sonst großes Unglück. Durch asserts an ein paar Stellen abgesichert. */ -void set_faction(struct unit * u, struct faction * f); void verify_data(void); void stripfaction(struct faction * f); @@ -1039,7 +1036,6 @@ struct region *lastregion(struct faction * f); #define f_koor_x(x) x-f->ursprung[0] #define f_koor_y(y) y-f->ursprung[1] -void set_faction(struct unit * u, struct faction * f); void inituhash(void); void uhash(struct unit * u); void uunhash(struct unit * u); diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index 3f9ddb6df..0dec1ec9d 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: item.c,v 1.7 2001/02/10 13:20:09 enno Exp $ + * $Id: item.c,v 1.8 2001/02/10 14:18:00 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) @@ -1772,7 +1772,7 @@ use_bloodpotion(struct unit *u, const struct potion_type *ptype, const char *cmd /* bekommt nicht: */ cmistake(u, cmd, 165, MSG_EVENT); u->race = RC_GHOUL; - set_faction(u, findfaction(MONSTER_FACTION)); + u_setfaction(u, findfaction(MONSTER_FACTION)); } return 0; } diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index af16f1bba..f4b045f56 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.12 2001/02/10 12:50:29 corwin Exp $ + * $Id: save.c,v 1.13 2001/02/10 14:18:00 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) @@ -1202,7 +1202,7 @@ readgame(boolean backup) } else { n = ri(F); } - set_faction(u, findfaction(n)); + u_setfaction(u, findfaction(n)); } uhash(u); rds(F, &u->name); @@ -1227,7 +1227,7 @@ readgame(boolean backup) } else { n = ri(F); } - set_faction(u, findfaction(n)); + u_setfaction(u, findfaction(n)); u->race = typus2race(oldtypus); u->irace = typus2race(olditypus); @@ -1273,7 +1273,7 @@ readgame(boolean backup) u->race = (race_t) ri(F); u->irace = (race_t) ri(F); if (global.data_versionfaction == NULL) fprintf(stderr,"\nEinheit %s hat faction==NULL\n",unitname(u)); diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index d160a4784..0f6dd06d4 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: spell.c,v 1.8 2001/02/04 09:46:47 corwin Exp $ + * $Id: spell.c,v 1.9 2001/02/10 14:18:00 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) @@ -3827,7 +3827,7 @@ sp_charmingsong(castorder *co) create_curse(mage, &target->attribs, C_SLAVE, 0, force, duration, 0, 0); /* setze Partei um und lösche langen Befehl aus Sicherheitsgründen */ - set_faction(target,mage->faction); + u_setfaction(target,mage->faction); set_string(&target->thisorder, ""); /* setze Parteitarnung, damit nicht sofort klar ist, wer dahinter @@ -4138,7 +4138,7 @@ sp_migranten(castorder *co) addmessage(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE); return 0; } - set_faction(target,mage->faction); + u_setfaction(target,mage->faction); set_string(&target->thisorder, ""); /* Erfolg melden */ diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 66be961aa..acaa02bc9 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: unit.c,v 1.4 2001/02/03 13:45:32 enno Exp $ + * $Id: unit.c,v 1.5 2001/02/10 14:18:00 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) @@ -127,14 +127,14 @@ destroy_unit(unit * u) } } if (zombie) { - set_faction(u, findfaction(MONSTER_FACTION)); + u_setfaction(u, findfaction(MONSTER_FACTION)); scale_number(u, 1); u->race = u->irace = RC_ZOMBIE; } else { if (r && rterrain(r) != T_OCEAN) rsetmoney(r, rmoney(r) + get_money(u)); dhash(u->no, u->faction); - set_faction(u, NULL); + u_setfaction(u, NULL); if (r) leave(r, u); uunhash(u); if (r) choplist(&r->units, u); @@ -749,3 +749,56 @@ struct building * inside_building(const struct unit * u) } return NULL; } + +void +u_setfaction(unit * u, faction * f) +{ + int cnt = u->number; + if (u->faction==f) return; +#ifndef NDEBUG + assert(u->debug_number == u->number); +#endif + if (u->faction) { + set_number(u, 0); + join_group(u, NULL); + } + if (u->prevF) u->prevF->nextF = u->nextF; + else if (u->faction) { + assert(u->faction->units==u); + u->faction->units = u->nextF; + } + if (u->nextF) u->nextF->prevF = u->prevF; + + if (f!=NULL) { + u->nextF = f->units; + f->units = u; + } + else u->nextF = NULL; + if (u->nextF) u->nextF->prevF = u; + u->prevF = NULL; + + u->faction = f; + if (cnt && f) set_number(u, cnt); +} + +/* vorsicht Sprüche können u->number == 0 (RS_FARVISION) haben! */ +void +set_number (unit * u, int count) +{ + assert (count >= 0); +#ifndef NDEBUG + assert (u->debug_number == u->number); + assert (u->faction != 0 || u->number > 0); +#endif + if (u->faction && u->race != u->faction->race && !nonplayer(u) + && u->race != RC_SPELL && u->race != RC_SPECIAL + && !(is_cursed(u->attribs, C_SLAVE, 0))){ + u->faction->num_migrants += count - u->number; + } + + u->faction->num_people += count - u->number; + u->number = count; +#ifndef NDEBUG + u->debug_number = count; +#endif +} diff --git a/src/common/kernel/unit.h b/src/common/kernel/unit.h index 305754507..052e1ef67 100644 --- a/src/common/kernel/unit.h +++ b/src/common/kernel/unit.h @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: unit.h,v 1.3 2001/02/03 13:45:33 enno Exp $ + * $Id: unit.h,v 1.4 2001/02/10 14:18:00 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) @@ -183,4 +183,7 @@ extern struct building * inside_building(const struct unit * u); /* cleanup code for this module */ extern void free_units(void); extern struct faction * dfindhash(int i); +extern void u_setfaction(struct unit * u, struct faction * f); +/* vorsicht Sprüche können u->number == 0 (RS_FARVISION) haben! */ +extern void set_number(struct unit * u, int count); #endif diff --git a/src/eressea-6.opt b/src/eressea-6.opt index 9fdc89f3236c1e41b6cccc7c7c04b21123e2fcee..c066ec2860bca577e6503b6ff353c19e6c7bb36f 100644 GIT binary patch delta 5596 zcmc&&drVVT7{6a>OL+;EQd&SL4l|eVawBeR#t7xH?1dptaU)8F3n^S$XbVPk(k*6T z)9By;hiyJE`@_LZW~@sW9lC{>sTtD8lDiXr_dDOY z=k)x}?|k<=_u`={=l6l{B!jFu%!$8qlSzr#T|EK34#kVOG$^4n8WQ=}*$E_5B< zU5^kOoB>HGtWt#y0-_pWL0Azrh+2dVVMnljdr5ylWLyJ!n-NqDVJpfvNAyc^2LQ{vS;nZhv@B`P4AZ0O`szUtqsc6jGl%}v^GEqscUOg zSBeen!f_>ka2(LA0f>+BtC6xawai`voQgB9v{@_pQU~4J1+k>2Lq}@bgUPmbBgyU1 zkpA|VQ19Ah_(R|%K=auR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s, new_message(u1->faction, "give%u:unit%u:target%r:region%X:resource%i:amount", u1, u2, u1->region, r_unit, 1)); - set_faction(u1, u2->faction); + u_setfaction(u1, u2->faction); add_message(&u2->faction->msgs, new_message(u1->faction, "give%u:unit%u:target%r:region%X:resource%i:amount", u1, u2, u1->region, r_unit, 1)); diff --git a/src/eressea/old/trigger.c b/src/eressea/old/trigger.c index deb4f9b1d..32c55ea45 100644 --- a/src/eressea/old/trigger.c +++ b/src/eressea/old/trigger.c @@ -1,6 +1,6 @@ /* vi: set ts=2: * - * $Id: trigger.c,v 1.2 2001/02/03 13:45:34 enno Exp $ + * $Id: trigger.c,v 1.3 2001/02/10 14:18:01 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) @@ -523,7 +523,7 @@ do_actions(void) faction *f; assert(act->typ == TYP_UNIT); f = findfaction_unique_id(act->i[0]); - set_faction((unit*)act->obj, f); + u_setfaction((unit*)act->obj, f); break; } case AC_CREATEUNIT:{