Commit Graph

1067 Commits (aff44303789fab0d513f0d46d22b97c93aeaa9be)

Author SHA1 Message Date
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
Giel van Schijndel 825ac28558 * use malloc instead of a variable sized array (is slower, requires more maintenance work, but is C89 and as such MSVC compatible, *sigh*)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1526 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 14:28:04 +00:00
Dennis Schridde 3eeaacbb0b Fix PNG code for MSVC (which doesn't support C99 variable sized arrays). Patch by v2k5.
Update AUTHORS


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1525 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 14:14:40 +00:00
Dennis Schridde 5c79953e18 Watermelon: projfix11a:
1. Fixed a bug (I made some parenthesis order mistakes, near predictX and predictY, which might corrupt predictX, predictY)
2. Fixed a value corruption when predictX or predictY becomes negative, since proj_SendProjectile only expects UDWORD (now set them to 0 when they become negative, so the turret wont try to fire projectiles to some off-map coords)
3. Fixed zero height building bug (invincible rearm pads) when an imd's ymin is equal to ymax...

lib/ivis_opengl/screen.c: \param channels


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1524 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 14:08:05 +00:00
Giel van Schijndel 486ac3ed11 * Use a variable sized array for the scanline array
allocated on the stack instead of the heap, which usually is a lot faster => stack alloc = O(1), heap (malloc=heap allocater) usually O(n) or O(log n)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1522 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-22 22:36:38 +00:00
Giel van Schijndel b45388b30a * When freeing global pointers set them to NULL (patch by vs2k5)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1521 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-22 21:47:06 +00:00
Giel van Schijndel c3713f7cf5 Make sure that files added by the installer are also removed by the uninstaller (Authors.txt and ChangeLog.txt)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1518 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-22 15:32:49 +00:00
Dennis Schridde e02cb3b864 Correct Thomas' entry in the AUTHORS file and remove --enable-data (data is built automatically on install or on make -C data data if needed.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1517 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-22 15:27:02 +00:00
Dennis Schridde 8050635b95 Fix bug#6700, Assault Gun Guard Towers had wrong names/stats. The fix for campaign might be wrong.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1516 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 15:46:16 +00:00
Dennis Schridde 3b09befbaa Update authors
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1515 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 14:27:38 +00:00
Dennis Schridde 2674023d77 New masterserver by Gerard and Kamaze
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1514 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 14:20:20 +00:00
Dennis Schridde 49b314f6a2 - Fix masterserver disconnect (patch by Gerard)
- Show hostname:port on connection errors
- Make gameserver and masterserver port configurable (as well as the masterserver name)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1512 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 13:46:28 +00:00
Dennis Schridde d4f8ef1d55 Add Grim to the authors list
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1509 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-20 00:34:33 +00:00
Dennis Schridde 419d9215ef Bring back a comment that was removed a while ago
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1508 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-19 18:56:13 +00:00
Dennis Schridde 2e6ae61611 Remove accidentialy .pn image
Update to the last commit:
- Remove hard/soft pages
- Reorder file references in wrf files by page number
- Of course the files were moved to the appropriate location after the name changes in the references (fx`s, urban)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1506 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-19 18:19:49 +00:00
Dennis Schridde 6d55622b75 Several changes to texture loading:
- Be safer with stringlengths
- Create "page-123" texpages in pie_Pagename(). This code is needed since WZ might have loaded a different variant of a texpage (-urban,-arizona,...) and thus can only find it by the common "page-123" part
- Output filename on errors in in PNG loading
- Be a little bit less forgiving for wrong case
- Convert all TEXTURE references in PIE files to lowercase and replace 'fx`s' with 'fx', also replace 'urban area' and 'bases urban' with just 'urban' to keep consistency


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1505 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-19 18:04:41 +00:00
Giel van Schijndel 0f1188f387 * Patch by vs2k5 to enable compiling on systems which don't define a gettext locale directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1504 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 22:03:30 +00:00
Giel van Schijndel 0ecf2cba49 * now "properly" apply fix for segfault caused by using png_destroy_read_struct to destroy a write_struct
* (r1502 had a NULL pointer to many passed in the argumentlist)

thanks to vs2k5 for this fix (sorry couldn't find any other name anywhere on the mailinglist than your email userid)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1503 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-18 21:37:49 +00:00