Alchemy
Loading...
Searching...
No Matches

event.h

Go to the documentation of this file.
1#ifndef EVENT_H
2#define EVENT_H
3
4/// @file
5/// Scene commands: the all-caps macros the scene scripts are written in.
6
7#define WAIT(n) Engine_EventWait(n)
8
9#define MESSAGE_SET(m) Engine_EventSetMessage(m)
10#define MESSAGE_PUT(no, f) Engine_EventShowMessage((no), (f))
11#define MESSAGE_OPEN(no, f) Engine_EventOpenMessage((no), (f))
12
13#define OBJ_POS_SET(no, x, z) Actor_SetPosition((no), (x) << 16, (z) << 16)
14#define OBJ_WALK(no, x, z) Actor_WalkTo((no), (x), (z))
15#define OBJ_SPEED(no, s, a) Actor_SetSpeed((no), (s), (a))
16#define OBJ_DIR(no, d, t) Actor_FaceDirection((no), (d), (t))
17#define OBJ_FACE(no, to, t) Engine_ActorFaceActor((no), (to), (t))
18#define OBJ_MODE(no, m) Engine_ActorSetAnimation((no), (m))
19#define OBJ_EMOTE(no, e, t) Actor_ShowEmote((no), (e), (t))
20
21/// Gets an object by index as the same union FieldObject passed to update
22/// hooks.
23#define OBJ_GET(no) ((union FieldObject *)Object_GetById(no))
24
25#define FLAG_CHECK(f) GameFlag_IsSet(f)
26#define FLAG_SET(f) GameFlag_Set(f)
27
28#define SE(n) Event_PlayCue(n)
29
30#define EV_BEGIN() Engine_EventBegin()
31#define EV_END() Engine_EventEnd()
32
33#endif