foxygit / doom Log in
commit 788892b95805a7d54e2b8ed92ed8262a7b9c6d47
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Wed Jun 29 14:28:43 2011 +0000
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Wed Jun 29 14:28:43 2011 +0000

    Added support for -work and -flip command-line parameters. -random
    cannot be supported yet because it requires addition to the list of
    transmitted variables during network game initialization (TODO!)

    Subversion-branch: /branches/strife-branch
    Subversion-revision: 2351
---
 src/strife/d_main.c   | 17 +++++++++++++++++
 src/strife/doomstat.h |  1 +
 src/strife/p_mobj.c   |  6 ++++++
 src/strife/r_things.c |  4 +++-
 4 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 635711e4..bd4ac6a1 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -110,6 +110,7 @@ boolean         devparm;        // started game with -devparm
 boolean         nomonsters;     // checkparm of -nomonsters
 boolean         respawnparm;    // checkparm of -respawn
 boolean         fastparm;       // checkparm of -fast
+boolean         flipparm;       // [STRIFE] haleyjd 20110629: checkparm of -flip

 boolean         showintro = true;   // [STRIFE] checkparm of -nograph, disables intro
 boolean         singletics = false; // debug flag to cancel adaptiveness
@@ -1510,6 +1511,22 @@ void D_DoomMain (void)

     nomonsters = M_CheckParm ("-nomonsters");

+    //!
+    // @category strife
+    //
+    // Sets Rogue playtesting mode (godmode, noclip toggled by backspace)
+    //
+
+    workparm = M_CheckParm ("-work");
+
+    //!
+    // @category strife
+    //
+    // Attemps to flip player gun sprites, but is broken.
+    //
+
+    flipparm = M_CheckParm ("-flip");
+
     //!
     // @vanilla
     //
diff --git a/src/strife/doomstat.h b/src/strife/doomstat.h
index 8cb562b2..222383ec 100644
--- a/src/strife/doomstat.h
+++ b/src/strife/doomstat.h
@@ -54,6 +54,7 @@
 extern  boolean	nomonsters;	// checkparm of -nomonsters
 extern  boolean	respawnparm;	// checkparm of -respawn
 extern  boolean	fastparm;	// checkparm of -fast
+extern  boolean flipparm;       // [STRIFE] checkparm of -flip

 extern  boolean	devparm;	// DEBUG: launched with -devparm

diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c
index f8676a95..30c6ac41 100644
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -737,6 +737,12 @@ void P_RemoveMobj (mobj_t* mobj)
         itemrespawntime[iquehead] = leveltime + 30*TICRATE; // [STRIFE]
         iquehead = (iquehead+1)&(ITEMQUESIZE-1);

+        // [STRIFE] FIXME/TODO: - haleyjd 20110629
+        // -random parameter affects the behavior of respawning items here.
+        // However, this requires addition of randomparm to the transmission
+        // of variables during netgame initialization, and the netcode is not
+        // functional yet - so, I haven't added this yet!
+
         // lose one off the end?
         if (iquehead == iquetail)
             iquetail = (iquetail+1)&(ITEMQUESIZE-1);
diff --git a/src/strife/r_things.c b/src/strife/r_things.c
index a4a5595d..f83375e8 100644
--- a/src/strife/r_things.c
+++ b/src/strife/r_things.c
@@ -725,7 +725,9 @@ void R_DrawPSprite (pspdef_t* psp)
     sprframe = &sprdef->spriteframes[ psp->state->frame & FF_FRAMEMASK ];

     lump = sprframe->lump[0];
-    flip = (boolean)sprframe->flip[0];
+    // [STRIFE] haleyjd 20110629: -flip replaces this.
+    //flip = (boolean)sprframe->flip[0];
+    flip = flipparm;

     // calculate edges of the shape
     tx = psp->sx-160*FRACUNIT;