Commit Graph

4559 Commits (7f768ba83ee37aad96b5c33a16577bd2dbd841e9)

Author SHA1 Message Date
Giel van Schijndel 03cf003811 * Add line information to the AST of %preLoadTable and %postLoadRow struct-level directives
* Use these line numbers in the output of the SQLite C loading code generator to produce #line directives

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5443 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:25:46 +00:00
Giel van Schijndel d3c8f34aaf Add function prototypes for the SQLite DB load functions (declared using %loadFunc) to the struct definition header
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5442 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:25:42 +00:00
Giel van Schijndel 052c32e8ec Slightly rework c_structdef_cg.pm's header-template processing code to be more similar to c_sqliteload_cg.pm's header-template processing code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5441 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:02:10 +00:00
Giel van Schijndel df7b09c6fa Wrap the "header/start/leader" template contents in #line directives for the SQLite C code generator's output
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5440 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:01:02 +00:00
Giel van Schijndel f8f4ce0854 Make sure to count __all__ lines, also those who start a new "scope" (anything that finishes with "end")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5439 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 14:58:04 +00:00
Giel van Schijndel 3b57831282 * Add line numbers to the AST for %loadFunc directives
* Utilize these line numbers to generate #line directives in the output file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5438 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 14:47:16 +00:00
Giel van Schijndel 1ceafee327 Add line-counting code to the mini database scheme meta language parser
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5437 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 14:36:27 +00:00
Giel van Schijndel 46fc5cc97e * Make it possible to use forward declarations to the generated struct types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5436 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 13:59:23 +00:00
Giel van Schijndel 707d5cf718 * Print from a template for the C struct definition code generator as well
* Add a template for the struct definition header; adds some #include directives required to be able to compile the generated header


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5435 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 13:57:26 +00:00
Giel van Schijndel 2d1b9d8694 Only shift the next parameter from ARGV if there are more than one (1) left in the C SQLite code generator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5434 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 13:49:49 +00:00
Giel van Schijndel 74784e3f6e Add two new struct-level directives to the mini database scheme meta language:
* %preLoadTable which specifies a code block to be executed just __before__ loading in all rows in a database
 * %postLoadRow which specifies a code block to be executed after every row has been succesfully loaded in a struct


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 13:09:53 +00:00
Giel van Schijndel 2b6b037ade * Rename and modify the SQL SELECT statement code generator to a code generator that produces C code for loading in the contents of database tables
* Add a template file which is used by this new code generator as a file "header"
 * Add a new struct-level directive to the mini database meta scheme language: %loadFunc which specifies that the above code generator should generate a loading function for this type plus what its name should be
 * Add a new entry for this code generator to the Makefile for testing purposes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 13:04:10 +00:00
Giel van Schijndel 40742f8d8a Give the code generators the ability to process command line arguments (before the parsing begins)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5431 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 12:46:53 +00:00
Giel van Schijndel 3f0b1959f2 For struct-fields of an enum type store references to the enum instead of just their name
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5430 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 12:16:55 +00:00
Per Inge Mathisen ba1df9e976 Fix bug #11979: Distorted terrain tiles after savegame r5399, caused by r5399.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5429 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 19:20:00 +00:00
Per Inge Mathisen ee6452eb64 Revert r5426. It will not work quite like that, since the pointers refer
to a list in audio.c. The horror! The horror!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5428 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 18:24:42 +00:00
Dennis Schridde f77542e2f8 Move config dir on Windows back to My Documents
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5427 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:46:45 +00:00
Per Inge Mathisen 74aeca0093 Change current_queue_sample to a pointer to an AUDIO_SAMPLE instead of
an integer value. This fixes the problem of AL_INVALID being used for
invalid values, while it is really a perfectly valid ID for a sample.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5426 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:45:33 +00:00
Per Inge Mathisen 4d1d5b4c11 Add an error check to patch #1082: Fix AL_INVALID_NAME bug, to catch the
currently impossible case of the sample not being in the active list.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5425 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:11:58 +00:00
Freddie Witherden 4f07f76034 Add an initial spacer implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5424 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:55:15 +00:00
Freddie Witherden f99660d986 Fix a bug in the resize asserts; fix another bug in the hBox implementation causing sizing and positioning of child widgets to fail.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5423 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:46:53 +00:00
Per Inge Mathisen 22d4eb3fe1 patch #1082: Fix AL_INVALID_NAME bug, sans one no good assert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:12:14 +00:00
Per Inge Mathisen 9bc09663f0 Prettify debug output from rebuildSearchPath
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5421 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 13:01:09 +00:00
Giel van Schijndel 40b6a5acf7 Don't store the name of the struct we inherit from in the "inherit" field, instead store a reference to that struct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5419 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 11:37:23 +00:00
Freddie Witherden 8e7d4d0d09 Commit hBox.[ch]; a preliminary horizontal layout container.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5418 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 11:19:29 +00:00
Freddie Witherden 0160a3e859 Make sure that we clear the cairo context before we begin drawing to it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5417 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 10:15:52 +00:00
Freddie Witherden f2b30f27c8 Update some function prototypes for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5416 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 09:15:13 +00:00
Freddie Witherden 2dc1063859 Allow widgetResizeImpl to work with containers (by re-laying them out).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5415 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 22:39:52 +00:00
Freddie Witherden 20d7cc06be Add support for masking mouse click events as well as mouse movement events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5414 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 21:19:58 +00:00
Freddie Witherden 8895e7efba Add experimental support for masks in betawidget. This allows for non-rectangular widgets.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5413 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 19:10:23 +00:00
Freddie Witherden dd86c02f97 Make it possible to translate Video Options
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5412 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 15:36:55 +00:00
Giel van Schijndel c135ae175f * ASSERT that VTOL weapon droids have more than zero weapons
* Allow non-weapon VTOL droids to be passed into vtolHappy (e.g. sensor, construction, etc.): this should fix bug #11865

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5411 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 13:11:27 +00:00
Giel van Schijndel 01108419db Did I say vtolHappy was somewhat error prone?
* Fix a bug in r5409 where I accidentily reversed the weapon-reloaded logic
 * Merge two nested if-statements


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5410 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:58:18 +00:00
Giel van Schijndel 81c8aa657c Further cleanup/refactor vtolHappy:
* Trash the bool-array (previously bitmask) code
 * Simply return false as soon as we've determined a VTOL isn't "happy" (i.e. marked as fully armed and healed)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5409 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:51:57 +00:00
Giel van Schijndel 316eae3a37 Improve readability/maintainability of function vtolHappy by using an array of bools instead of abusing a bitmask
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5408 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:47:04 +00:00
Giel van Schijndel 336656a0a8 Fix a bug introduced in r5406:
* VTOLs didn't ever become "happy" again (i.e. where marked as fully armed and healed)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5407 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:44:00 +00:00
Giel van Schijndel 9c501e4641 vtolHappy: move the body-health check outside of the weapon check
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5406 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:31:06 +00:00
Giel van Schijndel 7db47c827e vtolHappy (what IDIOT wrote this btw??): only construct a bitmask once to increase readability/maintainability
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5405 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 12:21:26 +00:00
Giel van Schijndel e8c9f8a0ec Rename function vtolDroid to isVtolDroid:
* This name more clearly describes what it does: determine whether the given droid has VTOL propulsion

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5404 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 10:15:00 +00:00
Giel van Schijndel 1a5277de1d Proper constness: make vtolDroid and vtolHappy take their DROID* parameter as const
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 09:38:55 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde bb9e24cf3f Reduce "raw" Makefiles to "win32" Makefiles by removing logic from configure.mk
Command variables stay, but DIRSEP variable got removed

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5401 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:28:50 +00:00
Dennis Schridde ec5aeaf3c7 Make "SCRIPT" release function just indirectly point to scriptFreeCode, so the function types are strictly compatible.
Clean scriptFreeCode's formating and remove unnecessary checks for ptr!=NULL before freeing.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5400 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:02:46 +00:00
Dennis Schridde 547ec7d49e TILE_NOTBLOCKING -> BITS_NOTBLOCKING, and store it in tileInfoBits instead of texture
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5399 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 13:57:03 +00:00
Giel van Schijndel 409bafbdf5 Turn the assert()s in the CHECK_STRUCTURE macro into ASSERTs so that we can see *which* assert failed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5395 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 11:28:01 +00:00
Elio Gubser 3695f6258b minor change of the power bar gradient
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5394 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 09:14:36 +00:00
Elio Gubser 147d658ade completed intfac1.svg
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5393 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 08:57:49 +00:00
Elio Gubser 7372b84341 Working on intfac2.svg, colours aren't correct in this version
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5392 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 08:42:19 +00:00
Giel van Schijndel a4e8c96977 Move the code to spawn GDB, and arrange for a communication pipe, to a separate function: execGdb
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5391 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:33 +00:00
Giel van Schijndel 619e1e1943 * Deal with a failure of exeve() by writing a debug message indicating that it failed and terminating the child of our fork()
* Flush the write end of the pipe after writing all GDB commands into it
 * Process the return data (both return value and the contents of the output integer) from waitpid()

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5390 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:25 +00:00