Commit Graph

1084 Commits (e92207f7e88091c8ac076b78b97caf9bf059c82b)

Author SHA1 Message Date
Giel van Schijndel e92207f7e8 * Prevent out-of-bounds coordinates from reaching map_Height and causing a segfault in the process
Patch by Watermelon

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1576 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 08:49:13 +00:00
Giel van Schijndel e252c12161 remove an unnecessary debug-statement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1575 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 08:45:44 +00:00
Giel van Schijndel 9c0a67102d * Utilize OggVorbis decoding function from oggvorbis.[ch] instead of own implementation
* char* -> const char*

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1574 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 01:08:48 +00:00
Giel van Schijndel c4d97027ba * Fix a memory leak (didn't free the buffer we received, after using it)
* Remove the ability to decode into a specified buffer from sound_DecodeOggVorbis altogether, we now only use a buffer we malloc'ed ourselves
  * this might be slightly slower for streaming (depending on the malloc implementation), but can be easily optimized away by just increasing the buffer size (which IMO is a better optimization, because it's _a_lot_ simpler)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1573 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 00:30:37 +00:00
Giel van Schijndel 8a5c7d9f6d * remove ability to resize external buffer (realloc) because this made the code overly complex while providing only little gain
* instead we now just calculate the precise amount of memory needed ahead of time and just malloc for decoding of each track (decoding only occurs while loading so these extra malloc calls shouldn't go at the expense of performance)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1572 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 00:04:37 +00:00
Giel van Schijndel bfad55739b * modularize OggVorbis decoding code:
* remove OpenAL dependency of oggvorbis.[ch]
  * move sound_DecodeOggVorbisTrack to openal_track.c

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1571 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 23:52:51 +00:00
Ari Johnson d84e7fbf27 Warning linting on Mac OS X
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1570 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 20:42:18 +00:00
Ari Johnson bf0a74258a Updated Xcode project
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1569 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 20:41:51 +00:00
Giel van Schijndel c4ad4d1ca8 * remove a possible memory leak in sound streaming code
* some minor code cleanup

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1568 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 19:24:46 +00:00
Giel van Schijndel 68abda7ae7 make -C po update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1567 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 18:00:08 +00:00
Giel van Schijndel bdb506f697 * move OggVorbis decoding functionality to oggvorbis.[ch]
* did _not_ add copyright statement for "Eidos" to new files since Eidos never wrote anything about this OpenAL/OggVorbis code (if anyone thinks I'm wrong in doing this, please say so on the mailinglist)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1566 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 17:58:27 +00:00
Giel van Schijndel 1643e335e4 * remove unneeded header include directives
* use plain data types where appropriate
 * move the decision for streaming to a parameter of the decoder function (less tight coupling of client to internal decoder callbacks)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1565 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 16:55:53 +00:00
Giel van Schijndel 53a8aebb9c * Remove "inline" keyword from function gridIterate as it is declared "extern" in the header file and used in other files as well (but wasn't called anywhere in mapgrid.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1564 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 15:21:30 +00:00
Giel van Schijndel 805f51bc75 * remove use of "template" as a variable name
This prevents nameclashes with the C++ "template" keyword when compiling with a C++ compiler.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1563 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 14:15:46 +00:00
Giel van Schijndel d6758391d8 * Fix nameclash of <png.h> with lib/ivis_common/png.h
* renamed lib/ivis_common/png.[ch] to lib/ivis_common/png_util.[ch]

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1562 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 14:09:33 +00:00
Ari Johnson c62421a6ad Updated Xcode project to reflect pcx.c -> png.c change
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1561 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 02:10:22 +00:00
Giel van Schijndel 82eee99004 * Move PNG dumping code from screen.c to png.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1560 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 23:00:38 +00:00
Giel van Schijndel aff4430378 * Move PNG specific code to png.[ch] (PNG saving code still needs moving though)
NOTE: this _WILL_ require updating the MSVC project file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1559 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 22:19:21 +00:00
Per Inge Mathisen e127a1d32c Code cleanup and remove unused code. There should be no behaviour changes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1558 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 21:42:22 +00:00
Giel van Schijndel 587498fbb1 * Clear up assert x&y asserts in map_Height by specifying the specific values there
* Use macro WORLD_COORD() instead of `<< TILE_SHIFT`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1557 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 21:26:43 +00:00
Dennis Schridde 8455086b4b Remove deleted bsp files from vcproj
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1556 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 20:05:07 +00:00
Per Inge Mathisen 17d9b945fb Cosmetic cleanup of flattenimd function for more readability
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1555 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 18:02:07 +00:00
Giel van Schijndel 675c4a0a57 * Keep X&Y values passed to map_Height (directly or indirectly) within safe range
Patch by Watermelon: display3d.c part of projfix13e (with fixes by Per; MAX/MIN and append - 1 to fix indexing; did not include code cleanup)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1554 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 17:32:19 +00:00
Giel van Schijndel cb6bd9bd2b * Keep X&Y values passed to map_Height (directly or indirectly) within safe range
Patch by Watermelon: combat.c part of projfix13e

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1553 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 17:25:03 +00:00
Giel van Schijndel 7ea54b2f8c * Fix target attack weight/priority for dead droids
Patch by Watermelon in Message-ID: <ca0601900704280511l265fdebbl23629f2b3cabcda7@mail.gmail.com>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1552 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 15:31:43 +00:00
Per Inge Mathisen 123475ef6b Reorder some code for readability.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1551 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 12:38:21 +00:00
Dennis Schridde e5e418c480 - Sample prototype for a PNG saving function
- Vector2f type which will be needed for texture coordinates
- Output adjustment for pie_AddTexPage


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1550 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 00:58:39 +00:00
Per Inge Mathisen 03c620620b Fix bug that would prevent IMDs with more than 256 points from being
properly flattened.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1549 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 23:26:20 +00:00
Dennis Schridde e9cfca5bb2 - WORLD_COORD() and MAP_COORD() macros to make world->tile and tile->world conversions (>>TILE_SHIFT,<<TILE_SHIFT,*TILE_UNITS,/TILE_UNITS) better readable
- Remove unecessary copying and code duplication from drawTerrainTiles
- Remove more BSP and unused code
- pie_Pagename -> pie_MakeTexPageName
- pie_AddBMPToTexPages -> pie_AddTexPage
- Whitespace and formating
- Fix hardcoded SKY_TEXPAGE id, which depends on the loading order in the wrf file. Changed to string (filename).
- iTexPage.textPage3dfx -> iTexPage.id
- Prevent unecessary texpage switching in pie_DrawTexTriangle


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1548 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 20:21:16 +00:00
Dennis Schridde 24c2c3296d - Remove unused function drawTexturedTile
- Increase drawed terrain size to 64 tiles
- (re)move some variables


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1547 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 13:53:41 +00:00
Per Inge Mathisen 4b36d353f2 Remove the unused iV_IMD_PSXTEX and iV_IMD_XTEX flags. The TYPE directive in
IMD files is now totally ignored.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1546 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 11:12:14 +00:00
Per Inge Mathisen b994a384c6 Simplify IMD loader code by removing support for IMD version 1 and the
unused NOTEXTURE directive. I believe the NOTEXTURE effect can be achieved
simply by not specifying a texture instead in more recent IMD versions.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1545 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 10:49:45 +00:00
Per Inge Mathisen 1b5cbb1c1e Remove flags from IMDShape since they were unused. Clean up IMD loader some
more. Remove unused GetLastHashName() and SetLastHashName().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1544 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 10:36:21 +00:00
Dennis Schridde d945f682b3 - Change droid->direction to float, this should fix issues with vtols entering a loop around the target (Original patch by The Noid, edited by me)
- Make trigonometry tables static and remove usage of FRACT macros (trig.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1543 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-27 10:25:03 +00:00
Dennis Schridde 5bd6e84852 - Change droid->direction to float, this should fix issues with vtols entering a loop around the target
- Make trigonometry tables static and remove usage of FRACT macros (trig.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1542 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-27 10:21:17 +00:00
Giel van Schijndel d86f1dd046 * remove assert in sound code (iSample != SAMPLE_NOT_ALLOCATED), this assertion is triggered much too oftenly, probably because we request OpenAl sources but never release them anymore, which is the result from depending too much on client code to be nice and tell the soundlib to release it
* remove a senseless forward declaration

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1541 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-26 17:51:17 +00:00
Giel van Schijndel b51409ce3b * Fix a segfault caused by out of bounds array access. Caused by using a signed, negative integer as an unsigned one.
* This probably results in unintended (but defined!) behaviour, instead of firing a missile at an invalid location we still fire the missile but to coordinates (0,0) which really is not a long term fix

 * Patch by Watermelon, slightly modified by me
 * bug reported by Hikaru (on IRC)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1540 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-26 17:25:01 +00:00
Ari Johnson ae3e4927c7 Improved MacOS X port to be better at finding its working directory and
not require a startup script. (It can now be debugged from within Xcode.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1539 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-26 17:11:57 +00:00
Ari Johnson 185060e303 Updated Xcode project file to reflect removed BSP files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1538 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-26 05:45:10 +00:00
Per Inge Mathisen 69e282f30b Cleanup related to old BSP code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1537 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-24 20:15:41 +00:00
Per Inge Mathisen 12ca036695 Remove BSP data from the PIE files that have this.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1536 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-24 19:54:57 +00:00
Giel van Schijndel 4cae62ba78 * update POTFILES.in to match removal of bspimd.c in r1533
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1535 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 22:13:30 +00:00
Giel van Schijndel 4548e56fe2 * Fix some signed vs unsigned comparisons
* Turn some implicit conversions of void* to something* into an explicit cast
 * remove some redundant commented out code
 * refactor some error checking code ( was: if (!error) normal exec path; else deal with error; now is: if (error) deal with error; normal exec path )

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1534 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 22:08:53 +00:00
Per Inge Mathisen 534472ce72 Remove used but ineffectual BSP IMD code. BSP data from PIE files not yet removed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1533 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 20:40:41 +00:00
Per Inge Mathisen dad0851e7e Remove unused PIETOOL code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1532 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 20:29:43 +00:00
Per Inge Mathisen ea932d1033 Remove more unused flags
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1531 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 18:45:24 +00:00
Per Inge Mathisen 3f97cc51b7 Remove many unused IMD flags and an unused debug function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1530 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 18:11:01 +00:00
Per Inge Mathisen 9e1d57e718 Permit compilation without binary space partitioning. To test this, comment out
the #define BSPIMD line in lib/ivis_common/ivisdef.h header.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1529 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 17:59:13 +00:00
Dennis Schridde 153f21f20d Fix LC_MESSAGE for all systems missing it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1528 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 15:21:18 +00:00
Dennis Schridde ac178aa312 Revert to GNU gettext.h and move MSVC defines to the vcproj.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1527 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 14:30:34 +00:00