mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#include "ui/game/CGCharacterModelBase.hpp"
|
|
#include "ui/game/CGCharacterModelBaseScript.hpp"
|
|
|
|
int32_t CGCharacterModelBase::s_metatable;
|
|
int32_t CGCharacterModelBase::s_objectType;
|
|
|
|
CSimpleFrame* CGCharacterModelBase::Create(CSimpleFrame* parent) {
|
|
// TODO use CDataAllocator
|
|
|
|
return STORM_NEW(CGCharacterModelBase)(parent);
|
|
}
|
|
|
|
void CGCharacterModelBase::CreateScriptMetaTable() {
|
|
auto L = FrameScript_GetContext();
|
|
CGCharacterModelBase::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGCharacterModelBase::RegisterScriptMethods);
|
|
}
|
|
|
|
int32_t CGCharacterModelBase::GetObjectType() {
|
|
if (!CGCharacterModelBase::s_objectType) {
|
|
CGCharacterModelBase::s_objectType = ++FrameScript_Object::s_objectTypes;
|
|
}
|
|
|
|
return CGCharacterModelBase::s_objectType;
|
|
}
|
|
|
|
void CGCharacterModelBase::RegisterScriptMethods(lua_State* L) {
|
|
CSimpleModel::RegisterScriptMethods(L);
|
|
FrameScript_Object::FillScriptMethodTable(L, CGCharacterModelBaseMethods, NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS);
|
|
}
|
|
|
|
CGCharacterModelBase::CGCharacterModelBase(CSimpleFrame* parent) : CSimpleModel(parent) {
|
|
// TODO
|
|
}
|
|
|
|
int32_t CGCharacterModelBase::GetScriptMetaTable() {
|
|
return CGCharacterModelBase::s_metatable;
|
|
}
|