Giel van Schijndel
0118573321
Work around Flex 2.5.33 implicitly defining yyget_extra() (rather than forward declaring it)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5130 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 10:49:33 +00:00
Giel van Schijndel
13c84db269
Disable optimisations (-O0) for --enable-debug=relaxed as well
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5129 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 10:48:26 +00:00
Per Inge Mathisen
410570c6c1
Set proper svn eol-style on a bunch of files that did not have it.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5125 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-16 17:31:51 +00:00
Dennis Schridde
2a895db63e
Fix bug #11693 . Fix submited by verminus@gna.org
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5124 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-16 14:45:51 +00:00
Dennis Schridde
5b703fb634
Dump OpenGL implementation information to console
...
Author: Buginator
Signed-off-by: Dennis Schridde <devurandom@gna.org>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5123 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 17:32:39 +00:00
Dennis Schridde
b77dfdadad
Simplification and slight speedup for trigSin/trigCos. Make trigIntSqrt wrap sqrtf, since the old lookup implementation was probably slower than that.
...
Author: Björn Bredthauer <Bjoern.Bredthauer@gmx.de>
Date: Thu, 15 May 2008 01:28:55 +0200
Signed-off-by: Dennis Schridde <devurandom@gna.org>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5122 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 00:19:47 +00:00
Dennis Schridde
258c843c44
Calculate muzzle locations as float-vector, for convenience (and because IMDs store info as float anyway).
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5121 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 00:19:40 +00:00
Dennis Schridde
2334f84c84
Remove unneccessary modulo
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5120 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 22:59:00 +00:00
Dennis Schridde
d49d1144e0
r5113 was buggy
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5119 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:16:05 +00:00
Dennis Schridde
1bc654f8b5
Add float variant to pie_RotateTranslate
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:15:59 +00:00
Dennis Schridde
7744c514b5
Link to explanation of yaw/pitch/roll
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5117 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:15:50 +00:00
Dennis Schridde
e2fa380597
Fix up what I think are wrong comments. The axes should be different.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5116 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 20:08:56 +00:00
Dennis Schridde
65553e8eb3
Mistake... I removed CHECK_PROJ_ABOVE_GROUND but forgot one user.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5115 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 19:04:42 +00:00
Dennis Schridde
cb3d71029f
We already have doubles, skip casting
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5114 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 19:04:34 +00:00
Dennis Schridde
f9a57820b0
Move asserts to front
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5113 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 18:31:30 +00:00
Dennis Schridde
81636fa9d8
MSVC was crying
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5112 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 18:23:20 +00:00
Dennis Schridde
4197d2fc99
Prefer local variables over ones behind pointers
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5111 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 17:24:59 +00:00
Dennis Schridde
fd577efb39
Move penetration code fragments from SendProjectile to Inflight*Func
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5110 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 17:24:51 +00:00
Dennis Schridde
851a930f98
Luxury++: Vector based worldOnMap() variants
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5109 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 17:24:35 +00:00
Dennis Schridde
d733b20f49
This patch adds a --host option (to compliment the --join option) to
...
the game, so you can launch the game via a external client.
Usage:
--host
(takes you directly to the host screen)
--join ip/hostname
(takes you directly to the join screen, you should see the game of the
ip/hostname that you specified.) The join patch was already comitted.
Author: Buginator
Date: Tue, 13 May 2008 01:23:54 -0400
Signed-off-by: Dennis Schridde <devurandom@gna.org>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5108 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 11:03:33 +00:00
Dennis Schridde
2ded222cfd
Simplify proj_InFlightDirectFunc() and make it more readable.
...
Note: Special hit-handling for homing weapons was removed, since that should already be done by the normal hit-handling.
(If our target was not among our neighbours, how can we ever be in range to hit it?)
Note: Since this is nearly a rewrite, code-reviews should concentrate on the logic, not on before-after comparison.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:32:23 +00:00
Dennis Schridde
202ebc32fb
Step one towards vector based projectiles
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5106 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:32:07 +00:00
Dennis Schridde
974b5aacaa
Minor documentation fixes:
...
- Comment on WSC_COUNTER
- Indention
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5105 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:19:20 +00:00
Dennis Schridde
be2b8a35ab
clip() function for integers (Like CLIP macro) and some slightly altered comments/variable names.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5104 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:19:10 +00:00
Dennis Schridde
6493ff1d2d
More vector functions:
...
- Set() functions for Vector3i and 3uw
- Add() for Vector3i
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5103 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:18:53 +00:00
Giel van Schijndel
5828b26a10
* Add functions for changing the volume of an already created AUDIO_STREAM: sound_GetStreamVolume and sound_SetStreamVolume
...
* Use these functions in cdaudio.c to change the volume of the currently playing AUDIO_STREAM in function sound_SetMusicVolume
This fixes bug #11579 ("Music volume slider dont work")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5101 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 14:01:25 +00:00
Giel van Schijndel
44986c3473
* Make sure to actually set the volume of an AUDIO_STREAM we're creating
...
* Indentation fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5100 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 13:50:08 +00:00
Dennis Schridde
1fcf5bfe97
Render images as alpha, instead of gouraud. This allows alpha-gradients
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5099 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 12:53:02 +00:00
Giel van Schijndel
5d0e816aa7
* Put textual tokens as found by audp_lexer.l in heap memory rather than a static string buffer
...
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5097 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:55:29 +00:00
Giel van Schijndel
e8f9fb9ae5
* ONESHOT and LOOP are __not__ value tokens (they're just regular tokens), so don't mark them as such
...
* Add a new subrule `looping` and use that in rule audio_track instead of duplicating two code paths for audio_track
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5096 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:51:46 +00:00
Giel van Schijndel
8529559e7c
* Parse quoted text in audp_lexer.l similar to most other parsers/lexers we use (is also less error prone)
...
* Add single line comments (using '//') to audp_lexer.l
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5095 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:42:55 +00:00
Giel van Schijndel
d53aa02117
* Use the lexer_input framework instead of a custom YY_INPUT implementation for audp_lexer.l
...
* Get rid of lexer function parseGetErrorData and use audp_get_lineno() and audp_get_text() instead
* Add a WZ_DECL_FORMAT declaration to audp_error to enable GCC's printf format checking
* In audp_error allocate the buffer on the stack using alloca() instead of an auto 1kB text buffer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5094 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:29:13 +00:00
Giel van Schijndel
640ee1f653
* Get rid of never initialised variables g_bParsingSubFile and g_fpOld (the compiler probably set them to false & NULL respectively everytime, if not then this code should have crashed consistently)
...
* Remove now useless yywrap() function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5093 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:09:10 +00:00
Giel van Schijndel
1799f473c0
Rename some audp_(.*) stuff to yy$1
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5092 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:06:19 +00:00
Giel van Schijndel
7be6f76ba3
Remove our own custom definition of YYLMAX (give Flex the liberty of determining this itself)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5091 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:55:55 +00:00
Giel van Schijndel
72075d2621
Fix LDADD in tests/Makefile.am so that crosscompiling (or rather crosslinking) with mingw32 is possible
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5090 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:52:35 +00:00
Giel van Schijndel
f8e4607093
Fix an error causing us to use the wrong names for yyget_extra(), yyset_extra(), yyget_lineno() and yyget_text()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5089 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:40:53 +00:00
Giel van Schijndel
787d3ad581
Call fflush(stdout) after fprintf(stdout, ... in parsetest.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5088 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:09:19 +00:00
Giel van Schijndel
10f021f279
Fix a syntax error introduced in r5086
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5087 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:58:41 +00:00
Giel van Schijndel
59a1c05037
Cleanup:
...
* Remove our own strcpy implementation: stringCpy
* Don't use "d = malloc(strlen(s) + 1); strcpy(d, s);" to copy a string into fresh heap memory, use "d = strdup(s);" instead
* Fix indentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5086 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:56:42 +00:00
Giel van Schijndel
942350278b
* Put textual tokens as found by strres_lexer.l in heap memory rather than some crazy stack-like static string buffer
...
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning
* Reduce code duplication in strres_parser.y by reducing a single parsing rule with duplicated code up into two rules
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5085 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:47:25 +00:00
Giel van Schijndel
dfaf3cea17
* Use yytext instead of strres_text
...
* Get rid of lexer function strresGetErrorData and use strres_get_lineno() and strres_get_text() instead
* Don't call abort() in function strres_error as the parser will return an error anyway (causing strresLoad to return false)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:35:36 +00:00
Giel van Schijndel
fdc48bfc94
* Use the lexer_input framework instead of a custom YY_INPUT implementation for strres_lexer.l
...
* Don't bother to check whether we're in a comment when reaching the end of a string resource file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5083 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:22:05 +00:00
Giel van Schijndel
fae3c7da53
Don't duplicate code that appears in both branches of an if-statement
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5082 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:16:30 +00:00
Giel van Schijndel
2f98b6e39a
Minor cleanup and add Doxygen comments
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5081 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:09:25 +00:00
Giel van Schijndel
251317bd9a
Cleanup (behaviour should be unchanged)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5080 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:03:26 +00:00
Giel van Schijndel
d73949e336
* Put textual tokens as found by resource_lexer.l in heap memory rather than some crazy stack-like static string buffer
...
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:00:09 +00:00
Giel van Schijndel
636bce3996
From resource_parser.y: "No longer static ... lets use this area globally":
...
* Lets __not__ use very bad practices just because we can!!! Make it static again
* Give strres_lexer.l such an array of its own (static as well)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5077 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:49 +00:00
Per Inge Mathisen
1819c503c6
Make difficulty work when you start the campaign with the --game parameter.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5076 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:10 +00:00
Giel van Schijndel
7caf01c08f
Use yytext instead of res_text
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5075 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:41:00 +00:00