[Warzone-dev] SVN trunk broken

2007-05-20 Thread Per Inge Mathisen
Whenever I approach an enemy oil rig in a skrimish, the game asserts
for me with most recent svn trunk, no local modifications:

error   : gridStartIterate: coords off grid
error   : Assert in Warzone: mapgrid.c:276 : gridStartIterate ((x =
0)  (x  gridWidth*GRID_UNITS)  (y = 0)  (y 
gridHeight*GRID_UNITS)), last script event: 'everySec'
warzone2100: mapgrid.c:276: gridStartIterate: Assertion `(x = 0) 
(x  gridWidth*(8 * (17)))  (y = 0)  (y  gridHeight*(8 *
(17)))' failed.

Dump below:

Program command: src/warzone2100
Version: TRUNK
Type: Debug
Compiled on: May 20 2007

Operating system: Linux
Node name: Jedi
Release: 2.6.19-1.2288.fc5
Version: #1 Sat Feb 10 14:52:17 EST 2007
Machine: i686

Pointers: 32bit

Dump caused by signal: SIGABRT: Process abort signal
...

Loaded symbols for /lib/librt.so.1
0x00220402 in __kernel_vsyscall ()
(gdb) #0  0x00220402 in __kernel_vsyscall ()
No symbol table info available.
#1  0x4bc0eceb in __waitpid_nocancel () from /lib/libpthread.so.0
No symbol table info available.
#2  0x081c41c9 in posixExceptionHandler (signum=6, siginfo=0xbfa6e34c,
sigcontext=0xbfa6e3cc) at exceptionhandler.c:496
btBuffer = {0x81c3bce, 0x220440, 0x4b8c24f1, 0x4b8ba859,
0x80bf3df, 0x816368e, 0x8162b45, 0x8162bb3, 0x80baa77, 0x80bc259,
0x80bc56d, 0x80bc9b7,
  0x4b8ae4e4, 0x804ca21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
btSize = 14
pid = 9023
gdbPipe = {12, 13}
dumpFile = 11
allreadyRunning = 1
#3  signal handler called
No symbol table info available.
#4  0x00220402 in __kernel_vsyscall ()
No symbol table info available.
#5  0x4b8c0ee9 in raise () from /lib/libc.so.6
No symbol table info available.
#6  0x4b8c24f1 in abort () from /lib/libc.so.6
No symbol table info available.
#7  0x4b8ba859 in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#8  0x080bf3df in gridStartIterate (x=4939, y=65457) at mapgrid.c:274
__FUNCTION__ = gridStartIterate
__PRETTY_FUNCTION__ = gridStartIterate
#9  0x0816368e in projGetNaybors (psObj=0xa56c780) at projectile.c:2356
xdiff = 0
ydiff = 173459328
dx = 4939
dy = 65457
distSqr = 3435973837
psTempObj = (BASE_OBJECT *) 0xa56c780
#10 0x08162b45 in proj_Update (psObj=0xa56c780) at projectile.c:1914
__FUNCTION__ = proj_Update
__PRETTY_FUNCTION__ = proj_Update
#11 0x08162bb3 in proj_UpdateAll () at projectile.c:1943
psObj = (PROJ_OBJECT *) 0xa56c780
#12 0x080baa77 in gameLoop () at loop.c:424
psCurr = (DROID *) 0x0
psNext = (DROID *) 0x0
psCBuilding = (STRUCTURE *) 0x0
psNBuilding = (STRUCTURE *) 0x0
psCFeat = (FEATURE *) 0xedbaa000
psNFeat = (FEATURE *) 0x4c278298
i = 8
widgval = 0
quitting = 0
intRetVal = INT_NONE
clearMode = 7
__FUNCTION__ = gameLoop
__PRETTY_FUNCTION__ = gameLoop
#13 0x080bc259 in runGameLoop () at main.c:526
No locals.
#14 0x080bc56d in mainLoop () at main.c:688
event = {type = 4 '\004', active = {type = 4 '\004', gain = 0
'\0', state = 0 '\0'}, key = {type = 4 '\004', which = 0 '\0', state =
0 '\0',
keysym = {scancode = 249 '�', sym = 65535, mod = KMOD_NONE,
unicode = 0}}, motion = {type = 4 '\004', which = 0 '\0', state = 0
'\0', x = 1273,
y = 688, xrel = -1, yrel = 0}, button = {type = 4 '\004', which =
0 '\0', button = 0 '\0', state = 0 '\0', x = 1273, y = 688}, jaxis = {
type = 4 '\004', which = 0 '\0', axis = 0 '\0', value = 1273},
jball = {type = 4 '\004', which = 0 '\0', ball = 0 '\0', xrel = 1273,
yrel = 688},
  jhat = {type = 4 '\004', which = 0 '\0', hat = 0 '\0', value = 0
'\0'}, jbutton = {type = 4 '\004', which = 0 '\0', button = 0 '\0',
state = 0 '\0'},
  resize = {type = 4 '\004', w = 45090041, h = 65535}, expose = {type
= 4 '\004'}, quit = {type = 4 '\004'}, user = {type = 4 '\004', code =
45090041,
data1 = 0x, data2 = 0x0}, syswm = {type = 4 '\004', msg = 0x2b004f9}}
#15 0x080bc9b7 in main (argc=3, argv=0xbfa6eab4) at main.c:850
psPaletteBuffer = (iColour *) 0xa2416a0
pSize = 768
(gdb) Detaching from program: /home/devel/warzone/src/warzone2100, process 9008

Anyone feel responsible? ;-)

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


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Per Inge Mathisen
On 5/20/07, Per Inge Mathisen [EMAIL PROTECTED] wrote:
 Whenever I approach an enemy oil rig in a skrimish, the game asserts
 for me with most recent svn trunk, no local modifications:

I should add, it asserts when I approach an enemy oil rig with a
combat unit. It works in revision 1295. So it was broken recently.

  -  Per

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


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Giel van Schijndel
Per Inge Mathisen schreef:
 On 5/20/07, Per Inge Mathisen [EMAIL PROTECTED] wrote:
   
 Whenever I approach an enemy oil rig in a skrimish, the game asserts
 for me with most recent svn trunk, no local modifications:
 
 I should add, it asserts when I approach an enemy oil rig with a
 combat unit. It works in revision 1295. So it was broken recently.
   
Per, would you mind adding this to the bugtracker instead.

Thanks,

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Dennis Schridde
Am Sonntag, 20. Mai 2007 schrieb Per Inge Mathisen:
 On 5/20/07, Per Inge Mathisen [EMAIL PROTECTED] wrote:
  Whenever I approach an enemy oil rig in a skrimish, the game asserts
  for me with most recent svn trunk, no local modifications:

 I should add, it asserts when I approach an enemy oil rig with a
 combat unit. It works in revision 1295. So it was broken recently.
Can confirm this...
It must have been broken very very recently as while I was testing my commits 
I went into the enemy bases a few times and nothing happened. (I didn't do 
that for all commits though.)

Investigating...

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Per Inge Mathisen
On 5/20/07, Dennis Schridde [EMAIL PROTECTED] wrote:
 It must have been broken very very recently as while I was testing my commits
 I went into the enemy bases a few times and nothing happened. (I didn't do
 that for all commits though.)

The problem arrived with revision 1303 as far as I can tell.

[EMAIL PROTECTED] warzone]$ svn log -r1303

r1303 | devurandom | 2007-05-20 13:05:28 +0200 (Sun, 20 May 2007) | 5 lines

- Remove unused code
- Remove duplicated code/macros
- VECTOR3D-Vector3i
- Create float variants of normal functions to simplify Watermelon's
float-PIE patch

  - per

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


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Dennis Schridde
Am Sonntag, 20. Mai 2007 schrieb Per Inge Mathisen:
 On 5/20/07, Dennis Schridde [EMAIL PROTECTED] wrote:
  It must have been broken very very recently as while I was testing my
  commits I went into the enemy bases a few times and nothing happened. (I
  didn't do that for all commits though.)

 The problem arrived with revision 1303 as far as I can tell.
I found that out already, and currently I think pie_ROTATE_TRANSLATE is 
responsible...

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Per Inge Mathisen

Patch that fixes the problem. No idea why it works. But it seems to.

 - Per
Index: src/structure.c
===
--- src/structure.c	(revision 1311)
+++ src/structure.c	(working copy)
@@ -5846,7 +5846,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
@@ -5899,7 +5899,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
Index: src/droid.c
===
--- src/droid.c	(revision 1311)
+++ src/droid.c	(working copy)
@@ -4822,7 +4822,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
@@ -4871,7 +4871,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
Index: lib/ivis_opengl/piematrix.h
===
--- lib/ivis_opengl/piematrix.h	(revision 1311)
+++ lib/ivis_opengl/piematrix.h	(working copy)
@@ -45,36 +45,40 @@
 /***/
 
 extern SDMATRIX *psMatrix;
-extern SDWORD aSinTable[];
+extern SDWORD	aSinTable[];
 
 //*
 
 // FIXME DUPLICATE CODE! Already present in trig.c!
-#define SIN(X) aSinTable[(Uint16)(X)  4]
-#define COS(X) aSinTable[((Uint16)(X)  4) + 1024]
+#define SIN(X)	aSinTable[(Uint16)(X)  4]
+#define COS(X)	aSinTable[((Uint16)(X)  4) + 1024]
 
 
 //*
 
-/*!
- * Rotate and translate v with the worldmatrix. Store the result in s
- * \param[in] v Vector to translate
- * \param[out] s Resulting vector
- */
-static inline void pie_RotateTranslate3iv(Vector3i * v, Vector3i * s)
-{
-	s-x = ( v-x * psMatrix-a + v-y * psMatrix-d + v-z * psMatrix-g
-			+ psMatrix-j ) / FP12_MULTIPLIER;
-	s-y = ( v-x * psMatrix-b + v-y * psMatrix-e + v-z * psMatrix-h
-			+ psMatrix-k ) / FP12_MULTIPLIER;
-	s-z = ( v-x * psMatrix-c + v-y * psMatrix-f + v-z * psMatrix-i
-			+ psMatrix-l ) / FP12_MULTIPLIER;
+#define pie_ROTATE_TRANSLATE(x,y,z,xs,ys,zs)		\
+{			\
+	xs = (x) * psMatrix-a + (y) * psMatrix-d + (z) * psMatrix-g +	\
+psMatrix-j;\
+	ys = (x) * psMatrix-b + (y) * psMatrix-e + (z) * psMatrix-h +	\
+psMatrix-k;\
+	zs = (x) * psMatrix-c + (y) * psMatrix-f + (z) * psMatrix-i +	\
+psMatrix-l;\
+	xs =FP12_SHIFT;\
+	ys =FP12_SHIFT;\
+	zs =FP12_SHIFT;\
 }
 
+//*
 
+
 //*
 
+#define pie_CLOCKWISE(x0,y0,x1,y1,x2,y2) y1)-(y0)) * ((x2)-(x1))) = (((x1)-(x0)) * ((y2)-(y1
 
+//*
+
+
 extern void pie_MatInit(void);
 
 
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] SVN trunk broken

2007-05-20 Thread Per Inge Mathisen

On 5/20/07, Per Inge Mathisen [EMAIL PROTECTED] wrote:

Patch that fixes the problem. No idea why it works. But it seems to.


Shorter diff. Still seems to work fine.

 - Per
Index: src/structure.c
===
--- src/structure.c	(revision 1311)
+++ src/structure.c	(working copy)
@@ -5846,7 +5846,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
@@ -5899,7 +5899,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
Index: src/droid.c
===
--- src/droid.c	(revision 1311)
+++ src/droid.c	(working copy)
@@ -4822,7 +4822,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
@@ -4871,7 +4871,7 @@
 barrel.z = 0;
 			}
 
-			pie_RotateTranslate3iv(barrel, muzzle);
+			pie_ROTATE_TRANSLATE(barrel.x, barrel.z, barrel.y, muzzle-x, muzzle-z, muzzle-y);
 			muzzle-z = -muzzle-z;
 
 			pie_MatEnd();
Index: lib/ivis_opengl/piematrix.h
===
--- lib/ivis_opengl/piematrix.h	(revision 1311)
+++ lib/ivis_opengl/piematrix.h	(working copy)
@@ -56,19 +56,17 @@
 
 //*
 
-/*!
- * Rotate and translate v with the worldmatrix. Store the result in s
- * \param[in] v Vector to translate
- * \param[out] s Resulting vector
- */
-static inline void pie_RotateTranslate3iv(Vector3i * v, Vector3i * s)
-{
-	s-x = ( v-x * psMatrix-a + v-y * psMatrix-d + v-z * psMatrix-g
-			+ psMatrix-j ) / FP12_MULTIPLIER;
-	s-y = ( v-x * psMatrix-b + v-y * psMatrix-e + v-z * psMatrix-h
-			+ psMatrix-k ) / FP12_MULTIPLIER;
-	s-z = ( v-x * psMatrix-c + v-y * psMatrix-f + v-z * psMatrix-i
-			+ psMatrix-l ) / FP12_MULTIPLIER;
+#define pie_ROTATE_TRANSLATE(x,y,z,xs,ys,zs)		\
+{			\
+	xs = (x) * psMatrix-a + (y) * psMatrix-d + (z) * psMatrix-g +	\
+psMatrix-j;\
+	ys = (x) * psMatrix-b + (y) * psMatrix-e + (z) * psMatrix-h +	\
+psMatrix-k;\
+	zs = (x) * psMatrix-c + (y) * psMatrix-f + (z) * psMatrix-i +	\
+psMatrix-l;\
+	xs =FP12_SHIFT;\
+	ys =FP12_SHIFT;\
+	zs =FP12_SHIFT;\
 }
 
 
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev