added visible playfield size to tape structure (not used yet)
authorHolger Schemel <info@artsoft.org>
Wed, 30 Dec 2020 20:45:30 +0000 (21:45 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 30 Dec 2020 20:45:30 +0000 (21:45 +0100)
src/files.c
src/game.c
src/tape.h

index 271e428395d6a30d2d832fe6f0ff5aaed6c12d1b..4d2c8c45c7a577336b31ccbe97c72f146e73ecfe 100644 (file)
@@ -7628,6 +7628,9 @@ static void setTapeInfoToDefaults(void)
   tape.playing = FALSE;
   tape.pausing = FALSE;
 
+  tape.scr_fieldx = SCR_FIELDX_DEFAULT;
+  tape.scr_fieldy = SCR_FIELDY_DEFAULT;
+
   tape.no_valid_file = FALSE;
 }
 
index cb107f0e8e7aa0803b5240eab1acdfd89fe1597b..768ba2e181da6890c0e58287750b3ae09dbcbca7 100644 (file)
@@ -3576,11 +3576,15 @@ void InitGame(void)
   InitGameEngine();
   InitGameControlValues();
 
-  // initialize tape actions from game when recording tape
   if (tape.recording)
   {
+    // initialize tape actions from game when recording tape
     tape.use_key_actions   = game.use_key_actions;
     tape.use_mouse_actions = game.use_mouse_actions;
+
+    // initialize visible playfield size when recording tape (for team mode)
+    tape.scr_fieldx = SCR_FIELDX;
+    tape.scr_fieldy = SCR_FIELDY;
   }
 
   // don't play tapes over network
index 53065bf12b2e444b161a2891d70b6f82125b80eb..332de217e6058ae9596c86727e1b8acfaa1263be 100644 (file)
@@ -211,6 +211,10 @@ struct TapeInfo
   // bits to indicate which tape properties are stored in this tape
   byte property_bits;
 
+  // visible playfield size when recording this tape (for team mode)
+  int scr_fieldx;
+  int scr_fieldy;
+
   struct
   {
     byte action[MAX_TAPE_ACTIONS];