/// 2010.12.02 - prodongi #ifndef _SUIAniJobLevelUpWnd_h_ #define _SUIAniJobLevelUpWnd_h_ //#include "SUIWnd.h" class SUISkillWnd; struct sAniJobLevelUpWnd { sAniJobLevelUpWnd() : m_wndJLv(NULL), m_wndJP(NULL) {} void init(SUISkillWnd const* skillWnd, char const* jlvName, char const* jpName); KUIWnd* getChildWnd(SUISkillWnd const* skillWnd, char const* wndName, KPoint& pos); void setInitPos(KRect const& parentRect); void setWndPos(KRect const& parentRect, KPoint const& offsetJLv, KPoint const& offsetJP); void setCaption(int level, int changeJob); KUIWnd* m_wndJLv; KUIWnd* m_wndJP; /// 스킬창을 기준으로 한 상대 좌표이다 KPoint m_posJLv; KPoint m_posJP; }; struct sAniJobLevelUpData { void init(float aniTime, sAniJobLevelUpWnd const& wndFrom, sAniJobLevelUpWnd const& wndTo); void begin(); void slerp(KPoint& pos, float t, KPoint const& rFrom, KPoint const& rTo); float calcLength(KPoint const& pos1, KPoint const& pos2); bool procedure(float elapsedtime, SUISkillWnd const* skillWnd, sAniJobLevelUpWnd& wndFrom, sAniJobLevelUpWnd const& wndTo); /// 총 이동 하는 거리 float m_lenJLv; float m_lenJP; /// 이동 할 때의 남은 거리 float m_lenLastJLv; float m_lenLastJP; /// 이동 초기 속도 float m_v0JLv; float m_v0JP; float m_accel; float m_processT; /// 경과된 총 시간 }; struct sAniJobLevelUp { enum { READY, BEGIN, END }; /* top next cur prev bottom */ void init(SUISkillWnd const* skillWnd); bool procedure(SUISkillWnd const* skillWnd, DWORD elapsedtime); void setState(int state, KRect const& parentRect); void setInitPos(KRect const& parentRect); void setTopWndCaption(int level, int changeJob); bool isState(int state) const { return m_state == state; } int m_state; float m_aniTime; sAniJobLevelUpWnd m_wndTop; sAniJobLevelUpWnd m_wndNext; sAniJobLevelUpWnd m_wndCur; sAniJobLevelUpWnd m_wndPrev; sAniJobLevelUpWnd m_wndBottom; sAniJobLevelUpData m_topToNext; sAniJobLevelUpData m_nextToCur; sAniJobLevelUpData m_curToPrev; sAniJobLevelUpData m_prevToBottom; }; #endif