| 
//#ifdef WIN32
//	int WINAPI WinMain(
//		HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR strCmdLine, int nShowCmd)
//#else
//	int main()
//#endif
int SDL_main(int argc, char* argv[])
{
	IrrlichtDevice *device = createDeviceSDL(
		EDT_OPENGL,dimension2d<s32>(320,240),16,false,false,false,0,0);
	device->setWindowCaption(L"Irrlicht");//ウインドウタイトル設定
	IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr  = device->getSceneManager();
	//ジョイスティック初期化
	SDL_Joystick* joystick0 = joystick_init(0);
	DrawInit(device, driver);
	while(device->run())
	{
		driver->beginScene(true, true, 0xFF6060FF);
		//キー処理
		keyFunc(device);
		//図形作成
		makeScene(driver);
		//シーンの描画
		smgr->drawAll();
		driver->endScene();
	}
	device->drop();
	//ジョイスティック終了
	joystick_close(joystick0);
	return 0;
}
 |