Core (CSimpleFrame + Lua, CSimpleTop/CFrameStrata/CSimpleRender/ CRenderBatch, CSimpleRegion/CBackdropGenerator/CScriptRegion), animation, text (FontString/Font/Fontable), texture and model, buttons, EditBox, MessageFrame/MessageScrollFrame, MovieFrame/ColorSelect/StatusBar, Slider/ScrollFrame/HTML/HyperlinkedFrame, all Lua method tables and RegisterScriptMethods. Layouts, vtables and sizes rebuilt from the 12340 ctors, vtables and allocator initializers; CScriptObject vtable slots 5/6 fixed; CSimpleFontedFrame is a real secondary base. Lua error paths return after luaL_error as in 12340 (209 sites; 5 fall through). Binary quirks kept and documented in docs/. Supporting additions: Event key/char/ime/focus/size event headers, Scrn/Scrn.h (ScrnLayerCreate), DivxDecoder import declarations, C2Vector/CRect helpers, CM2Light dtor, OsInputEnableSecureMode, stpl.h instance addresses, FrameXML LoadXML_AnimGroup/Create_SimpleMovieFrame. Engine->WoW includes where 12340 calls directly: CSimpleModelFFX, StringToMouseButton, GetDeclinedWord, EmblemTextureUpdate. Also drops stale VERIFY stamps found invalid by the harness recheck. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
#include <cstddef>
|
|
#include <cstdint>
|
|
#include "Engine/Source/Frame/CSimpleAlphaAnim.h"
|
|
#include "Engine/Source/FrameScript/FrameScript.h"
|
|
#include "Engine/Source/FrameScript/FrameScript_Object.h"
|
|
#include "Engine/Source/lua-5.1/src/lauxlib.h"
|
|
#include "Engine/Source/lua-5.1/src/lua.h"
|
|
|
|
// VERIFY: d8ba0810 auto
|
|
// OFFSET: 0x004A6DA0
|
|
static int32_t Script_SetChange(lua_State* L) {
|
|
CSimpleAlphaAnim* anim = static_cast<CSimpleAlphaAnim*>(FrameScript_GetObjectThis(L, CSimpleAlphaAnim::GetObjectType()));
|
|
|
|
if (!lua_isnumber(L, 2)) {
|
|
const char* name = anim->GetName();
|
|
luaL_error(L, "Usage: %s:SetChange(change)", name ? name : "<unnamed>");
|
|
return 0;
|
|
}
|
|
|
|
anim->SetChange(lua_tonumber(L, 2));
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: 110769d8 manual
|
|
// OFFSET: 0x004A6E20
|
|
static int32_t Script_GetChange(lua_State* L) {
|
|
CSimpleAlphaAnim* anim = static_cast<CSimpleAlphaAnim*>(FrameScript_GetObjectThis(L, CSimpleAlphaAnim::GetObjectType()));
|
|
lua_pushnumber(L, anim->m_change * (1.0f / 255.0f));
|
|
return 1;
|
|
}
|
|
|
|
// VERIFY: cd7dd594 auto
|
|
// OFFSET: 0x004A6E80
|
|
void CSimpleAlphaAnim::CreateScriptMetaTable() {
|
|
CSimpleAlphaAnim::s_metatable = FrameScript_Object::CreateScriptMetaTable(FrameScript_GetContext(), &CSimpleAlphaAnim::RegisterScriptMethods);
|
|
}
|
|
|
|
// VERIFY: 608d8f16 auto
|
|
// OFFSET: 0x004A4E80
|
|
void CSimpleAlphaAnim::DestroyScriptMetaTable() {
|
|
luaL_unref(FrameScript_GetContext(), LUA_REGISTRYINDEX, CSimpleAlphaAnim::s_metatable);
|
|
CSimpleAlphaAnim::s_metatable = LUA_NOREF;
|
|
}
|
|
|
|
// STATIC: 0x00AC1AA0
|
|
static FrameScript_Method s_ScriptMethods[] = {
|
|
{ "SetChange", &Script_SetChange },
|
|
{ "GetChange", &Script_GetChange },
|
|
};
|
|
|
|
// VERIFY: 523f1ec1 manual
|
|
// OFFSET: 0x004A4E50
|
|
void CSimpleAlphaAnim::RegisterScriptMethods(lua_State* L) {
|
|
CSimpleAnim::RegisterScriptMethods(L);
|
|
FrameScript_Object::FillScriptMethodTable(L, s_ScriptMethods, sizeof(s_ScriptMethods) / sizeof(s_ScriptMethods[0]));
|
|
}
|