Commit Graph

4389 Commits (77bc79ab8816fe1f5ecbc55f6dce88170664d36e)

Author SHA1 Message Date
Giel van Schijndel 14d3ccca36 Remove commented out & useless code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5369 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:10:57 +00:00
Giel van Schijndel a1cb6521fc "die" on a parsing error, don't just print "Unmatched line"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5368 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:10:46 +00:00
Giel van Schijndel c6647ae996 Move duplicated looping out of the code generators
Move the duplicated effort of looping over all structs and enums out of the code generators and into the code that invokes the code generator. Thus instead of invoking the code generator once to generate code for all structs and enums, we now invoke it once for every struct and enum.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5367 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:10:36 +00:00
Giel van Schijndel 6d7cbe3576 Code generators don't need to know how many code to generate anymore
A slight modification to the code generators removes their need for needing to know how many elements (enums or structs) it needs to generate code.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5366 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:10:25 +00:00
Giel van Schijndel f5055899db Add a code generator for SQL SELECT statements
Add a new code generator for the database mini-meta-language. It creates SQL SELECT statements that use INNER JOINs to join all fields across the inheritance hierarchy in a single result row.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5365 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:05:43 +00:00
Giel van Schijndel fc1f447adf Only auto-increment the ID for the base class
Don't add an AUTOINCREMENT clause to the PRIMARY KEY, ID column if it we're not working on the abstract base class.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5364 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:04:10 +00:00
Giel van Schijndel 0814e56caa Add file headers and leaders to generated files
Give the code generators the opportunity to print something at the start and the end of the file. E.g. header guards for C files, and some notice about the file being automatically generated for all types.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5363 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:04:00 +00:00
Giel van Schijndel 309517fc95 Rename test_code to test_code.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5362 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 18:56:34 +00:00
Giel van Schijndel cc3f64a21a Rewrite SQL table generator for new parser architecture
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5361 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 18:55:26 +00:00
Giel van Schijndel 505446f69a Don't process the "set" field type as a field qualifier. Instead rename and modify preProcessQualifiers and postProcessQualifiers to preProcessField and postProcessField respectively. These functions now parse the field's types as well as the field's qualifiers.
In addition we now also parse the "unique" keyword in set and enum lines and thus process it there as well.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5360 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 18:55:17 +00:00
Giel van Schijndel 3df34aeaa7 Rewrite the code generator and parser for the database metalanguage to perform less (or no) parsing in the code generators.
Instead we now have a two phase process:
 * First parse and build an abstract syntax tree (AST)
 * Secondly loop over the generated AST to produce useable code for the target language.

NOTE: Currently only the C struct definition generator is rewritten to this new architecture.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5359 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 18:55:06 +00:00
Giel van Schijndel 9db4235480 Add a code generator for my database meta-language
This code generator is still in a prototyping phase. It'll probably get rewritten entirely.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5358 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 18:45:32 +00:00
Freddie Witherden c152583935 Fix a bug in vectorMap that could result in a segfault.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 16:19:41 +00:00
Giel van Schijndel 693c8292ff Provide a more useful error message than "Weirdy action on keymap processing".
Instead print the enum-number which we used to switch on.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5356 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 14:57:18 +00:00
Freddie Witherden fc935ca02b Fix indentation (tabs => spaces).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5355 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 23:23:23 +00:00
Freddie Witherden 1661c61ac0 Major redesign; widgets now use compositing (rendering off-screen).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5354 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 23:18:32 +00:00
Giel van Schijndel a7ab3d9982 Merge lexer rules for the script_lexer that match different forms of the same token (e.g. upper/lower case variants)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 11:29:19 +00:00
Giel van Schijndel fd6b6262ba Apply patch #1078: Expand the GDB exceptionhandler.
With our current backtrace dumps I quite oftenly find that in case of segfaults, which combined with assert failures are the most common crash cause, I cannot easily see what value the dereferenced pointer held.

To be able to see this the exception handler will now invoke the "disassemble" and "info registers" commands when producing a back trace using GDB. This gives us the ability to see the precise assembly instruction that triggered the crash, together with the value of the register that was used as pointer.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5352 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-01 20:40:40 +00:00
Dennis Schridde 45b8413abf Improve readability of renderFeature by returning early, adding some comments, etc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5350 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-30 17:07:41 +00:00
Dennis Schridde fec1f446d3 Use clipf to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:32 +00:00
Dennis Schridde 6b8aeb1aaa Add clipf() to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:26 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Dennis Schridde fcd1455f44 Merge commit 'HEAD@{4}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5346 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:14 +00:00
Per Inge Mathisen aed2a94cd0 Move two vars into more local scope, and improve two asserts, then add a
fallback fix for non-debug builds. This to improve tracing of bug #11908:
crash - some assertion failed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 19:44:23 +00:00
Dennis Schridde 68ad79d44a Move warning flags out of CPPFLAGS for raw Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5344 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:58:51 +00:00
Per Inge Mathisen 5ea6c60eee Do not initialize music sound system when --nosound option given.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:32:06 +00:00
Per Inge Mathisen a8dc963d37 Backport from path branch: Fix sMove->DestinationX|Y to use world coordinates, as they should be.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5342 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:25:58 +00:00
Steven Koenig 238e9664a2 All readmes:
* add 16 to the valid values for the configuration option textureSize


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5341 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-27 19:22:12 +00:00
Dennis Schridde 89f6301a6f Do not create or remove subdirs if we are building directly from the source directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5339 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 18:20:54 +00:00
Dennis Schridde 9343c485b0 Revert "Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back..."
This reverts commit r5335.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:57:16 +00:00
Dennis Schridde b524a3f8bd Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:47:36 +00:00
Giel van Schijndel bc810ca2e2 Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 20:15:20 +00:00
Dennis Schridde 9bf7563e4b Import ChangeLog changes r5330 and r5331 from branches/2.1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5332 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:19:06 +00:00
Giel van Schijndel 1c6ff360db Use if (condition) something; else something-else; instead of if (condition) something; if (!condition) something-else;
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5329 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:01:18 +00:00
Giel van Schijndel da0b168df3 Don't pass a NULL pointer to cdAudio_OpenTrack
This should fix bug #11879

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5328 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:00:20 +00:00
Giel van Schijndel 9fcaf6c08f Slight refactoring of cdAudio_PlayTrack to use a switch on the enum, instead of an if, if-else structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5327 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 13:56:17 +00:00
Dennis Schridde 7af41b6f3a Substitute / with $(DIRSEP) where necessary. Fixes last remainder of bug #11883 (hopefully).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5326 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 00:13:18 +00:00
Dennis Schridde 050ec39c11 Use the (also new in this commit) relative variants of the directories almost everywhere.
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde 876b00154a Forgot one uppercase makefile.raw...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5324 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:19:09 +00:00
Dennis Schridde 286aea9a79 Do not abort if mkdir complains about already existing directories.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5323 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:53:30 +00:00
Dennis Schridde fad0231d54 Refer to the Makefile in lowercase notation to please Windows' make.
Fixes part of bug #11883.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5322 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:49:10 +00:00
Dennis Schridde fd2bfb0e0f Prepare for another fix for parts of bug #11883: Issues with the improved raw Makefiles
- Rename Makefile.raw to lowercase


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde 16bd0a829a Part of bug #11883: Issues with the improved raw Makefiles.
- Provide the missing Windows commands
- Remove TEST_D, because it has no suitable syntactical equivalent on Windows.
   (Just create directories unconditionaly. You will probably notice if there exits a file of the same name...)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5320 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:34:56 +00:00
Dennis Schridde 73b35ab8d6 Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
Their use is currently flawed, since it will not work in directories with spaces in them... (


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde ee0be13767 Secure autogen.sh against pathnames with spaces
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5318 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:03:52 +00:00
Dennis Schridde 452b737b64 Output gameTime for debug messages. Should make it easier to recognize relevant messages and their relation over time.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5317 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 18:07:45 +00:00
Dennis Schridde cf8430a142 update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5316 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 18:07:12 +00:00
Freddie Witherden 2b0bd03914 Updates to the betawidget library; being to document vector.[ch], fix a bug in vectorAdd, const correctness for the widget type system, remove a rouge newline in geom.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5315 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 10:11:03 +00:00
Giel van Schijndel 21a883121a * Add an ASSERT to trap a corner case which I don't think ever occurs.
The info from this ASSERT is needed for a proper (and fully educated) fix of bug #11865. Thus please attach a backtrace to bug #11865 when this ASSERT gets triggered, and if possible add which VTOL type you ordered to or from a rearming pad at the time.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5314 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 21:16:23 +00:00
Giel van Schijndel 276e201c01 * Get rid of "delayed return" in vtolHappy; just return false as soon as we've determined a VTOL isn't happy
* Use return (val == expected); instead of if (val == expected) return true; else return false;


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5313 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 21:15:58 +00:00