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 );
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;
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)
{
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();
/* 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