C/C++の宿題片付けます 128代目
at TECH
486:デフォルトの名無しさん
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;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5079日前に更新/375 KB
担当:undef