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REEN_OK || DxLib_Init() == -1 ) return -1; //ウィンドウ化と初期化処理
Ghandoru = LoadGraph( "aka.png" );
ghandoru = LoadGraph( "ao.png" );
SetDrawScreen( DX_SCREEN_BACK ) ; //描画先を裏画面に設定
while(!ProcessMessage() && !ClearDrawScreen()){
//↑メッセージ処理 ↑画面をクリア ↑キーボード入力状態取得 ↑ESCが押されると終了
/*白い壁を描画*/
for(i=0;i<15;i++){
for(j=0;j<20;j++){
if(hantei[i][j]==1){
DrawGraph( j*32,i*32 , Ghandoru, TRUE );
}
else if(hantei[i][j]==2){
DrawGraph( j*32 ,i*32 , ghandoru, TRUE );
}
}
}
ScreenFlip();
}
DxLib_End();
return 0;
}