Please, I REALLY need help =(
Im writing a prog to read 3DS files and I can load a 3ds file called "Box.3ds" but i can''t, however, load a 3ds file called "spehere.3ds". I can only load "box.3ds" and whenever I try to load any other .3ds file i get this message:
exited with code 1245032 (0x12FF68)
Can someone help me with this?
Js
Js
Maybe you''re not allocating enough memory in the correct places. I saw your post earlier and searched google for that error number but nothing turned up. You''ll probably have to provide more information for other, more knowledgeable, people to help out.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
some sample code would be usefull but sounds like you overrun some memmory (or not allocating enough of it)
There are more worlds than the one that you hold in your hand...
There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
Here''s my code:
class _3DS
{
public:
WORD nov;
VERTEX *vlist;
FACE *flist;
_3DS()
{
vlist = NULL;
flist = NULL;
}
~_3DS()
{
if(vlist) delete[nov]vlist;
}
void Open(LPSTR filename)
{
CHUNK chunk;
OFSTRUCT of;
HFILE hfile = OpenFile(filename,&of,OF_READ);
_lread(hfile,&chunk.id,sizeof(WORD));
_lread(hfile,&chunk.length,sizeof(DWORD));
if(chunk.id == MAIN3DS) cout << "\nIt''s a .3ds file\n";
_lseek(hfile,chunk.length,SEEK_SET);
bool seek = 1;
while(seek)
{
_lread(hfile,&chunk.id,sizeof(WORD));
_lread(hfile,&chunk.length,sizeof(DWORD));
if(chunk.id == EDIT_OBJECT) cout << "\nEDIT_OBJECT\n";
if(chunk.id == OBJ_TRIMESH) cout << "\nOBJ_TRIMESH\n";
if(chunk.id == TRI_FACEL2) cout << "\nTRI_FACEL2\n";
if(chunk.id == TRI_FACEL1) cout << "\nTRI_FACEL1\n";
if(chunk.id == TRI_SMOOTH) cout << "\nTRI_SMOOTH\n";
if(chunk.id == TRI_LOCAL) cout << "\nTRI_LOCAL\n";
if(chunk.id == TRI_VISIBLE) cout << "\nTRI_VISIBLE\n";
if(chunk.id != TRI_VERTEXL) _lseek(hfile,chunk.length,SEEK_SET);
else if(chunk.id == TRI_VERTEXL)seek = false;
}
cout << "\nTRI_VERTEXL\n";
_lread(hfile,&nov,sizeof(WORD));
cout << "\n # of vertices: " << nov;
vlist = new VERTEX[nov];
for(int a=0;a {
_lread(hfile,&vlistLink
Js
class _3DS
{
public:
WORD nov;
VERTEX *vlist;
FACE *flist;
_3DS()
{
vlist = NULL;
flist = NULL;
}
~_3DS()
{
if(vlist) delete[nov]vlist;
}
void Open(LPSTR filename)
{
CHUNK chunk;
OFSTRUCT of;
HFILE hfile = OpenFile(filename,&of,OF_READ);
_lread(hfile,&chunk.id,sizeof(WORD));
_lread(hfile,&chunk.length,sizeof(DWORD));
if(chunk.id == MAIN3DS) cout << "\nIt''s a .3ds file\n";
_lseek(hfile,chunk.length,SEEK_SET);
bool seek = 1;
while(seek)
{
_lread(hfile,&chunk.id,sizeof(WORD));
_lread(hfile,&chunk.length,sizeof(DWORD));
if(chunk.id == EDIT_OBJECT) cout << "\nEDIT_OBJECT\n";
if(chunk.id == OBJ_TRIMESH) cout << "\nOBJ_TRIMESH\n";
if(chunk.id == TRI_FACEL2) cout << "\nTRI_FACEL2\n";
if(chunk.id == TRI_FACEL1) cout << "\nTRI_FACEL1\n";
if(chunk.id == TRI_SMOOTH) cout << "\nTRI_SMOOTH\n";
if(chunk.id == TRI_LOCAL) cout << "\nTRI_LOCAL\n";
if(chunk.id == TRI_VISIBLE) cout << "\nTRI_VISIBLE\n";
if(chunk.id != TRI_VERTEXL) _lseek(hfile,chunk.length,SEEK_SET);
else if(chunk.id == TRI_VERTEXL)seek = false;
}
cout << "\nTRI_VERTEXL\n";
_lread(hfile,&nov,sizeof(WORD));
cout << "\n # of vertices: " << nov;
vlist = new VERTEX[nov];
for(int a=0;a
_lread(hfile,&vlistLink
Js
Js
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement