2017-04-09 09:28:38 +00:00
|
|
|
#ifndef OPENMW_WORLDAPI_HPP
|
|
|
|
#define OPENMW_WORLDAPI_HPP
|
2016-08-30 05:24:31 +00:00
|
|
|
|
2017-03-04 12:11:00 +00:00
|
|
|
#define WORLDAPI \
|
2017-02-23 06:23:46 +00:00
|
|
|
{"InitScriptEvent", WorldFunctions::InitScriptEvent},\
|
2017-01-28 14:22:30 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
|
2017-02-23 05:47:00 +00:00
|
|
|
{"GetLastEventAction", WorldFunctions::GetLastEventAction},\
|
2017-01-29 11:21:41 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
|
|
|
|
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
|
2017-04-04 06:30:17 +00:00
|
|
|
{"GetObjectMpNum", WorldFunctions::GetObjectMpNum},\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"GetObjectCount", WorldFunctions::GetObjectCount},\
|
|
|
|
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
|
|
|
|
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
|
|
|
|
{"GetObjectScale", WorldFunctions::GetObjectScale},\
|
|
|
|
{"GetObjectDoorState", WorldFunctions::GetObjectDoorState},\
|
|
|
|
{"GetObjectLockLevel", WorldFunctions::GetObjectLockLevel},\
|
|
|
|
{"GetObjectPosX", WorldFunctions::GetObjectPosX},\
|
|
|
|
{"GetObjectPosY", WorldFunctions::GetObjectPosY},\
|
|
|
|
{"GetObjectPosZ", WorldFunctions::GetObjectPosZ},\
|
|
|
|
{"GetObjectRotX", WorldFunctions::GetObjectRotX},\
|
|
|
|
{"GetObjectRotY", WorldFunctions::GetObjectRotY},\
|
|
|
|
{"GetObjectRotZ", WorldFunctions::GetObjectRotZ},\
|
2017-02-14 17:31:56 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"GetContainerChangesSize", WorldFunctions::GetContainerChangesSize},\
|
|
|
|
{"GetContainerItemRefId", WorldFunctions::GetContainerItemRefId},\
|
|
|
|
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
|
|
|
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
|
|
|
{"GetContainerItemActionCount", WorldFunctions::GetContainerItemActionCount},\
|
2017-02-17 14:24:40 +00:00
|
|
|
\
|
2017-02-23 05:47:00 +00:00
|
|
|
{"SetScriptEventCell", WorldFunctions::SetScriptEventCell},\
|
|
|
|
{"SetScriptEventAction", WorldFunctions::SetScriptEventAction},\
|
2017-02-17 14:24:40 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
|
|
|
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
2017-04-04 06:30:17 +00:00
|
|
|
{"SetObjectMpNum", WorldFunctions::SetObjectMpNum},\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
|
|
|
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
|
|
|
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
|
|
|
{"SetObjectScale", WorldFunctions::SetObjectScale},\
|
|
|
|
{"SetObjectDoorState", WorldFunctions::SetObjectDoorState},\
|
|
|
|
{"SetObjectLockLevel", WorldFunctions::SetObjectLockLevel},\
|
|
|
|
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
|
|
|
|
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\
|
2017-01-29 11:21:41 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"SetContainerItemRefId", WorldFunctions::SetContainerItemRefId},\
|
|
|
|
{"SetContainerItemCount", WorldFunctions::SetContainerItemCount},\
|
|
|
|
{"SetContainerItemCharge", WorldFunctions::SetContainerItemCharge},\
|
2017-02-17 21:11:38 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"AddWorldObject", WorldFunctions::AddWorldObject},\
|
|
|
|
{"AddContainerItem", WorldFunctions::AddContainerItem},\
|
2017-01-28 14:22:30 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"SendObjectDelete", WorldFunctions::SendObjectDelete},\
|
|
|
|
{"SendObjectPlace", WorldFunctions::SendObjectPlace},\
|
|
|
|
{"SendObjectScale", WorldFunctions::SendObjectScale},\
|
|
|
|
{"SendObjectLock", WorldFunctions::SendObjectLock},\
|
|
|
|
{"SendObjectUnlock", WorldFunctions::SendObjectUnlock},\
|
|
|
|
{"SendDoorState", WorldFunctions::SendDoorState},\
|
|
|
|
{"SendContainer", WorldFunctions::SendContainer},\
|
2017-02-17 16:33:20 +00:00
|
|
|
\
|
2017-02-18 22:11:09 +00:00
|
|
|
{"SetHour", WorldFunctions::SetHour},\
|
|
|
|
{"SetMonth", WorldFunctions::SetMonth},\
|
|
|
|
{"SetDay", WorldFunctions::SetDay}
|
2016-08-30 05:24:31 +00:00
|
|
|
|
|
|
|
class WorldFunctions
|
|
|
|
{
|
|
|
|
public:
|
2017-01-28 14:22:30 +00:00
|
|
|
|
2017-02-23 06:23:46 +00:00
|
|
|
static void InitScriptEvent(unsigned short pid) noexcept;
|
2017-01-28 14:22:30 +00:00
|
|
|
|
2017-01-29 11:21:41 +00:00
|
|
|
static unsigned int GetObjectChangesSize() noexcept;
|
2017-02-23 07:17:00 +00:00
|
|
|
static unsigned char GetLastEventAction() noexcept;
|
2017-01-29 11:21:41 +00:00
|
|
|
|
|
|
|
static const char *GetObjectRefId(unsigned int i) noexcept;
|
|
|
|
static int GetObjectRefNumIndex(unsigned int i) noexcept;
|
2017-04-04 06:30:17 +00:00
|
|
|
static int GetObjectMpNum(unsigned int i) noexcept;
|
2017-01-29 13:29:40 +00:00
|
|
|
static int GetObjectCount(unsigned int i) noexcept;
|
2017-02-17 16:33:20 +00:00
|
|
|
static int GetObjectCharge(unsigned int i) noexcept;
|
2017-01-29 13:29:40 +00:00
|
|
|
static int GetObjectGoldValue(unsigned int i) noexcept;
|
2017-02-01 10:53:51 +00:00
|
|
|
static double GetObjectScale(unsigned int i) noexcept;
|
2017-02-06 21:09:50 +00:00
|
|
|
static int GetObjectDoorState(unsigned int i) noexcept;
|
2017-02-01 10:43:19 +00:00
|
|
|
static int GetObjectLockLevel(unsigned int i) noexcept;
|
2017-01-29 13:29:40 +00:00
|
|
|
static double GetObjectPosX(unsigned int i) noexcept;
|
|
|
|
static double GetObjectPosY(unsigned int i) noexcept;
|
|
|
|
static double GetObjectPosZ(unsigned int i) noexcept;
|
2017-01-29 15:38:29 +00:00
|
|
|
static double GetObjectRotX(unsigned int i) noexcept;
|
|
|
|
static double GetObjectRotY(unsigned int i) noexcept;
|
|
|
|
static double GetObjectRotZ(unsigned int i) noexcept;
|
2017-01-29 11:21:41 +00:00
|
|
|
|
2017-02-17 16:33:20 +00:00
|
|
|
static unsigned int GetContainerChangesSize(unsigned int objectIndex) noexcept;
|
|
|
|
static const char *GetContainerItemRefId(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
|
|
|
static int GetContainerItemCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
|
|
|
static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
2017-02-18 22:11:09 +00:00
|
|
|
static int GetContainerItemActionCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
2017-02-17 16:33:20 +00:00
|
|
|
|
2017-02-23 05:47:00 +00:00
|
|
|
static void SetScriptEventCell(const char* cellDescription) noexcept;
|
2017-02-23 07:17:00 +00:00
|
|
|
static void SetScriptEventAction(unsigned char action) noexcept;
|
2017-02-17 14:24:40 +00:00
|
|
|
|
|
|
|
static void SetObjectRefId(const char* refId) noexcept;
|
|
|
|
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
|
2017-04-04 06:30:17 +00:00
|
|
|
static void SetObjectMpNum(int mpNum) noexcept;
|
2017-02-17 14:24:40 +00:00
|
|
|
static void SetObjectCount(int count) noexcept;
|
2017-02-17 21:11:38 +00:00
|
|
|
static void SetObjectCharge(int charge) noexcept;
|
2017-02-17 14:24:40 +00:00
|
|
|
static void SetObjectGoldValue(int goldValue) noexcept;
|
|
|
|
static void SetObjectScale(double scale) noexcept;
|
|
|
|
static void SetObjectDoorState(int doorState) noexcept;
|
|
|
|
static void SetObjectLockLevel(int lockLevel) noexcept;
|
|
|
|
static void SetObjectPosition(double x, double y, double z) noexcept;
|
|
|
|
static void SetObjectRotation(double x, double y, double z) noexcept;
|
|
|
|
|
2017-02-17 21:11:38 +00:00
|
|
|
static void SetContainerItemRefId(const char* refId) noexcept;
|
|
|
|
static void SetContainerItemCount(int count) noexcept;
|
|
|
|
static void SetContainerItemCharge(int charge) noexcept;
|
|
|
|
|
|
|
|
static void AddWorldObject() noexcept;
|
|
|
|
static void AddContainerItem() noexcept;
|
2017-02-14 17:31:56 +00:00
|
|
|
|
2017-02-23 06:23:46 +00:00
|
|
|
static void SendObjectDelete() noexcept;
|
|
|
|
static void SendObjectPlace() noexcept;
|
|
|
|
static void SendObjectScale() noexcept;
|
|
|
|
static void SendObjectLock() noexcept;
|
|
|
|
static void SendObjectUnlock() noexcept;
|
|
|
|
static void SendDoorState() noexcept;
|
|
|
|
static void SendContainer() noexcept;
|
2017-01-28 14:22:30 +00:00
|
|
|
|
2016-11-16 17:28:22 +00:00
|
|
|
static void SetHour(unsigned short pid, double hour) noexcept;
|
|
|
|
static void SetMonth(unsigned short pid, int month) noexcept;
|
|
|
|
static void SetDay(unsigned short pid, int day) noexcept;
|
2016-08-30 05:24:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-04-09 09:28:38 +00:00
|
|
|
#endif //OPENMW_WORLDAPI_HPP
|