Commit Graph

4400 Commits (dc0aa99facd2c502cdfa0dff9d76d876d7b769f9)

Author SHA1 Message Date
Giel van Schijndel af1b99b30d Line out the field names correctly with the rest of the struct definitions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5380 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 12:51:06 +00:00
Giel van Schijndel abad9943c6 In the %field hash store the field-qualifiers as an array instead of storing only a single qualifier.
This will allow for adding multiple qualifiers to the same field later on.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5379 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 12:50:58 +00:00
Dennis Schridde 0994ae8bba Use correct switch to disable translations in raw Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5378 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 07:34:08 +00:00
Dennis Schridde 16aa7b516c Use platform commands to move, not posix ones...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5377 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 05:58:00 +00:00
Giel van Schijndel f31772dda3 Add IMD_model as a dedicated type to the mini-meta database schema language
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5376 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 23:21:45 +00:00
Giel van Schijndel 0c28d0493f Fix a syntax error introduced in r5374
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5375 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 22:14:41 +00:00
Giel van Schijndel 6e853b04d1 Don't print directly from the code generators, instead append to an output string for printing at a later time.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5374 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 21:51:23 +00:00
Giel van Schijndel bf5230b419 Don't fetch the primary key, as we probably don't need it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5373 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 20:07:58 +00:00
Giel van Schijndel 00ffe3f55d Generate multi-line SELECT statements instead of single-line ones
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5372 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 20:03:38 +00:00
Giel van Schijndel 0cf5917686 Don't create an unnecessary temporary
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5371 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 20:03:27 +00:00
Giel van Schijndel 8a0dcfa4ac Add Makefile to produce test-output from test-input for DB mini language code generators
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5370 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 19:23:38 +00:00
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