int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { MSG msg; if ( !_GameMode(hInstance, nCmdShow, 640, 480, 32) ) return FALSE; SpriteImage = DDLoadBitmap( DirectOBJ, "sprite_char.BMP", 0, 0 ); BackGround = DDLoadBitmap( DirectOBJ, "sprite_back.BMP", 0, 0 ); DDSetColorKey( SpriteImage, RGB(0,0,0) ); SetTimer(MainHwnd, 1, 5, _GameProc); while ( !_GetKeyState(VK_ESCAPE) ) { if ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) { if ( !GetMessage(&msg, NULL, 0, 0) ) return msg.wParam; TranslateMessage( &msg ); DispatchMessage( &msg ); } } DestroyWindow( MainHwnd ); return TRUE; }
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; if (!_GameMode(hInstance, nCmdShow, 1280, 720, 32, false)) return FALSE; CommInit(NULL, NULL); //±×·¡ÇÈ ÃʱâÈ ResourceImage[0] = DDLoadBitmap(DirectOBJ, "DATA//end1.BMP", 0, 0, SYSTEM); ResourceImage[1] = DDLoadBitmap(DirectOBJ, "DATA//win.BMP", 0, 0, SYSTEM); ResourceImage[2] = DDLoadBitmap(DirectOBJ, "DATA//Choice.BMP", 0, 0, SYSTEM); ResourceImage[3] = DDLoadBitmap(DirectOBJ, "DATA//Money.BMP", 0, 0,SYSTEM); ResourceImage[4] = DDLoadBitmap(DirectOBJ, "DATA//Sonmogazi.BMP", 0, 0, SYSTEM); ResourceImage[5] = DDLoadBitmap(DirectOBJ, "DATA//Button.BMP", 0, 0, SYSTEM); ResourceImage[6] = DDLoadBitmap(DirectOBJ, "DATA//ZokBo.BMP", 0, 0, SYSTEM); ResourceImage[7] = DDLoadBitmap(DirectOBJ, "DATA//Texts.BMP", 0, 0, SYSTEM); ResourceImage[8] = DDLoadBitmap(DirectOBJ, "DATA//Stop.BMP", 0, 0, SYSTEM); ResourceImage[9] = DDLoadBitmap(DirectOBJ, "DATA//Back.BMP", 0, 0, SYSTEM); ResourceImage[10] = DDLoadBitmap(DirectOBJ, "DATA//main.bmp", 0, 0, SYSTEM); DDSetColorKey(ResourceImage[0], BLACK); DDSetColorKey(ResourceImage[1], BLACK); DDSetColorKey(ResourceImage[2], BLACK); DDSetColorKey(ResourceImage[3], BLACK); DDSetColorKey(ResourceImage[4], BLACK); DDSetColorKey(ResourceImage[5], BLACK); DDSetColorKey(ResourceImage[6], BLACK); DDSetColorKey(ResourceImage[7], BLACK); DDSetColorKey(ResourceImage[8], BLACK); DDSetColorKey(ResourceImage[9], BLACK); DDSetColorKey(ResourceImage[10], BLACK); //À½Çâ ÃʱâÈ if (SoundCard) { Sound[0] = SndObjCreate(SoundOBJ, "Sound//OST.WAV", 1); Sound[1] = SndObjCreate(SoundOBJ, "Sound//¹ØÀ廩±â.WAV", 1); Sound[2] = SndObjCreate(SoundOBJ, "Sound//Select3.WAV", 1); //Sound[3] = SndObjCreate(SoundOBJ, "Sound//Check.WAV", 1); //Sound[4] = SndObjCreate(SoundOBJ, "Sound//Start.WAV", 1); //3,4¹ø Àç»ýÀÌ ¾ÈµÊ. ÀÌÀ¯´Â ¸ð¸§.. } turn = 0; randomize(); Pae(); CommSend(); PlaySound("Sound//OST.WAV", NULL, SND_ASYNC); SetTimer(MainHwnd, 1, 10, NULL); // Main message loop while (GetMessage(&msg, NULL, 0, 0)){ TranslateMessage(&msg); DispatchMessage(&msg); } DestroyWindow(MainHwnd); return TRUE; }