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