From c8dc599ab89a66626086e27ca73d40aed8eb47e4 Mon Sep 17 00:00:00 2001 From: Matei Date: Thu, 12 May 2005 21:17:32 +0000 Subject: [PATCH] Un-hardcoded the rmgen output path since it's not useful when you run it out of binaries/system. You should now type rmgen script.js ../../binaries/data/mods/official/maps/scenarios/map This was SVN commit r2297. --- source/tools/rmgen/output.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/tools/rmgen/output.cpp b/source/tools/rmgen/output.cpp index 6994a6d724..0c1084d858 100644 --- a/source/tools/rmgen/output.cpp +++ b/source/tools/rmgen/output.cpp @@ -5,8 +5,6 @@ using namespace std; -const char* OUTPUT_PATH = "../../../binaries/data/mods/official/maps/scenarios/"; - typedef unsigned short u16; typedef unsigned int u32; @@ -121,9 +119,7 @@ struct PMP { } void OutputMap(Map* m, string outputName) { - string pmpName = OUTPUT_PATH + outputName + ".pmp"; - string xmlName = OUTPUT_PATH + outputName + ".xml"; - + string xmlName = outputName + ".xml"; FILE* xmlFile = fopen(xmlName.c_str(), "w"); if(!xmlFile) { cerr << "Cannot open " << xmlName << endl; @@ -132,6 +128,7 @@ void OutputMap(Map* m, string outputName) { OutputXml(m, xmlFile); fclose(xmlFile); + string pmpName = outputName + ".pmp"; FILE* pmpFile = fopen(pmpName.c_str(), "wb"); if(!pmpFile) { cerr << "Cannot open " << xmlName << endl; @@ -140,5 +137,5 @@ void OutputMap(Map* m, string outputName) { OutputPmp(m, pmpFile); fclose(pmpFile); - cout << "Map outputted to " << OUTPUT_PATH << outputName << ".*" << endl; + cout << "Map outputted to " << outputName << ".*" << endl; }