Mapper setzt zufällig kleine Inseln in den Ozean.

This commit is contained in:
Enno Rehling 2004-09-05 13:02:09 +00:00
parent f596ea5a8d
commit 3e53d8bd09
4 changed files with 61 additions and 51 deletions

View File

@ -372,10 +372,13 @@ mkisland(int nsize)
}
}
if (rlist) {
region_list ** rbegin = &rlist;
int i;
#define MINOCEANDIST 3
#define MAXFILLDIST 10
#define SPECIALCHANCE 80
region_list ** rbegin = &rlist;
int i;
int special = 1;
for (i=0;i!=MINOCEANDIST;++i) {
region_list ** rend = rbegin;
while (*rend) rend=&(*rend)->next;
@ -386,8 +389,15 @@ mkisland(int nsize)
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
if (rn==NULL) {
terrain_t terrain = T_OCEAN;
rn = new_region(r->x + delta_x[d], r->y + delta_y[d]);
terraform(rn, T_OCEAN);
if (rand() % SPECIALCHANCE < special) {
terrain = (terrain_t)(1 + rand() % T_GLACIER);
special = SPECIALCHANCE / 3; /* 33% chance auf noch eines */
} else {
special = 1;
}
terraform(rn, terrain);
add_regionlist(rend, rn);
}
}

View File

@ -85,7 +85,7 @@ terrain_create(int climate)
return terrain;
}
static char newblock[BLOCKSIZE][BLOCKSIZE];
static terrain_t newblock[BLOCKSIZE][BLOCKSIZE];
static int g_maxluxuries;
void

View File

@ -236,7 +236,7 @@ read_newfactions(const char * filename)
char race[20], email[64], lang[8], password[16];
newfaction *nf;
int bonus, subscription;
int alliance;
int alliance = 0;
if (alliances!=NULL) {
/* email;race;locale;startbonus;subscription;alliance */

View File

@ -83,7 +83,7 @@
Name="VCCLCompilerTool"
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories="$(CURSES_ROOT)/include;../common/kernel,../common/gamecode,../common/util,../common,.."
AdditionalIncludeDirectories="../common/kernel,../common/gamecode,../common/util,../common,.."
PreprocessorDefinitions="_CONSOLE,WIN32"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@ -107,7 +107,7 @@
OutputFile=".\Debug/mapper.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="$(CURSES_ROOT)\lib"
AdditionalLibraryDirectories=""
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/mapper.pdb"
SubSystem="1"/>