09/07/03 01:10:05
>>468
#include "DxLib.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
int cmd[] = { KEY_INPUT_UP, KEY_INPUT_UP, KEY_INPUT_DOWN, KEY_INPUT_DOWN,
KEY_INPUT_LEFT, KEY_INPUT_RIGHT, KEY_INPUT_LEFT, KEY_INPUT_RIGHT,
KEY_INPUT_B, KEY_INPUT_A };
int key, cnt, num;
ChangeWindowMode(TRUE);
DxLib_Init();
DrawString(5, 5, "Waiting for your namco command...", GetColor(0xFF, 0xFF, 0xFF));
cnt = 0;
num = sizeof(cmd) / sizeof(int);
while(key = WaitKey()){
if(cmd[cnt] == key) cnt++;
else cnt = 0;
if(cnt >= num) break;
}
DrawString(5, 30, "Your namco command was accepted! Press any key to exit.", GetColor(0xFF, 0xFF, 0xFF));
WaitKey();
DxLib_End();
return 0;
}