25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
} Value;
#define UVALUE(x,y) ((Value){.u=x,.t=y})
#define SVALUE(x,y) ((Value){.s=x,.t=y})
#define NVALUE(x) SVALUE(x,TY_NUMBER)
#define CVALUE(x) UVALUE(x,TY_CLASS)
#define MVALUE(x) UVALUE(x,TY_MESSAGE)
#define ZVALUE(x) UVALUE(x,TY_STRING)
#define N_MESSAGES 23
extern const char*const standard_message_names[];
extern const char*const standard_sound_names[];
extern const char*const heromesh_key_names[256];
extern sqlite3*userdb;
|
>
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
} Value;
#define UVALUE(x,y) ((Value){.u=x,.t=y})
#define SVALUE(x,y) ((Value){.s=x,.t=y})
#define NVALUE(x) SVALUE(x,TY_NUMBER)
#define CVALUE(x) UVALUE(x,TY_CLASS)
#define MVALUE(x) UVALUE(x,TY_MESSAGE)
#define ZVALUE(x) UVALUE(x,TY_STRING)
#define OVALUE(x) UVALUE(x,objects[x]->generation)
#define N_MESSAGES 23
extern const char*const standard_message_names[];
extern const char*const standard_sound_names[];
extern const char*const heromesh_key_names[256];
extern sqlite3*userdb;
|
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
|
const UserCommand*find_key_binding(SDL_Event*ev,int editing);
// == function ==
void init_sql_functions(sqlite3_int64*ptr0,sqlite3_int64*ptr1);
// == exec ==
// The following "internal object flags" are part of the "dir" variable:
#define IOF_DEAD 0x10 // object doesn't exist, except to continue an animation
#define IOF_ANIM 0x20 // an animation is being displayed
typedef struct {
Sint32 height,weight,climb,density,volume,strength,arrivals,departures,temperature;
Uint32 arrived,departed,arrived2,departed2,generation,up;
Uint16 class,oflags;
Uint16 sharp[4];
Uint16 hard[4];
Uint8 x,y,shape,shovable,image,dir;
Value misc1,misc2,misc3,misc4,misc5,misc6,misc7;
Value uservars[0];
} Object;
extern Uint32 generation_number;
extern Object*objects;
extern Uint32 nobjects;
extern Value globals[0x800];
|
>
>
|
>
|
>
>
>
>
>
>
>
>
|
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
|
const UserCommand*find_key_binding(SDL_Event*ev,int editing);
// == function ==
void init_sql_functions(sqlite3_int64*ptr0,sqlite3_int64*ptr1);
// == exec ==
#define VOIDLINK ((Uint32)(-1))
// The following "internal object flags" are part of the "dir" variable:
#define IOF_DEAD 0x10 // object doesn't exist, except to continue an animation
#define IOF_ANIM 0x20 // an animation is being displayed
typedef struct {
Sint32 height,weight,climb,density,volume,strength,arrivals,departures,temperature;
Uint32 arrived,departed,arrived2,departed2,generation;
Uint32 up,down,prev,next; // links to other objects
Uint16 class,oflags;
Uint16 sharp[4];
Uint16 hard[4];
Uint8 x,y,shape,shovable,image,dir;
Value misc1,misc2,misc3,misc4,misc5,misc6,misc7;
Value uservars[0];
} Object;
extern Uint32 generation_number;
extern Object**objects;
extern Uint32 nobjects;
extern Value globals[0x800];
extern Uint32 firstobj,lastobj;
extern Uint32 playfield[64*64];
void pfunlink(Uint32 n);
void pflink(Uint32 n);
Uint32 objalloc(Uint16 c);
void annihilate(void);
const char*execute_turn(int key);
|