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(); }