Re: [Warzone-dev] Gathering statistics?

2008-05-08 Thread bugs buggy
On 5/8/08, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> Am Mittwoch, 7. Mai 2008 22:21:05 schrieb Kamaze:
>
> > Dennis Schridde schrieb:
>  > > Add an ingame GUI dialogue asking whether you may do that, then it's
>  > > fine. Otherwise you might be violating laws in several countries.
>  >
>  > I would appreciate that solution not only due legal reasons, also
>  > because making it opt-in is a type of "good" etiquette.
>
> Sure the primary reason is feeling-right. Just wanted to make clear that apart
>  from that we are also forced to do this, no matter what feelings I have about
>  it.
>
>
>  --Dennis
>
I rather *not* use the ingame GUI to make a dialog for obvious
reasons. (Mainly, it is a PITA to work with the GUI.)

I also am not sure why you guys think this is any different that any
other program you use that transmits information about the hardware
you are using.  I don't recall Firefox or any other browser throwing
up a dialog saying that it will allow whatever site to query where I
have been before, nor announcing what hardware/OS I am running.
The same goes for the crash handler, when you tell people to upload
the crash dump, it also contains similar info I am after.
That is all implied is it not ?

It is one thing if it was personal information, but just stating OS,
CPU type, and gfx card type?
It would only send said information when the user wants to connect to
the lobby server.  It will NOT do it automatically when you run the
program.
Anyway, perhaps a checkmark button on the lobby / IP/LAN screen screen
will suffice for you all, or maybe have it as a option in the
installer?

I still need to know how to query for the information the correct way
on linux & macs though.

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


[Warzone-dev] Yet more leaks...

2008-05-08 Thread bugs buggy
After the leak fixes I have done, we still have these.
It does *NOT* include all of the leaks, I removed (tons of) duplicate lines.
I also didn't really 'fix' bug #11664, since I don't understand the
logic behind that if statement.  To get rid of  those leaks, I just
commented out the return statement.  That is why you don't seem them
in the list below.
{sidenote, sorry, forgot to test previous patches via gcc}

leaks:
\lib\sound\openal_track.c(489) : {453107} normal block at 0x06CB58B0,
8 bytes long.
.\script_parser.y(784) : {322020} normal block at 0x06B4DB00, 32 bytes long.
.\script_parser.y(1315) : {233451} normal block at 0x06B07478, 20 bytes long.
.\script_parser.y(1315) : {342963} normal block at 0x06B06228, 136 bytes long.
.\script_parser.y(1461) : {242355} normal block at 0x06B12690, 20 bytes long.
.\script_parser.y(1518) : {242317} normal block at 0x06B110E0, 20 bytes long.
.\script_parser.y(3191) : {233718} normal block at 0x06B07600, 204 bytes long.
.\script_parser.y(3271) : {233764} normal block at 0x06B05ED0, 24 bytes long.
.\script_parser.y(3935) : {233377} normal block at 0x06B07CA8, 16 bytes long.
.\script_parser.y(4532) : {348110} normal block at 0x06BA1C88, 12 bytes long.
.\script_parser.y(4600) : {244173} normal block at 0x06B14130, 20 bytes long.
.\script_parser.y(4917) : {253479} normal block at 0x06B22D10, 12 bytes long.
.\script_parser.y(4957) : {343152} normal block at 0x06B18478, 16 bytes long.
.\script_parser.y(5103) : {233075} normal block at 0x06B05850, 12 bytes long.
.\script_parser.y(5168) : {346295} normal block at 0x06B9F3A8, 16 bytes long.
.\script_parser.y(5512) : {241025} normal block at 0x06B0FC08, 12 bytes long.

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


[Warzone-dev] [FIX] Yet more memleaks plugged. (Terrain engine this time around)

2008-05-08 Thread bugs buggy
This fixes the leaks from pie_TerrainInit().
per, I didn't know the best place for pie_TerrainCleanup(), so I stuck
it in stageThreeShutDown().  Move it to where ever you think is best.





Index: lib/ivis_common/piedef.h
===
--- lib/ivis_common/piedef.h(revision 4972)
+++ lib/ivis_common/piedef.h(working copy)
@@ -106,6 +106,7 @@
 extern void pie_DrawImage(PIEIMAGE *image, PIERECT *dest);

 void pie_TerrainInit(int sizex, int sizey);
+void pie_TerrainCleanup(void);
 void pie_DrawTerrain(int mapx, int mapy);
 void pie_DrawTerrainTriangle(int index, const TERRAIN_VERTEX *aVrts);
 void pie_DrawWaterTriangle(const TERRAIN_VERTEX *aVrts);
Index: lib/ivis_opengl/piedraw.c
===
--- lib/ivis_opengl/piedraw.c   (revision 4972)
+++ lib/ivis_opengl/piedraw.c   (working copy)
@@ -778,6 +778,15 @@
rowLength = sizex;
 }

+void pie_TerrainCleanup()
+{
+   if(aColour) free(aColour);
+   if(aTexCoord) free(aTexCoord);
+   if(aVertex) free(aVertex);
+   aColour = aTexCoord = aVertex = NULL;
+
+}
+
 void pie_DrawTerrain(int mapx, int mapy)
 {
glEnableClientState(GL_COLOR_ARRAY);
Index: src/init.c
===
--- src/init.c  (revision 4972)
+++ src/init.c  (working copy)
@@ -1157,6 +1157,8 @@
{
initPlayerColours();// reset colours leaving 
multiplayer game.
}
+   
+   pie_TerrainCleanup();

setScriptWinLoseVideo(PLAY_NONE);
Index: lib/ivis_common/piedef.h
===
--- lib/ivis_common/piedef.h	(revision 4972)
+++ lib/ivis_common/piedef.h	(working copy)
@@ -106,6 +106,7 @@
 extern void pie_DrawImage(PIEIMAGE *image, PIERECT *dest);
 
 void pie_TerrainInit(int sizex, int sizey);
+void pie_TerrainCleanup(void);
 void pie_DrawTerrain(int mapx, int mapy);
 void pie_DrawTerrainTriangle(int index, const TERRAIN_VERTEX *aVrts);
 void pie_DrawWaterTriangle(const TERRAIN_VERTEX *aVrts);
Index: lib/ivis_opengl/piedraw.c
===
--- lib/ivis_opengl/piedraw.c	(revision 4972)
+++ lib/ivis_opengl/piedraw.c	(working copy)
@@ -778,6 +778,15 @@
 	rowLength = sizex;
 }
 
+void pie_TerrainCleanup()
+{
+	if(aColour) free(aColour);
+	if(aTexCoord) free(aTexCoord);
+	if(aVertex) free(aVertex);
+	aColour = aTexCoord = aVertex = NULL;
+
+}
+
 void pie_DrawTerrain(int mapx, int mapy)
 {
 	glEnableClientState(GL_COLOR_ARRAY);
Index: src/init.c
===
--- src/init.c	(revision 4972)
+++ src/init.c	(working copy)
@@ -1157,6 +1157,8 @@
 	{
 		initPlayerColours();		// reset colours leaving multiplayer game.
 	}
+	
+	pie_TerrainCleanup();
 
 	setScriptWinLoseVideo(PLAY_NONE);
 
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


[Warzone-dev] [FIX] super cyborg animation

2008-05-08 Thread bugs buggy
Bottom line is, that anything that has multiple animation frames needs
to be rendered via the bucket.

In this case, I made it specific for the super cyborg droids.
Before patch, spawn a few super cyborg droids, and a few 'normal' ones.
Select them all.  Now move them around.
Looks like crap.
Apply patch.
Looks normal.



Index: src/display3d.c
===
--- src/display3d.c (revision 4972)
+++ src/display3d.c (working copy)
@@ -1543,7 +1543,17 @@
if(psDroid->visible[selectedPlayer] || 
godMode || demoGetStatus())
{
psDroid->sDisplay.frameNumber = 
currentGameFrame;
-   renderDroid( (DROID *) psDroid);
+
+   // NOTE! : anything that has 
multiple (anim) frames *must* use
the bucket to render
+   // In this case, AFAICT only 
DROID_CYBORG_SUPER had the issue.
(Same issue as oil pump anim)
+   if(psDroid->droidType != 
DROID_CYBORG_SUPER)
+   {
+   renderDroid( (DROID *) 
psDroid);
+   }
+   else
+   {   
+   
bucketAddTypeToList(RENDER_DROID, psDroid);
+   }
/* draw anim if visible */
if ( psDroid->psCurAnim != NULL 
&&

psDroid->psCurAnim->bVisible == true &&
Index: src/display3d.c
===
--- src/display3d.c	(revision 4972)
+++ src/display3d.c	(working copy)
@@ -1543,7 +1543,17 @@
 	if(psDroid->visible[selectedPlayer] || godMode || demoGetStatus())
 	{
 		psDroid->sDisplay.frameNumber = currentGameFrame;
-		renderDroid( (DROID *) psDroid);
+
+		// NOTE! : anything that has multiple (anim) frames *must* use the bucket to render
+		// In this case, AFAICT only DROID_CYBORG_SUPER had the issue.  (Same issue as oil pump anim)
+		if(psDroid->droidType != DROID_CYBORG_SUPER)
+		{
+			renderDroid( (DROID *) psDroid);
+		}
+		else
+		{	
+			bucketAddTypeToList(RENDER_DROID, psDroid);
+		}
 		/* draw anim if visible */
 		if ( psDroid->psCurAnim != NULL &&
 			psDroid->psCurAnim->bVisible == true &&
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


[Warzone-dev] [FIX] Mem leak fix for event.c

2008-05-08 Thread bugs buggy
We never freed the string we allocated before.
This fixes it on my end.


Index: lib/script/event.c
===
--- lib/script/event.c  (revision 4972)
+++ lib/script/event.c  (working copy)
@@ -667,6 +667,11 @@
for(psCChunk = psContext->psGlobals; psCChunk; psCChunk = psNChunk)
{
psNChunk = psCChunk->psNext;
+   for(i=0;i < CONTEXT_VALS ; i++)
+   {
+   if(psCChunk->asVals[i].type == VAL_STRING && 
psCChunk->asVals[i].v.sval)
+   free(psCChunk->asVals[i].v.sval);
+   }
free(psCChunk);
}
Index: lib/script/event.c
===
--- lib/script/event.c	(revision 4972)
+++ lib/script/event.c	(working copy)
@@ -667,6 +667,11 @@
 	for(psCChunk = psContext->psGlobals; psCChunk; psCChunk = psNChunk)
 	{
 		psNChunk = psCChunk->psNext;
+		for(i=0;i < CONTEXT_VALS ; i++)
+		{
+			if(psCChunk->asVals[i].type == VAL_STRING && psCChunk->asVals[i].v.sval)
+free(psCChunk->asVals[i].v.sval);
+		}
 		free(psCChunk);
 	}
 
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


[Warzone-dev] [bug #11664] Massive leaks in astar.c

2008-05-08 Thread anonymous

URL:
  

 Summary: Massive leaks in astar.c
 Project: Warzone Resurrection Project
Submitted by: None
Submitted on: Thursday 05/08/2008 at 21:32 CEST
Category: AI
Severity: 5 - Blocker
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: buggy
 Open/Closed: Open
 Discussion Lock: Any
 Release: svn/trunk
Operating System: All
 Planned Release: None

___

Details:

In fpathTableReset(), there is a very weird if statement that is the cause of
tons of leaks:

if (resetIterationCount < INT_MAX - 1)
...
 on this system, INT_MAX  =  2147483647.

Thus we only really free when the counter is at 2147483646?
This can't be what you wanted, and is causing me to fall asleep waiting for
it to output all the leaks in astar.c.

Is there a reason why we changed from a linked list to a 2D array for this
stuff?










___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Warzone-dev] [bug #11663] easy support for LAN gaming and gaming with buddies

2008-05-08 Thread Paul Wise

URL:
  

 Summary: easy support for LAN gaming and gaming with buddies
 Project: Warzone Resurrection Project
Submitted by: pabs
Submitted on: Thursday 05/08/2008 at 16:46
Category: Engine: Netplay
Severity: 1 - Wish
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: svn/trunk
Operating System: All
 Planned Release: None

___

Details:

It would be great if at the join game menu, I could click LAN and a list of
games running on the local LAN would come up. The way to do this would be to
support zeroconf, using Avahi on Linux, Bonjour on OSX and Windows probably
has some Vista-only API.

http://www.zeroconf.org/
http://en.wikipedia.org/wiki/Zeroconf
http://avahi.org/
http://developer.apple.com/networking/bonjour/index.html

I'd also like a way to have a game with my IRC/IM buddies. This is probably
only something you could do on Linux with Telepathy tubes:

http://telepathy.freedesktop.org/wiki/Tubes
http://alban.apinc.org/blog/2007/10/24/97-gtetrinet-video-with-telepathy-and-tubes/

Obviously both of these should be build-time optional and maybe have options
to turn them off.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Warzone-dev] [bug #11659] crash on first level of campaign

2008-05-08 Thread Paul Wise

URL:
  

 Summary: crash on first level of campaign
 Project: Warzone Resurrection Project
Submitted by: pabs
Submitted on: Thursday 05/08/2008 at 07:11
Category: Campaign
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: svn/branches/2.1
Operating System: GNU/Linux
 Planned Release: None

___

Details:

First, info from the core file:

[EMAIL PROTECTED]:~/devel/games/warzone$ gdb ./install/bin/warzone2100
--core=/tmp/corefiles/core-8322-1000-1000-6-1210230313-chianamo-warzone2100
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
...
(gdb) bt
#0  0xb7fd9424 in __kernel_vsyscall ()
#1  0xb7bf9ef5 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb7bfb871 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7bf30ee in __assert_fail () from /lib/i686/cmov/libc.so.6
#4  0x0807d8d8 in dealWithRMB () at display.c:2500
#5  0x0807a7ae in processMouseClickInput () at display.c:762
#6  0x080ca159 in gameLoop () at loop.c:569
#7  0x080cbbf1 in runGameLoop () at main.c:642
#8  0x080cbfe7 in mainLoop () at main.c:816
#9  0x080cc43a in main (argc=1, argv=0xbfdf3194) at main.c:958
(gdb) frame 4
#4  0x0807d8d8 in dealWithRMB () at display.c:2500
2500ASSERT( false,"Weirdy selection from RMB?!" );
(gdb) l
2495}
2496}   // end if its a structure
2497/* And if it's not a feature, then we're in trouble! */
2498else if (psClickedOn->type != OBJ_FEATURE)
2499{
2500ASSERT( false,"Weirdy selection from RMB?!" );
2501}
2502}
2503else
2504{
(gdb) p psClickedOn
$1 = (BASE_OBJECT *) 0xc7d0370
(gdb) p *psClickedOn
$2 = {type = 3083969400, id = 209604776, pos = {x = 20648, y = 3198, z =
20648}, direction = 1.76053201e-32, pitch = 0, roll = 0, psNext = 0x20,
sDisplay = {imd = 0x21, 
frameNumber = 209497776, screenX = 215403352, screenY = 2, screenR = 0},
player = 0 '\0', group = 205 '�', selected = 124 '|', cluster = 12 '\f', 
  visible = "[EMAIL PROTECTED]", died = 32, lastEmission = 209448376,
lastHitWeapon = 20644120, timeLastHit = 2, body = 0, inFire = 209468744,
burnStart = 209499896, 
  burnDamage = 96, sensorPower = 32, sensorRange = 179753296, ECMMod =
20316436, armour = {{2, 209519536}, {209468744, 209452368}, {128, 32},
{209468256, 19988760}, {2, 
  209519568}, {209468744, 0}}}

Second, the .gdmp file:

Program: ./install/bin/warzone2100(warzone2100)
Version: Version 2.1 branch r4937 (modified locally) - Built May  7 2008 -
DEBUG
Distributor: 
Compiled on: May  5 2008 22:04:15
Compiled by: GCC 4.2.3 (Debian 4.2.3-5)
Executed on: Thu May  8 14:45:42 2008

Operating system: Linux
Node name: chianamo
Release: 2.6.25-1-686
Version: #1 SMP Mon Apr 28 13:54:58 UTC 2008
Machine: i686

Pointers: 32bit

Dump caused by signal: SIGABRT: Process abort signal

Log message 1: [dealWithRMB] Assert in Warzone: display.c:2500 (false), last
script event: 'art1PlaceTrig (CODE)'
Log message 2: [dealWithRMB] Weirdy selection from RMB?!

GLIBC raw backtrace:
./install/bin/warzone2100[0x82143a0]
[0xb7fd940c]
/lib/i686/cmov/libc.so.6(abort+0x101)[0xb7bfb871]
/lib/i686/cmov/libc.so.6(__assert_fail+0xee)[0xb7bf30ee]
./install/bin/warzone2100[0x807d8d8]
./install/bin/warzone2100[0x807a7ae]
./install/bin/warzone2100[0x80ca159]
./install/bin/warzone2100[0x80cbbf1]
./install/bin/warzone2100[0x80cbfe7]
./install/bin/warzone2100[0x80cc43a]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7be5450]
./install/bin/warzone2100(ftell+0x3d)[0x804e601]

GDB extended backtrace:
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Attaching to program: /home/pabs/devel/games/warzone/install/bin/warzone2100,
process 8322
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /usr/lib/libSDL_net-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL_net-1.2.so.0
Reading symbols from /usr/lib/libphy