1
2
3
4
5
6
7
8
9
10
11
12
13
|
// editing.cpp: most map editing commands go here, entity editing commands are
// in world.cpp
#include "cube.h"
#import "DynamicEntity.h"
#import "OFString+Cube.h"
bool editmode = false;
// the current selection, used by almost all editing commands
// invariant: all code assumes that these are kept inside MINBORD distance of
// the edge of the map
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// editing.cpp: most map editing commands go here, entity editing commands are
// in world.cpp
#include "cube.h"
#import "DynamicEntity.h"
#import "Monster.h"
#import "OFString+Cube.h"
bool editmode = false;
// the current selection, used by almost all editing commands
// invariant: all code assumes that these are kept inside MINBORD distance of
// the edge of the map
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
settagareas(); // reset triggers to allow quick playtesting
entinmap(player1); // find spawn closest to current floating pos
} else {
resettagareas(); // clear trigger areas to allow them to be
// edited
player1.health = 100;
if (m_classicsp)
monsterclear(); // all monsters back at their spawns for
// editing
projreset();
}
Cube.sharedInstance.repeatsKeys = editmode;
selset = false;
editing = editmode;
}
COMMANDN(edittoggle, toggleedit, ARG_NONE)
|
|
|
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
settagareas(); // reset triggers to allow quick playtesting
entinmap(player1); // find spawn closest to current floating pos
} else {
resettagareas(); // clear trigger areas to allow them to be
// edited
player1.health = 100;
if (m_classicsp)
// all monsters back at their spawns for editing
[Monster resetAll];
projreset();
}
Cube.sharedInstance.repeatsKeys = editmode;
selset = false;
editing = editmode;
}
COMMANDN(edittoggle, toggleedit, ARG_NONE)
|