forked from github/server
Makefille and mapper changes required to use the new code.
This commit is contained in:
parent
8823db9702
commit
cd944cf98c
|
@ -1169,9 +1169,9 @@ extern const char * dbrace(const struct race * rc);
|
||||||
extern void set_param(struct param ** p, const char * name, const char * data);
|
extern void set_param(struct param ** p, const char * name, const char * data);
|
||||||
extern const char* get_param(const struct param * p, const char * name);
|
extern const char* get_param(const struct param * p, const char * name);
|
||||||
|
|
||||||
extern int NMRTimeout();
|
extern int NMRTimeout(void);
|
||||||
extern int LongHunger();
|
extern int LongHunger(void);
|
||||||
extern boolean TradeDisabled();
|
extern boolean TradeDisabled(void);
|
||||||
extern int SkillCap(skill_t sk);
|
extern int SkillCap(skill_t sk);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -3,7 +3,7 @@ SUBDIRS =
|
||||||
LIBRARY = libe-modules.a
|
LIBRARY = libe-modules.a
|
||||||
BINARY =
|
BINARY =
|
||||||
|
|
||||||
SOURCES = $(wildcard *.c)
|
SOURCES = alliance.c arena.c dungeon.c gmcmd.c infocmd.c museum.c score.c victoryconditions.c xecmd.c xmas.c
|
||||||
OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o)
|
OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o)
|
||||||
|
|
||||||
include $(ERESSEA_SRC)/Makefile.include
|
include $(ERESSEA_SRC)/Makefile.include
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
#include <unit.h>
|
#include <unit.h>
|
||||||
|
|
||||||
/* modules */
|
/* modules */
|
||||||
|
#ifdef ALLIANCES
|
||||||
#include <modules/alliance.h>
|
#include <modules/alliance.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <base36.h>
|
#include <base36.h>
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
#include <item.h>
|
#include <item.h>
|
||||||
|
|
||||||
/* modules includes */
|
/* modules includes */
|
||||||
#include <modules/alliance.h>
|
#ifdef ALLIANCES
|
||||||
|
# include <modules/alliance.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <base36.h>
|
#include <base36.h>
|
||||||
|
@ -204,9 +206,9 @@ showregion(region * r, char full)
|
||||||
str[strlen(buf)+1] = 0;
|
str[strlen(buf)+1] = 0;
|
||||||
adddbllist(®list, str);
|
adddbllist(®list, str);
|
||||||
|
|
||||||
|
sprintf(buf, " %hd turns old:", r->age);
|
||||||
|
adddbllist(®list, buf);
|
||||||
if (r->terrain != T_OCEAN && r->terrain!=T_FIREWALL) {
|
if (r->terrain != T_OCEAN && r->terrain!=T_FIREWALL) {
|
||||||
sprintf(buf, " %hd turns old:", r->age);
|
|
||||||
adddbllist(®list, buf);
|
|
||||||
sprintf(buf, " %d peasants, %d(%d) silver", rpeasants(r), rmoney(r), count_all_money(r));
|
sprintf(buf, " %d peasants, %d(%d) silver", rpeasants(r), rmoney(r), count_all_money(r));
|
||||||
adddbllist(®list, buf);
|
adddbllist(®list, buf);
|
||||||
#if GROWING_TREES
|
#if GROWING_TREES
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <items/weapons.h>
|
#include <items/weapons.h>
|
||||||
#include <items/items.h>
|
#include <items/items.h>
|
||||||
|
|
||||||
#include <modules/xmas2000.h>
|
|
||||||
#include <modules/gmcmd.h>
|
#include <modules/gmcmd.h>
|
||||||
#ifdef ALLIANCES
|
#ifdef ALLIANCES
|
||||||
#include <modules/alliance.h>
|
#include <modules/alliance.h>
|
||||||
|
@ -367,9 +366,9 @@ newbie_region(region * r)
|
||||||
if (r==NULL || r->units==NULL) return 0;
|
if (r==NULL || r->units==NULL) return 0;
|
||||||
for (u=r->units;u;u=u->next) {
|
for (u=r->units;u;u=u->next) {
|
||||||
if (u->faction->age>10) return 0;
|
if (u->faction->age>10) return 0;
|
||||||
if (u->faction->age==0) return 1;
|
/* if (u->faction->age==0) return 1; */
|
||||||
}
|
}
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1557,6 +1556,36 @@ log_newstuff(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
frame_regions(void)
|
||||||
|
{
|
||||||
|
region * r = regions;
|
||||||
|
int lastage=r->age;
|
||||||
|
while (r!=0) {
|
||||||
|
if (r->age<20) {
|
||||||
|
if (r->age+1<lastage) r->age = lastage;
|
||||||
|
}
|
||||||
|
lastage=r->age;
|
||||||
|
r = r->next;
|
||||||
|
}
|
||||||
|
r = regions;
|
||||||
|
while (r!=0) {
|
||||||
|
if (r->terrain==T_OCEAN) {
|
||||||
|
direction_t d;
|
||||||
|
for (d=0;d!=6;++d) {
|
||||||
|
region * rn = rconnect(r, d);
|
||||||
|
if (rn!=0 && rn->terrain==T_OCEAN) {
|
||||||
|
if ((rn->age+5)*2<r->age && r->age<50) {
|
||||||
|
if (rn->units) log_printf("Cannot terraform %s\n", regionname(rn, NULL));
|
||||||
|
else terraform(rn, T_FIREWALL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r=r->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -1665,6 +1694,12 @@ main(int argc, char *argv[])
|
||||||
register_ships();
|
register_ships();
|
||||||
register_items();
|
register_items();
|
||||||
register_spells();
|
register_spells();
|
||||||
|
#ifdef MUSEUM_MODULE
|
||||||
|
register_museum();
|
||||||
|
#endif
|
||||||
|
#ifdef ARENA_MODULE
|
||||||
|
register_arena();
|
||||||
|
#endif
|
||||||
/* register_dungeon(); */
|
/* register_dungeon(); */
|
||||||
|
|
||||||
init_data(xmlfile?xmlfile:"eressea.xml");
|
init_data(xmlfile?xmlfile:"eressea.xml");
|
||||||
|
@ -1677,14 +1712,6 @@ main(int argc, char *argv[])
|
||||||
init_rawmaterials();
|
init_rawmaterials();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MUSEUM_MODULE
|
|
||||||
init_museum();
|
|
||||||
#endif
|
|
||||||
#ifdef ARENA_MODULE
|
|
||||||
init_arena();
|
|
||||||
#endif
|
|
||||||
init_xmas2000();
|
|
||||||
|
|
||||||
init_gmcmd();
|
init_gmcmd();
|
||||||
|
|
||||||
if(!*datafile)
|
if(!*datafile)
|
||||||
|
@ -1718,6 +1745,7 @@ main(int argc, char *argv[])
|
||||||
setminmax();
|
setminmax();
|
||||||
srand(time((time_t *) NULL));
|
srand(time((time_t *) NULL));
|
||||||
|
|
||||||
|
frame_regions();
|
||||||
if (autoseeding) {
|
if (autoseeding) {
|
||||||
runautoseed();
|
runautoseed();
|
||||||
remove_empty_units();
|
remove_empty_units();
|
||||||
|
|
Loading…
Reference in New Issue