void ListRequestWindow::draw(void){
	windowDraw();
	SetDrawArea( xPosition, yPosition + 1 , getxPosition2(), getyPosition2() - 2 );
	for( unsigned int i = 0; i < item.size(); i++ ){
		item[i]->draw();
	}
	SetDrawArea( 0, 0, 640, 480 );
	drawSelectAttachItem( item[getNowSelectItem()]->getItemSize() );
}
void Scene_Battle::DrawBG() const{
	// マップ画面の描画
	if(g_temp.hBGHandle != -1){
		DrawGraph(0, 0, g_temp.hBGHandle, 0);
	}
	// 枠
	float rate;
	if(SceneIsReserved()){
		rate = 1.00*(BATTLE_END_TIME-reservedCount)/BATTLE_END_TIME;
	}else{
		rate = 1.00*sceneTime/BATTLE_START_TIME;
	}
	rate = max(0.01, min(1.0, rate));

	int l, r, t, b;
	l = (WND_WIDTH-BATTLE_WINDOW_WIDTH)/2;
	t = BATTLE_WINDOW_CY-rate*BATTLE_WINDOW_HEIGHT/2;
	r = (WND_WIDTH+BATTLE_WINDOW_WIDTH)/2;
	b = BATTLE_WINDOW_CY+rate*BATTLE_WINDOW_HEIGHT/2;
	DrawBox(
		l-2, t-2, r+2, b+2,
		GetColor(255,255,255), 1);
	DrawBox(
		l, t, r, b,
		GetColor(0, 0, 0), 1);

	// DrawBox(0, 0, WND_WIDTH, WND_HEIGHT, 0x000000ff, 1);
	SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 255);
	// 背景描画エリアの限定
	SetDrawArea(l, t, r, b);

	// エフェクト背景の描画
	bgEffect.Draw();

}
Exemple #3
0
/* Called when a DrawingArea has input (either mouse or keyboard).
 */
static void _do_input(Widget w, void *data, XADCS *call_data)
{
  char *input;
  DrawInfo *di = (DrawInfo *) data;

  SetDrawArea(w);
  if (call_data->event->type == ButtonPress)
   {
     if (di->button_down)
       di->button_down(w, call_data->event->xbutton.button,
                       call_data->event->xbutton.x,call_data->event->xbutton.y,
                       di->user_data);
   }
  else if (call_data->event->type == ButtonRelease)
   {
     if (di->button_up)
       di->button_up(w, call_data->event->xbutton.button,
                     call_data->event->xbutton.x, call_data->event->xbutton.y,
                     di->user_data);
   }
  else if (call_data->event->type == KeyPress)
   {
     input = TranslateKeyCode(call_data->event);

     if (input && *input != '\0' && di->keypress)
       di->keypress(w, input, 0, di->user_data);
   }
  else if (call_data->event->type == KeyRelease)
   {
     input = TranslateKeyCode(call_data->event);

     if (input && *input != '\0' && di->keypress)
       di->keypress(w, input, 1, di->user_data);
   }
}
Exemple #4
0
void Effect_DescapePreEnd_RightPic::draw_over() {
	SetDrawArea(ShootingScreenRightX, 0, ScreenSizeX, ScreenSizeY);//描画範囲を右画面だけに
	int size_x;
	int size_y;
	BlendModeManager::get().ChangeDrawBlendMode(DX_BLENDMODE_ALPHA, 50 - time_by_gene / 4);//アルファブレンドに変更
	GetGraphSize(got_graphic_handle, &size_x, &size_y);

	DrawRotaGraph(x + size_x / 2, y + size_y / 2, extend_rate, 0, got_graphic_handle, 1);
	DrawRotaGraph(x + size_x / 2, y + size_y / 2, pre_extend_rate[2], 0, got_graphic_handle, 1);
	DrawRotaGraph(x + size_x / 2, y + size_y / 2, pre_extend_rate[4], 0, got_graphic_handle, 1);


	BlendModeManager::get().ChangeToPreDrawBlendMode();//ブレンドモードを元に戻す
	SetDrawArea(0, 0, ScreenSizeX, ScreenSizeY);//描画範囲を全体に戻す

												//	printfDx("descapeeffect draw\n");
}
Exemple #5
0
static void _do_motion(Widget w, void *data,  XADCS *call_data)
{
  DrawInfo *di = (DrawInfo *) data;

  SetDrawArea(w);
  if (di->motion)
    di->motion(w, call_data->event->xmotion.x,  call_data->event->xmotion.y,
               di->user_data);
}
Exemple #6
0
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int){
	SetMainWindowText("Give Me Wing");
	SetOutApplicationLogValidFlag(FALSE);
	ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen( DX_SCREEN_BACK ); //ウィンドウモード変更と初期化と裏画面設定   

	font_db.LoadFontData();	//画像ファイルのロード
	img_db.LoadImgData();
	sound_db.LoadSoundData();

	Fps fps;
	GameLoop loop;
	bool game_start = FALSE;

	while( ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0 ){
		input.Update();	//キーボード情報の更新
		fps.Update();

		// ↓ 処理本体をここに書く ↓

		if(!game_start){
			game_start = TRUE;
		}
		
		if(game_start){
			if(loop.Loop() == 1) break;
		}

		SetDrawArea(GAME_X,GAME_Y,GAME_X+GAME_WIDTH,GAME_Y+GAME_HEIGHT);//描画エリアをゲーム範囲に設定
		efect.Update();
		SetDrawArea(0,0,WINDOWSIZE_X,WINDOWSIZE_Y);	//描画エリアを元に戻す

		// ↑ 処理本体をここに書く ↑

		fps.Draw();
		fps.Wait();			//fps制御
	}
	
	DxLib_End();	//終了処理
	return 0;
}
Exemple #7
0
void CONTROL::All(){
	SetDrawArea(MARGIN, MARGIN, MARGIN + WIDTH, MARGIN + HEIGHT);
	back -> All();
	player->All();

	if( enemy != NULL ){
		if( enemy -> All() ){
			delete enemy;
			enemy = NULL;
		}
	}
	++g_count;
}
Exemple #8
0
void p13(void) {
	SetDrawScreen(DX_SCREEN_BACK);
	char keybuf[256];
	int img;

	int i = 0;
	img = LoadGraph("pic11.png");

	while (ProcessMessage() == 0 && GetHitKeyStateAll(keybuf) == 0 && keybuf[KEY_INPUT_ESCAPE] == 0) {
		ClearDrawScreen();

		SetDrawArea(320 - 80, 240 - 80, 320 + 80, 240 + 80);
		DrawRotaGraph(320, 240, 2.0, - PI / 180.0 * i, img, TRUE);
		DrawCircle(320, 240, 5, GetColor(255, 0, 0), TRUE);
		SetDrawArea(0, 0, 640, 480);
		DrawBox(320 - 81, 240 - 81, 320 + 81, 240 + 81, GetColor(255, 0, 0), FALSE);

		ScreenFlip();

		i++;
	}

}
Exemple #9
0
/* Called when a DrawingArea is resized.
 */
static void _resize(Widget w, void *data, XADCS *call_data)
{
  int new_width, new_height;
  DrawInfo *di = (DrawInfo *) data;

  if (call_data->event->xexpose.count != 0) /* Wait until last expose event */
    return;

  SetDrawArea(w);
  GetDrawAreaSize(&new_width, &new_height);   /* get the new draw area size */

  if (di->redisplay)
    di->redisplay(w, new_width, new_height, di->user_data);
}