Exemplo n.º 1
0
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
	int test1;
	if(DxLib_Init() == -1) return -1;
	
	BGM = LoadSoundMem("kbc.wav");
	test1 = PlaySoundMem(BGM,DX_PLAYTYPE_NORMAL);
	
	while(ProcessMessage() != -1 && CheckHitKeyAll() == 0 ){
		if(test1 == -1)LoadGraphScreen( BGM , 0 , "0120.bmp" , true);
		if(BGM == -1)LoadGraphScreen( BGM , 100 , "0120.bmp" , true);
	}
	
	DxLib_End() ;
	return 0;
}
Exemplo n.º 2
0
void Weapon_Draw(){
	//武器画像の表示
	LoadGraphScreen(0, 0, "hand.jpg", TRUE);
	LoadGraphScreen(300, 330, "machine2.jpg", TRUE);
	LoadGraphScreen(0, 450, "sniper.jpg", TRUE);
	LoadGraphScreen(300, 450, "shotgun.jpg", TRUE);
	//DrawFormatString(0, 120, BLACK, "%d", weapon_flag);
	//DrawFormatString(0, 120, BLACK, "%d", weapon_select);


	DrawStringToHandle(300, 5, "使いたい武器の番号を", RED, font_handle);
	DrawStringToHandle(300, 35, "キーボードで入力してください", RED, font_handle);
	DrawStringToHandle(260, 420, "�@", BLACK, font_handle2);
	DrawStringToHandle(310, 420, "�A", BLACK, font_handle2);
	DrawStringToHandle(260, 450, "�B", BLACK, font_handle2);
	DrawStringToHandle(310, 450, "�C", BLACK, font_handle2);

	DrawStringToHandle(300, 85, "Aさんが選んだ武器は", RED, font_handle);
	DrawFormatStringToHandle(360, 115, RED, font_handle, "%sです", chara_select_weapon);
	DrawStringToHandle(300, 145, "Bさんが選んだ武器は", RED, font_handle);
	DrawFormatStringToHandle(360, 175, RED, font_handle, "%sです", enemy_select_weapon);
}
Exemplo n.º 3
0
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
				 LPSTR lpCmdLine, int nCmdShow )
{
	if( DxLib_Init() == -1 )	// DXライブラリ初期化処理
	{
		 return -1;				// エラーが起きたら直ちに終了
	}

	// BMP画像の表示
	LoadGraphScreen( 0 , 0 , "test1.bmp" , TRUE ) ;

	WaitKey() ;					// キーの入力待ち((7-3)『WaitKey』を使用)

	DxLib_End() ;				// DXライブラリ使用の終了処理

	return 0 ;					// ソフトの終了
}
Exemplo n.º 4
0
// WinMain関数
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
	int x , y ;

	// DXライブラリ初期化処理
	if( DxLib_Init() == -1 ) return -1;

	// 描画先画面を裏画面にする
	SetDrawScreen( DX_SCREEN_BACK ) ;

	x = 0 ; y = 0 ; 
	while( 1 )
	{
		// 画面に描かれているものをすべて消す
		ClearDrawScreen() ;

		// 上下左右のキー入力に対応して x, y の座標値を変更する
		if( CheckHitKey( KEY_INPUT_LEFT ) == 1 ) x -= 8 ;
		if( CheckHitKey( KEY_INPUT_RIGHT ) == 1 ) x += 8 ;
		if( CheckHitKey( KEY_INPUT_UP ) == 1 ) y -= 8 ;
		if( CheckHitKey( KEY_INPUT_DOWN ) == 1 ) y += 8 ;

		// x , y が示す画面座標にBMP画像 test1.bmp を描画する
		LoadGraphScreen( x , y , "エレキシューター.bmp" , TRUE ) ;

		// 裏画面の内容を表画面に反映させる
		ScreenFlip() ;

		// 待たないと処理が早すぎるのでここで20ミリ秒待つ
		WaitTimer( 20 ) ;

		// Windows システムからくる情報を処理する
		if( ProcessMessage() == -1 ) break ;

		// ESCキーが押されたらループから抜ける
		if( CheckHitKey( KEY_INPUT_ESCAPE ) == 1 ) break ;
	}

	// DXライブラリ使用の終了処理
	DxLib_End() ;

	// ソフトの終了
	return 0 ;
}