#include"DxLib.h"
struct shot{
int x,y,flag;
};
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nShowCmd){
ChangeWindowMode(TRUE);
if(DxLib_Init()==-1) return -1;
int i=0;
char key[256];
int count=0;
int image[16];
GetHitKeyStateAll(key);
LoadDivGraph("char.png",16,4,4,32,32,image);
struct shot tama[10];
SetDrawScreen(DX_SCREEN_BACK);
for(i=0;i<10;i++){
tama.flag=0;
tama.x=640/2; tama.y=480;
}
while(1){
if(ProcessMessage()==-1)break;
ClearDrawScreen();
if(count<5)
count++;
else if(key[KEY_INPUT_RETURN]==1){
count=0;
for(i=0;i<10;i++){
if(tama.flag==0){
tama.flag=1;
break;
}
}
}
for(i=0;i<10;i++){
if(tama.flag==1){
tama.y-=8;
DrawGraph(tama.x,tama.y,image[1],TRUE);
if(tama.y<-32){
tama[i].y=480;
tama[i].flag=0;
}
}
}
if(key[KEY_INPUT_ESCAPE]==1)break;
ScreenFlip();
}
DxLib_End();
return 0;
}実行しても真っ暗でなにも出てきません・・
どこか間違っているらしいのですが・・よく分からないので質問しました。
アドバイスくださるとうれしいです。