aboutsummaryrefslogtreecommitdiff
path: root/src/dummy_resource_manager.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-10-02 15:57:59 +0200
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-10-02 15:57:59 +0200
commitde2c2593f9f272c5151d74af4ff846fdd70a9bc7 (patch)
tree4001a60809734a60b75e39da5c994d9381b6efe2 /src/dummy_resource_manager.cpp
parent41bd601ef62d967c80cc0591eaf6b4290baae425 (diff)
working resource manager and textures and sprite to new standard
Diffstat (limited to 'src/dummy_resource_manager.cpp')
-rw-r--r--src/dummy_resource_manager.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/dummy_resource_manager.cpp b/src/dummy_resource_manager.cpp
index 214c617..bb0b7af 100644
--- a/src/dummy_resource_manager.cpp
+++ b/src/dummy_resource_manager.cpp
@@ -2,22 +2,37 @@
-#include "api/Image_asset.h"
+#include "api/game.h"
#include "api/resource_manager.h"
-#include <iostream>
-#include <ostream>
-
-
+#include "api/spritesheet.h"
+#include "facade/Texture.h"
+#include "util/log.h"
+#include <vector>
using namespace crepe;
int main(){
+
+ dbg_trace();
+
// get instance of resource manager
+ //api::ResourceManager& c_ResMan = api::ResourceManager::get_instance();
+
+
+ game engine;
+
api::ResourceManager& c_ResMan = api::ResourceManager::get_instance();
- // make a resouce from the file path
- api::Texture* img = c_ResMan.Load<api::Texture>("../asset/texture/img.png");
+ auto test = c_ResMan.Load<Texture>("../asset/texture/img.png");
+
+ auto img = Texture("../asset/texture/img.png");
+
+ auto SS = api::Spritesheet("../asset/spritesheet/spritesheet_test.png", 1 , 4);
+
+ std::vector<Texture*> t = {test};
+ std::vector<api::Spritesheet*> s = {&SS};
+
+ engine.render(t, s);
- std::cout << img->getContent() << std::endl;
}