Commit Graph

4503 Commits (410c51136336904f7cfd06addf3c92f07367c65f)

Author SHA1 Message Date
Per Inge Mathisen 9e57d0b4ce Cosmetic improvement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5489 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 09:42:00 +00:00
Giel van Schijndel 2ae0d61f00 * Get rid of enumerator INVALID_SUBCLASS from WEAPON_SUBCLASS
* Modify getWeaponSubClass's API so that we don't need to depend on enum WEAPON_SUBCLASS containing an "invalid" enumerator
 * Move enums WEAPON_CLASS and WEAPON_SUBCLASS from statsdef.h to stats-db2.tpl
 * Rename NUM_WEAPON_CLASS and NUM_WEAPON_SUBCLASS to WC_NUM_WEAPON_CLASSES and WSC_NUM_WEAPON_SUBCLASSES respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5488 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 22:50:23 +00:00
Giel van Schijndel 136c2b245e Move enums FIREONMOVE and TRAVEL_MEDIUM from statsdef.h to stats-db2.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 22:27:41 +00:00
Giel van Schijndel dc0aa99fac Allow empty value prefixes as well (using the %valprefix directive)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5486 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 22:23:19 +00:00
Giel van Schijndel 4b850382ab Add a new template file to automatically generate enum definitions (currently in statsdef.h) from. This template will eventually be used by the SQLite code generator to generate S
QLite stats-loading code from.
 * Move 4 enums from statsdef.h to stats-db2.tpl: COMPONENT_TYPE, LOC, BODY_SIZE and PROPULSION_TYPE
 * #include stats-db2.h (generated from stats-db2.tpl) in statsdef.h

NOTE: The automatically generated file (stats-db2.h) is included in the repository so that no changes in the buildsystems are required. The autotools build system is updated to be able to update stats-db2.h if required.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5485 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 22:02:48 +00:00
Giel van Schijndel b1d12b5a1a * Add a new enum-level qualifier: %valprefix; this changes the default prefix (which is just the enum's name with '_' appended) prefixed to all enum values
* Add a new enum that uses this: COMPONENT_TYPE


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5484 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 21:24:39 +00:00
Giel van Schijndel 87ad15af6a * Add a new struct-level directive: %suffix
- This directive adds a suffix to the names of structs (in the generated C code) and the subclasses that inherit from that struct
 * Use %suffix instead of %prefix in test_code.tpl


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5483 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 21:11:24 +00:00
Giel van Schijndel 2a11247d7e Add a new enum-level directive: %max "param":
* This will add an enumerator to the end of the generated C enum code with "param" as its name (prefixed by the enum's name of course)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5482 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 21:02:58 +00:00
Giel van Schijndel eb7bd7be49 Update test_code.tpl as well to match r5480's change in syntax
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5481 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:52:57 +00:00
Giel van Schijndel 118a83f42a Slight change in syntax to not require (and disallow) a semi-colon after struct-level directives that open a new scope (terminated with "end\;"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5480 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:52:09 +00:00
Giel van Schijndel c7f60d7e7d #include "lib/sqlite3/sqlite3.h" in generated SQLite loading code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5479 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:44:14 +00:00
Giel van Schijndel 82a2aea03f c_structdef_cg.pm: Fix an error where we forgot to use the \{"name"\} member of the hash thus resulting in bad code being generated
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5478 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:43:26 +00:00
Dennis Schridde c2f5375cb2 Remove crossbuild hacks, which probably not worked like that on Windows anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5477 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:17:13 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Giel van Schijndel 77bc79ab88 Remove the TARGET option (I shouldn't have added it back) and select the windows-specific link line for the win32 makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5475 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 19:52:33 +00:00
Giel van Schijndel 66bfab9dcf Prefix all propulsion types (from enum PROPULSION_TYPE) with `PROPULSION_TYPE_` to qualify these names more fully
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5474 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:59:35 +00:00
Giel van Schijndel 6fcbc73c2c Merge the DATA build option (for the win32 makefile build system) into INSTALLER as the data packages are only required when building an installer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:51:31 +00:00
Giel van Schijndel a81de28500 Add the TARGET option to the win32 makefile system's config template
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5472 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:36:37 +00:00
Giel van Schijndel d914e3cccd Don't use the `mingw32-` prefix in the win32 makefiles, as MinGW's default distribution doesn't provide all executables with `mingw32-` prefix, but it does provide all of them without the prefix
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:26:11 +00:00
Giel van Schijndel da5f5edd81 include config.mk from the `makerules` directory, not the base/root directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5470 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:19:17 +00:00
Giel van Schijndel 26a9168ca9 Add a new configuration option "music_enabled" which can be used to disable the ingame music with
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5468 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 16:05:19 +00:00
Giel van Schijndel 623044cf7c Add some debug messages when failing to create an AUDIO_STREAM in sound_PlayStreamWithBuf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:27 +00:00
Giel van Schijndel f6853ed368 * Get rid of enumerator INVALID_PROP_TYPE from PROPULSION_TYPE
* Modify getPropulsionType's API so that we don't need to depend on enum PROPULSION_TYPE containing an "invalid" enumerator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5466 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:21 +00:00
Giel van Schijndel b5ff9610ea * Remove TODO comment about needing to add an IMD_Model type, because that type already exists
* Add a comment, describing the `flameModel` field


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5465 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 11:03:39 +00:00
Giel van Schijndel a80776b9fa don't use the file header template if it isn't available in the c_structdef code generator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5464 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 10:58:13 +00:00
Dennis Schridde faf8153b50 Old versions for Flex do not like the space in -o filename
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5463 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 09:35:10 +00:00
Giel van Schijndel b3c43881a8 Don't #include "stats-db2.h" as it doesn't exist (is a testing file in my working copy)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5462 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 21:02:13 +00:00
Giel van Schijndel af9a1c2a18 Declare propulsionType as PROPULSION_TYPE (enum) instead of UBYTE in PROPULSION_STATS (struct)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5461 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 21:00:09 +00:00
Giel van Schijndel c5b87954bc Add a new field type to the mini database scheme meta language: C-only-field
* This is a dummy type that causes the rest of the line to be included literally in the struct's definition
 * Use this field type to add ppIMDList (member var of BODY_STATS in statsdef.h)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5460 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 20:47:17 +00:00
Giel van Schijndel 2d6958306e Fix a compile error; forgot to declare variable "dummyVal" in r5454
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5459 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 20:43:24 +00:00
Giel van Schijndel 1170798c66 Add a field to hold a component's body points (COMPONENT now fully matches COMPONENT_STATS from statsdef.h)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5458 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:17:19 +00:00
Dennis Schridde b770951532 makefile.raw -> makefile.win32
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5457 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:17:15 +00:00
Per Inge Mathisen 1f831ebd3d Add beginnings of self-test to openal and general audio subsystems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5456 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:07:42 +00:00
Giel van Schijndel 47e7107aea Remove `systemPoints` from the code as it's never used.
It's loaded in from the stats files but unused throughout the rest of the code.

Read into a temporary dummy variable when loading stats.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5455 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:07:20 +00:00
Giel van Schijndel 0d997d617f Remove `hitPoints` from the code as it's never used.
It's loaded in from the stats files and copied all over a dozen places, but never actually __used__.

NOTE: This __shouldn't__ break savegames, I've checked it quite thoroughly, but game.c is evil & large enough that the chance exists I made a mistake in this department.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5454 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:02:19 +00:00
Giel van Schijndel c6c5c981e6 Remove all TECH_LEVEL related cruft from the code as it's read from the stats files but unused throughout the rest of the code.
Read into a temporary dummy variable when loading stats.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5453 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 18:28:37 +00:00
Giel van Schijndel 44f3bf5f69 Only declare the function name of the %loadFunc directive to be declared in the file where the %loadFunc directive is located.
Don't declare the return type and parameter list to originate from the "original" source file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5452 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 17:55:18 +00:00
Giel van Schijndel be7aef1a17 Convert dashes (-) to undersquores (_) as well in header guards (fixes a syntax error with C's preprocessor)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5451 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 17:45:56 +00:00
Giel van Schijndel db03e5b276 include (perl directive "require") code generators from the same directory as the language parser
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5450 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 17:15:44 +00:00
Freddie Witherden 7d5723455c Add keycode.h to the repository (which I forgot in r5445).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5449 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:51:17 +00:00
Per Inge Mathisen 2aeda4d91e Improve playlist selftest. It now covers the entire playlist API. Remove unused
playlist declaration from header file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5448 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:19:57 +00:00
Giel van Schijndel 2e3280a845 Pass the output file as a command line parameter (and fall back to stdout if none is provided)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5446 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:05:41 +00:00
Freddie Witherden 631ff7879b Add a dedicated text input event. Switch to our own custom keycode enum rather than depending on SDLs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5445 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:46:46 +00:00
Giel van Schijndel c8dbcd6d2d * Don't refer to a "flame IMD" when loading an IMD_Model, refer to "the IMD for field \"$fieldName\"" instead
* Reference records by their ID number (unique_inheritance_id) instead of some user-code dependent function

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5444 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:30:13 +00:00
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