Commit Graph

3147 Commits (7b92747cb9d77837ebbb529ba4a842d6a82400da)

Author SHA1 Message Date
Giel van Schijndel 722303eb84 Turn a lot of already-available function documentation comments into Doxygen documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3739 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:44:53 +00:00
Giel van Schijndel 72003cf9bf Provide Doxygen documentation for iV_DrawFormattedText() and change its return type to int
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3738 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:25:20 +00:00
Giel van Schijndel 24ba730bdb * in iV_DrawTextRotated() select the model view matrix and don't depend on that one being selected already
* Also push and pop the model view matrix


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3737 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:06:23 +00:00
Giel van Schijndel 637edb1f0d * in pie_SetTexturePage() _always_ disable texturing when invoked with a negative parameter
* In iV_DrawTextRotated() use -1 instead of -2 as texturepage (not that it matters anymore what negative number we use, due to the above change)
 * Add some Doxygen documentation to pie_SetTexturePage()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3736 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:03:58 +00:00
Per Inge Mathisen 03b9f0a63e Make pEnvironData static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3735 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 11:51:16 +00:00
Per Inge Mathisen 9c699e0d24 Clean up environ.c by removing lots of unused stuff.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3734 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 11:49:40 +00:00
Per Inge Mathisen 12bcb52e3d Truncate strings and binary data sent over the network if larger than expected.
Patch by Buginator in patch #974 with changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 11:43:08 +00:00
Ari Johnson adfeb3ab98 Updated Mac OS X port to use QuesoGLC 0.7.0 with a work-around for a
text display bug


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 21:55:02 +00:00
Per Inge Mathisen 84c61fed77 Fix crash in wzmviewer due to a not properly initialized frame variable.
Thanks to Buginator for reporting the problem.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3731 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 19:45:49 +00:00
Per Inge Mathisen b174ddd773 Make PIE/WZM tools more easily compile on Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3730 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 18:56:31 +00:00
Giel van Schijndel 65a3ff6a8b perform endian swapping for MSG_PLAYER_INFO messages;
NOTE: reverting r3669 (or re-applying r3643) would be better, though unfortunately it doesn't work...

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3729 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 18:29:58 +00:00
Per Inge Mathisen e11b841e68 Clean up scrSetScrollParams and remove assert that scroll limits must be within
visible limits (drawn map). Make droidOnMap ignore droids from mission lists with
deliberately invalid coordinates.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3728 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 16:10:10 +00:00
Per Inge Mathisen 938d210390 Fix silly typo in previous commit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3727 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 14:30:33 +00:00
Per Inge Mathisen 8dc285468b Add a hack to display the vlid options available for the --game command line
parameter when an invalid option is specified.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3726 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 14:29:44 +00:00
Per Inge Mathisen 2f80c51cc8 Set died field correctly to NOT_CURRENT_LIST for mission droids to avoid
assertion failures when loading campaign maps directly. Also remove more
unused code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3725 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 13:56:05 +00:00
Per Inge Mathisen 5cd4bc634c Remove some unused code. Add readability. Sprinkle some LOG_SAVEGAME calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3724 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 13:45:14 +00:00
Per Inge Mathisen ac65ebfdfc Improve mission code readability.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3723 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 11:17:34 +00:00
Per Inge Mathisen 67d38b5298 Remove the overzealous asserts responsible for bug #970. In any case - if we are to
check that droid direction is less than 360, change CHECK_DROID() instead.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3722 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 10:27:54 +00:00
Per Inge Mathisen 679e877302 It is not a problem that we cannot find an assembly point for a destroyed factory,
it could just be that we use a commander instead. So don't assert it. Also make
sure we clear out the commander info before the assembly reference, or it will crash.
This fixes bug #11000 reported by Silvence <skellr>.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3721 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 22:45:55 +00:00
Per Inge Mathisen 6c179bb935 pie2wzm: Fix division by zero error introduced in the previous commit to it when
a mesh has no animation.
wzmviewer: Press '+' to cycle through animations or team colours. F1/F2 to 
enable/disable polygon culling. F3/F4 to enable/disable wireframe mode.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3720 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 18:43:21 +00:00
Per Inge Mathisen 54bcf0cde5 Remove completely mistaken comment from the original code. Textures use
0 to 256 range of texture coordinates, and the width of the texture should
therefore not be used to deduce wrap around point for texture animation.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3719 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 17:58:37 +00:00
Per Inge Mathisen 05a6223814 pie2wzm: Remove output parameter - generate output filename automatically.
Add cmdline option to not guess team colour and force animation instead.
Add support for texture animation that wraps around the edge of the texture.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3718 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 17:55:15 +00:00
Dennis Schridde 057ee3e55e Properly disable drive mode when going into an intelligence-report.
Also some initial effort/stub for manual targeting. (Not yet enabled.)
Driving (drive.h) should go out of src/seqdisp.c if somehow possible...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3717 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 11:05:31 +00:00
Per Inge Mathisen baed19b3b0 wzmviewer: Fix bug when reading in multi-mesh files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3716 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 10:54:57 +00:00
Per Inge Mathisen 49e97ae793 Add a very simple model viewer application for the WZM format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3715 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 10:38:49 +00:00
Per Inge Mathisen b278c8d77d pi2wzm: Write correct TEXTURE directive. Fix bug in index array generation.
Generate correct animation frame list. Add support for converting connectors.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3714 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 10:27:03 +00:00
Dennis Schridde d1f027ee94 Allow drive mode in multiplayer games, too. And properly disable it when leaving follow-me mode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3713 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 23:59:51 +00:00
Gerard Krol 2685185c33 Make sure that long lines of text are correctly drawn and wrapped for the intelligence display.
This also works for larger fonts. This fixes bug #10913, and makes patch #965 obsolete.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3712 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 19:19:15 +00:00
Per Inge Mathisen b5d2cc00b9 Remove an unused and a duplicate typedef.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3711 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 17:02:25 +00:00
Per Inge Mathisen 0207ceb4c1 Add a tool to convert from the PIE format to the imaginary WZM format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3710 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 14:59:53 +00:00
Per Inge Mathisen a1879f5818 Add new function droidOnMap() which checks if a droid is on the map, but also
takes into account the possibility of being off-world, in a transport, or being
a transport. This should close patch #958.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3709 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 13:22:28 +00:00
Per Inge Mathisen 7d6a84b4a9 Revert part of patch r3444 to restore the --game option. Patch by Buginator in patch #970.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3708 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 13:08:59 +00:00
Dennis Schridde 7b2f64ecb1 Patch #968: Basic Battle-View aka Drive-Mode support, by Buginator.
Right now, to enable this, you must select a unit, and be in debug mode, and hit left shift D. Then you move the unit with arrow keys, and use right mouse button or S to target things.
Note: While you can test in SP, you will lose control of your droid if a mission briefing comes on. You just have to hit the hotkey again to regain control.
This is NOT finished. Just something to play around with, or if you got the time, reintegrate the missing PSX code.
* NOTE: You have to delete/reset your current keymap file, so backup your old one if you modified something.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3707 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 12:35:50 +00:00
Per Inge Mathisen f47c263d99 pie23ds: Fix handling of texture animation / team colour.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3706 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-06 21:08:46 +00:00
Per Inge Mathisen 8dfb001797 Remove two forgotten debug printfs in pie23ds
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3705 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-06 17:43:26 +00:00
Per Inge Mathisen 8b037dc016 Add a very basic PIE -> 3DS conversion tool.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3704 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-06 17:38:49 +00:00
Per Inge Mathisen 0f647f937e Make 3ds2pie tool conform to PIE standard even though the Warzone code ignores
the exact number given in the LEVEL directive.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3703 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-06 17:35:28 +00:00
Per Inge Mathisen 69418fc1a4 Fix typo in IMD loading error message.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3702 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-06 13:06:04 +00:00
Gerard Krol 5ee301ec76 Make the radar (minimap) transparent again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 23:02:59 +00:00
Gerard Krol e9daecc18c Prevent flickering to the fog color with fog of war enabled, by checking if distance fog is enabled before letting a script
set the color.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3700 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 22:04:51 +00:00
Gerard Krol 31a8a54ddb Revert r2901 as this is not the correct way to fix the smearing issues. It probably has something to do with the fogbox or
looking underground. As last resort r1301 "Speed up for people who are fillrate limited" can be reverted.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3699 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 21:35:42 +00:00
Gerard Krol 029b827ec1 Make sure the camera distance is also initialised when loading a save
game that has the camera position and rotation (but not distance!) 
(version >=11). Not doing this caused the scroll code to move the player 
position to a corner of the map. Why the scroll code was trying to 
scroll is another question.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3698 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 19:24:56 +00:00
Per Inge Mathisen 1c36113b65 Show entire minimap in distance fog mode. See patch #952.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3697 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 09:08:28 +00:00
Per Inge Mathisen 9f3b98baf8 Remove unused function UpdateRadar()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3695 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 21:02:56 +00:00
Per Inge Mathisen 2a743a2e06 Remove unused function worldPosToRadarPos()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3694 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 21:02:06 +00:00
Per Inge Mathisen 513771a88f Remove unused function GetRadarPlayerPos()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3693 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 20:50:33 +00:00
Per Inge Mathisen fe61e7f5cf Do not recalculate the radar bitmap when we do not draw it, saving valuable CPU cycles.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3692 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 18:06:55 +00:00
Per Inge Mathisen 79db811b58 Remove ugly radar constants from pieblitfunc, where they do not belong.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3691 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 18:03:02 +00:00
Per Inge Mathisen 18b604c40e Clean up ClearRadar and remove CHECKBUFFER macro.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3690 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 17:03:29 +00:00
Per Inge Mathisen 20620668ef Move pie_DrawRect into narrower scope, move in some duplicated calling code, and make it static.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3689 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:58:18 +00:00