From 9db391e67dde948577a96797eb7f59893b8a2a36 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 22 Feb 2026 23:50:28 +0000 Subject: [PATCH] Allow passing path to ipa file as command line argument This means the .ipa file can have any file name and does not need to be next to the executable, which can be useful e.g. on Linux systems where the DoomIIRPG executable might be in a system directory. --- src/Main.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index e676347..9926cf2 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -28,8 +28,14 @@ int main(int argc, char* args[]) { int UpTime = 0; - ZipFile zipFile; - zipFile.openZipFile("Doom 2 RPG.ipa"); + std::string ipa_file = "Doom 2 RPG.ipa"; + if (argc == 2) { + ipa_file = args[1]; + } + + ZipFile zipFile; + printf("Loading game data from %s\n", ipa_file.c_str()); + zipFile.openZipFile(ipa_file.c_str()); SDLGL sdlGL; sdlGL.Initialize(); @@ -128,4 +134,5 @@ void drawView(SDLGL *sdlGL) { SDL_GL_SwapWindow(sdlGL->window); // Swap the window/pBmp to display the result. -} \ No newline at end of file + +}