port: EffectLib + EterBase/Utils platform bodies (1:1 40250)
EffectLib's 18 units are copied verbatim (Type.h: drop a comment backslash that clang splices into the next enum line). The remaining Utils stubs get the 40250 bodies, so .msf fly data resolve relative .mse attachments, and CPythonResource registers mde/mdatr as 40250 does. login_flow spawns level_up.mse and sees its particle draws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
03de3f314a
commit
b69116992c
@@ -47,6 +47,7 @@
|
||||
#include "GameLib/RaceMotionData.h"
|
||||
#include "GameLib/FlyingData.h"
|
||||
#include "GameLib/FlyingObjectManager.h"
|
||||
#include "EffectLib/EffectManager.h"
|
||||
#include "GameLib/ItemManager.h"
|
||||
#include "UserInterface/PythonItem.h"
|
||||
#include "UserInterface/StdAfx.h"
|
||||
@@ -503,6 +504,27 @@ int main(int argc, char** argv)
|
||||
CHECK(!CFlyingManager::Instance().RegisterFlyingData(msf));
|
||||
}
|
||||
|
||||
// EffectLib: playersettingmodule.py registered the level-up effect (chrmgr.RegisterEffect → CEffectManager::
|
||||
// RegisterEffect2, including the .mse files the .msf fly data attach by relative name). Created at the
|
||||
// actor, RenderGame's CEffectManager::Render draws its particles as textured, alpha-blended world draws.
|
||||
if (main_instance)
|
||||
{
|
||||
const char* mse = "d:/ymir work/effect/etc/levelup_1/level_up.mse";
|
||||
TPixelPosition here = {};
|
||||
main_instance->NEW_GetPixelPosition(&here);
|
||||
CEffectManager& effects = CEffectManager::Instance();
|
||||
const int index = effects.CreateEffect(mse, D3DXVECTOR3(here.x, -here.y, here.z), D3DXVECTOR3(0, 0, 0));
|
||||
CHECK(index >= 0 && effects.IsAliveEffect(index));
|
||||
auto effect_draw = [] {
|
||||
for (const Render3DDraw& d : Render3DDraws())
|
||||
if (!d.pretransformed && d.alpha_blend && d.texture0.find("effect\\etc\\levelup_1\\") != std::string::npos)
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
CHECK(pump_until(3, effect_draw));
|
||||
effects.DestroyEffectInstance(index);
|
||||
}
|
||||
|
||||
// item module (PythonItemModule.cpp) over the loaded item_proto: SelectItem + the selected item's fields.
|
||||
CHECK(py("import item\n"
|
||||
"item.SelectItem(19)\n"
|
||||
|
||||
Reference in New Issue
Block a user