Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Functions | Variables
world.hpp File Reference
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/shared/geom.hpp"

Go to the source code of this file.

Classes

struct  octaheader
 octree header structure as its found in the ogz files. More...
 
struct  compatheader
 more intense map file header used when loading. More...
 
struct  vertex
 

Macros

#define MAPVERSION   40
 
#define WATER_AMPLITUDE   0.4f
 
#define WATER_OFFSET   1.1f
 
#define TEX_SCALE   8.0f
 

Enumerations

enum  { DEFAULT_SKY = 0, DEFAULT_GEOM }
 
enum  { MATSURF_NOT_VISIBLE = 0, MATSURF_VISIBLE, MATSURF_EDIT_ONLY }
 

Functions

void entcancel ()
 cancel (remove) entity selection More...
 
void entitiesinoctanodes ()
 
void attachentities ()
 
void freeoctaentities (cube &c)
 
bool pointinsel (const selinfo &sel, const vec &o)
 
void resetmap ()
 
void startmap (const char *name)
 called just after a map load send CRC32 to server More...
 
char * entname (entity &e)
 
bool haveselent ()
 
undoblockcopyundoents (undoblock *u)
 
void pasteundoent (int idx, const entity &ue)
 
void pasteundoents (undoblock *u)
 
bool emptymap (int factor, bool force, const char *mname="", bool usecfg=true)
 
bool enlargemap (bool force)
 
int findentity (int type, int index=0, int attr1=-1, int attr2=-1)
 
void findents (int low, int high, bool notspawned, const vec &pos, const vec &radius, vector< int > &found)
 
extentitynewentity (bool local, const vec &o, int type, int v1, int v2, int v3, int v4, int v5, int &idx)
 
void attachentity (extentity &e)
 
bool modifyoctaent (int flags, int id)
 
void mpeditent (int i, const vec &o, int type, int attr1, int attr2, int attr3, int attr4, int attr5, bool local)
 
vec getselpos ()
 
int getworldsize ()
 
int getmapversion ()
 
void renderentcone (const extentity &e, const vec &dir, float radius, float angle)
 
void renderentarrow (const extentity &e, const vec &dir, float radius)
 
void renderentattachment (const extentity &e)
 
void renderentsphere (const extentity &e, float radius)
 
void renderentring (const extentity &e, float radius, int axis=0)
 

Variables

SharedVar< char * > maptitle
 
vector< int > outsideents
 
vector< int > entgroup
 
SharedVar< int > worldscale
 
SharedVar< int > worldsize
 
SharedVar< int > mapversion
 

Class Documentation

struct octaheader

octree header structure as its found in the ogz files.

ogz files are gz-compressed as the name suggests.

Class Members
int blendmap
int headersize
int lightmaps
char magic[4]
int numents
int numpvs
int numvars
int numvslots
int version
int worldsize
struct compatheader

more intense map file header used when loading.

Class Members
uchar ambient
uchar blendmap
uchar bumperror
int headersize
uchar lavacolour[3]
uchar lerpangle
uchar lerpsubdiv
uchar lerpsubdivsize
int lighterror
int lightlod
int lightmaps
int lightprecision
char magic[4]
char maptitle[128]
int numents
int numpvs
uchar reserved[10]
uchar skylight[3]
int version
uchar watercolour[3]
uchar waterfallcolour[3]
int worldsize
struct vertex
Class Members
svec2 lm
bvec4 norm
vec pos
bvec4 tangent
vec2 tc

Macro Definition Documentation

#define MAPVERSION   40

Referenced by load_world(), loadents(), and save_world().

#define TEX_SCALE   8.0f

Referenced by calctexgen(), and rendermaterials().

#define WATER_AMPLITUDE   0.4f
#define WATER_OFFSET   1.1f

Enumeration Type Documentation

anonymous enum
Enumerator
DEFAULT_SKY 
DEFAULT_GEOM 
anonymous enum
Enumerator
MATSURF_NOT_VISIBLE 
MATSURF_VISIBLE 
MATSURF_EDIT_ONLY 

Function Documentation

void attachentities ( )
void attachentity ( extentity e)
undoblock* copyundoents ( undoblock u)
bool emptymap ( int  factor,
bool  force,
const char *  mname = "",
bool  usecfg = true 
)
bool enlargemap ( bool  force)
void entcancel ( )

cancel (remove) entity selection

References entgroup, and vector< T, MINSIZE >::shrink().

Referenced by cancelsel(), copyundoents(), delent(), and entpaste().

void entitiesinoctanodes ( )
char* entname ( entity e)
int findentity ( int  type,
int  index = 0,
int  attr1 = -1,
int  attr2 = -1 
)
void findents ( int  low,
int  high,
bool  notspawned,
const vec pos,
const vec radius,
vector< int > &  found 
)
void freeoctaentities ( cube c)
int getmapversion ( )

References mapversion.

vec getselpos ( )
int getworldsize ( )
bool haveselent ( )
bool modifyoctaent ( int  flags,
int  id 
)
void mpeditent ( int  i,
const vec o,
int  type,
int  attr1,
int  attr2,
int  attr3,
int  attr4,
int  attr5,
bool  local 
)
extentity* newentity ( bool  local,
const vec o,
int  type,
int  v1,
int  v2,
int  v3,
int  v4,
int  v5,
int &  idx 
)
void pasteundoent ( int  idx,
const entity ue 
)
void pasteundoents ( undoblock u)

References entedit, undoblock::ents(), loopi(), and undoblock::numents.

Referenced by pasteundo().

bool pointinsel ( const selinfo sel,
const vec o 
)

References selinfo::grid, selinfo::o, and selinfo::s.

void renderentarrow ( const extentity e,
const vec dir,
float  radius 
)
void renderentattachment ( const extentity e)
void renderentcone ( const extentity e,
const vec dir,
float  radius,
float  angle 
)
void renderentring ( const extentity e,
float  radius,
int  axis = 0 
)
void renderentsphere ( const extentity e,
float  radius 
)

References loopk, and renderentring().

Referenced by renderentradius().

void resetmap ( )
void startmap ( const char *  name)

called just after a map load send CRC32 to server

See Also
sendmapinfo

send CRC32 checksum of my current map yeah if you would like to cheat this is the code passage you must modify you little ****** *

References ai::clearwaypoints(), game::clientmap, copystring(), findplayerspawn(), game::player1, entities::resetspawns(), game::respawnent, ai::savewaypoints(), game::sendmapinfo(), and game::startmap().

Referenced by emptymap(), load_world(), and startmap().

Variable Documentation

vector<int> entgroup
SharedVar<char*> maptitle

Referenced by load_world().

SharedVar<int> mapversion

Referenced by getmapversion(), load_world(), and loadc().

vector<int> outsideents
SharedVar<int> worldscale
SharedVar<int> worldsize