mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): add GameScriptRegisterFunctions
This commit is contained in:
parent
61b05eb366
commit
bc1d7cbd66
@ -522,36 +522,6 @@ int32_t Script_IsScanDLLFinished(lua_State* L) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_IsWindowsClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_IsMacClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_IsLinuxClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_LINUX)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_SetRealmSplitState(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
@ -6,3 +6,33 @@
|
||||
int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_IsLinuxClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_LINUX)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_IsMacClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_IsWindowsClient(lua_State* L) {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
lua_pushnumber(L, 1.0);
|
||||
#else
|
||||
lua_pushnil(L);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -6,4 +6,10 @@
|
||||
|
||||
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
||||
|
||||
int32_t Script_IsLinuxClient(lua_State* L);
|
||||
|
||||
int32_t Script_IsMacClient(lua_State* L);
|
||||
|
||||
int32_t Script_IsWindowsClient(lua_State* L);
|
||||
|
||||
#endif
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "ui/Key.hpp"
|
||||
#include "ui/game/CGWorldFrame.hpp"
|
||||
#include "ui/game/GMTicketInfoScript.hpp"
|
||||
#include "ui/game/GameScript.hpp"
|
||||
#include "ui/game/ScriptEvents.hpp"
|
||||
#include "ui/simple/CSimpleTop.hpp"
|
||||
#include "util/CStatus.hpp"
|
||||
@ -14,6 +15,10 @@ CSimpleTop* CGGameUI::s_simpleTop;
|
||||
void LoadScriptFunctions() {
|
||||
// TODO
|
||||
|
||||
GameScriptRegisterFunctions();
|
||||
|
||||
// TODO
|
||||
|
||||
ScriptEventsRegisterFunctions();
|
||||
|
||||
// TODO
|
||||
|
||||
1554
src/ui/game/GameScript.cpp
Normal file
1554
src/ui/game/GameScript.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6
src/ui/game/GameScript.hpp
Normal file
6
src/ui/game/GameScript.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef UI_GAME_GAME_SCRIPT_HPP
|
||||
#define UI_GAME_GAME_SCRIPT_HPP
|
||||
|
||||
void GameScriptRegisterFunctions();
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user