現在はこんな状況です。
#include "DxLib.h"
int GetHitKeyStateAll_2(int KeyStateBuf[]){
char GetHitKeyStateAll_Key[256];
GetHitKeyStateAll( GetHitKeyStateAll_Key );
for(int i=0;i<256;i++){
if(GetHitKeyStateAll_Key==1) KeyStateBuf++;
else KeyStateBuf=0;
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
ChangeWindowMode(TRUE);
SetMainWindowText("TETRIS");
SetGraphMode( 400 , 320 , 32 ) ;
DxLib_Init();
SetDrawScreen(DX_SCREEN_BACK);
//色
int WHITE=GetColor(255,255,255);
int BLACK=GetColor(0,0,0);
int BLUE=GetColor(0,0,255);
//主要変数
int Key[256];
int i,j,count;
int Map[22][15]={
{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,0,0,0,0,0,0,0,0,0,0,0,0,0,2},
{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},
};
while(ProcessMessage()==0 && ClearDrawScreen()==0 && CheckHitKey(KEY_INPUT_ESCAPE)==0 && GetHitKeyStateAll_2(Key)==0){
for(i=0;i<15;i++){
for(j=0;j<22;j++){
if(Map[j]==0){
DrawBox(5+i*15,j*15-10,20+i*15,5+j*15,BLACK,TRUE);
}
if(Map[j]==1){
DrawBox(5+i*15,j*15-10,20+i*15,5+j*15,WHITE,FALSE);
}
if(Map[j]==2){
DrawBox(5+i*15,j*15-10,20+i*15,5+j*15,WHITE,TRUE);
}
}
}
ScreenFlip();
}
DxLib_End();
return 0;
}
これから先、どんな感じに作ったらいいのか参考になるURLを教えてください。
探してみましたがなかなか見つからないので・・・
回答お願いします。
