Commit Graph

3182 Commits (ed27352982065d0d88788194ede566aef4d25b6b)

Author SHA1 Message Date
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
Per Inge Mathisen b1ef18e61d Kill unused PIESTYLE struct and parameter.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3688 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:55:56 +00:00
Giel van Schijndel 491b968833 * Make cdAudio_PlayTrack work with an enum instead of "magic numbers"
* Use this enum's values throughout the src/* code
 * Replace scripting function playCDAudio(int) by playIngameCDAudio() which is equivalent to cdAudio_PlayTrack(playlist_ingame)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3687 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:46:55 +00:00
Giel van Schijndel 8fe5f93991 Add a workaround/hack to prevent starting of new songs when we switch playlists
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3686 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:35:34 +00:00
Giel van Schijndel 1513ac41e2 Because g_apTrack's size is determined on compile time don't allocate it dynamically but statically
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3678 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 12:25:18 +00:00
Dennis Schridde cdb9b7bacc Properly wrap the dummy reference. This issue does not only exist on the Mac and was fixed wrongly in r3659.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3671 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 21:38:43 +00:00
Giel van Schijndel 8a03980819 Bump version number of Debian package so that it gets priority over the package in unstable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3670 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 20:23:32 +00:00
Giel van Schijndel 6d27eabf88 Revert r3643; this fixes #7
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3669 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 20:19:52 +00:00
Giel van Schijndel 70d7e095f0 When bailing out of packet decoding make sure to call NETend()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3668 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 17:46:03 +00:00
Giel van Schijndel 208a399d73 Turn an ASSERTion into a debug(LOG_NET, as is not safe to simply assume that a player ID is correct (and as such we cannot just ASSERT on it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:58:48 +00:00
Giel van Schijndel 748adec208 Use network byte order for struct unpacking on the lobby server (rather than native byte ordering)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3666 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:51:56 +00:00
Giel van Schijndel 4a77f3d8b0 Use NETsendGAMESTRUCT and NETrecvGAMESTRUCT to send & receive GAMESTRUCTs endian safe
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3665 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:49 +00:00
Giel van Schijndel 730ef63107 Add functions NETsendGAMESTRUCT and NETrecvGAMESTRUCT to deal with sending & receiving of GAMESTRUCTs in an endian safe way
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3664 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:46 +00:00
Giel van Schijndel fb83d6fc8a Rework pickADroid so that it uses a while-loop instead of tail recursion to find a player for which we're responsible to handle droid synching
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3663 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 15:40:36 +00:00
Giel van Schijndel 459254f306 Update netlog.c's packetname list for r3661
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:42:02 +00:00
Giel van Schijndel 0c7ade394d * Remove message type MSG_PLAYER_DATA as it sends/receives void* data chuncks which is __not__ endian safe (not to mention struct padding)
* Don't maintain player stats in lib/netplay/netplay.c; instead maintain them in src/multistat.c
 * Add a new net message type (NET_PLAYER_STATS) to exchange player stats


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:31 +00:00