Commit Graph

968 Commits (216eb52e3c88a4afbd09b494d2b968dfb11e92b0)

Author SHA1 Message Date
Giel van Schijndel 216eb52e3c * Fix bug #8759 (in Skirmish mode it was possible to disable all AI players, we now check for that and make sure that at least one AI player is always available in Skirmish)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1451 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 14:48:23 +00:00
Giel van Schijndel 0b359cf30b * Add a rudimentary Latin translation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1450 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 12:34:58 +00:00
Giel van Schijndel 50f7a4a019 * move a lot of multiplayer strings out of the string resource system into sources (with gettext markup)
* `make -C po update-po`
 * provide some translations for the Dutch translation

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1449 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 12:28:50 +00:00
Dennis Schridde 80d32d6c55 - svn:eol-style for .po files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1448 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 00:14:32 +00:00
Giel van Schijndel a4a14cd90e * Fix segfault which occurred when loading up any skirmish savegame
- segfault occurred in map_Height(UDWORD x, UDWORD y) (map.c) when called by addLandingLights (mission.c), we now check whether our coordinates are negative (and as such invalid) before sending them to map_Height
 * while at it clean up addLandingLights by splitting large pieces of code repetition into another (inline) function

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1447 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-12 22:39:08 +00:00
Dennis Schridde 7b9257c949 Properly discard the return value of textdomain()/bindtextdomain().
Not doing this leads to a "statement with no effect" warning in case NLS is disabled.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1445 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-12 20:28:52 +00:00
Giel van Schijndel c028586ee4 Cleanup:
* AUDIO_SAMPLE
  * remove unused variable iLoops from the struct
  * rename bRemove to the more descriptive title of bFinishedPlaying
 * change sound_SetupChannel to return a BOOL rather than be return void and throw its output value in a pointer
 * make audio_Update() return void (instead of BOOL) since its output value was TRUE always anyway, plus all its callees ignored the output value
 * increase readability of lots of functions in audio.c
 * remove unused (and nothing doing) functions: audio_StopTrack, audio_SetTrackPan, audio_SetTrackVol and audio_SetTrackFreq

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1444 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-12 17:42:15 +00:00
Giel van Schijndel 6671750da0 * move some pieces of gettext.h into the conditional `#if ENABLE_NLS` and provide dummies for them if NLS is disabled (the #else part of the definition), without this compiling with NLS disabled is impossible
* remove ptrlist.c from lib/gamelib/Makefile.raw
 * some modifications of char* -> const char*
 * modify typedef of audio callback function to take a parameter of `void *psObj` rather than `AUDIO_SAMPLE *psSample` to minimize exposure (psSample->psObj was the only thing used by all callback functions anyway)
 * modify all callback functions to match the new typedef's signature
 * modify all functions calling callbacks to match the new signature (I think I've got them all, but since passing a pointer to a void* parameter doesn't generate any compiler errors/warnings I might have missed one, which would lead to undefined behaviour)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1442 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-12 10:31:11 +00:00
Dennis Schridde e8da218797 Of course we need to leave room for ".png\0"...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1439 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:58:50 +00:00
Dennis Schridde 3cdae4332f - Fix a possible invalid write caused by writing up to 80 chars into a 64 char array.
The texture file in PIE files can now be up to MAX_PATH chars long.
- Find the reason for WZ discarding everything after the number in "page-123" styled texture references.
	This led to the problem with Grim's mod referencing the skybox texture instead of his own wall texture.
- Beautify some code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1438 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:55:54 +00:00
Dennis Schridde 25aa853f29 - Remove lots of inclusions of windows.h (and move inclusion of frame.h up)
- Remove "-%token <sval> TEXT" from audp_parser.y since it clashed with declarations in MinGW's Windows headers. It does still compile and run, but this may have harmed something anyway. Please check!
- Hack around DATADIR being defined by objbase.h in MinGW by undefining it before the inclusion of shlobj.h (incl. in main.c) This only works since the case that DATADIR is actually used on Windows is extremely rare.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1437 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:21:45 +00:00
Giel van Schijndel 79b8983220 * remove ^wrong^ rank translation of "Green" from Dutch translation (looks to much like translation for "Rookie")
* revert changes to po/Makefile.in.in from r1417
 * add some makevars to raw makefile system
 * add definitions of gettext macros P_ and NP_ to raw makefiles (and remove Q_ and Qn_)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1436 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 22:09:53 +00:00
Dennis Schridde 0bba8687ee Remove AM_GNU_GETTEXT_VERSION since that was only used by autopoint.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1435 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 19:59:19 +00:00
Stefan Huehner 796eb23f27 remove buildpos.c and buildpos.h which are completely
enclosed by comments and have been since r1 (Initial Version)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1434 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 19:02:02 +00:00
Stefan Huehner 932ecd9f05 remove forward declarations from source file which are
picked up from corresponding header.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1433 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 19:01:16 +00:00
Giel van Schijndel fd1ed75a3b git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1432 4a71c877-e1ca-e34f-864e-861f7616d084 2007-04-10 18:34:50 +00:00
Stefan Huehner aa1cb2ec14 Remove references to already removed header files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1431 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:29:58 +00:00
Stefan Huehner 00286d398b Update Makefile.raw after ani.c removal
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1430 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:17:03 +00:00
Stefan Huehner f33eeb1413 inline the only function from ani.c in its only user (init.c) and remove
ani.c and ani.c altogether



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1429 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:13:08 +00:00
Stefan Huehner e40142efcb Remove the unused ptrlist implementation from gamelib
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1428 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:01:06 +00:00
Stefan Huehner 58869ba54d Remove 2 unused function declarations
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1427 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 18:00:33 +00:00
Dennis Schridde 697ccff2b6 Require gettext 0.15 here, too.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1426 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:57:51 +00:00
Stefan Huehner 72e455e1a5 The powercrypt module prevented cheating power-value
in ram by storing a encrypted value and checking against
this.
It not of use anymore as the client is completely 
open-sourced now...
Removing the module and all references



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1425 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:43:46 +00:00
Stefan Huehner 61622e29e4 Remove an unused define UNITS_PER_PLAYER
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1424 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:41:48 +00:00
Dennis Schridde 751e6c44f7 Use pgettext instead of a custom implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1423 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:36:16 +00:00
Stefan Huehner a641ac9381 remove aidef.h header and its references, as the only
user was in a comment



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1422 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:11:10 +00:00
Stefan Huehner 9eda7db8a1 Code-Cleanup: remove a lot of type,function,variable
declarations/definitions which are not used anywhere.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1421 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:01:53 +00:00
Giel van Schijndel c0fd40ff19 * revert changes of r1418 to droid.c and multiplay.c ( N_ macro was removed )
* since gettext_noop is always defined, remove the conditional definition of N_ which checks whether it is or is not defined

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1420 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:01:37 +00:00
Stefan Huehner 4d88263c9b Add registry_clear() to declarations, as it is exported
and used by other code.




git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1419 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 16:59:47 +00:00
Dennis Schridde 3c6c7b5b51 Cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1418 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 15:29:27 +00:00
Giel van Schijndel 79d4169bcd * fix two warnings in exceptionhandler.c
* add Q_ and Qn_ gettext macros (copied from Freeciv: GPL)
 * remove hack for ambiguous translations from droid.c; use Q_ instead
 * update makefiles accordingly
 * `make -C po update-po`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1417 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 14:06:14 +00:00
Per Inge Mathisen 96cb7cafc5 Ressurect -Wno-unused-label. Reorganize string.h includes so that
_GNU_SOURCE can take effect first, to silence stpcpy() warnings from 
bison generated code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1416 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 12:44:50 +00:00
Giel van Schijndel c31f807b94 * insert a hack into droid.c to circumvent ambiguity of the word "Green" (which is being used as a rank name as well as the color)
* `make -C po update-po`

PS The most feasible solution other than the above mentioned hack seems to me to use different gettext domains, I'm not sure how that should be implemented though

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1415 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 12:44:07 +00:00
Giel van Schijndel c3914a6ab2 * add the gettext no-op macro N_(string)
* use it in src/droid.c
 * throw some hardcoded strings (in a switch statement) in an array of strings instead (using N_ there as well)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1414 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 12:31:13 +00:00
Roman C e8e196f98e Fixed scorpion body having no VTOL and Wheeled propultions assigned in MP games.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1413 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 10:59:52 +00:00
Giel van Schijndel 365c37812d * Remove PIEPIXEL and change all of its instances to Vector3f (definition is exactly the same where types are concerned, only member vars were named different)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1412 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 10:47:20 +00:00
Roman C 153cb45fa6 Also fix the campaign version of templates.txt
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1411 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 10:33:27 +00:00
Roman C 459c66975e Fixed a VTOL template having no sensor.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1410 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 10:25:12 +00:00
Giel van Schijndel cc17299668 * remove internal forward declarations of functions already declared in the header
* use proper constness:
  * make some functions take arguments of `const char*` rather than just `char*` (also modified some functions' return values to return `const char*` where appropiate)
 * modify rank retrieval functions to use a central array instead; currently ranklimits (i.e. the amount of kills required to promote) is hardcoded in switch statements, as is the case with the names of those ranks
 * `make -C po update-po`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1409 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 22:09:27 +00:00
Dennis Schridde b3e17f6064 Make strict the default debug mode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1408 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 19:31:29 +00:00
Giel van Schijndel fc701e9595 * remove unused priority parameter from script function audio_module::audio (audio_track)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1407 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 17:45:30 +00:00
Giel van Schijndel ee27f41be7 * add -Werror-implicit-function-declaration to CFLAGS
* Fix a spelling error in a string in src/droid.c
 * `make -C po update-po`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1406 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 15:02:04 +00:00
Dennis Schridde 8952155c7a - Add -Wextra to debug=yes, as it doesn't generate so many new warnings
- Add -Wno-nonnull to debug=strict to make it compile (Remove it from AM_CFLAGS)
- Remove -Wno-unused-label as this warning is not generated anymore
- Fix a "... from incompatible pointer type" warning which led to a lot of strings (and associated functions) in the widget area becoming const
- Maybe found the reason for images in UTF-8 strings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1405 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 14:41:22 +00:00
Giel van Schijndel 80c250fd27 * merge 1364:1404 from trunk into branches/sound
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1404 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 14:35:02 +00:00
Giel van Schijndel 092afb2a01 * remove sound_CheckSample: only contained asserts, makes debugging difficult if you don't know where the assert really came from
* moved asserts to only two callees of sound_CheckSample

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1403 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 12:50:48 +00:00
Giel van Schijndel d42a6ba8a4 * Fix C89 compatibility
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1402 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 12:25:06 +00:00
Giel van Schijndel 3c874190c7 * remove the (unused) ability to decode tracks from memory buffers
* move construction (allocation and initialization) of struct TRACK to openal_track.c where it is also decoded

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1401 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 12:16:31 +00:00
Giel van Schijndel 011d7187e2 * audp_parser can now only parse from a PHYSFS_file, it won't parse directly from a memory buffer anymore
* resource types ANI and ANIMCFG are now read directly from file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1400 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 11:31:05 +00:00
Gerard Krol 28fe84976e Removed unused "cluster" functions from the sound code. I suppose
clusters are groups of close units.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1399 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 10:56:26 +00:00
Giel van Schijndel e95423ac68 * set filename from GetLastResourceFilename() in sound_ConstructTrack (this filename can at some point be read back into scripts, so it does matter how this filename is formatted, since loading from buffer originally used that function, we now use it for both file loading and buffer loading)
* change audp_parser/lexer to be able to read directly from a file (through PHYSFS)
 * change data.c's mapping for "AUDIOCFG" to use the parsing directly from file
 * rename dataAudioLoadFile to dataAudioLoad
 * add a second list with load function mappings to audio.c for load from file mappings
 * add a second piece of iteration code for the file mapping list

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1398 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-08 23:25:48 +00:00