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

Go to the source code of this file.

Enumerations

enum  {
  EDIT_FACE = 0, EDIT_TEX, EDIT_MAT, EDIT_FLIP,
  EDIT_COPY, EDIT_PASTE, EDIT_ROTATE, EDIT_REPLACE,
  EDIT_DELCUBE, EDIT_REMIP, EDIT_VSLOT, EDIT_UNDO,
  EDIT_REDO
}
 This file contains editing stuff. More...
 

Functions

int shouldpacktex (int index)
 
bool packeditinfo (editinfo *e, int &inlen, uchar *&outbuf, int &outlen)
 
bool unpackeditinfo (editinfo *&e, const uchar *inbuf, int inlen, int outlen)
 
void freeeditinfo (editinfo *&e)
 
void pruneundos (int maxremain=0)
 
bool packundo (int op, int &inlen, uchar *&outbuf, int &outlen)
 
bool unpackundo (const uchar *inbuf, int inlen, int outlen)
 
bool noedit (bool view=false, bool msg=true)
 check if user is allowed to edit concerns may be a scene selection which is not in view or disbaled editing status More...
 
void toggleedit (bool force=true)
 change editing status also cancel selection, blendmaps and more More...
 
void mpeditface (int dir, int mode, selinfo &sel, bool local)
 
void mpedittex (int tex, int allfaces, selinfo &sel, bool local)
 
bool mpedittex (int tex, int allfaces, selinfo &sel, ucharbuf &buf)
 
void mpeditmat (int matid, int filter, selinfo &sel, bool local)
 
void mpflip (selinfo &sel, bool local)
 
void mpcopy (editinfo *&e, selinfo &sel, bool local)
 
void mppaste (editinfo *&e, selinfo &sel, bool local)
 
void mprotate (int cw, selinfo &sel, bool local)
 
void mpreplacetex (int oldtex, int newtex, bool insel, selinfo &sel, bool local, bool update=true)
 
bool mpreplacetex (int oldtex, int newtex, bool insel, selinfo &sel, ucharbuf &buf)
 
void mpdelcube (selinfo &sel, bool local)
 
bool mpeditvslot (int delta, int allfaces, selinfo &sel, ucharbuf &buf)
 
void mpremip (bool local)
 
void cancelsel ()
 reset the current selection called every time user changes grid size or editing status More...
 
void rendertexturepanel (int w, int h)
 render quick selection preview for surface textures standard edit key binding: press Z More...
 
void addundo (undoblock *u)
 
void commitchanges (bool force=false)
 commits changes in geometry More...
 
void rendereditcursor ()
 render selection box to the cursor target also moves entities! More...
 
void tryedit ()
 check if editing can be done More...
 
void previewprefab (const char *name, const vec &color)
 

Variables

editinfolocaledit
 
bool editmode
 
vector< ushorttexmru
 

Enumeration Type Documentation

anonymous enum

This file contains editing stuff.

Enumerator
EDIT_FACE 
EDIT_TEX 
EDIT_MAT 
EDIT_FLIP 
EDIT_COPY 
EDIT_PASTE 
EDIT_ROTATE 
EDIT_REPLACE 
EDIT_DELCUBE 
EDIT_REMIP 
EDIT_VSLOT 
EDIT_UNDO 
EDIT_REDO 

Function Documentation

void addundo ( undoblock u)
void cancelsel ( )

reset the current selection called every time user changes grid size or editing status

See Also
cubecancel
entcancel

References cubecancel(), and entcancel().

Referenced by resetmap(), and toggleedit().

void commitchanges ( bool  force = false)
void freeeditinfo ( editinfo *&  e)

References editinfo::copy, editinfos, and freeblock().

Referenced by fpsent::~fpsent().

void mpcopy ( editinfo *&  e,
selinfo sel,
bool  local 
)
void mpdelcube ( selinfo sel,
bool  local 
)
void mpeditface ( int  dir,
int  mode,
selinfo sel,
bool  local 
)
void mpeditmat ( int  matid,
int  filter,
selinfo sel,
bool  local 
)
void mpedittex ( int  tex,
int  allfaces,
selinfo sel,
bool  local 
)
bool mpedittex ( int  tex,
int  allfaces,
selinfo sel,
ucharbuf buf 
)

References mpedittex(), and unpacktex().

bool mpeditvslot ( int  delta,
int  allfaces,
selinfo sel,
ucharbuf buf 
)
void mpflip ( selinfo sel,
bool  local 
)
void mppaste ( editinfo *&  e,
selinfo sel,
bool  local 
)
void mpremip ( bool  local)
void mpreplacetex ( int  oldtex,
int  newtex,
bool  insel,
selinfo sel,
bool  local,
bool  update = true 
)
bool mpreplacetex ( int  oldtex,
int  newtex,
bool  insel,
selinfo sel,
ucharbuf buf 
)
void mprotate ( int  cw,
selinfo sel,
bool  local 
)
bool noedit ( bool  view = false,
bool  msg = true 
)
bool packeditinfo ( editinfo e,
int &  inlen,
uchar *&  outbuf,
int &  outlen 
)
bool packundo ( int  op,
int &  inlen,
uchar *&  outbuf,
int &  outlen 
)
void previewprefab ( const char *  name,
const vec color 
)
void pruneundos ( int  maxremain = 0)
void rendereditcursor ( )
void rendertexturepanel ( int  w,
int  h 
)
int shouldpacktex ( int  index)
void toggleedit ( bool  force)
void tryedit ( )

check if editing can be done

Warning
please note that editing is not allowed when the HUD (head up dispaly) is disabled!

References blendpaintmode, editmode, mainmenu, and trypaintblendmap().

Referenced by main().

bool unpackeditinfo ( editinfo *&  e,
const uchar inbuf,
int  inlen,
int  outlen 
)
bool unpackundo ( const uchar inbuf,
int  inlen,
int  outlen 
)

Variable Documentation

bool editmode
editinfo* localedit
vector<ushort> texmru