Enabled RELEASE option
authorBradley Bell <btb@icculus.org>
Sat, 2 Feb 2002 23:30:26 +0000 (23:30 +0000)
committerBradley Bell <btb@icculus.org>
Sat, 2 Feb 2002 23:30:26 +0000 (23:30 +0000)
NEWS
acconfig.h
configure.ac
main/gamecntl.c
main/inferno.c

diff --git a/NEWS b/NEWS
index 441df96..a87b1a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@
   <falk.hueffner@student.uni-tuebingen.de>, and added code to load
   hogfiles from a central location, so it now doesn't matter what dir
   you start d2x from.
+- Enabled option for RELEASE build
 
 --- Version 0.1.1 ---
 Assembly under mingw32 now works.
index 089cb92..c337f99 100644 (file)
@@ -22,6 +22,9 @@
 /* Define to disable asserts, int3, etc. */
 #undef NDEBUG
 
+/* Define for a "release" build */
+#undef RELEASE
+
 /* Define to enable cross-platform bitmap/palette loading functions */
 #undef PORTABLE_LOADER
 
index 25df4e1..00effaf 100644 (file)
@@ -113,6 +113,14 @@ else
     D2X_FEATURES="debug ${D2X_FEATURES}"
 fi
 
+dnl Build with RELEASE?
+AC_ARG_ENABLE(release,
+  [  --enable-release        Release build.  Removes debug/editor things ],,)
+if test x$enable_release = xyes; then
+    AC_DEFINE(RELEASE)
+    D2X_FEATURES="release ${D2X_FEATURES}"
+fi
+
 AC_ARG_WITH(sharepath,
   [[  --with-sharepath=DIR    Use DIR for shared game data [DATADIR/games/d2x]]],
   sharepath=$withval, sharepath="auto")
index 8c5bbf4..f871040 100644 (file)
@@ -603,7 +603,10 @@ void do_show_netgame_help()
  {
        newmenu_item m[30];
    char mtext[30][50];
-       int i,num=0,pl,eff;
+       int i,num=0,eff;
+#ifndef RELEASE
+       int pl;
+#endif
        char *eff_strings[]={"trashing","really hurting","seriously effecting","hurting",
                                                                "effecting","tarnishing"};
 
@@ -623,12 +626,12 @@ void do_show_netgame_help()
    sprintf (mtext[num],"Packets per second: %d",Netgame.PacketsPerSec); num++;
    sprintf (mtext[num],"Short Packets: %s",Netgame.ShortPackets?"Yes":"No"); num++;
 
-   #ifndef RELEASE
+#ifndef RELEASE
                pl=(int)(((float)TotalMissedPackets/(float)TotalPacketsGot)*100.0);
                if (pl<0)
                  pl=0;
                sprintf (mtext[num],"Packets lost: %d (%d%%)",TotalMissedPackets,pl); num++;
-       #endif
+#endif
 
    if (Netgame.KillGoal)
      { sprintf (mtext[num],"Kill goal: %d",Netgame.KillGoal*5); num++; }
index 5ee7d39..3d43c4c 100644 (file)
@@ -13,13 +13,16 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
 
 /*
  * $Source: /cvs/cvsroot/d2x/main/inferno.c,v $
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
  * $Author: bradleyb $
- * $Date: 2002-01-29 10:11:56 $
+ * $Date: 2002-02-02 23:30:26 $
  *
  * FIXME: put description here
  *
  * $Log: not supported by cvs2svn $
+ * Revision 1.22  2002/01/29 10:11:56  bradleyb
+ * update copyright date
+ *
  * Revision 1.21  2002/01/29 00:08:13  bradleyb
  * Added d_mkdir macro
  *
@@ -320,12 +323,12 @@ void print_commandline_help()
 //     printf( "  -nomodex        %s\n","FIXME: Undocumented");
 #ifndef RELEASE
        printf( "  -nomovies       %s\n","Don't play movies");
+       printf( "  -noscreens      %s\n","Skip briefing screens");
 #endif
 #if !defined(SHAREWARE) || ( defined(SHAREWARE) && defined(APPLE_DEMO) )
        printf( "  -noredbook      %s\n","Disable redbook audio");
 #endif
        printf( "  -norun          %s\n","Bail out after initialization");
-       printf( "  -noscreens      %s\n","Skip briefing screens");
 //     printf( "  -ordinaljoy     %s\n","FIXME: Undocumented");
 //     printf( "  -rtscts         %s\n","Same as -ctsrts");
 //     printf( "  -semiwin        %s\n","Use non-fullscreen mode");
@@ -599,8 +602,10 @@ int main(int argc,char **argv)
        if ( FindArg( "-autodemo" ))
                Auto_demo = 1;
 
+#ifndef RELEASE
        if ( FindArg( "-noscreens" ) )
                Skip_briefing_screens = 1;
+#endif
 
        if ((t=FindArg("-tmap"))){
                select_tmap(Args[t+1]);