whoa/src/ui/game/CGCharacterModelBase.cpp
fallenoak f19894ef12
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
feat(ui): add stub implementations of remaining game frame classes
2026-01-29 21:33:04 -06:00

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;
}