]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'bf6dd1f2d186c799adf11f1e744a1ff57aa8d335' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 19:22:53 +0000 (21:22 +0200)
committerThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 19:22:53 +0000 (21:22 +0200)
1  2 
tools/quake3/common/scriplib.c
tools/quake3/common/vfs.c
tools/quake3/common/vfs.h
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/shaders.c

Simple merge
index e8648e813fd25b95b0b95bff8ef85eff35244ddb,2cafd3f03fb5320e8eb00f5519675471690c344c..362bffe1e6499bfbb8bf0ac60a4ffa58b4bcca16
  
  typedef struct
  {
+       char* unzFilePath;
        char*   name;
 -      unz_s zipinfo;
        unzFile zipfile;
 +      unz_file_pos zippos;
        guint32 size;
  } VFS_PAKFILE;
  
@@@ -145,13 -139,13 +149,14 @@@ static void vfsInitPakFile( const char 
                g_pakFiles = g_slist_append( g_pakFiles, file );
  
                vfsFixDOSName( filename_inzip );
 -              g_strdown( filename_inzip );
 +               //-1 null terminated string
 +              filename_lower = g_ascii_strdown( filename_inzip, -1 );
  
 -              file->name = strdup( filename_inzip );
 +              file->name = strdup( filename_lower );
                file->size = file_info.uncompressed_size;
                file->zipfile = uf;
 -              memcpy( &file->zipinfo, uf, sizeof( unz_s ) );
+               file->unzFilePath = unzFilePath;
 +              file->zippos = pos;
  
                if ( ( i + 1 ) < gi.number_entry ) {
                        err = unzGoToNextFile( uf );
@@@ -465,10 -460,12 +474,14 @@@ int vfsLoadFile( const char *filename, 
                }
  
                if ( count == index ) {
 -                      memcpy( file->zipfile, &file->zipinfo, sizeof( unz_s ) );
+                       strcpy( g_strLoadedFileLocation, file->unzFilePath );
+                       strcat( g_strLoadedFileLocation, " :: " );
+                       strcat( g_strLoadedFileLocation, filename );
  
 +              if ( unzGoToFilePos( file->zipfile, &file->zippos ) != UNZ_OK ) {
 +                      return -1;
 +              }
                        if ( unzOpenCurrentFile( file->zipfile ) != UNZ_OK ) {
                                return -1;
                        }
Simple merge
Simple merge
Simple merge