aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:20:00 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:20:00 +0100
commit69de11fcf110d2ff17157cd9b384c4e8a701f869 (patch)
tree63e20c8ac906e07c1314810c480c2e65636df6ca /src/main.cpp
parentenemy slingshot is functional (diff)
downloadthreshold-69de11fcf110d2ff17157cd9b384c4e8a701f869.tar.gz
threshold-69de11fcf110d2ff17157cd9b384c4e8a701f869.tar.bz2
threshold-69de11fcf110d2ff17157cd9b384c4e8a701f869.tar.xz
threshold-69de11fcf110d2ff17157cd9b384c4e8a701f869.tar.zst
threshold-69de11fcf110d2ff17157cd9b384c4e8a701f869.zip
what ?
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 40dae71..ffa7e30 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -25,7 +25,7 @@ int main(void) {
auto nPick = 0;
Texture2D background;
Game* game = nullptr;
- std::ofstream ifs("../meta/maps/savestate");
+ std::ofstream saveOut("../meta/maps/savestate");
std::string path = "../meta/maps";
int i = 0;
@@ -37,6 +37,7 @@ int main(void) {
i++;
}
}
+
// Main game loop
while (!WindowShouldClose()) /* Detect window close button or ESC key */
{
@@ -82,7 +83,7 @@ int main(void) {
if (IsKeyPressed(KEY_ENTER)) {
std::string next("../meta/maps/");
next += game->getNext();
- ifs << game->getCurrent();
+ saveOut << game->getCurrent();
delete game;
CloseAudioDevice();
@@ -185,7 +186,7 @@ int main(void) {
}
EndDrawing();
}
- ifs.close();
+ saveOut.close();
CloseWindow();
return 0;
}