From 73bf0d83e18b87d2175301cbd0a7cab2b817bf5f Mon Sep 17 00:00:00 2001 From: Rendo Date: Wed, 11 Mar 2026 22:08:28 +0500 Subject: [PATCH] Not working maploader --- src/main.cpp | 7 +++---- src/maploader.cpp | 11 ++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ba4d5b1..d4ab187 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,11 +2,14 @@ #include #include "components.h" #include "world.h" +#include "maploader.h" const int SCREEN_HEIGHT = 320; const int SCREEN_WIDTH = 320; int main() { + loadmap(); + return 0; InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Test game"); @@ -35,7 +38,3 @@ int main() { return 0; } - -void load_map(const char * path){ - -} diff --git a/src/maploader.cpp b/src/maploader.cpp index a646687..5c9f491 100644 --- a/src/maploader.cpp +++ b/src/maploader.cpp @@ -1,8 +1,17 @@ #include "maploader.h" #include +#include #include "world.h" void loadmap() { - + std::ifstream input_stream; + input_stream.open("assets/map"); + + if(input_stream.is_open() == false) + return; + + std::cout << input_stream.getline() + + input_stream.close(); }