rnd-20041001-1-src
[rocksndiamonds.git] / src / game_em / input.c
index a6ddcfab8bd49694846bc46ec6e9bf3703dce69f..f04718f7e4a5b19000c457551d1355ee342cd2ec 100644 (file)
@@ -24,6 +24,9 @@ unsigned short **Draw;
 static unsigned short *Index[4][HEIGHT];
 static unsigned short Array[4][HEIGHT][WIDTH];
 
+extern unsigned int screen_x;
+extern unsigned int screen_y;
+
 void game_init_vars(void)
 {
   int x, y;
@@ -86,6 +89,8 @@ void GameActions_EM(byte action)
 
   readjoy(action);
 
+  UpdateEngineValues(screen_x / TILEX, screen_y / TILEY);
+
   if (frame == 7)
   {
     synchro_1();
@@ -124,6 +129,7 @@ void readjoy(byte action)
   if (action & JOY_BUTTON_1)
     fire = 1;
 
+#if 1
   ply1.joy_fire = fire;
   if (ply1.joy_stick || (north | east | south | west))
   {
@@ -132,4 +138,14 @@ void readjoy(byte action)
     ply1.joy_s = south;
     ply1.joy_w = west;
   }
+#else
+  ply2.joy_fire = fire;
+  if (ply2.joy_stick || (north | east | south | west))
+  {
+    ply2.joy_n = north;
+    ply2.joy_e = east;
+    ply2.joy_s = south;
+    ply2.joy_w = west;
+  }
+#endif
 }