metaforce/Runtime/CScannableObjectInfo.hpp

49 lines
1.4 KiB
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-08-03 16:20:31 -07:00
#include "Runtime/CToken.hpp"
#include "Runtime/Factory/IFactory.hpp"
#include "Runtime/RetroTypes.hpp"
#include "Runtime/rstl.hpp"
#include <zeus/CVector2i.hpp>
2016-08-03 16:20:31 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2018-12-07 21:30:43 -08:00
class CScannableObjectInfo {
2016-08-03 16:20:31 -07:00
public:
2018-12-07 21:30:43 -08:00
enum class EPanelType {};
2016-08-14 14:38:05 -07:00
static constexpr size_t NumBuckets = 4;
2018-12-07 21:30:43 -08:00
struct SBucket {
CAssetId x0_texture;
float x4_appearanceRange = 0.f;
u32 x8_imagePos = 0;
zeus::CVector2i xc_size;
float x14_interval = 0.f;
float x18_fadeDuration = 0.f;
SBucket(CInputStream&, u32 version);
};
2016-08-03 16:20:31 -07:00
private:
2018-12-07 21:30:43 -08:00
void Load(CInputStream&, u32);
CAssetId x0_scannableObjectId;
CAssetId x4_stringId;
float x8_totalDownloadTime = 0.f;
u32 xc_category = 0;
bool x10_important = false;
rstl::reserved_vector<SBucket, NumBuckets> x14_buckets;
2017-01-31 03:21:45 -08:00
2016-08-03 16:20:31 -07:00
public:
2018-12-07 21:30:43 -08:00
CScannableObjectInfo(CInputStream&, CAssetId);
CAssetId GetScannableObjectId() const { return x0_scannableObjectId; }
CAssetId GetStringTableId() const { return x4_stringId; }
float GetTotalDownloadTime() const { return x8_totalDownloadTime; }
const SBucket& GetBucket(size_t idx) const { return x14_buckets[idx]; }
2018-12-07 21:30:43 -08:00
u32 GetCategory() const { return xc_category; }
bool IsImportant() const { return x10_important; }
2016-08-03 16:20:31 -07:00
};
2017-01-31 03:21:45 -08:00
CFactoryFnReturn FScannableObjectInfoFactory(const SObjectTag&, CInputStream&, const CVParamTransfer&,
CObjectReference* selfRef);
2021-04-10 01:42:06 -07:00
} // namespace metaforce