I have no idea at all as to why it does. It compiles fine in Vc++ 2006 express. My code...
http://www.christiangaming.org/graphics ... iecode.zip
Geme crashes...
The problem was in your event receiver...
Change EventReceiver.h to
Then, in GameCore.h change
MyEventReceiver* events;
to
MyEventReceiver events;
then change
irrDevice->setEventReceiver(events);
to
irrDevice->setEventReceiver(&events);
That should work...
Change EventReceiver.h to
Code: Select all
#include "headers.h"
class MyEventReceiver : public IEventReceiver
{
public:
bool keyEnter;
bool click;
virtual bool OnEvent(SEvent event)
{
if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
{
if(event.KeyInput.Key == irr::KEY_RETURN)
{
if(!keyEnter)
keyEnter = true;
};
};
return false;
};
Then, in GameCore.h change
MyEventReceiver* events;
to
MyEventReceiver events;
then change
irrDevice->setEventReceiver(events);
to
irrDevice->setEventReceiver(&events);
That should work...