2016-03-10 03:47:37 +00:00
|
|
|
#ifndef __URDE_CGUIANIMCONTROLLER_HPP__
|
|
|
|
#define __URDE_CGUIANIMCONTROLLER_HPP__
|
|
|
|
|
2016-03-14 00:58:19 +00:00
|
|
|
#include "CGuiWidget.hpp"
|
|
|
|
#include <array>
|
|
|
|
|
2016-03-10 03:47:37 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CGuiAnimSet
|
|
|
|
{
|
2016-03-15 23:23:45 +00:00
|
|
|
friend class CGuiAnimController;
|
|
|
|
std::unordered_map<int, CGuiAnimBase*> x0_map;
|
|
|
|
EGuiAnimBehListID x14_id;
|
|
|
|
bool x18_update = false;
|
|
|
|
bool x19_isDone = true;
|
|
|
|
bool x1a_ = false;
|
|
|
|
bool x1b_ = false;
|
|
|
|
bool x1c_ = false;
|
|
|
|
u32 x20_ = 0;
|
|
|
|
u32 x24_ = 0;
|
|
|
|
float x28_totalTime = 0.f;
|
|
|
|
float x2c_ = 1.f;
|
|
|
|
public:
|
|
|
|
CGuiAnimSet(EGuiAnimBehListID id) : x14_id(id) {}
|
|
|
|
void AddAnim(CGuiAnimBase* anim);
|
|
|
|
void RecalcTotalTime();
|
|
|
|
void Init(CGuiAnimController* controller, float fval);
|
|
|
|
void Update(CGuiAnimController* controller, bool flag);
|
2016-03-10 03:47:37 +00:00
|
|
|
};
|
|
|
|
|
2016-03-14 00:58:19 +00:00
|
|
|
class CGuiAnimController : public CGuiWidget
|
2016-03-10 03:47:37 +00:00
|
|
|
{
|
2016-03-15 23:23:45 +00:00
|
|
|
friend class CGuiAnimSet;
|
2016-03-14 00:58:19 +00:00
|
|
|
std::array<std::unique_ptr<CGuiAnimSet>, 13> xf8_sets;
|
|
|
|
float x164_ = 0.f;
|
|
|
|
CGuiWidget* x168_widget;
|
2016-03-15 23:23:45 +00:00
|
|
|
zeus::CColor x16c_ = zeus::CColor::skClear;
|
2016-03-14 00:58:19 +00:00
|
|
|
u32 x170_ = 0;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CGuiAnimController(const CGuiWidget::CGuiWidgetParms& parms, CGuiWidget* widget);
|
2016-03-15 23:23:45 +00:00
|
|
|
CGuiAnimSet* FindAnimSet(EGuiAnimBehListID id) const;
|
|
|
|
void AddAnimation(CGuiAnimBase* anim, EGuiAnimBehListID id);
|
|
|
|
void ResetListUpdateState();
|
|
|
|
void SetListUpdateState(EGuiAnimBehListID id, bool state);
|
|
|
|
float GetAnimSetLength(EGuiAnimBehListID id) const;
|
|
|
|
void IsAnimsDone(EGuiAnimBehListID id, bool& isDone) const;
|
|
|
|
void InitTransform(CGuiWidget* widget, EGuiAnimBehListID id, float fval, bool flag,
|
|
|
|
EGuiAnimInitMode initMode);
|
|
|
|
void FinishAnim();
|
|
|
|
void Step(bool flag);
|
2016-03-10 03:47:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGUIANIMCONTROLLER_HPP__
|