Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
octaedit.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "inexor/network/legacy/buffer_types.hpp" // for ucharbuf
3 #include "inexor/shared/cube_types.hpp" // for uchar, ushort
4 #include "inexor/shared/cube_vector.hpp" // for vector
5 
6 struct editinfo;
7 struct selinfo;
8 struct undoblock;
9 struct vec;
10 
12 
14 
15 extern editinfo *localedit;
16 
17 extern bool editmode;
18 
19 extern int shouldpacktex(int index);
20 extern bool packeditinfo(editinfo *e, int &inlen, uchar *&outbuf, int &outlen);
21 extern bool unpackeditinfo(editinfo *&e, const uchar *inbuf, int inlen, int outlen);
22 extern void freeeditinfo(editinfo *&e);
23 extern void pruneundos(int maxremain = 0);
24 extern bool packundo(int op, int &inlen, uchar *&outbuf, int &outlen);
25 extern bool unpackundo(const uchar *inbuf, int inlen, int outlen);
26 extern bool noedit(bool view = false, bool msg = true);
27 extern void toggleedit(bool force = true);
28 extern void mpeditface(int dir, int mode, selinfo &sel, bool local);
29 extern void mpedittex(int tex, int allfaces, selinfo &sel, bool local);
30 extern bool mpedittex(int tex, int allfaces, selinfo &sel, ucharbuf &buf);
31 extern void mpeditmat(int matid, int filter, selinfo &sel, bool local);
32 extern void mpflip(selinfo &sel, bool local);
33 extern void mpcopy(editinfo *&e, selinfo &sel, bool local);
34 extern void mppaste(editinfo *&e, selinfo &sel, bool local);
35 extern void mprotate(int cw, selinfo &sel, bool local);
36 extern void mpreplacetex(int oldtex, int newtex, bool insel, selinfo &sel, bool local, bool update = true);
37 extern bool mpreplacetex(int oldtex, int newtex, bool insel, selinfo &sel, ucharbuf &buf);
38 extern void mpdelcube(selinfo &sel, bool local);
39 extern bool mpeditvslot(int delta, int allfaces, selinfo &sel, ucharbuf &buf);
40 extern void mpremip(bool local);
41 
42 extern void cancelsel();
43 extern void rendertexturepanel(int w, int h);
44 extern void addundo(undoblock *u);
45 extern void commitchanges(bool force = false);
46 extern void rendereditcursor();
47 extern void tryedit();
48 extern void previewprefab(const char *name, const vec &color);
49 
50 extern vector<ushort> texmru;
int shouldpacktex(int index)
Definition: octaedit.cpp:2451
Definition: octaedit.hpp:13
void mpeditmat(int matid, int filter, selinfo &sel, bool local)
Definition: octaedit.cpp:2772
void freeeditinfo(editinfo *&e)
Definition: octaedit.cpp:1203
editinfo * localedit
Definition: octaedit.cpp:994
void mppaste(editinfo *&e, selinfo &sel, bool local)
Definition: octaedit.cpp:1622
bool packundo(int op, int &inlen, uchar *&outbuf, int &outlen)
Definition: octaedit.cpp:1283
Definition: octaedit.hpp:13
bool unpackeditinfo(editinfo *&e, const uchar *inbuf, int inlen, int outlen)
Definition: octaedit.cpp:1186
template implementation of buffers (networking e.g.).
Definition: buffer_types.hpp:14
Selection info: the marked area when editing.
Definition: octree.hpp:231
Definition: octaedit.hpp:13
void mpflip(selinfo &sel, bool local)
Definition: octaedit.cpp:2676
void rendertexturepanel(int w, int h)
render quick selection preview for surface textures standard edit key binding: press Z ...
Definition: octaedit.cpp:2928
Definition: octaedit.hpp:13
Definition: octaedit.hpp:13
void rendereditcursor()
render selection box to the cursor target also moves entities!
Definition: octaedit.cpp:465
void toggleedit(bool force=true)
change editing status also cancel selection, blendmaps and more
Definition: octaedit.cpp:260
bool mpeditvslot(int delta, int allfaces, selinfo &sel, ucharbuf &buf)
Definition: octaedit.cpp:2310
bool packeditinfo(editinfo *e, int &inlen, uchar *&outbuf, int &outlen)
Definition: octaedit.cpp:1177
void commitchanges(bool force=false)
commits changes in geometry
Definition: octaedit.cpp:705
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 e...
Definition: octaedit.cpp:295
void update()
Definition: ai.cpp:226
Definition: octaedit.hpp:13
GLuint index
Definition: glexts.hpp:412
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
vector< ushort > texmru
Definition: octaedit.cpp:2195
void tryedit()
check if editing can be done
Definition: octaedit.cpp:661
void mpreplacetex(int oldtex, int newtex, bool insel, selinfo &sel, bool local, bool update=true)
Definition: octaedit.cpp:2593
Definition: octaedit.hpp:13
bool unpackundo(const uchar *inbuf, int inlen, int outlen)
Definition: octaedit.cpp:1240
Definition: octaedit.hpp:13
void mpremip(bool local)
Definition: octa.cpp:588
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glexts.hpp:299
void mpedittex(int tex, int allfaces, selinfo &sel, bool local)
Definition: octaedit.cpp:2426
void cancelsel()
reset the current selection called every time user changes grid size or editing status ...
Definition: octaedit.cpp:251
#define dir(name, v, d, s, os)
Definition: physics.cpp:2014
void mprotate(int cw, selinfo &sel, bool local)
Definition: octaedit.cpp:2703
void addundo(undoblock *u)
Definition: octaedit.cpp:893
unsigned char uchar
Basic type definitions.
Definition: cube_types.hpp:7
Definition: octaedit.hpp:13
Definition: octaedit.hpp:13
Definition: octaedit.hpp:13
Definition: octree.hpp:266
Definition: octaedit.hpp:13
void mpcopy(editinfo *&e, selinfo &sel, bool local)
Definition: octaedit.cpp:1612
void pruneundos(int maxremain=0)
Definition: octaedit.cpp:857
Definition: octree.hpp:273
void mpdelcube(selinfo &sel, bool local)
Definition: octaedit.cpp:2175
selinfo sel
Bot Movement, according to waypoints (saved within the map in an excluded file).
Definition: octaedit.cpp:162
static void color(const bvec &v, uchar alpha=255)
Definition: glemu.hpp:71
void mpeditface(int dir, int mode, selinfo &sel, bool local)
Definition: octaedit.cpp:2072
void previewprefab(const char *name, const vec &color)
Definition: octaedit.cpp:1600
bool editmode
Definition: octaedit.cpp:170
Definition: octaedit.hpp:13