 |
Gorgon Game Engine
|
Go to the documentation of this file.
4 #include "../Graphics/StackedObject.h"
7 namespace Gorgon {
namespace Resource {
101 throw std::runtime_error(
"Provider is not set.");
108 throw std::runtime_error(
"Provider is not set.");
115 throw std::runtime_error(
"Provider is not set.");
122 throw std::runtime_error(
"Provider is not set.");
129 throw std::runtime_error(
"Provider is not set.");
136 throw std::runtime_error(
"Provider is not set.");
143 throw std::runtime_error(
"Provider is not set.");
164 IStackedObjectProvider *prov =
nullptr;
void SetOffset(const Geometry::Point &value) override
Sets the offset of the top image.
Definition: StackedObject.h:246
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
StackedObject(Graphics::StackedObjectProvider &&prov)
Creates a new stacked object using another stacked object provider.
Definition: StackedObject.h:37
constexpr Type File
File.
Definition: GID.h:84
This object creates an object that has two subobjects drawn on top of each other.
Definition: StackedObject.h:116
virtual Graphics::RectangularAnimation & CreateBottom() const override
Definition: StackedObject.h:106
virtual Geometry::Point GetOffset() const override
Definition: StackedObject.h:113
basic_StackedObjectProvider< RectangularAnimationProvider > StackedObjectProvider
Definition: StackedObject.h:357
void SetProvider(Graphics::StackedBitmapAnimationProvider &value)
Changes the provider stored in this stacked object, ownership will not be transferred.
Definition: StackedObject.h:57
virtual Graphics::RectangularAnimation & CreateTop() const override
Definition: StackedObject.h:99
constexpr Type StackedObject
Definition: GID.h:250
Controllers are required to progress animations.
Definition: Animation.h:65
basic_StackedObject< A_ > & CreateAnimation(bool create=true) const override
Definition: StackedObject.h:186
virtual Geometry::Size GetSize() const override
Definition: StackedObject.h:141
void SetProvider(Graphics::StackedObjectProvider &value)
Changes the provider stored in this stacked object, ownership will not be transferred.
Definition: StackedObject.h:63
static void SaveThis(Writer &writer, const Graphics::IStackedObjectProvider &provider)
Definition: StackedObject.cpp:151
Definition: StackedObject.h:25
RectangularAnimation & CreateTop() const override
Creates a top animation without controller.
Definition: StackedObject.h:195
void SetProvider(Graphics::StackedBitmapProvider &value)
Changes the provider stored in this stacked object, ownership will not be transferred.
Definition: StackedObject.h:51
void AssumeProvider(Graphics::StackedBitmapProvider &value)
Changes the provider stored in this stacked object, ownership will be transferred.
Definition: StackedObject.h:69
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
This is a stacked object resource.
Definition: StackedObject.h:15
This class denotes the resource is an image animation storage.
Definition: AnimationStorage.h:12
Rectangular drawable animation.
Definition: Animations.h:19
Geometry::Size GetSize() const override
Definition: StackedObject.h:272
void AssumeProvider(Graphics::StackedObjectProvider &value)
Changes the provider stored in this stacked object, ownership will be transferred.
Definition: StackedObject.h:83
virtual Graphics::StackedObject & CreateAnimation(bool create=true) const override
This function should create and animation and depending on the create parameter, it should create its...
Definition: StackedObject.h:134
GID::Type GetGID() const override
This function shall return Gorgon ID of this resource.
Definition: StackedObject.h:46
For ease of use in resource system.
Definition: StackedObject.h:10
virtual Graphics::StackedObject & CreateAnimation(Gorgon::Animation::ControllerBase &timer) const override
This function should create a new animation with the given controller and if owner parameter is set t...
Definition: StackedObject.h:127
This class represents a 2D point.
Definition: Point.h:32
This class allows resource objects to save their data to a stream.
Definition: Writer.h:59
void save(Writer &writer) const override
Definition: StackedObject.cpp:132
RectangularAnimation & CreateBottom() const override
Creates a bottom animation without controller.
Definition: StackedObject.h:205
void AssumeProvider(Graphics::StackedBitmapAnimationProvider &value)
Changes the provider stored in this stacked object, ownership will be transferred.
Definition: StackedObject.h:76
@ Graphics
Definition: Template.h:164
Geometry::Point GetOffset() const override
Returns the offset of the top image.
Definition: StackedObject.h:241
virtual void SetOffset(const Geometry::Point &value) override
Definition: StackedObject.h:120
Type to store GID information.
Definition: GID.h:23
void RemoveProvider()
Removes the provider, if it is own by this resource it will be deleted.
Definition: StackedObject.h:90
IStackedObjectProvider & MoveOutProvider() override
This function moves this animation provider into a new provider.
Definition: StackedObject.cpp:211
basic_StackedObjectProvider< BitmapAnimationProvider > StackedBitmapAnimationProvider
Definition: StackedObject.h:360
static StackedObject * LoadResource(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size)
This function loads a stacked object resource from the file.
Definition: StackedObject.cpp:36
basic_StackedObjectProvider< Bitmap > StackedBitmapProvider
Definition: StackedObject.h:363
StackedObject(Graphics::StackedBitmapAnimationProvider &&prov)
Creates a new stacked object using another stacked object provider.
Definition: StackedObject.h:32
virtual Graphics::RectangularAnimationStorage animmoveout() override
Definition: StackedObject.cpp:207
StackedObject(Graphics::StackedBitmapProvider &&prov)
Creates a new stacked object using another stacked object provider.
Definition: StackedObject.h:27
StackedObject()
Creates a new empty stacked object.
Definition: StackedObject.h:42