-
Notifications
You must be signed in to change notification settings - Fork 3
/
actor.cpp
79 lines (60 loc) · 2.51 KB
/
actor.cpp
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
#include "include/actor.h"
extern "C" {
void* actor_create(int skin, float posX, float posY, float posZ, float angle) {
return call<void*>("actor_create", skin, posX, posY, posZ, angle);
}
void actor_release(void* actor) {
return call<void>("actor_release", actor);
}
void actor_setSkin(void* actor, int skin) {
return call<void>("actor_setSkin", actor, skin);
}
int actor_getSkin(void* actor) {
return call<int>("actor_getSkin", actor);
}
void actor_applyAnimation(void* actor, float delta, unsigned char loop, unsigned char lockX, unsigned char lockY, unsigned char freeze, uint32_t time, String lib, String name) {
return call<void>("actor_applyAnimation", actor, delta, loop, lockX, lockY, freeze, time, lib, name);
}
CAnimationData actor_getAnimation(void* actor) {
return call<CAnimationData>("actor_getAnimation", actor);
}
void actor_clearAnimations(void* actor) {
return call<void>("actor_clearAnimations", actor);
}
void actor_setHealth(void* actor, float health) {
return call<void>("actor_setHealth", actor, health);
}
float actor_getHealth(void* actor) {
return call<float>("actor_getHealth", actor);
}
void actor_setInvulnerable(void* actor, unsigned char invuln) {
return call<void>("actor_setInvulnerable", actor, invuln);
}
unsigned char actor_isInvulnerable(void* actor) {
return call<unsigned char>("actor_isInvulnerable", actor);
}
unsigned char actor_isStreamedInForPlayer(void* actor, void* player) {
return call<unsigned char>("actor_isStreamedInForPlayer", actor, player);
}
ActorSpawnData actor_getSpawnData(void* actor) {
return call<ActorSpawnData>("actor_getSpawnData", actor);
}
void actor_setPosition(void* actor, float posX, float posY, float posZ) {
return call<void>("actor_setPosition", actor, posX, posY, posZ);
}
Vector3 actor_getPosition(void* actor) {
return call<Vector3>("actor_getPosition", actor);
}
void actor_setVirtualWorld(void* actor, int vw) {
return call<void>("actor_setVirtualWorld", actor, vw);
}
int actor_getVirtualWorld(void* actor) {
return call<int>("actor_getVirtualWorld", actor);
}
void actor_setFacingAngle(void* actor, float angle) {
return call<void>("actor_setFacingAngle", actor, angle);
}
float actor_getFacingAngle(void* actor) {
return call<float>("actor_getFacingAngle", actor);
}
}