Skip to main content
GameDev.net gamedev.net
🔒 Locked

3ds class loader pb...

Started by Soul Wound Jan 31, 2004 at 8:39 AM 1 replies 500+ views
Original Post
Soul Wound
Soul Wound
Hi, I''ve found this 3ds loader but I don''t manage to do work. There is a pb with a type of a virtual class. This is not a big pb but I begin with virtual class and I don''t understand why it doesn''t work. If you have an answer or if you know another code on Dev-C++ to load 3ds object, let me know. Thank for your help.
UltimaX
UltimaX
It''s hard to guess without seeing actual code... How are you using the virtual class? How do you have it setup?

-UltimaX-
Ariel Productions

"You wished for a white christmas... Now go shovel your wishes!"
Soul Wound
Soul Wound
3dsFileLoader.cpp
In member function void

489 3dsFileLoader.cpp
no matching function for call to
C3dsFileLoader::

140 3dsFileLoader.cpp
candidates are: virtual void


here is the ReadViewPortLayout function:

void C3dsFileLoader::ReadViewPortLayout()
{
unsigned short style;
short active, unknow1, swap, unknow2, swap_prior, swap_view;

if (!ReadBlock((char *) &style, sizeof(style)))
return;
if (!ReadBlock((char *) &active, sizeof(active)))
return;
if (!ReadBlock((char *) &unknow1, sizeof(unknow1)))
return;
if (!ReadBlock((char *) &swap, sizeof(swap)))
return;
if (!ReadBlock((char *) &unknow2, sizeof(unknow2)))
return;
if (!ReadBlock((char *) &swap_prior, sizeof(swap_prior)))
return;
if (!ReadBlock((char *) &swap_view, sizeof(swap_view)))
return;
UserViewPortLayout(ViewPortLayout(style, active, unknow1, swap, unknow2, swap_prior, swap_view));
}


The error is on the UserViewPortLayout() call line.

The def of UserViewPortLayout() and ViewPortLayout() are :

void C3dsFileLoader::UserViewPortLayout(ViewPortLayout &Layout)
{
cout << "Style: " << Layout.style << endl;
cout << "Active: " << Layout.active << endl;
cout << "Unknow1: " << Layout.unknow1 << endl;
cout << "Swap: " << Layout.swap<< endl;
cout << "Unknow2: " << Layout.unknow2 << endl;
cout << "Swap Prior: " << Layout.swap_prior << endl;
cout << "Swap View: " << Layout.swap_view << endl;
}

class ViewPortLayout
{
public:
ViewPortLayout(unsigned short Style, short Active, short Unknow1, short Swap,
short Unknow2, short Swap_prior, short Swap_view) : style(Style),
active(Active),
unknow1(Unknow1),
swap(Swap),
unknow2(Unknow2),
swap_prior(Swap_prior),
swap_view(Swap_view) {}
unsigned short style;
short active;
short unknow1;
short swap;
short unknow2;
short swap_prior;
short swap_view;
};


If you have any ideas...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.