fork download
  1. #include "DxLib.h"
  2.  
  3. int g_handle;
  4.  
  5. void Init() ;
  6. void Fin() ;
  7.  
  8. int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
  9. {
  10. const int WIDTH = 15;
  11. const int HEIGHT = 15;
  12.  
  13. Init() ;
  14.  
  15. const float scale = 4.0f;
  16. MV1SetScale(g_handle, VGet(scale,scale,scale));
  17.  
  18. while( ProcessMessage() == 0 && CheckHitKey( KEY_INPUT_ESCAPE ) == 0 )
  19. {
  20. ClearDrawScreen() ;
  21.  
  22. const int start = GetNowCount();
  23.  
  24. for( int x = 0; x < WIDTH; x++ ) {
  25. for( int y = 0; y < HEIGHT; y++) {
  26. MV1SetPosition( g_handle, VGet( 320.0f + ((x-WIDTH/2)*50), -300.0f, 600.0f + ((y-HEIGHT/2)*50) ) ) ;
  27. MV1DrawModel(g_handle);
  28. }
  29. }
  30.  
  31. DrawFormatString(0,0,0xffffff,"time : %d", GetNowCount() - start);
  32.  
  33. ScreenFlip() ;
  34. }
  35.  
  36. Fin() ;
  37. return 0;
  38. }
  39.  
  40. void Init()
  41. {
  42. ChangeWindowMode(TRUE);
  43. SetOutApplicationLogValidFlag(FALSE);
  44. SetDoubleStartValidFlag(TRUE);
  45. DxLib_Init();
  46. SetAlwaysRunFlag(TRUE);
  47. SetDrawScreen( DX_SCREEN_BACK );
  48.  
  49. g_handle = MV1LoadModel("先行者(簡易版).pmd");
  50. }
  51.  
  52. void Fin()
  53. {
  54. MV1DeleteModel(g_handle);
  55. DxLib_End();
  56. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty