Nimbin[12]?SDL & Graphics / mapcreator / commits / 1a697f9

mapcreator git · master

SDL3 2.5D game and engine using assets, with map editor

sdl3 c++ game engine map-editor cmake · first commit 2025-10-31 · last commit 2026-09-07 (1 month ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-spieleentwicklung/map_creator

C++ 99.3%
git clone https://git.christianimmanuel.de/sdl-graphics/mapcreator.gitwget https://git.christianimmanuel.de/sdl-graphics/mapcreator/archive/mapcreator.tar.gz

IDK small things maybe

Christian Immanuel · 2026-02-18 14:26 · 1a697f979f98f61ab486f067b09b9dc9c66f5ce8

 src/character/character.cpp |  5 +++++
 src/character/character.hpp |  1 -
 src/game/game.cpp           |  1 +
 src/game/state_playing.cpp  | 10 +++++++---
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/character/character.cpp b/src/character/character.cpp
index e65aba6..d07a2d3 100644
--- a/src/character/character.cpp
+++ b/src/character/character.cpp
@@ -26,10 +26,13 @@ Character::Character()
     std::cout << "CREATE CHARACTER\n";
     active_menu = CharacterMenuType::NONE;
     researched_buildings[static_cast<size_t>(BuildingType::RESEARCH_WOOD_1)] = true;
+    researched_items[static_cast<size_t>(ItemType::BUILDING_TOOL)] = true;
+    std::cout << "[CTOR] " << this << " " << researched_items.size() << "\n";
 }
 
 Character::Character(Character&&) {
     std::cout << "[Character] Move constructor called!" << std::endl;
+    std::cout << "[DTOR] " << this << " " << researched_items.size() << "\n";
 }
 
 
@@ -81,6 +84,8 @@ Character::Init(SDL_Renderer* renderer) {
     bird->set_State(BirdState::WALKING, 1.4);
 
 
+
+
     // load_MapTiles animations
     animation.idle[WalkDirection::DOWN] = Animation::load(renderer, "Pixel_Crawler/Entities/Characters/Body_A/Animations/Idle_Base/Idle_Down-Sheet.png", tile_size, tile_size, "None", false, false);
     animation.idle[WalkDirection::SIDE] = Animation::load(renderer, "Pixel_Crawler/Entities/Characters/Body_A/Animations/Idle_Base/Idle_Side-Sheet.png", tile_size, tile_size, "None", false, false);
diff --git a/src/character/character.hpp b/src/character/character.hpp
index 0b7cfc0..39a3bfc 100644
--- a/src/character/character.hpp
+++ b/src/character/character.hpp
@@ -224,7 +224,6 @@ class Character {
     std::vector<bool>discovered_vegetables;
     std::vector<bool>discovered_buildings;
     std::vector<bool>researched_buildings;
-
     std::vector<bool>researched_items;
  
     Character();
diff --git a/src/game/game.cpp b/src/game/game.cpp
index eebb5ce..54dd70d 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -207,6 +207,7 @@ void Game::Run() {
         Default::set_DeltaTime();
         handle_Events();
         if (state_changed) {
+            std::cout << "FUCK " << state_playing << " " << state_playing->player<< std::endl;;
             continue;
         }
         //std::cout << "IC " << (int)this->input.click_left << std::endl;
diff --git a/src/game/state_playing.cpp b/src/game/state_playing.cpp
index 4102f13..1f014cb 100644
--- a/src/game/state_playing.cpp
+++ b/src/game/state_playing.cpp
@@ -10,9 +10,11 @@
 #include "defaults/shuffle_texture.hpp"
 
 StatePlaying::StatePlaying() { 
-    std::cout << "CREATE STATE_PLAYING\n";
+    std::cout << "CREATE STATE_PLAYING " << this << std::endl;
+}
+StatePlaying::~StatePlaying() {
+    std::cout << "STATEPL DTOR " << this << std::endl;
 }
-StatePlaying::~StatePlaying() {}
 
 StatePlaying::StatePlaying(StatePlaying&&) {
     std::cout << "[StatePlaying] Move constructor called!" << std::endl;
@@ -29,7 +31,8 @@ bool StatePlaying::Init(Game* game) {
 
     player = std::make_unique<Character>();
     player->Init(game->renderer);
-    player->researched_items[static_cast<size_t>(ItemType::BUILDING_TOOL)] = true;
+
+    std::cout << "PLAYER:: " << this << " " << player << std::endl;
 
     // INIT Weapons
     Weapon::Init(game->renderer);
@@ -299,6 +302,7 @@ void StatePlaying::Render(Game* game) {
 
 void StatePlaying::Load(SDL_Renderer* renderer, std::string path) {
     Map::tile_map = Map::load_MapTiles(path + "/map");
+    std::cout << "STATE LOAD\n";
     Map::load_TileCollision(path + "/collisions");
     if (!renderer)
         std::cerr << "FUCK NO RENDERER..\n";