2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-04-09 21:49:02 -07:00
|
|
|
|
2019-09-27 19:53:03 -07:00
|
|
|
#include <string>
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
2022-02-19 05:04:45 -08:00
|
|
|
#include "Runtime/Streams/IOStreams.hpp"
|
2019-09-27 19:53:03 -07:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Character/CEffectComponent.hpp"
|
|
|
|
#include "Runtime/Character/CPASDatabase.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
2016-04-09 21:49:02 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2016-04-09 21:49:02 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CCharacterInfo {
|
|
|
|
friend class CAnimData;
|
2017-11-24 00:01:06 -08:00
|
|
|
|
2016-04-10 14:22:59 -07:00
|
|
|
public:
|
2018-12-07 21:30:43 -08:00
|
|
|
struct CParticleResData {
|
|
|
|
std::vector<CAssetId> x0_part;
|
|
|
|
std::vector<CAssetId> x10_swhc;
|
|
|
|
std::vector<CAssetId> x20_elsc;
|
|
|
|
std::vector<CAssetId> x30_elsc;
|
|
|
|
CParticleResData(CInputStream& in, u16 tableCount);
|
2020-02-28 01:49:04 -08:00
|
|
|
CParticleResData(std::vector<CAssetId> part, std::vector<CAssetId> swhc, std::vector<CAssetId> elsc1,
|
|
|
|
std::vector<CAssetId> elsc2)
|
|
|
|
: x0_part(std::move(part)), x10_swhc(std::move(swhc)), x20_elsc(std::move(elsc1)), x30_elsc(std::move(elsc2)) {}
|
2018-12-07 21:30:43 -08:00
|
|
|
};
|
2017-11-24 00:01:06 -08:00
|
|
|
|
2016-04-10 14:22:59 -07:00
|
|
|
private:
|
2018-12-07 21:30:43 -08:00
|
|
|
u16 x0_tableCount;
|
|
|
|
std::string x4_name;
|
|
|
|
CAssetId x14_cmdl;
|
|
|
|
CAssetId x18_cskr;
|
|
|
|
CAssetId x1c_cinf;
|
|
|
|
std::vector<std::pair<s32, std::pair<std::string, std::string>>> x20_animInfo;
|
|
|
|
CPASDatabase x30_pasDatabase;
|
|
|
|
CParticleResData x44_partRes;
|
|
|
|
u32 x84_unk;
|
|
|
|
std::vector<std::pair<std::string, zeus::CAABox>> x88_aabbs;
|
|
|
|
std::vector<std::pair<std::string, std::vector<CEffectComponent>>> x98_effects;
|
|
|
|
|
2022-02-19 05:04:45 -08:00
|
|
|
CAssetId xa8_cmdlOverlay;
|
|
|
|
CAssetId xac_cskrOverlay;
|
2018-12-07 21:30:43 -08:00
|
|
|
|
|
|
|
std::vector<s32> xb0_animIdxs;
|
2016-04-09 21:49:02 -07:00
|
|
|
|
|
|
|
public:
|
2020-03-30 20:52:22 -07:00
|
|
|
explicit CCharacterInfo(CInputStream& in);
|
2016-04-12 23:07:23 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
std::string_view GetCharacterName() const { return x4_name; }
|
|
|
|
CAssetId GetModelId() const { return x14_cmdl; }
|
|
|
|
CAssetId GetSkinRulesId() const { return x18_cskr; }
|
|
|
|
CAssetId GetCharLayoutInfoId() const { return x1c_cinf; }
|
2016-04-14 20:02:21 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
const std::vector<std::pair<std::string, zeus::CAABox>>& GetAnimBBoxList() const { return x88_aabbs; }
|
|
|
|
const std::vector<std::pair<std::string, std::vector<CEffectComponent>>>& GetEffectList() const {
|
|
|
|
return x98_effects;
|
|
|
|
}
|
2016-09-03 19:27:35 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
CAssetId GetIceModelId() const { return xa8_cmdlOverlay; }
|
|
|
|
CAssetId GetIceSkinRulesId() const { return xac_cskrOverlay; }
|
2016-04-16 14:49:47 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
const CParticleResData& GetParticleResData() const { return x44_partRes; }
|
|
|
|
s32 GetAnimationIndex(s32 idx) const { return xb0_animIdxs.at(idx); }
|
|
|
|
const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; }
|
2018-09-16 16:22:35 -07:00
|
|
|
|
2020-02-28 01:56:41 -08:00
|
|
|
s32 GetAnimationIndex(std::string_view) const;
|
2016-04-09 21:49:02 -07:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|