diff --git a/README.md b/README.md
index 43d060bc..f6976c2c 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,9 @@

---
+[](https://github.com/rpgppengine/rpgpp/actions/workflows/build.yml)
RPG++ is an experimental 2D RPG game engine written in C++. It is currently in early development, but contributions are welcome!
-***This is a fresh restart, there are currently no RPG++ lua bindings, the engine hasn't been implemented in this branch yet.***
-
Requirements
diff --git a/include/actor.hpp b/include/actor.hpp
index f68be713..d6c5d5b3 100644
--- a/include/actor.hpp
+++ b/include/actor.hpp
@@ -53,6 +53,8 @@ class Actor : public ISaveable {
std::array, 8> animations;
/** A Direction enum, showing the current animation that is being played. */
Direction currentAnimation;
+ Direction lastAnimation;
+ bool tempAnimIsPlayed = false;
public:
/** Empty constructor. */
@@ -64,7 +66,7 @@ class Actor : public ISaveable {
Actor(std::unique_ptr tileSet, Vector2 atlasPos,
std::string tileSetSource);
/** Constructor that takes an ActorBin binary structure */
- Actor(ActorBin bin);
+ Actor(const ActorBin &bin);
/** Dump this Actor's data to a nlohmann::json object. */
json dumpJson() override;
/** Unload routine. The UnloadTexture function will called here. */
@@ -125,6 +127,10 @@ class Actor : public ISaveable {
/** Add multiple frames to the chosen animation. */
void addAnimationFrames(Direction id,
const std::vector> &frames);
+ /** Temporarily play an animation */
+ void playAnimation(Direction id);
+ /** Check whether a temporary animation is playing */
+ bool isTempAnimationPlaying();
/** Change the Actor's current animation and play it. */
void changeAnimation(Direction id);
/** Get the path of the used TileSet. */
@@ -139,4 +145,7 @@ class Actor : public ISaveable {
void setCollisionRect(Rectangle rect);
};
+Vector2 calcActorTilePos(Vector2 newPosition, Vector2 worldTileSize,
+ TileSet *tileSet);
+
#endif
diff --git a/include/actorContainer.hpp b/include/actorContainer.hpp
new file mode 100644
index 00000000..e06bab28
--- /dev/null
+++ b/include/actorContainer.hpp
@@ -0,0 +1,26 @@
+#ifndef _RPGPP_ACTORCONTAINER_H
+#define _RPGPP_ACTORCONTAINER_H
+
+#include "actor.hpp"
+
+class ActorContainer {
+ private:
+ std::map> actors;
+
+ public:
+ /** Construct the actor container. */
+ ActorContainer();
+ /** Get the map itself */
+ std::map> &getActors();
+ /** Get an Actor with the specified name */
+ Actor &getActor(const std::string &name);
+ /** Add a new Actor with a name from the GameBin and an in-room name*/
+ void addActor(Vector2 pos, const std::string &typeName,
+ const std::string &roomName);
+ /** Remove an Actor */
+ void removeActor(const std::string &roomName);
+ /** Check whether an Actor with such an in-room name exists. */
+ bool actorExists(const std::string &roomName);
+};
+
+#endif // !_RPGPP_ACTORCONTAINER_H
diff --git a/include/baseContainer.hpp b/include/baseContainer.hpp
new file mode 100644
index 00000000..9d1345a1
--- /dev/null
+++ b/include/baseContainer.hpp
@@ -0,0 +1,51 @@
+#ifndef _RPGPP_BASECONTAINER_H
+#define _RPGPP_BASECONTAINER_H
+
+#include "conversion.hpp"
+#include "gamedata.hpp"
+#include "raylib.h"
+#include