Advanced Strategic Command
Classes | Macros | Functions | Variables
edgen.cpp File Reference

The random map generator. More...

#include "global.h"
#include "edmisc.h"
#include "edgen.h"
#include "vehicletype.h"
#include "itemrepository.h"
#include "paradialog.h"
#include "spfst-legacy.h"
Include dependency graph for edgen.cpp:

Go to the source code of this file.

Classes

class  tmapgenerator
 

Macros

#define layercount   5
 
#define centerlayer   65000
 
#define maxoverwrite   5
 
#define enhance   1000
 

Functions

int mapgenerator (void)
 
int random2 (int max)
 

Variables

const char * clayer [layercount] = {"Land", "Forest", "Desert","Material","Fuel"}
 
int matdiv [3]
 
int fueldiv [3]
 
int terrain_object_ids [numofbdts][2][2]
 

Detailed Description

The random map generator.

Interface for the random map generator.

Definition in file edgen.cpp.

Macro Definition Documentation

#define centerlayer   65000
#define enhance   1000
#define layercount   5

Definition at line 33 of file edgen.cpp.

Referenced by tmapgenerator::buttonpressed(), tmapgenerator::init(), and tmapgenerator::run().

#define maxoverwrite   5

Definition at line 35 of file edgen.cpp.

Function Documentation

int mapgenerator ( void  )

Definition at line 858 of file edgen.cpp.

References tdialogbox::done(), tmapgenerator::init(), and tmapgenerator::run().

Referenced by execaction().

int random2 ( int  max)

Definition at line 868 of file edgen.cpp.

Referenced by tplasma::generateplasma().

Variable Documentation

const char* clayer[layercount] = {"Land", "Forest", "Desert","Material","Fuel"}

Definition at line 69 of file edgen.cpp.

Referenced by tmapgenerator::buttonpressed(), and tmapgenerator::init().

int fueldiv[3]

Definition at line 487 of file edgen.cpp.

Referenced by tmapgenerator::setfuel(), and tmapgenerator::setmap().

int matdiv[3]

Definition at line 486 of file edgen.cpp.

Referenced by tmapgenerator::setmap(), and tmapgenerator::setmaterial().

int terrain_object_ids[numofbdts][2][2]
Initial value:
= {{{ 299, -1 }, { 307, -1 }},
{{ 28 , -1 }, { 38 , -1 }},
{{ 30 , -1 }, { 40 , -1 }},
{{ 30 , -1 }, { 40 , -1 }},
{{ 34 , -1 }, { 35 , -1 }},
{{ 299, -1 }, { 307, -1 }},
{{ 301, -1 }, { 308, -1 }},
{{ 302, -1 }, { 309, -1 }},
{{ 30 , -1 }, { 40 , -1 }},
{{ 30 , -1 }, { 40 , -1 }},
{{ 30 , -1 }, { 40 , -1 }},
{{ 30 , -1 }, { 40 , -1 }}}

Definition at line 516 of file edgen.cpp.

Referenced by tmapgenerator::setmap().