無題
Posted: 2010年1月19日(火) 07:28
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; // ウインドウモードに変更
if( DxLib_Init() == -1 ) return -1; // DXライブラリ初期化処理 エラーが起きたら終了
WaitKey() ; // キーの入力待ち(『WaitKey』を使用)
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}
に、
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
int image[16];
char Key[256];
if( ChangeWindowMode(TRUE) != DX_CHANGESCREEN_OK || DxLib_Init() == -1 ) return -1; //ウィンドウ化と初期化処理
SetDrawScreen( DX_SCREEN_BACK ) ; //描画先を裏画面に設定
LoadDivGraph( "char.png" , 16 , 4 , 4 , 32 , 32 , image );//画像を分割してimage配列に保存
while(!ProcessMessage() && !ClearDrawScreen() && !GetHitKeyStateAll( Key ) && !Key[KEY_INPUT_ESCAPE]){
//↑メッセージ処理 ↑画面をクリア ↑キーボード入力状態取得 ↑ESCが押されると終了
DrawGraph( 320 , 240 , image[12] , TRUE ) ;//[12]の画像を描画
ScreenFlip();//裏画面を表画面に反映
}
DxLib_End();
return 0;
}
を加えたいのですが、
どこをコピーしてどこにつければいいのですか?
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; // ウインドウモードに変更
if( DxLib_Init() == -1 ) return -1; // DXライブラリ初期化処理 エラーが起きたら終了
WaitKey() ; // キーの入力待ち(『WaitKey』を使用)
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}
に、
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
int image[16];
char Key[256];
if( ChangeWindowMode(TRUE) != DX_CHANGESCREEN_OK || DxLib_Init() == -1 ) return -1; //ウィンドウ化と初期化処理
SetDrawScreen( DX_SCREEN_BACK ) ; //描画先を裏画面に設定
LoadDivGraph( "char.png" , 16 , 4 , 4 , 32 , 32 , image );//画像を分割してimage配列に保存
while(!ProcessMessage() && !ClearDrawScreen() && !GetHitKeyStateAll( Key ) && !Key[KEY_INPUT_ESCAPE]){
//↑メッセージ処理 ↑画面をクリア ↑キーボード入力状態取得 ↑ESCが押されると終了
DrawGraph( 320 , 240 , image[12] , TRUE ) ;//[12]の画像を描画
ScreenFlip();//裏画面を表画面に反映
}
DxLib_End();
return 0;
}
を加えたいのですが、
どこをコピーしてどこにつければいいのですか?