]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/qe3.cpp
(by LordHavoc) game_etut uses BSP format version 47 too
[xonotic/netradiant.git] / radiant / qe3.cpp
index a526c608d003cc1e63ed23100d94ec3d08a30aeb..67ffebeccb3d38e5a88405cbe307b1821f30959a 100644 (file)
@@ -170,28 +170,20 @@ bool ConfirmModified(const char* title)
   return true;
 }
 
-
-const char* const EXECUTABLE_TYPE = 
-#if defined(__linux__) || defined (__FreeBSD__)
-"x86"
-#elif defined(__APPLE__)
-"ppc"
-#elif defined(WIN32)
-"exe"
-#else
-#error "unknown platform"
-#endif
-;
-
 void bsp_init()
 {
   build_set_variable("RadiantPath", AppPath_get());
-  build_set_variable("ExecutableType", EXECUTABLE_TYPE);
+  build_set_variable("ExecutableType", RADIANT_EXECUTABLE);
   build_set_variable("EnginePath", EnginePath_get());
   build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : "");
   build_set_variable("GameName", gamename_get());
 
-  build_set_variable("MapFile", Map_Name(g_map));
+  const char* mapname = Map_Name(g_map);
+  StringOutputStream name(256);
+  name << StringRange(mapname, path_get_filename_base_end(mapname)) << ".bsp";
+
+  build_set_variable("MapFile", mapname);
+  build_set_variable("BspFile", name.c_str());
 }
 
 void bsp_shutdown()
@@ -346,7 +338,7 @@ void RunBSP(const char* name)
 #endif
       globalOutputStream() << "Writing the compile script to '" << batpath << "'\n";
       globalOutputStream() << "The build output will be saved in '" << junkpath << "'\n";
-      Q_Exec(batpath, NULL, NULL, true);
+      Q_Exec(batpath, NULL, NULL, true, false);
     }
   }
 
@@ -359,7 +351,7 @@ void RunBSP(const char* name)
 void Sys_SetTitle(const char *text, bool modified)
 {
   StringOutputStream title;
-  title << ConvertLocaleToUTF8(text);
+  title << text;
 
   if(modified)
   {