Browse Source

revert some changes

missing 'y' key
missing 4th player
main
Hendrik Langer 8 years ago
parent
commit
bd641045c1
  1. BIN
      sdljpd
  2. 17
      sdljpd.c
  3. BIN
      set_led

BIN
sdljpd

Binary file not shown.

17
sdljpd.c

@ -22,10 +22,10 @@
#include <math.h> #include <math.h>
#include <sys/io.h> #include <sys/io.h>
#include "SDL.h" #include <SDL/SDL.h>
#include "SDL_image.h" #include <SDL/SDL_image.h>
#include "SDL_ttf.h" #include <SDL/SDL_ttf.h>
#include "SDL_mixer.h" #include <SDL/SDL_mixer.h>
/* Define our booleans */ /* Define our booleans */
#define TRUE 1 #define TRUE 1
@ -404,6 +404,7 @@ void draw_sdl (void)
if(solved[countx][county] == 1) strcpy(buf,pl1); if(solved[countx][county] == 1) strcpy(buf,pl1);
if(solved[countx][county] == 2) strcpy(buf,pl2); if(solved[countx][county] == 2) strcpy(buf,pl2);
if(solved[countx][county] == 3) strcpy(buf,pl3); if(solved[countx][county] == 3) strcpy(buf,pl3);
if(solved[countx][county] == 4) strcpy(buf,pl4);
drect.x = (countx*200) + 65; drect.x = (countx*200) + 65;
drect.y = drect.y + 23; drect.y = drect.y + 23;
@ -862,6 +863,14 @@ int main( int argc, char **argv )
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);
lockbz = TRUE;
system("./set_led 0 0 0 0");
enp = FALSE;
inp = TRUE;
break;
/* Show Answer without changing score */
case SDLK_y:
lockbz = TRUE; lockbz = TRUE;
enp = FALSE; enp = FALSE;
inp = TRUE; inp = TRUE;

BIN
set_led

Binary file not shown.
Loading…
Cancel
Save