From 7077b12d7dc36c2a2be377dbf6cd73ba5ffb3d1d Mon Sep 17 00:00:00 2001 From: rpolzer Date: Thu, 20 Nov 2008 14:25:50 +0000 Subject: [PATCH] Some not THAT memory demanding limits extension; 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 | 2 +- libs/picomodel/picomodel.c | 11 ++--------- plugins/model/model.cpp | 2 +- tools/quake3/q3map2/q3map2.h | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libs/picomodel.h b/libs/picomodel.h index f7ac8a3a..bb47be0a 100644 --- a/libs/picomodel.h +++ b/libs/picomodel.h @@ -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 ); diff --git a/libs/picomodel/picomodel.c b/libs/picomodel/picomodel.c index 240d729b..078dce30 100644 --- a/libs/picomodel/picomodel.c +++ b/libs/picomodel/picomodel.c @@ -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) { diff --git a/plugins/model/model.cpp b/plugins/model/model.cpp index 47589744..fb8139cb 100644 --- a/plugins/model/model.cpp +++ b/plugins/model/model.cpp @@ -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(); diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 045b7586..96a8799e 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -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 -- 2.39.2