Update jbus, initial CEnergyBall stub

This commit is contained in:
Phillip Stephens 2019-08-23 01:32:48 -07:00
parent 7b77e9ace9
commit 9866bac443
5 changed files with 63 additions and 2 deletions

View File

@ -0,0 +1,11 @@
#include "MP1/World/CEnergyBall.hpp"
namespace urde::MP1 {
CEnergyBall::CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& actParms, const CPatternedInfo& pInfo, s32 w1,
float f1, const CDamageInfo& dInfo1, float f2, const CAssetId& a1, s16 sfxId1,
const CAssetId& a2, const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4,
const CDamageInfo& dInfo2, float f5)
: CPatterned(ECharacter::EnergyBall, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo,
EMovementType::Flyer, EColliderType::One, EBodyType::NewFlyer, actParms, EKnockBackVariant::Medium) {}
}

View File

@ -0,0 +1,15 @@
#pragma once
#include "World/CPatterned.hpp"
namespace urde::MP1 {
class CEnergyBall : public CPatterned {
public:
DEFINE_PATTERNED(EnergyBall)
CEnergyBall(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& actParms, const CPatternedInfo& pInfo, s32 w1, float f1,
const CDamageInfo& dInfo1, float f2, const CAssetId& a1, s16 sfxId1, const CAssetId& a2,
const CAssetId& a3, s16 sfxId2, float f3, float f4, const CAssetId& a4, const CDamageInfo& dInfo2,
float f5);
};
}

View File

@ -10,6 +10,7 @@ set(MP1_WORLD_SOURCES
CBabygoth.hpp CBabygoth.cpp CBabygoth.hpp CBabygoth.cpp
CTryclops.hpp CTryclops.cpp CTryclops.hpp CTryclops.cpp
CFireFlea.hpp CFireFlea.cpp CFireFlea.hpp CFireFlea.cpp
CEnergyBall.hpp CEnergyBall.cpp
CEyeball.hpp CEyeball.cpp CEyeball.hpp CEyeball.cpp
CAtomicAlpha.hpp CAtomicAlpha.cpp CAtomicAlpha.hpp CAtomicAlpha.cpp
CAtomicBeta.hpp CAtomicBeta.cpp CAtomicBeta.hpp CAtomicBeta.cpp

View File

@ -117,6 +117,7 @@
#include "MP1/World/CBloodFlower.hpp" #include "MP1/World/CBloodFlower.hpp"
#include "MP1/World/CFlickerBat.hpp" #include "MP1/World/CFlickerBat.hpp"
#include "Camera/CPathCamera.hpp" #include "Camera/CPathCamera.hpp"
#include "MP1/World/CEnergyBall.hpp"
namespace urde { namespace urde {
static logvisor::Module Log("urde::ScriptLoader"); static logvisor::Module Log("urde::ScriptLoader");
@ -3572,6 +3573,39 @@ CEntity* ScriptLoader::LoadShadowProjector(CStateManager& mgr, CInputStream& in,
} }
CEntity* ScriptLoader::LoadEnergyBall(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { CEntity* ScriptLoader::LoadEnergyBall(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) {
if (!EnsurePropertyCount(propCount, 16, "EnergyBall"))
return nullptr; return nullptr;
SScaledActorHead actorHead = LoadScaledActorHead(in, mgr);
const auto pair = CPatternedInfo::HasCorrectParameterCount(in);
if (!pair.first)
return nullptr;
CPatternedInfo pInfo(in, pair.second);
const CAnimationParameters& animParms = pInfo.GetAnimationParameters();
if (!animParms.GetACSFile().IsValid())
return nullptr;
CActorParameters actParms = LoadActorParameters(in);
u32 w1 = in.readUint32Big();
float f1 = in.readFloatBig();
CDamageInfo dInfo1(in);
float f2 = in.readFloatBig();
CAssetId a1(in);
s16 sfxId1 = CSfxManager::TranslateSFXID(in.readUint32Big());
CAssetId a2(in);
CAssetId a3(in);
s16 sfxId2 = CSfxManager::TranslateSFXID(in.readUint32Big());
float f3 = in.readFloatBig();
float f4 = in.readFloatBig();
CAssetId a4(in);
CDamageInfo dInfo2 = propCount >= 19 ? CDamageInfo(in) : CDamageInfo();
float f5 = propCount >= 20 ? in.readFloatBig() : 3.0f;
CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), actorHead.x40_scale,
animParms.GetInitialAnimation(), true));
return new MP1::CEnergyBall(mgr.AllocateUniqueId(), actorHead.x0_name, info, actorHead.x10_transform, std::move(mData),
actParms, pInfo, w1, f1, dInfo1, f2, a1, sfxId1, a2, a3, sfxId2, f3, f4, a4, dInfo2, f5);
} }
} // namespace urde } // namespace urde

2
jbus

@ -1 +1 @@
Subproject commit 876c4dcde449ec641b9d9e013e4d030e09fd59be Subproject commit a79aeacfb9dbb4fb388d9373402f9967ba6dc17b