fix a few compilation issues
This commit is contained in:
parent
af88db267f
commit
8f1329fed8
@ -166,7 +166,6 @@ Engine::~Engine()
|
||||
{
|
||||
delete it->second;
|
||||
}
|
||||
delete m_fileLoader;
|
||||
if (m_font != NULL)
|
||||
delete m_font;
|
||||
}
|
||||
@ -606,7 +605,7 @@ int Engine::loadModel(const string & name, bool is_static, bool is_reference,
|
||||
|
||||
WFObj * obj = new WFObj();
|
||||
|
||||
if (obj->load(model_path, &::loadFile, &::loadTexture))
|
||||
if (obj->load(model_path.c_str(), &::loadFile, &::loadTexture))
|
||||
{
|
||||
int id = addObject(obj, is_static, is_reference, enable_blending,
|
||||
scale);
|
||||
@ -614,9 +613,10 @@ int Engine::loadModel(const string & name, bool is_static, bool is_reference,
|
||||
if (engine_obj != NULL)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned char *phy_data = loadFile(phys_path, &size);
|
||||
const unsigned char *phy_data =
|
||||
loadFile(phys_path.c_str(), &size);
|
||||
engine_obj->loadPhy(phy_data, size);
|
||||
free(phy_data);
|
||||
free((void *) phy_data);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class Engine
|
||||
|
||||
void setPosition(double x, double y, double z);
|
||||
void getPosition(double * x, double * y, double * z);
|
||||
void loadPhy(unsigned char *data, unsigned int size);
|
||||
void loadPhy(const unsigned char *data, unsigned int size);
|
||||
void instantiatePhy();
|
||||
void setVisible(bool visible) { m_is_visible = visible; }
|
||||
bool getVisible() { return m_is_visible; }
|
||||
|
@ -454,7 +454,7 @@ void Engine::Object::getPosition(double * x, double * y, double * z)
|
||||
*x = *y = *z = 0.0;
|
||||
}
|
||||
|
||||
void Engine::Object::loadPhy(unsigned char *data, unsigned int size)
|
||||
void Engine::Object::loadPhy(const unsigned char *data, unsigned int size)
|
||||
{
|
||||
m_phy = new PhyObj();
|
||||
m_phy->load(data, size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user