Character factory support classes

This commit is contained in:
Jack Andersen 2016-04-12 20:07:23 -10:00
parent 1d2c2bf31f
commit 5de5c3d85f
186 changed files with 898 additions and 553 deletions

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CAUDIOSTATEWIN_HPP__
#define __PSHAG_CAUDIOSTATEWIN_HPP__
#ifndef __URDE_CAUDIOSTATEWIN_HPP__
#define __URDE_CAUDIOSTATEWIN_HPP__
#include "../CIOWin.hpp"
@ -18,4 +18,4 @@ public:
}
#endif // __PSHAG_CAUDIOSTATEWIN_HPP__
#endif // __URDE_CAUDIOSTATEWIN_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CAUDIOSYS_HPP__
#define __PSHAG_CAUDIOSYS_HPP__
#ifndef __URDE_CAUDIOSYS_HPP__
#define __URDE_CAUDIOSYS_HPP__
#include "../GCNTypes.hpp"
#include "zeus/CVector3f.hpp"
@ -29,4 +29,4 @@ public:
}
#endif // __PSHAG_CAUDIOSYS_HPP__
#endif // __URDE_CAUDIOSYS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSFXHANDLE_HPP__
#define __PSHAG_CSFXHANDLE_HPP__
#ifndef __URDE_CSFXHANDLE_HPP__
#define __URDE_CSFXHANDLE_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CSfxHandle
}
#endif // __PSHAG_CSFXHANDLE_HPP__
#endif // __URDE_CSFXHANDLE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSFXMANAGER_HPP__
#define __PSHAG_CSFXMANAGER_HPP__
#ifndef __URDE_CSFXMANAGER_HPP__
#define __URDE_CSFXMANAGER_HPP__
#include <vector>
#include "../RetroTypes.hpp"
@ -130,4 +130,4 @@ class CSfxManager
}
#endif // __PSHAG_CSFXMANAGER_HPP__
#endif // __URDE_CSFXMANAGER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CACTOR_HPP__
#define __PSHAG_CACTOR_HPP__
#ifndef __URDE_CACTOR_HPP__
#define __URDE_CACTOR_HPP__
#include "CEntity.hpp"
#include "zeus/zeus.hpp"
@ -80,4 +80,4 @@ public:
}
#endif // __PSHAG_CACTOR_HPP__
#endif // __URDE_CACTOR_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CAI_HPP__
#define __PSHAG_CAI_HPP__
#ifndef __URDE_CAI_HPP__
#define __URDE_CAI_HPP__
#include "GCNTypes.hpp"
#include "ScriptObjectSupport.hpp"
@ -175,4 +175,4 @@ public:
}
#endif // __PSHAG_CAI_HPP__
#endif // __URDE_CAI_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CARCHITECTUREMESSAGE_HPP__
#define __PSHAG_CARCHITECTUREMESSAGE_HPP__
#ifndef __URDE_CARCHITECTUREMESSAGE_HPP__
#define __URDE_CARCHITECTUREMESSAGE_HPP__
#include "GCNTypes.hpp"
#include "Input/CFinalInput.hpp"
@ -164,4 +164,4 @@ public:
}
#endif // __PSHAG_CARCHITECTUREMESSAGE_HPP__
#endif // __URDE_CARCHITECTUREMESSAGE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CARCHITECTUREQUEUE_HPP__
#define __PSHAG_CARCHITECTUREQUEUE_HPP__
#ifndef __URDE_CARCHITECTUREQUEUE_HPP__
#define __URDE_CARCHITECTUREQUEUE_HPP__
#include <list>
#include "CArchitectureMessage.hpp"
@ -27,4 +27,4 @@ public:
}
#endif // __PSHAG_CARCHITECTUREQUEUE_HPP__
#endif // __URDE_CARCHITECTUREQUEUE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CAREAOCTTREE_HPP__
#define __PSHAG_CAREAOCTTREE_HPP__
#ifndef __URDE_CAREAOCTTREE_HPP__
#define __URDE_CAREAOCTTREE_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAreaOctTree
}
#endif // __PSHAG_CAREAOCTTREE_HPP__
#endif // __URDE_CAREAOCTTREE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CBASICS_HPP__
#define __PSHAG_CBASICS_HPP__
#ifndef __URDE_CBASICS_HPP__
#define __URDE_CBASICS_HPP__
#include <stdint.h>
#include <stdlib.h>
@ -18,4 +18,4 @@ public:
}
#endif // __PSHAG_CBASICS_HPP__
#endif // __URDE_CBASICS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CCALLSTACK_HPP__
#define __PSHAG_CCALLSTACK_HPP__
#ifndef __URDE_CCALLSTACK_HPP__
#define __URDE_CCALLSTACK_HPP__
namespace urde
{
@ -17,4 +17,4 @@ public:
}
#endif // __PSHAG_CCALLSTACK_HPP__
#endif // __URDE_CCALLSTACK_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CDVDFILE_HPP__
#define __PSHAG_CDVDFILE_HPP__
#ifndef __URDE_CDVDFILE_HPP__
#define __URDE_CDVDFILE_HPP__
#include "RetroTypes.hpp"
@ -77,4 +77,4 @@ public:
};
}
#endif // __PSHAG_CDVDFILE_HPP__
#endif // __URDE_CDVDFILE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CDVDREQUEST_HPP__
#define __PSHAG_CDVDREQUEST_HPP__
#ifndef __URDE_CDVDREQUEST_HPP__
#define __URDE_CDVDREQUEST_HPP__
namespace urde
{
@ -25,4 +25,4 @@ public:
}
#endif // __PSHAG_CDVDREQUEST_HPP__
#endif // __URDE_CDVDREQUEST_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CENTITY_HPP__
#define __PSHAG_CENTITY_HPP__
#ifndef __URDE_CENTITY_HPP__
#define __URDE_CENTITY_HPP__
#include "RetroTypes.hpp"
#include "ScriptObjectSupport.hpp"
@ -45,4 +45,4 @@ public:
}
#endif // __PSHAG_CENTITY_HPP__
#endif // __URDE_CENTITY_HPP__

View File

@ -1,9 +1,10 @@
#ifndef __PSHAG_CFACTORYMGR_HPP__
#define __PSHAG_CFACTORYMGR_HPP__
#ifndef __URDE_CFACTORYMGR_HPP__
#define __URDE_CFACTORYMGR_HPP__
#include <unordered_map>
#include "RetroTypes.hpp"
#include "IOStreams.hpp"
#include "IFactory.hpp"
namespace urde
{
@ -11,13 +12,6 @@ struct SObjectTag;
class CVParamTransfer;
class IObj;
using CFactoryFnReturn = std::unique_ptr<IObj>;
using FFactoryFunc = std::function<CFactoryFnReturn(const urde::SObjectTag& tag,
urde::CInputStream& in,
const urde::CVParamTransfer& vparms)>;
using FMemFactoryFunc = std::function<CFactoryFnReturn(const urde::SObjectTag& tag,
std::unique_ptr<u8[]>&& in, u32 len,
const urde::CVParamTransfer& vparms)>;
class CFactoryMgr
{
std::unordered_map<FourCC, FFactoryFunc> m_factories;
@ -26,7 +20,9 @@ public:
CFactoryFnReturn MakeObject(const SObjectTag& tag, urde::CInputStream& in,
const CVParamTransfer& paramXfer);
bool CanMakeMemory(const urde::SObjectTag& tag) const;
CFactoryFnReturn MakeObjectFromMemory(const SObjectTag& tag, std::unique_ptr<u8[]>&& buf, int size, bool compressed,
CFactoryFnReturn MakeObjectFromMemory(const SObjectTag& tag,
std::unique_ptr<u8[]>&& buf,
int size, bool compressed,
const CVParamTransfer& paramXfer);
void AddFactory(FourCC key, FFactoryFunc func) {m_factories[key] = func;}
void AddFactory(FourCC key, FMemFactoryFunc func) {m_memFactories[key] = func;}
@ -34,4 +30,4 @@ public:
}
#endif // __PSHAG_CFACTORYMGR_HPP__
#endif // __URDE_CFACTORYMGR_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CGAMEALLOCATOR_HPP__
#define __PSHAG_CGAMEALLOCATOR_HPP__
#ifndef __URDE_CGAMEALLOCATOR_HPP__
#define __URDE_CGAMEALLOCATOR_HPP__
#include "IAllocator.hpp"
@ -48,4 +48,4 @@ public:
}
#endif // __PSHAG_CGAMEALLOCATOR_HPP__
#endif // __URDE_CGAMEALLOCATOR_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CGAMEDEBUG_HPP__
#define __PSHAG_CGAMEDEBUG_HPP__
#ifndef __URDE_CGAMEDEBUG_HPP__
#define __URDE_CGAMEDEBUG_HPP__
#include <string>
@ -53,4 +53,4 @@ public:
}
#endif // __PSHAG_CGAMEDEBUG_HPP__
#endif // __URDE_CGAMEDEBUG_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CGAMEOPTIONS_HPP__
#define __PSHAG_CGAMEOPTIONS_HPP__
#ifndef __URDE_CGAMEOPTIONS_HPP__
#define __URDE_CGAMEOPTIONS_HPP__
#include "RetroTypes.hpp"
@ -19,4 +19,4 @@ class CGameOptions
}
#endif // __PSHAG_CGAMEOPTIONS_HPP__
#endif // __URDE_CGAMEOPTIONS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CGAMESTATE_HPP__
#define __PSHAG_CGAMESTATE_HPP__
#ifndef __URDE_CGAMESTATE_HPP__
#define __URDE_CGAMESTATE_HPP__
#include <memory>
#include "CBasics.hpp"
@ -28,4 +28,4 @@ public:
}
#endif // __PSHAG_CGAMESTATE_HPP__
#endif // __URDE_CGAMESTATE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CIOWIN_HPP__
#define __PSHAG_CIOWIN_HPP__
#ifndef __URDE_CIOWIN_HPP__
#define __URDE_CIOWIN_HPP__
#include <string>
#include <memory>
@ -38,4 +38,4 @@ static bool operator==(std::shared_ptr<CIOWin> a, std::shared_ptr<CIOWin> b)
}
#endif // __PSHAG_CIOWIN_HPP__
#endif // __URDE_CIOWIN_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CIOWINMANAGER_HPP__
#define __PSHAG_CIOWINMANAGER_HPP__
#ifndef __URDE_CIOWINMANAGER_HPP__
#define __URDE_CIOWINMANAGER_HPP__
#include <memory>
#include <list>
@ -41,4 +41,4 @@ public:
}
#endif // __PSHAG_CIOWINMANAGER_HPP__
#endif // __URDE_CIOWINMANAGER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CINGAMETWEAKMANAGERBASE_HPP__
#define __PSHAG_CINGAMETWEAKMANAGERBASE_HPP__
#ifndef __URDE_CINGAMETWEAKMANAGERBASE_HPP__
#define __URDE_CINGAMETWEAKMANAGERBASE_HPP__
#include <string>
@ -17,4 +17,4 @@ public:
}
#endif // __PSHAG_CINGAMETWEAKMANAGERBASE_HPP__
#endif // __URDE_CINGAMETWEAKMANAGERBASE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMFGAMEBASE_HPP__
#define __PSHAG_CMFGAMEBASE_HPP__
#ifndef __URDE_CMFGAMEBASE_HPP__
#define __URDE_CMFGAMEBASE_HPP__
#include "CIOWin.hpp"
@ -20,4 +20,4 @@ public:
}
#endif // __PSHAG_CMFGAMEBASE_HPP__
#endif // __URDE_CMFGAMEBASE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMAINFLOWBASE_HPP__
#define __PSHAG_CMAINFLOWBASE_HPP__
#ifndef __URDE_CMAINFLOWBASE_HPP__
#define __URDE_CMAINFLOWBASE_HPP__
#include "CIOWin.hpp"
@ -27,4 +27,4 @@ public:
}
#endif // __PSHAG_CMAINFLOWBASE_HPP__
#endif // __URDE_CMAINFLOWBASE_HPP__

View File

@ -46,6 +46,7 @@ add_library(RuntimeCommon
CCRC32.hpp CCRC32.cpp
CEntity.hpp CEntity.cpp
IFactory.hpp
IObjFactory.hpp
ScriptObjectSupport.hpp ScriptObjectSupport.cpp
CObjectList.hpp
CArchitectureMessage.hpp

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMAPWORLDINFO_HPP__
#define __PSHAG_CMAPWORLDINFO_HPP__
#ifndef __URDE_CMAPWORLDINFO_HPP__
#define __URDE_CMAPWORLDINFO_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CMapWorldInfo
}
#endif // __PSHAG_CMAPWORLDINFO_HPP__
#endif // __URDE_CMAPWORLDINFO_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMEMORY_HPP__
#define __PSHAG_CMEMORY_HPP__
#ifndef __URDE_CMEMORY_HPP__
#define __URDE_CMEMORY_HPP__
#include "IAllocator.hpp"
@ -33,4 +33,4 @@ public:
void* operator new(std::size_t sz, const char* funcName, const char* typeName);
void* operator new[](std::size_t sz, const char* funcName, const char* typeName);
#endif // __PSHAG_CMEMORY_HPP__
#endif // __URDE_CMEMORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMEMORYCARDSYS_HPP__
#define __PSHAG_CMEMORYCARDSYS_HPP__
#ifndef __URDE_CMEMORYCARDSYS_HPP__
#define __URDE_CMEMORYCARDSYS_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CMemoryCardSys
}
#endif // __PSHAG_CMEMORYCARDSYS_HPP__
#endif // __URDE_CMEMORYCARDSYS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_COBJECTLIST_HPP__
#define __PSHAG_COBJECTLIST_HPP__
#ifndef __URDE_COBJECTLIST_HPP__
#define __URDE_COBJECTLIST_HPP__
#include "CEntity.hpp"
#include "RetroTypes.hpp"
@ -95,4 +95,4 @@ public:
}
#endif // __PSHAG_COBJECTLIST_HPP__
#endif // __URDE_COBJECTLIST_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPAKFILE_HPP__
#define __PSHAG_CPAKFILE_HPP__
#ifndef __URDE_CPAKFILE_HPP__
#define __URDE_CPAKFILE_HPP__
#include <vector>
#include "RetroTypes.hpp"
@ -74,4 +74,4 @@ public:
}
#endif // __PSHAG_CPAKFILE_HPP__
#endif // __URDE_CPAKFILE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPHYSICSACTOR_HPP__
#define __PSHAG_CPHYSICSACTOR_HPP__
#ifndef __URDE_CPHYSICSACTOR_HPP__
#define __URDE_CPHYSICSACTOR_HPP__
#include "CActor.hpp"
@ -120,4 +120,4 @@ public:
}
#endif // __PSHAG_CPHYSICSACTOR_HPP__
#endif // __URDE_CPHYSICSACTOR_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPLAYMOVIEBASE_HPP__
#define __PSHAG_CPLAYMOVIEBASE_HPP__
#ifndef __URDE_CPLAYMOVIEBASE_HPP__
#define __URDE_CPLAYMOVIEBASE_HPP__
#include "CIOWin.hpp"
#include "Graphics/CMoviePlayer.hpp"
@ -19,4 +19,4 @@ public:
}
#endif // __PSHAG_CPLAYMOVIEBASE_HPP__
#endif // __URDE_CPLAYMOVIEBASE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPLAYERSTATE_HPP__
#define __PSHAG_CPLAYERSTATE_HPP__
#ifndef __URDE_CPLAYERSTATE_HPP__
#define __URDE_CPLAYERSTATE_HPP__
#include "RetroTypes.hpp"
#include "CBasics.hpp"
@ -163,4 +163,4 @@ public:
};
}
#endif // __PSHAG_CPLAYERSTATE_HPP__
#endif // __URDE_CPLAYERSTATE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CRESFACTORY_HPP__
#define __PSHAG_CRESFACTORY_HPP__
#ifndef __URDE_CRESFACTORY_HPP__
#define __URDE_CRESFACTORY_HPP__
#include <unordered_map>
#include "IFactory.hpp"
@ -55,4 +55,4 @@ public:
}
#endif // __PSHAG_CRESFACTORY_HPP__
#endif // __URDE_CRESFACTORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CRESLOADER_HPP__
#define __PSHAG_CRESLOADER_HPP__
#ifndef __URDE_CRESLOADER_HPP__
#define __URDE_CRESLOADER_HPP__
#include <memory>
#include <string>
@ -48,4 +48,4 @@ public:
}
#endif // __PSHAG_CRESLOADER_HPP__
#endif // __URDE_CRESLOADER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSCRIPTMAILBOX_HPP__
#define __PSHAG_CSCRIPTMAILBOX_HPP__
#ifndef __URDE_CSCRIPTMAILBOX_HPP__
#define __URDE_CSCRIPTMAILBOX_HPP__
#include "IOStreams.hpp"
#include "ScriptObjectSupport.hpp"
@ -35,4 +35,4 @@ public:
}
#endif // __PSHAG_CSCRIPTMAILBOX_HPP__
#endif // __URDE_CSCRIPTMAILBOX_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSIMPLEPOOL_HPP__
#define __PSHAG_CSIMPLEPOOL_HPP__
#ifndef __URDE_CSIMPLEPOOL_HPP__
#define __URDE_CSIMPLEPOOL_HPP__
#include "IObjectStore.hpp"
#include "RetroTypes.hpp"
@ -33,4 +33,4 @@ public:
}
#endif // __PSHAG_CSIMPLEPOOL_HPP__
#endif // __URDE_CSIMPLEPOOL_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSTATEMANAGER_HPP__
#define __PSHAG_CSTATEMANAGER_HPP__
#ifndef __URDE_CSTATEMANAGER_HPP__
#define __URDE_CSTATEMANAGER_HPP__
#include <memory>
#include "CBasics.hpp"

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSTATICINTERFERENCE_HPP__
#define __PSHAG_CSTATICINTERFERENCE_HPP__
#ifndef __URDE_CSTATICINTERFERENCE_HPP__
#define __URDE_CSTATICINTERFERENCE_HPP__
#include <vector>
#include "RetroTypes.hpp"
@ -83,4 +83,4 @@ public:
}
#endif // __PSHAG_CSTATICINTERFERENCE_HPP__
#endif // __URDE_CSTATICINTERFERENCE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CSTRINGEXTRAS_HPP__
#define __PSHAG_CSTRINGEXTRAS_HPP__
#ifndef __URDE_CSTRINGEXTRAS_HPP__
#define __URDE_CSTRINGEXTRAS_HPP__
#include <string>
#include <string.h>
@ -26,4 +26,4 @@ public:
}
#endif // __PSHAG_CSTRINGEXTRAS_HPP__
#endif // __URDE_CSTRINGEXTRAS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG__CTIMEPROVIDER_HPP__
#define __PSHAG__CTIMEPROVIDER_HPP__
#ifndef __URDE__CTIMEPROVIDER_HPP__
#define __URDE__CTIMEPROVIDER_HPP__
namespace urde
{
class CTimeProvider;

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CTOKEN_HPP__
#define __PSHAG_CTOKEN_HPP__
#ifndef __URDE_CTOKEN_HPP__
#define __URDE_CTOKEN_HPP__
#include <memory>
#include "IObj.hpp"
@ -314,4 +314,4 @@ public:
}
#endif // __PSHAG_CTOKEN_HPP__
#endif // __URDE_CTOKEN_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CWORLDTRANSMANAGER_HPP__
#define __PSHAG_CWORLDTRANSMANAGER_HPP__
#ifndef __URDE_CWORLDTRANSMANAGER_HPP__
#define __URDE_CWORLDTRANSMANAGER_HPP__
namespace urde
{
@ -21,4 +21,4 @@ public:
}
#endif // __PSHAG_CWORLDTRANSMANAGER_HPP__
#endif // __URDE_CWORLDTRANSMANAGER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CALLFORMATANIMSOURCE_HPP__
#define __PSHAG_CALLFORMATANIMSOURCE_HPP__
#ifndef __URDE_CALLFORMATANIMSOURCE_HPP__
#define __URDE_CALLFORMATANIMSOURCE_HPP__
#include "RetroTypes.hpp"
#include "zeus/CVector3f.hpp"
@ -48,4 +48,4 @@ CFactoryFnReturn AnimSourceFactory(const SObjectTag& tag, CInputStream& in, cons
}
#endif // __PSHAG_CALLFORMATANIMSOURCE_HPP__
#endif // __URDE_CALLFORMATANIMSOURCE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMCHARACTERSET_HPP__
#define __PSHAG_CANIMCHARACTERSET_HPP__
#ifndef __URDE_CANIMCHARACTERSET_HPP__
#define __URDE_CANIMCHARACTERSET_HPP__
#include "CFactoryMgr.hpp"
#include "CCharacterSet.hpp"
@ -15,10 +15,12 @@ class CAnimCharacterSet
CAnimationSet x1c_animationSet;
public:
CAnimCharacterSet(CInputStream& in);
const CCharacterSet& GetCharacterSet() const {return x4_characterSet;}
const CAnimationSet& GetAnimationSet() const {return x1c_animationSet;}
};
CFactoryFnReturn FAnimCharacterSet(const SObjectTag&, CInputStream&, const CVParamTransfer&);
}
#endif // __PSHAG_CANIMCHARACTERSET_HPP__
#endif // __URDE_CANIMCHARACTERSET_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMDATA_HPP__
#define __PSHAG_CANIMDATA_HPP__
#ifndef __URDE_CANIMDATA_HPP__
#define __URDE_CANIMDATA_HPP__
#include "RetroTypes.hpp"
#include "CToken.hpp"
@ -110,4 +110,4 @@ public:
}
#endif // __PSHAG_CANIMDATA_HPP__
#endif // __URDE_CANIMDATA_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMPOIDATA_HPP__
#define __PSHAG_CANIMPOIDATA_HPP__
#ifndef __URDE_CANIMPOIDATA_HPP__
#define __URDE_CANIMPOIDATA_HPP__
#include "CFactoryMgr.hpp"
#include "CBoolPOINode.hpp"
@ -31,4 +31,4 @@ CFactoryFnReturn AnimPOIDataFactory(const SObjectTag& tag, CInputStream& in,
}
#endif // __PSHAG_CANIMPOIDATA_HPP__
#endif // __URDE_CANIMPOIDATA_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMSOURCE_HPP__
#define __PSHAG_CANIMSOURCE_HPP__
#ifndef __URDE_CANIMSOURCE_HPP__
#define __URDE_CANIMSOURCE_HPP__
#include "RetroTypes.hpp"
#include "CCharAnimTime.hpp"
@ -83,4 +83,4 @@ public:
}
#endif // __PSHAG_CANIMSOURCE_HPP__
#endif // __URDE_CANIMSOURCE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMSOURCEREADER_HPP__
#define __PSHAG_CANIMSOURCEREADER_HPP__
#ifndef __URDE_CANIMSOURCEREADER_HPP__
#define __URDE_CANIMSOURCEREADER_HPP__
#include "IAnimReader.hpp"
#include "CToken.hpp"
@ -101,4 +101,4 @@ public:
}
#endif // __PSHAG_CANIMSOURCEREADER_HPP__
#endif // __URDE_CANIMSOURCEREADER_HPP__

View File

@ -0,0 +1,27 @@
#ifndef __URDE_CANIMSYSCONTEXT_HPP__
#define __URDE_CANIMSYSCONTEXT_HPP__
#include "CToken.hpp"
#include "CRandom16.hpp"
namespace urde
{
class CTransitionDatabaseGame;
class CSimplePool;
struct CAnimSysContext
{
TToken<CTransitionDatabaseGame> x0_transDB;
std::shared_ptr<CRandom16> x8_random;
CSimplePool& xc_store;
CAnimSysContext(const TToken<CTransitionDatabaseGame>& transDB,
u32 randomSeed, CSimplePool& store)
: x0_transDB(transDB),
x8_random(std::make_shared<CRandom16>(randomSeed)),
xc_store(store) {}
};
}
#endif // __URDE_CANIMSYSCONTEXT_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__
#define __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__
#ifndef __URDE_CANIMTREEANIMREADERCONTAINER_HPP__
#define __URDE_CANIMTREEANIMREADERCONTAINER_HPP__
#include "CAnimTreeNode.hpp"
@ -15,4 +15,4 @@ public:
}
#endif // __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__
#endif // __URDE_CANIMTREEANIMREADERCONTAINER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREEBLEND_HPP__
#define __PSHAG_CANIMTREEBLEND_HPP__
#ifndef __URDE_CANIMTREEBLEND_HPP__
#define __URDE_CANIMTREEBLEND_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAnimTreeBlend
}
#endif // __PSHAG_CANIMTREEBLEND_HPP__
#endif // __URDE_CANIMTREEBLEND_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREEDOUBLECHILD_HPP__
#define __PSHAG_CANIMTREEDOUBLECHILD_HPP__
#ifndef __URDE_CANIMTREEDOUBLECHILD_HPP__
#define __URDE_CANIMTREEDOUBLECHILD_HPP__
#include "CAnimTreeNode.hpp"
@ -27,4 +27,4 @@ public:
}
#endif // __PSHAG_CANIMTREEDOUBLECHILD_HPP__
#endif // __URDE_CANIMTREEDOUBLECHILD_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREELOOPIN_HPP__
#define __PSHAG_CANIMTREELOOPIN_HPP__
#ifndef __URDE_CANIMTREELOOPIN_HPP__
#define __URDE_CANIMTREELOOPIN_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAnimTreeLoopIn
}
#endif // __PSHAG_CANIMTREELOOPIN_HPP__
#endif // __URDE_CANIMTREELOOPIN_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREENODE_HPP__
#define __PSHAG_CANIMTREENODE_HPP__
#ifndef __URDE_CANIMTREENODE_HPP__
#define __URDE_CANIMTREENODE_HPP__
#include "IAnimReader.hpp"
@ -25,4 +25,4 @@ public:
}
#endif // __PSHAG_CANIMTREENODE_HPP__
#endif // __URDE_CANIMTREENODE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREESCALE_HPP__
#define __PSHAG_CANIMTREESCALE_HPP__
#ifndef __URDE_CANIMTREESCALE_HPP__
#define __URDE_CANIMTREESCALE_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAnimTreeScale
}
#endif // __PSHAG_CANIMTREESCALE_HPP__
#endif // __URDE_CANIMTREESCALE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREESEQUENCE_HPP__
#define __PSHAG_CANIMTREESEQUENCE_HPP__
#ifndef __URDE_CANIMTREESEQUENCE_HPP__
#define __URDE_CANIMTREESEQUENCE_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAnimTreeSequence
}
#endif // __PSHAG_CANIMTREESEQUENCE_HPP__
#endif // __URDE_CANIMTREESEQUENCE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREESINGLECHILD_HPP__
#define __PSHAG_CANIMTREESINGLECHILD_HPP__
#ifndef __URDE_CANIMTREESINGLECHILD_HPP__
#define __URDE_CANIMTREESINGLECHILD_HPP__
#include "CAnimTreeNode.hpp"
@ -34,4 +34,4 @@ public:
}
#endif // __PSHAG_CANIMTREESINGLECHILD_HPP__
#endif // __URDE_CANIMTREESINGLECHILD_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREETIMESCALE_HPP__
#define __PSHAG_CANIMTREETIMESCALE_HPP__
#ifndef __URDE_CANIMTREETIMESCALE_HPP__
#define __URDE_CANIMTREETIMESCALE_HPP__
namespace urde
{
@ -10,4 +10,4 @@ class CAnimTreeTimeScale
}
#endif // __PSHAG_CANIMTREETIMESCALE_HPP__
#endif // __URDE_CANIMTREETIMESCALE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREETRANSITION_HPP__
#define __PSHAG_CANIMTREETRANSITION_HPP__
#ifndef __URDE_CANIMTREETRANSITION_HPP__
#define __URDE_CANIMTREETRANSITION_HPP__
#include "RetroTypes.hpp"
#include "CAnimTreeTweenBase.hpp"
@ -15,4 +15,4 @@ public:
}
#endif // __PSHAG_CANIMTREETRANSITION_HPP__
#endif // __URDE_CANIMTREETRANSITION_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMTREETWEENBASE_HPP__
#define __PSHAG_CANIMTREETWEENBASE_HPP__
#ifndef __URDE_CANIMTREETWEENBASE_HPP__
#define __URDE_CANIMTREETWEENBASE_HPP__
#include "CAnimTreeDoubleChild.hpp"
@ -12,4 +12,4 @@ class CAnimTreeTweenBase : public CAnimTreeDoubleChild
}
#endif // __PSHAG_CANIMTREETWEENBASE_HPP__
#endif // __URDE_CANIMTREETWEENBASE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMATION_HPP__
#define __PSHAG_CANIMATION_HPP__
#ifndef __URDE_CANIMATION_HPP__
#define __URDE_CANIMATION_HPP__
#include "IOStreams.hpp"
#include "CMetaAnimFactory.hpp"
@ -14,8 +14,9 @@ class CAnimation
std::shared_ptr<IMetaAnim> x10_anim;
public:
CAnimation(CInputStream& in);
const std::shared_ptr<IMetaAnim>& GetMetaAnim() const {return x10_anim;}
};
}
#endif // __PSHAG_CANIMATION_HPP__
#endif // __URDE_CANIMATION_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMATIONDATABASE_HPP__
#define __PSHAG_CANIMATIONDATABASE_HPP__
#ifndef __URDE_CANIMATIONDATABASE_HPP__
#define __URDE_CANIMATIONDATABASE_HPP__
#include "../RetroTypes.hpp"
#include <vector>
@ -14,7 +14,7 @@ class CPrimitive;
class CAnimationDatabase
{
public:
virtual const IMetaAnim* GetMetaAnim(u32) const=0;
virtual const std::shared_ptr<IMetaAnim>& GetMetaAnim(u32) const=0;
virtual u32 GetNumMetaAnims() const=0;
virtual const char* GetMetaAnimName(u32) const=0;
virtual void GetAllUniquePrimitives(std::vector<CPrimitive>&) const=0;
@ -23,4 +23,4 @@ public:
}
#endif // __PSHAG_CANIMATIONDATABASE_HPP__
#endif // __URDE_CANIMATIONDATABASE_HPP__

View File

@ -0,0 +1,45 @@
#include "CAnimationDatabaseGame.hpp"
#include "IMetaAnim.hpp"
#include "CPrimitive.hpp"
#include "CAnimation.hpp"
namespace urde
{
CAnimationDatabaseGame::CAnimationDatabaseGame(const std::vector<CAnimation>& anims)
{
x10_anims.reserve(anims.size());
for (const CAnimation& anim : anims)
x10_anims.emplace_back(anim.GetMetaAnim());
}
const std::shared_ptr<IMetaAnim>& CAnimationDatabaseGame::GetMetaAnim(u32 idx) const
{
return x10_anims[idx];
}
u32 CAnimationDatabaseGame::GetNumMetaAnims() const
{
return x10_anims.size();
}
const char* CAnimationDatabaseGame::GetMetaAnimName(u32 idx) const
{
return "Meta-animation name unavailable in Release mode.";
}
void CAnimationDatabaseGame::GetAllUniquePrimitives(std::vector<CPrimitive>& primsOut) const
{
std::set<CPrimitive> primitives;
for (const std::shared_ptr<IMetaAnim>& anim : x10_anims)
anim->GetUniquePrimitives(primitives);
primsOut.reserve(primitives.size());
for (const CPrimitive& prim : primitives)
primsOut.push_back(prim);
}
void CAnimationDatabaseGame::GetUniquePrimitivesFromMetaAnim(std::set<CPrimitive>& primsOut,
const std::string& name) const
{}
}

View File

@ -1,21 +1,24 @@
#ifndef __PSHAG_CANIMATIONDATABASEGAME_HPP__
#define __PSHAG_CANIMATIONDATABASEGAME_HPP__
#ifndef __URDE_CANIMATIONDATABASEGAME_HPP__
#define __URDE_CANIMATIONDATABASEGAME_HPP__
#include "CAnimationDatabase.hpp"
namespace urde
{
class CAnimation;
class CAnimationDatabaseGame : public CAnimationDatabase
{
std::vector<std::shared_ptr<IMetaAnim>> x10_anims;
public:
const IMetaAnim* GetMetaAnim(u32) const;
CAnimationDatabaseGame(const std::vector<CAnimation>& anims);
const std::shared_ptr<IMetaAnim>& GetMetaAnim(u32 idx) const;
u32 GetNumMetaAnims() const;
const char* GetMetaAnimName(u32) const;
void GetAllUniquePrimitives(std::vector<CPrimitive>&) const;
void GetUniquePrimitivesFromMetaAnim(std::set<CPrimitive>&, const std::string&) const;
const char* GetMetaAnimName(u32 idx) const;
void GetAllUniquePrimitives(std::vector<CPrimitive>& primsOut) const;
void GetUniquePrimitivesFromMetaAnim(std::set<CPrimitive>& primsOut, const std::string& name) const;
};
}
#endif // __PSHAG_CANIMATIONDATABASEGAME_HPP__
#endif // __URDE_CANIMATIONDATABASEGAME_HPP__

View File

@ -1,13 +1,27 @@
#ifndef __PSHAG_CANIMATIONMANAGER_HPP__
#define __PSHAG_CANIMATIONMANAGER_HPP__
#ifndef __URDE_CANIMATIONMANAGER_HPP__
#define __URDE_CANIMATIONMANAGER_HPP__
#include "CToken.hpp"
#include "CAnimSysContext.hpp"
namespace urde
{
class CAnimationDatabaseGame;
class CTransitionDatabaseGame;
class CSimplePool;
class CAnimationManager
{
TToken<CAnimationDatabaseGame> x0_animDB;
CAnimSysContext x8_sysCtx;
public:
CAnimationManager(const TToken<CAnimationDatabaseGame>& animDB,
const CAnimSysContext& sysCtx)
: x0_animDB(animDB), x8_sysCtx(sysCtx) {}
const CAnimationDatabaseGame* GetAnimationDatabase() const {return x0_animDB.GetObj();}
};
}
#endif // __PSHAG_CANIMATIONMANAGER_HPP__
#endif // __URDE_CANIMATIONMANAGER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CANIMATIONSET_HPP__
#define __PSHAG_CANIMATIONSET_HPP__
#ifndef __URDE_CANIMATIONSET_HPP__
#define __URDE_CANIMATIONSET_HPP__
#include "IOStreams.hpp"
#include "CAnimation.hpp"
@ -36,8 +36,19 @@ class CAnimationSet
public:
CAnimationSet(CInputStream& in);
const std::vector<CAnimation>& GetAnimations() const {return x4_animations;}
const std::vector<CTransition>& GetTransitions() const {return x14_transitions;}
const std::shared_ptr<IMetaTrans>& GetDefaultTransition() const {return x24_defaultTransition;}
const std::vector<CHalfTransition>& GetHalfTransitions() const {return x40_halfTransitions;}
const std::vector<std::pair<u32, CAdditiveAnimationInfo>>&
GetAdditiveInfo() const {return x28_additiveInfo;}
const CAdditiveAnimationInfo&
GetDefaultAdditiveInfo() const {return x38_defaultAdditiveInfo;}
const std::vector<std::pair<TResId, TResId>>&
GetAnimResIds() const {return x50_animRes;}
};
}
#endif // __PSHAG_CANIMATIONSET_HPP__
#endif // __URDE_CANIMATIONSET_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CASSETFACTORY_HPP__
#define __PSHAG_CASSETFACTORY_HPP__
#ifndef __URDE_CASSETFACTORY_HPP__
#define __URDE_CASSETFACTORY_HPP__
#include "../IFactory.hpp"
#include "../IObj.hpp"
@ -17,4 +17,4 @@ public:
};
}
#endif // __PSHAG_CASSETFACTORY_HPP__
#endif // __URDE_CASSETFACTORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CBOOLPOINODE_HPP__
#define __PSHAG_CBOOLPOINODE_HPP__
#ifndef __URDE_CBOOLPOINODE_HPP__
#define __URDE_CBOOLPOINODE_HPP__
#include "CPOINode.hpp"
@ -26,4 +26,4 @@ public:
}
#endif // __PSHAG_CBOOLPOINODE_HPP__
#endif // __URDE_CBOOLPOINODE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CCHARANIMTIME_HPP__
#define __PSHAG_CCHARANIMTIME_HPP__
#ifndef __URDE_CCHARANIMTIME_HPP__
#define __URDE_CCHARANIMTIME_HPP__
#include "IOStreams.hpp"
@ -48,4 +48,4 @@ public:
};
}
#endif // __PSHAG_CCHARANIMTIME_HPP__
#endif // __URDE_CCHARANIMTIME_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CCHARLAYOUTINFO_HPP__
#define __PSHAG_CCHARLAYOUTINFO_HPP__
#ifndef __URDE_CCHARLAYOUTINFO_HPP__
#define __URDE_CCHARLAYOUTINFO_HPP__
#include "CFactoryMgr.hpp"
#include "IOStreams.hpp"
@ -41,4 +41,4 @@ CFactoryFnReturn FCharLayoutInfo(const SObjectTag&, CInputStream&, const CVParam
}
#endif // __PSHAG_CCHARLAYOUTINFO_HPP__
#endif // __URDE_CCHARLAYOUTINFO_HPP__

View File

@ -0,0 +1,92 @@
#include "CCharacterFactory.hpp"
#include "CAnimCharacterSet.hpp"
#include "CSimplePool.hpp"
#include "CTransitionDatabaseGame.hpp"
#include "CAnimationDatabaseGame.hpp"
#include "CAnimationManager.hpp"
#include "CTransitionManager.hpp"
#include "CRandom16.hpp"
#include "CPrimitive.hpp"
namespace urde
{
CFactoryFnReturn CCharacterFactory::CDummyFactory::Build(const SObjectTag&, const CVParamTransfer&)
{
return {};
}
void CCharacterFactory::CDummyFactory::BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**)
{
}
void CCharacterFactory::CDummyFactory::CancelBuild(const SObjectTag&)
{
}
bool CCharacterFactory::CDummyFactory::CanBuild(const SObjectTag&)
{
return true;
}
const SObjectTag* CCharacterFactory::CDummyFactory::GetResourceIdByName(const char*) const
{
return nullptr;
}
TResId CCharacterFactory::GetEventResourceIdForAnimResourceId(TResId) const
{
}
std::vector<CCharacterInfo>
CCharacterFactory::GetCharacterInfoDB(const CAnimCharacterSet& ancs)
{
std::vector<CCharacterInfo> ret;
const std::map<u32, CCharacterInfo>& charInfoMap = ancs.GetCharacterSet().GetCharacterInfoMap();
ret.reserve(charInfoMap.size());
for (const auto& charInfo : charInfoMap)
ret.push_back(charInfo.second);
return ret;
}
std::vector<TLockedToken<CCharLayoutInfo>>
CCharacterFactory::GetCharLayoutInfoDB(CSimplePool& store,
const std::vector<CCharacterInfo>& chars)
{
std::vector<TLockedToken<CCharLayoutInfo>> ret;
ret.reserve(chars.size());
for (const CCharacterInfo& charInfo : chars)
ret.push_back(store.GetObj({SBIG('CINF'), charInfo.GetCharLayoutInfoId()}));
return ret;
}
CCharacterFactory::CCharacterFactory(CSimplePool& store,
const CAnimCharacterSet& ancs,
TResId selfId)
: x4_charInfoDB(GetCharacterInfoDB(ancs)),
x14_charLayoutInfoDB(GetCharLayoutInfoDB(store, x4_charInfoDB)),
x24_sysContext(std::make_shared<CAnimSysContext>(
TToken<CTransitionDatabaseGame>(
std::make_unique<CTransitionDatabaseGame>(ancs.GetAnimationSet().GetTransitions(),
ancs.GetAnimationSet().GetHalfTransitions(),
ancs.GetAnimationSet().GetDefaultTransition())),
2334, store)),
x28_animMgr(std::make_shared<CAnimationManager>(
TToken<CAnimationDatabaseGame>(
std::make_unique<CAnimationDatabaseGame>(
ancs.GetAnimationSet().GetAnimations())), *x24_sysContext)),
x2c_transMgr(std::make_shared<CTransitionManager>(*x24_sysContext)),
x40_additiveInfo(ancs.GetAnimationSet().GetAdditiveInfo()),
x50_defaultAdditiveInfo(ancs.GetAnimationSet().GetDefaultAdditiveInfo()),
x58_animResources(ancs.GetAnimationSet().GetAnimResIds()),
x68_selfId(selfId),
x70_cacheResPool(x6c_dummyFactory)
{
std::vector<CPrimitive> primitives;
x28_animMgr->GetAnimationDatabase()->GetAllUniquePrimitives(primitives);
x30_animSourceDB.reserve(primitives.size());
for (const CPrimitive& prim : primitives)
x30_animSourceDB.push_back(store.GetObj({SBIG('ANIM'), prim.GetAnimResId()}));
}
}

View File

@ -1,23 +1,63 @@
#ifndef __PSHAG_CCHARACTERFACTORY_HPP__
#define __PSHAG_CCHARACTERFACTORY_HPP__
#ifndef __URDE_CCHARACTERFACTORY_HPP__
#define __URDE_CCHARACTERFACTORY_HPP__
#include "../IFactory.hpp"
#include "IFactory.hpp"
#include "IObjFactory.hpp"
#include "CToken.hpp"
#include "CSimplePool.hpp"
#include "CAnimationSet.hpp"
namespace urde
{
class CSimplePool;
class CAnimCharacterSet;
class CCharacterInfo;
class CCharLayoutInfo;
class CAdditiveAnimationInfo;
class CTransitionDatabaseGame;
class CAnimationManager;
class CTransitionManager;
class CAllFormatsAnimSource;
class CAnimSysContext
{
};
class CCharacterFactory : public IFactory
class CCharacterFactory : public IObjFactory
{
public:
class CDummyFactory : public IFactory
{
public:
CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&);
void BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**);
void CancelBuild(const SObjectTag&);
bool CanBuild(const SObjectTag&);
const SObjectTag* GetResourceIdByName(const char*) const;
};
private:
std::vector<CCharacterInfo> x4_charInfoDB;
std::vector<TLockedToken<CCharLayoutInfo>> x14_charLayoutInfoDB;
std::shared_ptr<CAnimSysContext> x24_sysContext;
std::shared_ptr<CAnimationManager> x28_animMgr;
std::shared_ptr<CTransitionManager> x2c_transMgr;
std::vector<TCachedToken<CAllFormatsAnimSource>> x30_animSourceDB;
std::vector<std::pair<u32, CAdditiveAnimationInfo>> x40_additiveInfo;
CAdditiveAnimationInfo x50_defaultAdditiveInfo;
std::vector<std::pair<TResId, TResId>> x58_animResources;
TResId x68_selfId;
CDummyFactory x6c_dummyFactory;
CSimplePool x70_cacheResPool;
static std::vector<CCharacterInfo> GetCharacterInfoDB(const CAnimCharacterSet& ancs);
static std::vector<TLockedToken<CCharLayoutInfo>>
GetCharLayoutInfoDB(CSimplePool& store,
const std::vector<CCharacterInfo>& chars);
public:
CCharacterFactory(CSimplePool& store, const CAnimCharacterSet& ancs, TResId);
void CreateCharacter(int, bool, const TLockedToken<CCharacterFactory>& factory, int) const;
TResId GetEventResourceIdForAnimResourceId(TResId animId) const;
};
}
#endif // __PSHAG_CCHARACTERFACTORY_HPP__
#endif // __URDE_CCHARACTERFACTORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CCHARACTERINFO_HPP__
#define __PSHAG_CCHARACTERINFO_HPP__
#ifndef __URDE_CCHARACTERINFO_HPP__
#define __URDE_CCHARACTERINFO_HPP__
#include "IOStreams.hpp"
#include "CPASDatabase.hpp"
@ -40,8 +40,10 @@ private:
public:
CCharacterInfo(CInputStream& in);
TResId GetCharLayoutInfoId() const {return x1c_cinf;}
};
}
#endif // __PSHAG_CCHARACTERINFO_HPP__
#endif // __URDE_CCHARACTERINFO_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CCHARACTERSET_HPP__
#define __PSHAG_CCHARACTERSET_HPP__
#ifndef __URDE_CCHARACTERSET_HPP__
#define __URDE_CCHARACTERSET_HPP__
#include "IOStreams.hpp"
#include "CCharacterInfo.hpp"
@ -13,8 +13,9 @@ class CCharacterSet
std::map<u32, CCharacterInfo> x4_characters;
public:
CCharacterSet(CInputStream& in);
const std::map<u32, CCharacterInfo>& GetCharacterInfoMap() const {return x4_characters;}
};
}
#endif // __PSHAG_CCHARACTERSET_HPP__
#endif // __URDE_CCHARACTERSET_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CEFFECTCOMPONENT_HPP__
#define __PSHAG_CEFFECTCOMPONENT_HPP__
#ifndef __URDE_CEFFECTCOMPONENT_HPP__
#define __URDE_CEFFECTCOMPONENT_HPP__
#include "IOStreams.hpp"
#include "RetroTypes.hpp"
@ -22,4 +22,4 @@ public:
}
#endif // __PSHAG_CEFFECTCOMPONENT_HPP__
#endif // __URDE_CEFFECTCOMPONENT_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CHALFTRANSITION_HPP__
#define __PSHAG_CHALFTRANSITION_HPP__
#ifndef __URDE_CHALFTRANSITION_HPP__
#define __URDE_CHALFTRANSITION_HPP__
#include "IOStreams.hpp"
#include "IMetaTrans.hpp"
@ -13,8 +13,10 @@ class CHalfTransition
std::shared_ptr<IMetaTrans> x4_trans;
public:
CHalfTransition(CInputStream& in);
u32 GetId() const {return x0_id;}
const std::shared_ptr<IMetaTrans>& GetMetaTrans() const {return x4_trans;}
};
}
#endif // __PSHAG_CHALFTRANSITION_HPP__
#endif // __URDE_CHALFTRANSITION_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CHIERARCHYPOSEBUILDER_HPP__
#define __PSHAG_CHIERARCHYPOSEBUILDER_HPP__
#ifndef __URDE_CHIERARCHYPOSEBUILDER_HPP__
#define __URDE_CHIERARCHYPOSEBUILDER_HPP__
namespace urde
{
@ -13,4 +13,4 @@ public:
}
#endif // __PSHAG_CHIERARCHYPOSEBUILDER_HPP__
#endif // __URDE_CHIERARCHYPOSEBUILDER_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CINT32POINODE_HPP__
#define __PSHAG_CINT32POINODE_HPP__
#ifndef __URDE_CINT32POINODE_HPP__
#define __URDE_CINT32POINODE_HPP__
#include "CPOINode.hpp"
@ -28,4 +28,4 @@ public:
}
#endif // __PSHAG_CINT32POINODE_HPP__
#endif // __URDE_CINT32POINODE_HPP__

View File

@ -1,14 +1,15 @@
add_library(RuntimeCommonCharacter
CAssetFactory.hpp CAssetFactory.cpp
CCharacterFactory.hpp CCharacterFactory.cpp
CModelData.hpp CModelData.cpp
CAnimData.hpp CAnimData.cpp
CCharAnimTime.hpp CCharAnimTime.cpp
IMetaAnim.hpp IMetaAnim.cpp
IMetaTrans.hpp
CAnimationDatabase.hpp
CAnimationDatabaseGame.hpp
CAnimationDatabaseGame.hpp CAnimationDatabaseGame.cpp
CTransitionDatabase.hpp
CTransitionDatabaseGame.hpp
CTransitionDatabaseGame.hpp CTransitionDatabaseGame.cpp
CHierarchyPoseBuilder.hpp CHierarchyPoseBuilder.cpp
CPoseAsTransforms.hpp CPoseAsTransforms.cpp
CSkinBank.hpp CSkinBank.cpp
@ -68,4 +69,5 @@ add_library(RuntimeCommonCharacter
CAnimSource.hpp CAnimSource.cpp
CAllFormatsAnimSource.hpp CAllFormatsAnimSource.cpp
CSegStatementSet.hpp CSegStatementSet.cpp
CAnimSysContext.hpp
CBodyState.hpp)

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMBLEND_HPP__
#define __PSHAG_CMETAANIMBLEND_HPP__
#ifndef __URDE_CMETAANIMBLEND_HPP__
#define __URDE_CMETAANIMBLEND_HPP__
#include "IMetaAnim.hpp"
#include "IOStreams.hpp"
@ -26,4 +26,4 @@ public:
}
#endif // __PSHAG_CMETAANIMBLEND_HPP__
#endif // __URDE_CMETAANIMBLEND_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMFACTORY_HPP__
#define __PSHAG_CMETAANIMFACTORY_HPP__
#ifndef __URDE_CMETAANIMFACTORY_HPP__
#define __URDE_CMETAANIMFACTORY_HPP__
#include "IOStreams.hpp"
#include "IMetaAnim.hpp"
@ -15,4 +15,4 @@ public:
}
#endif // __PSHAG_CMETAANIMFACTORY_HPP__
#endif // __URDE_CMETAANIMFACTORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMPHASEBLEND_HPP__
#define __PSHAG_CMETAANIMPHASEBLEND_HPP__
#ifndef __URDE_CMETAANIMPHASEBLEND_HPP__
#define __URDE_CMETAANIMPHASEBLEND_HPP__
#include "IMetaAnim.hpp"
#include "IOStreams.hpp"
@ -26,4 +26,4 @@ public:
}
#endif // __PSHAG_CMETAANIMPHASEBLEND_HPP__
#endif // __URDE_CMETAANIMPHASEBLEND_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMPLAY_HPP__
#define __PSHAG_CMETAANIMPLAY_HPP__
#ifndef __URDE_CMETAANIMPLAY_HPP__
#define __URDE_CMETAANIMPLAY_HPP__
#include "IMetaAnim.hpp"
#include "CPrimitive.hpp"
@ -26,4 +26,4 @@ public:
}
#endif // __PSHAG_CMETAANIMPLAY_HPP__
#endif // __URDE_CMETAANIMPLAY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMRANDOM_HPP__
#define __PSHAG_CMETAANIMRANDOM_HPP__
#ifndef __URDE_CMETAANIMRANDOM_HPP__
#define __URDE_CMETAANIMRANDOM_HPP__
#include "IMetaAnim.hpp"
#include "IOStreams.hpp"
@ -25,4 +25,4 @@ public:
}
#endif // __PSHAG_CMETAANIMRANDOM_HPP__
#endif // __URDE_CMETAANIMRANDOM_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETAANIMSEQUENCE_HPP__
#define __PSHAG_CMETAANIMSEQUENCE_HPP__
#ifndef __URDE_CMETAANIMSEQUENCE_HPP__
#define __URDE_CMETAANIMSEQUENCE_HPP__
#include "IMetaAnim.hpp"
#include "IOStreams.hpp"
@ -24,4 +24,4 @@ public:
}
#endif // __PSHAG_CMETAANIMSEQUENCE_HPP__
#endif // __URDE_CMETAANIMSEQUENCE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETATRANSFACTORY_HPP__
#define __PSHAG_CMETATRANSFACTORY_HPP__
#ifndef __URDE_CMETATRANSFACTORY_HPP__
#define __URDE_CMETATRANSFACTORY_HPP__
#include "IOStreams.hpp"
#include "IMetaTrans.hpp"
@ -15,4 +15,4 @@ public:
}
#endif // __PSHAG_CMETATRANSFACTORY_HPP__
#endif // __URDE_CMETATRANSFACTORY_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETATRANSMETAANIM_HPP__
#define __PSHAG_CMETATRANSMETAANIM_HPP__
#ifndef __URDE_CMETATRANSMETAANIM_HPP__
#define __URDE_CMETATRANSMETAANIM_HPP__
#include "IMetaTrans.hpp"
#include "IMetaAnim.hpp"
@ -22,4 +22,4 @@ public:
}
#endif // __PSHAG_CMETATRANSMETAANIM_HPP__
#endif // __URDE_CMETATRANSMETAANIM_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETATRANSPHASETRANS_HPP__
#define __PSHAG_CMETATRANSPHASETRANS_HPP__
#ifndef __URDE_CMETATRANSPHASETRANS_HPP__
#define __URDE_CMETATRANSPHASETRANS_HPP__
#include "IMetaTrans.hpp"
#include "IOStreams.hpp"
@ -25,4 +25,4 @@ public:
}
#endif // __PSHAG_CMETATRANSPHASETRANS_HPP__
#endif // __URDE_CMETATRANSPHASETRANS_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETATRANSSNAP_HPP__
#define __PSHAG_CMETATRANSSNAP_HPP__
#ifndef __URDE_CMETATRANSSNAP_HPP__
#define __URDE_CMETATRANSSNAP_HPP__
#include "IMetaTrans.hpp"
#include "IOStreams.hpp"
@ -19,4 +19,4 @@ public:
}
#endif // __PSHAG_CMETATRANSSNAP_HPP__
#endif // __URDE_CMETATRANSSNAP_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CMETATRANSTRANS_HPP__
#define __PSHAG_CMETATRANSTRANS_HPP__
#ifndef __URDE_CMETATRANSTRANS_HPP__
#define __URDE_CMETATRANSTRANS_HPP__
#include "IMetaTrans.hpp"
#include "IOStreams.hpp"
@ -25,4 +25,4 @@ public:
}
#endif // __PSHAG_CMETATRANSTRANS_HPP__
#endif // __URDE_CMETATRANSTRANS_HPP__

View File

View File

@ -0,0 +1,24 @@
#ifndef __URDE_CMODELDATA_HPP__
#define __URDE_CMODELDATA_HPP__
#include "zeus/CVector3f.hpp"
namespace urde
{
class CAnimRes
{
zeus::CVector3f x8_scale;
public:
CAnimRes();
};
class CModelData
{
public:
CModelData(const CAnimRes& res);
};
}
#endif // __URDE_CMODELDATA_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPASANIMINFO_HPP__
#define __PSHAG_CPASANIMINFO_HPP__
#ifndef __URDE_CPASANIMINFO_HPP__
#define __URDE_CPASANIMINFO_HPP__
#include "IOStreams.hpp"
#include "rstl.hpp"
@ -19,4 +19,4 @@ public:
}
#endif // __PSHAG_CPASANIMINFO_HPP__
#endif // __URDE_CPASANIMINFO_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPASANIMPARM_HPP__
#define __PSHAG_CPASANIMPARM_HPP__
#ifndef __URDE_CPASANIMPARM_HPP__
#define __URDE_CPASANIMPARM_HPP__
#include "RetroTypes.hpp"
@ -83,4 +83,4 @@ public:
}
#endif // __PSHAG_CPASANIMPARM_HPP__
#endif // __URDE_CPASANIMPARM_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPASANIMSTATE_HPP__
#define __PSHAG_CPASANIMSTATE_HPP__
#ifndef __URDE_CPASANIMSTATE_HPP__
#define __URDE_CPASANIMSTATE_HPP__
#include "IOStreams.hpp"
#include "CPASParmInfo.hpp"
@ -21,4 +21,4 @@ public:
}
#endif // __PSHAG_CPASANIMSTATE_HPP__
#endif // __URDE_CPASANIMSTATE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPASDATABASE_HPP__
#define __PSHAG_CPASDATABASE_HPP__
#ifndef __URDE_CPASDATABASE_HPP__
#define __URDE_CPASDATABASE_HPP__
#include "IOStreams.hpp"
#include "CPASAnimState.hpp"
@ -19,4 +19,4 @@ public:
}
#endif // __PSHAG_CPASDATABASE_HPP__
#endif // __URDE_CPASDATABASE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPASPARMINFO_HPP__
#define __PSHAG_CPASPARMINFO_HPP__
#ifndef __URDE_CPASPARMINFO_HPP__
#define __URDE_CPASPARMINFO_HPP__
#include "IOStreams.hpp"
#include "CPASAnimParm.hpp"
@ -21,4 +21,4 @@ public:
}
#endif // __PSHAG_CPASPARMINFO_HPP__
#endif // __URDE_CPASPARMINFO_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPOINODE_HPP__
#define __PSHAG_CPOINODE_HPP__
#ifndef __URDE_CPOINODE_HPP__
#define __URDE_CPOINODE_HPP__
#include "IOStreams.hpp"
#include "CCharAnimTime.hpp"
@ -31,4 +31,4 @@ public:
}
#endif // __PSHAG_CPOINODE_HPP__
#endif // __URDE_CPOINODE_HPP__

View File

@ -1,5 +1,5 @@
#ifndef __PSHAG_CPARTICLEDATA_HPP__
#define __PSHAG_CPARTICLEDATA_HPP__
#ifndef __URDE_CPARTICLEDATA_HPP__
#define __URDE_CPARTICLEDATA_HPP__
#include "IOStreams.hpp"
#include "RetroTypes.hpp"
@ -29,4 +29,4 @@ public:
}
#endif // __PSHAG_CPARTICLEDATA_HPP__
#endif // __URDE_CPARTICLEDATA_HPP__

Some files were not shown because too many files have changed in this diff Show More