Re: [Warzone-dev] More patches for warnings

2006-11-04 Thread vs2k5
On Thu, 02 Nov 2006 16:27:51 -0500 Troman <[EMAIL PROTECTED]> wrote:
>It is a cleaner approach, but for me it is more intuitively to use 
>MALLOC 
>since already the name implies that malloc functionality will be 
>used at 
>some point. And these 2 new macros will not replace all occurances 
>of 
>MALLOC, so we are just introducing more macros for the same 
>functionality.
>
>But anyway, I will be an impartial executor of a collective 
>opinion. To make 
>it painless for everyone if no objections will be raised until 
>tomorrow 
>evening I will just go on and apply the patch.
>
>Troman 
>
Also keep in mind that when using VS, and your using their debug 
libs to catch memory errors via the _CrtDumpMemoryLeaks() call in 
the debugger, having more macros on top of other macros gets very 
messy.

Are people actually testing all these patches by playing a few 
different skirmish games, and then some campaign games, and seeing 
if something breaks?

I also forgot who it was, but the person doing the 64bit port, are 
they still around?








Concerned about your privacy? Instantly send FREE secure email, no account 
required
http://www.hushmail.com/send?l=480

Get the best prices on SSL certificates from Hushmail
https://www.hushssl.com?l=485


___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Patches (2 segfaults + 3 minor)

2006-11-04 Thread Dennis Schridde
Am Samstag, 4. November 2006 18:45 schrieb Thomas Rast:
> Hello everyone!
Hello Thomas, nice to see you here!

> * charon-decl-fix.diff
>
> mingw32-gcc chokes on the difference between SDWORD and DWORD.  (My
> GCC 4.0.3 on Linux didn't, however.)
DWORD is defined to SDWORD on non WIN32 only, it seems like I made a mistake 
when setting those defines.
As MinGW sets WIN32, too it will detect the mistake, while GCC on Linux wont.

--Dennis


pgpSfwbZq810P.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Patches (2 segfaults + 3 minor)

2006-11-04 Thread Dennis Schridde
Am Samstag, 4. November 2006 19:25 schrieb Thomas Rast:
> Sorry for the spam, but...
>
> > Attached are a few small patches.
>
> The signature is broken, probably due to a bug in KMail.  If you want,
> I can re-send, but the whole routine is a bit pointless anyway as you
> can't verify my public key.
I can, I can. ;) subkeys.pgp.net ... ;)

--Dennis


pgpUvXToQMzJU.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Patches (2 segfaults + 3 minor)

2006-11-04 Thread Thomas Rast
Sorry for the spam, but...

> Attached are a few small patches.

The signature is broken, probably due to a bug in KMail.  If you want,
I can re-send, but the whole routine is a bit pointless anyway as you
can't verify my public key.

- Thomas

-- 
GPG key ID 'BB66CCFD' available from hkp://subkeys.pgp.net or:
http://n.ethz.ch/student/trast/public-key.asc




pgpI7pyYhsk99.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


[Warzone-dev] Patches (2 segfaults + 3 minor)

2006-11-04 Thread Thomas Rast
Hello everyone!

First off allow me to thank you for the work so far.  I especially
like the linux port! :-)

Attached are a few small patches.  All of them are against r450, which
is HEAD as of this writing.  In order of severity:

* charon-sound-id-segfault.diff

This one is not reproducible.  It happened to me only once; the people
I play with had some similiar out-of-the-blue segfaults, but they
weren't running the game in debug mode or GDB so we can't confirm.
For some reason I couldn't figure out, 'sound_Play3DTrack' got a
sample with an 'iTrack' of 2608, which is quite obviously wrong
(MAX_TRACKS is defined to be 600 at the top of the file).  So I simply
put in a safeguard that makes it silently ignore such a sample, and
did the same for 'sound_Play2DTrack' just to be sure.

It appears to work now, but the patch could definitely need some error
reporting and/or investigation of the actual source of the problem.
I have attached a backtrace along with the patch in case someone more
versed in the code wants to have a look at it.

* charon-tabs-segfault.diff

Patches a reproducible segfault.  Try this:
1) Start a skirmish game on any map, in at least T2 mode.
2) Build three VTOL factories.
3) Pop up the factory production menu. Note that the last factory you
   built is on a new page, by itself.
4) Select a truck and click on the VTOL factory to upgrade it _without
   closing the factory menu_.  Boom.

I'm not entirely sure the way I fixed it is the "right thing", but it
works (it skips back to the first page in the menu).

* charon-decl-fix.diff

mingw32-gcc chokes on the difference between SDWORD and DWORD.  (My
GCC 4.0.3 on Linux didn't, however.)

* charon-cl-help.diff

devurandom changed --viewport to --resolution, but forgot to change
the --help text.

* charon-console-rebindable.diff

This patch makes the "show me the console backlog" key rebindable.
With my swiss german keyboard setup this is required, as I can only
type the backtick as a dead key followed by space, which is ignored by
warzone.

Hope that helps.  I'm afraid(?) more will follow ;-)

Off topic, I would prefer to scale the UI as everything is a bit too
small on my 1400x1050 laptop screen.  I've browsed around for some
time, but haven't found a real "entry point" to the widget drawing
stuff where such an OpenGL call could be fit in.  Is there such a
place?  If not, how does the widget system work?

- Thomas

-- 
GPG key ID 'BB66CCFD' available from hkp://subkeys.pgp.net or:
http://n.ethz.ch/student/trast/public-key.asc


Index: src/clparse.c
===
--- src/clparse.c	(Revision 450)
+++ src/clparse.c	(Arbeitskopie)
@@ -6,6 +6,7 @@
  */
 #ifndef _MSC_VER
 #include 
+#include 
 #endif	// not for .net I should say..  --Qamly
 #include "lib/framework/frame.h"
 #include "lib/widget/widget.h"
@@ -83,7 +84,7 @@
 		"   --savegame NAMELoad a saved game NAME\n"
 		"   --window   Play in windowed mode\n"
 		"   --version  Output version info and exit\n"
-		"   --viewport WIDTHxHEIGHTSet the dimensions of the viewport (screen or window)\n"
+		"   --resolution WIDTHxHEIGHT  Set the dimensions of the viewport (screen or window)\n"
 		"   --(no)shadows  Toggles the shadows\n"
 		"   --(no)soundToggles the sound\n"
 		   );
Index: src/keymap.c
===
--- src/keymap.c	(Revision 450)
+++ src/keymap.c	(Arbeitskopie)
@@ -377,7 +377,7 @@
 	keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,(KEY_CODE)KEY_MAXSCAN,KEYMAP_PRESSED,kf_JumpToSensorUnits,	strresGetString(psStringRes,STR_BIND_SENJ));
 	keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,(KEY_CODE)KEY_MAXSCAN,KEYMAP_PRESSED,kf_JumpToCommandUnits,	strresGetString(psStringRes,STR_BIND_COMJ));
 	keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,KEY_TAB,KEYMAP_PRESSED,kf_ToggleOverlays,			strresGetString(psStringRes,STR_BIND_OVERL));
-	keyAddMapping(KEYMAP_ALWAYS,KEY_IGNORE,KEY_BACKQUOTE,KEYMAP_PRESSED,kf_ToggleConsoleDrop,strresGetString(psStringRes,STR_BIND_CONSOLE));
+	keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,KEY_BACKQUOTE,KEYMAP_PRESSED,kf_ToggleConsoleDrop,strresGetString(psStringRes,STR_BIND_CONSOLE));
 	//**
 	// IN GAME MAPPINGS - Single key presses - ALL __DEBUG keymappings will be removed for master
 	keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,KEY_B,KEYMAP_PRESSED,kf_CentreOnBase,			strresGetString(psStringRes,STR_BIND_CENTV));
Index: lib/framework/configfile.h
===
--- lib/framework/configfile.h	(Revision 450)
+++ lib/framework/configfile.h	(Arbeitskopie)
@@ -4,8 +4,8 @@
 
 extern BOOL openWarzoneKey(void);
 extern BOOL closeWarzoneKey(void);
-extern BOOL getWarzoneKeyNumeric(const char *pName, SDWORD *val);
-extern BOOL setWarzoneKeyNumeric(const char *pName, SDWORD val);
+extern BOOL getWarzo

[Warzone-dev] SVN broken

2006-11-04 Thread Gerard Krol

This change:

Revision 450  - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 4 02:11:26 2006 CET (15 hours, 53 minutes ago) by devurandom
File length: 9752 byte(s)
Diff to previous 389

- Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable 
without having to modify the sourcecode

Contains (this is an excerpt):

--- trunk/src/clparse.c 2006/09/23 14:56:18 389
+++ trunk/src/clparse.c 2006/11/04 01:11:26 450
@@ -250,13 +270,13 @@
else if ( strcasecmp( tokenType, "--shadows" ) == 0 )
{
// FIXME Should setDrawShadows go into warzoneconfig? 
Or how should config values be handled in general? By the system using it? Or 
by warzoneconfig? Or by config keys only?
-   //setDrawShadows( TRUE );
-   setWarzoneKeyNumeric( "shadows", TRUE );
+   setDrawShadows( TRUE );
+// setWarzoneKeyNumeric( "shadows", TRUE );
}
else if ( strcasecmp( tokenType, "--noshadows" ) == 0 )
{
-   //setDrawShadows( FALSE );
-   setWarzoneKeyNumeric( "shadows", FALSE );
+   setDrawShadows( FALSE );
+// setWarzoneKeyNumeric( "shadows", FALSE );
}
else if ( strcasecmp( tokenType, "--sound" ) == 0 )
{

Which gives an error while compiling:

g++ -m32 -DVERSION=\"2.0.5\" -DYY_STATIC -I.. -I../.. 
-I/home/Gerard/Warzone-DevPkg/include -fpermissive -Wall -O0 -g3 -DDEBUG -mwindows 
-DWIN32 -c -oclparse.o clparse.c
clparse.c: In function `BOOL ParseCommandLine(int, char**)':
clparse.c:273: error: `setDrawShadows' undeclared (first use this function)
clparse.c:273: error: (Each undeclared identifier is reported only once for 
each function it appears in.)
make[1]: *** [clparse.o] Error 1

- Gerard




___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev