Commit Graph

1057 Commits (03c620620bdecdc1e7878fbce0e06dff66865159)

Author SHA1 Message Date
Ari Johnson 91535c6596 Converted MacOS port to use Xcode to produce a universal binary. Warzone
will henceforth require MacOS 10.4 "Tiger" to run.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1492 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 03:10:53 +00:00
Christian Vest Hansen c1917ef076 + updated Danish language translation to mirror recent additions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1491 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 21:11:08 +00:00
Giel van Schijndel aa9a519794 * Remove support for decoding (and encoding in case of screenshot dump code) of JPEG pictures
* Remove some dead (commented out) & dirty code from multiint.c which used JPEG code (image_load_from_jpg)
 * Remove dead (commented out) code from screen.c which used JPEG code (function static GLuint image_create_texture)
 * Remove unused backdrop types from pieblitfunc.[ch]
 * Convert last JPEG files into PNG, add a "comment" property on those: "All of these are converted from JPEG files, so this is JPEG quality."

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1490 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 18:24:31 +00:00
Giel van Schijndel 5756890d20 * Remove inclusion of <setjmp.h> which apparently libpng wants to include first (in <png.h>)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1489 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 17:48:19 +00:00
Giel van Schijndel baa3dcbb2a * Add PNG screenshot dumping code, when pressing F10 (with a default keymap) both a JPEG and PNG screendump will now be output
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1488 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 16:53:28 +00:00
Dennis Schridde 761fd8bfb2 MSVC makes a difference between headers and sources...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1487 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 16:33:19 +00:00
Giel van Schijndel fd3324a9fe * pcx.c: use size_t for memory buffer length (size_t is the appropiate type for this, unsigned int is not)
* change macro BUFFER_SIZE to static const JPEG_bufferSize (compiler will optimize this away)
 * char* -> unsigned char*

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1486 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 12:58:22 +00:00
Giel van Schijndel c3683f64dd * make PNGheader be explicitly unsigned (required for compilers that define 'char' as being signed)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1485 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 12:23:54 +00:00
Giel van Schijndel cbf89c88d8 * provide updated MSVC project (thanks to "Purple Monkey" for that: http://wz2100.net/forum/index.php?topic=597.msg4921#msg4921 )
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1484 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 23:39:38 +00:00
Giel van Schijndel f49c5cbdd5 * change pie_PNGLoadMem to pie_PNGLoadFile which (as the name suggests) now loads textures directly from PNG files (rather than memory buffers)
* change pie_ReloadTexPage to use files instead of memory buffers as well
 * change data.c's resource handler mappings to now load some more fileformats directly from file (all that directly or indirectly used to depend upon pie_PNGLoadMem)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1483 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 22:29:44 +00:00
Giel van Schijndel 7356aa1b9a * make pie_PNGLoadMem play nice and take the buffer size as an argument rather than assuming it to be 10000000 (10 million)
* do the same with pie_ReloadTexPage which calls pie_PNGLoadMem
 * char* -> const char* in tex.c
 * fix a syntax error from r1481

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1482 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 20:07:56 +00:00
Giel van Schijndel dcf4cb3263 * turn `integer overflow` debug message into an assert
* dump less information in the debug log if the assert is triggered (just "integer overflow; no more filenumbers available.")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1481 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 20:00:12 +00:00
Giel van Schijndel 7527047316 * char* -> const char*
* make screen dumping code (screen shotstuff) more readable and friendly to edit (behaviour should be unchanged)
 * change screenDumpToDisk:
  * now returns void (rather than the target file name of the screen shot) since its only callee (a keymap callback) ignored the return value
  * use snprintf now instead of sprintf (to prevent buffer overflows)
  * add code to detect integer overflows (maybe we should just abort() on this condition?)
 * remove an empty and commented out function (screenTextOut)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1480 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 19:22:01 +00:00
Dennis Schridde 345581c9ac Fix a bug introduced in r1469, which produced gaps where the buildings should be and made the terrain jump around. (display3d.c)
Additionaly:
- Cleanup indention
- Remove an unused, commented out function
- Make code a bit more readable
- Insert suggestion into display3d.h (playerXTiles and rx are only use in one otehr file each, so maybe we could wrap them into a function for the purpose of encapsulation. The comment is ugly, I know.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1479 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 19:09:09 +00:00
Giel van Schijndel 300f691b0b * Fix error from last commit where the wrong pointer was used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1478 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 17:49:15 +00:00
Giel van Schijndel 09b08c1582 * remove senseless use of malloc (we now statically allocate on the stack)
* remove goto, placed the "goto"-code in an inline function instead
 * make pie_PNGLoadMem const correct (i.e. take a buffer we don't write to as const char*)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1477 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 17:34:11 +00:00
Dennis Schridde ba31124ecd Minor german translation update: ~60%
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1476 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 14:56:01 +00:00
Giel van Schijndel 3c407e0972 * some const correctness (char* -> const char*)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1475 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 14:53:09 +00:00
Giel van Schijndel ae88cdbf7d * Apply patch #691 (fixes typos in names.txt and cam2strings.txt)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1474 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 14:06:03 +00:00
Giel van Schijndel 1f405057ff * Fix incorrect po-file for Dutch translation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1473 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 13:46:33 +00:00
Giel van Schijndel 51347f365c * remove MP3 decoding support
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1472 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 13:44:41 +00:00
Giel van Schijndel 1d160dbfe0 * remove now unused functions for working with hashnames on audio tracks
* `make -C po update-po`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1471 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 22:46:57 +00:00
Giel van Schijndel 936205a9ee * Fix bug #8938 (introduced in r1251) which occurred due to saving/loading functions of ST_SOUND being dissymmetric (save function stored the fileName, load function interpreted it as a UDWORD hash)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1470 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 22:36:54 +00:00
Dennis Schridde 5f87829d26 Clean indention and make the code a little bit more readable.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1469 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 20:45:09 +00:00
Per Inge Mathisen a9f120adec Add missing includes to quelch warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1467 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 18:48:13 +00:00
Giel van Schijndel 237e809d21 * Fixed a segfault in the the code producing "research completeded"-messages (caused by wrongly assuming we wouldn't be fed a NULL pointer)
* Move that code out of the if-statement since the if-branch of that piece was exactly the same as the else-branch

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1466 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 18:21:06 +00:00
Giel van Schijndel f8c164fdde * Fix inconsistent newlines and set svn:eol-style to native in lib/ and src/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1465 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 14:15:31 +00:00
Giel van Schijndel e861775906 * fix by charon for segfault caused by not setting (non-static global) pointer to NULL after freeing it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1464 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 13:28:24 +00:00
Giel van Schijndel 9beab09917 * change some abuses of pointer-arithmatic (or pointer-magic in this case really) into array indexing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1463 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 12:49:29 +00:00
Dennis Schridde 585db5249e Simplify code, especially the prepending of the debug part.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1462 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 12:46:08 +00:00
Dennis Schridde 53d9cc48e4 Sorry for the magic number in the last commit...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1461 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 12:12:52 +00:00
Dennis Schridde d3408cec7b - Remove mem.h and references
- Fix possible illegal writes for research messages


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1460 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 12:01:36 +00:00
Dennis Schridde ce16856887 FREE->free, MALLOC->malloc (sed+review)
This patch will create crashes where the code expects FREE to set the pointer to NULL! (Those problems should be fixed anyway.)
The only occassion where I saw this is when quiting a game, so it is not too much of an issue.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1459 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 10:43:05 +00:00
Dennis Schridde 2707ce0fd6 Passed wrong pointer...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1458 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 10:35:23 +00:00
Dennis Schridde 91cf893778 Show name of the finished research in the console.
Original patch by Watermelon (slightly modified).
Based on an idea by TheNoid and Kreuvf.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1457 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-14 21:57:52 +00:00
Stefan Huehner 68da5a9613 Make some more char* -> const char*
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1456 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:18:49 +00:00
Stefan Huehner 34fd2afd1f Make some more char* -> const char*
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1455 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:11:03 +00:00
Giel van Schijndel a7119c1600 * change the direction of the AI player enabled check so that it will enable the bottom one if it is disabled (looks better)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1453 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:05:43 +00:00
Stefan Huehner c0a44c70e2 Make some more char* -> const char*
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1452 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:04:08 +00:00
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