feat(glue): implement Script_SetCharCustomizeFrame

This commit is contained in:
fallenoak 2025-12-28 19:07:55 -06:00
parent 28752c69da
commit e3f4322ae3
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,3 @@
#include "glue/CCharacterCreation.hpp"
CSimpleModelFFX* CCharacterCreation::s_charCustomizeFrame;

View File

@ -0,0 +1,12 @@
#ifndef GLUE_C_CHARACTER_CREATION_HPP
#define GLUE_C_CHARACTER_CREATION_HPP
class CSimpleModelFFX;
class CCharacterCreation {
public:
// Static variables
static CSimpleModelFFX* s_charCustomizeFrame;
};
#endif

View File

@ -1,12 +1,26 @@
#include "glue/CCharacterCreationScript.hpp"
#include "glue/CCharacterCreation.hpp"
#include "ui/FrameScript.hpp"
#include "ui/Types.hpp"
#include "ui/simple/CSimpleModelFFX.hpp"
#include "util/Lua.hpp"
#include "util/Unimplemented.hpp"
#include <cstdint>
int32_t Script_SetCharCustomizeFrame(lua_State* L) {
WHOA_UNIMPLEMENTED(0);
if (!lua_isstring(L, 1)) {
luaL_error(L, "Usage: SetCharCustomizeFrame(\"frameName\")");
return 0;
}
auto type = CSimpleModel::GetObjectType();
auto frame = static_cast<CSimpleModelFFX*>(CScriptObject::GetScriptObjectByName(lua_tostring(L, 1), type));
if (frame) {
CCharacterCreation::s_charCustomizeFrame = frame;
}
return 0;
}
int32_t Script_SetCharCustomizeBackground(lua_State* L) {