GeoGen Development snapshot a3
Defines | Typedefs | Enumerations

ggen_support.h File Reference

Go to the source code of this file.

Defines

#define GGEN_INVALID_HEIGHT   -32768
#define GGEN_MAX_HEIGHT   32767
#define GGEN_MAX_PATH_LENGTH   5000
#define GGEN_MIN_HEIGHT   -32767
#define GGEN_MIN_MAP_SIZE   2

Typedefs

typedef uint16 GGen_Coord
typedef int32 GGen_CoordOffset
typedef uint32 GGen_Distance
typedef int16 GGen_Height
typedef uint16 GGen_Size

Enumerations

enum  GGen_Arg_Type { GGEN_BOOL, GGEN_INT, GGEN_ENUM }
enum  GGen_Comparison_Mode {
  GGEN_EQUAL_TO, GGEN_NOT_EQUAL_TO, GGEN_LESS_THAN, GGEN_GREATER_THAN,
  GGEN_LESS_THAN_OR_EQUAL_TO, GGEN_GREATER_THAN_OR_EQUAL_TO
}
enum  GGen_Direction { GGEN_HORIZONTAL, GGEN_VERTICAL }
enum  GGen_Normalization_Mode { GGEN_ADDITIVE, GGEN_SUBSTRACTIVE }
enum  GGen_Outline_Mode { GGEN_INSIDE, GGEN_OUTSIDE }
enum  GGen_Overflow_Mode { GGEN_CYCLE, GGEN_DISCARD, GGEN_DISCARD_AND_FILL }
enum  GGen_Status {
  GGEN_NO_SCRIPT, GGEN_SCRIPT_LOADED, GGEN_READY_TO_GENERATE, GGEN_LOADING_MAP_INFO,
  GGEN_GENERATING
}
enum  GGen_Voronoi_Noise_Mode { GGEN_RIDGES, GGEN_BUBBLES }

Detailed Description

File containing basic typedefs and enums used in rest of the GeoGen.


Define Documentation

#define GGEN_INVALID_HEIGHT   -32768

Value representing invalid tile.

#define GGEN_MAX_HEIGHT   32767

Maximum reachable height.

#define GGEN_MAX_PATH_LENGTH   5000

Maximum number of points in a path object.

#define GGEN_MIN_HEIGHT   -32767

Minimum reachable height.

#define GGEN_MIN_MAP_SIZE   2

Minimum map width/height(/length for 1D).


Typedef Documentation

typedef uint16 GGen_Coord

Coordinate into a data array. Leftmost/topmost element has coordinate 0.

typedef int32 GGen_CoordOffset

Relative coordinate offset. Positive values mean offset to left/bottom, negative values offset to right/top.

typedef uint32 GGen_Distance

Value representing euclidean distance between two points.

typedef int16 GGen_Height

Height value for one tile. Value range: <-32768, 32767>.

typedef uint16 GGen_Size

Size (in one dimension) of a data array or of an coordinate interval. Value range: <0, 65535>.


Enumeration Type Documentation

Script argument type.

Enumerator:
GGEN_BOOL 

Boolean value (yes/no) represented as integer from 0 to 1.

GGEN_INT 

Integer in given range.

GGEN_ENUM 

Enumerated value (exactly one of listed values) represented as integer from 0 to (option count - 1).

Arithmetic comparison operators.

Enumerator:
GGEN_EQUAL_TO 

Compared value is equal to threshold value.

GGEN_NOT_EQUAL_TO 

Compared value is not equal to threshold value.

GGEN_LESS_THAN 

Compared value is less than threshold value.

GGEN_GREATER_THAN 

Compared value is greater than threshold value.

GGEN_LESS_THAN_OR_EQUAL_TO 

Compared value is less than or equal to threshold value.

GGEN_GREATER_THAN_OR_EQUAL_TO 

Compared value is greater than or equal to threshold value.

2D axial directions.

Enumerator:
GGEN_HORIZONTAL 

The operation will be done along the horizontal (X) axis.

GGEN_VERTICAL 

The operation will be done along the vertical (Y) axis.

Normalization mode (for GGen_Data_1D::Normalize and GGen_Data_2D::Normalize) defining behavior for too steep slopes.

Enumerator:
GGEN_ADDITIVE 

Too steep slopes will be neutralized by increasing the values (going from the hill-top).

GGEN_SUBSTRACTIVE 

Too steep slopes will be neutralized by decreasing the values (going from the bottom).

Outline mode.

Enumerator:
GGEN_INSIDE 

The border line will be just inside the bordered area (the last cells matching the condition while "looking" from inside the bordered area).

GGEN_OUTSIDE 

The border line will be just outside the bordered area (the first cells not matching the condition while "looking" from inside the bordered area).

Overflow mode (for GGen_Data_1D::Shift and GGen_Data_2D::Shift) defining behavior for values, which would be shifted outside the array and for values which would be shifted from outside in.

Enumerator:
GGEN_CYCLE 

Values will be cycled through the boundary (disappearing values will appear on the opposite side).

GGEN_DISCARD 

Disappearing values will be discarded, newly appearing values will be set to 0.

GGEN_DISCARD_AND_FILL 

Disappearing values will be discarded, newly appearing values will be set to the closest valid value (along the shift axis).

Generator status

Enumerator:
GGEN_NO_SCRIPT 

No script has been inserted yet, no actions but SetScript and setting map constraints are allowed. SetScript will rise the status to SCRIPT_LOADED.

GGEN_SCRIPT_LOADED 

Script has been successfully loaded, work with map info is now allowed (LoadArgs can be called only now). LoadArgs will rise the status to READY_TO_GENERATE.

GGEN_READY_TO_GENERATE 

Script is ready to be executed.

GGEN_LOADING_MAP_INFO 

Map header is being mined for information, no work with map data of any kind is allowed.

GGEN_GENERATING 

Script is being executed. All script actions but adding new arguments is allowed.

Voronoi noise type.

Enumerator:
GGEN_RIDGES 

The resulting noise will have appearance of an array of crystals.

GGEN_BUBBLES 

The resulting noise will have appearance of negative of an array of spherical bubbles.