 |
Gorgon Game Engine
|
Go to the documentation of this file.
5 #include "../Animation.h"
7 #include "../Graphics/TextureAnimation.h"
10 #pragma warning(disable:4250)
12 namespace Gorgon {
namespace Resource {
46 static bool LoadResourceWith(
Animation &anim, std::weak_ptr<File> file, std::shared_ptr<Reader> reader,
unsigned long size,
47 std::function<
Base*(std::weak_ptr<File> file, std::shared_ptr<Reader> reader,
67 std::function<
void(
Writer &writer)> extra = {});
bool DeleteResource()
Safely deletes the resource.
Definition: Base.cpp:34
This class stores animations as a part of itself so that it can be moved around as a value rather tha...
Definition: Storage.h:21
constexpr Type File
File.
Definition: GID.h:84
Definition: TextureAnimation.h:137
basic_TextureAnimationProvider< Bitmap, basic_TextureAnimation, basic_AnimationFrame< Bitmap > > BitmapAnimationProvider
Definition: TextureAnimation.h:520
Animation & operator=(const Animation &other)=delete
Copy assignment is disabled, use Duplicate.
void save(Writer &writer) const override
Definition: Animation.cpp:92
static void SaveThis(Writer &writer, const Graphics::BitmapAnimationProvider &anim, GID::Type type=GID::Animation, std::function< void(Writer &writer)> extra={})
Saves the given animation as a resource.
Definition: Animation.cpp:100
Animation(Graphics::BitmapAnimationProvider &&anim)
Conversion constructor.
Definition: Animation.h:25
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
virtual GID::Type GetGID() const override
Returns the Gorgon Identifier.
Definition: Animation.h:37
This class denotes the resource is an image animation storage.
Definition: AnimationStorage.h:12
constexpr Type Animation
Definition: GID.h:187
This class is the base for all Gorgon Resources.
Definition: Base.h:20
static bool LoadResourceWith(Animation &anim, std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size, std::function< Base *(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, GID::Type, unsigned long)> loadfn)
This function allows loading animation with a function to load unknown resources.
Definition: Animation.cpp:8
Graphics::BitmapAnimationProvider & MoveOutProvider() override
Definition: Animation.cpp:150
This class allows resource objects to save their data to a stream.
Definition: Writer.h:59
Animation(const Animation &)=delete
Copy constructor is disabled, use Duplicate or DeepDuplicate.
@ Graphics
Definition: Template.h:164
Graphics::RectangularAnimationStorage MoveOut()
Moves this animation out as a generic value type animation.
Definition: AnimationStorage.h:15
Type to store GID information.
Definition: GID.h:23
void savedata(Writer &writer) const
Definition: Animation.cpp:79
virtual ~Animation()
Definition: Animation.h:71
Graphics::BitmapAnimationProvider MoveOutAsBitmap()
Moves the animation out of the resource system. Use Prepare and Discard before moving out to avoid co...
Definition: Animation.cpp:124
static Animation * LoadResource(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size)
This function loads an animation resource from the given file.
Definition: Animation.h:51
Animation()
Default constructor.
Definition: Animation.h:22
virtual Graphics::RectangularAnimationStorage animmoveout() override
Definition: Animation.cpp:154
This class represents an animation resource.
Definition: Animation.h:19