mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-08 18:36:00 +03:00
Compare commits
No commits in common. "0950f7dae3d0623ec59efe69dacdf5a6459395ff" and "0a0c327c464f948e949c8616b89613e8e5a9131c" have entirely different histories.
0950f7dae3
...
0a0c327c46
@ -17,7 +17,6 @@ target_link_libraries(console
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
common
|
common
|
||||||
gx
|
gx
|
||||||
ui
|
|
||||||
storm
|
storm
|
||||||
PRIVATE
|
PRIVATE
|
||||||
client
|
client
|
||||||
|
|||||||
@ -231,7 +231,7 @@ void ConsoleInitializeCommonCommand() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleInitializeDebugCommand() {
|
void ConsoleInitializeDebugCommand() {
|
||||||
ConsoleCommandRegister("script", ConsoleCommand_Script, DEFAULT, nullptr);
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ConsoleCommandComplete(const char* partial, const char** previous, int32_t direction) {
|
int32_t ConsoleCommandComplete(const char* partial, const char** previous, int32_t direction) {
|
||||||
|
|||||||
@ -12,7 +12,6 @@ int32_t CCGxRestart(const char* command, const char* argument);
|
|||||||
DECLARE_COMMAND(Quit);
|
DECLARE_COMMAND(Quit);
|
||||||
DECLARE_COMMAND(Ver);
|
DECLARE_COMMAND(Ver);
|
||||||
DECLARE_COMMAND(SetMap);
|
DECLARE_COMMAND(SetMap);
|
||||||
DECLARE_COMMAND(Script);
|
|
||||||
|
|
||||||
DECLARE_COMMAND(Help);
|
DECLARE_COMMAND(Help);
|
||||||
DECLARE_COMMAND(FontColor);
|
DECLARE_COMMAND(FontColor);
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
#include "console/Command.hpp"
|
|
||||||
#include "console/command/Commands.hpp"
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
DECLARE_COMMAND(Script) {
|
|
||||||
FrameScript_Execute(arguments, "CONSOLE", nullptr);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
#include "gameui/CGCharacterModelBase.hpp"
|
|
||||||
#include "gameui/CGCharacterModelBaseScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGCharacterModelBase::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGCharacterModelBase::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGCharacterModelBase@@", -2);
|
|
||||||
return NEW(CGCharacterModelBase, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGCharacterModelBase::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGCharacterModelBase::RegisterScriptMethods);
|
|
||||||
CGCharacterModelBase::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGCharacterModelBase::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleModel::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGCharacterModelBaseMethods, NUM_CGCHARACTER_MODEL_BASE_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGCharacterModelBase::GetScriptMetaTable() {
|
|
||||||
return CGCharacterModelBase::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGCharacterModelBase::CGCharacterModelBase(CSimpleFrame* parent) : CSimpleModel(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGCHARACTER_MODEL_BASE_HPP
|
|
||||||
#define GAME_UI_CGCHARACTER_MODEL_BASE_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleModel.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGCharacterModelBase : public CSimpleModel {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGCharacterModelBase(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGCHARACTER_MODEL_BASE_HPP
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
#include "gameui/CGCharacterModelBaseScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_SetUnit(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetCreature(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_RefreshUnit(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetRotation(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGCharacterModelBaseMethods[NUM_CGCHARACTER_MODEL_BASE_SCRIPT_METHODS] = {
|
|
||||||
{ "SetUnit", &Script_SetUnit },
|
|
||||||
{ "SetCreature", &Script_SetCreature },
|
|
||||||
{ "RefreshUnit", &Script_RefreshUnit },
|
|
||||||
{ "SetRotation", &Script_SetRotation }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGCHARACTER_MODEL_BASE_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGCHARACTER_MODEL_BASE_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGCHARACTER_MODEL_BASE_SCRIPT_METHODS 4
|
|
||||||
|
|
||||||
extern FrameScript_Method CGCharacterModelBaseMethods[NUM_CGCHARACTER_MODEL_BASE_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
#include "gameui/CGCooldown.hpp"
|
|
||||||
#include "gameui/CGCooldownScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGCooldown::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGCooldown::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGCooldown@@", -2);
|
|
||||||
return NEW(CGCooldown, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGCooldown::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGCooldown::RegisterScriptMethods);
|
|
||||||
CGCooldown::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGCooldown::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleFrame::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGCooldownMethods, NUM_CGCOOLDOWN_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGCooldown::GetScriptMetaTable() {
|
|
||||||
return CGCooldown::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGCooldown::CGCooldown(CSimpleFrame* parent)
|
|
||||||
: CSimpleFrame(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGCOOLDOWN_HPP
|
|
||||||
#define GAME_UI_CGCOOLDOWN_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleFrame.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGCooldown : public CSimpleFrame {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGCooldown(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGCOOLDOWN_HPP
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
#include "gameui/CGCooldownScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_SetCooldown(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetReverse(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetReverse(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetDrawEdge(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetDrawEdge(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGCooldownMethods[NUM_CGCOOLDOWN_SCRIPT_METHODS] = {
|
|
||||||
{ "SetCooldown", &Script_SetCooldown },
|
|
||||||
{ "SetReverse", &Script_SetReverse },
|
|
||||||
{ "GetReverse", &Script_GetReverse },
|
|
||||||
{ "SetDrawEdge", &Script_SetDrawEdge },
|
|
||||||
{ "GetDrawEdge", &Script_GetDrawEdge }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGCOOLDOWN_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGCOOLDOWN_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGCOOLDOWN_SCRIPT_METHODS 5
|
|
||||||
|
|
||||||
extern FrameScript_Method CGCooldownMethods[NUM_CGCOOLDOWN_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
#include "gameui/CGDressUpModelFrame.hpp"
|
|
||||||
#include "gameui/CGDressUpModelFrameScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGDressUpModelFrame::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGDressUpModelFrame::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGDressUpModelFrame@@", -2);
|
|
||||||
return NEW(CGDressUpModelFrame, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGDressUpModelFrame::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGDressUpModelFrame::RegisterScriptMethods);
|
|
||||||
CGDressUpModelFrame::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGDressUpModelFrame::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleFrame::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGDressUpModelFrameMethods, NUM_CGDRESS_UP_MODEL_FRAME_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGDressUpModelFrame::GetScriptMetaTable() {
|
|
||||||
return CGDressUpModelFrame::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGDressUpModelFrame::CGDressUpModelFrame(CSimpleFrame* parent)
|
|
||||||
: CSimpleFrame(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGDRESS_UP_MODEL_FRAME_HPP
|
|
||||||
#define GAME_UI_CGDRESS_UP_MODEL_FRAME_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleFrame.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGDressUpModelFrame : public CSimpleFrame {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGDressUpModelFrame(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGDRESS_UP_MODEL_FRAME_HPP
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
#include "gameui/CGDressUpModelFrameScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_Undress(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_Dress(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_TryOn(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGDressUpModelFrameMethods[NUM_CGDRESS_UP_MODEL_FRAME_SCRIPT_METHODS] = {
|
|
||||||
{ "Undress", &Script_Undress },
|
|
||||||
{ "Dress", &Script_Dress },
|
|
||||||
{ "TryOn", &Script_TryOn }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGDRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGDRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGDRESS_UP_MODEL_FRAME_SCRIPT_METHODS 3
|
|
||||||
|
|
||||||
extern FrameScript_Method CGDressUpModelFrameMethods[NUM_CGDRESS_UP_MODEL_FRAME_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -4,15 +4,9 @@
|
|||||||
#include <storm/Log.hpp>
|
#include <storm/Log.hpp>
|
||||||
|
|
||||||
#include "client/Client.hpp"
|
#include "client/Client.hpp"
|
||||||
#include "gameui/GameScriptFunctions.hpp"
|
|
||||||
#include "gameui/CGWorldFrame.hpp"
|
#include "gameui/CGWorldFrame.hpp"
|
||||||
#include "gameui/CGTooltip.hpp"
|
#include "gameui/CGTooltip.hpp"
|
||||||
#include "gameui/CGCooldown.hpp"
|
#include "gameui/GameScriptFunctions.hpp"
|
||||||
#include "gameui/CGMinimapFrame.hpp"
|
|
||||||
#include "gameui/CGCharacterModelBase.hpp"
|
|
||||||
#include "gameui/CGDressUpModelFrame.hpp"
|
|
||||||
#include "gameui/CGTabardModelFrame.hpp"
|
|
||||||
#include "gameui/CGQuestPOIFrame.hpp"
|
|
||||||
#include "gx/Coordinate.hpp"
|
#include "gx/Coordinate.hpp"
|
||||||
#include "gx/Device.hpp"
|
#include "gx/Device.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
@ -187,12 +181,12 @@ void CGGameUI::Initialize() {
|
|||||||
void CGGameUI::RegisterFrameFactories() {
|
void CGGameUI::RegisterFrameFactories() {
|
||||||
FrameXML_RegisterFactory("WorldFrame", CGWorldFrame::Create, 1);
|
FrameXML_RegisterFactory("WorldFrame", CGWorldFrame::Create, 1);
|
||||||
FrameXML_RegisterFactory("GameTooltip", CGTooltip::Create, 0);
|
FrameXML_RegisterFactory("GameTooltip", CGTooltip::Create, 0);
|
||||||
FrameXML_RegisterFactory("Cooldown", CGCooldown::Create, 0);
|
//FrameXML_RegisterFactory("Cooldown", (int)sub_51A380, 0);
|
||||||
FrameXML_RegisterFactory("Minimap", CGMinimapFrame::Create, 0);
|
//FrameXML_RegisterFactory("Minimap", (int)CGMinimapFrame::Create, 0);
|
||||||
FrameXML_RegisterFactory("PlayerModel", CGCharacterModelBase::Create, 0);
|
//FrameXML_RegisterFactory("PlayerModel", (int)CGCharacterModelBase::Create, 0);
|
||||||
FrameXML_RegisterFactory("DressUpModel", CGDressUpModelFrame::Create, 0);
|
//FrameXML_RegisterFactory("DressUpModel", (int)sub_514300, 0);
|
||||||
FrameXML_RegisterFactory("TabardModel", CGTabardModelFrame::Create, 0);
|
//FrameXML_RegisterFactory("TabardModel", (int)CGTabardModelFrame::Create, 0);
|
||||||
FrameXML_RegisterFactory("QuestPOIFrame", CGQuestPOIFrame::Create, 0);
|
//FrameXML_RegisterFactory("QuestPOIFrame", (int)sub_514260, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGGameUI::Reload() {
|
void CGGameUI::Reload() {
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
#include "gameui/CGMinimapFrame.hpp"
|
|
||||||
#include "gameui/CGMinimapFrameScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGMinimapFrame::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGMinimapFrame::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGMinimapFrame@@", -2);
|
|
||||||
return NEW(CGMinimapFrame, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGMinimapFrame::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGMinimapFrame::RegisterScriptMethods);
|
|
||||||
CGMinimapFrame::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGMinimapFrame::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleFrame::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGMinimapFrameMethods, NUM_CGMINIMAP_FRAME_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGMinimapFrame::GetScriptMetaTable() {
|
|
||||||
return CGMinimapFrame::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGMinimapFrame::CGMinimapFrame(CSimpleFrame* parent)
|
|
||||||
: CSimpleFrame(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGMINIMAP_FRAME_HPP
|
|
||||||
#define GAME_UI_CGMINIMAP_FRAME_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleFrame.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGMinimapFrame : public CSimpleFrame {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGMinimapFrame(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGMINIMAP_FRAME_HPP
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
#include "gameui/CGMinimapFrameScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_SetMaskTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetIconTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetBlipTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetClassBlipTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetPOIArrowTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetStaticPOIArrowTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetCorpsePOIArrowTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetPlayerTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetPlayerTextureHeight(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetPlayerTextureWidth(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetZoomLevels(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetZoom(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetZoom(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_PingLocation(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetPingPosition(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGMinimapFrameMethods[NUM_CGMINIMAP_FRAME_SCRIPT_METHODS] = {
|
|
||||||
{ "SetMaskTexture", &Script_SetMaskTexture },
|
|
||||||
{ "SetIconTexture", &Script_SetIconTexture },
|
|
||||||
{ "SetBlipTexture", &Script_SetBlipTexture },
|
|
||||||
{ "SetClassBlipTexture", &Script_SetClassBlipTexture },
|
|
||||||
{ "SetPOIArrowTexture", &Script_SetPOIArrowTexture },
|
|
||||||
{ "SetStaticPOIArrowTexture", &Script_SetStaticPOIArrowTexture },
|
|
||||||
{ "SetCorpsePOIArrowTexture", &Script_SetCorpsePOIArrowTexture },
|
|
||||||
{ "SetPlayerTexture", &Script_SetPlayerTexture },
|
|
||||||
{ "SetPlayerTextureHeight", &Script_SetPlayerTextureHeight },
|
|
||||||
{ "SetPlayerTextureWidth", &Script_SetPlayerTextureWidth },
|
|
||||||
{ "GetZoomLevels", &Script_GetZoomLevels },
|
|
||||||
{ "GetZoom", &Script_GetZoom },
|
|
||||||
{ "SetZoom", &Script_SetZoom },
|
|
||||||
{ "PingLocation", &Script_PingLocation },
|
|
||||||
{ "GetPingPosition", &Script_GetPingPosition }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGMINIMAP_FRAME_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGMINIMAP_FRAME_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGMINIMAP_FRAME_SCRIPT_METHODS 15
|
|
||||||
|
|
||||||
extern FrameScript_Method CGMinimapFrameMethods[NUM_CGMINIMAP_FRAME_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
#include "gameui/CGQuestPOIFrame.hpp"
|
|
||||||
#include "gameui/CGQuestPOIFrameScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGQuestPOIFrame::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGQuestPOIFrame::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGQuestPOIFrame@@", -2);
|
|
||||||
return NEW(CGQuestPOIFrame, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGQuestPOIFrame::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGQuestPOIFrame::RegisterScriptMethods);
|
|
||||||
CGQuestPOIFrame::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGQuestPOIFrame::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleFrame::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGQuestPOIFrameMethods, NUM_CGQUEST_POI_FRAME_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGQuestPOIFrame::GetScriptMetaTable() {
|
|
||||||
return CGQuestPOIFrame::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGQuestPOIFrame::CGQuestPOIFrame(CSimpleFrame* parent)
|
|
||||||
: CSimpleFrame(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGQUEST_POI_FRAME_HPP
|
|
||||||
#define GAME_UI_CGQUEST_POI_FRAME_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleFrame.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGQuestPOIFrame : public CSimpleFrame {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGQuestPOIFrame(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGQUEST_POI_FRAME_HPP
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
#include "gameui/CGQuestPOIFrameScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_SetFillTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetFillAlpha(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetBorderTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetBorderAlpha(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetBorderScalar(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_DrawQuestBlob(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_EnableSmoothing(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_EnableMerging(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetMergeThreshold(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_SetNumSplinePoints(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_UpdateQuestPOI(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_UpdateMouseOverTooltip(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetTooltipIndex(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetNumTooltips(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGQuestPOIFrameMethods[NUM_CGQUEST_POI_FRAME_SCRIPT_METHODS] = {
|
|
||||||
{ "SetFillTexture", &Script_SetFillTexture },
|
|
||||||
{ "SetFillAlpha", &Script_SetFillAlpha },
|
|
||||||
{ "SetBorderTexture", &Script_SetBorderTexture },
|
|
||||||
{ "SetBorderAlpha", &Script_SetBorderAlpha },
|
|
||||||
{ "SetBorderScalar", &Script_SetBorderScalar },
|
|
||||||
{ "DrawQuestBlob", &Script_DrawQuestBlob },
|
|
||||||
{ "EnableSmoothing", &Script_EnableSmoothing },
|
|
||||||
{ "EnableMerging", &Script_EnableMerging },
|
|
||||||
{ "SetMergeThreshold", &Script_SetMergeThreshold },
|
|
||||||
{ "SetNumSplinePoints", &Script_SetNumSplinePoints },
|
|
||||||
{ "UpdateQuestPOI", &Script_UpdateQuestPOI },
|
|
||||||
{ "UpdateMouseOverTooltip", &Script_UpdateMouseOverTooltip },
|
|
||||||
{ "GetTooltipIndex", &Script_GetTooltipIndex },
|
|
||||||
{ "GetNumTooltips", &Script_GetNumTooltips }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGQUEST_POI_FRAME_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGQUEST_POI_FRAME_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGQUEST_POI_FRAME_SCRIPT_METHODS 14
|
|
||||||
|
|
||||||
extern FrameScript_Method CGQuestPOIFrameMethods[NUM_CGQUEST_POI_FRAME_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
#include "gameui/CGTabardModelFrame.hpp"
|
|
||||||
#include "gameui/CGTabardModelFrameScript.hpp"
|
|
||||||
#include <bc/Memory.hpp>
|
|
||||||
|
|
||||||
int32_t CGTabardModelFrame::s_metatable;
|
|
||||||
|
|
||||||
CSimpleFrame* CGTabardModelFrame::Create(CSimpleFrame* parent) {
|
|
||||||
// TODO: Data = CDataAllocator__GetData(0, ".?AVCGTabardModelFrame@@", -2);
|
|
||||||
return NEW(CGTabardModelFrame, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGTabardModelFrame::CreateScriptMetaTable() {
|
|
||||||
lua_State* L = FrameScript_GetContext();
|
|
||||||
int32_t ref = FrameScript_Object::CreateScriptMetaTable(L, &CGTabardModelFrame::RegisterScriptMethods);
|
|
||||||
CGTabardModelFrame::s_metatable = ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGTabardModelFrame::RegisterScriptMethods(lua_State* L) {
|
|
||||||
CSimpleFrame::RegisterScriptMethods(L);
|
|
||||||
FrameScript_Object::FillScriptMethodTable(L, CGTabardModelFrameMethods, NUM_CGTABARD_MODEL_FRAME_SCRIPT_METHODS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t CGTabardModelFrame::GetScriptMetaTable() {
|
|
||||||
return CGTabardModelFrame::s_metatable;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGTabardModelFrame::CGTabardModelFrame(CSimpleFrame* parent)
|
|
||||||
: CSimpleFrame(parent) {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGTABARD_MODEL_FRAME_HPP
|
|
||||||
#define GAME_UI_CGTABARD_MODEL_FRAME_HPP
|
|
||||||
|
|
||||||
#include "ui/CSimpleFrame.hpp"
|
|
||||||
#include "ui/CSimpleTop.hpp"
|
|
||||||
|
|
||||||
class CGTabardModelFrame : public CSimpleFrame {
|
|
||||||
public:
|
|
||||||
// Static variables
|
|
||||||
static int32_t s_metatable;
|
|
||||||
|
|
||||||
// Static functions
|
|
||||||
static CSimpleFrame* Create(CSimpleFrame* parent);
|
|
||||||
static void CreateScriptMetaTable();
|
|
||||||
static void RegisterScriptMethods(lua_State* L);
|
|
||||||
|
|
||||||
// Virtual member functions
|
|
||||||
virtual int32_t GetScriptMetaTable();
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
CGTabardModelFrame(CSimpleFrame* parent);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_UI_CGTABARD_MODEL_FRAME_HPP
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
#include "gameui/CGTabardModelFrameScript.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
|
||||||
#include "util/Unimplemented.hpp"
|
|
||||||
|
|
||||||
static int32_t Script_InitializeTabardColors(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_Save(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_CycleVariation(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetUpperBackgroundFileName(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetLowerBackgroundFileName(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetUpperEmblemFileName(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetLowerEmblemFileName(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetUpperEmblemTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_GetLowerEmblemTexture(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t Script_CanSaveTabardNow(lua_State* L) {
|
|
||||||
WHOA_UNIMPLEMENTED(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FrameScript_Method CGTabardModelFrameMethods[NUM_CGTABARD_MODEL_FRAME_SCRIPT_METHODS] = {
|
|
||||||
{ "InitializeTabardColors", &Script_InitializeTabardColors },
|
|
||||||
{ "Save", &Script_Save },
|
|
||||||
{ "CycleVariation", &Script_CycleVariation },
|
|
||||||
{ "GetUpperBackgroundFileName", &Script_GetUpperBackgroundFileName },
|
|
||||||
{ "GetLowerBackgroundFileName", &Script_GetLowerBackgroundFileName },
|
|
||||||
{ "GetUpperEmblemFileName", &Script_GetUpperEmblemFileName },
|
|
||||||
{ "GetLowerEmblemFileName", &Script_GetLowerEmblemFileName },
|
|
||||||
{ "GetUpperEmblemTexture", &Script_GetUpperEmblemTexture },
|
|
||||||
{ "GetLowerEmblemTexture", &Script_GetLowerEmblemTexture },
|
|
||||||
{ "CanSaveTabardNow", &Script_CanSaveTabardNow }
|
|
||||||
};
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#ifndef GAME_UI_CGTABARD_MODEL_FRAME_SCRIPT_HPP
|
|
||||||
#define GAME_UI_CGTABARD_MODEL_FRAME_SCRIPT_HPP
|
|
||||||
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
|
|
||||||
#define NUM_CGTABARD_MODEL_FRAME_SCRIPT_METHODS 10
|
|
||||||
|
|
||||||
extern FrameScript_Method CGTabardModelFrameMethods[NUM_CGTABARD_MODEL_FRAME_SCRIPT_METHODS];
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -9,7 +9,6 @@
|
|||||||
#include "world/CWorldScene.hpp"
|
#include "world/CWorldScene.hpp"
|
||||||
#include "gameui/camera/CGCamera.hpp"
|
#include "gameui/camera/CGCamera.hpp"
|
||||||
#include "event/EvtKeyDown.hpp"
|
#include "event/EvtKeyDown.hpp"
|
||||||
#include "console/Console.hpp"
|
|
||||||
|
|
||||||
#include "model/Model2.hpp"
|
#include "model/Model2.hpp"
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
#include "gameui/GameScriptFunctions.hpp"
|
#include "gameui/GameScriptFunctions.hpp"
|
||||||
#include "gameui/CGGameUI.hpp"
|
#include "gameui/CGGameUI.hpp"
|
||||||
#include "gameui/CGTooltip.hpp"
|
#include "gameui/CGTooltip.hpp"
|
||||||
#include "gameui/CGCooldown.hpp"
|
|
||||||
#include "gameui/CGMinimapFrame.hpp"
|
|
||||||
#include "gameui/CGCharacterModelBase.hpp"
|
|
||||||
#include "gameui/CGDressUpModelFrame.hpp"
|
|
||||||
#include "gameui/CGTabardModelFrame.hpp"
|
|
||||||
#include "gameui/CGQuestPOIFrame.hpp"
|
|
||||||
#include "console/Console.hpp"
|
|
||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
@ -15,8 +8,6 @@
|
|||||||
|
|
||||||
// External from "ui/ScriptFunctions.hpp"
|
// External from "ui/ScriptFunctions.hpp"
|
||||||
void RegisterSimpleFrameScriptMethods();
|
void RegisterSimpleFrameScriptMethods();
|
||||||
int32_t Script_GetScreenWidth(lua_State* L);
|
|
||||||
int32_t Script_GetScreenHeight(lua_State* L);
|
|
||||||
|
|
||||||
|
|
||||||
static int32_t Script_FrameXML_Debug(lua_State* L) {
|
static int32_t Script_FrameXML_Debug(lua_State* L) {
|
||||||
@ -583,6 +574,14 @@ static int32_t Script_ArenaTeamDisband(lua_State* L) {
|
|||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetScreenWidth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int32_t Script_GetScreenHeight(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t Script_GetDamageBonusStat(lua_State* L) {
|
static int32_t Script_GetDamageBonusStat(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
@ -1263,14 +1262,7 @@ static int32_t Script_IsThreatWarningEnabled(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_ConsoleAddMessage(lua_State* L) {
|
static int32_t Script_ConsoleAddMessage(lua_State* L) {
|
||||||
if (!lua_isstring(L, 1)) {
|
WHOA_UNIMPLEMENTED(0);
|
||||||
return luaL_error(L, "Usage: ConsoleAddMessage(string)");
|
|
||||||
}
|
|
||||||
auto text = lua_tolstring(L, 1, 0);
|
|
||||||
if (text && *text) {
|
|
||||||
ConsolePrintf("%s", text);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetItemUniqueness(lua_State* L) {
|
static int32_t Script_GetItemUniqueness(lua_State* L) {
|
||||||
@ -1617,12 +1609,8 @@ FrameScript_Method GameScript::s_ScriptFunctions_Game[NUM_SCRIPT_FUNCTIONS_GAME]
|
|||||||
void LoadScriptFunctions() {
|
void LoadScriptFunctions() {
|
||||||
RegisterSimpleFrameScriptMethods();
|
RegisterSimpleFrameScriptMethods();
|
||||||
CGTooltip::CreateScriptMetaTable();
|
CGTooltip::CreateScriptMetaTable();
|
||||||
CGCooldown::CreateScriptMetaTable();
|
|
||||||
CGMinimapFrame::CreateScriptMetaTable();
|
// TODO
|
||||||
CGCharacterModelBase::CreateScriptMetaTable();
|
|
||||||
CGDressUpModelFrame::CreateScriptMetaTable();
|
|
||||||
CGTabardModelFrame::CreateScriptMetaTable();
|
|
||||||
CGQuestPOIFrame::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_GAME; ++i) {
|
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_GAME; ++i) {
|
||||||
FrameScript_RegisterFunction(
|
FrameScript_RegisterFunction(
|
||||||
|
|||||||
@ -9,10 +9,7 @@ static int32_t Script_BNGetInfo(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_BNGetNumFriends(lua_State* L) {
|
static int32_t Script_BNGetNumFriends(lua_State* L) {
|
||||||
// TODO
|
WHOA_UNIMPLEMENTED(0);
|
||||||
lua_pushnumber(L, 0.0);
|
|
||||||
lua_pushnumber(L, 0.0);
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_BNGetFriendInfo(lua_State* L) {
|
static int32_t Script_BNGetFriendInfo(lua_State* L) {
|
||||||
@ -52,9 +49,7 @@ static int32_t Script_BNGetSelectedFriend(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_BNGetNumFriendInvites(lua_State* L) {
|
static int32_t Script_BNGetNumFriendInvites(lua_State* L) {
|
||||||
// TODO
|
WHOA_UNIMPLEMENTED(0);
|
||||||
lua_pushnumber(L, 0.0);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_BNGetFriendInviteInfo(lua_State* L) {
|
static int32_t Script_BNGetFriendInviteInfo(lua_State* L) {
|
||||||
|
|||||||
@ -9,9 +9,7 @@ static int32_t Script_ContainerIDToInventoryID(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetContainerNumSlots(lua_State* L) {
|
static int32_t Script_GetContainerNumSlots(lua_State* L) {
|
||||||
// TODO
|
WHOA_UNIMPLEMENTED(0);
|
||||||
lua_pushnumber(L, 16.0);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetContainerItemInfo(lua_State* L) {
|
static int32_t Script_GetContainerItemInfo(lua_State* L) {
|
||||||
|
|||||||
@ -5,10 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static int32_t Script_GetNumFriends(lua_State* L) {
|
static int32_t Script_GetNumFriends(lua_State* L) {
|
||||||
// TODO
|
WHOA_UNIMPLEMENTED(0);
|
||||||
lua_pushnumber(L, 10.0);
|
|
||||||
lua_pushnumber(L, 0.0);
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetFriendInfo(lua_State* L) {
|
static int32_t Script_GetFriendInfo(lua_State* L) {
|
||||||
|
|||||||
@ -5,9 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static int32_t Script_GetNumTrackingTypes(lua_State* L) {
|
static int32_t Script_GetNumTrackingTypes(lua_State* L) {
|
||||||
// TODO
|
WHOA_UNIMPLEMENTED(0);
|
||||||
lua_pushnumber(L, 0.0);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetTrackingInfo(lua_State* L) {
|
static int32_t Script_GetTrackingInfo(lua_State* L) {
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include "client/ClientServices.hpp"
|
|
||||||
#include <common/Time.hpp>
|
#include <common/Time.hpp>
|
||||||
|
|
||||||
static int32_t Script_GetTime(lua_State* L) {
|
static int32_t Script_GetTime(lua_State* L) {
|
||||||
@ -34,8 +33,7 @@ static int32_t Script_AppendToFile(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
static int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
||||||
lua_pushnumber(L, ClientServices::GetExpansionLevel());
|
WHOA_UNIMPLEMENTED(0);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Script_UnitExists(lua_State* L) {
|
static int32_t Script_UnitExists(lua_State* L) {
|
||||||
@ -247,7 +245,7 @@ static int32_t Script_UnitSex(lua_State* L) {
|
|||||||
|
|
||||||
static int32_t Script_UnitLevel(lua_State* L) {
|
static int32_t Script_UnitLevel(lua_State* L) {
|
||||||
// TODO
|
// TODO
|
||||||
lua_pushnumber(L, 25.0);
|
lua_pushnumber(L, 1.0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -815,13 +815,6 @@ void CLayoutFrame::SetProtectFlag(uint32_t flag) {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLayoutFrame::SetSize(float width, float height) {
|
|
||||||
this->m_flags &= ~0x8;
|
|
||||||
this->m_width = width;
|
|
||||||
this->m_height = height;
|
|
||||||
this->Resize(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLayoutFrame::SetWidth(float width) {
|
void CLayoutFrame::SetWidth(float width) {
|
||||||
this->m_flags &= ~0x8;
|
this->m_flags &= ~0x8;
|
||||||
this->m_width = width;
|
this->m_width = width;
|
||||||
|
|||||||
@ -46,7 +46,6 @@ class CLayoutFrame {
|
|||||||
virtual ~CLayoutFrame();
|
virtual ~CLayoutFrame();
|
||||||
virtual CLayoutFrame* GetLayoutParent();
|
virtual CLayoutFrame* GetLayoutParent();
|
||||||
virtual bool SetLayoutScale(float scale, bool force);
|
virtual bool SetLayoutScale(float scale, bool force);
|
||||||
virtual void SetSize(float width, float height);
|
|
||||||
virtual void SetWidth(float width);
|
virtual void SetWidth(float width);
|
||||||
virtual void SetHeight(float height);
|
virtual void SetHeight(float height);
|
||||||
virtual float GetWidth();
|
virtual float GetWidth();
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
#include "ui/FrameScript_Object.hpp"
|
#include "ui/FrameScript_Object.hpp"
|
||||||
#include "ui/CScriptRegion.hpp"
|
#include "ui/CScriptRegion.hpp"
|
||||||
#include "ui/CSimpleTop.hpp"
|
#include "ui/CSimpleTop.hpp"
|
||||||
#include "ui/CFramePoint.hpp"
|
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/StringTo.hpp"
|
#include "util/StringTo.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
@ -11,20 +10,11 @@
|
|||||||
#include <tempest/Rect.hpp>
|
#include <tempest/Rect.hpp>
|
||||||
|
|
||||||
int32_t CScriptRegion_IsProtected(lua_State* L) {
|
int32_t CScriptRegion_IsProtected(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
// TODO
|
|
||||||
lua_pushnil(L);
|
|
||||||
lua_pushnil(L);
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_CanChangeProtectedState(lua_State* L) {
|
int32_t CScriptRegion_CanChangeProtectedState(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
// TODO
|
|
||||||
lua_pushnil(L);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_SetParent(lua_State* L) {
|
int32_t CScriptRegion_SetParent(lua_State* L) {
|
||||||
@ -32,31 +22,7 @@ int32_t CScriptRegion_SetParent(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetRect(lua_State* L) {
|
int32_t CScriptRegion_GetRect(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect;
|
|
||||||
|
|
||||||
if (!region->GetRect(&rect)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
float left = CoordinateGetAspectCompensation() * 1024.0f * rect.minX / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(left));
|
|
||||||
|
|
||||||
float top = CoordinateGetAspectCompensation() * 1024.0f * rect.minY / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(top));
|
|
||||||
|
|
||||||
float width = CoordinateGetAspectCompensation() * 1024.0f * (rect.maxX - rect.minX) / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(width));
|
|
||||||
|
|
||||||
float height = CoordinateGetAspectCompensation() * 1024.0f * (rect.maxY - rect.minY) / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(height));
|
|
||||||
|
|
||||||
return 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetCenter(lua_State* L) {
|
int32_t CScriptRegion_GetCenter(lua_State* L) {
|
||||||
@ -88,83 +54,19 @@ int32_t CScriptRegion_GetCenter(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetLeft(lua_State* L) {
|
int32_t CScriptRegion_GetLeft(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect;
|
|
||||||
|
|
||||||
if (region->GetRect(&rect)) {
|
|
||||||
float value = CoordinateGetAspectCompensation() * 1024.0f * rect.minX / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(value));
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetRight(lua_State* L) {
|
int32_t CScriptRegion_GetRight(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect;
|
|
||||||
|
|
||||||
if (region->GetRect(&rect)) {
|
|
||||||
float value = CoordinateGetAspectCompensation() * 1024.0f * rect.maxX / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(value));
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetTop(lua_State* L) {
|
int32_t CScriptRegion_GetTop(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect;
|
|
||||||
|
|
||||||
if (region->GetRect(&rect)) {
|
|
||||||
float value = CoordinateGetAspectCompensation() * 1024.0f * rect.maxY / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(value));
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetBottom(lua_State* L) {
|
int32_t CScriptRegion_GetBottom(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect;
|
|
||||||
|
|
||||||
if (region->GetRect(&rect)) {
|
|
||||||
float value = CoordinateGetAspectCompensation() * 1024.0f * rect.minY / region->m_layoutScale;
|
|
||||||
lua_pushnumber(L, DDCToNDCWidth(value));
|
|
||||||
} else {
|
|
||||||
lua_pushnil(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetWidth(lua_State* L) {
|
int32_t CScriptRegion_GetWidth(lua_State* L) {
|
||||||
@ -266,80 +168,15 @@ int32_t CScriptRegion_SetHeight(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_SetSize(lua_State* L) {
|
int32_t CScriptRegion_SetSize(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
if (!region->ProtectedFunctionsAllowed()) {
|
|
||||||
// TODO
|
|
||||||
// - disallowed logic
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!lua_isnumber(L, 2) || !lua_isnumber(L, 3)) {
|
|
||||||
return luaL_error(L, "Usage: %s:SetSize(width, height)", region->GetDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
float width = lua_tonumber(L, 2);
|
|
||||||
float ndcWidth = width / (CoordinateGetAspectCompensation() * 1024.0f);
|
|
||||||
float ddcWidth = NDCToDDCWidth(ndcWidth);
|
|
||||||
|
|
||||||
float height = lua_tonumber(L, 3);
|
|
||||||
float ndcHeight = height / (CoordinateGetAspectCompensation() * 1024.0f);
|
|
||||||
float ddcHeight = NDCToDDCWidth(ndcHeight);
|
|
||||||
|
|
||||||
region->SetSize(width, height);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetSize(lua_State* L) {
|
int32_t CScriptRegion_GetSize(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
float width = region->GetWidth();
|
|
||||||
float height = region->GetHeight();
|
|
||||||
|
|
||||||
if ((width == 0.0f || height == 0.0f) && !StringToBOOL(L, 2, 0)) {
|
|
||||||
if (region->IsResizePending()) {
|
|
||||||
region->Resize(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect rect = { 0.0f, 0.0f, 0.0f, 0.0f };
|
|
||||||
|
|
||||||
if (region->GetRect(&rect)) {
|
|
||||||
width = (rect.maxX - rect.minX) / region->m_layoutScale;
|
|
||||||
height = (rect.maxY - rect.minY) / region->m_layoutScale;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
float ddcWidth = CoordinateGetAspectCompensation() * 1024.0f * width;
|
|
||||||
float ndcWidth = DDCToNDCWidth(ddcWidth);
|
|
||||||
lua_pushnumber(L, ndcWidth);
|
|
||||||
|
|
||||||
float ddcHeight = CoordinateGetAspectCompensation() * 1024.0f * height;
|
|
||||||
float ndcHeight = DDCToNDCWidth(ddcHeight);
|
|
||||||
lua_pushnumber(L, ndcHeight);
|
|
||||||
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetNumPoints(lua_State* L) {
|
int32_t CScriptRegion_GetNumPoints(lua_State* L) {
|
||||||
int32_t type = CScriptRegion::GetObjectType();
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
|
|
||||||
|
|
||||||
int32_t count = 0;
|
|
||||||
|
|
||||||
for (int32_t i = 0; i < FRAMEPOINT_NUMPOINTS; i++) {
|
|
||||||
auto point = region->m_points[i];
|
|
||||||
|
|
||||||
if (point && !(point->m_flags & 0x8)) {
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_pushnumber(L, count);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CScriptRegion_GetPoint(lua_State* L) {
|
int32_t CScriptRegion_GetPoint(lua_State* L) {
|
||||||
|
|||||||
@ -60,37 +60,7 @@ int32_t strsplit(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t strjoin(lua_State* L) {
|
int32_t strjoin(lua_State* L) {
|
||||||
size_t length = 0;
|
WHOA_UNIMPLEMENTED(0);
|
||||||
auto v9 = luaL_checklstring(L, 1, &length);
|
|
||||||
int32_t v1 = lua_gettop(L);
|
|
||||||
int32_t v2 = v1 - 1;
|
|
||||||
if (length) {
|
|
||||||
if (v1 == 1) {
|
|
||||||
lua_pushstring(L, "");
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
int32_t v4 = 2 * v2;
|
|
||||||
int32_t v8 = 2 * v2;
|
|
||||||
if (!lua_checkstack(L, 2 * v2))
|
|
||||||
return luaL_error(L, "strjoin(): Stack overflow");
|
|
||||||
if (v2 > 1) {
|
|
||||||
int32_t v5 = 3;
|
|
||||||
int32_t v6 = v2 - 1;
|
|
||||||
do {
|
|
||||||
lua_pushlstring(L, v9, length);
|
|
||||||
lua_insert(L, v5);
|
|
||||||
v5 += 2;
|
|
||||||
--v6;
|
|
||||||
} while (v6);
|
|
||||||
v4 = v8;
|
|
||||||
}
|
|
||||||
lua_concat(L, v4 - 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
lua_concat(L, v1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t sub_816C40(lua_State* L) {
|
int32_t sub_816C40(lua_State* L) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user