/
IDE_EDIT_objectdeclarations.h
270 lines (234 loc) · 11.1 KB
/
IDE_EDIT_objectdeclarations.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
/********************************************************************************\
** **
** Copyright (C) 2008 Josh Ventura **
** **
** This file is a part of the ENIGMA Development Environment. **
** **
** **
** ENIGMA is free software: you can redistribute it and/or modify it under the **
** terms of the GNU General Public License as published by the Free Software **
** Foundation, version 3 of the license or any later version. **
** **
** This application and its source code is distributed AS-IS, WITHOUT ANY **
** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS **
** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more **
** details. **
** **
** You should have recieved a copy of the GNU General Public License along **
** with this code. If not, see <http://www.gnu.org/licenses/> **
** **
** ENIGMA is an environment designed to create games and other programs with a **
** high-level, fully compilable language. Developers of ENIGMA or anything **
** associated with ENIGMA are in no way responsible for its users or **
** applications created by its users, or damages caused by the environment **
** or programs made in the environment. **
** **
\********************************************************************************/
//This file was generated by the ENIGMA Development Environment.
//Editing it is a sign of a certain medical condition. We're not sure which one.
#include "Universal_System/collisions_object.h"
#include "Universal_System/object.h"
#include <map>// Script identifiers
namespace enigma
{
extern std::map<int,object_basic*> instance_deactivated_list;
extern objectstruct** objectdata;
struct object_locals: event_parent,
virtual extension_path /* DateTime */ /* DataStructures */ /* MotionPlanning */,
virtual extension_alarm /* Timelines */ /* ParticleSystems */
{
#include "Preprocessor_Environment_Editable/IDE_EDIT_inherited_locals.h"
std::map<string, var> *vmap;
object_locals() {vmap = NULL;}
object_locals(unsigned _x, int _y): event_parent(_x,_y) {vmap = NULL;}
};
namespace extension_cast {
extension_path *as_extension_path(object_basic* x) {
return (extension_path*)(object_locals*)x;
}
extension_alarm *as_extension_alarm(object_basic* x) {
return (extension_alarm*)(object_locals*)x;
}
}
}
namespace enigma // TODO: Replace with enigma_user
{
struct OBJ_obj_0: object_locals
{
// Local variables
var o;
//Scripts called by this object
//Timelines called by this object
variant myevent_step();
inline bool myevent_draw_subcheck();
// Grouped event bases
// Event Perform Code
variant myevents_perf(int type, int numb)
{
if (type == 3 && numb == 0)
return myevent_step();
return 0;
}
// Self-tracking
enigma::pinstance_list_iterator ENOBJ_ITER_me;
enigma::inst_iter *ENOBJ_ITER_myobj0;
enigma::inst_iter *ENOBJ_ITER_myevent_step;
enigma::inst_iter *ENOBJ_ITER_myevent_beginstep;
enigma::inst_iter *ENOBJ_ITER_myevent_localsweep;
enigma::inst_iter *ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling;
enigma::inst_iter *ENOBJ_ITER_myevent_endstep;
enigma::inst_iter *ENOBJ_ITER_myevent_particlesystemsupdate;
void unlink()
{
instance_iter_queue_for_destroy(this); // Queue for delete while we're still valid
if (enigma::instance_deactivated_list.erase(id)==0) {
//If it's not in the deactivated list, then it's active (so deactivate it).
deactivate();
}
}
void deactivate()
{
enigma::unlink_main(ENOBJ_ITER_me); // Remove this instance from the non-redundant, tree-structured list.
unlink_object_id_iter(ENOBJ_ITER_myobj0, 0);
enigma::event_step->unlink(ENOBJ_ITER_myevent_step);
enigma::event_beginstep->unlink(ENOBJ_ITER_myevent_beginstep);
enigma::event_localsweep->unlink(ENOBJ_ITER_myevent_localsweep);
enigma::event_beforecollisionautomaticcollisionhandling->unlink(ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling);
enigma::event_endstep->unlink(ENOBJ_ITER_myevent_endstep);
enigma::event_particlesystemsupdate->unlink(ENOBJ_ITER_myevent_particlesystemsupdate);
depth.remove();;
}
OBJ_obj_0(int enigma_genericconstructor_newinst_x = 0, int enigma_genericconstructor_newinst_y = 0, const int id = (enigma::maxid++), const int enigma_genericobjid = 0, bool handle = true): object_locals(id,enigma_genericobjid)
{
if (!handle) return;
sprite_index = enigma::objectdata[0]->sprite;
mask_index = enigma::objectdata[0]->mask;
visible = enigma::objectdata[0]->visible;
solid = enigma::objectdata[0]->solid;
persistent = enigma::objectdata[0]->persistent;
activate();
x = enigma_genericconstructor_newinst_x, y = enigma_genericconstructor_newinst_y;
enigma::constructor(this);
}
void activate()
{
depth.init(enigma::objectdata[0]->depth, this);
ENOBJ_ITER_me = enigma::link_instance(this);
ENOBJ_ITER_myobj0 = enigma::link_obj_instance(this, 0);
ENOBJ_ITER_myevent_step = enigma::event_step->add_inst(this);
ENOBJ_ITER_myevent_beginstep = enigma::event_beginstep->add_inst(this);
ENOBJ_ITER_myevent_localsweep = enigma::event_localsweep->add_inst(this);
ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling = enigma::event_beforecollisionautomaticcollisionhandling->add_inst(this);
ENOBJ_ITER_myevent_endstep = enigma::event_endstep->add_inst(this);
ENOBJ_ITER_myevent_particlesystemsupdate = enigma::event_particlesystemsupdate->add_inst(this);
}
~OBJ_obj_0()
{
delete vmap;
enigma::winstance_list_iterator_delete(ENOBJ_ITER_me);
delete ENOBJ_ITER_myobj0;
delete ENOBJ_ITER_myevent_step;
delete ENOBJ_ITER_myevent_beginstep;
delete ENOBJ_ITER_myevent_localsweep;
delete ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling;
delete ENOBJ_ITER_myevent_endstep;
delete ENOBJ_ITER_myevent_particlesystemsupdate;
}
virtual bool can_cast(int obj) const;
};
struct OBJ_obj_1: object_locals
{
// Local variables
int o;
//Scripts called by this object
//Timelines called by this object
variant myevent_create();
inline bool myevent_draw_subcheck();
// Grouped event bases
// Event Perform Code
variant myevents_perf(int type, int numb)
{
if (type == 0 && numb == 0)
return myevent_create();
return 0;
}
// Self-tracking
enigma::pinstance_list_iterator ENOBJ_ITER_me;
enigma::inst_iter *ENOBJ_ITER_myobj1;
enigma::inst_iter *ENOBJ_ITER_myevent_create;
enigma::inst_iter *ENOBJ_ITER_myevent_beginstep;
enigma::inst_iter *ENOBJ_ITER_myevent_step;
enigma::inst_iter *ENOBJ_ITER_myevent_localsweep;
enigma::inst_iter *ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling;
enigma::inst_iter *ENOBJ_ITER_myevent_endstep;
enigma::inst_iter *ENOBJ_ITER_myevent_particlesystemsupdate;
void unlink()
{
instance_iter_queue_for_destroy(this); // Queue for delete while we're still valid
if (enigma::instance_deactivated_list.erase(id)==0) {
//If it's not in the deactivated list, then it's active (so deactivate it).
deactivate();
}
}
void deactivate()
{
enigma::unlink_main(ENOBJ_ITER_me); // Remove this instance from the non-redundant, tree-structured list.
unlink_object_id_iter(ENOBJ_ITER_myobj1, 1);
enigma::event_create->unlink(ENOBJ_ITER_myevent_create);
enigma::event_beginstep->unlink(ENOBJ_ITER_myevent_beginstep);
enigma::event_step->unlink(ENOBJ_ITER_myevent_step);
enigma::event_localsweep->unlink(ENOBJ_ITER_myevent_localsweep);
enigma::event_beforecollisionautomaticcollisionhandling->unlink(ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling);
enigma::event_endstep->unlink(ENOBJ_ITER_myevent_endstep);
enigma::event_particlesystemsupdate->unlink(ENOBJ_ITER_myevent_particlesystemsupdate);
depth.remove();;
}
OBJ_obj_1(int enigma_genericconstructor_newinst_x = 0, int enigma_genericconstructor_newinst_y = 0, const int id = (enigma::maxid++), const int enigma_genericobjid = 1, bool handle = true): object_locals(id,enigma_genericobjid)
{
if (!handle) return;
sprite_index = enigma::objectdata[1]->sprite;
mask_index = enigma::objectdata[1]->mask;
visible = enigma::objectdata[1]->visible;
solid = enigma::objectdata[1]->solid;
persistent = enigma::objectdata[1]->persistent;
activate();
x = enigma_genericconstructor_newinst_x, y = enigma_genericconstructor_newinst_y;
enigma::constructor(this);
}
void activate()
{
depth.init(enigma::objectdata[1]->depth, this);
ENOBJ_ITER_me = enigma::link_instance(this);
ENOBJ_ITER_myobj1 = enigma::link_obj_instance(this, 1);
ENOBJ_ITER_myevent_create = enigma::event_create->add_inst(this);
ENOBJ_ITER_myevent_beginstep = enigma::event_beginstep->add_inst(this);
ENOBJ_ITER_myevent_step = enigma::event_step->add_inst(this);
ENOBJ_ITER_myevent_localsweep = enigma::event_localsweep->add_inst(this);
ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling = enigma::event_beforecollisionautomaticcollisionhandling->add_inst(this);
ENOBJ_ITER_myevent_endstep = enigma::event_endstep->add_inst(this);
ENOBJ_ITER_myevent_particlesystemsupdate = enigma::event_particlesystemsupdate->add_inst(this);
}
~OBJ_obj_1()
{
delete vmap;
enigma::winstance_list_iterator_delete(ENOBJ_ITER_me);
delete ENOBJ_ITER_myobj1;
delete ENOBJ_ITER_myevent_create;
delete ENOBJ_ITER_myevent_beginstep;
delete ENOBJ_ITER_myevent_step;
delete ENOBJ_ITER_myevent_localsweep;
delete ENOBJ_ITER_myevent_beforecollisionautomaticcollisionhandling;
delete ENOBJ_ITER_myevent_endstep;
delete ENOBJ_ITER_myevent_particlesystemsupdate;
}
virtual bool can_cast(int obj) const;
};
}
namespace enigma {
objectstruct objs[] = {
{-1,0,1,0.000000,0,-1,-100,0},
{-1,0,1,0.000000,0,-1,-100,1},
};
int objectcount = 2;
int obj_idmax = 2;
}