R:/projects/actioncube/_svn/trunk/ac/source/src/editing.cpp File Reference

#include "pch.h"
#include "cube.h"

Include dependency graph for editing.cpp:


Defines

#define loopselxy(b)   { makeundo(); loop(x,sel.xs) loop(y,sel.ys) { sqr *s = S(sel.x+x, sel.y+y); b; } remip(sel); }
#define EDITSEL   if(noteditmode() || noselection()) return;
#define EDITSELMP   if(noteditmode() || noselection() || multiplayer()) return;
#define EDITMP   if(noteditmode() || multiplayer()) return;
#define sheight(s, t, z)   (!flrceil ? (s->type==FHF ? s->floor-t->vdelta/4.0f : (float)s->floor) : (s->type==CHF ? s->ceil+t->vdelta/4.0f : (float)s->ceil))

Functions

 VAR (editing, 1, 0, 0)
void toggleedit (bool force)
void edittoggle ()
 COMMAND (edittoggle, ARG_NONE)
char * editinfo ()
void correctsel ()
bool noteditmode ()
bool noselection ()
void selectpos (int x, int y, int xs, int ys)
void makesel ()
 VAR (flrceil, 0, 0, 2)
void cursorupdate ()
 VAR (undomegs, 0, 1, 10)
void pruneundos (int maxremain)
void makeundo ()
void editundo ()
void copy ()
void paste ()
void tofronttex ()
void editdrag (bool isdown)
void editheightxy (bool isfloor, int amount, block &sel)
void editheight (int flr, int amount)
 COMMAND (editheight, ARG_2INT)
void edittexxy (int type, int t, block &sel)
void edittex (int type, int dir)
void replace ()
void edittypexy (int type, block &sel)
void edittype (int type)
void heightfield (int t)
void solid (int t)
void corner ()
 COMMAND (heightfield, ARG_1INT)
 COMMAND (solid, ARG_1INT)
 COMMAND (corner, ARG_NONE)
void editequalisexy (bool isfloor, block &sel)
void equalize (int flr)
 COMMAND (equalize, ARG_1INT)
void setvdeltaxy (int delta, block &sel)
void setvdelta (int delta)
void archvertex (int span, int vert, int delta)
void arch (int sidedelta, int _a)
void slope (int xd, int yd)
void perlin (int scale, int seed, int psize)
 VARF (fullbright, 0, 0, 1, if(fullbright){if(noteditmode()) return;fullbrightlight();}else calclight();)
void edittag (int tag)
void newent (char *what, char *a1, char *a2, char *a3, char *a4)
 COMMANDN (select, selectpos, ARG_4INT)
 COMMAND (edittag, ARG_1INT)
 COMMAND (replace, ARG_NONE)
 COMMAND (archvertex, ARG_3INT)
 COMMAND (arch, ARG_2INT)
 COMMAND (slope, ARG_2INT)
 COMMANDN (vdelta, setvdelta, ARG_1INT)
 COMMANDN (undo, editundo, ARG_NONE)
 COMMAND (copy, ARG_NONE)
 COMMAND (paste, ARG_NONE)
 COMMAND (edittex, ARG_2INT)
 COMMAND (newent, ARG_5STR)
 COMMAND (perlin, ARG_3INT)

Variables

bool editmode = false
block sel
int selh = 0
bool selset = false
int cx
int cy
int ch
int curedittex [] = { -1, -1, -1 }
bool dragging = false
int lastx
int lasty
int lasth
int lasttype = 0
int lasttex = 0
sqr rtex
vector< block * > undos
block * copybuf = NULL
const int MAXARCHVERT = 50
int archverts [MAXARCHVERT][MAXARCHVERT]
bool archvinit = false

Define Documentation

#define EDITMP   if(noteditmode() || multiplayer()) return;

#define EDITSEL   if(noteditmode() || noselection()) return;

#define EDITSELMP   if(noteditmode() || noselection() || multiplayer()) return;

#define loopselxy ( b   )     { makeundo(); loop(x,sel.xs) loop(y,sel.ys) { sqr *s = S(sel.x+x, sel.y+y); b; } remip(sel); }

#define sheight ( s,
t,
z   )     (!flrceil ? (s->type==FHF ? s->floor-t->vdelta/4.0f : (float)s->floor) : (s->type==CHF ? s->ceil+t->vdelta/4.0f : (float)s->ceil))


Function Documentation

void arch ( int  sidedelta,
int  _a 
)

void archvertex ( int  span,
int  vert,
int  delta 
)

COMMAND ( perlin  ,
ARG_3INT   
)

COMMAND ( newent  ,
ARG_5STR   
)

COMMAND ( edittex  ,
ARG_2INT   
)

COMMAND ( paste  ,
ARG_NONE   
)

COMMAND ( copy  ,
ARG_NONE   
)

COMMAND ( slope  ,
ARG_2INT   
)

COMMAND ( arch  ,
ARG_2INT   
)

COMMAND ( archvertex  ,
ARG_3INT   
)

COMMAND ( replace  ,
ARG_NONE   
)

COMMAND ( edittag  ,
ARG_1INT   
)

COMMAND ( equalize  ,
ARG_1INT   
)

COMMAND ( corner  ,
ARG_NONE   
)

COMMAND ( solid  ,
ARG_1INT   
)

COMMAND ( heightfield  ,
ARG_1INT   
)

COMMAND ( editheight  ,
ARG_2INT   
)

COMMAND ( edittoggle  ,
ARG_NONE   
)

COMMANDN ( undo  ,
editundo  ,
ARG_NONE   
)

COMMANDN ( vdelta  ,
setvdelta  ,
ARG_1INT   
)

COMMANDN ( select  ,
selectpos  ,
ARG_4INT   
)

void copy (  ) 

void corner (  ) 

void correctsel (  ) 

void cursorupdate (  ) 

void editdrag ( bool  isdown  ) 

void editequalisexy ( bool  isfloor,
block &  sel 
)

void editheight ( int  flr,
int  amount 
)

void editheightxy ( bool  isfloor,
int  amount,
block &  sel 
)

char* editinfo (  ) 

void edittag ( int  tag  ) 

void edittex ( int  type,
int  dir 
)

void edittexxy ( int  type,
int  t,
block &  sel 
)

void edittoggle (  ) 

void edittype ( int  type  ) 

void edittypexy ( int  type,
block &  sel 
)

void editundo (  ) 

void equalize ( int  flr  ) 

void heightfield ( int  t  ) 

void makesel (  ) 

void makeundo (  ) 

void newent ( char *  what,
char *  a1,
char *  a2,
char *  a3,
char *  a4 
)

bool noselection (  ) 

bool noteditmode (  ) 

void paste (  ) 

void perlin ( int  scale,
int  seed,
int  psize 
)

void pruneundos ( int  maxremain  ) 

void replace (  ) 

void selectpos ( int  x,
int  y,
int  xs,
int  ys 
)

void setvdelta ( int  delta  ) 

void setvdeltaxy ( int  delta,
block &  sel 
)

void slope ( int  xd,
int  yd 
)

void solid ( int  t  ) 

void tofronttex (  ) 

void toggleedit ( bool  force  ) 

VAR ( undomegs  ,
0  ,
1  ,
10   
)

VAR ( flrceil  ,
0  ,
0  ,
2   
)

VAR ( editing  ,
1  ,
0  ,
0   
)

VARF ( fullbright  ,
0  ,
0  ,
1   
)


Variable Documentation

bool archvinit = false

int ch

block* copybuf = NULL

int curedittex[] = { -1, -1, -1 }

int cx

int cy

bool dragging = false

bool editmode = false

int lasth

int lasttex = 0

int lasttype = 0

int lastx

int lasty

const int MAXARCHVERT = 50

Initial value:

{
    variable("selx",  0, 0, 4096, &sel.x,  NULL, false),
    variable("sely",  0, 0, 4096, &sel.y,  NULL, false),
    variable("selxs", 0, 0, 4096, &sel.xs, NULL, false),
    variable("selys", 0, 0, 4096, &sel.ys, NULL, false),
}

int selh = 0

bool selset = false


Generated on Mon Dec 8 21:41:32 2008 for AssaultCube by  doxygen 1.5.7.1