|
|
@ -739,6 +739,7 @@ int main( int argc, char **argv ) |
|
|
|
SDL_WM_ToggleFullScreen( surface ); |
|
|
|
break; |
|
|
|
|
|
|
|
/* Player left */ |
|
|
|
case SDLK_a: |
|
|
|
if(plselect >0){ |
|
|
|
plselect --;} |
|
|
@ -746,6 +747,7 @@ int main( int argc, char **argv ) |
|
|
|
inp = FALSE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Player right */ |
|
|
|
case SDLK_d: |
|
|
|
if(plselect <2){ |
|
|
|
plselect ++;} |
|
|
@ -753,12 +755,14 @@ int main( int argc, char **argv ) |
|
|
|
inp = FALSE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Score Add 100 */ |
|
|
|
case SDLK_w: |
|
|
|
score[plselect] = score[plselect] + 100; |
|
|
|
enp = FALSE; |
|
|
|
inp = FALSE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Score Subtract 100 */ |
|
|
|
case SDLK_s: |
|
|
|
score[plselect] = score[plselect] - 100; |
|
|
|
enp = FALSE; |
|
|
@ -807,6 +811,7 @@ int main( int argc, char **argv ) |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
/* Right Answer */ |
|
|
|
case SDLK_INSERT: |
|
|
|
score[plselect]=score[plselect]+pkt[ypos]; |
|
|
|
solved[xpos][ypos] = (plselect + 1); |
|
|
@ -815,6 +820,7 @@ int main( int argc, char **argv ) |
|
|
|
inp = TRUE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Wrong Answer */ |
|
|
|
case SDLK_DELETE: |
|
|
|
score[plselect]=score[plselect]-pkt[ypos]; |
|
|
|
lockbz = FALSE; |
|
|
@ -822,21 +828,26 @@ int main( int argc, char **argv ) |
|
|
|
enp = TRUE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Mark solved */ |
|
|
|
case SDLK_PAGEUP: |
|
|
|
solved[xpos][ypos] = (plselect + 1); |
|
|
|
break; |
|
|
|
|
|
|
|
/* Mark unsolved */ |
|
|
|
case SDLK_PAGEDOWN: |
|
|
|
solved[xpos][ypos] = 0; |
|
|
|
|
|
|
|
/* Lock Buzzers */ |
|
|
|
case SDLK_l: |
|
|
|
lockbz = TRUE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Unlock Buzzers */ |
|
|
|
case SDLK_u: |
|
|
|
lockbz = FALSE; |
|
|
|
break; |
|
|
|
|
|
|
|
/* Reset playing field */ |
|
|
|
case SDLK_r: |
|
|
|
lockbz = FALSE; |
|
|
|
inp = FALSE; |
|
|
|