Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.54 KB | None | 0 0
  1. #include "DxLib.h"
  2. #include "key.h"
  3. #include "player2.h"
  4. #include "talk.h"
  5.  
  6.  
  7.  
  8. int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  9. {
  10.    
  11.     SetGraphMode(780, 680, 32);         // ウィンドウの大きさを指定
  12.     ChangeWindowMode(TRUE);             // 全画面ではなくウインドウを使用
  13.     if (DxLib_Init() == -1) return -1;  // DXライブラリ初期化処理
  14.     SetDrawScreen(DX_SCREEN_BACK);      // 裏画面を使用する設定
  15.  
  16.     // ウインドウのサイズを手動ではできず、且つウインドウのサイズに合わせて拡大もしないようにする
  17.     SetWindowSizeChangeEnableFlag(FALSE, FALSE);
  18.  
  19.     // 画面サイズは最大の780*680にしておく
  20.     SetGraphMode(780, 680, 32);
  21.    
  22.  
  23.     // 最初は 640x480 にしておく
  24.    
  25.     SetWindowSize(780, 680);
  26.     battle_Initialize();//バトルのために読み込む画像
  27.    
  28.  
  29.  
  30.     while (ProcessMessage() == 0) {
  31.         gpUpdateKey();
  32.        
  33.         //int gpUpdateKey();  // キーの入力状態を取得
  34.         if (Seen == 0) { talkUpdate(); }
  35.        
  36.         if (Seen == 1) {
  37.             Player_Update();
  38.         }
  39.  
  40.         //これより以下は描画するためのプログラム
  41.         ClearDrawScreen();  // 裏画面を
  42.  
  43.         if (Seen == 0) { talkdrow(); }
  44.         if (Seen == 1) { Player_Draw(); }
  45.  
  46.         DrawFormatString(250, 400, GetColor(255, 255, 0), "talkは%d",talk);
  47.         DrawFormatString(300, 450, GetColor(255, 255, 0), "startは%d", start);
  48.        
  49.         ScreenFlip();  // 裏画面を表画面に反映
  50.     }
  51.  
  52.  
  53.     DxLib_End();  // DXライブラリ使用の終了処理
  54.     return 0;  // ソフトの終了
  55.  
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement