From: Holger Schemel Date: Wed, 30 Dec 2020 20:45:30 +0000 (+0100) Subject: added visible playfield size to tape structure (not used yet) X-Git-Tag: 4.2.2.1~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d01d29a15999bd483df3c1a1a8d3564136a0a208;p=rocksndiamonds.git added visible playfield size to tape structure (not used yet) --- diff --git a/src/files.c b/src/files.c index 271e4283..4d2c8c45 100644 --- a/src/files.c +++ b/src/files.c @@ -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; } diff --git a/src/game.c b/src/game.c index cb107f0e..768ba2e1 100644 --- a/src/game.c +++ b/src/game.c @@ -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 diff --git a/src/tape.h b/src/tape.h index 53065bf1..332de217 100644 --- a/src/tape.h +++ b/src/tape.h @@ -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];