過去の掲示板もいろいろ拝見させていただいたのですが解決できませんでした。
プログラムに関しては初心者です。
どうかご教授ください。
よろしくお願い致します。
#include <string>
#include <list>
#include <map>
#include <algorithm>
#include "DxLib.h"
#include <time.h>
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){
ChangeWindowMode( TRUE ); // ウィンドウモードに設定
DxLib_Init(); // DXライブラリ初期化処理
SetDrawScreen( DX_SCREEN_BACK );
int Cr;
int leinx=90,leiny=430;
int i=0;
int Numtama=0;
int Maxtama=25;
int Wait;
int tama[3][30];
int Handle00; // 画像格納用ハンドル
// 動画のロードと描画
Handle00 = LoadGraph( "amazarashi.avi" );
PlayMovieToGraph( Handle00 ) ;
Wait=GetRand(5);
for(int i=0;i<10;i++){
tama[0][i]=0;
tama[1][i]=-1;
tama[2][i]=0;
}
// ループ処理
while(ScreenFlip()==0&&ProcessMessage()==0&&ClearDrawScreen()==0 && GetMovieStateToGraph( Handle00 ) == 1){
// ムービー映像を画面いっぱいに描画します
DrawExtendGraph( 200 , 50 , 540 , 380 , Handle00 , FALSE ) ;
if(Wait<=0){
for(int i=0;i<10;i++){
if(tama[0][i]==0){
tama[0][i]=1;
tama[1][i]=1+GetRand(4);
tama[2][i]=0;
Numtama++;
Wait=5+GetRand(5);
break;
}
}
}
for(int i=0;i<10;i++){
if(tama[0][i]==1){
DrawLine(70+tama[1][i]*30,tama[2][i],100+tama[1][i]*30,tama[2][i],GetColor(0,252,0));
tama[2][i]+=5;
}
if(tama[2][i]>=430){
tama[0][i]=0;
}
}
Wait--;
Cr = GetColor( 255 , 255 , 255 ); // 白色の値を取得y480x640
DrawLine(100 , 0, 100,480 , Cr);
DrawLine(130 , 0, 130,480 , Cr);
DrawLine(160 , 0, 160,480 , Cr);
DrawLine(190 , 0, 190,480 , Cr);
DrawLine(220 , 0, 220,480 , Cr);
DrawLine(250 , 0, 250,480 , Cr);
Cr = GetColor( 255 , 0 , 0 ) ; // 判定ライン
DrawLine(260 ,430, leinx , leiny, Cr ) ;
//もしZキーかつ判定ラインにtamaが当たっていたら
if( CheckHitKey( KEY_INPUT_Z ) == 1 || (leinx > tama[1][i] && leinx < tama[2][i] &&leiny > tama[1][i] &&leiny < tama[2][i]))
{
Cr = GetColor( 255 , 255 , 255 ) ;
// 文字列の描画
DrawString( 20 , 100 - 32 , "GOOD!" , Cr );
}
ScreenFlip(); //裏画面を表画面に反映
}
DxLib_End(); // 後処理
return 0;
}