]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Some not THAT memory demanding limits extension;
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 20 Nov 2008 14:25:50 +0000 (14:25 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 20 Nov 2008 14:25:50 +0000 (14:25 +0000)
use right file name when looking for .mtl

git-svn-id: svn://svn.icculus.org/netradiant/trunk@129 61c419a2-8eb2-4b30-bcec-8cead039b335

libs/picomodel.h
libs/picomodel/picomodel.c
plugins/model/model.cpp
tools/quake3/q3map2/q3map2.h

index f7ac8a3aec39cdd5fb1d4496a534e4783db29e96..bb47be0aad8f95ff2e20cc9db20f19c3265d181d 100644 (file)
@@ -220,7 +220,7 @@ const picoModule_t                  **PicoModuleList( int *numModules );
 picoModel_t                                    *PicoLoadModel( char *name, int frameNum );
 
 typedef size_t (*PicoInputStreamReadFunc)(void* inputStream, unsigned char* buffer, size_t length);
-picoModel_t* PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum );
+picoModel_t* PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum, const char *fileName );
 
 /* model functions */
 picoModel_t                                    *PicoNewModel( void );
index 240d729b3f2f8a419e6bb8c22bd8c15e07ed0cbd..078dce306cbd97b438a5baf99a5697cb511c1f34 100644 (file)
@@ -259,7 +259,7 @@ picoModel_t *PicoLoadModel( char *fileName, int frameNum )
        return model;
 }
 
-picoModel_t    *PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum )
+picoModel_t    *PicoModuleLoadModelStream( const picoModule_t* module, void* inputStream, PicoInputStreamReadFunc inputStreamRead, size_t streamLength, int frameNum, const char *fileName )
 {
        picoModel_t                     *model;
        picoByte_t                      *buffer;
@@ -286,14 +286,7 @@ picoModel_t        *PicoModuleLoadModelStream( const picoModule_t* module, void* inputS
        bufSize = (int)inputStreamRead(inputStream, buffer, streamLength);
        buffer[bufSize] = '\0';
 
-       {
-               // dummy filename
-               char fileName[128];
-               fileName[0] = '.';
-               strncpy(fileName + 1, module->defaultExts[0], 126);
-               fileName[127] = '\0';
-               model = PicoModuleLoadModel(module, fileName, buffer, bufSize, frameNum);
-       }
+       model = PicoModuleLoadModel(module, fileName, buffer, bufSize, frameNum);
        
   if(model != 0)
   {
index 475897446f2e9ae1b055cd5b5452d2ef8e2078f2..fb8139cb1d202ffe6da99f127e10f2393c4e26be 100644 (file)
@@ -1041,7 +1041,7 @@ size_t picoInputStreamReam(void* inputStream, unsigned char* buffer, size_t leng
 
 scene::Node& loadPicoModel(const picoModule_t* module, ArchiveFile& file)
 {
-  picoModel_t* model = PicoModuleLoadModelStream(module, &file.getInputStream(), picoInputStreamReam, file.size(), 0);
+  picoModel_t* model = PicoModuleLoadModelStream(module, &file.getInputStream(), picoInputStreamReam, file.size(), 0, file.getName());
   PicoModelNode* modelNode = new PicoModelNode(model);
   PicoFreeModel(model);
   return modelNode->node();
index 045b7586eeca5af6c61d98a1e7ea69ce95c06245..96a8799efc5db8d7b17b855c740a62b2c1552bfc 100644 (file)
@@ -303,14 +303,14 @@ abstracted bsp file
 
 /* ok to increase these at the expense of more memory */
 #define        MAX_MAP_MODELS                  0x400
-#define        MAX_MAP_BRUSHES                 0x8000
+#define        MAX_MAP_BRUSHES                 0x10000
 #define        MAX_MAP_ENTITIES                0x1000          //%     0x800   /* ydnar */
 #define        MAX_MAP_ENTSTRING               0x80000         //%     0x40000 /* ydnar */
 #define        MAX_MAP_SHADERS                 0x800           //%     0x400   /* ydnar */
 
 #define        MAX_MAP_AREAS                   0x100           /* MAX_MAP_AREA_BYTES in q_shared must match! */
 #define        MAX_MAP_FOGS                    30                      //& 0x100       /* RBSP (32 - world fog - goggles) */
-#define        MAX_MAP_PLANES                  0x100000        //%     0x20000 /* ydnar for md */
+#define        MAX_MAP_PLANES                  0x200000        //%     0x20000 /* ydnar for md */
 #define        MAX_MAP_NODES                   0x20000
 #define        MAX_MAP_BRUSHSIDES              0x100000        //%     0x20000 /* ydnar */
 #define        MAX_MAP_LEAFS                   0x20000