diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index dbe5da8..a1aa366 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -34,12 +34,57 @@ public: float elapsedTime=0; const float TARGET_RATE = 1/60.0; std::string CUTSCENE_CONSOLE_TEXT = ""; + int**MAP=NULL; + int MAP_WIDTH=-1; + int MAP_HEIGHT=-1; + + void LoadMap(char*mapName) { + std::ifstream f("assets/maps/map1"); + std::string data; + MAP_WIDTH=MAP_HEIGHT=-1; + if (MAP!=NULL) { + for (int y=0;y>data; + if (MAP_WIDTH==-1) { + std::stringstream stream(data); + stream>>MAP_WIDTH; + } else + if (MAP_HEIGHT==-1) { + std::stringstream stream(data); + stream>>MAP_HEIGHT; + } else { + if (MAP==NULL) { + MAP=(int**)malloc(sizeof(int**)*MAP_HEIGHT); + } + MAP[y]=(int*)malloc(sizeof(int*)*MAP_WIDTH); + for (int i=0;i0) { transparency=clamp(transparency-FADE_SPD,0,255); + if (transparency==0) { + fadeInCompleted(); + } } switch (GAME_STATE) { case CUTSCENE_1:{ diff --git a/Seasons_of_Loneliness b/Seasons_of_Loneliness index 87ee5e2..513b58d 100755 Binary files a/Seasons_of_Loneliness and b/Seasons_of_Loneliness differ diff --git a/assets/dome.png b/assets/dome.png new file mode 100644 index 0000000..ded5b84 Binary files /dev/null and b/assets/dome.png differ diff --git a/assets/maps/map1 b/assets/maps/map1 new file mode 100644 index 0000000..8f15ea5 --- /dev/null +++ b/assets/maps/map1 @@ -0,0 +1,41 @@ +103 +39 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000111111111111111111111111111111111110000000000000000000000000000000000000000000000 +000000002222222222222111111111111111111111111111111111110000000000000000000000000000000000000000000000 +000000002222222222222111111111111111111111111111111111110000000000000000000000000000000000000000000000 +000000000000000000000111111111111111111111111111111111110000000000000000000000000000000000000000000000 +000000000000000000000111111111111111111111111111111111110000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/assets/player.png b/assets/player.png new file mode 100644 index 0000000..84af810 Binary files /dev/null and b/assets/player.png differ diff --git a/assets/tiles.png b/assets/tiles.png new file mode 100644 index 0000000..38570a2 Binary files /dev/null and b/assets/tiles.png differ