]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/prtfile.c
enable q3map2 out of tree compilation
[xonotic/netradiant.git] / tools / quake3 / q3map2 / prtfile.c
index 514d255f7b556ba2ce35597a04a1feb874f35f38..2cd7015c35acb47090c90e996b8121cfcfdb9a25 100644 (file)
@@ -371,17 +371,15 @@ void NumberClusters( tree_t *tree ) {
    WritePortalFile
    ================
  */
-void WritePortalFile( tree_t *tree ){
-       char filename[1024];
+void WritePortalFile( tree_t *tree, const char *portalFilePath ){
 
        Sys_FPrintf( SYS_VRB,"--- WritePortalFile ---\n" );
 
        // write the file
-       sprintf( filename, "%s.prt", source );
-       Sys_Printf( "writing %s\n", filename );
-       pf = fopen( filename, "w" );
+       Sys_Printf( "writing %s\n", portalFilePath );
+       pf = fopen( portalFilePath, "w" );
        if ( !pf ) {
-               Error( "Error opening %s", filename );
+               Error( "Error opening %s", portalFilePath );
        }
 
        fprintf( pf, "%s\n", PORTALFILE );