shithub: choc

Download patch

ref: 425b850cd5c7685ecccb588acf93dd47b30f91e1
parent: 9c76e770d6104b0d23a28d228715dc4cd9f84722
author: Thomas A. Birkel <capnclever@gmail.com>
date: Thu Oct 20 06:51:46 EDT 2016

Update branch with requested changes, second pass

Improve comments and parameter descriptions, use M_ParmExists()
instead of M_CheckParam().

--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -1034,7 +1034,7 @@
     //!
     // @category demo
     //
-    // Record a high turning resolution demo.
+    // Record or playback a demo with high resolution turning.
     //
 
     longtics = M_ParmExists("-longtics");
@@ -1042,8 +1042,8 @@
     //!
     // @category demo
     //
-    // Demo records and plays back without automatically quitting
-    // after level exit.
+    // Record or playback a demo without automatically quitting
+    // after either level exit or player respawn.
     //
 
     demoextend = M_ParmExists("-demoextend");
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -170,8 +170,8 @@
 
     // Are we recording a demo? Possibly set lowres turn mode
 
-    connect_data->lowres_turn = M_CheckParm("-record") > 0
-                             && M_CheckParm("-longtics") == 0;
+    connect_data->lowres_turn = M_ParmExists("-record")
+                            && !M_ParmExists("-longtics");
 
     // Read checksums of our WAD directory and dehacked information
 
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -112,7 +112,7 @@
 boolean demorecording;
 boolean longtics;
 boolean lowres_turn;
-boolean shortticfix;        // properly calculates lowres turns like in doom
+boolean shortticfix;            // calculate lowres turning like doom
 boolean demoplayback;
 boolean demoextend;
 byte *demobuffer, *demo_p, *demoend;
@@ -1746,9 +1746,9 @@
     //!
     // @category demo
     //
-    // Smooths out low turning resolution when recording a demo.
+    // Smooth out low resolution turning when recording a demo.
     //
-    shortticfix = M_CheckParm("-shortticfix") != 0;
+    shortticfix = M_ParmExists("-shortticfix");
 
     G_InitNew(skill, episode, map);
     usergame = false;
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -181,8 +181,8 @@
 
     // Are we recording a demo? Possibly set lowres turn mode
 
-    connect_data->lowres_turn = M_CheckParm("-record") > 0
-                             && M_CheckParm("-longtics") == 0;
+    connect_data->lowres_turn = M_ParmExists("-record")
+                            && !M_ParmExists("-longtics");
 
     connect_data->drone = false;
     connect_data->max_players = maxplayers;
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -95,7 +95,7 @@
 boolean demorecording;
 boolean longtics;
 boolean lowres_turn;
-boolean shortticfix;        // properly calculates lowres turns like in doom
+boolean shortticfix;            // calculate lowres turning like doom
 boolean demoplayback;
 boolean demoextend;
 byte *demobuffer, *demo_p, *demoend;
@@ -1903,9 +1903,9 @@
     //!
     // @category demo
     //
-    // Smooths out low turning resolution when recording a demo.
+    // Smooth out low resolution turning when recording a demo.
     //
-    shortticfix = M_CheckParm("-shortticfix") != 0;
+    shortticfix = M_ParmExists("-shortticfix");
 
     lowres_turn = !longtics;
 
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -679,7 +679,7 @@
     //!
     // @category demo
     //
-    // Record a high turning resolution demo.
+    // Record or playback a demo with high resolution turning.
     //
 
     longtics = M_ParmExists("-longtics");
@@ -687,8 +687,8 @@
     //!
     // @category demo
     //
-    // Demo records and plays back without automatically quitting
-    // after level exit.
+    // Record or playback a demo without automatically quitting
+    // after either level exit or player respawn.
     //
 
     demoextend = M_ParmExists("-demoextend");
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -898,6 +898,7 @@
 {
     if (demoplayback)
     {
+        // deactivate playback, return control to player
         demoextend = false;
     }
     if (!SlotStatus[option])
@@ -1010,6 +1011,7 @@
 {
     if (demoplayback)
     {
+        // deactivate playback, return control to player
         demoextend = false;
     }