ScriptFunctions.hpp size reduction
parent
056209b26a
commit
1186d09ec0
@ -0,0 +1,27 @@
|
||||
//
|
||||
// Created by koncord on 30.08.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_GUI_HPP
|
||||
#define OPENMW_GUI_HPP
|
||||
|
||||
#define GUIFUNCTIONS \
|
||||
{"MessageBox", GUIFunctions::MessageBox},\
|
||||
{"CustomMessageBox", GUIFunctions::CustomMessageBox},\
|
||||
{"InputDialog", GUIFunctions::InputDialog},\
|
||||
{"SetMapVisibility", GUIFunctions::SetMapVisibility},\
|
||||
{"SetMapVisibilityAll", GUIFunctions::SetMapVisibilityAll}\
|
||||
|
||||
class GUIFunctions
|
||||
{
|
||||
public:
|
||||
static void MessageBox(unsigned short pid, int id, const char *label) noexcept;
|
||||
static void CustomMessageBox(unsigned short pid, int id, const char *label, const char *buttons) noexcept;
|
||||
static void InputDialog(unsigned short pid, int id, const char *label) noexcept;
|
||||
|
||||
//state 0 - disallow, 1 - allow
|
||||
static void SetMapVisibility(unsigned short targetPID, unsigned short affectedPID, unsigned short state) noexcept;
|
||||
static void SetMapVisibilityAll(unsigned short targetPID, unsigned short state) noexcept;
|
||||
};
|
||||
|
||||
#endif //OPENMW_GUI_HPP
|
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Created by koncord on 30.08.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_ITEMS_HPP
|
||||
#define OPENMW_ITEMS_HPP
|
||||
|
||||
#define ITEMAPI \
|
||||
{"AddItem", ItemFunctions::AddItem},\
|
||||
{"RemoveItem", ItemFunctions::RemoveItem},\
|
||||
{"GetItemCount", ItemFunctions::GetItemCount},\
|
||||
{"EquipItem", ItemFunctions::EquipItem},\
|
||||
{"UnequipItem", ItemFunctions::UnequipItem},\
|
||||
{"GetItemSlot", ItemFunctions::GetItemSlot},\
|
||||
{"HasItemEquipped", ItemFunctions::HasItemEquipped}\
|
||||
|
||||
class ItemFunctions
|
||||
{
|
||||
public:
|
||||
static void AddItem(unsigned short pid, const char* itemName, unsigned short count) noexcept;
|
||||
static void RemoveItem(unsigned short pid, const char* itemName, unsigned short count) noexcept;
|
||||
static void GetItemCount(unsigned short pid, const char* itemName) noexcept;
|
||||
static void EquipItem(unsigned short pid, unsigned short slot, const char* itemName, unsigned short count) noexcept;
|
||||
static void UnequipItem(unsigned short pid, unsigned short slot) noexcept;
|
||||
static bool HasItemEquipped(unsigned short pid, const char* itemName);
|
||||
static const char *GetItemSlot(unsigned short pid, unsigned short slot) noexcept;
|
||||
};
|
||||
|
||||
#endif //OPENMW_ITEMS_HPP
|
@ -0,0 +1,134 @@
|
||||
//
|
||||
// Created by koncord on 30.08.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_STATS_HPP
|
||||
#define OPENMW_STATS_HPP
|
||||
|
||||
#define STATSFUNCTIONS \
|
||||
{"GetName", StatsFunctions::GetName},\
|
||||
{"SetName", StatsFunctions::SetName},\
|
||||
\
|
||||
{"GetRace", StatsFunctions::GetRace},\
|
||||
{"SetRace", StatsFunctions::SetRace},\
|
||||
\
|
||||
{"SetClass", StatsFunctions::SetClass},\
|
||||
{"GetClass", StatsFunctions::GetClass},\
|
||||
\
|
||||
{"GetHead", StatsFunctions::GetHead},\
|
||||
{"SetHead", StatsFunctions::SetHead},\
|
||||
\
|
||||
{"GetHair", StatsFunctions::GetHairstyle},\
|
||||
{"SetHair", StatsFunctions::SetHairstyle},\
|
||||
\
|
||||
{"GetIsMale", StatsFunctions::GetIsMale},\
|
||||
{"SetIsMale", StatsFunctions::SetIsMale},\
|
||||
\
|
||||
{"GetBirthsign", StatsFunctions::GetBirthsign},\
|
||||
{"SetBirthsign", StatsFunctions::SetBirthsign},\
|
||||
\
|
||||
{"GetAttributeId", StatsFunctions::GetAttributeId},\
|
||||
{"GetSkillId", StatsFunctions::GetSkillId},\
|
||||
{"GetAttributeName", StatsFunctions::GetAttributeName},\
|
||||
{"GetSkillName", StatsFunctions::GetSkillName},\
|
||||
\
|
||||
{"GetAttribute", StatsFunctions::GetAttribute},\
|
||||
{"SetAttribute", StatsFunctions::SetAttribute},\
|
||||
{"GetCurrentAttribute", StatsFunctions::GetCurrentAttribute},\
|
||||
{"SetCurrentAttribute", StatsFunctions::SetCurrentAttribute},\
|
||||
{"GetSkill", StatsFunctions::GetSkill},\
|
||||
{"SetSkill", StatsFunctions::SetSkill},\
|
||||
{"GetCurrentSkill", StatsFunctions::GetCurrentSkill},\
|
||||
{"SetCurrentSkill", StatsFunctions::SetCurrentSkill},\
|
||||
\
|
||||
{"GetHealth", StatsFunctions::GetHealth},\
|
||||
{"SetHealth", StatsFunctions::SetHealth},\
|
||||
{"GetCurrentHealth", StatsFunctions::GetCurrentHealth},\
|
||||
{"SetCurrentHealth", StatsFunctions::SetCurrentHealth},\
|
||||
\
|
||||
{"GetMagicka", StatsFunctions::GetMagicka},\
|
||||
{"SetMagicka", StatsFunctions::SetMagicka},\
|
||||
{"GetCurrentMagicka", StatsFunctions::GetCurrentMagicka},\
|
||||
{"SetCurrentMagicka", StatsFunctions::SetCurrentMagicka},\
|
||||
\
|
||||
{"SetFatigue", StatsFunctions::SetFatigue},\
|
||||
{"GetFatigue", StatsFunctions::GetFatigue},\
|
||||
{"SetCurrentFatigue", StatsFunctions::SetCurrentFatigue},\
|
||||
{"GetCurrentFatigue", StatsFunctions::GetCurrentFatigue},\
|
||||
\
|
||||
{"GetIncreaseSkill", StatsFunctions::GetIncreaseSkill},\
|
||||
{"SetIncreaseSkill", StatsFunctions::SetIncreaseSkill},\
|
||||
{"SetCharGenStage", StatsFunctions::SetCharGenStage},\
|
||||
{"Resurrect", StatsFunctions::Resurrect},\
|
||||
{"SendBaseInfo", StatsFunctions::SendBaseInfo},\
|
||||
{"SendAttributes", StatsFunctions::SendAttributes},\
|
||||
{"SendBaseStats", StatsFunctions::SendBaseStats},\
|
||||
{"SendSkills", StatsFunctions::SendSkills}
|
||||
|
||||
class StatsFunctions
|
||||
{
|
||||
public:
|
||||
static void SetName(unsigned short pid, const char *name) noexcept;
|
||||
static const char *GetName(unsigned short pid) noexcept;
|
||||
|
||||
static void SetBirthsign(unsigned short pid, const char *name) noexcept;
|
||||
static const char *GetBirthsign(unsigned short pid) noexcept;
|
||||
|
||||
static void SetRace(unsigned short pid, const char *race) noexcept;
|
||||
static const char *GetRace(unsigned short pid) noexcept;
|
||||
|
||||
static void SetClass(unsigned short pid, const char *name) noexcept;
|
||||
static const char *GetClass(unsigned short pid) noexcept;
|
||||
|
||||
static void SetHead(unsigned short pid, const char *head) noexcept;
|
||||
static const char *GetHead(unsigned short pid) noexcept;
|
||||
|
||||
static void SetHairstyle(unsigned short pid, const char *style) noexcept;
|
||||
static const char *GetHairstyle(unsigned short pid) noexcept;
|
||||
|
||||
static void SetIsMale(unsigned short pid, int male) noexcept;
|
||||
static int GetIsMale(unsigned short pid) noexcept;
|
||||
|
||||
static float GetHealth(unsigned short pid) noexcept;
|
||||
static void SetHealth(unsigned short pid, float health) noexcept;
|
||||
static float GetCurrentHealth(unsigned short pid) noexcept;
|
||||
static void SetCurrentHealth(unsigned short pid, float health) noexcept;
|
||||
|
||||
static float GetMagicka(unsigned short pid) noexcept;
|
||||
static void SetMagicka(unsigned short pid, float magicka) noexcept;
|
||||
static float GetCurrentMagicka(unsigned short pid) noexcept;
|
||||
static void SetCurrentMagicka(unsigned short pid, float magicka) noexcept;
|
||||
|
||||
static float GetFatigue(unsigned short pid) noexcept;
|
||||
static void SetFatigue(unsigned short pid, float fatigue) noexcept;
|
||||
static float GetCurrentFatigue(unsigned short pid) noexcept;
|
||||
static void SetCurrentFatigue(unsigned short pid, float fatigue) noexcept;
|
||||
|
||||
static int GetAttributeId(const char *name) noexcept;
|
||||
static int GetSkillId(const char *name) noexcept;
|
||||
static const char *GetAttributeName(unsigned short attribute) noexcept;
|
||||
static const char *GetSkillName(unsigned short skill) noexcept;
|
||||
|
||||
static int GetAttribute(unsigned short pid, unsigned short attribute) noexcept;
|
||||
static void SetAttribute(unsigned short pid, unsigned short attribute, int value) noexcept;
|
||||
static int GetCurrentAttribute(unsigned short pid, unsigned short attribute) noexcept;
|
||||
static void SetCurrentAttribute(unsigned short pid, unsigned short attribute, int value) noexcept;
|
||||
|
||||
static int GetSkill(unsigned short pid, unsigned short skill) noexcept;
|
||||
static void SetSkill(unsigned short pid, unsigned short skill, int value) noexcept;
|
||||
static int GetCurrentSkill(unsigned short pid, unsigned short skill) noexcept;
|
||||
static void SetCurrentSkill(unsigned short pid, unsigned short skill, int value) noexcept;
|
||||
|
||||
static int GetIncreaseSkill(unsigned short pid, unsigned int pos) noexcept;
|
||||
static void SetIncreaseSkill(unsigned short pid, unsigned int pos, int value) noexcept;
|
||||
|
||||
static void Resurrect(unsigned short pid);
|
||||
static void SetCharGenStage(unsigned short pid, int start, int end) noexcept;
|
||||
|
||||
static void SendBaseInfo(unsigned short pid) noexcept;
|
||||
static void SendAttributes(unsigned short pid) noexcept;
|
||||
static void SendBaseStats(unsigned short pid) noexcept;
|
||||
static void SendSkills(unsigned short pid) noexcept;
|
||||
};
|
||||
|
||||
#endif //OPENMW_STATS_HPP
|
@ -0,0 +1,57 @@
|
||||
//
|
||||
// Created by koncord on 30.08.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_TRANSLOCATIONS_HPP
|
||||
#define OPENMW_TRANSLOCATIONS_HPP
|
||||
|
||||
#include "../Types.hpp"
|
||||
|
||||
#define TRANSLOCATIONFUNCTIONS \
|
||||
{"GetPos", TranslocationFunctions::GetPos},\
|
||||
{"GetPosX", TranslocationFunctions::GetPosX},\
|
||||
{"GetPosY", TranslocationFunctions::GetPosY},\
|
||||
{"GetPosZ", TranslocationFunctions::GetPosZ},\
|
||||
{"SetPos", TranslocationFunctions::SetPos},\
|
||||
\
|
||||
{"GetAngle", TranslocationFunctions::GetAngle},\
|
||||
{"GetAngleX", TranslocationFunctions::GetAngleX},\
|
||||
{"GetAngleY", TranslocationFunctions::GetAngleY},\
|
||||
{"GetAngleZ", TranslocationFunctions::GetAngleZ},\
|
||||
{"SetAngle", TranslocationFunctions::SetAngle},\
|
||||
\
|
||||
{"GetCell", TranslocationFunctions::GetCell},\
|
||||
{"SetCell", TranslocationFunctions::SetCell},\
|
||||
{"SetExterior", TranslocationFunctions::SetExterior},\
|
||||
{"GetExteriorX", TranslocationFunctions::GetExteriorX},\
|
||||
{"GetExteriorY", TranslocationFunctions::GetExteriorY},\
|
||||
{"IsInInterior", TranslocationFunctions::IsInInterior}
|
||||
|
||||
|
||||
class TranslocationFunctions
|
||||
{
|
||||
public:
|
||||
static void GetPos(unsigned short pid, float *x, float *y, float *z) noexcept;
|
||||
static double GetPosX(unsigned short pid) noexcept;
|
||||
static double GetPosY(unsigned short pid) noexcept;
|
||||
static double GetPosZ(unsigned short pid) noexcept;
|
||||
static void SetPos(unsigned short pid, double x, double y, double z) noexcept;
|
||||
|
||||
|
||||
static void GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept;
|
||||
static double GetAngleX(unsigned short pid) noexcept;
|
||||
static double GetAngleY(unsigned short pid) noexcept;
|
||||
static double GetAngleZ(unsigned short pid) noexcept;
|
||||
static void SetAngle(unsigned short pid, double x, double y, double z) noexcept;
|
||||
|
||||
static void SetCell(unsigned short pid, const char *name) noexcept;
|
||||
static const char *GetCell(unsigned short pid) noexcept;
|
||||
|
||||
static void SetExterior(unsigned short pid, int x, int y) noexcept;
|
||||
static int GetExteriorX(unsigned short pid) noexcept;
|
||||
static int GetExteriorY(unsigned short pid) noexcept;
|
||||
|
||||
static bool IsInInterior(unsigned short pid) noexcept;
|
||||
};
|
||||
|
||||
#endif //OPENMW_TRANSLOCATIONS_HPP
|
Loading…
Reference in New Issue