没有编译器错误,这是我按下按键的地方:
while (handle_keys()) {
Sleep(20);
Bkey_GetKeyWait(key1, key2, KEYWAIT_HALTOFF_TIMEROFF, 0, 1, & unused);
fill_old_squares();
ball_update();
angle += 1;
ball_draw(WHITE);
draw_stars();
Bdisp_PutDisp_DD();
}
这就是我处理按键的地方:
int handle_keys() {
if (key1 == 3 && key2 == 2) { //EXE key
ball_jump();
} else if (key1 == 4 && key2 == 8) { //EXIT key
return FALSE;
} else if (key1 == 4 && key2 == 9) { //MENU key
return FALSE;
}
key1 = key2 = 0;
return TRUE;
}
它说:TARGET = 00000000 PC = 00000001
答案 0 :(得分:1)
BKey_GetKeyWait函数将int引用作为前2个参数。 如果key1和key2是正常的整数,则需要从以下位置更改:
Bkey_GetKeyWait(key1, key2, KEYWAIT_HALTOFF_TIMEROFF, 0, 1, & unused);
为:
Bkey_GetKeyWait(&key1, &key2, KEYWAIT_HALTOFF_TIMEROFF, 0, 1, & unused);