Page 1 of 1

load .bsp difference from irrlicht v.1.4 to v.1.41

Posted: Sun Jul 13, 2008 11:51 am
by }{ermanssoN
Hello. I jus updated to the newest version of irrlicht. Suddenly I couldn't load my Q3 map anymore. I use the map loaded in tutorial 2.

tgis is my code

Code: Select all

m_pWorldManager = new WorldManager();

	SWorld* pWorld = new SWorld();
	
	m_pIrrDevice->getFileSystem()->addZipFileArchive("data/worlds/map-20kdm2.pk3");
	IAnimatedMesh* pQuakeMesh = m_pSceneManager->getMesh("20kdm2.bsp");
	
	pWorld->pName = "World";
	pWorld->pWorldMesh = pQuakeMesh;
	pWorld->pWorldNode = m_pSceneManager->addOctTreeSceneNode( pQuakeMesh->getMesh( 0 ), 0, -1, 128 );
	pWorld->pWorldNode->setPosition( vector3df(-1300,-144,-1249) );
	m_pWorldManager->AddWorld( pWorld );
Don't mind the SWorld, it's just a struct with pointers to the world.

I get a crash when it's time to load the .bsp file.

Code: Select all

m_pIrrDevice->getFileSystem()->addZipFileArchive("data/worlds/map-20kdm2.pk3");
	IAnimatedMesh* pQuakeMesh = m_pSceneManager->getMesh("20kdm2.bsp"); <---Crash!!!
I found a .txt file to the .pk file wich i pasted ni the same folder but that didn't do anything. I searched the forum but didn't find anyone with the same problem. Hopefully I just made a nooby mistake :)

Posted: Sun Jul 13, 2008 12:51 pm
by rogerborg
Which version of Irrlicht did you change to?

Which version of Irrlicht did you change from?

What is the result of the call to addZipFileArchive()?

What is the value of m_pSceneManager when the crash occurs?

What kind of crash is it?

Posted: Sun Jul 13, 2008 2:38 pm
by }{ermanssoN
I wnt from version 1.4 to 1.41

addZipFileArchive() returns true

m_pSceneManager is reference counted 1 and is valid.

the error message
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

Posted: Sun Jul 13, 2008 3:13 pm
by FuzzYspo0N
Did you update the DLL in the folder?

Posted: Sun Jul 13, 2008 3:20 pm
by }{ermanssoN
hhehe, just remembered that I didn't replace the old dll files, now it works.

Thanks anyway!

Posted: Sun Jul 13, 2008 7:32 pm
by rogerborg
Damn youuuuuu, I wanted to answer that. :P