Compare commits

..
4974 Commits
Author SHA1 Message Date
phreak 8e99b93116 Missed some merge errors 2009-02-09 22:27:40 +00:00
phreak a269a7e2b2 Sync with trunk. Haven't tried to compile yet. Will do that later... 2009-02-09 05:26:56 +00:00
phreak 06d2194350 Sync with trunk. My sanity is gone :( 2008-10-01 23:03:31 +00:00
phreak 683a8031a0 Merge with trunk. 2008-07-20 14:35:43 +00:00
phreak fd1eb91ecf merged with trunk. I want thruster glows \o/ 2008-07-11 00:44:23 +00:00
phreak 7b8b465e33 Lighting changes, add the -glow_factor command line, add AI usage for salvo firing secondaries when the "smart secondary selection" ai profile is set. 2008-07-10 11:27:03 +00:00
phreak 272a406994 Sync with r4694, r4695 2008-07-09 00:54:22 +00:00
phreak 66c9d4c8c5 Replicate r4692 in trunk to my branch. 2008-07-07 23:55:14 +00:00
phreak 7975a65dab initial commit of my code: salvo fire secondaries. 2008-06-27 18:49:39 +00:00
Goober5000 7aa8d59c05 made a copy 2008-06-27 01:55:25 +00:00
Goober5000 b57c41c6f7 fix incompatibility in sexps between retail and SCP 2008-06-26 21:18:46 +00:00
phreak ebc331324d Properly autocenter the missile models in the techroom. 2008-06-26 02:52:51 +00:00
Wanderer ccbdf0ead1 added startMission lua function 2008-06-24 12:27:49 +00:00
phreak 0fff5c7da0 Fix mantis #1710 2008-06-23 22:09:04 +00:00
karajorma 78d512002e Allow capship beams to take full credit for their kills if a flag is set. 2008-06-23 20:47:26 +00:00
karajorma 7ce2d59bce Doh! 2008-06-23 19:01:08 +00:00
karajorma a10ea210b3 Fix a bug that meant players sometimes didn't get an assist is someone had already earned one.
Make it possible to decide what percentage of the damage a ship receives earns you a kill.
2008-06-23 16:27:14 +00:00
WMCoolmon 89f5949071 The new scripting hooks for mouse/keyboard. 2008-06-23 07:50:47 +00:00
Swifty 1746c4ce94 Even more accurate HUD reticle offset calculations. 2008-06-23 07:39:01 +00:00
phreak 4a2b028463 Get rid of my mixed case old username. 2008-06-23 01:58:02 +00:00
phreak 468bcc6441 Fixed filename cases in the code, fred2, and freespace2 project files. The files were originally mixed-case (from fs2-public) and the mixed-case names would be restored when saving the files. This didn't sit too well with SVN. 2008-06-23 01:54:33 +00:00
karajorma 73aaa87bd3 Change No Debrief to Toggle Debrief. It will now turn on debriefings for dogfight missions (Which otherwise get the kills matrix). 2008-06-22 16:57:35 +00:00
karajorma ea02c08748 Add the Hide-ship-name ship flag 2008-06-22 16:55:29 +00:00
Swifty 87b4f5ef8d Fixed inaccurate slewing HUD reticle as pointed out by Goober. 2008-06-22 08:24:57 +00:00
Goober5000 1dcb42aa5d added missing TrackIR offsets in FS1 HUD code
disabled the entire HUD nose offset system until Swifty can fix the centering algorithm
2008-06-22 04:02:07 +00:00
taylor 0c1d218fb4 fix compiling on F9 (per the standard, limits.h isn't implicitly included) 2008-06-19 04:36:26 +00:00
karajorma d9432e7e82 I'm fairly sure FRED shouldn't be calling that function. Certainly not for BtRL at least as it was causing a crash. 2008-06-18 22:24:56 +00:00
phreak 5b45bf9029 Fix for mantis #1691: Ships disappear at stage 2 of knossos warpout. 2008-06-15 21:02:18 +00:00
Wanderer 6f67df5835 fix for the detail box parsing (issue reported by Water) 2008-06-13 13:18:43 +00:00
WMCoolmon 380b3e658e Move gr_reset_clip into draw_model_rotating, and don't assume that if a NULL closeup pos is passed that it's a missile. 2008-06-11 22:38:28 +00:00
phreak ece785dee7 fix mantis #1682 - weapon ship collisions not applying to ships beyond the warpout clip plane. 2008-06-10 01:14:32 +00:00
phreak db2e91478b Shoudln't forgetting a return statement be an error and not a warning? 2008-06-10 01:13:48 +00:00
phreak 90238d4e69 Mantis #1676 - Prevent particles from appearing during warpout and the particle emitter is beyond the clip plane. 2008-06-09 22:27:21 +00:00
Wanderer 939dcaa849 Fix for mantis #1687 (corkscrew missiles and turrets) 2008-06-09 08:11:27 +00:00
phreak 25c0d647bd Added SSE/SSE2 build configurations. These builds are are optional versions of the release builds with SSE/SSE2 instruction support. 2008-06-09 01:10:43 +00:00
phreak b99f4d98a2 Added additional compiler optimizations for release builds. 2008-06-08 23:53:12 +00:00
phreak 81b3aad776 Add Visual Studio 2008 project files.
The release builds have been configured to use Multi-processor support (/MP) when compiling.
2008-06-07 23:59:05 +00:00
phreak 43407479d5 Alpha blending and line widths for radar orb rings when in HTL mode. 2008-06-03 00:18:58 +00:00
Wanderer 2661893a44 fix for cutscene jerkyness (part of mantis #1697) 2008-06-02 20:51:50 +00:00
Wanderer b909ada973 fix for the Mantis #1703 (debris and alt names) 2008-06-02 06:28:13 +00:00
phreak cdffd39097 Render the radar orb using HTL. It still wasn't doing that after all these years. The original rendering method is still in place. 2008-06-01 17:54:02 +00:00
Wanderer 15209a2a5f Fixes beams have migrating firing points (Mantis #1688)
Prevents simultaneously fired weapons from sharing firing points.
2008-06-01 10:50:28 +00:00
phreak 08f606d6fa minor bugfix, readability. 2008-05-30 17:05:11 +00:00
Backslash 8c0bc5ab59 Minor typos. Also an fspeed -> speed change. 2008-05-30 03:33:27 +00:00
Wanderer 197d227183 removed a couple of unreferenced variables 2008-05-29 15:46:09 +00:00
phreak 39c067de07 -Fixed null pointer exception in beam_delete()
-Got Targeting Laser to sort of work, it paints, but does not render.
2008-05-29 03:54:33 +00:00
Swifty b0d5e355f5 Various 'pit bug fixes. Prevent TrackIR users from leaning back. Removed superfluous ApplyViewShake from game_render_frame_setup(). Fixed zbuffer clipping bug for separate cockpit POFs. 2008-05-29 03:31:46 +00:00
Swifty 464fd54392 Modified fireball handling; ship class or type specific explosions. 2008-05-29 03:26:23 +00:00
karajorma eec030d092 Fix a couple of those pesky scoping in for loops problems. 2008-05-26 16:39:59 +00:00
karajorma 2c55d4caeb Blowfish's port of Turey's ship template code. 2008-05-26 15:54:29 +00:00
karajorma 7c71a2d738 Display the pilots score in the barracks. 2008-05-26 13:40:07 +00:00
karajorma 798af8ffe0 Fix the primary weapons won't cycle bug (Mantis 1673) 2008-05-26 13:36:01 +00:00
karajorma 7452c98564 Allow priorities higher than 89 for orders in FRED. Clean up unused parameters from several AI methods. 2008-05-26 13:29:53 +00:00
Backslash cf6cfa6538 Fix to not play the flyby sound repeatedly for a stupid reason when viewing from another ship. (The player is NOT always the center of the universe.) 2008-05-26 06:59:00 +00:00
WMCoolmon 6bdf192fec Scripting:
- Add On Mission Start, On Mission End hooks; swap Warpin and Warpout to Warp In and Warp Out
- Safer handle helper structs
- Improved math, eg matrix interpolation and vector multiply/divide
- Filesystem read AND write support
- Initial scripting orders support
- Better waypoints support
- Assorted requested scripting functions
bmpman:
- Safer bm_get_filename
cfile:
- Support for RW, rather than just R or W, file modes.
model:
- Safer texture_info struct. Taylor, I know we talked about this, but I realized that it was just a lot better for what it does and it shouldn't be too much trouble to replace with the new system (operations tend to be much more concise and clear). Let me know if any unexpected difficulties arise.
2008-05-25 22:52:05 +00:00
WMCoolmon f1d9234d18 Fix signed/unsigned mismatch 2008-05-25 20:13:52 +00:00
WMCoolmon 65bc5b7e5c Don't quit the game when -output_sexps is used, and move the bulk of the code to a more appropriate location. 2008-05-25 20:13:35 +00:00
WMCoolmon f035cd2b6e Fix a null vec_normalize bug from additive weapons 2008-05-25 06:29:59 +00:00
Backslash 245aefcb44 More end_string_at_first_hash_symbol stuff -- targetbox orders, docked ships, message senders 2008-05-25 02:55:56 +00:00
Backslash 3fb37e85b0 Whoops, wrong repository. Quick correction. 2008-05-24 06:55:19 +00:00
Backslash 1086be9eba bump MAX_ALT_TYPE_NAMES 2008-05-24 06:44:29 +00:00
karajorma 41bbd6cc16 Fix bug where wings with only one ship would ignore orders 2008-05-23 20:24:47 +00:00
phreak 1dda11f9ec remove references to cloaking code. 2008-05-17 17:35:55 +00:00
phreak 0ca63f3c96 Mantis #1462
non-local SSMs home in on objects instead of points to they can track moving targets.

ship_apply_tag and ssm_create take "team" arguments now to indicate which team fired the ssm strike.

ship-tag sexp also has an optional team argument added.  Team 0 is used if the team is not defined.

missiles that are fired without a parent and are locked will travel at their max velocity and not 1/4 of their max.

bugfixes where sometimes an animation may sometimes have a duration of zero and cause an infinite loop.
2008-05-16 01:29:19 +00:00
karajorma cefb883d55 Fix a crash when using <argument> with a numeric variable (Mantis 1656) 2008-05-15 22:42:38 +00:00
karajorma a711c256b4 Fix various crashes, assertions and Int3s caused by SEXPs unable to find subsystems after the player changes class during loadout. 2008-05-14 19:36:17 +00:00
taylor 82561d3b27 hopefully fix order issue from future wing waves (Mantis #1683) 2008-05-06 00:13:52 +00:00
taylor 25d6129168 damn, that was pretty stupid of me (Mantis #1684) 2008-05-03 19:38:00 +00:00
taylor b57a68c0eb remove old warning messages, that stuff should be added on an as-needed basis when debugging only 2008-05-03 04:47:51 +00:00
taylor 14d88eef33 make table crc spew use the proper table list 2008-05-03 04:46:42 +00:00
taylor f7422e1aee add missing break statement to get rid of unidentified packet message 2008-05-03 04:45:17 +00:00
taylor 8103398fbf some stats fixage 2008-05-03 04:44:22 +00:00
Backslash a387a68a5a Lock turrets on ships that have already split apart. This way firepoints don't go with the 'wrong ship half'. Nice work, Wanderer.
Good idea, blowfish -- this is a much better solution than locking during deathroll (which was proposed by _argv[-1] ages ago).
2008-04-30 07:36:29 +00:00
Backslash 251e565593 Add "orders hidden", "orders shown", and "wing name hidden" to iff_defs.tbl flags.
Use these flags instead of wcsaga command line for certain HUD displays.
2008-04-29 05:26:34 +00:00
Backslash 549589bdd2 One more little change involving #. Stupid pointers... 2008-04-24 02:16:10 +00:00
karajorma 604faf652f Nope. I don't know why I thought that would work either. 2008-04-22 10:13:43 +00:00
karajorma 77f6c1bc9c Fix ship-subsys-guardian-threshold so it can be used with ships in loadout.
Add the set-persona SEXP
2008-04-20 18:31:47 +00:00
Backslash 2d05da8f31 Whoops, apparently we missed a bit of the turret fix. Working now. 2008-04-17 04:34:54 +00:00
Backslash 759872d98b A few more tweaks for ship name end_string_at_first_hash_symbol support.
Make FPS and status displays hide when hud is toggled with shift-O.
2008-04-16 03:21:37 +00:00
phreak c53f86384b Use the weapon object and not the weapon_info object when determining when a flak shell should detonate. Mantis #1662 2008-04-16 02:51:26 +00:00
taylor e4cb3479a7 remove libreadline dependency since we don't need it and can't use it anyway 2008-04-12 22:18:01 +00:00
karajorma a8fae4465f Fix the Stars slider so you can have none. Fix a problem with the SEXP argument numbering fix. 2008-04-12 20:18:44 +00:00
taylor 40f8d02425 make SEXP argument numbering go by 5's, and change to bitmaps to try and be a bit more readable (Mantis #1517) 2008-04-07 22:07:06 +00:00
taylor a988f5eab2 try and handle FSO version comments better (should fix Mantis #1284 and #1639) 2008-04-07 22:01:30 +00:00
Backslash 0e86ab07b4 Whoops. Don't actually change the name, just the displayed name.
Also, don't forget the alternate type name.
2008-04-07 00:18:19 +00:00
Goober5000 2f23ea485f remove obsolete ship flag 2008-04-06 23:37:21 +00:00
Goober5000 dfa4206d02 merge the selectable Command feature (from 1/2007) into the stable branch
rearrange the Mission Specs dialog while we're at it
2008-04-06 23:26:33 +00:00
Backslash 364e644cf0 Apply end_string_at_first_hash_symbol to ship names now.
This way people can use # to name duplicates of ships for fake nanojumps and other stuff like that, instead of Unicode characters.
2008-04-06 23:00:20 +00:00
phreak df5d78f07b Added support for multiple child weapons per parent weapon. 2008-04-06 21:56:08 +00:00
karajorma cd2afc57f4 Fix Mantis 1649 2008-04-06 18:53:01 +00:00
taylor 42a84a2a88 keep track of primary weapons properly for multiplayer (Mantis #1094) 2008-04-05 13:39:21 +00:00
Backslash c8d5f8678d Guess this had only been committed to the former HEAD.
Make max_speed based on max_vel.xyz.z, so that we don't have a strange maxmimum throttle when the ship is capable of x/y movement.
2008-04-04 15:15:06 +00:00
taylor 6c856eb341 make background import from FSO missions work if there is only one list (Mantis #1640) 2008-04-04 13:46:37 +00:00
taylor 1aef19ab7f be sure to properly update shields, afterburner energy, max speed, cm count and set initial
model_anim state through change_ship_type()   (Mantis #1512, #1594, #1645)
2008-04-04 03:17:01 +00:00
taylor 7f2de46f30 be sure to apply special explosion to all selected ships (Mantis #1634) 2008-04-04 03:10:45 +00:00
taylor c040093c68 disable PBO support for the time being (causes hangs under OS X for some reason) 2008-04-03 22:01:47 +00:00
taylor 1b2c251be6 add back Bobboau's "check hull" turret subsystem flag support 2008-04-03 16:47:03 +00:00
Backslash e26c2a7487 Whoops, that beam chargeup particle fix only worked with certain table settings. This should work for everything. 2008-04-03 15:33:03 +00:00
taylor b6fceca721 fix sorting of create list so that it properly sorts mission names
add CTRL+SHIFT+S hotkey to switch bewteen mission and file name sorting
2008-04-03 03:39:13 +00:00
taylor 39f5113405 remove all special_ship hack and just handle it all properly: keep wing order correct regardless of object order 2008-04-03 03:37:56 +00:00
taylor 2899799bfa add a timeout for getting pilot info (part of Mantis #1652) 2008-04-03 03:35:26 +00:00
taylor f7cf34487a make mission/campaign list dynamic (Mantis #1203) 2008-04-02 23:54:56 +00:00
taylor babcedc220 /strchr/strrchr/, for mission filenames (Mantis #1629) 2008-04-02 23:54:25 +00:00
karajorma 86c74f9211 Add the is-player SEXP 2008-04-02 18:38:12 +00:00
Backslash 6f1932987d Tweak the lead indicator code to not just work with primaries -- now, dumbfire secondaries show the correct position.
Also, make it work when the target is stationary but "$use additive weapon velocity" is set.
Fix a couple typos and warnings.
2008-04-02 14:19:06 +00:00
taylor 32c5fa6d1d remove multi_elements thingy since it caused problems for some ATI users, and it was kinda crazy anyway 2008-04-01 22:06:17 +00:00
taylor 0a06e62093 make sure not to carry swarm/corkscrew missile fire to another bank when the first one is out of ammo (Mantis #464) 2008-04-01 20:04:04 +00:00
taylor e90acd5b5d bah, that flag check was wrong since the initial commit to the unstable tree 2008-04-01 10:00:09 +00:00
taylor c99874389c skip .svn directories when packing (for sanity sake when packing versioned data)
just skip files that have names too long rather than bailing
2008-04-01 06:31:55 +00:00
taylor 6d085d6d22 be sure to skip filenames that are too long in cf_get_file_list() too, since we still need them to be of a certain size later 2008-04-01 06:30:05 +00:00
taylor eb468ff25c add missing check for "use multiple guns" so that it actually does something (Mantis #867) 2008-03-31 19:42:33 +00:00
taylor 7ed32a9525 fix subtitle centering for non-1024x768 resolutions (Mantis #1630) 2008-03-31 13:51:39 +00:00
taylor c7b3ad7aaf fix the "carry no damage" stuff to actually work right and distribute the proper amount of damage (Mantis #1638) 2008-03-31 13:08:45 +00:00
taylor 677a285bcf if no paths then don't try to allocate memory for them (avoids Int3() check in vm_malloc from requesting a size of 0) 2008-03-31 12:59:10 +00:00
taylor 3090cd74b0 fix "generate icon" flag check for hud shield icons and add some compatibility handling for old data (Mantis #1646)
clean up ballistic primary fixage so that it doesn't run more than it needs to and doesn't end up "fixing" it's own mess
2008-03-31 12:57:34 +00:00
taylor d8c2926962 bring OS X stuff up to date 2008-03-31 01:39:17 +00:00
taylor 04df95e8c9 line sizes are figured at EOL breaks, so be sure that we account for those when splitting too (Mantis #1152) 2008-03-31 00:02:54 +00:00
Backslash 2d5b4119a5 Pretty sure it was agreed we could bump MAX_MISSION_MESSAGES until the dynamic code was finished. WCSaga and BtRL can't work on some missions without this. 2008-03-30 20:06:14 +00:00
Backslash 11d8505cdf Add $Max Turret Target Ownage and $Max Turret Player Ownage to ai_profiles.tbl
This is to customize the number of turrets on a ship allowed to fire at the same thing.
2008-03-30 19:49:42 +00:00
taylor 75baeadbed crap, that did need to be a float to work properly (fixes wobbly hud from r4561)
also be sure to handle the overflow case in HUD_get_nose_coordinates()
2008-03-30 08:53:50 +00:00
taylor c2bc245f81 don't mess with mainhall sounds directly in the movie code (should fix Mantis #1539)
be sure to stop the ambient mainhall sound when playing a movie through the cutscene viewer
2008-03-29 20:25:07 +00:00
taylor 88693b7388 fix various compiler warnings 2008-03-29 06:30:20 +00:00
taylor 94d2357dd4 some minor optimization and cleanup 2008-03-29 05:22:28 +00:00
taylor 7f7e82f820 changes for Fred_texture_replacements to get that crap off of the stack and stop wasting memory (it was about 2.3meg wasted on non-Fred!!) 2008-03-29 02:11:19 +00:00
taylor 8590f9f6f6 cheap build capability support for the launcher
(remains comapatible with older hack, but also allows detection of D3D or not)
2008-03-29 02:07:46 +00:00
taylor 1332de96f6 add optional string for +reverse_delay and default it to 0 for trigger type animations (Wanderer #27) 2008-03-28 20:29:31 +00:00
taylor 461922f046 some minor mprintf() cleanup 2008-03-28 03:32:38 +00:00
taylor 390b00d52f use strrchr() to be sure that we get the last occurance of any "." (Mantis #1587) 2008-03-28 02:18:59 +00:00
taylor 4f9064edd3 make FRED use audiostr for audio previews instead of the Win32 mm API (Mantis #853) 2008-03-28 01:13:35 +00:00
Backslash 28e71f63ce Make generated muzzle particles' initial velocity match the parent ship -- this way they stay around the turret and don't go trailing behind. 2008-03-25 02:44:24 +00:00
WMCoolmon df53ae5d5c Maybe-fix TVWP bug 2008-03-24 05:27:00 +00:00
taylor 02233b1ddf fix broken ballistic weapons 2008-03-24 03:37:26 +00:00
WMCoolmon 46a1a343c5 Fix for mantis 0001527 2008-03-23 08:34:45 +00:00
WMCoolmon e5ef92c7a8 Fix for mantis #0001580 2008-03-23 08:19:16 +00:00
WMCoolmon 51717c49b1 Fix for mantis 0001637 2008-03-23 07:33:11 +00:00
WMCoolmon 15f6909279 $Application hook for mantis 0001574 2008-03-23 07:00:54 +00:00
WMCoolmon f010c1ad03 Lua 5.1.3 SDK (supposedly a bugfix update, so makefile updates should not be necessary) 2008-03-23 06:08:09 +00:00
WMCoolmon 40317c8642 - Nearly all functions and variables have one return type, which defaults to 0, "", or an invalid handle if the function fails.
- All functions use seconds for time
- Syntax update for scripting.html
- Minor bugfixes
- gamestate and gameevent handles
- getState is now getCurrentGameState
- setEvent is now postGameEvent
- drawMonochromeImage arguments reduced in anticipation of agreeing with drawImage arguments
- Fixed numerical indexing of weapon classes
2008-03-23 06:07:23 +00:00
WMCoolmon f46ca67044 Add gameseq_get_event_idex. 2008-03-23 05:42:37 +00:00
WMCoolmon 351cc3b638 MSVC 2003 Project File update 2008-03-22 19:55:46 +00:00
Goober5000 bc98ea3946 make the self-destruct sexp actually work for more than one ship 2008-03-22 03:59:29 +00:00
Goober5000 2bb7aad239 fix the build naming convention 2008-03-22 01:52:17 +00:00
Goober5000 21b1682f13 apply WMC's patches for MSVC 6 2008-03-22 01:39:18 +00:00
phreak 467bedab97 fix visual studio 2005 project files. 2008-03-21 22:31:11 +00:00
karajorma 0ae2a6891e Remove a couple of extra Int3()s in the transfer-cargo SEXP. 2008-03-21 21:49:50 +00:00
karajorma a4987ce6ae Add SEXPs and table entries to WMCs subsystem name changing system 2008-03-21 20:25:12 +00:00
taylor acae6f5c18 bah, that wasn't supposed to hit just yet 2008-03-21 04:47:13 +00:00
taylor 5e1b66993b make sure that beam bitmaps are always loaded (like normal weapons are handled) 2008-03-21 01:57:19 +00:00
taylor 0c572367ba side-turret patch from KeldorKatarn 2008-03-20 22:18:33 +00:00
taylor 6aa46ca8d2 update to newest FS2NetD client code 2008-03-20 21:29:41 +00:00
taylor af2aa37464 add new files 2008-03-20 21:17:09 +00:00
taylor 29f8a54cd9 change gr_set_cull() so that it works better (mainly part of the RTT fix) 2008-03-20 20:18:49 +00:00
taylor 2c7f3ba129 remove old files 2008-03-20 19:38:24 +00:00
taylor 3bbaaa9c64 use specific intermediate directories to prevent clobbering of same-name files (particularly with lua) 2008-03-20 19:37:36 +00:00
taylor 4404a3bfd6 remove storybook, since the fiction viewer makes it obsolete 2008-03-20 18:55:16 +00:00
taylor f3459338da fix Mantis #1636, thanks to VA for doing all of the leg work :) 2008-03-20 18:47:55 +00:00
taylor 992c740722 try to deal with processor affinity automatically (defaulting to CPU #2, and with registry setting override) 2008-03-20 18:41:23 +00:00
taylor 9b7838e45c add new files 2008-03-20 18:39:12 +00:00
taylor 1e1ec5085f fixage 2008-03-20 18:37:53 +00:00
taylor c2f5d325aa little bit of cleanup 2008-03-20 18:37:16 +00:00
taylor df1c4abc23 should be the last bit of the fix for Mantis #1520
various bits of little cleanup
2008-03-20 18:35:31 +00:00
taylor c9081ee3d5 fix memory leak
address some compiler compaints and add a newline to debug message
2008-03-20 18:26:58 +00:00
taylor f88b444d93 fix some variable types/init 2008-03-20 18:25:08 +00:00
taylor 7b029adb01 handle movie filenames and debug reporting better 2008-03-20 18:23:05 +00:00
taylor 8d931f3225 this stuff really isn't working that well so disable it for the time being 2008-03-20 18:20:06 +00:00
taylor a7adb978a6 handle lobby server diconnects in a more friendly way (Mantis #1600) 2008-03-20 18:17:51 +00:00
taylor c8d2ed8c36 keep track of whatever our previous state was (useful for better event handling) 2008-03-20 18:16:28 +00:00
taylor f89a173548 we do actually pass invalid socket ids during init stuff so don't complain about such things in the log 2008-03-20 18:11:52 +00:00
taylor 637496f374 add handler for bad channels (Mantis #1603) 2008-03-20 18:09:15 +00:00
taylor ffcac2c9c1 add better checks to catch connect() errors
bit of cleanup on win vs. non-win code
2008-03-20 18:08:12 +00:00
taylor fae68093e9 fix NaN on pilot stats interface from float div-by-0 2008-03-20 18:06:07 +00:00
taylor 2fa6101b3d change WSAEWOULDBLOCK to EINPROGRESS since that is what we were actually looking for on non-Windows 2008-03-20 18:03:58 +00:00
taylor c2743d6dad bump size of error text buffer
slightly better Lua error reporting
2008-03-20 18:02:51 +00:00
taylor a672b6c714 use VALID_FNAME checks to determine if a thruster filename is good and then re-init the entry to sane values if not 2008-03-20 17:57:01 +00:00
taylor d43719ed03 little bit of cleanup (and we don't really have to Assert() there) 2008-03-20 17:55:51 +00:00
taylor 6b04b2d1c1 wing parse order and object parse order aren't always the same so be sure we tag the correct "special ship" (part of Mantis #1520) 2008-03-20 17:53:55 +00:00
taylor ecb1d387af changing soundtrack via sexp shouldn't require that a soundtrack is currently playing (Mantis #1631) 2008-03-20 17:50:48 +00:00
taylor 5dd83bf9b4 better checks for connect() errors, since the select() test can pass by mistake 2008-03-20 17:47:02 +00:00
taylor d6c6430efb tweaks for slightly more efficient file matching
minor cleanup
2008-03-20 17:45:31 +00:00
taylor b8100b02c6 add proper lua flags for non-Windows builds
extra compiler warnings and lua checking for debug builds
2008-03-20 17:41:27 +00:00
taylor 95798fd3c6 remove Anjuta project (it's very out of date and I don't think anyone ever really used it anyway) 2008-03-20 17:39:15 +00:00
taylor c5a9f0fbfc remove luac.c since it is a seaparate binary and not actually part of the lua lib 2008-03-20 17:38:25 +00:00
taylor 358a5dbdc8 move stable branch to the primary under trunk 2008-03-16 16:25:19 +00:00
WMCoolmon f6ba4a5e7d Fix bug with drawImage and drawMonochromeImage as reported by Wanderer 2008-03-16 06:41:34 +00:00
WMCoolmon 6b60902595 Update to optimize code and to enable proper use of standard bracket style. :P 2008-03-16 04:25:58 +00:00
WMCoolmon 570f45dc80 Allow warpout with Homeworld or other 0-warpout-speed effects. 2008-03-16 04:20:28 +00:00
WMCoolmon 3785653868 Quick patch to optimize camera code, and fix it when being used by any camera which does not use the internal movement code. 2008-03-15 21:06:39 +00:00
WMCoolmon 6b8f8290a1 Update MSVC2003 project to compile with TrackIR and objectshield.cpp 2008-03-15 20:46:30 +00:00
WMCoolmon da6af09832 Add objectshield.h and include it in files that require it. 2008-03-15 20:46:07 +00:00
WMCoolmon 36cb0e6be2 Camera code 2008-03-15 20:31:57 +00:00
WMCoolmon df63fae6cf Project file updates and minor code corrections. 2008-03-15 09:48:04 +00:00
WMCoolmon c428e9925b New warp code. See thread on the internal for details. 2008-03-15 09:24:57 +00:00
WMCoolmon 322f6e7d20 g3_draw_polygon, general purpose function that was really needed. Comes in matrix or normal direction variants. 2008-03-15 09:19:13 +00:00
WMCoolmon 0050053905 Commit of bm_load_either, a function that automagically loads an animation or image, whichever exists, in that order. FPS etc. are filled in properly by the function. 2008-03-15 09:18:09 +00:00
WMCoolmon a67ab3b802 Use change_ship_class rather than straight variable set (this is the proper way) 2008-03-15 09:16:34 +00:00
WMCoolmon d760c85ae9 Initial commit of new files for main codebase. 2008-03-15 09:01:46 +00:00
WMCoolmon 608deb673d Commit of new files for the SDK 2008-03-15 09:01:23 +00:00
WMCoolmon 7e7d77c8d7 *Drumroll* The official scripting system commit to the stable branch! 2008-03-15 08:56:43 +00:00
WMCoolmon 2a5a950f39 Lua SDK update commit (Not newest version, just the one I've been testing with) 2008-03-15 08:54:40 +00:00
WMCoolmon 3f7e11badb Updated MSVC2003 Project files (TrackIR stuff) 2008-03-15 08:53:36 +00:00
Goober5000 5b1d504b94 fix flag setting in modular tables 2008-03-14 23:00:04 +00:00
karajorma a67a2182ce Ensure that the chatbox is closed when going to debriefing.
Some general clean up.
2008-03-14 20:27:41 +00:00
karajorma 7f7be22868 Quiet's traitor message changes. Should get rid of queued messages from send-message-list when a player turns traitor. 2008-03-14 20:21:43 +00:00
Backslash bfde817bb2 View slew, Target padlock and TrackIR patch by Swifty. Very nice!
Don't forget to add code/io/trackir.* to your projects!
2008-03-14 08:55:47 +00:00
karajorma f1e06c3bac Minor change for if we ever allow more than two TvT wings 2008-03-12 19:28:26 +00:00
Goober5000 4993ca93fd add ship-copy-damage, which clones damage stats (hitpoints and subsystem damage) from an existing ship onto another existing ship or a ship on the arrival list 2008-03-11 06:11:26 +00:00
Goober5000 0c25d35f60 Gah! Squash a nasty bug that was just waiting to happen. This only made sense before the docking conversion, when many objects were created as they were parsed. It was intended to free only the subsystem slots that were used by the most recently parsed object. Now that all objects are parsed before any are created, this line must be removed in order to prevent "memory leaks". 2008-03-11 05:38:43 +00:00
karajorma 0e77af6ee2 Fix Mantis 1612 2008-03-08 18:45:43 +00:00
karajorma 91eb0669dc Fix Mantis 1621 2008-03-08 15:42:55 +00:00
karajorma 3d00487409 Use iff_defs in dogfight mode rather than a hack which doesn't quite work anyway. 2008-03-08 15:40:13 +00:00
karajorma 143395f9d9 Don't output the password in the multi.log 2008-03-08 15:32:10 +00:00
karajorma c4f9f9b53e Fix Mantis 1621 2008-03-08 15:29:46 +00:00
karajorma b9ed24e476 Fix Mantis 1618 2008-03-01 20:31:59 +00:00
karajorma 6c626e12f9 EaterOfPies fix to allow Windows speech to read out multiplayer in-game chat. 2008-03-01 20:27:31 +00:00
karajorma 301c6b7386 Fix ships remaining targeted after they are made invisible. 2008-03-01 20:25:02 +00:00
karajorma 55855a7490 Only blow up ships that have the traitor IFF at the start of a dogfight mission. 2008-03-01 20:19:33 +00:00
karajorma a70c9fdfad Fix a targeting bug when ships are disabled. 2008-03-01 20:17:22 +00:00
Backslash 02714daf8c Freelook, Target padlock and TrackIR patch by Swifty. Very nice!
Don't forget to add code/io/trackir.* to your projects!
2008-02-29 04:28:13 +00:00
karajorma 926af24710 Fix Mantis 1608 2008-02-25 11:17:41 +00:00
karajorma a2f597fa33 Fix Mantis 1608
Fix a multiplayer issue with the force-jump SEXP
2008-02-25 11:14:33 +00:00
karajorma b74f64eb0a Fix Mantis 1611 2008-02-24 20:39:55 +00:00
taylor 14dfe07f77 re-enable support for multi.cfg options
fix bug where a ping/pong issue would create a bad state loop due to static vars not getting reset
clean up ADD/GET_STRING to work a bit better/safer
2008-02-23 20:16:18 +00:00
taylor 23b82f671f fix timeout that messed up Linux build chat connects
disable banners for now since it messes up Windows builds
various bits of cleanup and old debug code removal
2008-02-23 20:11:37 +00:00
taylor 22ba117494 fix malloc/free/strdup to use vm_* versions 2008-02-23 20:09:50 +00:00
taylor 8bf5f5b86a enable PXO lobby by default 2008-02-23 19:59:33 +00:00
taylor 8c37225516 shouldn't be able to target ourselves with target-last-message-sender (Mantis #1534) 2008-02-22 06:21:59 +00:00
taylor 8d84d5c128 make sure that we always respect path restrictions on graphics file loads (prevents stupid load order bug) 2008-02-22 02:50:04 +00:00
taylor 3ddec074fb deal with AI goals better with autopilot, particularly so that we don't wipe out AI goals at end of AP run (Mantis #1521) 2008-02-22 02:42:32 +00:00
taylor 6b24116d1a this should allow a more graceful handling of 0-byte VP files so that they don't cause hangs/crashes 2008-02-22 02:40:30 +00:00
taylor a22f065ea1 add Murleen's prospective fix and revert r4421 (should cover Mantis #83, #1248, and everything loosely based on them) 2008-02-22 02:35:22 +00:00
taylor bc5e9722c9 fix fighter beam weapon energy draw to work correctly (Mantis #1170)
setup fighter beams to work a bit better for players, with a good timestamp and a fail sound
2008-02-22 02:18:20 +00:00
taylor 3780ef0832 remove the error check for movies larger than 640x480 as the code was fixed the handle that a while back 2008-02-22 02:05:07 +00:00
taylor ea15860797 be sure to clean up if a mission load fails (Mantis #1576) 2008-02-22 02:03:16 +00:00
Goober5000 56a33f6ec6 fix Mantis #1592 and remove obsolete no-bank flag 2008-02-20 07:47:33 +00:00
Goober5000 b001ec4a9e fix Mantis #1592 2008-02-20 07:47:16 +00:00
Goober5000 9f5892d020 this is dumb; I didn't even use the formula correctly 2008-02-20 07:45:35 +00:00
WMCoolmon 4a737c0206 Minor scripting optimization 2008-02-17 04:31:49 +00:00
Kazan 90808c47a9 better way of doing the SLDC endianity swapping according to taylor 2008-02-12 00:49:22 +00:00
Kazan 529f1f910c Endian-gender safety for SLDC, 1st part of $no_collide (need to make it not obscure objects behind such chunks) 2008-02-12 00:41:21 +00:00
Kazan ee17e62350 Shield Collision Tree Support (POF Chunk SLDC) 2008-02-11 22:33:43 +00:00
WMCoolmon 2d803e272e Added bm_is_valid() 2008-02-11 05:13:50 +00:00
Goober5000 92ebd9f871 revert the directory move 2008-02-09 21:33:46 +00:00
Goober5000 e07f46cdfe revert the directory move 2008-02-09 21:33:46 +00:00
karajorma 6168a70b1b Add some descriptions for a few multiplayer options. 2008-02-09 17:58:29 +00:00
karajorma 9ccd2b82db Fix a scoping issue with wingman names. 2008-02-09 17:51:11 +00:00
WMCoolmon d77079f3e9 Added -res command line; fix un/signed warning; fix bool warning. 2008-02-09 07:35:58 +00:00
Backslash a2b815af92 Ok, committing this patch again now that the EOL thing is cleared up. 2008-02-09 07:00:49 +00:00
Kazan 13a667f76f commit my latest version after the update conflict 2008-02-09 03:18:54 +00:00
taylor 5d2bb0b148 set eol-style to LF for all code
set eol-style to CRLF for MSVC6 project files (since Windows needs it this way to load them)
2008-02-09 03:07:56 +00:00
taylor 92af91e930 set eol-style to LF for all code
set eol-style to CRLF for MSVC6 project files (since Windows needs it this way to load them)
2008-02-08 23:08:13 +00:00
Kazan 380b1ebfff back out Backslash's commit of Keldor's patch - busted line endings again 2008-02-08 21:41:11 +00:00
Kazan 4e08b38aec back out keldor's dynamic messages again, Goober said it was bad in ways i didn't catch 2008-02-08 21:38:33 +00:00
Kazan 63b20b2f8c Autopilot fixes: wing formation placement, capship formation creation 2008-02-08 17:44:35 +00:00
WMCoolmon a84cb1a407 Updated the MSVC 2003 project files to use a more sensible intermediate file structure than the MS default 2008-02-08 10:52:11 +00:00
Backslash 9738991e86 Mantis #0001488. The cases are depreciated, wouldn't compile using newest SDK. 2008-02-08 07:30:18 +00:00
Backslash 3f2aed2faa Mantis #0001488. The cases are depreciated, wouldn't compile using newest SDK. 2008-02-08 07:29:44 +00:00
Kazan 27bcbda108 recommiting Keldor's Dynamic Message Limit patch - this time with 100% less line ending busting 2008-02-08 04:37:17 +00:00
Kazan 45be212c30 forgot this fix again :D 2008-02-08 04:35:18 +00:00
Kazan 7e25a502a8 recommiting keldor's javelin_hs patch without busting line endings 2008-02-08 04:34:18 +00:00
Kazan 0f84bc8c55 recommiting keldor's cutscene bars fix without busting line endings 2008-02-08 04:33:07 +00:00
Kazan 43dd6aa1b0 Recommit the autoaiming patch.. looks clean now 2008-02-08 03:04:41 +00:00
Kazan 196911ae1d oops 2008-02-08 03:04:12 +00:00
Kazan 9a7fda3aef restore changeset 4411.. didn't actually need to revert it and i need those changes 2008-02-08 02:34:50 +00:00
Kazan 1d2d2bce10 revert all my commits from today [revert codebase back to r4410] 2008-02-08 02:29:47 +00:00
Kazan e4cbb7ffb3 Keldor's Dynamic Message Limit fix - Approved by Kazan 2008-02-07 19:14:07 +00:00
Kazan f575e36d94 Fix small error in a function from Keldor's Javelin HS diff 2008-02-07 17:01:42 +00:00
Kazan 9adacb0a51 Keldor's Javelin HS (new homing missile type) patch - approved by Kazan 2008-02-07 16:55:00 +00:00
Kazan 2edf72bf47 Keldor's Cutscene Bars temporary fix (until 3.7) - Approved by Kazan and Taylor 2008-02-07 16:46:33 +00:00
Kazan 37f2b81e35 Keldor's Autoaiming patch - approved by Kazan 2008-02-07 16:45:16 +00:00
Kazan a151ad3b01 small autopilot fix 2008-02-07 16:44:28 +00:00
taylor 4fe37c55b0 remove old ignore files from CVS conversion 2008-02-06 13:35:19 +00:00
taylor 9464e8a110 remove old ignore files from CVS conversion 2008-02-06 13:31:14 +00:00
kazan f4b027b116 flip these around the right way finally.. almost forgot 2008-02-03 21:16:25 +00:00
kazan 45485c62a7 Fix autopilot sliding around finally i think :D Change how external camera is automatically determined by AP as well 2008-02-03 20:04:46 +00:00
Backslash de9a2e0d1a Bump MAX_MISSION_EVENTS and MAX_WINGS limits.
Ideally someone can make this dynamic later... maybe me when I have time to learn how.
2008-02-01 08:03:29 +00:00
Backslash 7c31632266 Bump MAX_MISSION_EVENTS and MAX_WINGS limits.
Ideally someone can make this dynamic later... maybe me when I have time to learn how.
2008-02-01 08:02:50 +00:00
Goober5000 2b2715d578 allow FS1 hud to be displayed in FS2
(many thanks to the icculus project for blazing the way)
2008-01-24 03:53:36 +00:00
Goober5000 b8eee053fa allow FS1 hud to be displayed in FS2
(many thanks to the icculus project for blazing the way)
2008-01-24 03:53:36 +00:00
karajorma 0eac8190af Fix for Mantis 1150 2008-01-20 17:18:06 +00:00
karajorma 3176af085d Fix for Mantis 1150 2008-01-20 17:18:06 +00:00
Goober5000 5dc5be5a70 implement the targeting cutoff properly (Mantis #1468) 2008-01-19 01:23:41 +00:00
Goober5000 9b2efde677 implement the targeting cutoff properly (Mantis #1468) 2008-01-19 01:23:41 +00:00
Goober5000 12bd14e579 we all got led down the garden path there! revert all radar range modifications 2008-01-19 00:27:43 +00:00
Goober5000 b57cae242b we all got led down the garden path there! revert all radar range modifications 2008-01-19 00:27:43 +00:00
karajorma 2381d980cb Fix for Mantis 1516 2008-01-18 23:13:05 +00:00
karajorma 2c904d2d33 Fix Mantis 1516 2008-01-18 23:00:16 +00:00
Goober5000 bfb087da1b back out the MOI fix 2008-01-18 17:59:53 +00:00
Goober5000 9e1580e663 back out the MOI fix 2008-01-18 17:59:53 +00:00
Goober5000 124d203ba2 warn users when they run a campaign under the wrong mod 2008-01-17 07:44:43 +00:00
Goober5000 8c34bdaab4 warn users when they run a campaign under the wrong mod 2008-01-17 07:44:43 +00:00
Backslash 4e8046261f Fixed set-object-speed sexps. Thanks for the inspiration, Keldor! 2008-01-16 10:15:21 +00:00
Backslash 2a176aae18 Fixed set-object-speed sexps. Thanks for the inspiration, Keldor! 2008-01-16 10:15:21 +00:00
karajorma 1da0671958 Add SEXPs for determining the players score and how many respawns they've used. Add num-assists to this branch too. 2008-01-12 08:44:34 +00:00
karajorma e0666a22ed Add SEXPs for determining the players score and how many respawns they've used. 2008-01-12 08:42:34 +00:00
Kazan 9ceeef4403 Apply KeldorKatarn's no autopilot mission flag patch (And a sexp to toggle it as it is a flag that can be dynamically toggled safely) "use-autopilot" is the SEXP [Applied KK's patch by hand]
Had to move things around and resize the mission specs editor - lots of MSVC2005 autogenerated garbage changes in this diff.
2008-01-08 17:24:24 +00:00
Kazan 030fdfb9c9 helps to check the right value for the flag 2008-01-08 16:43:37 +00:00
Kazan f2e562401d add chat/pxo files to MSVC 2005 project
Fix the autopilot cinematic wiggle, hopefully once and for all (every tick force all nav carry ship orientation and wing'ed-ship positions)
2008-01-08 01:41:13 +00:00
wmcoolmon c55d7ee608 hud_get_draw() 2008-01-05 02:39:42 +00:00
wmcoolmon f825c69d5d Ze Viewer_pos...it does nothing! 2008-01-05 02:33:41 +00:00
wmcoolmon 8901fa67a4 Fix lighting and possibly clipping issues with separate-model cockpits 2007-12-31 06:44:23 +00:00
wmcoolmon e3a73a08b2 Move cockpit model rendering to prevent unneeded projection matrix switching 2007-12-31 01:29:40 +00:00
karajorma 08491b9127 Catch-up update. This stuff is all in 3.6.9 but somehow missed being added to HEAD. 2007-12-30 18:30:29 +00:00
wmcoolmon 3df377b270 Separate cockpit model support 2007-12-30 15:29:24 +00:00
wmcoolmon 9b0264e023 player.IsMulti 2007-12-30 13:44:40 +00:00
karajorma cddb4efc06 Since you can't actually save a mission without this entry and FS2 crashes without it this probably shouldn't be optional. 2007-12-29 21:03:46 +00:00
Backslash 46fb02fb92 Backslash's "let's get this stuff into 3_6_9 as well" commit.
-gliding with thruster adjustments and speed cap
-glide_when_pressed control (right above bank_when_pressed)
-fixes to the thrusters sound and visuals while gliding
-don't show muzzle flashes in 1st person
-quick reticle for multitarget and asteroids
2007-12-28 02:10:38 +00:00
turey 1778678839 Added Fiction Viewer files to project. 2007-12-25 04:05:26 +00:00
turey 8aa5477a14 Small fix for sim hull stuff. 2007-12-24 19:48:14 +00:00
Backslash dead40f534 Glide When Pressed key works now!
Also, a fix to the engine sound so that it stops playing when the throttle is at 0.  (It used to just stop looping -- but in BtRL for example the sound is 20 seconds long.)
2007-12-22 09:36:17 +00:00
turey d5aa9ccba8 Bunch of stuff already in HEAD. Shouldn't break anything. 2007-12-20 01:57:45 +00:00
karajorma 8d3d29d9ba Fix the Number Used in Wings display in FRED so that it does what V probably intended it to do all along. 2007-12-19 10:54:26 +00:00
wmcoolmon fa805110de Move the camera functions into the 'mission' library 2007-12-15 09:52:28 +00:00
wmcoolmon 64324081b7 Maybe-catch an interesting crash upon attempting to revert a mission with no cargo. 2007-12-15 09:41:43 +00:00
wmcoolmon eaca028e31 Handle missing ship model files more gracefully 2007-12-15 09:12:57 +00:00
karajorma e60d83e92a Unbreak FRED compiling 2007-12-15 07:41:13 +00:00
karajorma 59e0bd8613 FRED Changes to support alt name as callsign 2007-12-08 20:35:27 +00:00
karajorma 60fb0720cc Add the use alt as callsign option.
Add a few typo and comment fixes while I'm at it
2007-12-08 20:07:55 +00:00
karajorma 6b8cb6d317 Fix the Run Freespace option in FRED 2007-12-08 20:02:16 +00:00
Goober5000 0b1c957daf patch hole in the state machine fix 2007-12-08 04:07:00 +00:00
Goober5000 db7dd7e9e8 patch hole in the state machine fix 2007-12-08 04:07:00 +00:00
Goober5000 6477cfdfc0 catch invalid bounding boxes caused by buggy POF editors ;) 2007-12-03 04:47:02 +00:00
Goober5000 29be3c027b catch invalid bounding boxes caused by buggy POF editors ;) 2007-12-03 04:47:02 +00:00
Goober5000 f76ba63460 watch out for bad MOI values 2007-12-02 08:21:50 +00:00
Goober5000 1af503aaa5 watch out for bad MOI values 2007-12-02 08:21:50 +00:00
karajorma 2f136243e0 Turn a couple of things on by default. That's two less questions for FRED newbies to bother me with. 2007-11-29 11:29:14 +00:00
karajorma d195a14b8c Make the Run Freespace menu option work again 2007-11-29 11:26:51 +00:00
karajorma f5226d93bb Change the way that score is parsed from mission files to make it easier on developers. 2007-11-28 21:00:34 +00:00
karajorma cebd54340c Fix Mantis 0397 2007-11-26 18:43:52 +00:00
wmcoolmon f5d5b2fb3b MOI access 2007-11-24 10:41:22 +00:00
wmcoolmon 8bde227a01 More script-eval functionality; additional matrix functions 2007-11-24 10:14:58 +00:00
wmcoolmon b28354485b Fix script-eval and script-eval-num 2007-11-24 08:55:21 +00:00
wmcoolmon 42481ce816 Various minor sign/casting fixes 2007-11-24 04:33:50 +00:00
wmcoolmon 9c1ce03809 Update MSVC2003 Project files 2007-11-24 04:33:29 +00:00
wmcoolmon 45c9b5f72e - Asteroid, debris, and ship collision damage type support
- Scripting system variable-setting optimizations
- Standardize override style
- Reinstate "Self" variable for HUD
- Automatic drawString moving-to-next-line
- Visible subsystem name can be changed through scripting; will not be changed in the log
- Fix many for-loop signed/unsigned warnings related to size()
- Asteroid, debris scripting collision handling
- Many, many additional Lua functions and variables
- Fix the dreaded random-Lua-parse-crash bug
- Fix struct array malf-ups due to flag_def_list change
2007-11-23 23:49:42 +00:00
wmcoolmon dfb9d2cac6 Improved nonwindows Lua errors 2007-11-23 23:48:21 +00:00
wmcoolmon 27b094162c Update MSVC2003 project files & fix debugging 2007-11-23 23:46:28 +00:00
wmcoolmon 4882c3528a weapon_armed update 2007-11-23 23:32:27 +00:00
wmcoolmon 6e9f804161 Detect and warn when bad axis readings are loaded from a pilot file (Causes crashes on axes_values[Axis_map_to[i]] in control_get_axes_readings 2007-11-23 23:25:15 +00:00
wmcoolmon 614fe4f390 Misc. fixes 2007-11-23 23:22:34 +00:00
wmcoolmon e9c7ed1106 Fix array malfup due to flag_def_list change 2007-11-23 23:17:45 +00:00
wmcoolmon d16692d30f Fix un/signed warnings related to size(), optimize Knossos-finding 2007-11-23 23:17:16 +00:00
wmcoolmon f5dfaf5423 Fix un/signed warning due to size() 2007-11-23 23:16:44 +00:00
wmcoolmon 9d58857b68 Fixed array size, as it looks like it has to be the say as NUM_JOY_AXIS_ACTIONS 2007-11-23 23:08:32 +00:00
wmcoolmon 2028c595ea Updated event editor with minihelp box and numbered icons 2007-11-23 23:05:42 +00:00
wmcoolmon c3cb433c37 Fix compiling under HEAD branch. 2007-11-23 21:58:10 +00:00
phreak 9d96935ab3 Change the device context variable name. 2007-11-22 17:51:35 +00:00
taylor b6726ac703 oops! not ready to commit that part just yet :D 2007-11-22 05:49:36 +00:00
taylor a4c1116377 oops! not ready to commit that part just yet :D 2007-11-22 05:49:36 +00:00
taylor 641f84c94d bump node allocation increment (when you are regularly realloc'ing 20-30 times, the increment is too low :)) 2007-11-22 05:36:06 +00:00
taylor a32c5a88eb bump node allocation increment (when you are regularly realloc'ing 20-30 times, the increment is too low :)) 2007-11-22 05:36:06 +00:00
taylor 0c83c37f2a make sure that a missing ship anim doesn't lead us to a horrible death
minor cleanup
2007-11-22 05:31:39 +00:00
taylor aa3d06dfe9 better case for making sure that a missing ship anim doesn't lead us to a horrible death
minor cleanup
2007-11-22 05:31:18 +00:00
taylor ee963473ab fix some missing cleanup 2007-11-22 05:25:22 +00:00
taylor 0b153565cb fix some missing cleanup 2007-11-22 05:25:22 +00:00
taylor c4601e8bb1 fix campaign is missing then give player choice to switch campaigns, switch pilots, or exit 2007-11-22 05:23:44 +00:00
taylor c7bf631c1e fix campaign is missing then give player choice to switch campaigns, switch pilots, or exit 2007-11-22 05:23:44 +00:00
taylor 2d6cc6cc8f no reason to if-else the hud multiplier if it simply defaults to 1.0
add a little sanity checking for hud mutiplier tbl value
add missing multiplier for off-screen indicator
2007-11-22 05:19:47 +00:00
taylor 50d23520f9 no reason to if-else the hud multiplier if it simply defaults to 1.0
add a little sanity checking for hud mutiplier tbl value
2007-11-22 05:19:09 +00:00
taylor 5503c0b87f try to deal better with gamma setting/resetting when minimizing/restoring the game (Mantis #1210) 2007-11-22 05:11:38 +00:00
taylor ce9161c686 try to deal better with gamma setting/resetting when minimizing/restoring the game (Mantis #1210) 2007-11-22 05:11:38 +00:00
taylor e1a896fa88 use the less dumb method 2007-11-22 05:04:07 +00:00
taylor e3a9577fe1 minor fixes and cleanup for the warp effect
change scale of 3D warp effect to better match up with size of 2D effect
2007-11-22 05:02:44 +00:00
taylor 7d6c299c08 minor fixes and cleanup for the warp effect
change scale of 3D warp effect to better match up with size of 2D effect
2007-11-22 05:02:44 +00:00
taylor e1c6bbe083 add/remove some old, forgotten, and new files 2007-11-22 04:52:30 +00:00
taylor 28b036029c add/remove some old, forgotten, and new files 2007-11-22 04:52:30 +00:00
taylor 22ef66b812 initial support for cursors that are larger than 32x32
fix bug where animated cursors would be constantly loaded/unloaded
2007-11-22 04:49:58 +00:00
taylor f2d53a8dd6 initial support for cursors that are larger than 32x32
fix bug where animated cursors would be constantly loaded/unloaded
2007-11-22 04:49:58 +00:00
taylor 500ad24462 cleanup/fixage for fade in/out function (Mantis #1186) 2007-11-22 04:43:47 +00:00
taylor fd05a37b5a cleanup/fixage for fade in/out function (Mantis #1186) 2007-11-22 04:43:47 +00:00
taylor 236bbdf522 be sure that we hide the game's mouse cursor (Mantis #1401) 2007-11-22 04:31:12 +00:00
taylor a987b0a3d6 be sure that we hide the game's mouse cursor (Mantis #1401) 2007-11-22 04:31:12 +00:00
Goober5000 cf56e14659 add Wing Commander Saga's fiction viewer 2007-11-21 07:28:50 +00:00
Goober5000 588605a888 add Wing Commander Saga's fiction viewer 2007-11-21 07:28:50 +00:00
turey 446fa0a31e minor bugfix. 2007-11-21 04:53:31 +00:00
Goober5000 501a9eafe6 fix ship-type-destroyed 2007-11-20 04:58:25 +00:00
Goober5000 fa9a9e985a fix ship-type-destroyed 2007-11-20 04:58:25 +00:00
Goober5000 c4cbd89641 recognize a Vasudan main hall even when it isn't the second one; play the appropriate music as soon as the main hall switches 2007-11-20 01:11:13 +00:00
Goober5000 d4c2ea8a67 recognize a Vasudan main hall even when it isn't the second one; play the appropriate music as soon as the main hall switches 2007-11-20 01:11:13 +00:00
Goober5000 c0963c6325 clean up the state machine logic for starting games 2007-11-19 20:24:40 +00:00
Goober5000 4567989d0d clean up the state machine logic for starting games 2007-11-19 20:24:40 +00:00
Goober5000 73a7fb0c1d some minor enhancements to the skip mission cheat 2007-11-19 19:50:15 +00:00
Goober5000 8d5fdcc37f some minor enhancements to the skip mission cheat 2007-11-19 19:50:15 +00:00
Goober5000 16748705a1 remove warning... properly this time 2007-11-19 18:11:03 +00:00
Goober5000 9616a43e3d remove warning... properly this time 2007-11-19 18:11:03 +00:00
Goober5000 5a51a9d492 clarify what this flag is actually for 2007-11-19 06:22:35 +00:00
Goober5000 c6a9b0e113 clarify what this flag is actually for 2007-11-19 06:22:35 +00:00
Goober5000 dc76ca51c0 add the merge_stats debug function (use with caution) 2007-11-19 02:39:47 +00:00
Goober5000 a3d02e705d use relative paths 2007-11-19 02:28:26 +00:00
Goober5000 b91bffb6c7 fix for Mantis #1503 2007-11-18 07:43:15 +00:00
Goober5000 186d62b292 fix for Mantis #1503 2007-11-18 07:43:15 +00:00
Goober5000 0725dadcd4 gak -- stupid mistake 2007-11-18 06:57:40 +00:00
Goober5000 ec6cb63d7d gak -- stupid mistake 2007-11-18 06:57:40 +00:00
karajorma 73d5d0d56d Fix peristent variables in missions played from the techroom 2007-11-14 14:14:25 +00:00
karajorma 56ed1fdb38 Fix peristent variables in missions played from the techroom 2007-11-14 13:49:31 +00:00
taylor ec4880a517 fix out-of-bounds issue from retail (Mantis #1518) 2007-11-09 01:32:54 +00:00
taylor 36967fcebf fix out-of-bounds issue from retail (Mantis #1518) 2007-11-09 01:32:54 +00:00
karajorma b67c9137a0 This is better than the other way. 2007-10-29 18:45:45 +00:00
taylor 75818371d0 make sound_buffers[] dynamic (part 1 of trying to better handle mods with lots of voice acting, like BtRL)
re-enable DirectSoundCapture for OpenAL builds, at least until I write the OpenAL version of capture (Mantis #1378)
2007-10-29 15:32:19 +00:00
karajorma bdb786f054 This is better than the other way. 2007-10-29 11:32:22 +00:00
karajorma 25f6b2f96a Add the hits-left-singe-subsystem SEXP 2007-10-28 18:10:45 +00:00
taylor 308251a595 bump the buffer size used for Warning() and Error() messages 2007-10-28 16:46:36 +00:00
taylor 6cf8d8f0a9 fix volume-setting bug for menu music 2007-10-28 16:45:56 +00:00
taylor 3f95d5d175 fix anothing something that Valgrind complained about 2007-10-28 16:45:05 +00:00
taylor 3d9a28fbaf cleanup and bug fixes for ship-guardian-threshold and ship-subsys-guardian-threshold (Mantis #1473) 2007-10-28 16:44:33 +00:00
taylor aa157a007a always return the default value of osreg isn't initted yet 2007-10-28 16:42:54 +00:00
taylor eeefca30af slighly cleaner/faster version of object secondary fire control 2007-10-28 16:42:16 +00:00
taylor 489eab4e8b minor code cleanup and better error handling 2007-10-28 16:39:58 +00:00
taylor 509869ca5a fix a loadout bug where the current mission name would get substituted for the previous one by mistake 2007-10-28 16:39:17 +00:00
taylor 79575d02be fix a bug that would crash after hitting ESC and trying to load a pilot (Mantis #1513)
some minor formatting cleanup
2007-10-28 16:38:13 +00:00
taylor 21cc3ce5ab make sure that Warning()'s are sent to the debug log too, regardless of whether warning popup is enabled 2007-10-28 16:36:34 +00:00
taylor 74a6b2acb6 add "2D Mission" checkbox to mission specs window (Mantis #1387) 2007-10-28 16:35:13 +00:00
taylor cdddb21b20 freakish hack to allow FRED to run properly when executed from a terminal (and Wine under Linux) 2007-10-28 16:34:11 +00:00
taylor fb32cfdb20 tisk tisk 2007-10-28 16:33:05 +00:00
taylor 1bff85ac82 Valgrind was endlessly complaining about this 2007-10-28 16:32:06 +00:00
karajorma e8c98f4ef4 Make Ships_Exited Dynamic. Add the hits-left-single-subsystem and get-damage-caused SEXPs. Minor changes to make diffing 3.6.9 and HEAD easier. 2007-10-28 15:38:18 +00:00
taylor 1654c668cc reset Perspective_locked at the start of each mission so that view controls don't get locked until exit 2007-10-23 20:07:42 +00:00
taylor 74c7400d19 reset Perspective_locked at the start of each mission so that view controls don't get locked until exit 2007-10-23 20:07:42 +00:00
phreak 48f062dfc9 Get rid of 1-letter and non-descriptive variable names. 2007-10-23 02:07:27 +00:00
phreak 09370af3ad 'phreak' is now all lowercase (and has been for some time now) 2007-10-22 22:23:22 +00:00
Goober5000 e4e2692070 fix a minor bug in the dockpoint system (affects sm2-07a in the Port) 2007-10-21 22:11:17 +00:00
Goober5000 795c0f08ab fix a minor bug in the dockpoint system (affects sm2-07a in the Port) 2007-10-21 22:11:17 +00:00
taylor 99e83dece2 fix bug with +remove that made a beam section still appear partially valid
fix temp-var snaffu that hendered debugging
2007-10-21 03:40:41 +00:00
Kazan 1a0257fd3e Enemy cargo containers should not prevent autopilot.
Fix build problem in parselo (strrchr returns const char* not char*, need to explicitly cast - raises error in MSVC2005)
Update MSVC2005 "code" project to reflect removal/addition of fs2netd related files
2007-10-20 23:28:49 +00:00
taylor 3768baeb3f change Warning() and Error() to use const format variables (can't remember who said to do this)
fix memory error when zero'ing buffers for error messages on non-Windows platforms
2007-10-17 21:03:06 +00:00
taylor d4f9fe36b2 since we are polling, "0" is a valid return and we need to wait until we actually get data (screwed up login packet order) 2007-10-17 21:01:33 +00:00
taylor 54eba36be6 sometimes the thread header needs to be specifically included since SDL.h doesn't always do it 2007-10-17 20:59:30 +00:00
taylor 43c2000fde fix mismatched parameters (Mantis #1470) 2007-10-17 20:58:25 +00:00
taylor 210e5162a7 Oops, forgot that the v.2 daemon is still on the secondary IP :) 2007-10-15 08:18:33 +00:00
taylor c5235c6428 FS2NetD v.2 (still a work in progress, but is ~98% complete) 2007-10-15 06:43:23 +00:00
karajorma 297b7a73af Typo 2007-10-12 20:30:02 +00:00
karajorma 880292201d Partial (?) fix for Mantis 1084. At least it shouldn't Int3() when the server exits any more. 2007-10-12 19:10:07 +00:00
karajorma eaa6e6fc3d I meant to remove this ages ago! 2007-10-12 18:57:16 +00:00
karajorma 148d318069 Doh! 2007-10-12 14:53:40 +00:00
taylor 35ff83a433 fix bugs in beam-*-all and turret-*-all that made them always trigger an Int3() 2007-10-04 16:26:43 +00:00
taylor d5e5b661a1 fix bugs in beam-*-all and turret-*-all that made them always trigger an Int3() 2007-10-04 16:26:43 +00:00
taylor 5188a848ea get rid of some old/obsolete items (Mantis #1489 and #1497) 2007-10-04 16:18:46 +00:00
taylor 9fe1589481 get rid of some old/obsolete items (Mantis #1489 and #1497) 2007-10-04 16:18:46 +00:00
Goober5000 44e03a8fa8 another fix by razorjack... parent is -1 when created by sexp 2007-09-30 22:37:08 +00:00
Goober5000 5e52a7b25e another fix by razorjack... parent is -1 when created by sexp 2007-09-30 22:37:08 +00:00
Goober5000 b73b258942 another patch by razorjack -- remove something that never worked 2007-09-30 22:28:29 +00:00
Goober5000 fc1487d204 another patch by razorjack -- remove something that never worked 2007-09-30 22:28:29 +00:00
Goober5000 23863d81bc a bugfix by razorjack 2007-09-30 19:01:18 +00:00
Goober5000 9498ceac29 a bugfix by razorjack 2007-09-30 19:01:18 +00:00
karajorma ed1c699dde Fix x-builtin-messages so that the Any Wingman option works 2007-09-29 21:51:31 +00:00
karajorma c0f385f66a Fix x-builtin-messages so that the Any Wingman option works 2007-09-29 21:51:31 +00:00
karajorma 37a1565db0 Upgrade the beam-x-all and turret-x-all SEXPs to accept more than one ship.
Add the allow-treason SEXP
2007-09-29 15:27:53 +00:00
karajorma f7c7f1368b Upgrade the beam-x-all and turret-x-all SEXPs to accept more than one ship. 2007-09-29 15:21:33 +00:00
karajorma 224d1b5405 Fix the double respawn bug (Mantis 788) and hopefully the corresponding server Int3 (Mantis 1213) 2007-09-29 14:31:17 +00:00
karajorma 5d7b3c0385 Fix the double respawn bug (Mantis 788) and hopefully the corresponding server Int3 (Mantis 1213) 2007-09-29 13:58:45 +00:00
turey 45fd447f07 Mouse defaults to enabled as suggested in Mantis bug: http://scp.indiegames.us/mantis/view.php?id=1498 2007-09-29 00:24:51 +00:00
turey a13b8f3632 Final fix for mantis bug: http://scp.indiegames.us/mantis/view.php?id=1482
There should be no more occurrences of campaign missions being skipped.
2007-09-28 23:46:31 +00:00
turey d74232ca5b "no primary linking" ship flag and related SEXPs - prevent a ship from linking primaries. 2007-09-27 06:55:39 +00:00
Backslash 23995383c5 Whoops, missed a couple lines for Length Unit Multiplier 2007-09-16 21:01:48 +00:00
turey ffc05c39b5 More fixes related to Lua's waypoint lists. 2007-09-10 07:54:09 +00:00
turey 9ca9e01a2a Fixes related to Lua's asteroids, debris, and waypoints. 2007-09-05 23:47:19 +00:00
turey 57ee28531c More work on Mantis bug: http://scp.indiegames.us/mantis/view.php?id=1482 2007-09-05 23:42:18 +00:00
Goober5000 d8d993c2ed fix the factoring on the shudder parameters (Mantis #1419) 2007-09-04 00:08:51 +00:00
Goober5000 0b775ebebb fix the factoring on the shudder parameters (Mantis #1419) 2007-09-04 00:08:51 +00:00
Goober5000 14ba56bbe3 re-add the code to disable the Windows key... this time, without slowing the system to a crawl when FSO is in the background 2007-09-03 22:19:56 +00:00
Goober5000 3bb24e8508 re-add the code to disable the Windows key... this time, without slowing the system to a crawl when FSO is in the background 2007-09-03 22:19:56 +00:00
Goober5000 bdbf228fb6 roll back the windows key hook for now 2007-09-03 21:00:24 +00:00
Goober5000 488c4d2519 roll back the windows key hook for now 2007-09-03 21:00:24 +00:00
Goober5000 7f092e5673 fix for 1376 2007-09-03 01:02:50 +00:00
Goober5000 79da524c7e fix for 1471 2007-09-02 20:07:47 +00:00
Goober5000 aaec198d1f fix for 1471 2007-09-02 20:07:47 +00:00
Goober5000 a02c579e07 Shade's fix for #1329 (approximately) 2007-09-02 19:06:02 +00:00
Goober5000 4852f43179 Shade's fix for #1329 (approximately) 2007-09-02 19:06:02 +00:00
Goober5000 e59ec5b80a fix for #1455 plus a bit of cleanup 2007-09-02 18:53:24 +00:00
Goober5000 a9bd418c9d fix for #1455 plus a bit of cleanup 2007-09-02 18:53:24 +00:00
Backslash ce5fed58ab 2005 Project file cleanup. Changed a lot of paths to compiler macros.
Also gave Freespace2 project the inherited property sheet CoreWin.vsprops -- this lets Express Edition compile!
2007-09-02 12:02:28 +00:00
Backslash 64ac3f8d59 2005 Project file cleanup. Changed a lot of paths to compiler macros.
Also gave Freespace2 project the inherited property sheet CoreWin.vsprops -- this lets Express Edition compile!
2007-09-02 12:02:28 +00:00
Backslash 37f5be8588 (code by KeldorKatarn)
Reactivated HUD_ship_sent_printf to enable more flexible handling of ship names in displayed messages.
Added functionality for WCSaga to use class name instead of ship name for enemy wings.
2007-09-02 03:07:55 +00:00
Goober5000 eaac255a55 that wasn't supposed to happen 2007-09-02 02:17:56 +00:00
Goober5000 8a65c81333 added fixes for #1415 and #1483, made sure every read_file_text had a corresponding setjmp, and sync'd the parse error messages between HEAD and stable 2007-09-02 02:10:29 +00:00
Goober5000 6ab0b17acc added fixes for #1415 and #1483, made sure every read_file_text had a corresponding setjmp, and sync'd the parse error messages between HEAD and stable 2007-09-02 02:10:29 +00:00
turey 2b9255de4d Extensions to Lua system regarding asteroids, debris, and waypoints. They're not heavily tested, but I haven't seen any crashes from them. 2007-08-31 20:47:17 +00:00
turey cc1b0fda90 Fix for Mantis bug: http://scp.indiegames.us/mantis/view.php?id=1482
Also, fixed an implicit cast that MSVC2005 choked on.
2007-08-31 20:37:20 +00:00
Backslash c314641a80 The long-awaited HUD $Length Unit Multiplier setting! (With lots of help from KeldorKatarn)
Multiplies all speeds and distances displayed by the HUD by a given constant multiplier. The value is declared in hud_gauges.tbl (right after $Max Escort Ships) as
$Length Unit Multiplier: 5
2007-08-30 04:52:30 +00:00
Backslash 4c147438b7 The long-awaited HUD $Length Unit Multiplier setting! (With lots of help from KeldorKatarn)
Multiplies all speeds and distances displayed by the HUD by a given constant multiplier. The value is declared in hud_gauges.tbl (right after $Max Escort Ships) as
$Length Unit Multiplier: 5
2007-08-30 04:52:30 +00:00
phreak 78d135ac33 destroyed-or-departed-delay needs to check for ships that have self destructed 2007-08-26 16:01:59 +00:00
phreak 1f6d2e1339 destroyed-or-departed-delay needs to check for ships that have self destructed 2007-08-26 16:01:59 +00:00
phreak 1ddf52d855 Add WINVER define to the VC2005 project file so it shouldn't affect users of other compilers. 2007-08-25 15:37:43 +00:00
phreak 9c74b328d6 Add WINVER define to the VC2005 project file so it shouldn't affect users of other compilers. 2007-08-25 15:37:43 +00:00
Goober5000 de017db9e4 tweaky move 2007-08-20 02:55:12 +00:00
Goober5000 199687edc5 tweaky move 2007-08-20 02:55:12 +00:00
karajorma 104d7895ba Fix for Mantis 1234 2007-08-19 22:15:41 +00:00
karajorma 33afa505fb Fix for Mantis 1234 2007-08-19 22:15:41 +00:00
Goober5000 1a81b80368 bring wxFRED project files up to date 2007-08-18 02:23:13 +00:00
Goober5000 af19838b41 bring wxFRED project files up to date 2007-08-18 02:23:13 +00:00
Goober5000 af5763ee52 bring sexp into conformance with other sexps 2007-08-18 01:59:14 +00:00
Goober5000 9894a9a5e0 generalize the way radar ranges are handled (inspired by Shade's fix) 2007-08-17 03:29:51 +00:00
Goober5000 1e59d4a0e8 generalize the way radar ranges are handled (inspired by Shade's fix) 2007-08-17 03:29:51 +00:00
phreak e1ddcd3e68 Local SSMs shouldn't jump into subspace if they're not homing. 2007-08-16 00:45:54 +00:00
phreak 3436d52317 Local SSMs shouldn't jump into subspace if they're not homing. 2007-08-16 00:45:54 +00:00
turey 6cd5c8f1c1 Typo fixed. 2007-08-15 20:36:42 +00:00
turey 5a85e6c355 set-object-position and set-object-orient now work in multi. 2007-08-15 17:10:25 +00:00
Goober5000 bb5b20f079 okay... let's not redefine the Windows version 2007-08-15 07:16:35 +00:00
Goober5000 8ffbdd5a5d okay... let's not redefine the Windows version 2007-08-15 07:16:35 +00:00
Goober5000 ef85ef22b7 fix problems with the mini help box
(interestingly this feature was committed to stable but not HEAD)
2007-08-15 06:57:00 +00:00
Kazan 8348d9994a forgot to cvs add these project files 2007-08-14 15:42:44 +00:00
Goober5000 70ce6583ee disable the Windows key while FreeSpace is running (thanks to jr2)
c.f. http://www.hard-light.net/forums/index.php/topic,48838.0.html
2007-08-13 23:07:35 +00:00
Goober5000 cdd520d16d disable the Windows key while FreeSpace is running (thanks to jr2)
c.f. http://www.hard-light.net/forums/index.php/topic,48838.0.html
2007-08-13 23:07:35 +00:00
Goober5000 2767db1fd7 some improvements to the pirate ship 2007-08-13 04:54:41 +00:00
Goober5000 b4407562fb some improvements to the pirate ship 2007-08-13 04:54:41 +00:00
Goober5000 f66665124d some tweaks for a field that's mostly unused anyway 2007-08-11 16:52:02 +00:00
Goober5000 08a3265dd7 some tweaks for a field that's mostly unused anyway 2007-08-11 16:52:02 +00:00
Goober5000 13c369a528 fix case-sensitive #include (Linux) 2007-08-04 22:30:02 +00:00
Goober5000 37702f617c fix case-sensitive #include (Linux) 2007-08-04 22:30:02 +00:00
karajorma 98085cfc21 Reinforcements Editor bug fixed Sucka! 2007-08-03 19:50:43 +00:00
karajorma 3e082ddda8 Reinforcements Editor bug fixed Sucka! 2007-08-03 19:10:06 +00:00
Goober5000 8508332de2 fix compile error 2007-08-03 01:37:05 +00:00
Goober5000 38b37c56a5 fix warning 2007-08-03 01:35:48 +00:00
Goober5000 5557923e01 fix warning 2007-08-03 01:35:48 +00:00
Goober5000 f3854e36e1 fix compilation issue 2007-08-03 01:17:10 +00:00
Goober5000 2cda1d7dc6 fix compilation issue 2007-08-03 01:17:10 +00:00
turey 79600105ec Scales GUI Mouse movements correctly for non-standard resolutions. Doesn't affect gameplay. 2007-08-01 12:25:51 +00:00
Goober5000 658acec913 allow embedded dashes in command-line options 2007-07-29 03:11:01 +00:00
Goober5000 e954213fd2 allow embedded dashes in command-line options 2007-07-29 03:11:01 +00:00
karajorma 45d0813ea9 Apparently I forgot to commit this to HEAD. Fixes Mantis 1437 2007-07-28 22:10:46 +00:00
Goober5000 af6d1b5dab tweaks 2007-07-28 22:04:47 +00:00
Goober5000 7c4ef23da3 apply some of Turey's changes to stable branch 2007-07-28 22:04:14 +00:00
Goober5000 9c47548781 this should really be capitalized 2007-07-28 21:31:11 +00:00
Goober5000 bd7be99c55 this should really be capitalized 2007-07-28 21:31:11 +00:00
Goober5000 a1f19b67da make the parse object array dynamic; also made the docking bitstrings dynamic 2007-07-28 21:17:56 +00:00
Goober5000 82cfac7ec0 make the parse object array dynamic; also made the docking bitstrings dynamic 2007-07-28 21:17:56 +00:00
Goober5000 690569a512 a couple of tweaks 2007-07-28 04:43:43 +00:00
Goober5000 ee9b7b0c8c a couple of tweaks 2007-07-28 04:43:43 +00:00
Goober5000 a4155231fe AAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!! 2007-07-28 00:37:38 +00:00
Goober5000 69316e74f1 AAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!! 2007-07-28 00:37:38 +00:00
Goober5000 8113dde2c3 dork 2007-07-27 21:57:15 +00:00
Kazan 601dc51404 I <3 making stupid bugs (return camera to normal when not using cutscene bars) 2007-07-25 20:45:16 +00:00
Kazan 4d8fd166a9 I <3 making stupid bugs (return camera to normal when not using cutscene bars) 2007-07-25 20:45:16 +00:00
Kazan 94161d1ce8 two-part autopilot warp, add +No_Cutscene_Bars optional flag to autopilot.tbl 2007-07-25 14:51:14 +00:00
Kazan 11f0db776d two-part autopilot warp, add +No_Cutscene_Bars optional flag to autopilot.tbl 2007-07-25 14:51:14 +00:00
Kazan 4f9eadc29b small tweak 2007-07-25 00:33:31 +00:00
Kazan 5bae2148a2 small tweak 2007-07-25 00:33:31 +00:00
Kazan 5bb58f0068 oops 2007-07-24 20:31:00 +00:00
Kazan ec3b5c004f oops 2007-07-24 20:31:00 +00:00
Kazan 3ca43867de Make asteroid/debris fields interrupt autopilot, add "hazards near" message to autopilot.tbl, add use-nav-cinematics sexp, fix mantis #1441 2007-07-24 20:17:36 +00:00
Kazan f150c03f91 Make asteroid/debris fields interrupt autopilot, add "hazards near" message to autopilot.tbl, add use-nav-cinematics sexp, fix mantis #1441 2007-07-24 20:08:31 +00:00
Kazan ba19ffe304 Resolve Mantis 1281 2007-07-24 13:04:11 +00:00
Kazan 4e96074988 Resolve Mantis 1281 2007-07-24 13:04:11 +00:00
Goober5000 4f4eefe999 allow mission messages in dogfights (Mantis #1436) 2007-07-24 05:08:13 +00:00
Goober5000 ca65c5bb10 allow mission messages in dogfights (Mantis #1436) 2007-07-24 05:08:13 +00:00
Kazan 293045f787 Resolve Mantis #1440 2007-07-23 22:45:00 +00:00
Kazan 5093020316 Autopilot updates, minor misc fixes, working MSVC2005 project files 2007-07-23 16:08:36 +00:00
Kazan 249b4d9a2a remove unused function... unused function that should probably never be used 2007-07-23 15:56:42 +00:00
Kazan c926d76322 copy+pasted typo, now with extra hotsauce 2007-07-23 15:49:07 +00:00
Kazan def73bbfc4 typo correction in autopilot.tbl 2007-07-23 15:35:40 +00:00
Kazan 595cf19c54 Autopilot upgrades as described, MSVC2005 project fixes 2007-07-23 15:16:53 +00:00
turey 6e8a0839f1 Small bugfix relating to restoring engines from disabled via the set-subsystem-strength SEXP. 2007-07-19 05:44:00 +00:00
turey ae2beb730c Made Backslash's change to dampening tied to an ai_profiles flag, as it does affect
retail behavior, and significantly affects gameplay in the BtRL Demo.
Also, fixed a typo.
2007-07-19 03:19:32 +00:00
turey 11710d70f8 Small change to how Simulated Hull works. If ship is gone, it now has 0 Simulated
Hull.
2007-07-15 23:08:16 +00:00
Goober5000 5c72431d5b Kazan's VC2k5 project file fix (HEAD only) 2007-07-15 18:01:41 +00:00
Goober5000 47fd40e577 Kazan's autopilot fix 2007-07-15 18:00:55 +00:00
Goober5000 01c9d255ff Kazan's autopilot fix 2007-07-15 18:00:55 +00:00
Goober5000 de84535790 fix and clean up the warpout conditions 2007-07-15 08:20:05 +00:00
Goober5000 db0a3615fd fix and clean up the warpout conditions 2007-07-15 08:20:05 +00:00
Goober5000 c8638e7630 restore WMC's ship flag 2007-07-15 06:29:56 +00:00
Goober5000 b3be87b8cb restore WMC's ship flag 2007-07-15 06:29:56 +00:00
Goober5000 93f04065e4 fix extremely minor bug 2007-07-15 04:45:42 +00:00
Goober5000 6d2c2d26f6 fix extremely minor bug 2007-07-15 04:45:42 +00:00
Goober5000 05d4da7b01 partial commit of aldo's eyepoint feature
it will need a keystroke to be complete
2007-07-15 04:19:34 +00:00
Goober5000 f6545aef96 partial commit of aldo's eyepoint feature
it will need a keystroke to be complete
2007-07-15 04:19:34 +00:00
Goober5000 1505576dfb fixed a small bug in the lab
moved WMC's no damage scaling flag to ai_profiles and made it work correctly
removed my old supercap damage scaling change
moved Turey's truefire flag to ai_profiles
2007-07-15 02:45:51 +00:00
Goober5000 b6fc4e1ad1 fixed a small bug in the lab
moved WMC's no damage scaling flag to ai_profiles and made it work correctly
removed my old supercap damage scaling change
moved Turey's truefire flag to ai_profiles
2007-07-15 02:45:51 +00:00
Goober5000 6646d7c3c0 fix a newline bug in the voice acting manager 2007-07-14 23:22:47 +00:00
Goober5000 985f1562b9 fix a newline bug in the voice acting manager 2007-07-14 23:22:47 +00:00
turey 61a95313a1 Initial commit of Training Weapons / Simulated Hull code. 2007-07-13 22:28:13 +00:00
turey 086866773e Truefire weapons code, adds firing ship's velocity to weapon velocity for a more realistic firing, especially during glide. Activated with the "truefire" flag on a weapon. 2007-07-11 20:19:00 +00:00
turey d37bcd3f3b Ship Template fixes. It's fully working now, hopefully. 2007-07-11 20:11:33 +00:00
turey 0234df6e06 Fixed MSVC2005 Project. Debug Config compiles fine, still working on Release config. One file needs to be renamed for these to work, see the README. 2007-07-10 03:56:39 +00:00
Goober5000 2086e3309e fix an off-by-one error 2007-06-30 23:32:25 +00:00
Goober5000 d136994734 fix an off-by-one error 2007-06-30 23:32:25 +00:00
taylor 04919b889a convert to LF EOL 2007-06-25 19:17:56 +00:00
taylor 96429568ab convert to LN EOL 2007-06-25 19:16:27 +00:00
Backslash dadce33a59 Cutscene subtitle positioning fix for resolutions other than 1024x768. Code by MikeStar. 2007-06-24 23:32:16 +00:00
Backslash 478d255554 Cutscene subtitle positioning fix for resolutions other than 1024x768. Code by MikeStar. 2007-06-24 23:32:16 +00:00
turey f33c797004 Fixed some silly little bugs that somehow slipped through the cracks. 2007-06-24 21:45:56 +00:00
karajorma 61f0ee2587 Fix an issue with single character command line arguments 2007-06-24 18:04:23 +00:00
karajorma 3d85a0164c Fix an issue with single character command line arguments 2007-06-24 17:59:17 +00:00
turey baea060cd8 Added in Ship Templates code, with some syntax and warning cleanup. 2007-06-22 04:52:22 +00:00
wmcoolmon c33c892a2e Remove MSVC_7 directory from 3.6.9 branch 2007-06-09 00:57:36 +00:00
wmcoolmon 1529f3e5ee Update MSVC_2003 directory with MSVC_7 files 2007-06-09 00:56:10 +00:00
Backslash 5c32f6f28a Another Gliding fix for 3_6_9: Makes it so switching gliding back off doesn't make your ship instantly switch direction. 2007-06-04 03:09:51 +00:00
Backslash 9ad5ddd7ba Backslash's HEAD-only controls commit:
-Lateral thruster axes
-Slide_when_pressed
-Placeholders for glide_when_pressed and more controls, to give us a little breathing room while we wait for the real pilot file code
2007-06-04 00:04:21 +00:00
Backslash 57dc35ea26 Here's the Gliding gauge for 3_6_9 as well. Simple but useful especially for mods that use it, like BtRL 2007-06-02 21:40:59 +00:00
taylor 05eb49292e more resilient checking of stars.tbl and it's modular versions 2007-05-28 20:05:06 +00:00
taylor 0c643edb56 more resilient checking of stars.tbl and it's modular versions 2007-05-28 20:05:06 +00:00
taylor 5be69863a8 various bits of clean up
make stats printing a bit more sane
printf out game version info to debug log (not very helpful, but might prove some use)
2007-05-28 20:00:17 +00:00
taylor adbc67c92a various bits of clean up
make stats printing a bit more sane
printf out game version info to debug log (not very helpful, but might prove some use)
2007-05-28 20:00:17 +00:00
taylor 123324f723 this is a bit cleaner way to do it :) 2007-05-28 19:47:46 +00:00
taylor d612fafab8 oops! the exit() was supposed to come /after/ the last printf() :) 2007-05-28 19:46:30 +00:00
taylor 5ecfe3e282 oops! the exit() was supposed to come /after/ the last printf() :) 2007-05-28 19:46:30 +00:00
taylor 5d7e4404f5 make the chcksum spew in logs always have a full 8-set of values
skip over files found on system which are over the max filename length, prevents several crashes (partial for Mantis #1182)
2007-05-28 19:45:14 +00:00
taylor 40d3516892 make the chcksum spew in logs always have a full 8-set of values
skip over files found on system which are over the max filename length, prevents several crashes (partial for Mantis #1182)
2007-05-28 19:45:14 +00:00
taylor cef99dd24e various bits of cleanup
don't draw beam impact effect if we are hitting a shield
updated hit shield quadrant properly for player when a beam hits
set shield quadrant and exit_flag properly for collision info so that we don't count damage twice and handle no_pierce_shields properly
2007-05-28 19:41:47 +00:00
taylor 28af506677 various bits of cleanup
don't draw beam impact effect if we are hitting a shield
updated hit shield quadrant properly for player when a beam hits
set shield quadrant and exit_flag properly for collision info so that we don't count damage twice and handle no_pierce_shields properly
2007-05-28 19:41:47 +00:00
taylor 913942905f fix armor index bug for shockwaves 2007-05-28 19:38:10 +00:00
taylor deb8f63073 fix armor index bug for shockwaves 2007-05-28 19:38:10 +00:00
taylor 965a99a198 bump version to 3.6.10 2007-05-28 19:36:26 +00:00
taylor 6425eb2d88 bump version to 3.6.10 2007-05-28 19:36:26 +00:00
wmcoolmon a64052583b Project file commit. These aren't specifically set up for CVS, but they will at least compile. 2007-05-28 18:28:32 +00:00
wmcoolmon 9aba4be554 Added armor support for asteroid, debris, ship, and beam damage 2007-05-28 18:27:36 +00:00
Backslash ff87797e63 Now that I've figured out how to commit to the 3_6_9 branch, here's a cleanup and update to bring physics as close to HEAD as possible without breaking anything or adding my uberglide changes yet. This fixes:
-the reverse-thusters-not-working-at-full-throttle bug
-the fishtail-way-too-fast-sideslip at high Damp values problem
-the slide accel/decel damp inconsistency
Some of these fixes will be particularly noticable to the BtRL people, hopefully all in good ways.
Also fixed a bunch of typos and whitespace just to get it consistent with HEAD.
2007-05-26 15:36:38 +00:00
Goober5000 09214628de add placeholder stuff for parsing ship-class texture replacements 2007-05-26 15:12:07 +00:00
Goober5000 f3e1f3ade0 add placeholder stuff for parsing ship-class texture replacements 2007-05-26 15:12:07 +00:00
Goober5000 0914788c26 that was weird 2007-05-26 15:11:15 +00:00
Goober5000 61d6ee2fcb when importing FS1 missions, account for the shuffled Head-TP4 2007-05-26 12:08:26 +00:00
Goober5000 a29d1706c8 when importing FS1 missions, account for the shuffled Head-TP4 2007-05-26 12:08:26 +00:00
Goober5000 9df54f2db3 the reinforcement comm menu will now correctly display according to whether or not reinforcements are available 2007-05-26 00:56:11 +00:00
Goober5000 0f2adb4620 the reinforcement comm menu will now correctly display according to whether or not reinforcements are available 2007-05-26 00:56:11 +00:00
taylor f912c74372 add the rest of the texture page-in code changes that I skipped before (should fix Mantis #1389) 2007-05-25 13:58:26 +00:00
taylor e6145f580d make Linux just verbally ignore invalid cmdline options rather than it being fatal 2007-05-25 13:58:02 +00:00
taylor 26aca5d17b add the rest of the texture page-in code changes that I skipped before (should fix Mantis #1389) 2007-05-25 13:49:39 +00:00
taylor a51540ee05 make Linux just verbally ignore invalid cmdline options rather than it being fatal 2007-05-25 13:47:10 +00:00
wmcoolmon 3f7e3be7fb . 2007-05-20 21:24:09 +00:00
wmcoolmon 2a580262c9 FRED2 support for numbered SEXP operator arguments, minihelp box, fixed "Insert Event" when no events are present. 2007-05-20 21:21:35 +00:00
taylor 6252436a9e fix stupid bugs in CF_SORT_REVERSE (should be as originally intended now) 2007-05-20 02:51:26 +00:00
taylor 7d6fd7f47c fix stupid bugs in CF_SORT_REVERSE (should be as originally intended now) 2007-05-20 02:51:26 +00:00
taylor bdb607b7ee fix armor_parse_table() so that it will parse multiple entries properly
fix bug introduced from not closing down lcl_ext after parsing armor.tbl
2007-05-17 14:58:40 +00:00
taylor 9df5d079df fix armor_parse_table() so that it will parse multiple entries properly
fix bug introduced from not closing down lcl_ext after parsing armor.tbl
2007-05-17 14:58:40 +00:00
Goober5000 e16d188ac4 --grouped the shake/shudder code together a bit better
--added a sexp to generate shudder
--fixed a minor bug in lock-perspective
2007-05-14 23:13:51 +00:00
Goober5000 996ac6d6ab --grouped the shake/shudder code together a bit better
--added a sexp to generate shudder
--fixed a minor bug in lock-perspective
2007-05-14 23:13:51 +00:00
taylor 44c6c3eb67 add session open/close times to debug log 2007-05-11 03:16:01 +00:00
taylor c4133d937d add session open/close times to debug log 2007-05-11 03:16:01 +00:00
taylor 0375ec74e2 properly handle invalid sound index case, fixes div-by-0 error 2007-05-11 03:14:02 +00:00
taylor 1240bc9258 properly handle invalid sound index case, fixes div-by-0 error 2007-05-11 03:14:02 +00:00
taylor 4ffefdf065 very minor optimization (mul is much faster than div) 2007-05-11 03:12:28 +00:00
taylor acd1f216b6 very minor optimization (mul is much faster than div) 2007-05-11 03:12:28 +00:00
taylor 96fa7f453e fix debug message (using wrong name, spit out a bunch of garbage on Windows boxes) 2007-05-11 03:10:48 +00:00
taylor a1c3ae01e7 fix debug message (using wrong name, spit out a bunch of garbage on Windows boxes) 2007-05-11 03:10:48 +00:00
taylor 9bf5672811 delete the .hdr file once we are done with it, since it's no longer useful 2007-05-11 03:09:21 +00:00
taylor 1657c99868 delete the .hdr file once we are done with it, since it's no longer useful 2007-05-11 03:09:21 +00:00
Backslash 090e970881 Add feature to $Max Glide Speed -- negative number means no speed cap
Only show gun muzzle flash effect if in not cockpit view, or if "show ship" flag is set
Fix a couple typos ;-)
2007-05-09 04:16:06 +00:00
Backslash 1f600c8831 Fix tiny bug I introduced -- should use forward_decel_time_const, not slide_decel_time_const, for z
Add feature to $Max Glide Speed -- negative number means no speed cap
2007-05-09 04:13:14 +00:00
Backslash 45272622d0 Backslash's big Gliding commit! Gliding now obeys physics and collisions, and can be modified with thrusters. Also has a adjustable maximum speed cap.
Added a simple glide indicator.  Fixed a few things involving fspeed vs speed during gliding, including maneuvering thrusters and main engine noise.
2007-04-30 21:30:31 +00:00
karajorma db253c96c0 Doh! Missed the return type. 2007-04-26 18:59:36 +00:00
karajorma 3da381d169 Doh! Missed the return type. 2007-04-26 18:59:36 +00:00
karajorma a5b6f0ad9f Add the knock feature from Tom's build.
Fix a number of places where the player of a dogfight game could end up in the standard debrief.
2007-04-24 13:13:49 +00:00
karajorma 6760cbebec Fix a number of places where the player of a dogfight game could end up in the standard debrief. 2007-04-24 13:13:05 +00:00
karajorma fa9f2f861c Fix a number of places where the player of a dogfight game could end up in the standard debrief. 2007-04-24 12:07:35 +00:00
karajorma b3e9b661c7 Add the knock feature from Tom's build. 2007-04-24 09:52:26 +00:00
karajorma ba79b5838b Remove the -fredhtl command line. 2007-04-17 17:26:35 +00:00
karajorma d815151beb Remove the -fredhtl command line. 2007-04-17 17:15:31 +00:00
taylor 4affb17745 add Linux friendly icon 2007-04-15 12:46:43 +00:00
taylor 4189796cec add Linux friendly icon 2007-04-15 12:46:43 +00:00
taylor 139ba5e6c3 only add player-allowed flag on #Weak weapons when their non-weak versions also have the flag (Goober #73) 2007-04-14 23:44:08 +00:00
taylor fb040db978 only add player-allowed flag on #Weak weapons when their non-weak versions also have the flag (Goober #73) 2007-04-14 23:44:08 +00:00
taylor b0c08c4918 little cleanup
fix memory size fubar on trail vlist ptr
2007-04-14 23:42:20 +00:00
taylor a0e0a1ff8d little cleanup
fix memory size fubar on trail vlist ptr
2007-04-14 23:42:20 +00:00
Goober5000 5a48f2196b fixed a silly speech bug (Mantis #1238) 2007-04-13 03:23:12 +00:00
Goober5000 b1ec8c8f13 fixed a silly speech bug (Mantis #1238) 2007-04-13 03:23:12 +00:00
taylor 2f63fab268 cleanup and initialize persona_index properly for general safety reasons
slight change to karajorma's NO_BUILTIN_MESSAGES check, now it will be properly compiled away in release builds rather than an empty function
2007-04-13 00:36:43 +00:00
taylor 3a09abea41 cleanup and initialize persona_index properly for general safety reasons
slight change to karajorma's NO_BUILTIN_MESSAGES check, now it will be properly compiled away in release builds rather than an empty function
2007-04-13 00:36:43 +00:00
taylor 61585d85f3 use qsort() instead of insertion_sort() for light sorting, it should be better optimized and quicker in general for this use 2007-04-13 00:33:41 +00:00
taylor f0e3337d4f use qsort() instead of insertion_sort() for light sorting, it should be better optimized and quicker in general for this use 2007-04-13 00:33:41 +00:00
taylor 9b6c3f7c41 some basic cleanup for the extension code
fix the old bug that didn't report a missing extension name properly
get rid of the message that says to use D3D, that's not normally going to be an option anyway
add ARB_point_sprite support, mostly for fun since no code will actually use it until after 3.6.10
2007-04-13 00:31:58 +00:00
taylor 4303435527 some basic cleanup for the extension code
fix the old bug that didn't report a missing extension name properly
get rid of the message that says to use D3D, that's not normally going to be an option anyway
add ARB_point_sprite support, mostly for fun since no code will actually use it until after 3.6.10
2007-04-13 00:31:58 +00:00
taylor e088c7caa3 clean out some old code we no longer use/need
change warning messages to not print out current tbl name, since at the point those messages show the tbl has long since been parsed
add an extra quick-check to ship_get_subsystem_strength() to avoid div if we don't need it
make Ship_subsystems[] dynamic (sort of), it's allocated in sized sets now, so we can easily change size while still working with the existing linked-list code
2007-04-13 00:28:00 +00:00
taylor 5d0a58122b clean out some old code we no longer use/need
change warning messages to not print out current tbl name, since at the point those messages show the tbl has long since been parsed
add an extra quick-check to ship_get_subsystem_strength() to avoid div if we don't need it
make Ship_subsystems[] dynamic (sort of), it's allocated in sized sets now, so we can easily change size while still working with the existing linked-list code
2007-04-13 00:28:00 +00:00
taylor e300f255d9 cleanup of chksum stuff (works properly on 64-bit systems now)
add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
2007-04-11 18:24:28 +00:00
taylor d90d95fab7 this got chopped off of the previous commit for some reason 2007-04-11 18:23:01 +00:00
taylor 54e820b01c cleanup of chcksum stuff (works properly on 64-bit systems now)
add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
2007-04-11 18:21:23 +00:00
taylor 9c69c618a7 cleanup error message
allow launch_snd from tbl to be used for beam weapon shot sound (Mantis #1263)
2007-04-11 18:17:26 +00:00
taylor 42503bf705 cleanup error message
allow launch_snd from tbl to be used for beam weapon shot sound (Mantis #1263)
2007-04-11 18:17:26 +00:00
taylor 36c51e7b13 add modular version of strings.tbl (*-lcl.tbm) (provides for Mantis #924) 2007-04-11 18:11:21 +00:00
taylor 8b1ffdb5a0 add modular version of strings.tbl (*-lcl.tbm) (provides for Mantis #924) 2007-04-11 18:11:21 +00:00
taylor ac782bcbeb bm_unload_fast() should only unload the bitmap passed for animations, not the entire animation (fixes several issues) 2007-04-11 18:05:18 +00:00
taylor bd0a94d454 bm_unload_fast() should only unload the bitmap passed for animations, not the entire animation (fixes several issues) 2007-04-11 18:05:18 +00:00
taylor d0ff3d1aad get rid of stale NO_JOYSTICK define 2007-04-11 14:59:35 +00:00
taylor 4dc5960af3 get rid of stale NO_JOYSTICK define 2007-04-11 14:59:35 +00:00
taylor 28580b6adc add extra safety check to make sure that we are going to do a wildcard search for modular tables 2007-04-11 14:58:07 +00:00
taylor c83d9a9222 add extra safety check to make sure that we are going to do a wildcard search for modular tables 2007-04-11 14:58:07 +00:00
taylor 8549c9bd0f get rid of (now) unused variables 2007-04-11 14:50:01 +00:00
taylor fcc24560db get rid of (now) unused variables 2007-04-11 14:44:32 +00:00
taylor f993f80762 update to 3.6.9 release 2007-04-09 21:03:57 +00:00
taylor 674934d198 basic update to current frameworks (adding Theora) 2007-04-09 21:01:46 +00:00
taylor d8b0e274da new icon from Foxer 2007-04-09 21:00:44 +00:00
taylor b92d40dee5 update to current settings/files 2007-04-09 20:59:25 +00:00
karajorma db265c5d73 Fix for Mantis 1312 2007-04-09 18:25:31 +00:00
karajorma 7b2dbfdb1b Fix for Mantis 1312 2007-04-09 18:25:31 +00:00
karajorma 118989cef7 Fix .wav playback in the briefing editors. 2007-04-08 08:37:37 +00:00
karajorma 349573f03b Make .wavs work again in the briefing editors. .ogg appears to be a bit harder. 2007-04-08 08:28:20 +00:00
karajorma 806755bdb6 Friendly stealth ships shouldn't give away their position just cause they send a message. 2007-04-06 13:31:38 +00:00
karajorma 380f11890b Changed my mind This is an Int3() not an assertion 2007-04-06 13:28:49 +00:00
karajorma cdacc97f57 Prevent ships from jumping out in glide mode (They'd probably never get up to speed anyway) 2007-04-06 13:26:21 +00:00
karajorma e759b7b274 Fix a bug where gliding ships couldn't jump out. Remove a couple of magic numbers. 2007-04-06 13:24:32 +00:00
karajorma c02f2c3667 A couple of minor fixes 2007-04-06 13:21:18 +00:00
karajorma 73baf41622 Add the -cap_object_update command line to force multiplayer clients to a more server friendly object update setting. 2007-04-06 12:55:57 +00:00
karajorma 1ef884683c Fix bug whereby clients who were gliding can't jump out at the end of the mission. Remove a couple of magic numbers that looked at me the wrong way. 2007-04-05 16:49:21 +00:00
karajorma 98566d07f0 A few minor fixes 2007-04-05 16:43:44 +00:00
karajorma dff6fd67f0 What was I thinking? Fixed 2007-04-05 16:33:25 +00:00
karajorma d5d0d2bbd8 Fail warpout if the player is in glide mode (They'd never get up to warp speed anyway half the time) 2007-04-05 16:29:25 +00:00
karajorma 40c2d3abcc Remove message source boxes on friendly stealthed ships 2007-04-05 16:25:58 +00:00
karajorma 617d8276aa Makes little difference but I suppose I should zero that 2007-04-05 16:20:36 +00:00
karajorma 2fd3cf5d35 I could have sworn I committed this! Anyway, make the wingman complain when you shoot them instead of command. Send traitor messages from wingmen if command is silenced. 2007-04-05 15:59:44 +00:00
karajorma aa769f7149 I could have sworn I committed this! Anyway, make the wingman complain when you shoot them instead of command. Send traitor messages from wingmen if command is silenced. 2007-04-05 15:59:44 +00:00
Goober5000 489676d6b6 meh, space 2007-04-03 02:19:26 +00:00
Goober5000 b73cc58c2d meh, space 2007-04-03 02:19:26 +00:00
Goober5000 bb4cf59d2e fixed up some error messages 2007-04-03 01:39:31 +00:00
Goober5000 11982ffc72 fixed up some error messages 2007-04-03 01:39:31 +00:00
Goober5000 7605906b01 tweak 2007-04-03 00:59:09 +00:00
karajorma dcc9195b2c Fix assertion on red-alert carry status in multi games 2007-03-23 06:31:31 +00:00
karajorma 2cd6121394 *** empty log message *** 2007-03-23 06:25:31 +00:00
taylor 11dfdef343 fix breakage 2007-03-23 01:52:28 +00:00
taylor 3fe439f25a bit of cleanup and minor performance tweaks
sync up with new generic_anim/bitmap and weapon delayed loading changes
with generic_anim, use Goober's animation timing for beam section and glow animations
make trail render list dynamic (as well as it can be)
2007-03-23 01:51:57 +00:00
taylor c5356ac574 bit of cleanup and minor performance tweaks
render ship insignia with a bit of alpha to help with blending/lighting
dynamic thruster particle limits
update for generic_bitmap/anim changes
make use of flag_def_list for ship flags rather than a ton of if-else statements
use generic_bitmap and generic_anim where possible to faciliate delayed graphics loading (after all ship related tbls are parsed)
use VALID_FNAME()
2007-03-23 01:51:00 +00:00
taylor f733a5b766 get rid of non-standard itoa(), make use of the proper sprintf() instead 2007-03-22 22:34:59 +00:00
taylor e5ecafeb80 add back special "var" setting for flag_def_list and convert some of the lists to use it (more on the way) 2007-03-22 22:19:31 +00:00
taylor 52d7fad075 get rid of non-standard itoa(), make use of the proper sprintf() instead 2007-03-22 22:14:57 +00:00
taylor b59e86a42b some generic_bitmap fixes to go with new changes (not in CVS just yet, don't freak out)
make use of VALID_FNAME() where possible
fix an animation time issue (sub-second animation playback caused div-by-0)
2007-03-22 21:55:01 +00:00
taylor 836f004b2c fix issue where the lab menu bar would disappear at times when you click on it (Mantis #1063) 2007-03-22 21:00:48 +00:00
taylor 386eb565d8 forgot to remove -jpgtga from Launcher options previously
get rid of -fixbugs and -nocrash crap
2007-03-22 20:55:53 +00:00
taylor 9a78f616ea forgot to remove -jpgtga from Launcher options previously
get rid of -fixbugs and -nocrash crap
2007-03-22 20:55:53 +00:00
taylor 26f64984ac give a better msg when movies can't play because they are user-disabled with the cmdline option 2007-03-22 20:54:00 +00:00
taylor a067e310e8 give a better msg when movies can't play because they are user-disabled with the cmdline option 2007-03-22 20:54:00 +00:00
taylor e483d3b862 bump version to 3.6.10, it will be needed for new texture replacement stuff (tbl version commenting) 2007-03-22 20:52:38 +00:00
taylor 728290b631 bump version to 3.6.10, it will be needed for new texture replacement stuff (tbl version commenting) 2007-03-22 20:52:38 +00:00
taylor ddda5bcc9f some generic code cleanup 2007-03-22 20:50:28 +00:00
taylor 06e9167ec7 some generic code cleanup 2007-03-22 20:50:28 +00:00
taylor b11455d5f0 make sure that we set/reset the red alert data properly (Mantis #1255) 2007-03-22 20:47:49 +00:00
taylor 6092e1c81e make sure that we set/reset the red alert data properly (Mantis #1255) 2007-03-22 20:47:49 +00:00
taylor 098ed1b243 cleanup and fix for weapon cycling (Mantis #1298) 2007-03-22 20:45:22 +00:00
taylor 5ddbba9a82 cleanup and fix for weapon cycling (Mantis #1298) 2007-03-22 20:45:22 +00:00
taylor 32361c79ee be sure to page in textures for change ship class sexp preload
add a ASF_MENUMUSIC type for things that aren't mission-based event music (since that is handled differently now)
make event music keep extension if it exists, so that the special data will be accurate
bits of cleanup from old MS code that we don't need
2007-03-22 20:35:45 +00:00
taylor 7a7f62b870 be sure to page in textures for change ship class sexp preload
add a ASF_MENUMUSIC type for things that aren't mission-based event music (since that is handled differently now)
make event music keep extension if it exists, so that the special data will be accurate
bits of cleanup from old MS code that we don't need
2007-03-22 20:35:45 +00:00
taylor ede23c5515 a little cleanup
handle issue where we don't deal with an error condition properly and hit a NULL ptr
2007-03-22 20:31:37 +00:00
taylor 9baa0364ad fix stupidness that screwed up RGB values (Mantis #1307) 2007-03-22 20:23:58 +00:00
taylor fb0b8f221c fix stupidness that screwed up RGB values (Mantis #1307) 2007-03-22 20:23:58 +00:00
taylor 2f38c8ce54 a little better error handling for cf_exists_full()
add a cf_exists_full_ext() which can find a series of extensions and returns true if any of them exist
use cf_exists_full_ext() for eventmusic file checks (to check for ogg and wav)
get rid of SPM hack, it's wrong (just commented out for now though)
fix a bunch of bugs in cf_find_file_location_ext():
 - try to handle files with multiple periods a bit better (for the wav files like: blah_1.5.wav)
 - load issue with finding incorrect files by mistake
 - prevent finding different file types in various paths/roots
2007-03-22 20:22:45 +00:00
taylor 58add719af a little better error handling for cf_exists_full()
add a cf_exists_full_ext() which can find a series of extensions and returns true if any of them exist
use cf_exists_full_ext() for eventmusic file checks (to check for ogg and wav)
get rid of SPM hack, it's wrong (just commented out for now though)
fix a bunch of bugs in cf_find_file_location_ext():
 - try to handle files with multiple periods a bit better (for the wav files like: blah_1.5.wav)
 - load issue with finding incorrect files by mistake
 - prevent finding different file types in various paths/roots
2007-03-22 20:22:45 +00:00
taylor 9bcc5a5bd1 various bits of bmpman cleanup
be sure to clean all three possible buffers with OGL init
fix a couple of bmpman loading bugs that messed up animations
fix bmpman bug that didn't properly account for free'd texture ram count with unload_fast
2007-03-22 20:14:17 +00:00
taylor 7563a6e19c various bits of bmpman cleanup
be sure to clean all three possible buffers with OGL init
fix a couple of bmpman loading bugs that messed up animations
fix bmpman bug that didn't properly account for free'd texture ram count with unload_fast
2007-03-22 20:14:17 +00:00
taylor 2e752667f5 old ✌️ snafu 2007-03-22 20:09:05 +00:00
taylor e5ef520d75 old ✌️ snafu 2007-03-22 20:09:05 +00:00
taylor d880adeeac when parsing a modular tbl, allow a duplicate sun entry to overwrite an existing one 2007-03-22 20:07:16 +00:00
taylor 2c2442239d when parsing a modular tbl, allow a duplicate sun entry to overwrite an existing one 2007-03-22 20:07:16 +00:00
taylor a0d693ba15 little bit of cleanup
set "#Weak" weapons to always get the "player allowed" flag (Mantis #1301)
2007-03-22 20:04:04 +00:00
taylor 76f5452fed make use of generic_anim and generic_bitmap where possible
bunch of cleanup and little optimizations
add "+remove" tbl option to completely get rid of particular beam sections
delayed loading of bitmaps, will only do it after all tbl/tbm have been parsed
if we are using a POF missile which isn't loaded yet, try and load it before going crazy
bug fix and optimization for laser color setting
2007-03-22 20:02:46 +00:00
taylor 2ca01a97bc little bit of cleanup
set "#Weak" weapons to always get the "player allowed" flag (Mantis #1301)
2007-03-22 19:31:25 +00:00
taylor 9624ac64a4 fix strange bug where a beams parent will die and the object reset before the beam gets the chance to fire 2007-03-22 19:30:00 +00:00
karajorma 7f56bf8f7c Bump the number of debriefing stages.
Fix an annoying (and erroneous) warning in the campaign editor.
2007-03-21 21:06:54 +00:00
karajorma e6a0754359 Bump the number of debriefing stages.
Fix an annoying (and erroneous) warning in the campaign editor.
2007-03-21 20:54:25 +00:00
karajorma 65b0f8e3d5 Turn off afterburner controls when player isn't in control 2007-03-11 22:55:32 +00:00
karajorma f5ff8469dd Turn off afterburner controls when player isn't in control 2007-03-11 22:55:32 +00:00
karajorma 3193cf699d Make .ogg voice files selectable in FRED. 2007-03-07 22:43:24 +00:00
karajorma 73b92e088a Make .ogg selectable in FRED. 2007-03-07 22:36:52 +00:00
karajorma 0efc0dc8a7 It's perfectly legal to press the Target Target's Attacker key with no target. We should just play a failed sound instead. 2007-03-07 17:51:15 +00:00
karajorma 9ebb840043 It's perfectly legal to press the Target Target's Attacker key with no target. We should just play a failed sound instead. 2007-03-07 17:51:15 +00:00
Goober5000 e661e52ed9 might as well do this too 2007-02-27 22:38:27 +00:00
Goober5000 0fafd8dcde add two features for WCS: specifyable shield/weapon recharge rates, and removal of linked fire penalty 2007-02-27 01:44:48 +00:00
Goober5000 4a13036412 add two features for WCS: specifyable shield/weapon recharge rates, and removal of linked fire penalty 2007-02-27 01:44:48 +00:00
Goober5000 371d01596e small bugfix 2007-02-26 04:47:52 +00:00
Goober5000 d5a9f4ccd8 add model compare capability (currently only via debug console) 2007-02-26 04:30:48 +00:00
Goober5000 4e68bcd7af added vm_matrix_same() 2007-02-26 01:47:23 +00:00
Goober5000 6b6161c902 added vm_matrix_same() 2007-02-26 01:47:23 +00:00
Goober5000 19b2173e44 use dynamic memory instead of a static buffer for ship-specific replacement textures 2007-02-25 03:58:07 +00:00
Goober5000 7ccc06614a use dynamic memory instead of a static buffer for ship-specific replacement textures 2007-02-25 03:58:07 +00:00
Goober5000 7d8efa9911 remove duplicate model texture replacement 2007-02-21 01:44:02 +00:00
Goober5000 c2e22d3019 remove duplicate model texture replacement 2007-02-21 01:44:02 +00:00
Goober5000 7d66bd3d5a oops, this is for a future commit 2007-02-20 17:22:34 +00:00
Goober5000 7801c52b66 wups 2007-02-20 04:53:11 +00:00
Goober5000 368ffda8b3 revert to retail behavior 2007-02-20 04:27:23 +00:00
Goober5000 64eb8b400e revert to retail behavior 2007-02-20 04:27:23 +00:00
Goober5000 b96d9eb931 the great big duplicate model removal commit 2007-02-20 04:20:38 +00:00
Goober5000 3c3416fa3b the great big duplicate model removal commit 2007-02-20 04:20:38 +00:00
Goober5000 f23ee85bb7 *** empty log message *** 2007-02-20 01:41:07 +00:00
Goober5000 193371dbb5 *** empty log message *** 2007-02-20 01:41:07 +00:00
wmcoolmon 1e9de0e973 More minor tweaks/fixes 2007-02-19 20:39:10 +00:00
wmcoolmon 16b91d54fb More scripting tweaks/bugfixes. 2007-02-19 07:55:20 +00:00
wmcoolmon eddd26aeb3 WMCoolmon experiences a duh moment. Move scripting collision variable declarations in front of overrides, to give
them access to these (somewhat useful) variables
2007-02-19 07:24:51 +00:00
wmcoolmon 7e08bd41b7 Fixed minor precedence issue. 2007-02-19 07:08:04 +00:00
taylor 628d8da7c8 forgot that too (like Bobboau did the first time :)) 2007-02-18 21:57:30 +00:00
Goober5000 be113e9f0b magic word 2007-02-18 21:26:52 +00:00
Goober5000 b8e3137a67 magic word 2007-02-18 21:26:52 +00:00
taylor 721d1d6cc0 fix super-stupid bug :) 2007-02-18 08:59:03 +00:00
Goober5000 72d036cc42 revert Bobboau's commits for the past two months; these will be added in later in a less messy/buggy manner 2007-02-18 06:17:48 +00:00
Goober5000 a71a33d7b3 ugh... reverting this, because it was done wrong 2007-02-16 23:49:28 +00:00
Goober5000 859140bcf9 this should be based on a flag or something, not automatically tied into the power output 2007-02-16 23:18:15 +00:00
Goober5000 08d8f6f26d fixed another of bobboau's stupid bugs 2007-02-16 22:25:21 +00:00
Goober5000 6d4f4c5644 remove obsolete and misleading comments which should have been edited when the code was upgraded 2007-02-16 22:09:05 +00:00
Goober5000 260730d671 remove obsolete and misleading comments which should have been edited when the code was upgraded 2007-02-16 22:09:05 +00:00
karajorma 3d49103c0a Thought I'd caught all of these months ago! Thanks to Wanderer for the heads up. 2007-02-16 18:54:09 +00:00
karajorma d74026437b Thought I'd caught all of these months ago! Thanks to Wanderer for the heads up. 2007-02-16 18:48:42 +00:00
Goober5000 64dc931e2b uhh... wrong? 2007-02-16 07:06:46 +00:00
Goober5000 d0a147ee16 uhh... wrong? 2007-02-16 07:06:46 +00:00
Backslash 6debd2fbb8 small fix for reverse thrusters, and a speed tweak. also a change to damp physics, discussed on the forums and reported in Mantis #1051 months ago. 2007-02-15 06:19:19 +00:00
Goober5000 e6675b010e Linux project file change (thanks to ni1s) 2007-02-15 02:24:11 +00:00
phreak 4046f33f07 Project file update for VC 2005. I included a new configuration called "ReleaseDebug" which has the NDEBUG macro found in release builds, but also has all the debugging information included. Regular release builds have no debugging information. 2007-02-15 02:09:30 +00:00
phreak 5ba90db220 Apparently Visual C++ 2005 follows standard syntax rules. 2007-02-15 02:03:56 +00:00
Goober5000 0436db0dea fix a hideous bug with the knossos special warp stuff
(how did this ever actually work correctly?)
2007-02-13 01:46:03 +00:00
Goober5000 822111476d fix a hideous bug with the knossos special warp stuff
(how did this ever actually work correctly?)
2007-02-13 01:46:03 +00:00
taylor 73164c069d fix stupid bug (Mantis #1275) 2007-02-12 07:35:58 +00:00
taylor 660691b4ef disable D3D by default for stable tree 2007-02-12 07:32:03 +00:00
taylor 4c5b873363 a little cleanup
handle issue where we don't deal with an error condition properly and hit a NULL ptr
2007-02-12 07:31:03 +00:00
taylor ec3793f746 fix stupid bug (Mantis #1275) 2007-02-12 07:29:51 +00:00
taylor b5fb6913f8 fix a couple of things that I missed earlier 2007-02-12 02:19:45 +00:00
Goober5000 7997b00244 ack 2007-02-12 01:33:46 +00:00
Goober5000 a01ff5b8a0 scale shield strength according to generator damage 2007-02-12 01:24:18 +00:00
Goober5000 7c30810920 bah 2007-02-12 01:23:29 +00:00
taylor 7f73be870a make gr_create_shader() use ubyte's instead of float's, saves us the more expensive conversions since we already convert to ubyte anyway 2007-02-12 01:04:50 +00:00
taylor 93042aa6e9 make use of generic_anim and generic_bitmap where possible
bunch of cleanup and little optimizations
add "+remove" tbl option to completely get rid of particular beam sections
delayed loading of bitmaps, will only do it after all tbl/tbm have been parsed
if we are using a POF missile which isn't loaded yet, try and load it before going crazy
bug fix and optimization for laser color setting
2007-02-12 00:54:31 +00:00
taylor e5c08d0f2c oops, forgot this bit 2007-02-12 00:48:43 +00:00
taylor 65603b3186 bit of cleanup and minor performance tweaks
sync up with new generic_anim/bitmap and weapon delayed loading changes
with generic_anim, use Goober's animation timing for beam section and glow animations
make trail render list dynamic (as well as it can be)
2007-02-12 00:45:24 +00:00
taylor ed5238741e bit of cleanup and minor performance tweaks
render ship insignia with a bit of alpha to help with blending/lighting
dynamic thruster particle limits
update for generic_bitmap/anim changes
make use of flag_def_list for ship flags rather than a ton of if-else statements
use generic_bitmap and generic_anim where possible to faciliate delayed graphics loading (after all ship related tbls are parsed)
use VALID_FNAME()
2007-02-12 00:41:38 +00:00
taylor 717fd6a71e add back special "var" setting for flag_def_list and convert some of the lists to use it (more on the way) 2007-02-12 00:24:33 +00:00
taylor 640aa62261 get rid of non-standard itoa(), make use of the proper sprintf() instead 2007-02-12 00:23:40 +00:00
taylor 8cff897180 some generic_bitmap fixes to go with new changes (not in CVS just yet, don't freak out)
make use of VALID_FNAME() where possible
fix an animation time issue (sub-second animation playback caused div-by-0)
2007-02-12 00:22:05 +00:00
taylor 73fb0897a8 IBX version 2 support (includes Bobboau's earlier D3D fixes for it) 2007-02-12 00:19:48 +00:00
taylor b77df70b0e fix breakage (hehehe ;)) 2007-02-12 00:17:07 +00:00
Goober5000 facb56f269 fixage 2007-02-11 22:46:39 +00:00
Goober5000 bdd62c42a6 fixage 2007-02-11 22:46:39 +00:00
Goober5000 7b43c993be change a number to a constant 2007-02-11 21:42:41 +00:00
Goober5000 4e894e3285 change a number to a constant 2007-02-11 21:42:41 +00:00
Goober5000 0d46a82af4 massive shield infrastructure commit 2007-02-11 21:26:42 +00:00
Goober5000 0f5256e476 fix some breakage ;) 2007-02-11 20:26:00 +00:00
Goober5000 50a91b1472 fix some breakage ;) 2007-02-11 20:26:00 +00:00
taylor 1ed8d8d773 fix a break from an earlier partial commit 2007-02-11 18:46:30 +00:00
taylor b6415d5ae2 fix a couple of breaks from my commits 2007-02-11 18:45:38 +00:00
taylor 2a25e47e12 cleanup and minor performance improvements
add support for new fireball specific lighting values from tbl
remove NO_SOUND
2007-02-11 18:35:45 +00:00
taylor 7ef78edc6b general cleanup
deal with -img2dds error issue
2007-02-11 18:34:56 +00:00
taylor 2a3ae7f408 remove cloakmap stuff, we'll need to redo this later on anyway
deal better with a strange Windows buffer swap issue
various bits of cleanup and performance improvements
fix for gr_opengl_flash() that I had screwed up earlier
2007-02-11 18:26:59 +00:00
taylor 28043dc3cb support for a couple of recent bmpman changes 2007-02-11 18:25:16 +00:00
taylor 88f00e8f14 support for new finding/loading of sound files
add support for automatically figuring out samples-per-measure based on Goober's explanation in the Wiki (not sure if it's actually right though)
remove NO_SOUND
2007-02-11 18:20:19 +00:00
taylor 9eb12dc1d0 support for tbl specified fireball explosion color ("$Light color:") 2007-02-11 18:19:41 +00:00
taylor 30339fb822 remove some dead code
better texture memory handling (a work in-progress)
new image finding/loading
change the game_busy() reporting during bitmap page-in to only catch one frame of an animation
fix numerous little bugs in gropenglbmpman relating to -img2dds
2007-02-11 18:18:52 +00:00
taylor 6a477edd85 cleanup and minor performance improvements
add support for new fireball specific lighting values from tbl
remove NO_SOUND
2007-02-11 10:04:46 +00:00
taylor 960754fe13 remove some dead code
general cleanup
fix issues with texture state changes not affecting things properly
fix stupid texture addressing thing that I had done a long time ago
deal with -img2dds error issue
2007-02-11 10:03:29 +00:00
taylor 5f79202cdb remove cloakmap stuff, we'll need to redo this later on anyway
don't need the AVI movie hacks any longer, so remove it
deal better with a strange Windows buffer swap issue
various bits of cleanup and performance improvements
fix for gr_opengl_flash() that I had screwed up earlier
2007-02-11 10:01:11 +00:00
taylor 5cf203e122 remove -pcx32 and -jpgtga
support for a couple of recent bmpman changes
2007-02-11 09:58:20 +00:00
taylor 27b25d8e12 support for new finding/loading of sound files
add support for automatically figuring out samples-per-measure based on Goober's explanation in the Wiki (not sure if it's actually right though)
remove NO_SOUND
2007-02-11 09:56:25 +00:00
taylor 7e3da6dcca support for tbl specified fireball explosion color ("$Light color:") 2007-02-11 09:53:33 +00:00
taylor 5c5e4b54f8 remove some dead code
better texture memory handling (a work in-progress)
new image finding/loading
get rid of -pcx32 and -jpgtga
change the game_busy() reporting during bitmap page-in to only catch one frame of an animation
fix numerous little bugs in gropenglbmpman relating to -img2dds
2007-02-11 09:51:21 +00:00
taylor 13953f2fc2 some minor performance improvements
remove NO_SOUND
2007-02-11 09:47:35 +00:00
taylor 96c1fc5df2 some minor performance improvements
remove NO_SOUND
2007-02-11 09:39:09 +00:00
taylor feeddfb3b2 dd VALID_FNAME() macro and put it around a few places (more to come)
clean out some old variables
move CLAMP() macro from opengl header to global header
update COUNT_ESTIMATE to match new bmpman changes
2007-02-11 09:37:18 +00:00
taylor 3c9f6d9c71 add VALID_FNAME() macro and put it around a few places (more to come)
clean out some old variables
move CLAMP() macro from opengl header to global header
update COUNT_ESTIMATE to match new bmpman changes
2007-02-11 09:35:11 +00:00
taylor beac0e3c48 forgot to remove .avi and .mpg from CF_TYPE_ROOT 2007-02-11 09:32:19 +00:00
taylor d405eb979b some CFILE cleanup and slight directory order reorg
add cfopen_special() for quickly opening files that have already been found with cf_find_file_location_ext()
remove NO_SOUND
2007-02-11 09:31:12 +00:00
taylor a6eb16ec4c some CFILE cleanup and slight directory order reorg
add cfopen_special() for quickly opening files that have already been found with cf_find_file_location_ext()
remove NO_SOUND
2007-02-11 09:25:42 +00:00
taylor 37b8c106ef remove -pcx32 and -jpgtga 2007-02-11 09:24:08 +00:00
taylor 06789e7cb9 remove AVI/MPG support, we now rely just on MVE/OGG 2007-02-11 09:23:14 +00:00
taylor e3b18969ec remove NO_SOUND
fix debris recycling
2007-02-11 09:22:29 +00:00
taylor dcb63622c6 remove NO_SOUND
fix debris recycling
2007-02-11 09:22:29 +00:00
taylor 5a61ba2cf5 little bit of cleanup
more fixage for hidden jumpnodes (Mantis #1149)
2007-02-11 09:20:00 +00:00
taylor 0727a5dd5c little bit of cleanup
more fixage for hidden jumpnodes (Mantis #1149)
2007-02-11 09:12:12 +00:00
taylor 6d624c789f fix simroom crash bug from Goober's rencent change
add NULL handling to make sure we don't crap out on sorting
2007-02-11 09:10:14 +00:00
taylor 45223deef7 fix simroom crash bug from Goober's rencent change
add NULL handling to make sure we don't crap out on sorting
2007-02-11 09:10:14 +00:00
taylor 000dc7ccd8 slight debug message fixage 2007-02-11 09:08:45 +00:00
taylor 82545e3e49 little bit of debug message cleanup
don't bother dealing with message wav file if sound is disabled
2007-02-11 09:07:33 +00:00
taylor d962a079a3 if we are a dying ship then don't do collision detection against our own debris (slight performance boost to exploding ships) 2007-02-11 09:06:30 +00:00
taylor f0c499fe25 if we are a dying ship then don't do collision detection against our own debris (slight performance boost to exploding ships) 2007-02-11 09:06:30 +00:00
taylor 9982011398 add WMC's strextcmp() from HEAD 2007-02-11 09:05:02 +00:00
Goober5000 f2c6bcbfc0 we probably don't need to play a sound when we equalize already-equalized shields, since we don't play one when we augment already-augmented quadrants 2007-02-11 07:36:43 +00:00
Goober5000 a9b17f01ac we probably don't need to play a sound when we equalize already-equalized shields, since we don't play one when we augment already-augmented quadrants 2007-02-11 07:36:43 +00:00
Goober5000 d59e6442d1 when alphabetizing campaigns, ignore "the" at the beginning of a title 2007-02-11 06:38:56 +00:00
Goober5000 a6dee937d3 when alphabetizing campaigns, ignore "the" at the beginning of a title 2007-02-11 06:38:56 +00:00
Goober5000 5b216fa0d4 invert the do-collision flag into a don't-do-collision flag, plus fixed a wee lab bug 2007-02-11 06:19:08 +00:00
Goober5000 057c4876f9 invert the do-collision flag into a don't-do-collision flag, plus fixed a wee lab bug 2007-02-11 06:19:08 +00:00
Goober5000 bb11d2ee30 fix spelling 2007-02-11 06:02:38 +00:00
taylor c3e78b3f35 make sure that we don't set the 2d view matrix and then not reset it (Mantis #1269)
clean up some of the fullneb mess that was causing some initial setup issues (colors wrong, etc.)
2007-02-10 20:23:51 +00:00
taylor 07bb34ef20 make sure that we don't set the 2d view matrix and then not reset it (Mantis #1269)
clean up some of the fullneb mess that was causing some initial setup issues (colors wrong, etc.)
2007-02-10 20:23:51 +00:00
Goober5000 8224376e87 sort campaigns by title, not by file name 2007-02-10 06:55:58 +00:00
Goober5000 ae699e16d5 sort campaigns by title, not by file name 2007-02-10 06:55:58 +00:00
Goober5000 787f58592b new feature: shield generators that control whether the shield is up 2007-02-10 06:39:43 +00:00
Goober5000 6543cfc479 take all subsystems into account when displaying repair gauge 2007-02-10 05:01:11 +00:00
Goober5000 1eb764d47d take all subsystems into account when displaying repair gauge 2007-02-10 05:01:11 +00:00
Goober5000 ee6ed23e3e prevent the AI from falling into the black hole of disarming a turretless ship 2007-02-10 04:49:23 +00:00
Goober5000 c593e95c88 prevent the AI from falling into the black hole of disarming a turretless ship 2007-02-10 04:49:23 +00:00
Goober5000 f96b4ac5c5 small tweak 2007-02-10 03:20:43 +00:00
Goober5000 7261d7463a small tweak 2007-02-10 03:20:43 +00:00
Goober5000 20038ff85d made support ship shield control a bit less of a hack 2007-02-10 03:17:31 +00:00
taylor d1aab3866a remove NO_SOUND 2007-02-10 00:18:22 +00:00
taylor 9d64edd0e6 remove NO_SOUND 2007-02-10 00:18:22 +00:00
taylor a279d55d58 phreak missed fixing this here when he fixed it in unstable 2007-02-10 00:16:57 +00:00
taylor 6ebc603820 remove NO_SOUND
fix glow bank sexp bug (Mantis #1250)
2007-02-10 00:15:32 +00:00
taylor 32609cc140 remove NO_SOUND
fix glow bank sexp bug (Mantis #1250)
2007-02-10 00:15:32 +00:00
taylor d197b80e97 fix a mouse button issue (just an issue with newer SDL versions?) 2007-02-10 00:12:35 +00:00
taylor 5a98942190 fix a mouse button issue (just an issue with newer SDL versions?) 2007-02-10 00:12:35 +00:00
taylor 9ed43260fd a quick debug test to catch an error and FRED doesn't catch on it's own yet 2007-02-10 00:10:31 +00:00
taylor d79e67f972 a quick debug test to catch an error and FRED doesn't catch on it's own yet 2007-02-10 00:10:31 +00:00
taylor b0d7d05119 performance optimizations:
- fvi_ray_boundingbox() is faster and should be less prone to compiler/optimization/platform specific issues
 - clean up or obj_check_all_collisions() which is a good bit faster now
2007-02-10 00:08:59 +00:00
taylor 66bc9102f9 performance optimizations:
- fvi_ray_boundingbox() is faster and should be less prone to compiler/optimization/platform specific issues
 - clean up or obj_check_all_collisions() which is a good bit faster now
2007-02-10 00:08:59 +00:00
taylor 911dd983dc obsolete gluLookAt() in favor of doing it manually, should be slight faster and more precise 2007-02-10 00:05:48 +00:00
taylor 71acc9a7a3 obsolete gluLookAt() in favor of doing it manually, should be slight faster and more precise 2007-02-10 00:05:48 +00:00
taylor 6790cc8326 performance/accuracy optimization for the (un)size functions 2007-02-10 00:04:03 +00:00
taylor 7ad5b32fcf performance/accuracy optimization for the (un)size functions 2007-02-10 00:04:03 +00:00
taylor 217f483818 make sure that our color is getting set properly (should properly fix the red/green tint problem, Mantis #1041)
slight optimization for Theora YUV->RGB converter
2007-02-10 00:02:18 +00:00
taylor a939b25cd8 make sure that our color is getting set properly (should properly fix the red/green tint problem, Mantis #1041)
slight optimization for Theora YUV->RGB converter
2007-02-10 00:02:18 +00:00
taylor cd29194167 add the "show all" hotkey to the cutscene viewer 2007-02-09 23:58:52 +00:00
taylor ed1541f91f add the "show all" hotkey to the cutscene viewer 2007-02-09 23:58:52 +00:00
taylor f868341b25 add the number of files that CFILE is going to try and use in each root to the debug info
optimizations for cf_find_file_location_ext()
2007-02-09 23:57:24 +00:00
taylor ed073ec841 add the number of files that CFILE is going to try and use in each root to the debug info
optimizations for cf_find_file_location_ext()
2007-02-09 23:57:24 +00:00
taylor eb3a51fbf6 add better support for Ogg, Vorbis and Theora libs/includes 2007-02-09 23:54:00 +00:00
taylor b1d7384970 add better support for Ogg, Vorbis and Theora libs/includes 2007-02-09 23:54:00 +00:00
Goober5000 be6e1fba15 merge the voice acting manager into the 3.6.9 (3.6.10?) branch 2007-02-09 05:40:40 +00:00
Goober5000 56ab87f849 miniscule tweaks 2007-02-09 05:04:56 +00:00
Goober5000 d2a2afc69e merge the WCS screaming feature into the 3.6.9 (3.6.10?) branch 2007-02-09 04:53:28 +00:00
Goober5000 cbafccc3e2 bah, change this so it's mostly diff-compatible with 3.6.9 2007-02-09 04:45:23 +00:00
Goober5000 9718f451d9 add a few ship flags that weren't on the dialog 2007-02-08 18:34:05 +00:00
Goober5000 f98f7ad58a add a few ship flags that weren't on the dialog 2007-02-08 18:34:05 +00:00
Goober5000 6182e6063b fix two bugs:
--default ship flags in the iff_defs table were not correctly translated from parse flags to ship/object flags
--ships were created with default allowed comm orders regardless of which team they were on
2007-02-08 07:39:35 +00:00
Goober5000 e99d737ce1 fix two bugs:
--default ship flags in the iff_defs table were not correctly translated from parse flags to ship/object flags
--ships were created with default allowed comm orders regardless of which team they were on
2007-02-08 07:39:35 +00:00
Goober5000 7686856d05 hm, didn't notice this new feature 2007-02-07 07:59:48 +00:00
Goober5000 58b8386a84 Cleaned up the ship-weapon collision code for both conventional weapons and beams. Improved readability and clarity; untangled program flow; cleaned up sloppy enhancements. Fixed a few bugs too. 2007-02-07 07:35:22 +00:00
Goober5000 850e65f754 Clean up the ship-weapon collision code for both conventional weapons and beams. Improved readability and clarity; untangled program flow; cleaned up sloppy enhancements. Fixed a few bugs too. 2007-02-07 07:35:01 +00:00
Goober5000 2afe1d96f7 remove obsolete and unused shield flag 2007-02-06 01:27:34 +00:00
Goober5000 321130465c remove obsolete and unused shield flag 2007-02-06 01:27:34 +00:00
wmcoolmon 05e64ed87a Couple of commented-out features. 2007-02-05 08:27:13 +00:00
wmcoolmon b26353fcd5 Make an error message prettier 2007-02-05 08:26:49 +00:00
wmcoolmon feeb070fe1 Fix a parse bug 2007-02-05 08:26:06 +00:00
Goober5000 02e29830c5 fix an old subtle bug 2007-02-03 23:16:41 +00:00
Goober5000 e8d91d5baf fix an old subtle bug 2007-02-03 23:16:41 +00:00
phreak 3c7d7f8370 the particle batcher needs to work with static (non-animated) textures as well 2007-02-03 20:10:17 +00:00
Goober5000 dde8e2acaa d'oh... thanks phreak 2007-02-03 08:13:36 +00:00
phreak 9e33dbcc42 spawn weapons now have the option of passing a target lock onto their children.
http://www.hard-light.net/forums/index.php/topic,45166.0.html
2007-02-03 03:28:48 +00:00
phreak 75416b18d3 Committing what i have of the MSVC 2005 project files. FRED2 still isn't there yet,
but I don't want to lose what I spent time on.
2007-02-03 03:17:10 +00:00
Goober5000 d9819ce547 fixed two of Bobboau's bizarre bugs 2007-02-02 22:49:07 +00:00
karajorma 40ff53520e Well that's going to cause a few crashes (Thanks to ni1s for spotting it) 2007-02-01 22:15:58 +00:00
phreak 1a2d4c27e3 We don't want to modify the clip plane variables in htl
mode once we've moved them to gr_start_clip()

do we even need htl mode checks anymore?  welcome to the 21st century
2007-01-31 05:08:35 +00:00
phreak aedecc0c90 Do clip plane testing on thruster glows and thruster particles 2007-01-31 05:04:24 +00:00
phreak 27ec678b77 memset() does not go array, length, value
it goes the other way around
2007-01-31 02:00:21 +00:00
Goober5000 d624427a34 oops 2007-01-30 04:55:20 +00:00
Goober5000 c58568777b --fix the empty ship name / U.R.A. Moron bug caused by WMC's commit
--properly update a ship score when its class changes (in FRED or via change-ship-class or via ship loadout)
2007-01-29 03:39:26 +00:00
Goober5000 ee5cf2d298 minor tweaks to the reset score feature 2007-01-29 02:56:34 +00:00
karajorma 35e042c158 Fix add-remove-escort to actually use a priority.
Add yet another missing bit of Network variable code
2007-01-27 19:09:06 +00:00
karajorma 9645752e37 Fix add-remove-escort to actually use a priority. 2007-01-27 18:39:09 +00:00
Goober5000 1235cb78b8 removed code that isn't used (see Mantis 1219) 2007-01-22 21:45:10 +00:00
wmcoolmon 05446a1734 EXPERIMENTAL turret update, housekeeping for Lua 2007-01-22 04:43:28 +00:00
wmcoolmon 70fa691507 Fix mantis bug; add getOrientation to CVS 2007-01-22 04:42:25 +00:00
wmcoolmon ebc9bd552e Fix non-opaque circles. 2007-01-22 04:02:23 +00:00
karajorma 97a6f2a2c5 Fix bug in the set ammo and weapon SEXPs
Add the reset-orders SEXP
Add support for network variables
2007-01-15 13:46:55 +00:00
karajorma 02577aa22e Fix bug where orders you gave last mission are sill accessible to the Order SEXP. 2007-01-15 13:43:43 +00:00
karajorma c0274818c0 Hmmm. Forgot to commit changes to support network variables and setting ammo/weapons to HEAD as well as 3.6.9. 2007-01-15 13:42:59 +00:00
karajorma 6d698fa13d Hmmm. Forgot to commit changes to support network variables and setting ammo/weapons to HEAD as well as 3.6.9.
Also add Juke's bug fix for streaming weapons.
2007-01-15 13:40:38 +00:00
karajorma cd425ca3dd Add the reset-orders SEXP
Some general houskeeping to keep 3.6.9 and HEAD throwing up lots of annoying diffs that are just spacing issues.
2007-01-15 11:57:02 +00:00
wmcoolmon a9bbc8c375 Lua - fix one thing so you can break another. 2007-01-15 09:24:14 +00:00
wmcoolmon 85e22a4865 Fix HookVariables-related stuff, and add errors in case it ever gets broken again. 2007-01-15 09:20:54 +00:00
wmcoolmon f60706f6ae Maintain "fileless fs2" capability; change ScriptingVariables library to HookVariables(hv) 2007-01-15 08:05:47 +00:00
bobboau a475225523 fixing some minnor errors with the batcher code 2007-01-15 02:56:36 +00:00
wmcoolmon 15be122241 Whoops, fix merge error 2007-01-15 02:46:07 +00:00
wmcoolmon 8295100c40 Finish off warning fixage 2007-01-15 02:19:03 +00:00
wmcoolmon 5ae519ad46 Finish off warning fixage; standardized defines in MSVC_2003 project file 2007-01-15 02:07:51 +00:00
Goober5000 da7b371cc1 thanks to WMC for catching this -- it was a goof from back in 2003! 2007-01-15 01:55:46 +00:00
bobboau 7baa0144dc fixing a thruster bug, a geometry batcher bug, and trying to fix a shield bug 2007-01-15 01:52:47 +00:00
wmcoolmon ac568af794 Fix CVS & correct various warnings under MSVC 2003 2007-01-15 01:37:47 +00:00
wmcoolmon ac9cc6cd09 Fix HEAD 2007-01-15 00:55:13 +00:00
karajorma a6940b8f1e Fix bug where orders you gve last mission are sill accessible to the Order SEXP. 2007-01-14 20:55:20 +00:00
Goober5000 14bfaeab4d operator precedence FTW! :D 2007-01-14 19:35:54 +00:00
bobboau 6d7c837732 ok, something aparently went wrong, last time, so I'm commiting again
hopefully it should work this time
damnit WORK!!!
2007-01-14 14:03:40 +00:00
wmcoolmon 3979af39b1 Fix +Override, attempted fix for code adjacent to [] causing crash in scripting.tbl (Unreproducable), and (Untested) fix for script-eval. 2007-01-14 12:06:56 +00:00
wmcoolmon fd151e4c43 Attempt to remove various warnings under MSVC 2003, mostly related to casting, but also some instances of inaccessible code. 2007-01-14 10:26:39 +00:00
wmcoolmon 028613f3fd Updated MSVC 2003 project files to work out of the box 2007-01-14 10:02:14 +00:00
wmcoolmon d090e91e3c Removed MSVC_7 folder due to redundancy 2007-01-14 09:20:21 +00:00
bobboau c9fa35ffd5 made a last second change of mind on something, made it a bit safer 2007-01-13 16:38:22 +00:00
bobboau eca4b84a57 left some test code on super sorry 2007-01-13 16:20:39 +00:00
Goober5000 043f3c5e82 hmm... I guess when I fixed this back in 2004, I fixed it the wrong way :D 2007-01-12 04:33:50 +00:00
Goober5000 420565ee45 hmm... I guess when I fixed this back in 2004, I fixed it the wrong way :D 2007-01-12 04:33:50 +00:00
bobboau a3d8f866d2 made the new index buffers actualy work,
now that I had something to test it with fixed a small problem that kept it from working
2007-01-11 18:46:35 +00:00
bobboau b2a7de183b forgot about this header in my last commit 2007-01-11 07:08:45 +00:00
bobboau c75636747e makeing D3D compatable with 32 bit index buffers, and fixing a minor directx
technicality in the texture compression code.
2007-01-11 07:07:46 +00:00
taylor 2c4c9a8eab remove non-dark support
per earlier discussions: remove -jpgtga and -pcx32
2007-01-10 01:49:16 +00:00
taylor 7c2294a58d fixup texture addressing stuff so that it works better
bits of cleanup
remove non-dark support
support for releasing bitmap system memory when transfered to API memory
2007-01-10 01:48:32 +00:00
taylor 7ab0a42fce don't bother trying to load message WAV when sound is disabled 2007-01-10 01:45:56 +00:00
taylor 0e8dc98cb8 compiler warning fixage 2007-01-10 01:45:06 +00:00
taylor d7b13ab375 add support for new IBX format which can support up to UINT_MAX worth of verts (NOTE: D3D code still needs to be made compatible with this!!) 2007-01-10 01:44:39 +00:00
taylor 6e9e784319 remove -jpgtga, set 32-bit mode as default (the OGL code will automatically fallback to 16-bit is needed) 2007-01-10 01:41:27 +00:00
taylor 626e07e67d little bit of cleanup
per earlier discussions: remove -jpgtga and -pcx32
2007-01-10 01:40:43 +00:00
taylor 6b308f0e7c remove the non-dark stuff, it only works on PCX files and stuff to use it has already been ripped out
per earlier discussions: remove -jpgtga and -pcx32, set image load order to DDS->TGA->JPG->PCX
some debug log cleanup
remove bitmap data from system memory once it's in API memory
2007-01-10 01:40:07 +00:00
Goober5000 041036e68d remove WMC's limbo code, per our discussion a few months ago
this will later be handled by copying ship stats using sexps or scripts
2007-01-08 00:50:59 +00:00
Goober5000 2cb487ba70 yet more tweaks to the WCS death scream stuff
added a ship flag to force screaming
2007-01-07 21:28:11 +00:00
taylor cd70fdaa00 fix escort positioning issue (Mantis #1179) 2007-01-07 13:18:32 +00:00
taylor a949186e87 fix up Windows window/cursor handling so that it's up-to-date and more compatible
make sure that we handle background clearing ourselves, fixes several little issues
fix popup warnings to work a bit better and not screw up the game so much or make it difficult to interact with them
2007-01-07 13:15:42 +00:00
taylor 9330ef5750 cleanup various bits of obsolete or unused code 2007-01-07 13:13:39 +00:00
taylor df13d2974c bunch of cleanup and minor little fixes
get rid of GL_activate and GL_deactivate hold-overs
various fixes for platform window/cursor handling
we don't need texture combine support most of the time, so don't bother with it (fixes fonts not displaying properly)
disable depth testing if we aren't using a zbuffer
get rid of secondary color crap that was just messing things up, there are better ways to do it if we need the basic functionality back later
dump old gamma ramp support, we don't really need it at this point
do edge clamping by default instead of repeat
2007-01-07 13:12:41 +00:00
taylor 0bfcad9e3d clean up extension list and comment out the things that we don't use 2007-01-07 13:08:12 +00:00
taylor b1090c6c08 slight change to emission light settings
change default ambient light settings back to proper values
add support for lighting falloff with directional lights
some minor performance improvements
2007-01-07 13:07:22 +00:00
taylor b03803dc92 various bits of cleanup
fix for anistotropic filtering messing up with lod bias
be sure that we always reset the properly active texture
get rid of old gamma stuff
loading fix for cubemaps
disable apple_client_storage for now
fix for ATI problem with framebuffers and corrupting starfield bitmaps
2007-01-07 13:05:21 +00:00
taylor fe8cb48470 some general cleanup
add emissive light falloff support for asteroids
properly setup env texture matrix
get rid of secondary color crap, there are better ways to do it anyway
2007-01-07 13:02:19 +00:00
taylor 11f40332f1 remove some dead code 2007-01-07 13:00:24 +00:00
taylor 4be52712d6 fix thruster 2 length factor tbl entry so that it has the proper name 2007-01-07 12:59:54 +00:00
taylor bf9e4a810e cleanup shockwave code a bit
make Shockwave_info dynamic
lot of fixage to allow 2D and 3D shockwaves to work better
fix for Mantis bug #1148
properly handle both "none" and "<none>" for 2D and 3D shockwave names
better handling, preloading wise, of 3D shockwaves and their textures
2007-01-07 12:57:36 +00:00
taylor d120c96ad3 safety check to make sure that we don't end up with non-player-usable weapons in the weaponselect pool (Mantis bug #1196) 2007-01-07 12:55:57 +00:00
taylor 82fff64a78 be sure that we can handle both "none" and "<none>" in ignored filenames 2007-01-07 12:54:35 +00:00
taylor 834b83d625 add position info for weapon energy text
make sure that we can't target a hidden jumpnode
rest of the weapon switch fix
2007-01-07 12:53:35 +00:00
taylor 1149b98509 fix NULL ptr reference when a weapon doesn't have a tech description 2007-01-07 12:51:30 +00:00
taylor b7b0fdeb9b taking Bobboau's advice: make sure that anim angles are kept in sane values 2007-01-07 12:50:51 +00:00
taylor d6c1500896 fix tertiary glow sizes
fix model vertex normal data that was being read/written incorrectly under OS X (still don't know why this was a problem, but this fixes it)
2007-01-07 12:49:51 +00:00
taylor 18398b386e crazy-freaky-cool OS X sound crash fixage
fix sound resource exhaustion from using too many buffers
allow loading of ogg or wav based on which is found first rather than tbl filename (fixes crash when Theora movies end up in wav code by mistake)
2007-01-07 12:48:18 +00:00
taylor f7d730d17a fix problem with model unloading that happened because skyboxes aren't reset properly
be sure that skybox textures are paged in properly
there needs to be a case insensitive string check when looking for existing bitmap filenames
2007-01-07 12:46:19 +00:00
taylor 88024e707b make expl info dyanmic
fix possible out-of-bounds on expl lod checking
fix memory leak from modular tables
2007-01-07 12:41:37 +00:00
taylor 4941fb3201 build for for newer GCC versions 2007-01-07 12:39:59 +00:00
taylor 33a4af7a38 add missing Lua files from recent update 2007-01-07 12:39:30 +00:00
taylor d2dd5c3c45 add in Theora build support
add a /y to the copy line (got tired of doing this myself since it won't overwrite by default)
remove DirectShow files
2007-01-07 12:38:53 +00:00
taylor 253eb2bb38 make fire-on-normal return value a little more obvious
fix the "infinite genius" move I made by breaking turret movements  ;)
2007-01-07 12:36:51 +00:00
taylor 568da79d50 remove DirectShow files, they are no longer supported 2007-01-07 12:35:45 +00:00
taylor d3c2631af6 proper envmap generation for OpenGL 2007-01-07 12:34:36 +00:00
taylor 2cd713ee96 fix for Mantis bug #1195 2007-01-07 12:33:59 +00:00
taylor f800d17360 clean up defines a bit 2007-01-07 12:33:27 +00:00
taylor 8a92891b85 remove avi and mpg from supported extensions 2007-01-07 12:32:38 +00:00
taylor 18f657835d fix bm_page_in_texture() so that it will load all frames of an animation (caused slowdowns in-game with it) 2007-01-07 12:32:06 +00:00
taylor 6e4c0665e2 add Theora player build support
add in the waypoint files
2007-01-07 12:31:16 +00:00
taylor 5da039a015 add Theora player
remove DirectShow support from movie player
fix triple-buffer page flipping problem (Mantis bug #1190)
2007-01-07 12:29:43 +00:00
taylor b9a2d8a442 add Theora lib header 2007-01-07 12:27:47 +00:00
taylor 61ecff45c7 safety check to make sure that we don't end up with non-player-usable weapons in the weaponselect pool (Mantis bug #1196) 2007-01-07 12:18:09 +00:00
taylor 3be2a9640b fix a couple of memory leaks with modular tables 2007-01-07 12:16:31 +00:00
taylor 537d3ca56b be sure to page in skybox textures properly 2007-01-07 12:16:01 +00:00
taylor a965808979 allow loading of ogg or wav based on which is found first rather than tbl filename (fixes crash when Theora movies end up in wav code by mistake) 2007-01-07 12:15:09 +00:00
taylor 410a6bdf0d fix model vertex normal data that was being read/written incorrectly under OS X (still don't know why this was a problem, but this fixes it) 2007-01-07 12:13:57 +00:00
taylor adf94a68b9 fix NULL ptr reference when a weapon doesn't have a tech description 2007-01-07 12:12:46 +00:00
taylor 5091e1db1f rest of the weapon switch out-of-bounds/Assert() fix 2007-01-07 12:11:51 +00:00
taylor 65afcdb4b6 we are only supposed to init 5 slots here, not 6 ;) (Mantis bug #1195) 2007-01-07 12:11:05 +00:00
taylor ece1948615 remove D3D support for Theora movies, make sure that it doesn't try to play them (since it wouldn't work properly anyway)
fix triple-buffer problem with page flipping (Mantis #1190)
2007-01-07 12:10:18 +00:00
taylor a53d7f25a7 fix bm_page_in_texture() so that it will load all frames of an animation (caused slowdowns in-game with it) 2007-01-07 12:07:40 +00:00
Goober5000 3560519c75 don't display any error messages when there are no background bitmaps to load 2007-01-07 03:44:50 +00:00
Goober5000 51a95c35a7 don't display any error messages when there are no background bitmaps to load 2007-01-07 03:44:50 +00:00
Goober5000 5d72445915 fix bug where built-in lament messages were never played 2007-01-07 03:10:05 +00:00
Goober5000 0399f2c6ed fix bug where built-in lament messages were never played 2007-01-07 03:10:05 +00:00
Goober5000 08af307fa6 convert a mission variable to a mission flag 2007-01-07 01:00:18 +00:00
Goober5000 8897e3bc11 move this to the Message location of the mission 2007-01-07 00:24:18 +00:00
Goober5000 e6dcd8b0ec add a feature for specifying the source of Command messages 2007-01-07 00:01:28 +00:00
Goober5000 d6b5692f2c taylor's bugfix 2007-01-06 23:56:43 +00:00
Goober5000 6eb58999bb taylor's bugfix 2007-01-06 23:56:43 +00:00
Goober5000 0fb07661d7 breathalyzer for WMC 2007-01-06 23:13:40 +00:00
Goober5000 34607a5014 gah, not this again 2007-01-04 04:51:57 +00:00
Goober5000 c553f63846 gah, not this again 2007-01-04 04:51:57 +00:00
Goober5000 a52fb0591b update to Lua 5.1.1 2007-01-04 04:46:14 +00:00
Goober5000 37828252d6 add feature to reset ship scores to what they are in ships.tbl 2007-01-04 02:50:33 +00:00
Goober5000 422b6a0729 fix #include path 2007-01-04 02:50:14 +00:00
wmcoolmon ff25b89ccd Add missing waypoint files 2006-12-30 23:34:18 +00:00
Goober5000 620fba2f58 fix spelling... *twitch* 2006-12-28 22:47:16 +00:00
Goober5000 9f079b2413 fix spelling... *twitch* 2006-12-28 22:47:16 +00:00
Goober5000 aac3d16691 assume ships-with-bays which haven't yet entered the mission are valid for syntax checking 2006-12-28 02:07:49 +00:00
Goober5000 b84be578e0 assume ships-with-bays which haven't yet entered the mission are valid for syntax checking 2006-12-28 02:07:49 +00:00
Goober5000 ed60708cdb removed obsolete limits 2006-12-28 01:22:04 +00:00
Goober5000 9417b8afe1 removed obsolete limits 2006-12-28 01:22:04 +00:00
wmcoolmon b90b5716df WMC codebase commit. See pre-commit build thread for details on changes. 2006-12-28 00:59:54 +00:00
karajorma 01d19508fd Altered the Warpin and Warpout types flag to match those in HEAD. 2006-12-27 10:27:10 +00:00
taylor 534724a06e fix OpenGL envmap "issues" (ie, stupid taylor stuff)
get rid of that RCS_Name thing, CVS kept changing it automatically and it was getting /really/ annoying
2006-12-27 09:26:21 +00:00
taylor fd87e59d93 wurrps, someone besides me might actually want to use that ;) 2006-12-27 09:24:31 +00:00
Goober5000 4d1f708b88 added to the main branch as binary 2006-12-27 02:29:28 +00:00
Goober5000 2e0f30f809 allow parsing of similar ship copy names properly (Mantis #1178) 2006-12-26 18:14:42 +00:00
Goober5000 7d114a0220 allow parsing of similar ship copy names properly (Mantis #1178) 2006-12-26 18:14:42 +00:00
taylor d6f1171a44 add Theora files/libs
add mapinfo stuff so that .map files are actually useful (wasn't this here before?)
add /y to the copy command, since it wasn't always copying over existing builds for me
2006-12-26 05:35:07 +00:00
taylor e6bc39dba2 make weapon_expl info dynamic 2006-12-26 05:32:59 +00:00
taylor ccac4e5599 be sure to reset our skybox model properly, it can lead to a bad model unload bug on level load otherwise 2006-12-26 05:32:18 +00:00
taylor ef00ba4354 fix some sound state stuff that was leading to crashes in OS X and undefined behavior in Windows (this isn't all that pretty, but will handled properly in post-3.6.9 revised code) 2006-12-26 05:31:22 +00:00
taylor 66be156488 minor spelling fixage
make depreciated subsystem flag syntax be a debug log warning instead a popup warning (FOR 3.6.9 ONLY!)
2006-12-26 05:30:00 +00:00
taylor 9723208f1c remove unneeded header 2006-12-26 05:27:54 +00:00
taylor b64f09eacc make sure that we don't target a hidden jumpnode, and if we do be sure to only detarget it rather than turning off auto-targetting 2006-12-26 05:27:15 +00:00
taylor 23684b2c65 remove some old stuff that we either don't use or don't need any longer 2006-12-26 05:26:12 +00:00
taylor 5a4332c3a8 lots of little cleanup, stale code removal, and small performance adjustments
get rid of the default combine texture state, we don't need it in general, and it can screw up fonts
get rid of the secondary color support, it doesn't do much in non-HTL mode, screws up various things, and has long since been obsolete but material setup
get rid of the old gamma setup, it actually conflicts with newer gamma support
default texture wrapping to edge clamp
do second gr_clear() on init to be sure and catch double-buffer
make sure that our active texture will always get reset to 0, rather than leaving it at whatever was used last
fixed that damn FBO bug from it hanging on textures and causing some rendering errors for various people
only lock verts once in HTL model rendering
2006-12-26 05:25:18 +00:00
taylor 96c49a96e8 comment out some extensions that we either don't use or don't need to use 2006-12-26 05:18:14 +00:00
taylor 0fa2b8ee75 tweak emission light a little bit
various bits of cleanup that I've been meaning to do
2006-12-26 05:17:28 +00:00
taylor a72beaaa81 support both "none" and "<none>" on filenames to skip (will do this better later, ran out of time) 2006-12-26 05:15:40 +00:00
taylor 1a111c8868 get rid of some stale vars that we don't use any longer
a little at-exit cleanup
handle rounding error on X/Y placement locations under Windows
2006-12-26 05:14:52 +00:00
taylor 75d0641ccb add support for Theora movies (the default format)
some little bits of cleanup
add second gr_clear() so that double-buffer'd visuals will work properly (ie, not flicker when playing MVE/OGG)
2006-12-26 05:13:29 +00:00
taylor f3714d8140 add .ogg files to movie locations 2006-12-26 05:11:57 +00:00
taylor f6ce63a383 add OGG Theora player to build list 2006-12-26 05:11:30 +00:00
taylor a4eadd3e0e add Theora libs 2006-12-26 05:11:01 +00:00
taylor 83121e9a7a initial OGG Theora movie support (likely to be rewritten at least in large part) 2006-12-25 21:44:11 +00:00
Goober5000 eb19114758 make chase view and external view toggles independent (Mantis #1087) 2006-12-25 18:54:15 +00:00
Goober5000 d74f640a3b make chase view and external view toggles independent (Mantis #1087) 2006-12-25 18:54:15 +00:00
karajorma 5012655a0d Move the voice recognition init to stop Windows complaining and failing to init it. 2006-12-20 11:27:06 +00:00
karajorma 77c16be7fa Move the voice recognition init to stop Windows complaining and failing to init it. 2006-12-20 11:27:06 +00:00
Goober5000 50dd6689a0 fix Mantis #1163 2006-12-08 19:18:54 +00:00
Goober5000 b32c09ca37 fix Mantis #1163 2006-12-08 19:18:54 +00:00
taylor 2873974f60 cleanup shockwave code a bit
make Shockwave_info dynamic
lot of fixage to allow 2D and 3D shockwaves to work better
fix for Mantis bug #1148
properly handle both "none" and "<none>" for 2D and 3D shockwave names
better handling, preloading wise, of 3D shockwaves and their textures
2006-12-07 18:30:20 +00:00
taylor f41a100c3f fix for new GCC versions (Fedora Core 6) 2006-12-07 18:26:48 +00:00
taylor 80e3dc8a95 stupid of me to use a case-sensitive comparison there, but then it wasn't really a problem until Goober's bitmap list support ;) 2006-12-07 18:26:03 +00:00
taylor 85083d163d various sound fixes/changes, mainly for OS X fixage 2006-12-07 18:24:43 +00:00
taylor 0fe5a3716c fix secondary thruster length stuff
- change thruster_glow_len_factor to thruster02_glow_len_factor so it's a bit more obvious
 - fix tbl entry so that it makes sense what you are setting :)
2006-12-07 18:23:38 +00:00
taylor caf33b26d9 unbreak the breakage that I broke when I tried to fix breakage that wasn't broken the second time but initialy broke instead
(yeah, this one confused me ;))  (Mantis bug #1165)
2006-12-07 18:21:25 +00:00
taylor da6a01478a try and keep angles within PI2 (Bobboau's advice, since he knows more than I do about this stuff :)) 2006-12-07 18:19:23 +00:00
taylor 71f8afeb5a add "$Weapons Energy Text:" to hud_gauges.tbl so that the low energy text can be positioned as well (Mantis bug #1166) 2006-12-07 18:17:19 +00:00
taylor 56b572b4fa minor cleanups and speedups
when using lighting falloff, be sure to drop emissive light when falloff gets low enough (otherwise we still se everything fine)
2006-12-07 18:16:11 +00:00
taylor dbc1fb0417 get rid of "vram_full", it can never actually be full the way the code works, so having this is redundant
comment out APPLE_client_storage extension usage, I think this was messing some stuff up on OS X and causing memory errors
fix handling of cubemap data so that they can be read properly (can't believe it took so long to notice to an obvious and stupid bug)
be sure to un-bind textures during preload to avoid freaky little errors later
ifdef an error message from the framebuffer error code, Apple doesn't have this one define in their headers for some reason
2006-12-07 18:14:49 +00:00
taylor c1bf628137 restore default ambient light values to retail-like settings (I based the previous values on default D3D, which was rather dumb of me)
restore lighting falloff capability from retail and non-HTL modes (only used for asteroids as far as I know)
various cleanups and speedups for dealing with lights
2006-12-07 18:10:16 +00:00
taylor 33780d9f26 get rid of GL_activate and GL_deactivate, it was just Glide ported stuff that we never used and never needed
handle window/fullscreen/minimize changes better, fixes cursor handling mostly (Mantis bug #1146)
don't flush on gamma change, we don't really need to any more
2006-12-07 18:07:51 +00:00
taylor 45bfd0964b remove now-dead code 2006-12-07 18:04:42 +00:00
taylor a2d4bac2d2 clean up warning code for Windows
handle messagebox popups better (until I done with even cooler code for handling that)
cleanup window state code a bit, and deal with activation and cursor handling better
handle WM_ERASEBKGND msg ourselves, prevents some flickering issues and gets rid of the need to self-paint the window to clear it
slightly better Win9x/WinME compatibility for the main window
2006-12-07 18:04:03 +00:00
taylor 171ec9671d these defines are all the same value, so it's safer to just have one set 2006-12-07 17:59:37 +00:00
taylor 0b64dfe278 comment out some stuff that isn't used
fix cleanup code which didn't really let go of things all the way
2006-12-07 17:58:37 +00:00
taylor eef59b2558 cleanup for movie init stuff (this will be even cleaner once the rest of the Theora code finally gets in)
get rid of the clear screen hack for Windows, we can handle that better now
2006-12-07 17:57:25 +00:00
taylor 92ffac3f1c port over some Theora player stuff:
- support for GL_ARB_texture_rectangle
 - fix GL tear-down on movie exit
 - fix sound tear-down order issue on OS X
 - some speed increases, and get rid of the extra gr_clear() per-frame now that it's handled properly
 - proper support for widescreen resolutions
2006-12-07 17:55:51 +00:00
taylor d05dfd7663 a little clean up for bits of code that isn't used 2006-12-07 17:53:08 +00:00
taylor 6499f0d2c2 make fire-on-normal return value a little more obvious
fix the "infinite genius" move I made by breaking turret movements ;)
2006-12-07 17:51:39 +00:00
karajorma 5e75e29fb1 Fix for Stream weapons not appearing for clients when fired by AI ships in multiplayer. Actual work mostly done by Juke not me 2006-12-01 18:53:55 +00:00
Goober5000 7fca0d9513 reverted the buggy commit that caused Mantis bug #1101 2006-12-01 04:50:59 +00:00
Goober5000 536d196de9 make an error message more descriptive 2006-11-28 05:51:05 +00:00
Goober5000 b44a65eb45 make an error message more descriptive, and allow the new method of parsing subsystem flags 2006-11-28 05:51:03 +00:00
Goober5000 99f7848ad7 the grammar nazi strikes again!
(and sneaks an extra #define in there while he's at it!)
2006-11-28 05:48:21 +00:00
Goober5000 2612eafaa9 the grammar nazi strikes again! 2006-11-28 05:47:28 +00:00
Goober5000 23f4eb58f5 prevent false positive while error checking 2006-11-26 03:22:45 +00:00
Goober5000 5c786f9dba prevent false positive while error checking 2006-11-26 03:22:45 +00:00
Goober5000 b0f0b41d27 if a wing of ships is docked to something, that entire wing must have an arrival cue of false 2006-11-25 07:07:52 +00:00
Goober5000 a41828b796 if a wing of ships is docked to something, that entire wing must have an arrival cue of false 2006-11-25 07:07:52 +00:00
Goober5000 e2604c4a30 holy crap, this had the potential to mark the locked-true sexp as known-false, which would seriously screw a lot of stuff up 2006-11-25 06:37:06 +00:00
Goober5000 0c482b875e holy crap, this had the potential to mark the locked-true sexp as known-false, which would seriously screw a lot of stuff up 2006-11-25 06:37:06 +00:00
Goober5000 122910dd17 this may have been an oversight 2006-11-25 06:33:22 +00:00
Goober5000 119291c5da this may have been an oversight 2006-11-25 06:33:22 +00:00
Goober5000 478ef01c73 FRED again updates backgrounds while the user is editing them 2006-11-24 22:46:25 +00:00
Goober5000 c1a50705a8 FRED again updates backgrounds while the user is editing them 2006-11-24 22:40:16 +00:00
karajorma 42d2986655 Fix ammo and weapon SEXP changes not being passed on to the clients 2006-11-21 23:07:27 +00:00
taylor c4134a4f3c handle knossos warp effect flip in a slightly better, slighter safer way (Mantis bug #1048, plus a couple that weren't filed) 2006-11-16 01:11:28 +00:00
taylor 57353a5806 handle knossos warp effect flip in a slightly better, slighter safer way (Mantis bug #1048, plus a couple that weren't filed) 2006-11-16 01:11:28 +00:00
taylor a3165f87fb do no culling on the warp effect model_render call properly (doesn't appear to break anything now that it actually set to not cull) 2006-11-16 01:10:47 +00:00
taylor b237f8fbc9 do no culling on the warp effect model_render call properly (doesn't appear to break anything now that it actually set to not cull) 2006-11-16 01:10:47 +00:00
taylor eb81aa2144 updated outwnd code for both Windows and non-Windows:
- make print filters dynamic
 - fix various little bugs and issues
 - cleanup some non-used variables (non-Windows)
 - put everything under NDEBUG like it was, or should be
 - change to using data/fs2_open.log for log file (Windows)
 - change to using data/debug_filter.cfg (Windows)
 - make the extra debug window optional, and disabled by default (Windows)
 - fix some possible NULL references
 - clean up the SAFEPOINT() crap
2006-11-16 00:56:16 +00:00
taylor 5d442d8d6f handle the video registry entry better
support for new Windows window creation code
various bits of minor cleanup
2006-11-16 00:55:08 +00:00
taylor d47acd3282 properly support the updated window create code (all told: should take of of Mantis bugs #542, #624, #1140, and possibly #962 and #1124) 2006-11-16 00:54:41 +00:00
taylor 81b6c49fe9 new window creation code for Windows (gets rid of some stupid :V: voodoo for the software/glide stuff)
use detect_home() on Windows too (needed for now outwnd code)
some bits of minor cleanup
2006-11-16 00:54:15 +00:00
taylor 576699e1c8 various bits of little cleanup
add the debug cmdline printer to FRED, so that we can make use of that info in the FRED-debug case too
2006-11-16 00:53:31 +00:00
taylor edd1ff2228 various bits of little cleanup
get rid of some more compiler warnings
2006-11-16 00:53:12 +00:00
taylor 0033495f63 add some needed wing leader checks to prevent Assert()'s and out-of-bounds problems when the leader is dead/dying (Mantis bug #1134) 2006-11-16 00:52:28 +00:00
taylor 1adfb49436 clean up skybox model selection and usage to work better with FRED
make sure to go ahead and set the skybox model when it's set/changed in FRED
go ahead and load/set the envmap  when it's set/changed in FRED
get rid of extra envmap image types, only DDS is actually supported (not sure what the hell I was thinking there)
2006-11-16 00:51:43 +00:00
taylor a8670e633f fix the stupid safe_string thing ("LogFile" was already closed by the time it tried to write) 2006-11-16 00:51:04 +00:00
taylor 2d0ce7fbf0 clean up AVI movie stuff a bit:
- use the default black brush for clearing the screen, it's a little less stupid this way
 - have the AVI player send messages back to the game rather than trying to poll for that extra crap
 - remove the only DivX6 fix, there is better addressed by newer window handling code
2006-11-16 00:50:38 +00:00
taylor 93c4ff78e8 clean up some cmdline options which were/weren't FSO only
add back the "-32bit" option, for retail compatibility (doesn't do anything, it's just there to avoid the unknown option message)
add "-debug_window" to turn on the Windows-only extra debug output window (it's off by default now, only logging to file instead)
2006-11-16 00:50:00 +00:00
taylor ce0447f8f3 fix stupid bay depart object animation bug (Mantis bug #1133, part 2) 2006-11-16 00:49:35 +00:00
Goober5000 0145ce8bb8 a much better fix for built-in arrival messages... it needs a new feature to fully work for custom wings though 2006-11-15 04:02:31 +00:00
Goober5000 d28f8d2fb8 a much better fix for built-in arrival messages... it needs a new feature to fully work for custom wings though 2006-11-15 04:02:31 +00:00
taylor d1ee1f55b7 updated outwnd code for both Windows and non-Windows:
- make print filters dynamic
 - fix various little bugs and issues
 - cleanup some non-used variables (non-Windows)
 - put everything under NDEBUG like it was, or should be
 - change to using data/fs2_open.log for log file (Windows)
 - change to using data/debug_filter.cfg (Windows)
 - make the extra debug window optional, and disabled by default (Windows)
 - fix some possible NULL references
 - clean up the SAFEPOINT() crap
2006-11-15 00:54:33 +00:00
taylor 5ab2a1614b handle the video registry entry better
support for new Windows window creation code
various bits of minor cleanup
2006-11-15 00:49:41 +00:00
taylor 03834fd5a0 properly support the updated window create code (all told: should take of of Mantis bugs #542, #624, #1140, and possibly #962 and #1124) 2006-11-15 00:47:57 +00:00
taylor bb12f929d7 new window creation code for Windows (gets rid of some stupid :V: voodoo for the software/glide stuff)
use detect_home() on Windows too (needed for now outwnd code)
some bits of minor cleanup
2006-11-15 00:44:44 +00:00
taylor a1e24a364f fix some "stupid-windows-coder-mistakes" (otherwise known as "putting-more-than-you-should-into-header-files")
(gets rid of some/many compiler warnings, C++ language violations, and strange little bugs/errors)
2006-11-15 00:40:59 +00:00
taylor 9ef9668ded various bits of little cleanup
add the debug cmdline printer to FRED, so that we can make use of that info in the FRED-debug case too
2006-11-15 00:38:02 +00:00
taylor 0850d30687 various bits of little cleanup
get rid of some more compiler warnings
2006-11-15 00:36:08 +00:00
taylor 319d5c86f8 add some needed wing leader checks to prevent Assert()'s and out-of-bounds problems when the leader is dead/dying (Mantis bug #1134) 2006-11-15 00:33:16 +00:00
taylor ca7404f149 clean up skybox model selection and usage to work better with FRED
make sure to go ahead and set the skybox model when it's set/changed in FRED
go ahead and load/set the envmap  when it's set/changed in FRED
get rid of extra envmap image types, only DDS is actually supported (not sure what the hell I was thinking there)
2006-11-15 00:30:10 +00:00
taylor e51b84e04e fix the stupid safe_string thing ("LogFile" was already closed by the time it tried to write) 2006-11-15 00:26:03 +00:00
taylor 9ddc4f5b3a clean up AVI movie stuff a bit:
- use the default black brush for clearing the screen, it's a little less stupid this way
 - have the AVI player send messages back to the game rather than trying to poll for that extra crap
 - remove the only DivX6 fix, there is better addressed by newer window handling code
2006-11-15 00:24:47 +00:00
taylor 844048e6d0 clean up some cmdline options which were/weren't FSO only
add back the "-32bit" option, for retail compatibility (doesn't do anything, it's just there to avoid the unknown option message)
add "-debug_window" to turn on the Windows-only extra debug output window (it's off by default now, only logging to file instead)
2006-11-15 00:21:40 +00:00
taylor 32336132a2 fix stupid bay depart object animation bug (Mantis bug #1133, part 2) 2006-11-15 00:19:33 +00:00
Goober5000 1d9a8e55b8 fix spelling, and synch with voicerec.cpp 2006-11-15 00:00:37 +00:00
Goober5000 cbf0f0520f remove directory-specific information 2006-11-14 01:37:55 +00:00
phreak 6613578032 two fixes:
1) Fix for mantis #1099, part 2.

2) when changing the player's ship using debug_cycle_player_ship(), initialize the
 primary bank starting capacity so the support ship will rearm it.
2006-11-13 23:29:11 +00:00
phreak 9bfeae5126 Don't copy parentheses to parse buffers if outside of quotation marks. Otherwise
the parsing syntax will be copied to said buffer and some warnings/errors would occur.
2006-11-13 23:23:26 +00:00
phreak f5dcbc5fd7 oops, forgot a break statement
*scrapes off the rust*
2006-11-13 23:11:08 +00:00
karajorma c089513b33 Dragoniz3r's fix for builtin messages not being sent when custom named wings arrive. 2006-11-13 23:09:59 +00:00
Goober5000 e5be1ada90 added MadProf's voice recognition enhancements 2006-11-13 02:54:04 +00:00
phreak 426bddfd7b two fixes:
1) Fix for mantis #1099, part 2.

2) when changing the player's ship using debug_cycle_player_ship(), initialize the
 primary bank starting capacity so the support ship will rearm it.
2006-11-12 20:01:55 +00:00
phreak c433cd273d Don't copy parentheses to parse buffers if outside of quotation marks. Otherwise
the parsing syntax will be copied to said buffer and some warnings/errors would occur.
2006-11-12 19:58:13 +00:00
karajorma e89585e31f Doh! 2006-11-12 17:52:21 +00:00
bobboau bb6cee2c20 fixed D3D environment mapping 2006-11-07 05:30:14 +00:00
taylor b80cbbdbcd fix return values (something that was different between 3_6_9 and HEAD) 2006-11-06 07:00:05 +00:00
taylor 25cd9b7766 updated/fixed modelanim code 2006-11-06 06:50:59 +00:00
taylor 0652c0a1f2 fix some of the envmap issues
- use proper hand-ness for OGL
 - fix distortion
 - get rid of extra index buffer requirement
change starfield bitmaps to use an instance matrix rather than going through all the trouble of resetting the view matrix
basic cleanup and get rid of a couple of struct/variable naming issues (compiler sanity)
make double sure that we aren't using culling of z-buffering when rendering starfield bitmaps
2006-11-06 06:46:08 +00:00
taylor a9e99ef87b enable/disable alpha test based on blend mode (found this hidden in an old tree, may help with blending the newer alphablend mode) 2006-11-06 06:44:43 +00:00
taylor 107b81eff3 if a submodel anim fails to start then move directly to ready position flag (set it up to do this, just forgot to do it ;)) (fix for Mantis bug #1133) 2006-11-06 06:43:58 +00:00
taylor 466b70a949 make glow_point array for thrusters and glow_point_banks dynamic (a proper fix for old Mantis bug #43) 2006-11-06 06:42:22 +00:00
taylor 7982425766 forgot to reset default value for Interp_warp_alpha when it was changed earlier
be sure that we are using the proper zbuffer setting when rendering thruster glows
2006-11-06 06:39:11 +00:00
taylor 069ff59261 forgot this part of the render box fix (obviously no one ever really tried to use this feature, since it has never worked) 2006-11-06 06:38:34 +00:00
taylor 33f1db2b5f ok, so apparently that did actually do something ;) 2006-11-06 06:37:59 +00:00
taylor 572b7f3f72 updated/fixed modelanim code 2006-11-06 06:36:44 +00:00
taylor 8b6597f785 more cleanup of warp_global crap
scale render/detail box limits with detail level setting
make sure that we reset culling and zbuffer after each model buffer that gets rendered
2006-11-06 06:33:48 +00:00
taylor f497534999 updated/fixed modelanim code
add ships.tbl subsystem flag ("+fire-down-normals") which will force a turret to fire down it's barrel line (Mantis bug #591)
2006-11-06 06:32:30 +00:00
taylor 84df921c01 updated/fixed modelanim code 2006-11-06 06:24:57 +00:00
taylor 68525c1e7c grrr ... fix dos EOL chars 2006-11-06 06:23:27 +00:00
taylor 68aa986fca rename set_warp_globals() to model_set_warp_globals()
remove two old/unused MR flags (MR_ALWAYS_REDRAW, used for caching that doesn't work; MR_SHOW_DAMAGE, didn't do anything)
add MR_FULL_DETAIL to render an object regardless of render/detail box setting
change "model_current_LOD" to a global "Interp_detail_level" and the static "Interp_detail_level" to "Interp_detail_level_locked", a bit more descriptive
minor bits of cleanup
change a couple of vm_vec_scale_add2() calls to just vm_vec_add2() calls in ship.cpp, since that was the final result anyway
2006-11-06 06:19:17 +00:00
taylor 9a62b0ba42 a LOT of cleanup:
* remove a bunch of old/dead code
 * some reformatting to help with readability
 * rearrange/rename some code so that it is a little clearer
 * move thruster glow code to it's own function (model_render_thrusters())
make HTL model buffers dynamic
fix detail boxes so that they actually work for the first time
2006-11-06 06:15:01 +00:00
taylor d530069753 add "Render full detail" support to the lab as well 2006-11-06 05:59:36 +00:00
taylor 31b8f09899 fix compiler problem due to change in parse_init() function
fix dos EOL chars
2006-11-06 05:58:57 +00:00
taylor bbf6cd2674 add a "Render full detail" view option to render models at their full detail for the LOD (for render/detail boxes, Mantis bug #1121) 2006-11-06 05:58:05 +00:00
taylor 9e7e8edce1 give the standalone chat box a horizontal scroll capability, not terribly accurate but it's good enough for the purpose (Mantis bug #1095) 2006-11-06 05:55:43 +00:00
taylor 7bd73f7fae add envmap selection to background editor
change skybox selection to be a text entry or browse instead of only text entry
allow envmap selected in background editor to be used by FRED
make texture replacement work in FRED for ships (Mantis bug #1068)
2006-11-06 05:54:13 +00:00
taylor ab71e94a22 fix the cmdbrief editor deleting the wrong stage (Mantis bug #1115) 2006-11-06 05:49:02 +00:00
taylor 14bc95a5cc fix loading callback issue in standalone 2006-11-06 05:48:15 +00:00
taylor 9a517d80d5 don't require hardware GL if running FRED (this is mainly for my benefit since I always forget to add that locally) 2006-11-06 05:47:37 +00:00
taylor 5d6cf4ade9 fix the envmap-getting-rotated-by-turrets bug (though it did make me chuckle a bit when I first saw it ;))
try to reuse old view setup info, if we are using the same settings again (for speed up purposes, will be a bigger deal when bumpmapping gets here)
2006-11-06 05:46:54 +00:00
taylor 9135d6d053 fix Personas memory leak (not really an issue, I just got tired of seeing it in the Valgrind reports) 2006-11-06 05:45:13 +00:00
taylor 61657b5379 remove a basically useless debug message
fix parse_init() so that it doesn't absolutely have to init sexps (doesn't need them when getting basic info, and causes memory fragmentation otherwise)
fix multiplayer mission info getting to just get basic info (fixes a couple of minor multi issues that were already fixed in single)
2006-11-06 05:44:33 +00:00
taylor 44bca63361 fix a memory leak that Valgrind was complaining about (happens mainly when you have a mission without a briefing) 2006-11-06 05:43:36 +00:00
taylor c244151204 various bits of cleanup (slight reformatting to help readability, remove old/dead code bits, etc.)
deal with a index_buffer memory leak that Valgrind has always complained about
make HTL model buffers dynamic (get rid of MAX_BUFFERS_PER_SUBMODEL)
get rid of MAX_BUFFERS
make D3D vertex buffers dynamic, like OGL has already done
2006-11-06 05:42:45 +00:00
taylor 42a9de9115 fix for Mantis bug #1104 (can't use a ":" in chat) 2006-11-06 05:40:57 +00:00
taylor 13cfcdc7c7 various bits of cleanup (warning messages, things that Valgrind complained about, etc.)
fix an out-of-bounds issue on Sexp_nodes[] which was leading to stack corruption
2006-11-06 05:40:06 +00:00
taylor e873c928fd fix some of the envmap issues
- use proper hand-ness for OGL
 - fix distortion
 - get rid of extra index buffer requirement
change starfield bitmaps to use an instance matrix rather than going through all the trouble of resetting the view matrix
basic cleanup and get rid of a couple of struct/variable naming issues (compiler sanity)
make double sure that we aren't using culling of z-buffering when rendering starfield bitmaps
2006-11-06 05:26:38 +00:00
taylor 723e5d97f4 enable/disable alpha test based on blend mode (found this hidden in an old tree, may help with blending the newer alphablend mode) 2006-11-06 05:21:32 +00:00
taylor 071f6c168e if a submodel anim fails to start then move directly to ready position flag (set it up to do this, just forgot to do it ;)) (fix for Mantis bug #1133) 2006-11-06 05:19:59 +00:00
Goober5000 e364ae74ea --prevent the ai from "forgetting" that it's attacking a wing (fix for Mantis #1131)
--move AI_CHASE_WING goal check so that it will properly short-circuit when appropriate (discussed in the same bug)
2006-11-06 03:38:32 +00:00
Goober5000 1cb738f6da --prevent the ai from "forgetting" that it's attacking a wing (fix for Mantis #1131)
--move AI_CHASE_WING goal check so that it will properly short-circuit when appropriate (discussed in the same bug)
2006-11-06 03:38:32 +00:00
Goober5000 e69d7ee79e minor bugfixes 2006-11-06 02:20:00 +00:00
Goober5000 d99d83a1dc minor bugfixes 2006-11-06 02:20:00 +00:00
Goober5000 4308579b4e fix is-event-x-delay optional argument type 2006-11-05 18:42:25 +00:00
Goober5000 ea21a54021 fix is-event-x-delay optional argument type 2006-11-05 18:42:25 +00:00
Goober5000 d786b6332a improve error message 2006-11-05 18:41:40 +00:00
Goober5000 a5135b1d7a improve error message 2006-11-05 18:41:40 +00:00
Goober5000 bba7b8d8fa improve error message 2006-11-04 17:22:54 +00:00
Goober5000 2783d62500 improve error message 2006-11-04 17:22:54 +00:00
karajorma 77cffeedfb Fix for Mantis 1017. - Hope we've seen the end of that damn persona bug 2006-11-03 21:36:56 +00:00
karajorma ebe0907a13 Fix for Mantis 1017. - Hope we've seen the end of that damn persona bug 2006-11-03 21:26:51 +00:00
Kazan 5c3397bd2a Absolute speed, not forward speed, for hud speed reticle - fixes the guage for gliding 2006-11-03 18:47:43 +00:00
Kazan bd37081432 Absolute speed, not forward speed, for hud speed reticle - fixes the guage for gliding 2006-11-03 18:47:43 +00:00
Kazan 7cfee53a21 prevent autopilot initialization while player is gliding 2006-11-03 18:45:11 +00:00
Kazan 27c5da629d prevent autopilot initialization while player is gliding 2006-11-03 18:45:11 +00:00
taylor 6f2e60d53b Ooopps! ;) 2006-11-01 18:46:22 +00:00
taylor 67305cfda5 make glow_point array for thrusters and glow_point_banks dynamic (a proper fix for old Mantis bug #43) 2006-11-01 18:35:58 +00:00
taylor d75efeb7e8 make "TBL Info" button in ships editor handle modular tables (Mantis bug #1130)
fix bugs where ship names with leading '@' or trailing whitespace didn't get compared properly in "TBL Info"
2006-11-01 15:55:25 +00:00
taylor 6a8d403fe6 make "TBL Info" button in ships editor handle modular tables (Mantis bug #1130)
fix bugs where ship names with leading '@' or trailing whitespace didn't get compared properly in "TBL Info"
2006-11-01 15:55:25 +00:00
taylor 6545a8c5df remove Assert() on Viewer_obj for supernova sun processing, it's not really needed and a NULL obj is easily dealt with by the code 2006-11-01 06:15:25 +00:00
taylor 9431b9808e remove Assert() on Viewer_obj for supernova sun processing, it's not really needed and a NULL obj is easily dealt with by the code 2006-11-01 06:15:25 +00:00
karajorma 9c5411d900 Adding the network-variable option to SEXP variables. This change will revert variables to the same behaviour they displayed in retail (i.e they don't update for clients) unless a variable is set to be a network-variable. 2006-10-28 21:17:04 +00:00
karajorma 9d2715a33d Adding the network-variable option to SEXP variables. This change will revert variables to the same behaviour they displayed in retail (i.e they don't update for clients) unless a variable is set to be a network-variable. 2006-10-28 20:54:35 +00:00
taylor 10fb66c977 forgot to reset default value for Interp_warp_alpha when it was changed earlier
be sure that we are using the proper zbuffer setting when rendering thruster glows
2006-10-28 17:58:42 +00:00
taylor 403b8885cd forgot this part of the render box fix (obviously no one ever really tried to use this feature, since it has never worked) 2006-10-28 04:01:33 +00:00
taylor b511f3fba7 ok, so apparently that did actually do something ;) 2006-10-28 04:00:09 +00:00
taylor 28d78bf454 updated/fixed modelanim code 2006-10-27 21:41:22 +00:00
taylor 26ce630805 more cleanup of warp_global crap
scale render/detail box limits with detail level setting
make sure that we reset culling and zbuffer after each model buffer that gets rendered
2006-10-27 21:37:11 +00:00
taylor 07dc72af98 updated/fixed modelanim code
add ships.tbl subsystem flag ("+fire-down-normals") which will force a turret to fire down it's barrel line (Mantis bug #591)
2006-10-27 21:33:06 +00:00
taylor f19310d27d updated/fixed modelanim code 2006-10-27 21:29:26 +00:00
taylor 5914a94e55 add the part of the fix which actually did something ;) 2006-10-27 16:31:09 +00:00
taylor 6cae667430 add the part of the fix which actually did something ;) 2006-10-27 16:31:09 +00:00
Goober5000 340baac55a fix error line reporting (Mantis #1120) 2006-10-27 16:01:49 +00:00
Goober5000 195089c7b9 fix error line reporting (Mantis #1120) 2006-10-27 16:01:49 +00:00
taylor e53cf0b18d grrr ... fix dos EOL chars 2006-10-27 06:44:35 +00:00
taylor 7978379a54 rename set_warp_globals() to model_set_warp_globals()
remove two old/unused MR flags (MR_ALWAYS_REDRAW, used for caching that doesn't work; MR_SHOW_DAMAGE, didn't do anything)
add MR_FULL_DETAIL to render an object regardless of render/detail box setting
change "model_current_LOD" to a global "Interp_detail_level" and the static "Interp_detail_level" to "Interp_detail_level_locked", a bit more descriptive
minor bits of cleanup
change a couple of vm_vec_scale_add2() calls to just vm_vec_add2() calls in ship.cpp, since that was the final result anyway
2006-10-27 06:42:30 +00:00
taylor 2df79570ae add "Render full detail" support to the lab as well 2006-10-27 06:35:29 +00:00
taylor 39101339cb fix compiler problem due to change in parse_init() function
fix dos EOL chars
2006-10-27 06:34:40 +00:00
taylor 4975661cb0 add a "Render full detail" view option to render models at their full detail for the LOD (for render/detail boxes, Mantis bug #1121) 2006-10-27 06:33:38 +00:00
taylor f84784612e give the standalone chat box a horizontal scroll capability, not terribly accurate but it's good enough for the purpose (Mantis bug #1095) 2006-10-26 15:46:35 +00:00
Goober5000 70c6f05bcd moved some stuff around in the sexp menus 2006-10-25 01:01:55 +00:00
Goober5000 24bf33a443 moved some stuff around in the sexp menus 2006-10-25 01:01:55 +00:00
Goober5000 96b254259e clarified this; it was confusing before 2006-10-24 23:56:56 +00:00
Goober5000 776057eeb1 clarified this; it was confusing before 2006-10-24 23:56:56 +00:00
Goober5000 adaa21e5f3 make sure to only add the sexp callback once 2006-10-24 23:28:56 +00:00
Goober5000 19faeb6274 make sure to only add the sexp callback once 2006-10-24 23:28:56 +00:00
taylor 65372c61c0 add envmap selection to background editor
change skybox selection to be a text entry or browse instead of only text entry
allow envmap selected in background editor to be used by FRED
make texture replacement work in FRED for ships (Mantis bug #1068)
2006-10-24 13:44:54 +00:00
taylor 92f4deaab5 fix the cmdbrief editor deleting the wrong stage (Mantis bug #1115) 2006-10-24 13:41:54 +00:00
taylor 3b9d50bde2 fix loading callback issue in standalone 2006-10-24 13:40:31 +00:00
taylor 4e3b4a4d72 don't require hardware GL if running FRED (this is mainly for my benefit since I always forget to add that locally) 2006-10-24 13:39:26 +00:00
taylor ea85618c60 fix the envmap-getting-rotated-by-turrets bug (though it did make me chuckle a bit when I first saw it ;))
try to reuse old view setup info, if we are using the same settings again (for speed up purposes, will be a bigger deal when bumpmapping gets here)
2006-10-24 13:38:23 +00:00
taylor 69094d3f55 fix Personas memory leak (not really an issue, I just got tired of seeing it in the Valgrind reports) 2006-10-24 13:36:05 +00:00
taylor 97d68c8633 remove a basically useless debug message
fix parse_init() so that it doesn't absolutely have to init sexps (doesn't need them when getting basic info, and causes memory fragmentation otherwise)
fix multiplayer mission info getting to just get basic info (fixes a couple of minor multi issues that were already fixed in single)
2006-10-24 13:34:33 +00:00
taylor 5277816248 fix a memory leak that Valgrind was complaining about (happens mainly when you have a mission without a briefing) 2006-10-24 13:31:32 +00:00
taylor 5c69a3c637 a LOT of cleanup:
* remove a bunch of old/dead code
 * some reformatting to help with readability
 * rearrange/rename some code so that it is a little clearer
 * move thruster glow code to it's own function (model_render_thrusters())
make HTL model buffers dynamic
fix detail boxes so that they actually work for the first time
2006-10-24 13:29:16 +00:00
taylor f4ec613af4 various bits of cleanup (slight reformatting to help readability, remove old/dead code bits, etc.)
deal with a index_buffer memory leak that Valgrind has always complained about
make HTL model buffers dynamic (get rid of MAX_BUFFERS_PER_SUBMODEL)
get rid of MAX_BUFFERS
make D3D vertex buffers dynamic, like OGL has already done
2006-10-24 13:24:12 +00:00
taylor e61a8c930b fix for Mantis bug #1104 (can't use a ":" in chat) 2006-10-24 13:18:35 +00:00
taylor 1b5d661caa various bits of cleanup (warning messages, things that Valgrind complained about, etc.)
fix an out-of-bounds issue on Sexp_nodes[] which was leading to stack corruption
2006-10-24 13:17:24 +00:00
karajorma f737ce4352 Fix Int3() with Set primary and Secondary ammo\weapons 2006-10-21 21:57:08 +00:00
wmcoolmon 9e42e23b86 Fixx0r FRED 2006-10-20 20:37:42 +00:00
wmcoolmon a531f565bd Fixx0r FRED 2006-10-20 20:37:42 +00:00
wmcoolmon c71407c0ca Fix extra jumpnode settings not saving. They still don't show up in FRED, unfortunately. 2006-10-15 22:03:16 +00:00
wmcoolmon 12f0f87728 Fix extra jumpnode settings not saving. They still don't show up in FRED, unfortunately. 2006-10-15 22:03:16 +00:00
Goober5000 5f710430a8 better safety check 2006-10-15 00:41:01 +00:00
Goober5000 e84b81dd14 better safety check 2006-10-15 00:41:01 +00:00
wmcoolmon 3f28c45bec Fix Freecamera forcing HUD draw bug. 2006-10-11 03:10:53 +00:00
Goober5000 a7e3c09bde betterized some things with mission arrivals and departures 2006-10-09 20:50:13 +00:00
Goober5000 9be6482872 betterized some things with mission arrivals and departures 2006-10-09 20:50:13 +00:00
Goober5000 f056ebb561 make sexp nodes dynamic 2006-10-09 06:02:46 +00:00
Goober5000 79412c0bff make sexp nodes dynamic 2006-10-09 05:25:18 +00:00
Goober5000 120e5fec12 make sexp nodes dynamic 2006-10-09 05:25:18 +00:00
Goober5000 80149a639d preliminary commit of sexp node bump... fred only, just changing some names for clarity 2006-10-09 04:44:58 +00:00
Goober5000 55fa19fb21 preliminary commit of sexp node bump... fred only, just changing some names for clarity 2006-10-09 04:44:58 +00:00
Goober5000 31532cffc6 bah 2006-10-08 08:04:52 +00:00
Goober5000 d5dbe93885 bah! 2006-10-08 05:24:03 +00:00
Goober5000 109b0019dd nitpick 2006-10-08 05:21:44 +00:00
Goober5000 58fc6622dc nitpick 2006-10-08 05:21:44 +00:00
Goober5000 8a4009dda9 fix forum links 2006-10-08 02:05:38 +00:00
Goober5000 d5ad083d91 fix forum links 2006-10-08 02:05:38 +00:00
Goober5000 a0e35d0854 bypass annoying warnings for nonexistent bitmaps 2006-10-07 02:43:46 +00:00
Goober5000 9d16fe703a bypass annoying warnings for nonexistent bitmaps 2006-10-07 02:43:46 +00:00
karajorma 368c844705 Fix for Mantis 1092 - (Support ships damage hull) 2006-10-06 15:23:42 +00:00
karajorma c264e1660b Fix for Mantis 1092 - (Support ships damage hull) 2006-10-06 15:12:55 +00:00
Goober5000 1d0b94bc74 <nelson> Ha, ha! </nelson> 2006-10-06 13:41:41 +00:00
Goober5000 95661c5ea0 <nelson> Ha, ha! </nelson> 2006-10-06 13:41:41 +00:00
karajorma 5faa474ae3 Remove the extra ship_class variable. I'd already added on as part of the team loadout changes 2006-10-06 13:32:23 +00:00
taylor 05db047497 handle another null vec warning which can happen during a multiplayer respawn or certain death sequences (Mantis bug #1090) 2006-10-06 10:04:03 +00:00
taylor d520aba132 handle another null vec warning which can happen during a multiplayer respawn or certain death sequences (Mantis bug #1090) 2006-10-06 10:04:03 +00:00
taylor 6861c29171 clean up some old software rendering stuff that we don't use any longer
remove grzbuffer.*, since all it did was give us 3 variables, which were moved to 2d.*
2006-10-06 09:56:42 +00:00
taylor 1be313f1c4 clean up some old software rendering stuff that we don't use any longer
remove grzbuffer.*, since all it did was give us 3 variables, which were moved to 2d.*
2006-10-06 09:56:42 +00:00
taylor 695ad095de For redalert stored data be sure that dead ships don't come back, and departed ships come back just as they left (Mantis bug #810) 2006-10-06 09:55:36 +00:00
taylor 11b088d1b2 make sure that the armor stuff gets initted (should fix Mantis bug #1080) 2006-10-06 09:54:57 +00:00
taylor 8959762bcd For redalert stored data be sure that dead ships don't come back, and departed ships come back just as they left (Mantis bug #810) 2006-10-06 09:47:11 +00:00
taylor 562114d518 make sure that the armor stuff gets initted (should fix Mantis bug #1080) 2006-10-06 09:44:32 +00:00
taylor a5b1762fea meant to do this before but forgot about it (just replaced "(4.0/9.0) * PI" with it's result) 2006-10-06 09:34:19 +00:00
taylor 144c2acbc1 if shockwaves weren't loaded then don't try to unload them (fixes standalone crash) 2006-10-06 09:33:56 +00:00
taylor c0292ffa37 make sure Multi_create_bitmap is initialized properly since it might not be otherwise in standalone 2006-10-06 09:33:33 +00:00
taylor 36ad7d03d7 fix for the "branch" bug (still a minor usability issue however, see Mantis bug for details)
add a popup to the loopbrief screen when you press ESC, so that we can either accept or decline the loop offer
2006-10-06 09:33:10 +00:00
taylor b00c9dcca0 bit of cleanup (technically the vertex buffer stuff is part of a much larger change slated for post-3.6.9, but this should be a little faster) 2006-10-06 09:32:16 +00:00
taylor 34f54b3cca re-fix this crap that I managed to break last time (was Mantis bug 1066 I think) 2006-10-06 09:31:27 +00:00
wmcoolmon 83b502b302 Fix OGG bug where sound files were always allocated 16 seconds of wavedata 2006-10-06 04:58:25 +00:00
wmcoolmon eb751734d9 Fix OGG bug where sound files were always allocated 16 seconds of wavedata 2006-10-06 04:58:25 +00:00
taylor 66ee39388d meant to do this before but forgot about it (just replaced "(4.0/9.0) * PI" with it's result) 2006-10-01 19:31:19 +00:00
taylor 2bcfd2c869 if shockwaves weren't loaded then don't try to unload them (fixes standalone crash) 2006-10-01 19:29:35 +00:00
taylor 6d8d09211e make sure Multi_create_bitmap is initialized properly since it might not be otherwise in standalone 2006-10-01 19:28:28 +00:00
taylor cb31a76e83 fix for the "branch" bug (still a minor usability issue however, see Mantis bug for details)
add a popup to the loopbrief screen when you press ESC, so that we can either accept or decline the loop offer
2006-10-01 19:27:28 +00:00
taylor ca9e6d1cb8 bit of cleanup (technically the vertex buffer stuff is part of a much larger change slated for post-3.6.9, but this should be a little faster) 2006-10-01 19:24:46 +00:00
taylor 5bd646efd7 re-fix this crap that I managed to break last time (was Mantis bug 1066 I think) 2006-10-01 19:22:15 +00:00
Goober5000 d47342b387 check that targetview model files exist as well 2006-10-01 18:53:59 +00:00
Goober5000 d74eb0efaa check that targetview model files exist as well 2006-10-01 18:53:59 +00:00
karajorma a710004cde Fixing some ugliness when the popup appears 2006-10-01 08:34:43 +00:00
Goober5000 6213677c89 more accurate message number 2006-10-01 06:18:36 +00:00
Goober5000 ca318f05d9 more accurate message number 2006-10-01 06:18:36 +00:00
Goober5000 4927a2055d fix spacing 2006-10-01 05:00:31 +00:00
Goober5000 76536b99de find message sender too 2006-10-01 03:22:58 +00:00
Goober5000 04a4f9e244 newline tweaks 2006-10-01 01:28:58 +00:00
Goober5000 a9dfcbadea small bugfixes 2006-10-01 01:18:42 +00:00
Goober5000 fabd9768ae enhanced voice acting manager, now with script generator :) 2006-10-01 01:12:32 +00:00
Goober5000 8f27198c08 fix crlf 2006-10-01 00:54:29 +00:00
Goober5000 c964516cf7 fix crlf 2006-10-01 00:54:29 +00:00
Goober5000 b08164ebd6 more flexible checking of generic messages 2006-09-30 21:58:09 +00:00
Goober5000 51a44f9795 more flexible checking of generic messages 2006-09-30 21:58:09 +00:00
Goober5000 4b71dbeacc merge voice file manager into voice acting manager, plus make a few tweaks to it 2006-09-29 06:38:28 +00:00
Goober5000 7036e89bc2 fix for Mantis #1070 2006-09-28 23:47:25 +00:00
Goober5000 f4770f3697 fix for Mantis #1070 2006-09-28 23:47:25 +00:00
taylor 75409481d0 more standalone server fixes:
- add some basic bmpman functionality to grstub, since it needs to do something at least
 - add missing gr_* function ptrs to grstrub
 - (re-)enable radar and hud setup functions that used to crash (problems are fixed now)
 - deal with default pilot file properly (also caused a bmpman headache)
 - don't bother with Multi_common_icons[] in standalone mode (they don't load, so don't let them unload either)
2006-09-24 22:55:17 +00:00
taylor 0045901c41 more standalone server fixes:
- add some basic bmpman functionality to grstub, since it needs to do something at least
 - add missing gr_* function ptrs to grstrub
 - (re-)enable radar and hud setup functions that used to crash (problems are fixed now)
 - deal with default pilot file properly (also caused a bmpman headache)
 - don't bother with Multi_common_icons[] in standalone mode (they don't load, so don't let them unload either)
2006-09-24 22:55:17 +00:00
taylor 396fdf6e36 clean up the function ptrs so that it's a bit easier to read 2006-09-24 22:54:24 +00:00
taylor de957c01ba clean up the function ptrs so that it's a bit easier to read 2006-09-24 22:54:24 +00:00
taylor 374486e15e move FS2NetD connection checks to *after* it tries to connect ;) (Mantis bug #1065) 2006-09-24 13:32:47 +00:00
taylor 8a708859e0 move FS2NetD connection checks to *after* it tries to connect ;) (Mantis bug #1065) 2006-09-24 13:32:47 +00:00
taylor 70641cc958 fix for deletion of multiplayer pilots (Mantis bug #1066) 2006-09-24 13:32:11 +00:00
taylor 7af0b51095 fix for deletion of multiplayer pilots (Mantis bug #1066) 2006-09-24 13:32:11 +00:00
taylor 124e96b3ea minor clean and code optimizations
clean up view/proj matrix fubar that made us need far more matrix levels that actually needed (partial fix for Mantis #563)
add debug safety check to make sure that we don't use more than 2 proj matrices (all that GL is required to support)
set up a texture matrix for the env map to that it doesn't move/look funky
2006-09-24 13:31:52 +00:00
taylor 8ff5cf8295 fix SAFE_STRCAT() so that it can work in an if() statement that doesn't have braces 2006-09-24 13:31:08 +00:00
taylor 135261958b small optimizations and code cleanup
use the real frametime for FPS counter stuff, no reason to deal with time compression there (Mantis bug #1058)
2006-09-24 13:30:33 +00:00
taylor 7846d6f8c8 minor clean and code optimizations
clean up view/proj matrix fubar that made us need far more matrix levels that actually needed (partial fix for Mantis #563)
add debug safety check to make sure that we don't use more than 2 proj matrices (all that GL is required to support)
set up a texture matrix for the env map to that it doesn't move/look funky
2006-09-24 13:26:01 +00:00
taylor bc7e95e388 fix SAFE_STRCAT() so that it can work in an if() statement that doesn't have braces 2006-09-24 13:22:38 +00:00
taylor 66f8e3b188 small optimizations and code cleanup
use the real frametime for FPS counter stuff, no reason to deal with time compression there (Mantis bug #1058)
2006-09-24 13:21:33 +00:00
Backslash 22672781a2 Ok, maybe this one will be better. Sorry about that. 2006-09-22 09:22:08 +00:00
taylor 4a176ff5c8 revert Backslash's commit, *way* too many changes there for a single friggin line 2006-09-21 13:33:27 +00:00
Backslash f39e87e3a7 max_speed changed to get ship's max forward speed instead of max_vel magnitude, thus fixing trichord speed problems. (Mantis 1050, and early work by argv.) 2006-09-20 09:29:36 +00:00
Goober5000 c5e69f4389 more descriptive warning message for docking paths 2006-09-20 05:19:02 +00:00
Goober5000 fcc25f18c6 more descriptive warning message for docking paths 2006-09-20 05:19:02 +00:00
taylor edbfdbbac6 default to 44100 sound sample rate (OpenAL tends to works much better with this) 2006-09-20 05:06:54 +00:00
taylor dbdd32a3b9 add some extra FS2NetD safety checks around to prevent the code from doing stupid crash-happy things 2006-09-20 05:05:28 +00:00
taylor fc5bdcdeba add some extra FS2NetD safety checks around to prevent the code from doing stupid crash-happy things 2006-09-20 05:05:28 +00:00
taylor 07104302fd have the joystick thread prevent the display and network from going to sleep or activating the screensaver if you use only a joystick to play 2006-09-20 05:05:07 +00:00
taylor a61fdf5dae have the joystick thread prevent the display and network from going to sleep or activating the screensaver if you use only a joystick to play 2006-09-20 05:05:07 +00:00
taylor f102d6c3db the resolution checks needed to be based on the unscaled res since you would have to include correct sizes for every single resolution otherwise (fixes a bug noticed in WCS) 2006-09-20 05:04:42 +00:00
taylor d7d12ae51a some gamma ramp fixage, still hasn't gotten a steller review from DaBrain but it does work much better than before, so I'll tweak it later if need be 2006-09-20 05:04:22 +00:00
taylor a7f03a9cff neither of these two structs appear to be used anywhere, so lets just comment them out 2006-09-20 05:04:01 +00:00
taylor d37db36920 some basic error message/handling fixage 2006-09-20 05:03:41 +00:00
taylor dd1de10b08 properly support 4gig of RAM, and don't totally freak out if user has more than that 2006-09-20 05:03:12 +00:00
taylor 6f6b750bf1 properly fix the new_recommendation_text FRED problem, plus some real cleanup for that code in general, and some memory leak fixes 2006-09-20 05:02:41 +00:00
taylor dea995c5b9 the resolution checks needed to be based on the unscaled res since you would have to include correct sizes for every single resolution otherwise (fixes a bug noticed in WCS) 2006-09-20 04:59:29 +00:00
taylor 42d9e22380 some gamma ramp fixage, still hasn't gotten a steller review from DaBrain but it does work much better than before, so I'll tweak it later if need be 2006-09-20 04:58:13 +00:00
taylor a12ee880b7 neither of these two structs appear to be used anywhere, so lets just comment them out 2006-09-20 04:56:36 +00:00
taylor 2146de6279 some basic error message/handling fixage 2006-09-20 04:55:48 +00:00
taylor d59ffc45d5 properly support 4gig of RAM, and don't totally freak out if user has more than that 2006-09-20 04:55:12 +00:00
taylor 85f2d22689 properly fix the new_recommendation_text FRED problem, plus some real cleanup for that code in general, and some memory leak fixes 2006-09-20 04:53:53 +00:00
taylor b552a1ce89 add default recommendation text for debriefing, it's either this or making sure that it's nul 2006-09-14 23:29:47 +00:00
taylor 41c3110f3d add default recommendation text for debriefing, it's either this or making sure that it's nul 2006-09-14 23:29:47 +00:00
taylor 4409f12774 prevent FRED from hitting an Assert() that it shouldn't have had to hit in the first place 2006-09-14 18:48:17 +00:00
taylor 95c4a73ee7 prevent FRED from hitting an Assert() that it shouldn't have had to hit in the first place 2006-09-14 18:48:17 +00:00
taylor de5dcc879d fix for Mantis bug #1006 2006-09-13 17:30:25 +00:00
taylor 08e13cb781 fix for Mantis bug #1006 2006-09-13 17:30:25 +00:00
taylor 31f5a80283 fix some stuff_string()'s that got missed previously 2006-09-13 03:57:00 +00:00
taylor af26639744 forgot to check that error message to match the new struct format 2006-09-13 03:56:29 +00:00
taylor 8877c6fdc6 bah! stupid. 2006-09-13 03:55:50 +00:00
taylor ece3570868 bah! stupid. 2006-09-13 03:50:07 +00:00
taylor eecb1ac38f might as well add this, just to be on the safe side (I haven't hit it anywhere, but it could be made into a warning if it starts getting hit) 2006-09-13 03:18:15 +00:00
taylor c9cb9639f8 be sure to setup/reset ship team data too when moving to a red-alert mission (Mantis bug 1042)
(this will hopefully fix Mantis bug 860 as well, which is a separate but related issue)
2006-09-13 03:17:59 +00:00
taylor d46e332bf8 be sure that we still try to play a movie if we get to the cmd/brief screen right from another mission without debrief (Mantis bug 1043) 2006-09-13 03:17:34 +00:00
taylor 46255d3f9a restore MAX_AIFTT_TURRETS to retail level, and add comment as to what it means for the next person that tries to change it 2006-09-13 03:17:06 +00:00
taylor ce48489338 might as well add this, just to be on the safe side (I haven't hit it anywhere, but it could be made into a warning if it starts getting hit) 2006-09-13 03:12:35 +00:00
taylor ef1ed86e53 be sure to setup/reset ship team data too when moving to a red-alert mission (Mantis bug 1042)
(this will hopefully fix Mantis bug 860 as well, which is a separate but related issue)
2006-09-13 03:11:09 +00:00
taylor 0b363c583f be sure that we still try to play a movie if we get to the cmd/brief screen right from another mission without debrief (Mantis bug 1043) 2006-09-13 03:08:09 +00:00
taylor 7b5343d223 restore MAX_AIFTT_TURRETS to retail level, and add comment as to what it means for the next person that tries to change it 2006-09-13 03:06:46 +00:00
taylor 893d8bb07b revert to retail behavior for turret_should_pick_new_target()
fix out-of-bounds issue
2006-09-11 09:43:35 +00:00
taylor 626598eca3 revert to retail behavior for turret_should_pick_new_target()
fix out-of-bounds issue
2006-09-11 09:43:35 +00:00
taylor fe80df5c2e fixes for stuff_string() bounds checking 2006-09-11 06:51:17 +00:00
taylor 3aede6b739 fixes for stuff_string() bounds checking
stict compiler build fixes
2006-09-11 06:48:40 +00:00
taylor f7080e74fc compiler warning fixes 2006-09-11 06:47:59 +00:00
taylor 044981a139 fix bug where set-object-speed-* could set speed subjectively if left to default 2006-09-11 06:47:33 +00:00
taylor 21c1281c12 fixes for stuff_string() bounds checking
compiler warning and stict compiling fixes
2006-09-11 06:47:07 +00:00
taylor 5516e17a5f fixes for stuff_string() bounds checking
compiler warning fixes
2006-09-11 06:46:36 +00:00
taylor 83e994b3a1 fixes for stuff_string() bounds checking
make sure that default entries always get used in techroom if they don't otherwise have the techroom visibility flag
fix crash bug where the first entry in the various lists wasn't ever initialized if there is no ship/weapon/intel info to show
2006-09-11 06:46:04 +00:00
taylor 2bbcd2bf28 various small compiler warning and strict compiling fixes 2006-09-11 06:45:40 +00:00
taylor a98ce72c1d crap. ... again 2006-09-11 06:38:32 +00:00
taylor fbe1344457 clean up the grstub mess (for work on standalone server, and just for sanity sake)
move color and shader functions to 2d.cpp since they are exactly the same everywhere
don't bother with the function pointer for gr_set_font(), it's the same everywhere anyway
2006-09-11 06:36:38 +00:00
taylor 3a96049666 crap, there was supposed to be a multi check there 2006-09-11 06:10:28 +00:00
taylor c63d33e7ba allow W32 init fallback if desktop depth is less than requested game depth (it may look like crap, but at least it will work) 2006-09-11 06:09:30 +00:00
taylor 1c13a35623 bah! got the post-it sitting in front of me, but still forgot to remove this 2006-09-11 06:08:46 +00:00
taylor 49b7ae2b07 make Species_info[] and Asteroid_info[] dynamic 2006-09-11 06:08:09 +00:00
taylor 0adc47adae quite a few fixes to handle missing campaigns better
change load order for campaign loading to a full check: Player-specified -> BUILTIN_CAMPAIGN -> First Avaiable.
clean up the getting of a list of available campaigns
fix simroom issue where single missions, with the [V] icon, would display wrong (this was a retail bug, but it doesn't show normally)
fix bug where, if a campaign failed to load, it would still appear available for savefile useage
fix bug where, when resetting the campaign info, the num_missions var wasn't 0'd and it could cause a sexp Assert() during reset
2006-09-11 06:02:14 +00:00
taylor 5d42339e1a fix a compiler warning/error on Squadmsg_history[] init 2006-09-11 05:56:23 +00:00
taylor 642bae3ae9 forgot an extension check (was this the background corruption bug???) 2006-09-11 05:55:18 +00:00
taylor 2c13208186 switch to using cf_find_file_location_ext() when looking for movies 2006-09-11 05:54:37 +00:00
taylor 59d07b3764 various small cleanup and speedup changes
add a cf_find_file_location_ext() function, which you can pass a filename and a list of extensions and it will search for all of them at once
2006-09-11 05:49:05 +00:00
taylor ee3aafc1e9 make muzzle flash info dynamic
add support for modular mflash tables (*-mfl.tbm)
2006-09-11 05:44:23 +00:00
taylor 7ea298bfde add font.h since the gr_set_font() function is only available from there now 2006-09-11 05:39:48 +00:00
taylor e654bffa7a don't try to draw beam sections if there is no valid texture for it, or if there is no width 2006-09-11 05:38:16 +00:00
taylor fa79a6395f make sure that we properly page in textures for 3d shockwave models 2006-09-11 05:37:33 +00:00
taylor 368e5892e7 compiler warning fixes 2006-09-11 05:36:43 +00:00
taylor d8c395d382 some fixes for the standalone server
- get init order correct for lcl and std init
 - turn off some cmdlines that are just graphics related when Is_standalone
 - skip radar_mission_init() (may need to rethink that though, it's bound to cause problems)
2006-09-11 05:35:51 +00:00
taylor 5d467a8a79 minor spelling/grammer fixes 2006-09-11 05:31:11 +00:00
taylor 6ab6cd71ce fixes for stuff_string() bounds checking 2006-09-11 01:17:07 +00:00
taylor 2f3b5f2910 fixes for stuff_string() bounds checking
stict compiler build fixes
2006-09-11 01:12:50 +00:00
taylor c399c9a68f compiler warning fixes 2006-09-11 01:10:00 +00:00
taylor b41e847f01 fix bug where set-object-speed-* could set speed subjectively if left to default 2006-09-11 01:09:33 +00:00
taylor dc49f1052f fixes for stuff_string() bounds checking
compiler warning and stict compiling fixes
2006-09-11 01:06:20 +00:00
taylor a58b1e80c6 fixes for stuff_string() bounds checking
compiler warning fixes
2006-09-11 01:04:20 +00:00
taylor c924e3997a fixes for stuff_string() bounds checking
make sure that default entries always get used in techroom if they don't otherwise have the techroom visibility flag
fix crash bug where the first entry in the various lists wasn't ever initialized if there is no ship/weapon/intel info to show
2006-09-11 01:03:23 +00:00
taylor 806027e4e8 various small compiler warning and strict compiling fixes 2006-09-11 01:00:28 +00:00
taylor 3a7eb64b41 be sure to reset color and clear color before MVE playback (fix for Mantis bug #1041) 2006-09-09 21:28:19 +00:00
taylor 570dd7fe66 be sure to reset color and clear color before MVE playback (fix for Mantis bug #1041) 2006-09-09 21:28:19 +00:00
wmcoolmon 8822c4b5f8 New model & ship scripting stuff 2006-09-09 09:53:36 +00:00
taylor c32766015d fix for vanishing FRED2 cursor (Mantis bug #997), plus a little cleanup 2006-09-09 04:07:57 +00:00
taylor 34b1c5bdd2 fix for vanishing FRED2 cursor (Mantis bug #997), plus a little cleanup 2006-09-09 04:07:57 +00:00
taylor 4b7a796ed1 crap, knew I should have fixed that in the patch so that it would be right in both branches... 2006-09-08 07:25:05 +00:00
taylor 3d416984bf fix things that strict compiling balked at (from compiling with -ansi and -pedantic) 2006-09-08 06:20:15 +00:00
taylor 44d1273856 fix for Mantis bug #1038 (glow point bank storage being wrong after changing ships in shipselect)
fix things that strict compiling balked at (from compiling with -ansi and -pedantic)
2006-09-08 06:19:02 +00:00
taylor 0f7e868afd small optimization 2006-09-08 06:18:29 +00:00
taylor 3b5e199ae2 fix for Mantis bug #617 (with a very big assist from Shade who did most of the initial work on this) 2006-09-08 06:18:05 +00:00
taylor 61bdac1a5c lower client/server version back to retail level, there was no reason to bump it in the first place 2006-09-08 06:17:32 +00:00
taylor 1264460ad8 add support for a server name in fs2open_pxo.cfg, rather than just an IP address for the server 2006-09-08 06:17:07 +00:00
taylor c67d261662 fix for Mantis bug #687 (at least until better swarming code can be written, post-3.6.9)
a quick speed/sanity check for turrets to be sure that they actually have a weapon to fire before processing them
2006-09-08 06:16:18 +00:00
taylor f09c7e2d03 fix things that strict compiling balked at (from compiling with -ansi and -pedantic) 2006-09-08 06:14:44 +00:00
taylor ba740c215d fix for Mantis bug #1038 (glow point bank storage being wrong after changing ships in shipselect)
fix things that strict compiling balked at (from compiling with -ansi and -pedantic)
2006-09-08 06:13:29 +00:00
taylor 11204949ec small optimization 2006-09-08 06:11:06 +00:00
taylor 9583027ef4 fix for Mantis bug #617 (with a very big assist from Shade who did most of the initial work on this) 2006-09-08 06:10:34 +00:00
taylor e6638dd41e lower client/server version back to retail level, there was no reason to bump it in the first place 2006-09-08 06:09:05 +00:00
taylor 3fd1be5b52 add support for a server name in fs2open_pxo.cfg, rather than just an IP address for the server 2006-09-08 06:07:59 +00:00
taylor 0ff2bf20ef fix for Mantis bug #687 (at least until better swarming code can be written, post-3.6.9)
a quick speed/sanity check for turrets to be sure that they actually have a weapon to fire before processing them
2006-09-08 06:06:34 +00:00
wmcoolmon 9f423d13da Better static mouse cursor support 2006-09-04 20:56:12 +00:00
wmcoolmon 29c688d40b Update MSVC 7 Project files 2006-09-04 19:58:06 +00:00
Goober5000 5cc255ed71 revert VOICER breakage 2006-09-04 19:14:32 +00:00
Goober5000 7097f6375b fix macros 2006-09-04 18:06:37 +00:00
Goober5000 2b91276395 fix macros 2006-09-04 18:06:37 +00:00
Backslash 285d95bc9d Make hud toggle apply to hud framerate, statistics, and camera position 2006-09-04 09:26:36 +00:00
Backslash 929b8963a8 Turn off gliding upon activating autopilot 2006-09-04 09:21:55 +00:00
wmcoolmon 4f8e7603b0 Commit of 'new' BTRL FTL effect work 2006-09-04 06:17:26 +00:00
wmcoolmon 04415236fe Update to allow flak range to be manually overridden, and safeguard against NULL predicted_pos 2006-09-04 06:13:31 +00:00
wmcoolmon 8afad50ed9 Conditional hook 2006-09-04 06:12:35 +00:00
wmcoolmon d2eac3746f enumerations; drawImage update; subsystem orientation and fireWeapon() member objects; many new weapons.tbl data variables; conditional hooks; modular scripting table support (*-sct) 2006-09-04 06:11:50 +00:00
wmcoolmon b64964c688 Fix scripting HUD hook execution method 2006-09-04 06:11:22 +00:00
wmcoolmon 63da322969 Don't force fs2_open to load motion debris. 2006-09-04 06:08:20 +00:00
wmcoolmon a12d8c8a64 Cover-up a bloody annoying warning 2006-09-04 06:06:38 +00:00
wmcoolmon a7d9e991c5 Allow use of the techroom, even if no current campaign exists. 2006-09-04 06:03:10 +00:00
wmcoolmon 6b02b7ba02 Changes to allow for a species with no shield anim 2006-09-04 06:00:11 +00:00
wmcoolmon e7d863b85a Fix bug (under Win32) where FRED would warn about unacceptable accepted orders, but not do anything about them. 2006-09-04 05:54:14 +00:00
wmcoolmon 70466d10eb Added flag-to-string function for error messages 2006-09-04 05:50:58 +00:00
Goober5000 a224571302 fix waypoint time to goal 2006-09-02 23:41:53 +00:00
Goober5000 2f09dfc78d fix waypoint time to goal 2006-09-02 20:24:15 +00:00
Goober5000 c0f6b40dec remove unnecessary warning 2006-09-02 20:07:39 +00:00
Goober5000 1e84b28837 remove unnecessary warning 2006-09-02 20:07:39 +00:00
taylor 72b358630f crap, there was supposed to be a multi check there 2006-08-29 21:32:25 +00:00
taylor 698686748d allow W32 init fallback if desktop depth is less than requested game depth (it may look like crap, but at least it will work) 2006-08-29 07:27:43 +00:00
taylor 1fa422bb39 stupid, stupid, stupid...
- fix AVI/MPG movie playback
 - fix missing campaign craziness
2006-08-28 17:14:52 +00:00
taylor 41d85b56d6 bah! got the post-it sitting in front of me, but still forgot to remove this 2006-08-28 06:19:56 +00:00
taylor 8a9d540c4c make Species_info[] and Asteroid_info[] dynamic 2006-08-27 18:12:42 +00:00
taylor 3fcf521f96 quite a few fixes to handle missing campaigns better
change load order for campaign loading to a full check: Player-specified -> BUILTIN_CAMPAIGN -> First Avaiable.
clean up the getting of a list of available campaigns
fix simroom issue where single missions, with the [V] icon, would display wrong (this was a retail bug, but it doesn't show normally)
fix bug where, if a campaign failed to load, it would still appear available for savefile useage
fix bug where, when resetting the campaign info, the num_missions var wasn't 0'd and it could cause a sexp Assert() during reset
2006-08-27 18:11:37 +00:00
taylor d7569eaad3 fix a compiler warning/error on Squadmsg_history[] init 2006-08-27 18:04:24 +00:00
taylor eae7ec5842 forgot an extension check (was this the background corruption bug???) 2006-08-27 18:03:29 +00:00
taylor d472d9b076 switch to using cf_find_file_location_ext() when looking for movies 2006-08-27 18:02:26 +00:00
taylor 303d820966 various small cleanup and speedup changes
add a cf_find_file_location_ext() function, which you can pass a filename and a list of extensions and it will search for all of them at once
2006-08-27 18:01:45 +00:00
karajorma 5b0b889da8 Fix TvT problem with scores appearing incorrectly. 2006-08-25 21:21:17 +00:00
karajorma 9fcfe6bc06 Fix lack of Wingman Status indicator for Zeta wing in TvT games. 2006-08-25 21:19:02 +00:00
karajorma c819405ec8 Fix TvT problem with scores appearing incorrectly.
Fix a CVS issue
2006-08-25 21:15:31 +00:00
karajorma 48886e0604 Fix lack of Wingman Status indicator for Zeta wing in TvT games. 2006-08-25 21:09:59 +00:00
taylor 89e5ecea02 crap. 2006-08-23 16:15:46 +00:00
taylor 7727992e21 make muzzle flash info dynamic
add support for modular mflash tables (*-mfl.tbm)
2006-08-22 05:50:12 +00:00
taylor 5a9f2fd0b4 add font.h since the gr_set_font() function is only available from there now 2006-08-22 05:48:46 +00:00
taylor f91d40c690 don't try to draw beam sections if there is no valid texture for it, or if there is no width 2006-08-22 05:47:51 +00:00
taylor 22da5ec0fd make sure that we properly page in textures for 3d shockwave models 2006-08-22 05:47:00 +00:00
taylor cd4a173af6 compiler warning fixes 2006-08-22 05:45:39 +00:00
taylor faf86c7217 some fixes for the standalone server
- get init order correct for lcl and std init
 - turn off some cmdlines that are just graphics related when Is_standalone
 - skip radar_mission_init() (may need to rethink that though, it's bound to cause problems)
2006-08-22 05:45:15 +00:00
taylor f58efc98c8 minor spelling/grammer fixes 2006-08-22 05:42:56 +00:00
taylor 534995aa38 clean up the grstub mess (for work on standalone server, and just for sanity sake)
move color and shader functions to 2d.cpp since they are exactly the same everywhere
don't bother with the function pointer for gr_set_font(), it's the same everywhere anyway
2006-08-22 05:41:36 +00:00
Goober5000 1fc4f4034d a tweak and a fix 2006-08-21 04:02:41 +00:00
taylor a07c6fd790 maybe optimize the (PI/2), (PI*2) and (RAND_MAX/2) stuff a little bit 2006-08-20 00:51:07 +00:00
taylor 0319781c9c slight math optimizations
reduce COUNT_ESTIMATE since I added more game_busy() calls for models and it threw off the loading bar
2006-08-20 00:50:08 +00:00
taylor 3eb02ad034 slight optimizations
fix AI shields to not get overly charged or overly drained when AI does equalize (it's closer to player now, but still within retail intent of function, I think)
2006-08-20 00:49:39 +00:00
taylor 24de1e5875 slight optimizations
compiler warning fixes
2006-08-20 00:49:09 +00:00
taylor df121d0428 clean out some crap that we don't really need 2006-08-20 00:48:47 +00:00
taylor 6bb02d42dd cleanup
bugfixes
error-handling
(lots of crap got fixed to work better, and lets leave it at that, the commit log would be too long otherwise :))
2006-08-20 00:48:28 +00:00
taylor 4d31e86b84 very slight speed optimization to avoid math that we really don't need to do anyway 2006-08-20 00:47:57 +00:00
taylor 9c2fa29706 add custom IP option to maybe help get around NAT issues (I haven't heard whether this actually works or not yet though, but it's been out for testing all week) 2006-08-20 00:47:35 +00:00
taylor c5e192a367 add render option for no glowmaps
remove render option for fog (why was this even there??)
add tech model view for missiles with special tech models (will hopefully help spur some work towards fixing the currently broken models)
handle Z-buf issue that made the lab interface disappear when the transparent render option was ticked
2006-08-20 00:47:10 +00:00
taylor f7eca36e76 OMG! MEMLEAK!!!! (maybe no one will notice that it was my fault ;)) 2006-08-20 00:46:42 +00:00
taylor 6d04a6f79e an int wrap-around issue could (and was) make debris not have electrical arcs (or lighting or sounds) since it would always fail this check 2006-08-20 00:46:02 +00:00
taylor 0f2f94797d ever so slight speed up for bm_set_components_* (this crap is slow, and it's called a LOT) 2006-08-20 00:45:37 +00:00
taylor 781dbba822 "byte" was the same as "ubyte", but since "byte" has to be an extra #define on everything but Windows, lets just get rid of it 2006-08-20 00:45:10 +00:00
taylor db9ca24fd6 add decoder for 8-bit MVEs
a basic fix for finding AVIs over MVEs, for mod dir stuff (this needs some CFILE support added to be a true fix, it's on the TODO list)
little bits of cleanup for old/unused code
make sure MVE filenames are correct in mvelib
2006-08-20 00:44:37 +00:00
Goober5000 b76c4a3c5d disable duplicate model texture replace 2006-08-19 21:46:05 +00:00
Goober5000 7bcbb00cf5 disable duplicate model texture replace 2006-08-19 21:46:05 +00:00
Goober5000 ad33258cb7 if a modular table ship pof cannot be found, use the original one 2006-08-19 21:45:20 +00:00
Goober5000 215bb0ecc0 if a modular table ship pof cannot be found, use the original one 2006-08-19 21:45:20 +00:00
taylor 0107652287 maybe optimize the (PI/2), (PI*2) and (RAND_MAX/2) stuff a little bit 2006-08-19 04:38:47 +00:00
taylor 30c9346feb slight math optimizations
reduce COUNT_ESTIMATE since I added more game_busy() calls for models and it threw off the loading bar
2006-08-19 04:37:00 +00:00
taylor 7fccdb1398 slight optimizations
fix AI shields to not get overly charged or overly drained when AI does equalize (it's closer to player now, but still within retail intent of function, I think)
2006-08-19 04:35:04 +00:00
taylor 2f69385c96 slight optimizations
compiler warning fixes
2006-08-19 04:33:00 +00:00
taylor a68a01c9e6 clean out some crap that we don't really need 2006-08-19 04:32:11 +00:00
taylor eda555d773 cleanup
bugfixes
error-handling
(lots of crap got fixed to work better, and lets leave it at that, the commit log would be too long otherwise :))
2006-08-19 04:31:24 +00:00
taylor ff4d0008d5 very slight speed optimization to avoid math that we really don't need to do anyway 2006-08-19 04:29:08 +00:00
taylor a0d3cf64d0 add custom IP option to maybe help get around NAT issues (I haven't heard whether this actually works or not yet though, but it's been out for testing all week) 2006-08-19 04:28:22 +00:00
taylor 990d246a9a add render option for no glowmaps
remove render option for fog (why was this even there??)
add tech model view for missiles with special tech models (will hopefully help spur some work towards fixing the currently broken models)
handle Z-buf issue that made the lab interface disappear when the transparent render option was ticked
2006-08-19 04:26:32 +00:00
taylor f47fde1eda OMG! MEMLEAK!!!! (maybe no one will notice that it was my fault ;)) 2006-08-19 04:23:56 +00:00
taylor 16b07945fa an int wrap-around issue could (and was) make debris not have electrical arcs (or lighting or sounds) since it would always fail this check 2006-08-19 04:22:33 +00:00
taylor 0365097aee ever so slight speed up for bm_set_components_* (this crap is slow, and it's called a LOT) 2006-08-19 04:20:22 +00:00
taylor ee23d9072e "byte" was the same as "ubyte", but since "byte" has to be an extra #define on everything but Windows, lets just get rid of it 2006-08-19 04:16:49 +00:00
taylor c617d4bc2f add decoder for 8-bit MVEs
a basic fix for finding AVIs over MVEs, for mod dir stuff (this needs some CFILE support added to be a true fix, it's on the TODO list)
little bits of cleanup for old/unused code
make sure MVE filenames are correct in mvelib
2006-08-19 04:14:57 +00:00
karajorma cd1981bafa More cut & paste errors fixed and removal of the hardcoded warp out animation. Will now actually use the one specified in the table. 2006-08-18 18:07:03 +00:00
karajorma bc2db24a81 More typos revealed while trying to merge changes to the HEAD branch! 2006-08-18 17:48:39 +00:00
karajorma 5981929ec2 More cut & paste errors fixed and removal of the hardcoded warp out animation. Will now actually use the one specified in the table. 2006-08-18 17:21:10 +00:00
Goober5000 88c2f2d2f8 better handling of ballistic rearm sounds
--Goober5000
2006-08-18 04:34:59 +00:00
Goober5000 e0053eb300 better handling of ballistic rearm sounds
--Goober5000
2006-08-18 04:34:59 +00:00
karajorma 8363f2309f Doh! Minor fix 2006-08-16 16:47:55 +00:00
karajorma 608b302ee8 Doh! Minor fix 2006-08-16 16:47:55 +00:00
karajorma 3d95e08aec Another typo 2006-08-15 20:00:51 +00:00
karajorma 3de0203b45 Another typo 2006-08-15 20:00:51 +00:00
karajorma 3750255c54 Fixed a typo which breaks team-score 2006-08-15 19:25:57 +00:00
karajorma 71c8b03c71 Fixed a silly typo which breaks team-score 2006-08-15 19:24:09 +00:00
Backslash 4462d8b971 add .ogg to the list of recognized movie file extensions 2006-08-15 00:26:07 +00:00
Backslash d9954f915b Quick fix to deal with the slide accel / decel inconsistency, Mantis 951. 2006-08-15 00:12:40 +00:00
Goober5000 603b795065 nitpick 2006-08-14 22:02:43 +00:00
Goober5000 f3efd3de89 nitpick 2006-08-14 22:02:43 +00:00
Goober5000 87286a1502 extremely minor optimizations 2006-08-14 21:59:14 +00:00
Goober5000 3435782429 extremely minor optimizations 2006-08-14 21:59:14 +00:00
karajorma 44fa19a721 Fix a Multiplayer bug where anything that included the name of a player wing was automatically considered to be a part of that wing. 2006-08-14 19:58:42 +00:00
karajorma f2f12cd2bc Fix a Multiplayer bug where anything that included the name of a player wing was automatically considered to be a part of that wing. 2006-08-14 19:58:42 +00:00
taylor 36190d92e7 some minor cleanup to anisotropy setting
only use negative lod bias when not using anisotropy to help avoid shimmering
stick lod bias setting in with anisotropy function
2006-08-12 13:14:45 +00:00
taylor 7878abcef5 default to 44100 sound sample rate (OpenAL tends to works much better with this) 2006-08-12 01:17:08 +00:00
karajorma 5e0d3aa429 Fix Mantis 1009 - A problem with using the Change-ship-model SEXP 2006-08-09 17:50:15 +00:00
karajorma 86be6d6b99 Fix Mantis 1009 - A problem with using the Change-ship-model SEXP 2006-08-09 17:39:46 +00:00
taylor e6aa47f043 fix for setting of texture lod bias 2006-08-09 14:42:24 +00:00
taylor ef010994f2 fix for setting of texture lod bias 2006-08-09 14:42:24 +00:00
taylor e6c16327a6 very small math optimization 2006-08-09 14:41:44 +00:00
taylor 8887b83f53 very small math optimization 2006-08-09 14:41:44 +00:00
Goober5000 99a2c5105e fix spin control association
--Goober5000
2006-08-07 23:25:37 +00:00
karajorma 7ea1fe67b0 Fix a small problem with ballistic primary ammo. Forgot to upload this one earlier 2006-08-07 15:24:32 +00:00
karajorma cb8a409af7 Fix a small problem with ballistic primary ammo. Forgot to upload this one earlier 2006-08-07 15:11:33 +00:00
Goober5000 a8211fb6bd deprecate change-ship-model 2006-08-06 19:27:13 +00:00
Goober5000 8491ae47ee deprecate change-ship-model 2006-08-06 19:27:13 +00:00
Goober5000 325cc70a9c make these consistent (pitch-bank-heading is the established order)
--Goober5000
2006-08-06 19:06:42 +00:00
Goober5000 cdf59b05dc make these consistent (pitch-bank-heading is the established order)
--Goober5000
2006-08-06 19:06:42 +00:00
Goober5000 b68d361107 add the multiple background feature
--Goober5000
2006-08-06 18:47:29 +00:00
Goober5000 5197a30743 add the multiple background feature
--Goober5000
2006-08-06 18:47:29 +00:00
karajorma bf433f9e14 Hopefully plug the possible memory leaks from not calling common_select_close() in red alerts and when exiting mission briefings 2006-08-05 10:40:22 +00:00
karajorma af2b737281 Remove common_select_close(). This should be handled in freespace.cpp 2006-08-05 10:37:51 +00:00
karajorma 8303cd9939 Fix a multiplayer crash if the server committed before the 2nd team captain unlocked. 2006-08-04 19:13:38 +00:00
karajorma e5059d29d9 Fix bug where end-mission SEXP only resulting in the mission ending for the server 2006-08-04 11:45:21 +00:00
karajorma e9cec41e18 Stop multiplayer campaigns crashing if the campaign lacks a description 2006-08-04 11:24:27 +00:00
karajorma 74c80289cb Stop multiplayer campaigns crashing if the campaign lacks a description 2006-08-03 17:55:01 +00:00
karajorma 8f31264a41 Added new packed to deal with a bug in multiplayer where using end-mission would only end the mission for the server and then force the clients to jump out. 2006-08-03 16:24:23 +00:00
karajorma 483657b858 Let's try this again. - Added new packed to deal with a bug in multiplayer where using end-mission would only end the mission for the server and then force the clients to jump out. 2006-08-03 16:22:24 +00:00
karajorma e0303d36cf *** empty log message *** 2006-08-03 16:03:54 +00:00
Goober5000 870118a333 add a second method for specifying ship copies, plus allow the parser to recognize ship class copy names that aren't consistent with the table
--Goober5000
2006-08-03 01:33:56 +00:00
Goober5000 abbb2df243 add a second method for specifying ship copies, plus allow the parser to recognize ship class copy names that aren't consistent with the table
--Goober5000
2006-08-03 01:33:56 +00:00
Goober5000 12f90edb15 fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:47:40 +00:00
Goober5000 29fe27ac01 fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:47:40 +00:00
Goober5000 9137f347c7 fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:31:15 +00:00
Goober5000 b1c33c5c89 fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:31:15 +00:00
Kazan f339ce501b commented out glide_while_pressed changes until taylor deems them safe 2006-08-01 04:26:02 +00:00
Goober5000 b2449c50ba proper phrase case 2006-08-01 01:56:44 +00:00
Kazan 63ebb917d7 glide while pressed 2006-07-31 23:57:48 +00:00
Goober5000 0678ecb1fd fix for Mantis #1020
--Goober5000
2006-07-31 21:13:03 +00:00
karajorma 168ef9afcb Fix for Mantis 1020.
ship-subsys-guardian-threshold will now include subsystems without you having to type them in.
2006-07-31 21:09:10 +00:00
Kazan c7df320f2d resolve 1018 and an interface problem in fred2's ship editor 2006-07-30 20:01:56 +00:00
Kazan 70d5d4556e resolve 1018 and an interface problem in fred2's ship editor 2006-07-30 20:01:56 +00:00
Goober5000 41c79bfd6f bah, revert 2006-07-30 02:20:17 +00:00
Goober5000 47a6a4c6c7 bah, revert 2006-07-30 02:20:17 +00:00
Goober5000 e06020d040 stage 1 in multiple-background feature
--Goober5000
2006-07-30 00:23:30 +00:00
Goober5000 d2a21e8767 stage 1 in multiple-background feature
--Goober5000
2006-07-30 00:23:30 +00:00
taylor 669c995ea8 check first stage warp arrival against all docked objects so we can not render them all if even one is 1st stage 2006-07-28 02:46:10 +00:00
taylor dcff18e7a5 check first stage warp arrival against all docked objects so we can not render them all if even one is 1st stage 2006-07-28 02:46:10 +00:00
taylor 21f84ecf7b when in external (non-control) view be sure to not include time compression speed in camera movement 2006-07-28 02:45:34 +00:00
taylor 5612c6c462 don't render extra lighting passes when fog is enabled, prevents fog fragment from getting added for each pass
wobble wobble no more!!
2006-07-28 02:45:10 +00:00
taylor b3e7a14d4c switch from Assert() to basic error fixage for end-of-string white space check 2006-07-28 02:44:40 +00:00
taylor 848445805b include CF_TYPE_PLAYERS in special pilot path consideration, prevents moddirs from always getting and empty data/players/ 2006-07-28 02:44:17 +00:00
taylor 4f03fccb82 don't lowercase the dir for chdir on non-Win32 since it could be, and probably is, case sensitive 2006-07-28 02:43:48 +00:00
taylor 85d854591b when in external (non-control) view be sure to not include time compression speed in camera movement 2006-07-28 02:40:07 +00:00
taylor 3c8a5804b6 don't render extra lighting passes when fog is enabled, prevents fog fragment from getting added for each pass
wobble wobble no more!!
2006-07-28 02:38:35 +00:00
taylor 814e618b3a switch from Assert() to basic error fixage for end-of-string white space check 2006-07-28 02:37:08 +00:00
taylor 8c0cbde8cf include CF_TYPE_PLAYERS in special pilot path consideration, prevents moddirs from always getting and empty data/players/ 2006-07-28 02:36:07 +00:00
taylor 93c272d5f3 don't lowercase the dir for chdir on non-Win32 since it could be, and probably is, case sensitive 2006-07-28 02:34:52 +00:00
Kazan 0818958d4c Lock player primaries during autopilot 2006-07-27 19:17:59 +00:00
Kazan 045586e142 Lock player primaries during autopilot 2006-07-27 19:17:59 +00:00
karajorma 714ff3078c Fixed an error in ballistic weapons where only the server got the correct number of bullets in multiplayer.
Fixed a rounding up error in get_max_ammo_count_for_primary_bank()
2006-07-27 10:43:16 +00:00
karajorma 9302f8eb38 Fixed an error in ballistic weapons where only the server got the correct number of bullets in multiplayer.
Fixed a rounding up error in get_max_ammo_count_for_primary_bank()
2006-07-27 10:37:43 +00:00
Kazan 28ef671097 resolve SVN 1011 2006-07-26 15:04:04 +00:00
Kazan f4e8c517aa small optimization 2006-07-26 15:01:07 +00:00
Kazan be47f4479b Resolve Mantis #1010 2006-07-26 14:53:38 +00:00
Kazan c92beab2f7 Resolve Mantis #1011 2006-07-26 03:46:04 +00:00
Kazan 67f2e73297 Optimize 2006-07-26 03:45:02 +00:00
Kazan 264fd27a5a Resolve Mantis #1010 2006-07-26 03:44:17 +00:00
taylor aef6b3eee6 support for cmdline option stacking (a per option setting) so that things like "-mod derelict -mod mediavp" will end up as "-mod derelict,mediavp" to the game
fix bug where white space chars didn't get dropped from the end of a option string like they were supposed to
allow for something like "-ambient_factor 100 -ambient_factor 70" to use the proper value, the last one specified, rather than just accept the first instance
2006-07-25 16:26:24 +00:00
taylor c976b38ab9 support for cmdline option stacking (a per option setting) so that things like "-mod derelict -mod mediavp" will end up as "-mod derelict,mediavp" to the game
fix bug where white space chars didn't get dropped from the end of a option string like they were supposed to
allow for something like "-ambient_factor 100 -ambient_factor 70" to use the proper value, the last one specified, rather than just accept the first instance
2006-07-25 16:26:24 +00:00
taylor 9f4c28bd1d minor cleanup/optimization to beam warmup glow rendering function
various lighting code cleanups
 - try to always make sure beam origin lights occur outside of model
 - make Static_lights[] dynamic
 - be sure to reset to first 8 lights when moving on to render spec related texture passes
 - add ambient color to point lights (helps warp effects)
 - sort lights to try and get more important and/or visible lights to always happen in initial render pass
2006-07-24 07:38:00 +00:00
taylor b5e7f2197b minor cleanup/optimization to beam warmup glow rendering function
various lighting code cleanups
 - try to always make sure beam origin lights occur outside of model
 - make Static_lights[] dynamic
 - be sure to reset to first 8 lights when moving on to render spec related texture passes
 - add ambient color to point lights (helps warp effects)
 - sort lights to try and get more important and/or visible lights to always happen in initial render pass
2006-07-24 07:38:00 +00:00
Goober5000 820153a8db fix a subtle and nasty bug
--Goober5000
2006-07-24 02:09:29 +00:00
Goober5000 3cb65286f6 fix a subtle and nasty bug
--Goober5000
2006-07-24 02:09:29 +00:00
Goober5000 ad8cb9bccb fix for Mantis #1003
--Goober5000
2006-07-23 16:58:28 +00:00
Goober5000 73abdc1601 fix for Mantis #1003
--Goober5000
2006-07-23 16:58:28 +00:00
taylor 84ae3ca0a6 minor changes to game_busy() debug text
- don't alloc it for bmpman, and make sure to only call on textures that we are loading
 - add text for model loading, gets rid of the long-wait issue when it appears to not be doing anything early on
2006-07-21 16:08:32 +00:00
taylor 76284ef278 minor changes to game_busy() debug text
- don't alloc it for bmpman, and make sure to only call on textures that we are loading
 - add text for model loading, gets rid of the long-wait issue when it appears to not be doing anything early on
2006-07-21 16:08:32 +00:00
taylor 4fdccaf88c little cleanup 2006-07-21 16:08:03 +00:00
taylor 3aa226463d little cleanup 2006-07-21 16:08:03 +00:00
Goober5000 e27dfe36ea add another method for calculating dimensions of docked objects, plus improve an existing one
--Goober5000
2006-07-21 05:41:10 +00:00
Goober5000 2e9c49cdf4 add another method for calculating dimensions of docked objects, plus improve an existing one
--Goober5000
2006-07-21 05:41:10 +00:00
Goober5000 a031a41223 fix help text
--Goober5000
2006-07-21 05:38:41 +00:00
Goober5000 97059b2580 fix help text
--Goober5000
2006-07-21 05:38:41 +00:00
karajorma 96c1e0a176 Fix for Mantis 996 2006-07-20 21:43:05 +00:00
karajorma 4f82358874 Fix for Mantis 996 2006-07-20 21:15:11 +00:00
karajorma 46de3f0769 Fix for Mantis 888. 2006-07-20 20:41:31 +00:00
karajorma e3e83ac16c Fix for Mantis 888. 2006-07-20 20:41:31 +00:00
Goober5000 c58dc8266f tweak control text
--Goober5000
2006-07-20 01:51:20 +00:00
Goober5000 7b7b2a0660 tweak control text
--Goober5000
2006-07-20 01:51:20 +00:00
Goober5000 25ce5bd167 add WCS screaming stuff to RC branch
--Goober5000
2006-07-20 00:41:26 +00:00
taylor 1d4dc00caa make glow point banks dynamic 2006-07-17 01:12:52 +00:00
taylor 97a933c789 make glow point banks dynamic 2006-07-17 01:12:52 +00:00
taylor af69ee6e72 fix some missile autocentering issues
- use MR_AUTOCENTER and MR_IS_MISSILE flags to generate an autocenter for a missile if one doesn't already exist
 - don't try to autocenter loadout icons when rendered 3d
2006-07-17 01:12:19 +00:00
taylor ec0737f8d5 fix some missile autocentering issues
- use MR_AUTOCENTER and MR_IS_MISSILE flags to generate an autocenter for a missile if one doesn't already exist
 - don't try to autocenter loadout icons when rendered 3d
2006-07-17 01:12:19 +00:00
taylor 054c8ce2a9 maybe this will finally shut-up some of the people who have complained about certain mipmap issues 2006-07-17 01:11:32 +00:00
taylor 700a4958e3 maybe this will finally shut-up some of the people who have complained about certain mipmap issues 2006-07-17 01:11:32 +00:00
taylor a94e8277dd only do i2fl() on the font bitmap once per string rather than doing it per-letter (basically unnoticable performance boost)
before doing alpha channel check, make sure the bitmap is valid, since it doesn't actually catch that until later in the texture code
2006-07-17 01:10:45 +00:00
taylor 8088a2c1f1 only do i2fl() on the font bitmap once per string rather than doing it per-letter (basically unnoticable performance boost)
before doing alpha channel check, make sure the bitmap is valid, since it doesn't actually catch that until later in the texture code
2006-07-17 01:10:45 +00:00
Goober5000 cf096fa72c move WMC's preload stuff into main preloader routine 2006-07-17 00:50:00 +00:00
Goober5000 81e673a95e move WMC's preload stuff into main preloader routine 2006-07-17 00:50:00 +00:00
Goober5000 2fef2ff159 stage 2 of animation fix (add base frame time to each ship)
--Goober5000
2006-07-17 00:10:05 +00:00
Goober5000 2474793439 stage 2 of animation fix (add base frame time to each ship)
--Goober5000
2006-07-17 00:10:05 +00:00
taylor 9ed682409e missed the extern apparently 2006-07-15 18:16:00 +00:00
taylor 22907ea0f6 missed the extern apparently 2006-07-15 18:16:00 +00:00
taylor 12d62ce9d1 we probably need to be processing the number of weapons here rather than the number of ships ;) (Mantis bug #988) 2006-07-15 15:51:19 +00:00
taylor dbee87ea60 we probably need to be processing the number of weapons here rather than the number of ships ;) (Mantis bug #988) 2006-07-15 15:51:19 +00:00
taylor 37efd9ffbd change clamp mode for font/interface graphics, don't want the border factored in for scaling/filtering 2006-07-15 06:11:27 +00:00
taylor 9daca5f555 change clamp mode for font/interface graphics, don't want the border factored in for scaling/filtering 2006-07-15 06:11:27 +00:00
taylor b929cdf9da add missing stub for game_get_overall_frametime() 2006-07-14 03:50:31 +00:00
taylor 4156a66300 add missing stub for game_get_overall_frametime() 2006-07-14 03:50:31 +00:00
taylor c8d20207d3 fix for animated texture map issues (*part one*), this should be faster than before too, and fix inf-loop/div-by-0 issues 2006-07-13 22:16:38 +00:00
taylor d6d6f62c4a change compiler optimizations a little for release builds, use "Maximize Speed" setting, since it's basically using debug optimizations otherwise 2006-07-13 22:16:09 +00:00
taylor d59c2457df fix for network afterburner support, this one should be compatible with all previous versions 2006-07-13 22:15:37 +00:00
taylor 3c8c423560 handle non-MVE movies a bit better in OpenGL (don't get freaky with the window, don't lose input, etc.)
some cleanup to OpenGL window handling, to fix min/max/full issues, and try to make shutdown a little nicer
2006-07-13 22:15:02 +00:00
taylor 41246c7e7f fix for animated texture map issues (*part one*), this should be faster than before too, and fix inf-loop/div-by-0 issues 2006-07-13 22:11:37 +00:00
taylor 80cd5ac768 change compiler optimizations a little for release builds, use "Maximize Speed" setting, since it's basically using debug optimizations otherwise 2006-07-13 22:09:21 +00:00
taylor 186bd01305 fix for network afterburner support, this one should be compatible with all previous versions 2006-07-13 22:08:10 +00:00
taylor a7282eca38 handle non-MVE movies a bit better in OpenGL (don't get freaky with the window, don't lose input, etc.)
some cleanup to OpenGL window handling, to fix min/max/full issues, and try to make shutdown a little nicer
2006-07-13 22:06:38 +00:00
Goober5000 220590f1c1 * better formatting for substitute music options
* better handling of all special FSO comment tags
--Goober5000
2006-07-13 06:11:52 +00:00
Goober5000 074ec7d451 * better formatting for substitute music options
* better handling of all special FSO comment tags
--Goober5000
2006-07-13 06:11:52 +00:00
Goober5000 1f1ab5b31a prevent labels from overlapping widgets 2006-07-13 06:10:22 +00:00
Goober5000 32092818e1 prevent labels from overlapping widgets 2006-07-13 06:10:22 +00:00
taylor bb2aebf8b6 fix the endless-loop fix ;) (this is what broke shield recharging btw) 2006-07-12 04:59:03 +00:00
taylor 29a249d40b fix the endless-loop fix ;) (this is what broke shield recharging btw) 2006-07-12 04:59:03 +00:00
karajorma b54d3c950e Fix afterburner trails in multiplayer (Mantis 895) 2006-07-11 23:17:03 +00:00
karajorma 270b84981e Fix afterburner trails in multiplayer (Mantis 895) 2006-07-11 23:17:03 +00:00
taylor 8d95256fcf fix undo system
restore the two autosave points that got removed for some reason (yes, these are needed for things to work properly)
2006-07-10 21:48:33 +00:00
taylor 5ab8bd70f3 fix undo system
restore the two autosave points that got removed for some reason (yes, these are needed for things to work properly)
2006-07-10 21:48:33 +00:00
Goober5000 b111603f17 bah, make sure we're in the correct mode 2006-07-09 06:12:37 +00:00
Goober5000 5a88708ab6 bah, make sure we're in the correct mode 2006-07-09 06:12:37 +00:00
Goober5000 fa2b62c6ae tweak max speed function
--Goober5000
2006-07-09 06:07:20 +00:00
Goober5000 78e9970fc3 tweak max speed function
--Goober5000
2006-07-09 06:07:20 +00:00
Goober5000 3e2d3b9940 fix INF builds 2006-07-09 04:05:43 +00:00
Goober5000 b5b5fba6e7 ugh... FS2_VOICER isn't actually defined at this point, for some reason... but it looks like phrases.cfg will always be generated, so it should be okay to take these #ifdefs out
--Goober5000
2006-07-09 03:18:15 +00:00
Goober5000 3e459b889b ugh... FS2_VOICER isn't actually defined at this point, for some reason... but it looks like phrases.cfg will always be generated, so it should be okay to take these #ifdefs out
--Goober5000
2006-07-09 03:18:15 +00:00
Goober5000 903a5ab217 this shouldn't actually be in CVS; it's produced during the build process
--Goober5000
2006-07-09 02:36:05 +00:00
Goober5000 766810d06f this shouldn't actually be in CVS; it's produced during the build process
--Goober5000
2006-07-09 02:36:05 +00:00
Goober5000 782231cfbe consolidate the "for reals" crap into a proper ship flag; also move the limbo flags over to SF2_*; etc.
this should fix Mantis #977
--Goober5000
2006-07-09 01:55:42 +00:00
Goober5000 488ab9a5dc iff defs should allow specification of both flag fields
--Goober5000
2006-07-08 19:36:04 +00:00
Goober5000 25e33a5b14 iff defs should allow specification of both flag fields
--Goober5000
2006-07-08 19:36:04 +00:00
taylor 2951a8d5ed remove -allslev
make CTRL-SHIFT-S hotkey work in mission simulator (it's a toggle, so you can turn it on or off while on the screen)
fix a bug where blank lines would show up in the campaign list for branch/alternate type missions that are otherwise marked as not completed
2006-07-08 18:11:33 +00:00
taylor 8cf1e32c50 remove -allslev
make CTRL-SHIFT-S hotkey work in mission simulator (it's a toggle, so you can turn it on or off while on the screen)
fix a bug where blank lines would show up in the campaign list for branch/alternate type missions that are otherwise marked as not completed
2006-07-08 18:11:33 +00:00
taylor 4a867fe2bc require OpenAL 1.1 under Windows, I think it's causing problems for us to mix users with 1.0 and builds for 1.1
(having 1.0 is fatal to sound, but the game should still work, a corresponding Launcher change goes with this too)
clean up some of the error messages to not say "DirectSound" is doing this or that, just say "Audio" instead
2006-07-08 18:10:59 +00:00
taylor 89d0205fae require OpenAL 1.1 under Windows, I think it's causing problems for us to mix users with 1.0 and builds for 1.1
(having 1.0 is fatal to sound, but the game should still work, a corresponding Launcher change goes with this too)
clean up some of the error messages to not say "DirectSound" is doing this or that, just say "Audio" instead
2006-07-08 18:10:59 +00:00
taylor 29e712a23c debug-build-only issue, make sure that thrusters are properly enabled if needed for POF based weapons when using cheat keys 2006-07-08 11:30:40 +00:00
taylor 03dfd9ead2 debug-build-only issue, make sure that thrusters are properly enabled if needed for POF based weapons when using cheat keys 2006-07-08 11:30:40 +00:00
taylor eaeb6f61a2 hopefully this should get missile viewing working decently again 2006-07-08 11:30:13 +00:00
taylor 6325477b95 hopefully this should get missile viewing working decently again 2006-07-08 11:30:13 +00:00
Goober5000 b31ffe24a2 fix for Mantis #967
--Goober5000
2006-07-08 04:53:29 +00:00
Goober5000 87b5aea986 fix for Mantis #967
--Goober5000
2006-07-08 04:53:29 +00:00
taylor 6d36280c60 make sure to reset the optional maps after each buffer render (little scary that this wasn't noticed a long time ago) 2006-07-07 16:26:44 +00:00
taylor e66d588408 make sure to reset the optional maps after each buffer render (little scary that this wasn't noticed a long time ago) 2006-07-07 16:26:44 +00:00
Goober5000 485a17fac8 fixed something that slipped by taylor ;)
(caused by having extra flags in the main branch)
--Goober5000
2006-07-07 01:45:57 +00:00
karajorma 3fbe1d8bda Fix for Mantix #959. Campaign editor shouldn't crash on finding an empty mission list any more. 2006-07-06 23:48:43 +00:00
karajorma a79a4f21f3 Fix for Mantix #959. Campaign editor shouldn't crash on finding an empty mission list any more. 2006-07-06 23:48:43 +00:00
taylor 731a010311 some better handling of OpenAL errors during init 2006-07-06 22:02:11 +00:00
taylor 7e1f6837c9 add some minor error catches for invalid values 2006-07-06 22:01:50 +00:00
taylor 58f84d718f more big-endian fixage (seriously hope this is the last of it) 2006-07-06 22:01:26 +00:00
taylor 0c0a8d67a6 rest of the map/glow changes
- put glowmap activity back on a per-ship basis (via a SF2_* flag) rather than per-model
 - same for glowpoints, back on a per-ship basis
 - put specmaps and bumpmap back on a LOD0 and LOD1 affect (got changed to LOD0 only recently)
 - fix glowmaps for shockwaves again
 - add support for animated specmaps (mainly for TBP and Starfox mods)
some minor code cleanup and compiler warning fixes
2006-07-06 22:00:39 +00:00
taylor 9422e48dab add a render option to make the model not spin around, easier to work with in some cases, and better screenshots 2006-07-06 21:59:34 +00:00
taylor 6d451fb9cb newline fixage 2006-07-06 21:59:12 +00:00
taylor 6205a0d053 some better handling of OpenAL errors during init 2006-07-06 21:56:18 +00:00
taylor f60885578e add some minor error catches for invalid values 2006-07-06 21:55:38 +00:00
taylor f7e4a683a8 more big-endian fixage (seriously hope this is the last of it) 2006-07-06 21:54:59 +00:00
taylor 2e28cb4907 rest of the map/glow changes
- put glowmap activity back on a per-ship basis (via a SF2_* flag) rather than per-model
 - same for glowpoints, back on a per-ship basis
 - put specmaps and bumpmap back on a LOD0 and LOD1 affect (got changed to LOD0 only recently)
 - fix glowmaps for shockwaves again
 - add support for animated specmaps (mainly for TBP and Starfox mods)
some minor code cleanup and compiler warning fixes
2006-07-06 21:53:59 +00:00
taylor 112b47f993 add a render option to make the model not spin around, easier to work with in some cases, and better screenshots 2006-07-06 21:49:12 +00:00
taylor 436e19ef5a newline fixage 2006-07-06 21:47:38 +00:00
Goober5000 483e9029b8 fix ship type bug that Taylor mentioned
--Goober5000
2006-07-06 21:24:36 +00:00
Goober5000 98fa770cfb fix ship type bug that Taylor mentioned
--Goober5000
2006-07-06 21:24:36 +00:00
Goober5000 78f02e76ca add CVS headers
--Goober5000
2006-07-06 21:23:28 +00:00
Goober5000 14c496e623 add CVS headers
--Goober5000
2006-07-06 21:23:28 +00:00
Goober5000 b72ed12c0c remove obsolete (and hackish) flag
--Goober5000
2006-07-06 21:00:13 +00:00
Goober5000 44c324a000 WCS screaming stuff
--Goober5000
2006-07-06 20:46:39 +00:00
Goober5000 c042766e76 fix dumb endless loop bug
--Goober5000
2006-07-06 18:19:59 +00:00
Goober5000 0414ad2309 fix dumb endless loop bug
--Goober5000
2006-07-06 18:19:59 +00:00
Goober5000 1725dd0158 fix subtle change from retail... dunno if it's a bug, but best to stay on the safe side
--Goober5000
2006-07-06 06:04:51 +00:00
Goober5000 79b96dff27 fix subtle change from retail... dunno if it's a bug, but best to stay on the safe side
--Goober5000
2006-07-06 06:04:51 +00:00
Goober5000 f2637d6a3e fix for Mantis #856
--Goober5000
2006-07-06 05:35:13 +00:00
Goober5000 95ba7be2a4 fix for Mantis #856
--Goober5000
2006-07-06 05:35:13 +00:00
Goober5000 dd0d0b330c commented annoying redundant warnings
--Goober5000
2006-07-06 05:29:57 +00:00
Goober5000 6a7c3c3551 commented annoying redundant warnings
--Goober5000
2006-07-06 05:29:57 +00:00
Goober5000 e66b834622 fix a couple of typos
--Goober5000
2006-07-06 04:26:00 +00:00
Goober5000 cc1993aa73 GAH - repair a borked commit (plus a couple of typos)
--Goober5000
2006-07-06 04:20:34 +00:00
Goober5000 eae62591ce 1) complete (almost) changeover to reorganized texture mapping system
2) finally fix texture animation; textures now animate at the correct speed
--Goober5000
2006-07-06 04:06:04 +00:00
Goober5000 2a5b51cd9b 1) complete (almost) changeover to reorganized texture mapping system
2) finally fix texture animation; textures now animate at the correct speed
--Goober5000
2006-07-06 04:06:04 +00:00
Goober5000 e6b4bf3552 fix for Mantis #571
--Goober5000/Backslash
2006-07-05 23:48:20 +00:00
Goober5000 0f271615d4 fix for Mantis #571
--Goober5000/Backslash
2006-07-05 23:48:20 +00:00
Goober5000 54060c0799 spelling 2006-07-05 23:41:43 +00:00
Goober5000 02063b10ea spelling 2006-07-05 23:41:43 +00:00
Goober5000 392727d494 cvs comment tweaks 2006-07-05 23:37:13 +00:00
Goober5000 ab19abcb21 cvs comment tweaks 2006-07-05 23:37:13 +00:00
Goober5000 02e512e78a forgot this yesterday 2006-07-04 22:22:52 +00:00
Goober5000 813905bc77 forgot this yesterday 2006-07-04 22:22:52 +00:00
Goober5000 e293e62be2 unremove the storybook for now, but it will probably be replaced with a more complete version in a week
--Goober5000
2006-07-04 16:10:48 +00:00
Goober5000 698af681d9 --in preparation for fixing an annoying animated texture bug, reorganize the various texture structs and glow point structs and clarify several parts of the texture code :P
--this breaks animated glow maps, and animated regular maps still aren't fixed, but these will be remedied shortly
--Goober5000
2006-07-04 07:42:50 +00:00
Goober5000 f669cad916 --in preparation for fixing an annoying animated texture bug, reorganize the various texture structs and glow point structs and clarify several parts of the texture code :P
--this breaks animated glow maps, and animated regular maps still aren't fixed, but these will be remedied shortly
--Goober5000
2006-07-04 07:42:50 +00:00
Goober5000 861fcaf008 remove the storybook for now 2006-07-04 07:36:25 +00:00
karajorma 10ac557a64 Restore the Hostile Warning triangles and the "On your Six" warning messages. 2006-07-02 22:53:53 +00:00
karajorma 350951d51d Restore the Hostile Warning triangles and the "On your Six" warning messages. 2006-07-02 22:53:53 +00:00
Goober5000 74ef65337e bah 2006-07-02 04:13:43 +00:00
Goober5000 2ede9a497e remove associated AI flags
--Goober5000
2006-07-02 03:39:55 +00:00
Goober5000 e677f2d303 remove associated AI flags
--Goober5000
2006-07-02 03:39:55 +00:00
Goober5000 475a7302d8 okay, I have no idea what I was doing there
--Goober5000
2006-07-02 03:34:16 +00:00
Goober5000 1df962c6a1 okay, I have no idea what I was doing there
--Goober5000
2006-07-02 03:34:16 +00:00
Goober5000 e9410759a5 fix the "Game of TAG" bug; hopefully this won't unfix something else
--Goober5000
2006-07-01 00:30:51 +00:00
Goober5000 086e937986 fix the "Game of TAG" bug; hopefully this won't unfix something else
--Goober5000
2006-07-01 00:30:51 +00:00
Goober5000 a6e3254201 restore compatibility with retail ship types
--Goober5000
2006-06-28 00:46:00 +00:00
Goober5000 deced830be restore compatibility with retail ship types
--Goober5000
2006-06-28 00:46:00 +00:00
taylor bb604ce93c add in Goober's new files 2006-06-27 16:53:36 +00:00
taylor a047427f83 account for some minor floating point error in the undock speed check 2006-06-27 05:10:02 +00:00
taylor a8be2f7ffa fix various compiler warnings and things that Valgrind complained about 2006-06-27 05:07:49 +00:00
taylor f69d117fad make sure we don't process cmeasure homing more than once (this should also fix the incompatible network packet)
fix flag check to be sure that we properly detonate missiles tracking cmeasures
2006-06-27 05:06:39 +00:00
taylor af334437ce we don't use alc functions here so no real need for the header 2006-06-27 05:06:05 +00:00
taylor 1b9c052f8b make sure we only do ship related setup on actual ships 2006-06-27 05:05:18 +00:00
taylor 17bd1b8c8a 32-bit PCX conversion doesn't do a bit swizzle so be sure we get the transparent pixel right in the first place to avoid the green 2006-06-27 05:04:43 +00:00
taylor 92cfcaee76 try to allow RAS VPN connects since they probably aren't dial-up and shouldn't be seen as such 2006-06-27 05:04:16 +00:00
taylor 9bb9092f52 fix so that multiple FBOs can be used with different sizes (plus a few other minor adjustments)
fix various things that Valgrind complained about
2006-06-27 05:03:42 +00:00
taylor 52ad5962ee add -disable_fbo option to help troubleshoot crappy ATI drivers
address a strange resize error that triggers an Assert() in the texture code with mipmaps
2006-06-27 05:02:22 +00:00
taylor e0e40646be be sure to properly reset fullscreen/minimized state vars as we switch between them
remove the temporary -alpha_alpha_blend option
fix screenshots on big endian
fix various things that Valgrind complained about
2006-06-27 05:00:57 +00:00
taylor e73bab92fc sync up current OpenAL changes
- "SoundDeviceOAL" reg option for user specified sound device (used instead of "Soundcard" for OpenAL)
 - reset current context when we are leaving, may be leaving drivers in a bad state, and it hasn't hung up in quite a while
 - if sound card (which DS or OAL) is set to "no sound" then be sure to disable both sound and music
fix various things that Valgrind complained about
make sure we can report both AL and ALC errors
fix for ds_get_free_channel(), it shouldn't return -1 on an AL error
2006-06-27 04:58:58 +00:00
taylor 64ff06536d add -disable_fbo to troubleshoot crappy ATI drivers
remove the temporary -alpha_alpha_blend option
tack on an extra byte to the flags.lch file so that the launcher can easily detect if it's an OpenAL build or not
2006-06-27 04:55:53 +00:00
taylor 8b20939b60 fix various things that Valgrind complained about
comp_type for DDS images will always be set to something, an 'uncompressed' type at the least
2006-06-27 04:52:50 +00:00
taylor 0a784bbd39 add/remove files so that 'make dist' works again 2006-06-27 04:50:59 +00:00
taylor 9c89a62c52 bump package version 2006-06-27 04:50:33 +00:00
taylor 6f84b6b53f add in Goober's new files 2006-06-27 04:22:26 +00:00
taylor a09254c656 account for some minor floating point error in the undock speed check 2006-06-27 04:22:03 +00:00
Goober5000 c28c7c0f31 add new files to project 2006-06-27 04:12:27 +00:00
Goober5000 f77222a2c9 add new files to project 2006-06-27 04:12:27 +00:00
Goober5000 afe05a68bc bah 2006-06-27 04:10:50 +00:00
Goober5000 cd509e678a cvs header tweak
--Goober5000
2006-06-27 04:10:49 +00:00
Goober5000 fa598d6103 handle docked objects during death roll
--Goober5000
2006-06-27 04:10:48 +00:00
Goober5000 3fe06349cc handle docked objects during death roll
--Goober5000
2006-06-27 04:10:48 +00:00
Goober5000 b6624808bb fix comment in preparation for code commit
--Goober5000
2006-06-27 03:55:22 +00:00
Goober5000 533e63a2e2 fix comment in preparation for code commit
--Goober5000
2006-06-27 03:55:22 +00:00
taylor 0b98338e1e Repeat after me: "Test build before/after commit.", "Test build before/after commit."
(there's no reason this should have happened for yet a third time in as many weeks)
2006-06-27 03:10:26 +00:00
Goober5000 d4aaa1c4e0 change back to ubyte
--Goober5000
2006-06-27 02:52:36 +00:00
Goober5000 aac9ea448d slight optimization
--Goober5000
2006-06-27 02:48:41 +00:00
Goober5000 6a35ab8a33 slight optimization
--Goober5000
2006-06-27 02:38:49 +00:00
Goober5000 dbd19036cb change back to ubyte
--Goober5000
2006-06-26 17:31:49 +00:00
wmcoolmon b2e3860b2e New function for scripting 2006-06-24 20:39:57 +00:00
wmcoolmon 04e6659cbd Fix loadTexture; fix subsystem indexing; fix getNum() for weaponbanktype; improve missing function error reporting when using LUA_INDEXER 2006-06-24 20:38:36 +00:00
wmcoolmon eadf29ca43 Fix loadTexture; fix subsystem indexing; fix getNum() for weaponbanktype; improve missing function error reporting when using LUA_INDEXER 2006-06-24 20:38:36 +00:00
wmcoolmon 7708c2826b New function for scripting 2006-06-24 20:32:00 +00:00
Goober5000 1136985455 doh! sorry for blaming this on you, WMC
--Goober5000
2006-06-24 18:02:02 +00:00
Goober5000 9bba0837b4 doh! sorry for blaming this on you, WMC
--Goober5000
2006-06-24 18:02:02 +00:00
Goober5000 3a541ceba6 cosmetics, plus revert an unnecessary if 2006-06-24 04:48:08 +00:00
Goober5000 37bd283658 cosmetics, plus revert an unnecessary if 2006-06-24 04:48:08 +00:00
Goober5000 0e8cbab7b2 make ai-chase-any-except default to ai-chase-any
(since it never really worked properly in the first place)
--Goober5000
2006-06-24 01:54:08 +00:00
Goober5000 25f04f4aab make ai-chase-any-except revert to ai-chase-any
(since it never really worked properly in the first place)
--Goober5000
2006-06-24 01:53:53 +00:00
karajorma d509f1acd5 Should be here too 2006-06-23 16:16:59 +00:00
karajorma de4fd87480 Was feeling left out :) 2006-06-23 16:08:55 +00:00
Goober5000 0d7528373d change build names here too
--Goober5000
2006-06-23 13:44:28 +00:00
Goober5000 88b9cd9aea make the 3.6.9 branch create appropriately-named builds
--Goober5000
2006-06-23 13:39:48 +00:00
karajorma 80090714ad Make the ambient light sliders actually save their settings. 2006-06-23 09:17:02 +00:00
karajorma bc8dc6db9a Make the ambient light sliders actually save their settings. 2006-06-23 09:17:02 +00:00
taylor 825e394523 be sure to properly reset fullscreen/minimized state vars as we switch between them 2006-06-23 09:01:07 +00:00
wmcoolmon c68ec3ec7a Remove Assert, should be caught by aforementioned warning 2006-06-23 04:57:09 +00:00
wmcoolmon 17abb414d7 Change an Assert to a more verbose Warning, in the case of issues restoring a red alert ship. Also, try and get some backup allocation of weapons in. 2006-06-23 04:56:31 +00:00
taylor fc765d5e29 fix various things that Valgrind has been complaining about 2006-06-22 14:59:45 +00:00
taylor 8d84c36c72 make sure we only do ship related setup on actual ships 2006-06-20 20:04:42 +00:00
taylor fb11c6d1bd as a temporary measure, until I can figure out what is going on here:
- disable depth buffer for RTT, may be causing the ATI issues, should work ok without it for most things
  - disable mipmap generation for RTT, something strange is going on there, it's sometimes making black mipmap levels (even for the same texture)
2006-06-19 22:50:58 +00:00
taylor 794fd78136 yeah, I'm not at the top of my game today ;) 2006-06-18 23:38:06 +00:00
taylor 9312a16472 address a strange resize error that triggers an Assert() in the texture code with mipmaps 2006-06-18 23:34:55 +00:00
taylor 9b4f15aa04 32-bit PCX conversion doesn't do a bit swizzle so be sure we get the transparent pixel right in the first place to avoid the green 2006-06-18 23:32:29 +00:00
taylor 19829284fe fix screenshots on big endian 2006-06-18 20:09:03 +00:00
taylor 55c759587b well, that was actually pretty stupid of me :) 2006-06-18 20:08:27 +00:00
taylor 1adc58f445 add a -disable_fbo troubleshooting option for those ATI users having trouble with FBOs, but can still use envmapping otherwise 2006-06-18 17:21:49 +00:00
taylor 4d48cb0d8f always try to use a mission specified envmap over the static-generated envmap (missed this commit a while ago) 2006-06-18 17:20:32 +00:00
taylor b53d7081ff various compiler warning fixes 2006-06-18 16:54:36 +00:00
taylor f4decb31df make sure we don't process cmeasure homing more than once (this should also fix the incompatible network packet)
fix flag check to be sure that we properly detonate missiles tracking cmeasures
2006-06-18 16:53:59 +00:00
taylor a34707fbe4 make sure we can report both AL and ALC errors
fix for ds_get_free_channel(), it shouldn't return -1 on an AL error
2006-06-18 16:52:04 +00:00
taylor b165c156bc we don't use alc functions here so no real need for the header 2006-06-18 16:50:19 +00:00
taylor 4d5d947451 fix so that multiple FBOs can be used with different sizes (plus a few other minor adjustments) 2006-06-18 16:49:40 +00:00
taylor 72b1ac3e34 bump package version
add/remove files so that 'make dist' works again
2006-06-18 16:48:29 +00:00
taylor 3b0e23ccd5 apparently missed this commit a month or so ago with the other OS X fixes 2006-06-15 23:33:53 +00:00
Goober5000 bc0e318b13 make warpout work properly even if the player is docked to something
--Goober5000
2006-06-15 06:18:43 +00:00
Goober5000 d5ce83425a make warpout work properly even if the player is docked to something
--Goober5000
2006-06-15 06:18:43 +00:00
wmcoolmon 0a20ebff53 Mantis Bug 0000947: Ahh, so that's what this was for :P 2006-06-15 04:20:13 +00:00
Goober5000 12f510157e this is kinda superfluous 2006-06-15 01:36:01 +00:00
Goober5000 18ba481f9c this is kinda superfluous 2006-06-15 01:36:01 +00:00
Goober5000 c16748d602 version bumpage 2006-06-15 01:35:11 +00:00
Goober5000 97e195477b version bumpage 2006-06-15 01:35:11 +00:00
Goober5000 b0093c5932 tweaked the version string
--Goober5000
2006-06-15 01:29:25 +00:00
Goober5000 1c9d8e3953 tweaked the version string
--Goober5000
2006-06-15 01:29:25 +00:00
Goober5000 5c3b0d6227 better handling for 'G' key press
--Goober5000
2006-06-15 00:47:21 +00:00
Goober5000 9edc70ec5b better handling for 'G' key press
--Goober5000
2006-06-15 00:47:21 +00:00
taylor 8ad58cd677 remove previous attempts at the Y bug fix, it's now back to the retail code for that 2006-06-15 00:37:11 +00:00
taylor 1a2338b424 fix Assert() on value of face variable, it should be able to be -1 for non-cubemap images 2006-06-15 00:36:33 +00:00
taylor 0b519a904c remove previous attempts at the Y bug fix, it's now back to the retail code for that 2006-06-15 00:16:23 +00:00
taylor f9615c21e8 fix Assert() on value of face variable, it should be able to be -1 for non-cubemap images 2006-06-15 00:15:17 +00:00
Goober5000 ba9461933e remove /Og switch 2006-06-14 22:33:41 +00:00
Goober5000 ee2327b17f remove /Og switch 2006-06-14 22:33:41 +00:00
wmcoolmon 3749f60447 Hopefully fix compilation 2006-06-14 01:33:37 +00:00
taylor b82223a18f sync up current OpenAL changes
- "SoundDeviceOAL" reg option for user specified sound device (used instead of "Soundcard" for OpenAL)
 - reset current context when we are leaving, may be leaving drivers in a bad state, and it hasn't hung up in quite a while
 - if sound card (which DS or OAL) is set to "no sound" then be sure to disable both sound and music
2006-06-12 03:40:26 +00:00
taylor 09c9a73ca9 try to allow RAS VPN connects since they probably aren't dial-up and shouldn't be seen as such 2006-06-12 03:38:15 +00:00
taylor ca5b63540d sync current OGL changes:
- go back to using minimize mode which non-active, but doin't minimize when Fred_running
 - remove temporary cmdline options (-spec_scale, -env_scale, -alpha_alpha_blend)
 - change FBO renderbuffer link around a little to maybe avoid freaky drivers (or freaky code)
2006-06-12 03:37:24 +00:00
taylor f1e28f5582 bump version to 3.6.9 2006-06-12 03:34:46 +00:00
taylor 02e0298ce7 remove temporary cmdline options (-spec_scale, -env_scale, -alpha_alpha_blend)
tack on an extra byte to the flags.lch file so that the launcher can easily detect if it's an OpenAL build or not
2006-06-12 03:34:18 +00:00
wmcoolmon ed00528796 Tweak events support; fix a few of Wanderer's bugs; begin model support 2006-06-12 02:33:34 +00:00
wmcoolmon 1d0ce0d990 Tweak events support; fix a few of Wanderer's bugs; begin model support 2006-06-12 02:33:34 +00:00
wmcoolmon 764168cd30 Oh wait, I can just do this 2006-06-10 21:31:14 +00:00
wmcoolmon a0a3778417 Fix attempt #2 for mantis bug 0000900 2006-06-10 21:22:57 +00:00
Goober5000 af3e9a9f82 fix parsing/handling of debriefing persona indexes
--Goober5000
2006-06-10 18:35:05 +00:00
Goober5000 a52f5ed6c7 fix parsing/handling of debriefing persona indexes
--Goober5000
2006-06-10 18:35:05 +00:00
wmcoolmon af9110b919 Scripting support for events/directives 2006-06-08 09:13:45 +00:00
Goober5000 f8bfa23716 update credits 2006-06-08 06:48:13 +00:00
Goober5000 9c4f104283 update credits 2006-06-08 06:48:13 +00:00
karajorma dea7ded00e Allow Change-Ship-Class to affect ships which haven't arrived yet (For BHX) 2006-06-07 20:50:56 +00:00
karajorma 38b5b93b7f Allow Change-Ship-Class to work with ships which haven't arrived yet (For BHX) 2006-06-07 20:47:53 +00:00
karajorma 24f8898ada Fix bug with multiple uses of change-ship-class SEXP 2006-06-07 20:45:11 +00:00
karajorma 384b52f394 Limbo flag support; further scripting 3.6.9 update 2006-06-07 20:25:10 +00:00
karajorma 23275b6972 Fix 130 ships limit for Inferno builds 2006-06-07 18:47:51 +00:00
wmcoolmon b144c7ff60 Fix the getScreenCoords function. 2006-06-07 07:49:43 +00:00
wmcoolmon d187e18952 Fix the getScreenCoords function. 2006-06-07 07:41:16 +00:00
wmcoolmon 8d0fc6455d Not sure why I didn't catch this when compiling earlier... 2006-06-07 05:20:52 +00:00
wmcoolmon 01fce625a6 Move fog disappearance factor to objecttypes.tbl 2006-06-07 05:19:49 +00:00
wmcoolmon beab863f0b Link in some scripting limbo support 2006-06-07 05:01:57 +00:00
wmcoolmon 1223757630 Pass to get any files that I missed 2006-06-07 04:49:20 +00:00
wmcoolmon 53a7b35411 Limbo flag support; removed unneeded muzzle flash flag 2006-06-07 04:48:38 +00:00
wmcoolmon 4e9f367f28 Begin multi-turret-guns toggle work 2006-06-07 04:45:55 +00:00
wmcoolmon b5dcf61380 Limbo flag support 2006-06-07 04:44:57 +00:00
wmcoolmon 96a6739a87 Limbo flag support; fix scripting debug bug 2006-06-07 04:43:38 +00:00
wmcoolmon 8d07c05e9d Limbo flag support; further scripting 3.6.9 update 2006-06-07 04:42:22 +00:00
wmcoolmon 2810fe4d4c Limbo flag support 2006-06-07 04:39:56 +00:00
wmcoolmon 6566db188c Limbo flag support, even for as-yet-unused code :P 2006-06-07 04:38:29 +00:00
wmcoolmon 3fe9b96c46 "Limbo" flag support 2006-06-07 04:37:36 +00:00
wmcoolmon d4bc2bd95a Fix muzzleflashes for non-flak weapons. Begin commit of limbo code. 2006-06-07 04:36:52 +00:00
wmcoolmon da11619f8e Scripting system prep for 3.6.9 2006-06-07 03:54:29 +00:00
wmcoolmon 983626fe5b Scripting system prep for 3.6.9 2006-06-07 03:54:29 +00:00
wmcoolmon 3e24382662 Revert changes 2006-06-07 03:49:36 +00:00
wmcoolmon 565d6bab83 Scripting system prep for 3.6.9 2006-06-07 03:36:19 +00:00
wmcoolmon fbd02e5fe8 Scripting system prep for 3.6.9 2006-06-07 03:23:15 +00:00
wmcoolmon b58c79b75d Scripting system prep for 3.6.9 2006-06-07 03:23:15 +00:00
wmcoolmon ad54fdf805 According to wikipedia, true does not equal false. Hopefully, this doesn't break backwards compatibility :P 2006-06-07 02:28:13 +00:00
wmcoolmon 231e720ecf Various sscripting fixes/updates; a couple new functions; esp. for mantis bug 0000893 2006-06-07 02:24:58 +00:00
taylor 39548d052b properly initialize a few entries that were left zero'd by mistake 2006-06-06 00:00:00 +00:00
taylor 57c1c8cc47 properly initialize a few entries that were left zero'd by mistake 2006-06-06 00:00:00 +00:00
taylor 326788332a don't Int3() here, it's actually going to happen in some cases when using -img2dds 2006-06-05 23:59:33 +00:00
taylor 14d8f50598 don't Int3() here, it's actually going to happen in some cases when using -img2dds 2006-06-05 23:59:33 +00:00
taylor 44f9b71191 this should hopefully fix cursor drift on multi-display configs 2006-06-05 23:59:11 +00:00
taylor 22f5ac4e7f this should hopefully fix cursor drift on multi-display configs 2006-06-05 23:59:11 +00:00
wmcoolmon 86544a331d Remove $Collide Ship and $Collide Weapon options from 3.6.9, as these are not finalized 2006-06-04 17:57:00 +00:00
Goober5000 c536623924 change to ASCII 2006-06-04 01:16:41 +00:00
Goober5000 525d42ec38 add fighterbay restriction code
--Goober5000
2006-06-04 01:03:13 +00:00
Goober5000 0742d8e7b2 add fighterbay restriction code
--Goober5000
2006-06-04 01:03:13 +00:00
Goober5000 8a30768d47 add capability for preloading special arguments
NB: it's disabled for now, and it needs to be moved after sexps are parsed to work
--Goober5000
2006-06-04 00:01:48 +00:00
Goober5000 d57d2ee93e add capability for preloading special arguments
NB: it's disabled for now, and it needs to be moved after sexps are parsed to work
--Goober5000
2006-06-04 00:01:48 +00:00
taylor 693a557961 remove init_decals declaration, it's in the header now since we build without decal support 2006-06-03 11:57:13 +00:00
taylor d6574a2e48 remove init_decals declaration, it's in the header now since we build without decal support 2006-06-03 11:57:13 +00:00
Goober5000 d6579e607e project changes for karajorma's fred stuff 2006-06-03 06:56:17 +00:00
taylor 0ebadc1493 be sure that we properly apply light to submodels (mainly for debris), looks *really* bad otherwise 2006-06-03 05:06:38 +00:00
Goober5000 662b6e732b add karajorma's multi callback
--Goober5000
2006-06-03 04:46:39 +00:00
taylor 3e187e0259 change filename case to our standard (lower) 2006-06-02 11:57:15 +00:00
karajorma accdb942b5 Alt Ship Classes inital commit 2006-06-02 09:54:22 +00:00
karajorma 3b7616e6f4 Complete overhaul of how ship loadout is handled to support the use of variables for setting the class and quantity of ships present in loadout. 2006-06-02 09:52:42 +00:00
karajorma 080f0bc571 Added the alt ship class button 2006-06-02 09:48:38 +00:00
karajorma e65a94a6e2 Added the set-class-dynamically and team-loadout-store-status ship flags 2006-06-02 09:47:30 +00:00
karajorma 6f6044d1fe Prevented the modify variable dialog deleting or changing the type of variables which are used in Team Loadout 2006-06-02 09:46:04 +00:00
karajorma c35a73189c Team Loadout from variable changes. Added alt ship classes 2006-06-02 09:40:33 +00:00
taylor b9b62a5630 be sure that we properly apply light to submodels (mainly for debris), looks *really* bad otherwise 2006-06-02 09:40:32 +00:00
karajorma 5c4a2f0c74 Added Team Loadout from variables and alt ship classes changes 2006-06-02 09:39:11 +00:00
karajorma 5130d6a972 *** empty log message *** 2006-06-02 09:36:40 +00:00
karajorma add077ea39 no message 2006-06-02 09:35:29 +00:00
karajorma d9863543f2 Added the Team Loadout Change subcategory
Added the deal-with-ship-loadout SEXP. It's only temporary but it give people an option other than having to roll their own events to fix up loadout at the end of a mission.
Added the num_assists SEXP to complement the num_kills one.
Updated the is-ship-class SEXP so that it can also act as was-ship-class for departed and destroyed ships.
Updated change-ship-class to work with ships that aren't in the mission yet.
Updated sexp_modify_variable to actually do the multiplayer callback that V had noticed was needed but never actually added.
2006-06-02 09:29:13 +00:00
karajorma dbe17daee7 Added the Team Loadout subcategory (Only one SEXP in there at the moment but more will come).
Added the num_assists SEXP to complement the num_kills one
2006-06-02 09:20:06 +00:00
(no author) 62cebe8069 This commit was manufactured by cvs2svn to create branch
'fs2_open_3_6_9'.
2006-06-02 09:17:10 +00:00
taylor 8c4dfb2f0a hmm, wonder why I did that? ;) 2006-06-02 09:17:09 +00:00
karajorma 8727fb9dc1 Added the VARIABLE_UPDATE packet to send sexp variable value changes to client machines. 2006-06-02 09:10:02 +00:00
karajorma 41e34ebb02 Team Loadout changes to accept variables names as legitimate values for ship class and quantity in loadout.
Added the new alt class system
2006-06-02 09:06:12 +00:00
karajorma d1f4666aa9 Swaped from stuff_int_list to stuff_ship_list when parsing in a list of ships allowed in the campaign. 2006-06-02 08:59:58 +00:00
karajorma 11027dcb53 Added stuff_ship_list to act as a typesafe replacement for stuff_int_list and handle variables as legitimate values for both ship type and availability when parsing Team Loadout lists 2006-06-02 08:55:47 +00:00
karajorma 140c82e6ed Support for alt ship classes, team loadout flag and changes to Ships_exited. Fixed assertion upon multiple uses of the change-ship-class SEXP. 2006-06-02 08:49:35 +00:00
karajorma e39238d8eb Support for alt ship classes, team loadout flag and changes to Ships_exited 2006-06-02 08:46:47 +00:00
taylor 349ffc664f some more buffer size strangeness (which I still don't understand) that makes certain sound formats not work properly 2006-06-02 08:05:33 +00:00
taylor b7c87f6047 flip color/depth values, appears some are initting software GL again and this was the problem previously 2006-06-01 07:33:59 +00:00
taylor 81dab9c506 make sure to use software device rather than hardware since we don't currently handle source rotation/reuse properly between ds and audiostr code 2006-06-01 07:33:00 +00:00
taylor c85e077369 make sure FORM_ON_WING goal is valid since it works for ships other than player now 2006-06-01 04:47:23 +00:00
taylor 0968449eed put back listener setup for each sound, doesn't make a difference under Linux but it may be hurting Windows for some reason 2006-06-01 04:46:18 +00:00
taylor f78a5d462c a little change to the order here, this should be safer in the long run and avoid some memory issues too 2006-06-01 04:45:19 +00:00
taylor d9ca8734ad fix the scope issues that someone complained about in the forums 2006-06-01 04:44:19 +00:00
taylor 214a41b550 use vm_vec_normalize_safe(), a bit cheap as a fix, but it's really difficult to trace the VECMAT errors back from here 2006-06-01 04:43:49 +00:00
taylor b813983b32 put decals back under an #ifdef, until this is fixed it's just in the way 2006-06-01 04:41:43 +00:00
taylor f3f859d28e be sure to to reset ok_to_fire between weapon checks to make sure we don't count something by mistake 2006-06-01 04:40:41 +00:00
taylor e3f7b75542 render strings a string at a time rather than a letter at the time (should be at least 3 times faster from state changes alone) 2006-05-31 04:02:05 +00:00
taylor b10c96d9e2 bah! this thing is crashing. disable for now until I can figure out what's going on 2006-05-31 04:01:13 +00:00
Goober5000 02739c5393 whoops, didn't mean to commit that 2006-05-31 03:27:19 +00:00
Goober5000 3d73663123 some cosmetic changes in preparation for bay arrival/departure code
--Goober5000
2006-05-31 03:05:43 +00:00
Goober5000 baa5097bca fix compiler warning
--Goober5000
2006-05-31 02:08:22 +00:00
karajorma b74175a102 Got sick of seeing that compiler warning all the time! 2006-05-30 11:20:38 +00:00
Goober5000 741afab9cd fix up CVS headers
--Goober5000
2006-05-30 06:01:05 +00:00
Goober5000 068f05c3ab I should probably add these files too
--Goober5000
2006-05-30 05:58:59 +00:00
Goober5000 a3205a97dc add capability to restrict arrival/departure paths
(FRED only; FS2 implementation to follow)
--Goober5000
2006-05-30 05:37:29 +00:00
taylor aba67f6267 make sure we are locking those vars down in timer_get() to avoid thread issues (may fix hang on "timer rolled" message) 2006-05-30 03:55:09 +00:00
taylor 646e844eb2 z-range for 2D ortho is -1.0 to 1.0, may help avoid some strangeness if we actually get that right. :)
minor cleanup of old code and default settings
try not to bother with depth test unless we are actually going to need it (small performance boost in some cases)
don't clear depth bit in flip(), while technically correct it's also a bit redundant (and comes with a slight performance hit)
2006-05-30 03:53:52 +00:00
Goober5000 f441031018 add substitute music boxes to FRED, and reset music properly when mission is cleared
--Goober5000
2006-05-30 02:13:22 +00:00
Goober5000 f0842a8912 add AI Profile box to FRED
--Goober5000
2006-05-30 01:36:24 +00:00
Goober5000 cf29b0dbd6 add debriefing persona index to fred
--Goober5000
2006-05-30 01:08:10 +00:00
Goober5000 1188449341 removed small redundancy
--Goober5000
2006-05-29 19:14:30 +00:00
Goober5000 9957b565bc add Taylor's compile fix
--Goober5000
2006-05-29 02:02:17 +00:00
taylor 59f2a6039e fix D3D white screen issue 2006-05-28 18:40:37 +00:00
taylor 29bbede6b3 remove DX9 SDK since it's useless to us at this time 2006-05-28 17:57:29 +00:00
taylor f3f0bf9a8b minor safety check 2006-05-27 17:22:04 +00:00
taylor bdd4913020 update proj/view matrix calls to use new values 2006-05-27 17:21:37 +00:00
taylor c9af1ffaef clean up BM_TYPE_* stuff so it's a little easier to tell what is what
bm_load_sub_fast() doesn't need to lowercase filenames, so don't
byte-swap 16-bit DDS on big endian (they still don't look right though)
update bm_has_alpha_channel() to be less dumb
2006-05-27 17:20:48 +00:00
taylor 9296d24dc1 d'oh! that was supposed to be off by default! 2006-05-27 17:18:56 +00:00
taylor 8a05bf08b7 few things:
- comment out that -fixbugs and -nocrash crap, that's just stupid
  - move -env off of the experimental list (since it's working pretty well in OGL)
  - remove -nobeampierce
  - remove -max_subdivide (didn't do anything)
  - remove -rt (didn't do anything, and per-coder cmdline options should never be in CVS)
  - move -cache_bitmaps to game speed rather than graphics
  - add options for env and spec map scaling for envmaps (temporary, to be removed before official 3.6.8)
  - add option for new alpha blend mode so that artists can still test with it but not mess up normal users with the bad MediaVPs
  - remove -d3d_particle (it's obsolete now)
2006-05-27 17:17:57 +00:00
taylor 48bf296ee3 add NO_DIRECT3D support 2006-05-27 17:13:22 +00:00
taylor cdf8c8bdd0 NO_DIRECT3D support
clean up video init stuff to use D3D if specified but always OGL otherwise (using NO_DIRECT3D will force always force OGL)
if video card reg entry can't be found just use OGL rather than getting all freaky on people
change for geometry batcher update
2006-05-27 17:12:44 +00:00
taylor 76617a180d don't setup all of the sound stuff for a mission if sound is disabled 2006-05-27 17:09:43 +00:00
taylor adcb333069 oops! 2006-05-27 17:08:50 +00:00
taylor 72e567a7b9 remove grd3dparticle.* and grd3dbatch.*, they are obsolete
allow us to build without D3D support under Windows (just define NO_DIRECT3D)
clean up TMAP flags
fix a couple of minor OpenGL state change issues with spec and env map rendering
make sure we build again for OS X (OGL extension functions work a little different there)
render targets always need to be power-of-2 to avoid incomplete buffer issues in the code
when we disable culling in opengl_3dunlit be sure that we re-enable it on exit of function
re-fix screenshots
add true alpha blending support (with cmdline for now since the artwork has the catch up)
draw lines with float positioning, to be more accurate with resizing on non-standard resolutions
don't load cubemaps from file for D3D, not sure how to do it anyway
update geometry batcher code, memory fixes, dynamic stuff, basic fixage, etc.
2006-05-27 17:07:48 +00:00
taylor 0341e54f3c only display that "no wavefile for voice" message if sound is enabled 2006-05-27 17:00:02 +00:00
taylor 554197fc30 comment out some code which used only if neither D3D nor OGL 2006-05-27 16:59:05 +00:00
taylor 6bc34644ad comment out the model cache stuff, it's old and not actually used anyway
minor cleanup of some modelinterp.cpp code, to make it more readable
fix tertiary thruster batcher which had the radius value swapped
comment out a couple places where we were doing a D3D or OGL check (it's always true so why bother)
add more support for NO_DIRECT3D so that it can be used on Windows to build without D3D
2006-05-27 16:57:13 +00:00
taylor 43dd50673d lots of little cleanup and minor fixage
make Particles[] dynamic (appears to improve processing speed of two particle functions by about 30%)
move to completely using Bobboau's geometry batcher instead of the stale one that RandomTiger did
little change to PARTICLE_SMOKE to flip UV orient differently, may add some realism, or just look kinda neat
get rid of particle_emit() stuff what was hardcoded for MAX_DETAIL_LEVEL value
2006-05-27 16:52:50 +00:00
taylor eda1a26a94 comment out some pointless checks which look for not using either D3D or OGL
don't run through ships on level load setting up the sound environment if sound is disabled
minor cleanup
2006-05-27 16:49:05 +00:00
taylor 32440a7dbc remove some of the old batcher functions, nothing is using them now anyway
minor cleanup
add orient UV flipping to HTL drawing functions, like retail/non-HTL has support for
2006-05-27 16:47:12 +00:00
taylor f7d89326b0 some minor cleanup
remove -nobeampierce
update for geometry batcher changes
2006-05-27 16:45:11 +00:00
taylor 99a1c64fbb fix slight freakiness with debris vclips (un)loading
comment out some code which was only used if neither D3D or OGL
fix dumb particle_emit() calls
2006-05-27 16:42:16 +00:00
taylor 275c656fd7 remove non-Windows timeSetEvent() functions
make PDWORD and LPDWORD int instead of long (64-bit issue) (thanks Spike)
fix 64-bit ptr issue with OpenAL audio streaming code (thanks Spike)
add start of device enumberation for OpenAL 1.1 (it just lists available devices now)
make sure we open the default OpenAL 1.1 device under Windows
comment out blank listener stuff, this may have been crashing under OS X
add support for AL_BYTE_OFFSET in OpenAL 1.1 for buffer positioning under Windows
2006-05-27 16:39:40 +00:00
taylor 052b22557d remove grd3dparticle.* and grd3dbatch.* since they are obsolete
update to current Xcode project file
update frameworks (header problems) used by OS X version
2006-05-27 16:34:57 +00:00
wmcoolmon bc11c5193e Fix for Mantis bug #0000922 2006-05-24 05:09:25 +00:00
Goober5000 edf5648e70 fix for Mantis #750
--Goober5000
2006-05-21 22:57:30 +00:00
Goober5000 cd488f757d fix Mantis #834
--Goober5000
2006-05-21 03:58:58 +00:00
Goober5000 71d71f1de9 fix for Mantis #827
--Goober5000
2006-05-21 02:12:21 +00:00
Goober5000 1d9d98a2f9 and actually commit the uncorrupted file - grr...
--Goober5000
2006-05-20 03:00:06 +00:00
Goober5000 fc33bcb0b0 try changing the format again
--Goober5000
2006-05-20 02:56:11 +00:00
Goober5000 4448ef1c47 fix for Mantis #755, plus make the missionlog #defines uniform
--Goober5000
2006-05-20 02:03:01 +00:00
Goober5000 376dc3ece9 formatting and clarification, plus fix for Mantis #911
--Goober5000
2006-05-19 04:47:40 +00:00
taylor f431fd8804 fix bool compiler warning for MSVC 2006-05-18 14:56:02 +00:00
Goober5000 0e2d3156db fix for Mantis #875
--Goober5000
2006-05-16 15:54:39 +00:00
karajorma e9ed5f5cb7 Fix the lack of a background in FRED 2006-05-16 12:45:20 +00:00
Goober5000 6925e7c4cb fix directory goof
--Goober5000
2006-05-15 17:42:35 +00:00
karajorma 8d146ea024 no message 2006-05-14 16:02:02 +00:00
karajorma 86522a6452 Checkboxes for locking primary and secondary weapons and for disabling builtin messages from command and individual pilots 2006-05-14 15:57:43 +00:00
karajorma 5e9d27ee72 Fixes for the Targetable-as-bomb error from Mantis 0000910 (amongst others) 2006-05-14 15:54:16 +00:00
karajorma a682577a0e Fixes for the Invulnerability problems from Mantis - 0000910 2006-05-14 15:52:42 +00:00
taylor dc5d21a499 forgot to remove STRICT define before commit, gets rid of a Windows compiler warning 2006-05-14 05:22:43 +00:00
taylor 7a8789e334 OpenGL envmap support
newer OpenGL extension support
add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
add cubemap reading and writing support to DDS loader
fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
add support for a default envmap named "cubemap.dds"
new mission flag "$Environment Map:" to use a pre-existing envmap
minor cleanup of compiler warning messages
get rid of wasteful math from gr_set_proj_matrix()
remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
clean up bmpman flags in reguards to cubemaps and render targets
disable D3D envmap code until it can be upgraded to current level of code
remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
2006-05-13 07:29:52 +00:00
taylor 6b92385163 get rid of some wasteful math for gr_set_proj_matrix() calls
fix check that broke praise of kills for player
fix knossos warpin effect that always seems to get rendered backwards (I couldn't find anything that broke with this but I suppose it's a mod could have an issue)
2006-05-13 07:15:51 +00:00
taylor ba41389677 make sure sound buffers are valid before trying to delete them (was causing crash issues on Windows and OS X) 2006-05-13 07:11:46 +00:00
taylor 2a94d55007 some Windows specific OpenAL changes
add MVE files to MSVC6 project
2006-05-13 07:10:37 +00:00
taylor a39e8900e1 minor cleanup and a couple extra error checks
get rid of some wasteful math from the gr_set_proj_matrix() calls
2006-05-13 07:09:25 +00:00
taylor 05bc308f89 Vodka, it's a killer ;) 2006-05-13 07:03:41 +00:00
taylor 0a0249edbd add lazy (ie, faster) checking of asteroid collisions for time-to-impact 2006-05-13 07:02:27 +00:00
taylor 61f1a81ed7 fix bug where anything that wasn't a ship was considered a non-goal 2006-05-13 07:01:17 +00:00
taylor dd54d8a3b4 MVE player (audio only works with OpenAL builds!) 2006-05-13 06:59:48 +00:00
taylor 4bd5e7e9c6 add newest OpenAL SDK, this makes things easier as OpenAL is now the build default 2006-05-13 06:58:07 +00:00
taylor a42c27c5da add some missing headers, got tired of doing this myself when I did a build under Windows 2006-05-13 06:55:54 +00:00
Goober5000 342175f0d0 fixed build bug under WinXP
--Goober5000
2006-05-10 23:49:46 +00:00
taylor 38f72231a9 if in freecamera mode, or the hud is disabled, the don't draw scripted hud elements
(this is almost hackish, but the bug never got a comment from WMC, so he can fix it later if this is wrong)
2006-05-09 09:23:05 +00:00
taylor 1a607e82c7 fix incorrect button locations, it matches the correct layout of the other techroom screens now
(thought Backslash was going to fix this, but I got tired of waiting. :))
2006-05-09 09:21:15 +00:00
taylor 6a6c04c3fd remove SCP Lite build option, the rest of the code for it was long since removed
remove the glBindBufferARB lib check, the soon-to-be-committed extension code upgrade will handle the issue much better
2006-05-09 09:19:38 +00:00
phreak 21519056b6 the -decal command line doesn't enable decals anymore, just pops up a messagebox in windows saying that decals are disabled from now on. 2006-05-04 21:25:12 +00:00
phreak d76f952202 You can now preview sounds again in the event editor. 2006-04-30 16:39:43 +00:00
Goober5000 74857b8d6e tweak for yesterday's file name change 2006-04-20 17:38:25 +00:00
taylor 0c5b8c7cf6 makefile fixage 2006-04-20 16:24:48 +00:00
Goober5000 7e41877b7b proper capitalization according to Volition 2006-04-20 06:32:30 +00:00
Goober5000 1908007d1d change animation.cpp to modelanim.cpp, add CVS info, and add the file to the VC6 project
--Goober5000
2006-04-20 05:42:05 +00:00
bobboau 707095bf05 bugfix for the animation system 2006-04-18 02:33:59 +00:00
bobboau 7c36a78db8 bugfix for the animation system 2006-04-18 00:56:28 +00:00
phreak 96d32f8c56 fix FRED crashing if the user adds multiple waypoint paths then inserts more ships. 2006-04-18 00:08:23 +00:00
karajorma 3aa0b945b0 Some how managed to fail to commit the primary-locked and secondary-locked ship flags.
No idea how. Oh well here they are.
2006-04-16 11:58:11 +00:00
taylor 380b0de996 extra safety check when creating a default path string, filename is optional be we need to available if root0 is missing (CFILE not initted yet)
fix that crazy compiler<->constructor<->linker<->server.txt deal caused by some bad code and a freaky link thing in freespace.cpp
2006-04-16 05:28:10 +00:00
taylor b296bcea3a compiler warning fix, missed this one previously 2006-04-16 05:24:58 +00:00
taylor cebae27cfd probably doesn't need to be world readable, but certainly doesn't need to be world writeable
add Assert() to can when we are stupidly trying to allocate 0 or less size bytes in vm_malloc()
2006-04-16 05:24:16 +00:00
taylor 124942a8ec some optimizations for *nix 2006-04-16 05:22:21 +00:00
taylor e6ae06c8c0 forgot to add forward declaration for allocate_mission_text() (thanks karajorma ;)) 2006-04-15 19:00:52 +00:00
phreak 458a19f5a2 use gr_flash_alpha() for fade-in/fade-out effect.
just using gr_shade() will not work with the hud off or using an external camera.
2006-04-15 04:17:58 +00:00
phreak 0972de3462 gr_flash_alpha(), much like gr_flash(), but allows an alpha value to be passed 2006-04-15 00:13:22 +00:00
taylor ab7f22e9d8 Grrr! That was still stupid. Just going to revert it to retail and work out that bug it was supposed to fix at a later time. 2006-04-14 21:13:31 +00:00
taylor f7aa263c5d that was rather stupid of me, fogetting this would not have been a good thing :) 2006-04-14 18:50:52 +00:00
taylor e35065bc0d remove all of the *_ex() parsing functions added for use by EFFs
add a pause/unpause for parsing so that we can safely start parsing something new then continue parsing something old
make Mission_text and Mission_text_raw only use the memory needed, and free it when it doesn't need to parse anymore
  (should work ok with FRED2, but I wasn't able to test it)
2006-04-14 18:44:16 +00:00
taylor e3c8fa8f51 make sure that modular star tables actually work without going into an endless loop, or constantly complaining on you 2006-04-14 18:40:44 +00:00
taylor a79daa2285 something that Valgrind complained about 2006-04-14 18:39:38 +00:00
taylor ef8095f53c giving a tbl name in this warning message is basically useless since there we can't tell which tbl this particular ship is in 2006-04-14 18:39:06 +00:00
taylor 859482541c more checking to make sure that the malloc calls are actually needed 2006-04-14 18:37:06 +00:00
taylor 4fb6d6ba91 I might have blamed this on sleep, if it wasn't a bold faced lie. ;)
- another part of the turret untargetting target bug
2006-04-14 18:36:11 +00:00
taylor 069698806d make sure we don't allocate any memory for turrets unless there are some, was causing a few various memory issues, mainly for debug builds
(there is more of this same checking on the way for the other malloc() calls during model loading, and vm_malloc() will be set to
   Assert() on a 0 or less size as well)
2006-04-13 12:19:33 +00:00
taylor 2ba79e102e deal with font rendering issue from float precision on non-standard resolutions. this is only about a 97% fix/hack
but I don't want people complaining about the bad issue until I can figure out a more appropriate solution with
  gr_set_clip(), which is the real source of the problem
2006-04-13 12:15:58 +00:00
taylor af8ee7a283 bah! forgot to add a blasted = on that check 2006-04-13 12:12:27 +00:00
taylor 7828fc7e6f compiler warning fixes to make GCC 4.1 shut the hell up 2006-04-12 22:23:41 +00:00
phreak 9513105b52 get jump nodes rendering again..... again. 2006-04-12 05:30:50 +00:00
phreak 122a5c6453 obj_delete() needs to be called for jump nodes since the slot the jump node
that used to reside in hasn't been marked as empty.  This leads to the node still appearing in fred
if the user tries to delete the "ghosted" jump node, fred crashes.
2006-04-12 05:07:00 +00:00
taylor 2ee9d66423 some cleanup and slight reorg
- remove special uv offsets for non-standard res, they were stupid anyway and don't actually fix the problem (which should actually be fixed now)
 - avoid some costly math where possible in the drawing functions
 - add opengl_error_string(), this is part of a later update but there wasn't a reason to not go ahead and commit this peice now
 - minor cleanup to Win32 extension defines
 - make opengl_lights[] allocate only when using OGL
 - cleanup some costly per-frame lighting stuff
 - clamp textures for interface and aabitmap (font) graphics since they shouldn't normally repeat anyway (the default)
   (doing this for D3D, if it doesn't already, may fix the blue-lines problem since a similar issue was seen with OGL)
2006-04-12 01:10:35 +00:00
taylor ac57d4d55e more s/colour/color/ changes
throw in a couple of safety checks for some neb2 functions
2006-04-12 01:03:00 +00:00
taylor 9483b0a7d2 some small optimizations and cleanup
use floats for gr_bitmap() size and positions, mainly for non-standard resolutions since this allows proper resizing and positioning
  (the cast to float was happening later anyway so there should be not additional slowdown from that with standard resolutions)
change g3_draw_2d_poly_bitmap() to use floats instead of ints, gets rid of the extra cast and allows better resize values
2006-04-12 01:00:58 +00:00
taylor 6f5aedc929 that's a rather expensive function to call twice per frame, we should only need to call it once per mission and not ever have to reset it to some middle value 2006-04-12 00:55:16 +00:00
taylor 21311268f7 DDS now works well on the interface, but I forgot to every commit the CFILE change so that they are actually usable :) 2006-04-12 00:53:26 +00:00
taylor bc2ffa4dd5 keep forgetting to add this 2006-04-12 00:52:32 +00:00
phreak 9c40dfa5b9 undo mission list changes for now while taylor is out of town and unable to commit the rest of the codebase. 2006-04-09 19:50:19 +00:00
karajorma e8a819366b Added SEXPs to lock and unlock the primary and secondary weapons 2006-04-07 20:17:33 +00:00
taylor 0892a36bcf perhaps this will fix the white splash screen issue on Windows (been sitting on this, might as well commit it) 2006-04-06 23:25:17 +00:00
taylor bb99432d75 bits of cleanup
minor fixes for -img2dds
2006-04-06 23:23:56 +00:00
karajorma 1f55522ea0 Damn spelling mistakes. And in the only place where it would be visible too! 2006-04-06 20:44:14 +00:00
Goober5000 e85a66b369 small fix 2006-04-06 18:53:28 +00:00
wmcoolmon e1ff2ce649 Better scripting team support. (Just a tad) 2006-04-06 05:28:30 +00:00
karajorma 3eabe542c2 Bah! Silly error. 2006-04-05 19:59:11 +00:00
karajorma 526963be65 Support added for the Enable/Disable-BuiltinMessages SEXP 2006-04-05 17:54:25 +00:00
karajorma b8a871fed5 Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:56:57 +00:00
karajorma ac4eb09f1e Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:46:40 +00:00
karajorma 26d6abfbba Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:29:53 +00:00
karajorma fd2346e37e Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:14:04 +00:00
taylor 9c293fdb34 remove -tga16, it's obsolete now
add a temporary -no_emissive_light option to not use emission type light in OGL
2006-04-05 13:47:01 +00:00
taylor 734bc91bfa correct some coding mistakes 2006-04-05 13:45:08 +00:00
taylor 15bdbb7c85 fix linking, again. 2006-04-05 13:44:30 +00:00
wmcoolmon b9f263495a Maneuvering hruster scaling, gun convergence 2006-04-04 11:38:07 +00:00
wmcoolmon 4e3eab978c Bump this, too 2006-04-03 09:07:34 +00:00
wmcoolmon 965cc660b9 show-subtitle's got its groove back 2006-04-03 09:05:37 +00:00
wmcoolmon 9094e38372 Maneuvering thruster fixes 2006-04-03 08:09:32 +00:00
wmcoolmon def1993de8 Miscellaneous minor changes, mostly related to addition of Current_camera variable 2006-04-03 07:48:03 +00:00
wmcoolmon 71a596cc09 Scripting support for cameras, as well as for moving model subobjects 2006-04-03 07:47:07 +00:00
wmcoolmon fb286f1706 gamesnd_get_by_name now ignores extensions, mostly for parse_sound reasons. 2006-04-03 07:45:43 +00:00
wmcoolmon 4e5089a7bd camera code updates (Translation should be possible now) 2006-04-03 07:45:15 +00:00
wmcoolmon 0a62d80db6 $Warp time and $Warp speed vars 2006-04-01 01:21:58 +00:00
wmcoolmon f7659ed341 Prelim. BSG warpin effect stuff 2006-03-31 10:20:01 +00:00
Goober5000 c635560a1c those were some bugs just waiting to happen 2006-03-30 04:18:40 +00:00
Goober5000 c8029346cd hehe, grammar
--Goober5000
2006-03-30 04:15:20 +00:00
karajorma 7fe2886e3b Added the set-primary-weapon and the set-secondary-weapon SEXPs. Updated the corresponding
set-x-ammo SEXPs to also accept a rearm limit.
2006-03-28 11:41:57 +00:00
taylor c6d9c1ad1e forgot to ever change this stuff
- version bump to 3.6.8 for configure file
 - the Frameworks package for OS X is now a tarball rather than a zip file
2006-03-26 10:31:02 +00:00
taylor 6c54f20ef5 make sure to only allow on screen save at the time (I don't like having it restricted but since it's not used for anything else there is little point) 2006-03-26 08:26:45 +00:00
taylor 817c840273 the bmpman release issues for the chatbox should be fixed now so we can go back to using bm_release() on the bitmaps
Chatbox_p_coords (the multi-pause background) should be at 0,0 (even though this isn't used I thought it was a good idea to go ahead and fix it)
2006-03-26 08:25:05 +00:00
taylor b39d880ed4 split pause_*() and multi_pause_*() functions into individual single and multi versions (why it was hacked up like that I'll never know)
fix screen save in multi pause mode
address some bmpman issues from interface graphics getting released and then still used by something else
2006-03-26 08:23:06 +00:00
Goober5000 27f5671b52 this should fix random-of
--Goober5000
2006-03-26 06:42:01 +00:00
taylor 8d6162b7ab fix model_allocate_interp_data() extern for OSX 2006-03-25 22:44:52 +00:00
taylor 7a65e0e972 add OGL headers to CFLAGS for OSX 2006-03-25 22:44:04 +00:00
taylor 065924508b the previous changes should prevent these things from happening, but drop in some more Assert()'s anyway 2006-03-25 22:38:15 +00:00
taylor ab5ce4d7e1 modelinterp.cpp: that little bit really isn't needed
popup.cpp:  GCC 4.1 warning fixes
2006-03-25 10:41:44 +00:00
taylor bcdb0b67db don't run through game_shade_frame() every frame unless we are in a game-play state 2006-03-25 10:40:38 +00:00
taylor 01d9f454ee minor cleanup
address numerous out-of-bounds issues
add some better error checking and Assert()'s around
2006-03-25 10:38:44 +00:00
Goober5000 bb4324969d hopefully fix this :( 2006-03-24 18:40:13 +00:00
wmcoolmon d95d6165b5 New subobject animation stuff and Lua functions. 2006-03-24 07:38:36 +00:00
Goober5000 51167b1b95 add nav flag to def_files
--Goober5000
2006-03-24 05:08:23 +00:00
Goober5000 a95eeb4e97 tweak karajorma's fixes... these should work exactly the same but are closer to my original intent 2006-03-24 05:08:19 +00:00
taylor ac19ddcadb address out-of-bounds issues for Sounds[] when unloading 2006-03-22 21:42:55 +00:00
taylor ed38329dfc minor warning fixage 2006-03-22 18:20:06 +00:00
taylor 4feb121a5a if -mipmap is used with -img2dds to then have compressed image also contain mipmaps
use nicest hints for texture compression, should improve quality a little
when reporting compressed sizes to debug log make ani size be total, not per frame
2006-03-22 18:14:52 +00:00
taylor 2205a9e660 minor cleanup 2006-03-22 18:12:50 +00:00
taylor 9e7c73fe88 don't really see the point of the Assert() here, just bail if it's an issue 2006-03-22 18:12:16 +00:00
taylor f361c7272c GCC 4.1 barfed on this 2006-03-22 18:11:28 +00:00
karajorma b9f3ed9328 Fixed Random-Of so that it finally works properly. and doesn't ignore the last items on the list.
Fixed Rand-Multiple so that when seeded it works the way I originally designed it to. Previously it was
working exactly the same as rand when seeded.
2006-03-22 16:24:20 +00:00
taylor be031fa0e3 fix text subtitles that I so kindly broke not too long ago 2006-03-22 08:34:17 +00:00
karajorma 45ead66153 Bah. More errors fixed. This time in in-sequence 2006-03-22 01:36:21 +00:00
karajorma ee92a2a0b3 Added the In-Sequence conditional. 2006-03-21 17:19:01 +00:00
taylor 956cc85410 add commands to view from and change target in viewer mode pause
also add reset ability to both view mode and hud state to return to pre-pause settings
2006-03-21 14:19:18 +00:00
Goober5000 52809741c6 fix taylor's fix :p
--Goober5000
2006-03-21 02:50:59 +00:00
taylor f08d2f8043 some minor cleanup 2006-03-21 00:27:27 +00:00
taylor a12024d715 fix target eval check for weapons so that friendly ships will stop shooting at friendly bombs 2006-03-21 00:08:18 +00:00
taylor b35e8870b2 change wording to ease Goober's ulcer. ;) 2006-03-20 06:25:19 +00:00
taylor 7233ba1db8 add ai_profiles flag to get rid of limit on minimum speed a docked ship can move
(not going to Int3() here from < 0.1 speed by default, a support ship actually hit it)
2006-03-20 06:19:04 +00:00
taylor 026c57c063 fix D3D/OGL test for asteroid rotations (I was far too excited about the result of this :() 2006-03-20 06:16:45 +00:00
taylor 4816d5e4c0 might as well do star antialiasing for OGL too 2006-03-20 06:13:35 +00:00
taylor 6930e3eb6a make sure the mission log doesn't modify stuff in Cargo_names[], since it shouldn't
have split_str_once() be sure to not split a word in half, it should end up on the second line instead
2006-03-19 05:05:59 +00:00
Goober5000 58b58745aa added set-death-message sexp
--Goober5000
2006-03-18 22:43:16 +00:00
Goober5000 36605519ca blast 2006-03-18 22:18:24 +00:00
Goober5000 72c2a5c356 fix comm order initialization bug
--Goober5000
2006-03-18 22:00:43 +00:00
taylor 6b476586a5 add framerate var since it's contained in freespace.cpp and that's not used in a FRED2 compile 2006-03-18 21:23:38 +00:00
wmcoolmon 809bcc8f76 Nitpicketiness 2006-03-18 20:24:54 +00:00
taylor e4977bad12 meh. 2006-03-18 10:28:58 +00:00
taylor d8997a3169 fix out-of-bounds problem in awacs checking (full neb missions may have been a bit freaky from this) 2006-03-18 10:28:25 +00:00
taylor a5d0bc4007 make sure errors in rand_sexp() and rand_internal() are properly handled 2006-03-18 10:26:42 +00:00
taylor 79661b3a3f some cleanup to the nebula debug console help messages 2006-03-18 10:25:45 +00:00
taylor a31f44a4a8 never try and load glow or shine maps if we don't have a base map for it
but WMC's bumpmap block in a BUMPMAPPING define since it useless most of the time
2006-03-18 10:25:05 +00:00
taylor 13a9c694c9 make the main vital TMAP_MAX_VERTS stuff dynamic, should handle the major non-HTL related crashes 2006-03-18 10:23:46 +00:00
taylor f8596e6e18 we already have a variable to show the framerate so lets just use the one 2006-03-18 10:17:59 +00:00
wmcoolmon 9198b46de8 Allow "none" in $Shockwave Model to disable shockwave 2006-03-18 09:25:55 +00:00
Goober5000 27992b09cf add ship-subsys-targetable and ship-subsys-untargetable
--Goober5000
2006-03-18 07:12:08 +00:00
taylor ecf01b39c9 this should fix the secondary thruster effect flow direction problem 2006-03-17 18:26:40 +00:00
taylor 92e49f9bef beyond some possible out-of-bounds issues, I think this stuff was messing up non-HTL lighting too 2006-03-16 14:23:35 +00:00
taylor 272c4feec8 make sure our event state doesn't get filled with things we should poll for (was waiting for the new input code, but really needed to get at least this in) 2006-03-15 17:35:24 +00:00
taylor 676cee0dfe couple of nitpicks 2006-03-15 17:33:05 +00:00
taylor a4a6211dc1 bump error msg buffer size a little (I'll probably just go dynamic with this since you hopefully won't get this too much anyway) 2006-03-15 17:32:13 +00:00
taylor 7a0228fefe remove alut headers, since we don't use any alut functions anyway (didn't I already do this a couple of months ago??) 2006-03-15 17:30:47 +00:00
taylor f91f20b94a bump sexp nodes to 4000 for TBP, really needs to go dynamic soon 2006-03-12 07:35:33 +00:00
taylor df3debd00d when I forget that I'm an idiot little things like this slip through (me == moron) 2006-03-12 07:34:39 +00:00
taylor 143649a771 gah, how stupid could I have been! gotta make sure that the symlinks are preserved (keeps file size down too). 2006-03-12 07:31:20 +00:00
taylor 95fa276241 update Makefile.am for all of the project files changes, include Xcode stuff too
update code/Makefile.am with FRED2 stuff, might as well in case someone wants to do a winelib port or something
2006-03-08 05:24:11 +00:00
taylor 2625427c4d remove asm from MulDiv() since Intel Mac doesn't like it very much, and it doesn't do exactly what it should anyway 2006-03-08 05:22:14 +00:00
taylor 4be8b5b054 add model_allocate_interp_data() extern for PPC machines 2006-03-08 05:15:20 +00:00
taylor 1480d671f5 update project file with a bunch of cleanup and universal binary building support
add a Frameworks.zip which contains pre-made universal binary frameworks for Ogg, Vorbis and SDL
2006-03-08 05:13:10 +00:00
taylor 09f4108991 add Frameworks directory to the ignore list 2006-03-08 05:09:53 +00:00
taylor d3e09d3ac1 don't need these with new project file and frameworks 2006-03-07 09:21:21 +00:00
taylor 36f4910681 make filename length checks non-fatal 2006-03-06 16:30:06 +00:00
taylor a4bc040ddd various small cleanups, fixes, error checks 2006-03-05 21:45:12 +00:00
taylor d4997b0e9a remove WMC's "speed increase" ;) (the math isn't right yet so the collision checks won't be correct, and fixing it to work right wouldn't be any faster) 2006-03-05 18:00:55 +00:00
karajorma ae0ca70b81 Bah. Error in secondary and primary ammo SEXPs fixed 2006-03-04 11:05:47 +00:00
Goober5000 f0f75c4b5c fix the random-of sexps to only choose valid arguments 2006-03-03 06:14:41 +00:00
Goober5000 a166d8dfd2 took care of (hopefully) the rest of Karajorma's SEXP node handle conflicts, plus merged the random sexps with their multiple variants 2006-03-02 04:05:27 +00:00
karajorma 2199ffd0dd Fixed a bunch of bugs with Set-x-ammo and Rand SEXPs. 2006-03-01 23:22:25 +00:00
karajorma 4f8e2ab5a4 Added the random-multiple-of SEXP and fixed random-of to work as designed 2006-03-01 20:54:35 +00:00
karajorma fc01cf65cb Changed text FRED displays for Fade-In and Fade-Out SEXPs 2006-03-01 14:53:15 +00:00
Goober5000 cf31373781 fix comm message localization 2006-03-01 04:01:37 +00:00
Goober5000 cbc8ae14ca not needed... and just an annoyance with > 2 main halls 2006-03-01 04:01:15 +00:00
Goober5000 ecea6ace41 oswpt wing fix 2006-03-01 03:14:22 +00:00
Goober5000 8599f5779c more FS1 import tweaks 2006-03-01 00:46:11 +00:00
wmcoolmon 817ea347d8 Silly mistake 2006-02-28 07:52:04 +00:00
Goober5000 d620aed4ab fix another import bug 2006-02-28 07:37:12 +00:00
Goober5000 53e55777f7 cool stuff with main hall music tracks 2006-02-28 06:59:28 +00:00
Goober5000 4c272613da fix the animation type triggers 2006-02-28 05:16:55 +00:00
Goober5000 a655058346 add log entry for jettison-cargo 2006-02-27 04:17:11 +00:00
wmcoolmon a2c815144b x != y, surprisingly enough 2006-02-27 01:21:03 +00:00
wmcoolmon 51b5c481a9 Bump MAX_TFP to 10 2006-02-27 00:51:03 +00:00
wmcoolmon 5ab3f6cb11 Consistency in Lua 2D funcs; fix FRED2 loading screen images dialog boxes. 2006-02-27 00:40:34 +00:00
wmcoolmon 061dc31594 Afterburner & meta updates 2006-02-27 00:15:08 +00:00
wmcoolmon 0f47fb3dd2 Targetable as bomb SEXPs and dialog stuff; made invulnerable an object flag in both FRED and FS2. 2006-02-26 23:23:31 +00:00
Goober5000 8c580f8550 wow, over a year later and I'm still finding docking bugs :p 2006-02-26 22:47:11 +00:00
wmcoolmon 05f187b921 SF2_TARGETABLE_AS_BOMBER flag, Lua gr_bitmap_ex fix 2006-02-26 22:23:01 +00:00
Goober5000 4fc7c30a4d some more WCSaga stuff 2006-02-26 18:49:07 +00:00
taylor c9c87b8019 one friggin line, should have been able to notice that sooner 2006-02-26 11:09:31 +00:00
taylor 3affad73d1 another non-linear campaign fix, this one affected PVs 2006-02-26 08:06:57 +00:00
Goober5000 df9df096e1 fix stupid bug 2006-02-26 05:32:55 +00:00
Goober5000 ab23b030ad guess this is still needed 2006-02-26 05:32:38 +00:00
Goober5000 d979eb4f30 bah 2006-02-26 01:32:23 +00:00
Goober5000 3576d1c846 fix subsystems for get-object-* 2006-02-26 00:43:10 +00:00
Goober5000 6cd9711872 some paring down of sexps 2006-02-26 00:22:15 +00:00
Goober5000 f361e116f7 import tweak 2006-02-25 22:06:57 +00:00
Goober5000 b52b6b1e00 spelling 2006-02-25 21:47:19 +00:00
Goober5000 90c9c9e196 fixes from last commit 2006-02-25 21:42:31 +00:00
Goober5000 657aeefcec added function for retrieving a ship, wing, waypoint, or team from a sexp argument
--Goober5000
2006-02-25 20:18:14 +00:00
Goober5000 c72eb31dd5 some tweaks to the ignore code 2006-02-25 19:03:39 +00:00
karajorma 9e2946f49d Added Seeding functions to Rand and Rand-Multiple SEXPs 2006-02-25 17:34:23 +00:00
wmcoolmon 5d7847a54b Fix no text for splash screen scripting problem 2006-02-25 06:57:58 +00:00
taylor 7ee4923324 try and make some sense out of that cmdline option mess, maybe it will stay sane for a few days at least :) 2006-02-24 07:36:49 +00:00
taylor 476ab31130 add v-sync support for OGL (I skimmped on this a bit but will go back to do something better, "special" extension wise, at a later date) 2006-02-24 07:35:48 +00:00
taylor 6fd0b02ea1 fix custom loading screens that I manage to break yet again
add a "MaxFPS" registry/ini option to specify a FPS cap, useful if you can't make use of v-sync for some reason
2006-02-24 07:34:07 +00:00
taylor bb1ca10fcd vm_extract_angles_vector() doesn't do the same thing that this code used to so don't use it 2006-02-24 07:32:11 +00:00
taylor 6c0170fa23 clean up some of that FS2OpenPXO crap (can't wait to rip all this out for official PXO :)) 2006-02-24 07:31:18 +00:00
taylor e62b022333 compiler warning fixage 2006-02-24 07:30:23 +00:00
wmcoolmon d35972621b Maybe fix ships-limit bug 2006-02-24 05:13:26 +00:00
Goober5000 b865037e38 remove my old anti-frustration thing since it's not what retail does
--Goober5000
2006-02-24 05:02:34 +00:00
wmcoolmon e02526541e I love it when bugs are this easy to fix. ;) 2006-02-24 04:45:00 +00:00
taylor 6880def156 attempt to fix bad out-of-bounds (and related) issues when weaponchoice icon is missing
be sure to always initialize frame count and FPS with bm_load_animation() calls in case caller got lazy
2006-02-23 06:21:56 +00:00
karajorma 272a93b423 Added the String-to-int SEXP. 2006-02-23 01:37:51 +00:00
taylor 4842f0a7f7 fix subsystem distance check from single ship to subsystem (this has been broken since day 1, over 3 years ago, so there could be other Mantis bugs relating to this) 2006-02-22 18:32:18 +00:00
karajorma 45fac1c94a Changed the set-secondary-ammo and set-primary-ammo SEXPs to use the banks
capacity rather than starting ammo.
2006-02-22 00:04:04 +00:00
karajorma 3f7b89566b Fixed the problems with set-primary-ammo and set-secondary-ammo SEXPs 2006-02-21 22:20:04 +00:00
karajorma 965225ec53 Added the get and set-primary-ammo SEXPs. The set-primary-ammo
and set-secondary-ammo SEXPs appear to be broken at the moment though
2006-02-21 21:40:25 +00:00
Goober5000 1145996990 more true/false tweaks and redid the get-object-* and set-object-speed-* sexps to be more flexible and extensible
this will break compatibility with certain uses of these sexps in existing missions; I don't think there are any released campaigns
with the old versions so hopefully mission designers can simply update unreleased missions... however if it gets to be a problem
I will code in some reverse compatibility

--Goober5000
2006-02-21 09:08:10 +00:00
Goober5000 57c4855e25 add a bunch of tweaks to hopefully lessen the possibility of misinterpreting special return values (such as nan) as true or false
--Goober5000
2006-02-21 07:58:01 +00:00
taylor 812ce9f4a0 make changed object type debug message a bit more useful 2006-02-21 07:12:59 +00:00
karajorma 716d0fc8b8 Added the num-ships-in-wing, get-secondary-ammo and set-secondary-ammo SEXPs 2006-02-20 20:53:11 +00:00
Goober5000 7efe44ef55 fixed several more things in the new ignore code
--Goober5000
2006-02-20 07:59:26 +00:00
taylor 66d317b2ab updated to newest dynamic starfield code
- this mainly is to just better support SEXP based starfield bitmap changes (preloading, better in-mission stuff loading)
 - also fixes index_buffer related double-free()
 - done waste memory for env index buffer if env is not enabled
 - address a couple of bm load/release issues and comment a little to tell why
2006-02-20 07:30:15 +00:00
taylor 7f2c88fa5c div-by-0 bug fixage 2006-02-20 07:26:07 +00:00
taylor dd962df79e handle badly encoded (has short reads due to strange block/data size ratio) ADPCM files a little better in debug builds 2006-02-20 07:25:14 +00:00
taylor 6884c57e2e start of some of the newer GL stuff
- initial support for dropping from fullscreen to windowed mode (will get more changes in another day or so, mainly because of FRED2)
 - a little cleanup
 - init change for WGL to be a little safer and to help report what it tried to use and what it got in the way of pixelformat
 - don't use global OGL_enabled to decide if GL is initialized or not (also getting more changes shortly)
 - make sure opengl_close() will always execute properly through atexit() (also getting changed later to not run through atexit())
2006-02-20 07:23:29 +00:00
Goober5000 3828f19c1b hmm, remove one form of commenting 2006-02-20 05:54:44 +00:00
Goober5000 c27ccf94c4 added ai-ignore-new which hopefully should fix the ignore bug
--Goober5000
2006-02-20 02:13:08 +00:00
Goober5000 f16318cf44 reduce confusion in naming
--Goober5000
2006-02-19 23:14:22 +00:00
Goober5000 bb95da72a8 restore original ignore behavior and remove soon-to-be-obsolete ai-chase-any-except
--Goober5000
2006-02-19 22:00:10 +00:00
Goober5000 f665e3928b rearrange some turret code to be more like retail
--Goober5000
2006-02-19 07:20:43 +00:00
Goober5000 549be4382f fix stealth
--Goober5000
2006-02-19 03:17:01 +00:00
wmcoolmon 01d584e9eb Oops 2006-02-19 02:04:40 +00:00
wmcoolmon 50212a153d Documentation consistency; remove unneeded check. 2006-02-19 02:01:24 +00:00
Goober5000 030c78174b breathalyzer for WMC, stat!
--Goober5000
2006-02-19 00:59:49 +00:00
Goober5000 b7b71d06cf fixed saving of special tags
--Goober5000
2006-02-19 00:49:41 +00:00
Goober5000 8be490655a additional error checking
--Goober5000
2006-02-19 00:32:47 +00:00
Goober5000 02d0c78cac center cbanis
--Goober5000
2006-02-19 00:29:39 +00:00
wmcoolmon b1ea781c57 Introducing draw_model_rotating; many improvements to weapon selection missile rendering 2006-02-18 00:42:51 +00:00
wmcoolmon e8b4fa8508 Fix a silly bug 2006-02-17 21:47:47 +00:00
Goober5000 d40ff02354 bother those variables 2006-02-17 08:36:16 +00:00
Goober5000 07582f16ad fix subtle bug
--Goober5000
2006-02-17 08:13:53 +00:00
wmcoolmon e5d2f05618 Various updates for consistency in documentation 2006-02-16 06:00:49 +00:00
taylor ed3380aafb keep weapon model refcount correct (this is admittedly strange, but safer than before) 2006-02-16 05:48:48 +00:00
taylor 222a225eb8 I never did really like the old audiostr OpenAL change here, this just seems safer
initialize si->data and si->size before loading sound buffer (fixes OGG issue for plats that don't zero-initialize <vector>, this will be handled differently in the new code)
2006-02-16 05:47:32 +00:00
taylor 9ede455899 remove reset of modelnums on level start (more properly moved to model_unload())
minor change ship class fixage to clear out old model
take better care to make sure that a ship model has the proper refcount (this needs further work, I don't like :V:'s crap here)
add <string> to includes in ship.h, fixes a compile issue that I forgot to fix properly before (thanks Jens)
2006-02-16 05:44:53 +00:00
taylor edf5adf90c please stop modifying the passed node value in sexp functions, it makes it very difficult to debug problems 2006-02-16 05:40:58 +00:00
taylor db8d3c01bb some FS2NetD fixes
- timer/timeout issues
 - keep server heartbeats to a minimum in order to save some bandwidth
 - clean up some debug message a little
2006-02-16 05:39:13 +00:00
taylor 9e857ae2c4 NULL vec warning fix (basically just setup as if it were NULL and skip the extra work if needed)
more bmpman related fixes, mainly addresses the condition where it would try to render textures that have been released
have model_unload() run through Ship_info[] and clear out modelnum's when they are free'd (makes more sense here than doing it on level load to keep counts right)
fix missing subsystem warning messages
2006-02-16 05:31:00 +00:00
taylor b43962d929 should fix some of the model/bmpman errors off of the weaponchoice screen 2006-02-16 05:24:35 +00:00
taylor 9436c62e53 I would say this is another selling point for the boozer-svn plugin, but I would have needed it too as I've missed this stuff several times 2006-02-16 05:19:46 +00:00
taylor 849cc24fbe all just getting basic info in parse_mission_info(), this fixes several parsing/warning issues that can show up
from going in the techroom and some similar FRED2 issues as this stuff doesn't get reset between get_mission_info() calls.
  this also should make the mission simulator screen load a bit faster
2006-02-16 05:18:48 +00:00
taylor 0af0be32fa fix strangeness with persona index thingy (ubyte can't be -1, this needs to be left like this or make an int)
address some pilot file corruption using non-linear campaigns, rather simple fix for something that took quite a while to track down
2006-02-16 05:15:48 +00:00
taylor 93fff67c50 NULL vec warning fix (I don't really like this one that much so it may get replaced later) 2006-02-16 05:09:26 +00:00
taylor 7bd5d26e10 minor 64-bit related fixage 2006-02-16 05:07:50 +00:00
taylor c41aa97d85 various camera fixes (did this ever work properly?)
- handle basic init properly for those platforms that do/don't zero-initialize STL vector
 - allow text images without witten text
 - don't try to process text if it's NULL or of 0 length
 - don't get freaky with image handling
 - add clone/assignment operator so that push_back() will not screw up bmpman stuff
2006-02-16 05:07:08 +00:00
taylor bf18c71316 various bmpman related fixes
- some new error checking (and fixes related to that) and cleanup
 - fix EFFs not getting released/unloaded properly (was in a local tree but apparently missed CVS)
 - minor fixes for bm_release() to produce a more properly cleaned slot
 - use fast unloading for page_in stuff since we don't actually want really want the load count changing for texture maps
   and to make sure that we free the memory usage regardless of load count
2006-02-16 05:00:01 +00:00
taylor 4c3a3d08d6 couple more lighting value tweaks 2006-02-16 04:55:53 +00:00
taylor 2765017317 newline fixage 2006-02-16 04:55:14 +00:00
wmcoolmon e29332a64a Dodge an Assert 2006-02-15 07:30:54 +00:00
wmcoolmon 2a2d52145a Blah, pulled a Goober. 2006-02-15 07:26:52 +00:00
wmcoolmon d43babc2d5 Various weapon and team related scripting functions; $Collide Ship and $Collide Weapon hooks 2006-02-15 07:19:50 +00:00
Goober5000 ef13357373 enabled modular tables for ai_profiles and added the default table to def_files
--Goober5000
2006-02-13 04:56:58 +00:00
Goober5000 0cd1cdd3f1 nitpick 2006-02-13 03:11:19 +00:00
Goober5000 a9642a2a86 more tweaks, plus clarification of checks for the existence of files
--Goober5000
2006-02-13 00:20:46 +00:00
wmcoolmon 0c8c487d3c Remove initial corkscrew values from parse_weapon 2006-02-12 17:54:35 +00:00
Goober5000 ada33660b0 allow specification of debriefing personas
--Goober5000
2006-02-12 10:42:25 +00:00
Goober5000 2653f7c9ac whoops, forgot this 2006-02-12 08:39:32 +00:00
Goober5000 28ea82d96b additional fixes and enhancements for substitute music
--Goober5000
2006-02-12 05:23:16 +00:00
Goober5000 7310f00883 more cool work on importing, music handling, etc.
--Goober5000
2006-02-12 01:27:47 +00:00
Goober5000 b5bef91a77 bumped to 3.6.8 because of version-specific commenting
--Goober5000
2006-02-11 22:10:11 +00:00
Goober5000 f990815ab9 removed the FS1-specific music hack
--Goober5000
2006-02-11 22:08:56 +00:00
Goober5000 e696a5844c this isn't needed now
--Goober5000
2006-02-11 21:24:05 +00:00
Goober5000 fc2ff2bd76 reworked how comments are parsed and added version-specific commenting
--Goober5000
2006-02-11 21:23:42 +00:00
wmcoolmon 8727f84919 getWeaponClass->getWeaponClassByName, Linked/DualFire variables 2006-02-11 19:24:17 +00:00
Goober5000 a4ef31ec20 RT's bugfix 2006-02-11 07:34:25 +00:00
Goober5000 504e5e518a two things I missed before
--Goober5000
2006-02-11 07:31:55 +00:00
Goober5000 5ca168e515 yet more various and sundry fixes
--Goober5000
2006-02-11 02:58:23 +00:00
Goober5000 c3793de61e more fixage
--Goober5000
2006-02-11 01:02:28 +00:00
Goober5000 08144ffceb more FS1 import goodness
--Goober5000
2006-02-11 00:13:55 +00:00
Goober5000 6bb63e33d6 fixed an old Volition bug unmasked by my parse changes
--Goober5000
2006-02-10 23:33:39 +00:00
wmcoolmon 7d1a4f0efb Removed resize fields; fixed silly bug with RunBytecode 2006-02-09 05:07:02 +00:00
wmcoolmon 71853d9d47 Maybe fix gliding insta-turn problem 2006-02-08 02:10:39 +00:00
wmcoolmon 208ffda32f WMC-Since we're abusing species_defs.tbl anyways, remove $NumSpecies 2006-02-06 02:29:17 +00:00
wmcoolmon 990132536e Various fixes; very beginnings of Directives scripting support 2006-02-06 02:06:02 +00:00
Goober5000 65ada5e03e fixed several IFF bugs in FRED (plus one or two other bugs)
--Goober5000
2006-02-04 07:05:03 +00:00
taylor 47158d3a1a fix sun flares that I had broken previously 2006-02-03 22:29:01 +00:00
taylor 2aef5864c0 a couple of mvalid.cfg and tvalid.cfg file format changes to give them at least some readability
some cleanup, extra logging, and very slight speedup with mission and table validation checking
fix memory leak from mission and table validation checking
2006-02-03 22:28:10 +00:00
taylor f07b3dae88 I don't like this being considered a fix without retail compatibility testing, but it should at the very least compile... 2006-02-03 22:25:18 +00:00
Goober5000 8d31b2a3c2 ugh, more ship/wing fixage
--Goober5000
2006-02-02 08:12:47 +00:00
Goober5000 72ba8ab2ab bah and double bah 2006-02-02 07:13:42 +00:00
Goober5000 fa592e5e62 fixed what I broke for ship types :p
--Goober5000
2006-02-02 07:01:16 +00:00
Goober5000 546e41bed4 consolidated comm order stuff
--Goober5000
2006-02-02 07:00:29 +00:00
Goober5000 ef4ab2c71a replaced Fred_comm_orders with proper Comm_orders, just for WMC ;)
--Goober5000
2006-02-02 06:22:58 +00:00
Goober5000 e92336bbed restore retail compatibility with comm orders: one logic bugfix, one cosmetic bugfix
--Goober5000
2006-02-02 06:04:02 +00:00
Goober5000 fa002ee29b fixed a FRED problem brought on by the parse reordering
--Goober5000
2006-02-02 05:48:17 +00:00
phreak 591cca45b9 Allow weapons to home in on countermeasures as well. The multiplayer code was only allowing bombs to be homed in on. 2006-02-01 23:43:34 +00:00
phreak 9464b77b0b -ingame should be -ingame_join 2006-02-01 23:35:31 +00:00
taylor 7481555e5e add local lua dir to includes 2006-02-01 13:30:12 +00:00
Goober5000 0fd76f4abe now all the project files are working :)
--Goober5000
2006-02-01 08:05:47 +00:00
Goober5000 f9535667b6 try fixing this again 2006-02-01 05:40:44 +00:00
Goober5000 8ae737074b bettered the ballistic primary check
--Goober5000
2006-02-01 05:11:25 +00:00
Goober5000 0b13726b73 fixed project folder settings 2006-02-01 04:29:30 +00:00
taylor 79be5543cb oh the shame (/me imagines the big grin on Goober's face right now :p) 2006-01-31 17:19:20 +00:00
taylor 155a7f4f21 remove USE_LUA 2006-01-31 15:44:55 +00:00
taylor 8b5e4390bd we need to skip to the start of the string, not the end 2006-01-31 15:44:29 +00:00
wmcoolmon c4f19e64bc Removed USE_LUA; Simulation hook; better debug messages for Lua; swapped out mounted weapon functions for variables 2006-01-31 06:46:14 +00:00
wmcoolmon 0571df5719 Compiler warning fix 2006-01-31 06:44:48 +00:00
wmcoolmon c4755fb10f Debug warning; compiler warning fix. 2006-01-31 06:43:21 +00:00
wmcoolmon 99e29f52ba Removed USE_LUA 2006-01-31 06:42:28 +00:00
wmcoolmon c84776a188 Scripting simulation hook; removed USE_LUA 2006-01-31 06:42:00 +00:00
wmcoolmon a898ab1a00 Fix hack for checking for ballistic primary ammo 2006-01-31 06:32:42 +00:00
Goober5000 b6cee94fc5 stuff 2006-01-31 04:24:25 +00:00
Goober5000 19ca2a5d41 oh noes! :( 2006-01-31 04:13:00 +00:00
Goober5000 d0a92f8d84 fix a potential problem with replacement range
--Goober5000
2006-01-31 02:02:33 +00:00
Goober5000 69db5e8597 update FSM import for FSPort v3.0
--Goober5000
2006-01-31 01:53:37 +00:00
taylor 09d7c4f206 fix problem that made briefing voice repeat first second or two in OpenAL 2006-01-30 22:09:52 +00:00
taylor f8c1115c7f some minor fixage 2006-01-30 22:08:59 +00:00
taylor 5cbc3791a4 and after all of my recent work fixing div-by-0 zero bugs, ya had to know this was coming :) 2006-01-30 19:37:33 +00:00
taylor 0d3fd97f2e fix parsing of reinforcements 2006-01-30 19:35:41 +00:00
taylor b618a74072 make sure to init dest and dest_size for any calling functions that don't 2006-01-30 07:14:32 +00:00
taylor 6397a8f093 fix endless loop when we've got too many weapons 2006-01-30 07:00:14 +00:00
taylor c70fdc3a52 try and handle things like $$ and ## a bit better (this worked for what I threw at it but please double-check me here Goober) 2006-01-30 06:58:10 +00:00
taylor 26b25d548a better lighting for OpenGL
remove some extra stuff that was from sectional bitmaps since we don't need it anymore
2006-01-30 06:52:15 +00:00
taylor 93b4962f17 make MAX_LIGHTS global 2006-01-30 06:41:34 +00:00
taylor 7e7a881354 better lighting for OpenGL
remove some extra stuff that was from sectional bitmaps since we don't need it anymore
some basic lighting code cleanup
2006-01-30 06:40:49 +00:00
taylor 4c9a9dbe31 clean up lighting stuff a little 2006-01-30 06:38:34 +00:00
taylor b55f61b7d1 account for a freaky wing issue (saw this in Derelict, or somewhere) 2006-01-30 06:37:49 +00:00
taylor 14a7d00361 handle Interp data allocation a little better 2006-01-30 06:36:35 +00:00
taylor 7558eba371 minor warning fixage 2006-01-30 06:36:01 +00:00
taylor 7501939a44 minor fixage 2006-01-30 06:35:29 +00:00
taylor 74f014c64d (possibly) better fix for some static/stuttering in certain wav files 2006-01-30 06:35:02 +00:00
taylor 42183592cd try and detect some bad path info 2006-01-30 06:34:06 +00:00
taylor 7c0a59c1a7 add transparent, cycling alpha, and no-light options for weapons 2006-01-30 06:33:19 +00:00
taylor ac5d72045b dynamic starfield bitmaps (if the thought it was freaky before, just take a look at the new and "improved" version ;)) 2006-01-30 06:31:30 +00:00
taylor 603feaaa4c dynamic starfield bitmaps 2006-01-30 06:30:03 +00:00
wmcoolmon 42a74e93d3 Apologies, don't know how I missed this... 2006-01-29 18:01:04 +00:00
wmcoolmon f695a935af Make sure stuff is set up properly for ship kills 2006-01-29 07:42:49 +00:00
wmcoolmon 55846b0484 Minor warning update 2006-01-29 07:41:57 +00:00
Goober5000 7720a40fd6 fix all teams at war IFF behavior
--Goober5000
2006-01-28 04:33:06 +00:00
Goober5000 77f9c7ffae fixed the bug where wings couldn't be initially docked to stuff
--Goober5000
2006-01-28 02:59:55 +00:00
Goober5000 d77e21d84d fixed a small incompatibility
--Goober5000
2006-01-28 00:23:36 +00:00
Goober5000 3554e6c336 some tweaks for insertion sort
--Goober5000
2006-01-27 20:29:30 +00:00
Goober5000 738875f021 replace quick sort with insertion sort in many places
--Goober5000
2006-01-27 06:21:10 +00:00
Goober5000 9345c5e130 add an insertion sort function for small or almost-sorted arrays; it has the same prototype as stdlib's quick sort
--Goober5000
2006-01-27 06:03:41 +00:00
Goober5000 eca06b5c1a a few project file fixes
--Goober5000
2006-01-27 04:06:31 +00:00
phreak 3cf2b0579c Grid zbuffering issue fix moved to the new fred project folder 2006-01-26 23:04:45 +00:00
Goober5000 ba8691181c spelling 2006-01-26 04:01:58 +00:00
taylor 74549db950 first version of this sucked, this should be a bit better while working with both new and retail data
- get an average color from the palette rather than picking first (unoptimized palettes could have unused pixels in first entry)
  - slight cleanup, and s/colour/color/ (yeah, stupid American, deal with it! :))
2006-01-26 03:59:59 +00:00
Goober5000 ce57b3387d added variable replacement to command briefings, briefings, and debriefings
--Goober5000
2006-01-26 03:58:14 +00:00
Goober5000 64e86452d0 pare down the pragmas some more
--Goober5000
2006-01-26 03:23:30 +00:00
Goober5000 ef1ae60796 ugh; these scripting #defines really need to be kept up-to-date 2006-01-26 02:26:17 +00:00
taylor 92c2d3724f quick and ugly hack to get aigoal sorting working on Windows again (temporary, should be replaced by better and permanent sorting function) 2006-01-25 22:51:07 +00:00
wmcoolmon ae74334f02 Maybe fix G3_count error 2006-01-25 07:46:13 +00:00
phreak f36a0b2355 htl_lines should follow zbuffering rules 2006-01-25 03:11:52 +00:00
taylor 8c46901b47 break out of error check loop after the first check in FRED since it doesn't like this for some reason 2006-01-24 13:38:30 +00:00
taylor b4c50e32d7 another NaN/div-by-0 bug 2006-01-23 13:51:11 +00:00
taylor 9a581baa79 fix d3d_bitmap_ex coloring (thanks Alpha0!) 2006-01-23 09:39:30 +00:00
taylor 18d6b377eb add fixes for capships that hit waypoints and just spin around
try and fix a big ship guard NaN error that is the result of an incredibly small forward speed value
2006-01-22 22:41:16 +00:00
wmcoolmon 6912e6cc96 0...1...2...4? 2006-01-22 19:57:35 +00:00
taylor 4ed9dd0b2b more class type name fixage (maybe an AltName: line for objettypes.tbl in the future?)
if a ship has no class_type in ai_chase() then assume it's ok to chase, but log it in debug
  (uncomment Int3() here after this has been tested a little more)
2006-01-22 14:09:01 +00:00
taylor 3f197f34e2 oops, didn't notice that was out of the wrong diff 2006-01-22 01:35:23 +00:00
taylor f771b52a56 warning fixage
don't Int3() when trying to set ship speed via sexp if ship is not in mission yet, this shouldn't be fatal
2006-01-22 01:33:39 +00:00
taylor ae1b2d91f5 newline fixage 2006-01-22 01:32:07 +00:00
taylor a71b58a223 no real need to cast these so just get it right in the first place 2006-01-22 01:31:44 +00:00
taylor 3da6678877 clear depth buffer on each page flip (may give a slight speed increase)
change error check handling again, FRED may like this better but if it starts hanging again I have another fix
little safety checks for opengl_close()
fix atexit() call for OGL closeout
2006-01-22 01:30:33 +00:00
taylor c39585a262 handle NULL ptr ref in debug message (needs to be reconsidered as to whether the function should actually return here or not) 2006-01-22 01:28:06 +00:00
taylor a3bdc81969 fix temp ptr warning, untested but could possibly be less error prone in some situations 2006-01-22 01:26:15 +00:00
wmcoolmon faa0b28008 Texture replacement stuff 2006-01-21 09:36:58 +00:00
taylor 0d515b98d4 long way to go for a simple div-by-0 fix 2006-01-21 02:43:23 +00:00
wmcoolmon 24d8f7973f Scripting updates; Special scripting image list; Better operator meta; Orientation type; Wing type; Texture type. Fix for MSVC7 compiling. 2006-01-21 02:22:05 +00:00
taylor c69ff06b94 that wasn't too smart of me, move extra anim filename size check to *after* we have found an anim 2006-01-21 01:56:58 +00:00
taylor ab81c738db don't forcefully disable multisample still (part of an old ATI fix that didn't actually fix anything) 2006-01-21 00:14:25 +00:00
taylor 922be10b2d fix for LuaError change, *again* ;) 2006-01-21 00:11:51 +00:00
taylor 9de1e7691d fix anim filename length check, they need at least 5 extra characters for the frame number on the filenames 2006-01-20 23:47:51 +00:00
wmcoolmon a2e4eb9c1b Lua unloadMission() 2006-01-20 17:37:38 +00:00
taylor 74e33659ab gr_*_bitmap_ex() stuff, D3D side is 100% untested to even compile
several other very minor changes as well
2006-01-20 17:15:16 +00:00
Goober5000 6876f5ca60 remove unreferenced variable 2006-01-20 07:50:25 +00:00
Goober5000 8dbd2dbbe7 fix warning message
--Goober5000
2006-01-20 07:21:33 +00:00
Goober5000 8ab1cf65a9 reordered #include files to quash Microsoft warnings
--Goober5000
2006-01-20 07:10:34 +00:00
Goober5000 42a84d2e8f sorted the #include listing again
--Goober5000
2006-01-20 06:26:41 +00:00
Goober5000 b70df28ade added a missing file
--Goober5000
2006-01-20 06:24:28 +00:00
Goober5000 bc18d2fcff hopefully fix the Microsoft warnings
--Goober5000
2006-01-20 06:24:01 +00:00
wmcoolmon 5215110d17 Updated FREDStubs.cpp to most current version 2006-01-20 05:35:59 +00:00
wmcoolmon b824b31eec Added FRED2 project file to CVS for MSVC7 2006-01-20 05:34:42 +00:00
Goober5000 28b019a853 fixed a sexp help message
--Goober5000
2006-01-20 04:33:21 +00:00
wmcoolmon d67df04356 GCC compile fixes 2006-01-20 03:48:35 +00:00
wmcoolmon cd7cacd004 Faster object handles 2006-01-19 22:25:01 +00:00
wmcoolmon 769608ef6d More Lua checks; added Lua vector object; better operator support. 2006-01-19 20:18:12 +00:00
wmcoolmon a657ad4cad Lua debugging stuff; gr_bitmap_ex stuff for taylor 2006-01-19 16:00:04 +00:00
taylor 7d3c621d15 don't attempt to draw glowpoints or engine glows when in wireframe mode (this may need to be a flag or something, but I'm not sure) 2006-01-19 14:06:33 +00:00
taylor 82098596a0 better error handling for OGG Voris files 2006-01-19 11:49:12 +00:00
wmcoolmon 851b4dd350 Possible overflow check 2006-01-19 05:40:19 +00:00
phreak 186f3c081e gr_render_buffer shouldn't be returning values if it's supposed to return void 2006-01-19 03:20:49 +00:00
phreak 0662cb6959 give repair-subsystem and set-subsystem-strength a fourth optional parameter used to possibly regenerate the submodel of a given subsystem
sabotage-subsystem should make the subsystems explode
2006-01-19 03:17:12 +00:00
phreak 1456c88369 obj_script_set_global() should have an #ifdef/#endif USE_LUA pair in the function body. 2006-01-19 03:15:31 +00:00
Goober5000 edecd95c92 whoops, messed up the paths
--Goober5000
2006-01-19 02:51:00 +00:00
Goober5000 82302a0aba import FRED2 back into fs2_open module
--Goober5000
2006-01-19 02:27:38 +00:00
Goober5000 0b42f5336a add lowercase .ico file 2006-01-19 02:00:39 +00:00
Goober5000 a6c212b6a9 remove uppercase .ico file 2006-01-19 02:00:00 +00:00
taylor e2f2baf557 this is probably going to end up doing something bad again when switching mods, hopefully it's not still necessary though 2006-01-18 17:45:01 +00:00
taylor 16b6d96c61 oops! :) 2006-01-18 16:36:32 +00:00
taylor db78a0f780 use HTL wireframe view if in HTL mode 2006-01-18 16:17:33 +00:00
taylor fa811c3915 allow gr_render_buffer() to take TMAP flags
let gr_render_buffer() render untextured polys (OGL only until some D3D people fix it on their side)
add MR_SHOW_OUTLINE_HTL flag so we easily render using HTL mode for wireframe views
make Interp_verts/Interp_norms/etc. dynamic and get rid of the extra htl_* versions
2006-01-18 16:14:04 +00:00
taylor 481d9b0811 if a weapon model isn't loaded then be sure to load it in weapon_create() (catches a few weird weapon setups) 2006-01-18 16:02:26 +00:00
taylor 2b241ca617 support only PCX for the nebula background graphics (given how it works that's the fastest and easiest way to get it done) 2006-01-18 16:01:14 +00:00
taylor 4999f3dc4b show poly flag setting was reversed 2006-01-18 15:59:33 +00:00
wmcoolmon 5a566f6e63 Various scripting updates 2006-01-18 06:13:18 +00:00
wmcoolmon 714844d6bb Switch ballistic weapon hudgauge to show "Energy" field in place of pure-energy weapons 2006-01-17 17:41:05 +00:00
wmcoolmon 27a9f8d43a Better state handling; added GameInit hook 2006-01-17 07:28:39 +00:00
wmcoolmon a2a550f3d3 Various minor improvements 2006-01-17 07:10:01 +00:00
wmcoolmon 9efb98785e Removed #ifdef around Object_type_names extern 2006-01-17 04:11:26 +00:00
phreak 4e77c96a9a Make sure the rearm eta isn't recalcuated until the player docks again with a support ship 2006-01-17 03:48:25 +00:00
phreak 7131c7f99d Modified the formatting for the rearm countdown timer once docked. 2006-01-17 03:46:56 +00:00
phreak f300716e93 Rearranged the rearming code so it doesn't potentially take 2 minutes to reload a single bomb. 2006-01-17 03:45:32 +00:00
wmcoolmon 38daca278d data/scripts directory 2006-01-17 02:33:20 +00:00
taylor a15e372b58 well that was super smart of me 2006-01-17 01:31:43 +00:00
wmcoolmon fb59608473 Fix scripting; Tidy up scripting.html; Replace various functions with virtual variables 2006-01-17 01:31:20 +00:00
wmcoolmon e5e7e8a8aa drawText => drawString 2006-01-16 23:29:06 +00:00
wmcoolmon fe5469090f Added support for setting handle variables with LUA_VAR; added support for array indexing with LUA_INDEXER; use LUA_SETTING_VAR to check whether in setting mode for both. Cleaned out older code 2006-01-16 21:26:19 +00:00
taylor 8804e0dcbf some minor changes to model_should_render_engine_glow(), better safety checks, support for disrupted engines
check to see if a particular engine is disabled/destroyed/disrupted before making engine wash for it
2006-01-16 20:57:03 +00:00
taylor e4c89dee9d compile fix 2006-01-16 20:54:58 +00:00
wmcoolmon c1005caecb Use obj_script_set_global for "plr" and "slf"; remove Lua variable if variable goes to NULL 2006-01-16 11:16:07 +00:00
wmcoolmon 11f8b022b0 Changed object's "getType" to "getBreed" to avoid confusion 2006-01-16 11:12:46 +00:00
wmcoolmon 1b06985486 Can't forget #End! 2006-01-16 11:07:37 +00:00
wmcoolmon abf75dd133 Various warning fixes, scripting globals fix; added "plr" and "slf" global variables for in-game hooks; various lua functions; GCC fixes for scripting. 2006-01-16 11:02:23 +00:00
phreak 018d586f49 Only display the capped normal message in debug builds 2006-01-16 07:46:03 +00:00
Goober5000 5e0aaa25dd use IFF colors in escort list 2006-01-16 05:54:21 +00:00
taylor 0247059768 correct get/set sample math, it expects 8-bit sizes so we have to convert to/from actual 2006-01-15 21:22:22 +00:00
taylor 42264f422c another NULL VEC3D warning fix 2006-01-15 18:56:45 +00:00
taylor d67327d1a7 fix compile issues from bad constructor
make sure ai_actively_pursues gets filled for modular tables too
fix NULL ptr reference when parsing ship type which doesn't exist and is set to not create
2006-01-15 18:55:27 +00:00
taylor 9b751defd2 fix stuff_boolean() debug spew 2006-01-15 18:53:19 +00:00
Goober5000 3a1fe4ae53 fix some tweaky thing that isn't even used :p
--Goober5000
2006-01-15 01:02:01 +00:00
wmcoolmon eba6d1dff9 Special shockwave and moving capship bugfix, (even more) scripting stuff, slight rearrangement of level management functions to facilitate scripting access. 2006-01-14 19:54:55 +00:00
taylor 68bf4ec453 minor OGL lighting fix 2006-01-14 19:25:55 +00:00
wmcoolmon 25bcca3dec Allow RunByteCode to return an argument 2006-01-14 10:35:41 +00:00
wmcoolmon 4fd1bc3583 New Lua feature - globals control. 2006-01-14 09:21:27 +00:00
taylor a46a87f8d2 make sure rship gets initialized before use 2006-01-14 06:25:11 +00:00
taylor c9a26f04a2 get object vars correct 2006-01-14 06:24:27 +00:00
taylor b194acc433 be sure to account for skipped mipmap levels in calculation of textures in VRAM 2006-01-14 06:23:39 +00:00
Goober5000 ab4abddc42 tweaky tweak
--Goober5000
2006-01-14 05:36:06 +00:00
phreak 1ccaa6bdcb Tried to make the sphere size more uniform on opposite ends of the orb
Modified the radar disruption angle scale a bit.  Went from 200 degree to 20 degree disruption.  Otherwise, it was very confusing to find hidden objects.
2006-01-14 04:44:29 +00:00
phreak 438a20e0d4 Make orb radar mode drawing again.
Clarify "fudge" variable used for viewing transformations
2006-01-14 03:28:29 +00:00
wmcoolmon 890f5ec6f0 Grr...fix out-of-sync game states 2006-01-14 01:51:49 +00:00
wmcoolmon 1b208224e6 Added a few more functions 2006-01-14 01:20:16 +00:00
wmcoolmon 47b556b75a Oops 2006-01-14 01:15:11 +00:00
wmcoolmon a2a76d68c7 Campaign scripting functions 2006-01-14 01:12:35 +00:00
taylor 4a3a186273 move SDL autoconf checks up so we get the defines earlier
fix some Lua build problems on Linux (enabled by default now, but with configure option)
newline fixage
comment fixage
2006-01-13 14:19:34 +00:00
taylor 5bc170d5be hmm, didn't put much thought in that the first time, this should work closer to the original but still be cleaner 2006-01-13 13:06:15 +00:00
taylor 5f3a6ec743 fix hud comm message screwups (missing support ship, no coverme, etc) that was part :V: bug and (bigger) part Ship_types related bug 2006-01-13 11:09:45 +00:00
taylor d0f071692f swap order of pilot read and reset-to-defaults so that the various entries in the pilot file don't get clobbered needlessly 2006-01-13 08:27:43 +00:00
wmcoolmon f13027481c More scripting stuff 2006-01-13 04:46:17 +00:00
Goober5000 d5b5fd1ffb add a necessary #ifdef
--Goober5000
2006-01-13 04:36:21 +00:00
Goober5000 23a63ff8d5 oops
--Goober5000
2006-01-13 04:12:23 +00:00
Goober5000 120d1f421c remove FS2_VOICER define by default; this should really be kept in local copies
--Goober5000
2006-01-13 04:11:49 +00:00
Goober5000 4d5a477f71 übercommit of custom IFF stuff :) 2006-01-13 03:31:20 +00:00
Goober5000 e8dfc52615 formatting, meh
--Goober5000
2006-01-13 02:56:01 +00:00
wmcoolmon 746b0724b9 Even more scripting stuff. 2006-01-12 17:42:56 +00:00
wmcoolmon 5be88dfe76 Finished committing codebase 2006-01-12 04:18:10 +00:00
wmcoolmon 8da9a3b27e Oops, missed a file 2006-01-12 04:16:27 +00:00
wmcoolmon 59f4b02108 Fix bug with float return; update scripting.html format 2006-01-11 22:09:41 +00:00
wmcoolmon 26c50c18cb More scripting functions, various scripting enhancements 2006-01-11 21:24:37 +00:00
wmcoolmon dacfc2d704 Made turret handling code more descriptive 2006-01-11 21:23:43 +00:00
wmcoolmon 82d4e2aa4e Somewhat better turret comments 2006-01-11 21:15:15 +00:00
taylor 9356140569 allow for an equals value in qsort() comparison function, will hopefully fix Enif station bug and not cause any new problems 2006-01-11 05:42:17 +00:00
taylor d96d446600 use cf_find_file_location() check instead of cfopen() for is_spary_hi check 2006-01-11 05:40:59 +00:00
taylor ce47200c01 newline fixage 2006-01-11 05:40:09 +00:00
taylor 97129e0e9c skip ourselves in hostile check, this isn't really needed since it's handled by the next check but for clarity sake it's here now 2006-01-11 05:39:49 +00:00
wmcoolmon b899086978 Complete the HUD scripting hook. (Eight lines of code, and I still miss three of them. :P 2006-01-11 01:35:53 +00:00
randomtiger cfbdf6837b Took demo compile flag off. 2006-01-10 18:39:40 +00:00
randomtiger fcd67856f7 Improvements to voice recognition system.
Also function put on -voicer launcher option.
2006-01-10 18:37:46 +00:00
phreak 9b606a5424 Fixed a logic error when dealing with non-targetable subsystems 2006-01-10 01:23:09 +00:00
phreak 8c8148f6ee Add the argument for alpha color when using set-jumpnode-color. This was defaulting to some junk value and making the jumpnode disappear. 2006-01-10 00:12:08 +00:00
phreak 098e3a9b93 Argument checking when setting jumpnode color. 2006-01-10 00:11:03 +00:00
phreak 7665133851 Remove tertiary weapons in their current form, I want something more flexable instead of what I had there. 2006-01-09 04:54:51 +00:00
phreak 0c663d84ee fix compile warnings. 2006-01-09 04:52:34 +00:00
taylor 36815c10e0 newline fixage 2006-01-08 13:05:41 +00:00
taylor 5a0c85036d make sure that thrusters will still render with a missing primary bitmap if they have a primary glow 2006-01-07 12:48:04 +00:00
taylor 377c88c1ee I refuse to comment on my own stupidity! (fixes music interruption) 2006-01-06 11:25:29 +00:00
wmcoolmon 07fb5808d6 turret-target-order SEXPs, ship thrusters 2006-01-06 04:18:55 +00:00
taylor 9d2f4e7eb4 make Split_ships[] dynamic (wouldn't have been a big deal to just bump the limit, but what the hell) 2006-01-05 11:34:44 +00:00
taylor c1fc671d6a add a .cvsignore file for lua so there isn't a worry of commiting something bad 2006-01-05 08:06:03 +00:00
wmcoolmon 3f8ffbbea8 Fix supercap 2006-01-05 05:54:16 +00:00
taylor 25b15af791 allow both +Pri style and original style (+Normal, etc) for species_defs TBMs
allow for "<none>" as a bitmap/anim name, to have no effect
fix ship/weapon thruster rendering to handle missing primary animation and/or glow graphics
2006-01-05 05:12:11 +00:00
wmcoolmon 3e9b38313e Flak weapons only use detonation range if targets are further away than $Det range 2006-01-04 21:48:36 +00:00
taylor 741e151cac fixes for regular texture replacement 2006-01-04 08:19:22 +00:00
taylor e65c1ac033 fix files corrupted by RTs commit 2006-01-03 23:24:54 +00:00
taylor 0a6578c8b6 oops, should have been checking my logs on that one, fixes minor GL error 2006-01-03 22:46:52 +00:00
randomtiger 0bcad1ccc4 Fixed bad phrases path 2006-01-03 20:13:23 +00:00
randomtiger 3603e36d13 Removed bad phrases.cfg reference 2006-01-03 18:09:31 +00:00
randomtiger 7bf193c5e4 Added voice recognition functionality for Visual C6 project only.
Currently still a work in progress.
2006-01-03 17:07:11 +00:00
taylor 54478d16f8 weapon precedence wasn't getting read in on normal weapon.tbl parse, should fix the missing primary weapons in early retail missions 2006-01-03 06:02:59 +00:00
taylor 71d9935877 fix freaky nan error on line drawing where model would get loaded on second entry into WS screen when it should be animation 2006-01-03 06:02:00 +00:00
taylor fae386d216 fix a couple of minor mipmap problems
add resizing with mipmaps rather than a physical change in memory when detail levels dictate scaling (maybe this won't blow up)
2006-01-03 02:59:14 +00:00
taylor 7d260f5258 can't overwrite node var here, it's original value is needed later and was throwing out NULL chars in the Warning()s 2006-01-02 21:28:52 +00:00
taylor 09d76a1a12 remove ALUT headers, we don't it anyway and it's not included with OpenAL anymore 2006-01-02 07:26:43 +00:00
taylor 3e1c3c6ff4 don't specify a read buffer, something with this is screwing up ATI cards, a debug string should satisfy a hunch
ifdef out the bumpmap stuff, it's very wrong anyway :)
2006-01-02 07:25:11 +00:00
taylor 0f6eeb3288 use cf_find_file_location() for objecttypes.tbl rather than a cfopen()
fix a few compiler warning messages
2006-01-02 07:16:43 +00:00
taylor 0784e3bee9 make sure we clear out the vertex used to render a sun (just to be on the safe side)
use parse_modular_table() for -str.tbm
2006-01-02 07:13:38 +00:00
taylor 814e5ad084 those blasted Windows programmers! ;) 2006-01-02 07:12:24 +00:00
taylor 3d3d559ac5 start of DDS volume/cube map support (rest of this needs code not ready for CVS but this will be needed later) 2006-01-02 07:11:41 +00:00
phreak 2e56c91d73 add def_files.h and def_files.cpp to code project. 2006-01-02 03:55:28 +00:00
phreak 49b3d63b9c this should have an ifdef/define/endif block 2006-01-02 03:54:27 +00:00
wmcoolmon 20d88460fc Changed num-within-box wing function 2005-12-31 01:49:53 +00:00
wmcoolmon b59fa2bfeb num-within-box 2005-12-31 01:47:35 +00:00
taylor adb851dc54 forgot to include autoconf/automake versions 2005-12-30 10:12:53 +00:00
taylor 45f09f4f33 update Linux build steps 2005-12-30 10:11:02 +00:00
taylor bd2bb9c1be add def_files 2005-12-30 09:57:53 +00:00
wmcoolmon c1b77841ad Assert -> parse warning 2005-12-30 05:40:19 +00:00
wmcoolmon 0a3f63d090 Updated MSVC projects 2005-12-30 00:53:00 +00:00
taylor 1b2a6031e2 we are using gouraud lighting here so be sure to set the proper tmap flag (fixes D3D, corrects OGL) 2005-12-29 20:12:51 +00:00
wmcoolmon 1823576e8b Fix(?) shiptypes.tbl crash on startup 2005-12-29 12:44:45 +00:00
wmcoolmon 246cfcfa65 Codebase commit, most notably including objecttypes.tbl 2005-12-29 08:08:42 +00:00
taylor 56886a1234 add <gamedir>/screenshots support and save screenshot images in TGA rather than BMP format 2005-12-29 07:58:02 +00:00
taylor 150e297236 put texture filter debug message back (was commented out for some reason in phreak's commit) 2005-12-29 04:33:15 +00:00
phreak e34bb97cd1 loading code for flipped briefing icons. 2005-12-29 00:56:45 +00:00
phreak 46b45b6717 mirror parameter in hud_anim_render(). only used when briefing icons are fading in. 2005-12-29 00:54:08 +00:00
phreak 78e2ce963c changed around aabitmap calls to accept a "mirror" parameter. defaults to false, and is only true for mirrored briefing icons.
If the mirror param is true, then the picture is mirrored about the y-axis so left becomes right and vice versa.
2005-12-29 00:52:57 +00:00
phreak 242d9bf764 Briefing icons can now be mirrored so one can point them in the opposite direction. 2005-12-29 00:49:43 +00:00
taylor bf0efdb895 add support for a species_defs modular table with XMT support (*-sdf.tbm) 2005-12-29 00:01:29 +00:00
taylor fa632ab2ee handle case where we make an atexit (on failure) flush call before the texture system is initted 2005-12-29 00:00:18 +00:00
taylor ad3d78a256 getting tired of having to ifdef the snprintf/_snprintf thing that Microsoft can't do right 2005-12-28 22:34:01 +00:00
taylor 12bd9f5c9e properly deal with post-89 TGA images which have extra extension and developer info in the file 2005-12-28 22:32:37 +00:00
taylor 8402d67ee8 unused variable (to make GCC shut up) 2005-12-28 22:31:03 +00:00
taylor cccc259cb1 add fl_tan() for getting the tangent of a float since it's terribly inaccurate to just use tan() on a float 2005-12-28 22:30:24 +00:00
taylor 0b6ed1b5b0 add support for glCompressedTexSubImage2D(), we don't use it yet but there is nothing wrong with adding it already
better support for mipmaps and mipmap filtering
add reg option "TextureFilter" to set bilinear or trilinear filter
clean up bitmap_id/bitmap_handle/texture_handle madness that made things difficult to understand
small fix for using 24-bit images on 16-bit bpp visual (untested)
2005-12-28 22:28:44 +00:00
taylor 0762e9f864 save screenshots into <gamedir>/screenshots/
another attempt at fixing popups with single colors (saves memory too, hope it doesn't blow up)
add a debug msg about mipmap filter in use
2005-12-28 22:24:48 +00:00
taylor 8385fc99ea clean up the EVENT and STATE names so we don't have to manually backtrack the number during debugging 2005-12-28 22:22:34 +00:00
taylor f2db1ce34b Oops, bit of debug stuff I didn't mean to commit (but something similar is needed so you'll it again) 2005-12-28 22:21:04 +00:00
taylor 425c7b86b4 deal with cf_find_file_location() changes
add a central parse_modular_table() function which anything can use
fix up weapon_expl so that it can properly handle modular tables and LOD count changes
add support for for a fireball TBM (handled a little different than a normal TBM is since it only changes rather than adds)
2005-12-28 22:17:02 +00:00
taylor 33ac33bb08 properly deal with non-compressed images with mipmaps (image size didn't include mipmaps before 2005-12-28 22:07:46 +00:00
taylor 79e0e6b355 fix up cf_find_file_location() and related elements so that it's safer (based on WMC's work, but actually safe this time ;)) 2005-12-28 22:06:48 +00:00
taylor b84bce6e8f allow for 24-bit user created bitmap images
make sure we have proper memory size requirements for non-DDS EFFs
2005-12-28 22:04:00 +00:00
taylor a0329bfabb fix a couple of beam section issues when using modular tables 2005-12-24 04:18:57 +00:00
taylor 90d6bce698 one more attempt to fix screenshots on Radeons. 2005-12-22 19:15:20 +00:00
taylor 9c03aedbf3 changes to add Lua
don't use compatibility SDKs
2005-12-22 04:36:03 +00:00
taylor 819c13f658 more big-endian fixes
fix the totally retarded check I made for multi fighter beams (they really don't work right yet anyway) since it broke normal beams for clients
2005-12-22 04:35:04 +00:00
taylor 398f122676 MSVC6 was being a pain about this 2005-12-22 04:33:12 +00:00
taylor 335e3b5adf GCC knows that fix == int so it hates the utility functions here, for sanity sake just rename them to type specific to avoid rampant casting 2005-12-22 04:32:44 +00:00
taylor eddf28ad6e add the name of the modular table about to be parsed to the debug log
a missing weapon_expl table should just be a note in the debug log rather than a popup warning
2005-12-21 08:27:37 +00:00
taylor 4c906966a3 allow the show-all hotkey to work on all techroom tabs
address a couple of possible memory leak issues that could have come up in the future
2005-12-21 08:24:51 +00:00
wmcoolmon 8c7b258e51 Swap beam fixed/animation image loading order 2005-12-18 20:13:26 +00:00
wmcoolmon e5c23334bc Added +nocreate and more verbose index handling for beam sections 2005-12-17 00:59:48 +00:00
wmcoolmon 3bc1b2f1be Better handling of beam overrides (bm_unload textures as they are replaced) 2005-12-17 00:50:55 +00:00
taylor 83eeeb3a35 ehh, didn't ever fix that to my satisfaction, bastardize it until more work can be done (so people don't start filing bug reports) 2005-12-16 16:34:35 +00:00
taylor e4a6cc9aeb apply at least some lighting to ship insignias rather than them being full bright 2005-12-16 06:54:10 +00:00
taylor bfce103ded fix a NULL pointer crash from shipselect screen
make sure to reset "display_type" for weapon select since it would only render one ship correctly
  (still something wrong here WMC, try using models without -ship_choice_3d, everything is positioned too high on screen)
2005-12-16 06:51:31 +00:00
taylor 9ac1accce9 "House Keeping!!"
- minor cleanup of things that have bothered me at one time or another
  - slight speedup from state switching
  - slightly better specmap handling, fixes a couple of (not frequent) strange and sorta random issues
  - make sure to only disable HTL arb stuff when in HTL mode
  - handle any extra lighting pass before spec pass so the light can be applied properly
2005-12-16 06:48:28 +00:00
wmcoolmon 6264b3f9fa Keep a crash from happening if POF file isn't initially specified 2005-12-16 03:36:21 +00:00
taylor 2520f81baa fix limits checking messages to actually be useful and hit sooner (wireframe view of some hi-poly models was going out-of-bounds from normals) 2005-12-15 16:31:03 +00:00
taylor 76eda9798d make sure we always disable all VBO related elements to avoid crashing (new that was a problem, did it anyway, me == stupid) 2005-12-15 16:27:45 +00:00
taylor 4c42eb6fcc didn't mean for that to hit CVS, it makes neb missions work a little strange 2005-12-15 16:26:35 +00:00
phreak f4a2c22285 Countermeasres parameters. Lets users specify how easily missiles are spoofed by countermeasures
A missile is given a seeker strength.  Aspect default of 2.  Heat default of 3.  This is a missile's resistance to spoofage
A countermesaure is given an effectiveness for each type.  The defaults for countermeasure heat and aspect effectiveness are both 1.
Also gave the countermeasure an effective range.  Default is 300 meters.

A missiles chance of being spoofed is calculated by <cm type effectiveness>/<seeker strength>
So by default, 1/2 of aspect seekers will be fooled by a countermeasures, while 1/3 of heat seekers would be spoofed by default.

Also i gave the option of aspect missiles having a view cone different from 180 degrees.  This parameter is optional and doesn't effect anything already there.
2005-12-15 06:03:50 +00:00
phreak 79ba02b4e2 [V] can't spell 'turret' 2005-12-15 04:31:05 +00:00
wmcoolmon f8afaf5a62 Added script_lua_callback 2005-12-14 20:31:18 +00:00
taylor 957a5ad360 should have tested that better, it was still finding or ignoring options that it shouldn't if they were in the wrong order on
the same source (source being the two possible cmdline_fso.cfg files and the actual args passed on the cmdline)
2005-12-14 17:58:26 +00:00
phreak 013cb53c1e Handling of exit explosions for beams when a ship is about to get destroyed, or according to the code: "tooled".
Bumped beam frame collisions to 10 to compensate.
2005-12-14 08:07:33 +00:00
wmcoolmon 1aef275407 Ability to disable damage particle spew on ships 2005-12-13 22:32:30 +00:00
wmcoolmon c4fd42c48e Grr, how did I miss this? 2005-12-13 21:50:20 +00:00
wmcoolmon 23b4ed0f70 Music TBL to proper XMT file (-mus) 2005-12-13 21:48:39 +00:00
wmcoolmon 9cff1a52c0 Minor XMT-engine wash fix 2005-12-13 20:20:20 +00:00
taylor b36baacca7 Hmm, .triggers isn't ever malloc'd for the Ships[] copy so don't try to free it since it's actully trying to free the Ship_info[] memory instead, which is bad :)
(newer glibc just starting going monkey over this, not sure why it didn't screw up before)
2005-12-13 18:15:26 +00:00
phreak b0b9202aa2 various countermeasures related fixes. Special cases needed to be handled. 2005-12-13 05:27:36 +00:00
taylor 53e120a16d make sure that the value of model_current_LOD stays with the detail_level value so that it's properly capped when used latter
undo the locked detail level change, all of the LOD textures are cached (or should be) so that really only hurt speed rather than helping
2005-12-12 22:04:19 +00:00
taylor 5bb3145073 allow use of a specific LOD for ship and weapon rendering in the hud targetbox 2005-12-12 21:32:14 +00:00
taylor 37fad529ab double free and invalid ptr reference fixage 2005-12-12 05:29:59 +00:00
taylor e0a4ca8494 switch the shockwave pof and normal names back to the correct spots, this was probably causing some
3-D shockwave usage issues since they wouldn't have rendered
2005-12-08 15:33:39 +00:00
taylor 4b34bbca19 fix several bad crash related problems from WMC's commits on the 4th 2005-12-08 15:17:35 +00:00
taylor ff5da43159 a few game_busy() changes 2005-12-08 15:11:29 +00:00
taylor 1dd17dc698 add APPLE_client_storage support to improve texture performance and reduce memory usage a tiny bit on OS X 2005-12-08 15:10:07 +00:00
taylor 3d31ed046d signed->unsigned compiler warning fix 2005-12-08 15:08:39 +00:00
taylor 30bd180186 remove GL_NO_HTL define since it's basically useless at this point and can produced non-functioning builds
minor cleanup and readability changes
get Apple GL version change in CVS finally, the capabilities of an Apple GL version don't neccessarily correspond to it's features
2005-12-08 15:07:57 +00:00
taylor 926c78f347 fix last bit of recent spec issue 2005-12-07 12:40:51 +00:00
taylor c1f4db610f partial spec fix, can't mass kill the pointers when they are still needed for the second pass (still something else wrong though)
forgot that the extra rangeelement optimization check isn't needed anymore, just look at indices since that's all we're using
2005-12-07 05:42:50 +00:00
taylor 4501a1fc95 bah, X sucks. I need to beef up error handling there in order to make all of the platforms happy. 2005-12-07 05:39:50 +00:00
taylor eee058af11 make sure with cmdline option check that it's the actual option (-spec was getting picked out of the -spec_* options by mistake) 2005-12-07 05:38:32 +00:00
taylor 253e2ac803 15 individual commits, ya had know I was going to miss something :) 2005-12-06 17:53:25 +00:00
taylor 4fd616b2c5 cleanup some debug log messages:
note that a nprintf() with "Warning" or "General" is basically the same thing as mprintf()
  make sure that OpenAL init failures always get to the debug log
2005-12-06 03:17:48 +00:00
taylor 9d5d9b20a7 add a couple of Assert()'s that it doesn't otherwise check for 2005-12-06 03:15:47 +00:00
taylor c6274f2ffc fix for string overwrites with get_version_string() 2005-12-06 03:14:45 +00:00
taylor 22b9889d33 fix quite a few CFILE issues:
use #define's for path lengths when possible so it's easier to move between functions
  fix huge Cfile_stack[] issue (how the hell did that get through ✌️ QA?)
  add Int3() check on cfopen() so it's easier to know if it get's called before cfile is ready to use
  move path separators to pstypes.h
  fix possible string overruns when setting up CFILE roots
  make sure we don't try to init current directory again thinking it's a CD-ROM
  add the list of VP roots to debug log, this will undoubtedly be useful
when -nosound is use go ahead and set -nomusic too to both checks are correct
add list of cmdline options to debug log
fix possible overwrite issues with get_version_string() and remove '(fs2_open)' from string plus change OGL->OpenGL, D3D->Direct3D
2005-12-06 03:13:49 +00:00
taylor d11422acc2 add base support for 8-bit DDS images
clean up some DDS error messages and other minor bug/comment fixes
move bitmap stuff from pstypes.h, it makes more sense here anyway
start of 8-bit palette conversion, needs work but is here for WMCoolmon to look at and play with
2005-12-06 03:05:53 +00:00
taylor 83ecc534e5 move the pragma warnings here from pstypes.h for Windows
add indexed palette support for DDS images
2005-12-06 03:02:28 +00:00
taylor 32f6b62c8f add a nomusic check to not get an error when eval on the change soundtrack sexp 2005-12-06 03:01:25 +00:00
taylor f0db463f56 get away from using CFILE here, needed this to change cfile init order 2005-12-06 03:00:09 +00:00
taylor 367e8e6ed2 sorry but the extra messages are somewhat annoying and already exist in another log anyway, disable by default 2005-12-06 02:59:10 +00:00
taylor 1cbac94676 just to be on the safe side 2005-12-06 02:57:57 +00:00
taylor 2bc0f172ce if for some reason we don't end up using a joystick then shut down the subsystem, saves a few cycles 2005-12-06 02:56:15 +00:00
taylor d7b1346adb little consolidation:
move path separator stuff here from cfile.h
  move the pragma warnings to config.h, since they produce warnings on anything that's not MSVC
  move the bmpman related stuff to bmpman.h, if you need this stuff you have to include bmpman.h anyway
2005-12-06 02:55:22 +00:00
taylor 7ea4a5de2e clean up some D3D debug messages to better match new OGL messages (for easier debugging)
remove D3D_32bit variable since it's basically useless and the same thing can be done another way
2005-12-06 02:53:02 +00:00
taylor 985e6522fa clean up some init stuff and fix a minor SDL annoyance
make debug messages a bit more readable
clean up the debug console commands for minimize and anisotropic filter setting
make anisotropic filter actually work correctly and have it settable with a reg option
give opengl_set_arb() the ability to disable all features on all arbs at once so I don't have to everywhere
2005-12-06 02:50:41 +00:00
wmcoolmon 76a6a274a1 Oops, arand should only be generated if it isn't passed to the function as well. 2005-12-05 09:09:53 +00:00
wmcoolmon 2ad2aa2aef "laser" and "missile" to "primary" and "secondary" 2005-12-05 01:54:16 +00:00
Goober5000 a324693691 fix compiler error
--Goober5000
2005-12-04 22:44:00 +00:00
wmcoolmon 683c612e53 Post-final commit 2005-12-04 19:12:53 +00:00
wmcoolmon 15b30e3177 Final commit of codebase 2005-12-04 19:07:49 +00:00
wmcoolmon 9e9afefeb8 Slightly better main hall error handling 2005-12-04 19:06:01 +00:00
wmcoolmon 416bfa7372 Better weapon handling for techroom (more dynamic-limits friendly) 2005-12-04 19:05:06 +00:00
wmcoolmon 9fea22d551 Better XMT beam section handling ("+Index:"); weapon shockwave armor support; countermeasures as weapons 2005-12-04 19:02:36 +00:00
wmcoolmon ee09b63444 Attempt to fix OpenGL crash-on-debug-exit 2005-12-04 18:59:18 +00:00
wmcoolmon 3e2d1800f2 subsystem + shockwave armor support; countermeasures as weapons 2005-12-04 18:58:07 +00:00
wmcoolmon 3860e7eab3 Better overhead-view handling 2005-12-04 18:55:42 +00:00
Goober5000 fc71c4781b bypass annoying warnings when loading optional models
--Goober5000
2005-12-01 07:45:21 +00:00
phreak c6881022f7 texturing shouldn't be on when drawing lines. 2005-11-30 03:07:54 +00:00
wmcoolmon 4c50d3de10 no message 2005-11-27 23:54:13 +00:00
Goober5000 28a7c73be0 bah, forgot a colon
--Goober5000
2005-11-24 09:08:44 +00:00
Goober5000 c3bfdce5f4 * cleaned up mission_do_departure
* fixed a hidden crash (array index being -1; would only
be triggered for ships w/o subspace drives under certain conditions)
  * removed finding a new fighterbay target because it might screw up missions
  * improved clarity, code flow, and readability :)
* added custom AI flag for disabling warpouts if navigation subsystem fails
--Goober5000
2005-11-24 08:46:11 +00:00
taylor b295119800 fix fred2 startup crash (we probably need to Assert() this case so it doesn't easily happen again) 2005-11-24 07:27:14 +00:00
phreak 2fa4e4bfff Added wiki help for -rearm_timer and -missile_lighting 2005-11-24 06:46:39 +00:00
phreak 0539edac2a Added -missile_lighting command line 2005-11-24 06:37:47 +00:00
phreak e92d279af7 Apply lighting to missiles if -missile_lighting command line is set. 2005-11-24 06:37:17 +00:00
phreak 6216367f79 Forgot to add in the part where the rearm timer actually counts down. Minor oversight 2005-11-24 03:07:35 +00:00
taylor 4806fd38dc yeah I know, I should have noticed that little jewel *before* the commit 2005-11-23 06:59:09 +00:00
taylor 0f0c4c61fe make sure all weapons that will get used later in a mission get preloaded 2005-11-23 06:55:47 +00:00
taylor ed29933ae9 crash fix for using flak without having something targetted 2005-11-23 06:54:28 +00:00
taylor a927686ddf when using cheats be sure to properly load up all weapons that aren't already paged in 2005-11-23 06:53:22 +00:00
phreak 6b3fea1de6 whoops i should test my code sometimes 2005-11-23 04:05:23 +00:00
phreak 7a23e780a8 Added the function to estimate rearm and repair time. 2005-11-23 01:06:58 +00:00
phreak 9cbd504e25 Player repair rearm completion timer display added. 2005-11-23 00:49:51 +00:00
phreak d83b89e3fb Calculate player repair timer when the support ship docks to him. 2005-11-23 00:46:26 +00:00
phreak 5926fa1ede Command lines for rearm countdown timer. 2005-11-23 00:43:20 +00:00
taylor 7a0adb4233 yuck, ugly mistake on my part (thanks Goober!) 2005-11-22 04:50:52 +00:00
taylor 9df5fc333e combine weapon_info_close() and weapon_close()
changes to allow use of weapon_expl.tbl and the modular table versions once more
 - the tables aren't required (but a warning will be produced if weapon_expl.tbl doesn't exist)
 - don't back load LODs, if it's not there then don't use it
 - handle a couple of error conditions a bit better
2005-11-22 00:01:11 +00:00
taylor f83daa497c some minor thruster cleanup, if you could actually use the term "clean" 2005-11-21 23:57:26 +00:00
taylor f911f08298 move generic_* functions to their own file 2005-11-21 23:55:57 +00:00
taylor b97ab28144 add generic.cpp and generic.h 2005-11-21 23:55:00 +00:00
taylor 3d82447d09 little cleaner, lot more friendly to 64-bit archs (long type is usually 64-bit there) 2005-11-21 15:01:18 +00:00
taylor ca5ceb38dc add ai_profiles.cpp/.h 2005-11-21 14:57:08 +00:00
taylor b02e8aeb22 i minus u ;) (should fix overzealous directives list) 2005-11-21 13:04:08 +00:00
Goober5000 ba412c3625 remove old files
--Goober5000
2005-11-21 03:51:03 +00:00
Goober5000 7405fae9fc bah and double bah
--Goober5000
2005-11-21 03:47:51 +00:00
Goober5000 60a2e75bb5 and the project file
--Goober5000
2005-11-21 02:46:36 +00:00
Goober5000 b33caf6f45 change from "setting" to "profile"; this way makes more sense
--Goober5000
2005-11-21 02:43:37 +00:00
Goober5000 7354f81ebd add a flag to re-enable shockwaves damaging subsystems (from FS1)
--Goober5000
2005-11-21 01:53:57 +00:00
Goober5000 66f809de42 whoops
--Goober5000
2005-11-21 00:52:19 +00:00
Goober5000 956e48daf4 add ai_settings.tbl
--Goober5000
2005-11-21 00:50:02 +00:00
taylor 9a9a30324e get rid of the while() loop, OGL doesn't stack errors (this killed FRED2 for some reason even though no error was present) 2005-11-18 13:13:47 +00:00
Goober5000 05fc218515 Wiki links updated; many thanks to StratComm :)
--Goober5000
2005-11-18 08:03:23 +00:00
Goober5000 bd9d7150a6 made arrival invalidation more efficient
(probably only a small speedup, but meh)
--Goober5000
2005-11-18 07:53:27 +00:00
taylor d9bf72f1e1 fix for thruster glows (affecting TBP mainly but OC as well):
- thruster glows should always come from ship entry rather than species (it will be initted by the species entry at first)
 - this obviously needs some work done on it but that gets dangerously close to a rewrite and that isn't something I have time for
2005-11-17 20:52:02 +00:00
wmcoolmon d1e8839166 Small fix for XMTs 2005-11-17 05:12:42 +00:00
taylor 821d18bc64 fix crash on kamikaze deaths 2005-11-17 02:31:36 +00:00
taylor e67246a0da correct a little EFF fubar from my -img2dds commit
vocalize EFF loading errors so that they get noticed and fixed sooner
2005-11-17 02:30:49 +00:00
taylor de93963994 pretty sure my brain wasn't working that day 2005-11-17 02:29:21 +00:00
taylor 368afa64da don't try to apply a shockwave force if there is no actual force to apply, avoids needless math and fixes a NULL vec3d warning 2005-11-16 21:27:31 +00:00
taylor dd30247a35 switch from strchr() to strrchr() for extension checks in order to allow for multiple periods in a filename 2005-11-16 21:25:34 +00:00
taylor c0f2766693 allow for badly encoded ADPCM files if it was otherwise decoded properly 2005-11-16 09:16:24 +00:00
taylor a1ee36aa50 umm, no one saw that, right? :) 2005-11-16 07:45:35 +00:00
taylor e08b1d17ea bunch of error checking and code cleanup for the team stuff in ship/weapon select 2005-11-16 05:46:27 +00:00
taylor 1cb151485e didn't mean for that to hit CVS, stops FRED2 from crashing on exit 2005-11-14 08:39:00 +00:00
taylor 8855e5dfde now able to build with OpenAL 1.0 and 1.1 thanks to newer OpenAL CVS changes (patch from icculus.org FS2 mailing list) 2005-11-14 05:12:01 +00:00
Goober5000 a3a5b01f4a fix the icons.tbl bug
--Goober5000
2005-11-13 23:02:04 +00:00
Goober5000 8cc7793044 this should fix the no-warp-effect bug
--Goober5000
2005-11-13 22:27:17 +00:00
taylor c4259f2c0c cmdline option cleanup:
remove from launcher -pcx32, -cell, -UseNewAI
remove from game -loadonlyused, -dxt, -pcx2dds
rename -d3dmipmap, -d3d_no_vsync, -dnoshowvid to non API specific sounding names
add -nograb into help output under Linux/OSX
add -loadallweps and -img2dds
2005-11-13 06:55:38 +00:00
taylor 36955a02fc minor cleanup and comment cleanup about bpp usage 2005-11-13 06:52:06 +00:00
taylor a6ce70ed7e don't fail if not a starfield pof to load, regular starfield bitmaps don't hard fail so this shouldn't either 2005-11-13 06:50:57 +00:00
taylor 9a2ea9c758 small big-endian fix 2005-11-13 06:49:32 +00:00
taylor d79cf2dee8 -loadonlyused in on by default now, can be turned off with -loadallweps 2005-11-13 06:49:05 +00:00
taylor 79d4c25871 make sure that we don't get "-transport" in with the transparent filename check (TBP bug) 2005-11-13 06:47:26 +00:00
taylor 1c1b2c6885 some minor movie cleanup, not what I would like but enough for now 2005-11-13 06:46:10 +00:00
taylor d7a0c971f0 minor cleanup of old code and consolidate the texture compression checks into this one place 2005-11-13 06:45:24 +00:00
taylor 0fe5be4fe9 small bit of EFF cleanup
add -img2dds support
cleanup some D3D stuff (missing a lot since the old code is so unstable I couldn't get it working like I wanted)
some minor OGL cleanup and small performance changes
converge the various pcx_read_bitmap* functions into one
cleanup/rename/remove some cmdline options
2005-11-13 06:44:18 +00:00
taylor a540ad1093 add support for 8/16/24/32 bit output from ani frame decoder 2005-11-13 06:40:19 +00:00
taylor 870804583d remove Cmdline_cache_ani support, it only worked if not in a VP and only on streaming ani so it was pretty much useless 2005-11-13 06:39:38 +00:00
taylor fc38bb1aca never did port this stupid thing to PPC 2005-11-13 06:38:04 +00:00
taylor bc7cc673ee always produce BGR ordered images rather than RGB 2005-11-13 06:37:24 +00:00
taylor 65d99daf39 add LUA building for MSVC6 2005-11-13 06:36:52 +00:00
phreak 56c97212d6 LuaError() body should not be compiled into the code unless USE_LUA was defined in the project file. 2005-11-13 05:25:59 +00:00
wmcoolmon 7cd75811db More warnings instead of Int3s/Asserts, better Lua scripting, weapons_expl.tbl is no longer needed nor read, added "$Disarmed ImpactSnd:", fire-beam fix 2005-11-08 01:04:02 +00:00
wmcoolmon 4ab0828478 Fixed capitalization 2005-11-05 11:00:50 +00:00
wmcoolmon 74879598df Int3() --> Warning 2005-11-05 10:26:09 +00:00
unknownplayer a2b5c17d0e Committed the DX9 December 2004 SDK. None of the DX9 changes have been committed however. This might break the MSVC 2003 build since DX9 and DX8 share the DX8 include files. Just eliminate one from the library paths if you have any problems. 2005-11-05 09:31:45 +00:00
wmcoolmon 26dc0eb8f1 Forgot the breathalyzer 2005-11-05 08:39:10 +00:00
wmcoolmon 7450bb4c84 Fix for this old and silly bug. 2005-11-05 08:38:36 +00:00
phreak 12ecdcee1a add/remove-sun-bitmap. Also changed "Ship_arrival_list" to "ship_arrival_list" since the former technically doesn't exist due to the capital 'S'. 2005-11-05 07:42:09 +00:00
wmcoolmon b3d4879346 Support for using Lua files for hooks 2005-11-05 05:13:05 +00:00
wmcoolmon b3e7e10a64 Fix(?) for checking whether a weapon is armed or not 2005-11-05 05:12:21 +00:00
wmcoolmon 08f49c1cc1 Slight optimization 2005-11-05 05:11:29 +00:00
wmcoolmon de875a5b47 Removed unneccessary casts 2005-11-05 05:08:58 +00:00
wmcoolmon 899f22b4f1 turret-change-weapon 2005-11-05 05:06:13 +00:00
Goober5000 2a7c6f3f8d remove unused commented stuff
--Goober5000
2005-10-31 09:12:16 +00:00
Goober5000 edb760d4a6 bit of tweakage
--Goober5000
2005-10-31 09:09:41 +00:00
wmcoolmon 0118ff2b47 Support for passing C pointers w/ LUA 2005-10-31 08:57:40 +00:00
wmcoolmon f840b9aac1 Support for custom operators in Lua 2005-10-31 06:37:17 +00:00
Goober5000 5d5f8abf6d stuff for comparing ship classes
--Goober5000
2005-10-30 23:45:45 +00:00
Goober5000 9b9e3dbc7e added scripting stuff to MSVC project
--Goober5000
2005-10-30 21:05:24 +00:00
Goober5000 ccd9fef895 fix the support ship spawning bug
--Goober5000
2005-10-30 20:42:45 +00:00
Goober5000 ff3cb87bb6 comment fixage 2005-10-30 20:20:44 +00:00
taylor 3c2f9cd4c2 add a bunch of Assert()'s and NULL checks to either help debug or avoid errors
fix Mantis bug #381
fix a small issue with the starfield bitmap removal sexp since it would read one past the array size
2005-10-30 20:03:40 +00:00
taylor f19b013589 same basic cleanup and self-sanity changes
split up WinMain() and main() so it doesn't resemble ifdef hell
rename WinMainSub() to game_main() and move anything that should have been in WinMain() to WinMain()
2005-10-30 20:00:22 +00:00
wmcoolmon 07cd84e050 Display a special dialog if the player tries to continue a campaign with no missions 2005-10-30 19:22:31 +00:00
wmcoolmon 7d7a5de047 Return an error if mission_campaign_next_mission() is called when the campaign has no missions 2005-10-30 19:21:45 +00:00
wmcoolmon f246e61ae7 Fix scripting.html 2005-10-30 18:19:58 +00:00
taylor 12997f37b2 add Lua support for automake/autoconf 2005-10-30 10:46:23 +00:00
taylor 3ea8c641bf fix a couple of campaign savefile bugs for WMC 2005-10-30 10:45:19 +00:00
wmcoolmon bb3e884c38 Codebase commit - nebula.tbl, scripting, new dinky explosion/shockwave stuff, moving muzzle flashes 2005-10-30 07:10:20 +00:00
wmcoolmon 78fab0c331 Codebase commit - nebula.tbl, scripting, new dinky explosion/shockwave stuff, moving muzzle flashes 2005-10-30 06:45:00 +00:00
Goober5000 50752e3e42 multiple ship docking implemented for initially docked ships
--Goober5000
2005-10-29 22:09:31 +00:00
taylor d5b777093f Add some error checking and handling to better deal with possible problems, and to let us know what/where they are 2005-10-29 12:26:58 +00:00
taylor 63db92b251 bullet-proof the loadout read a little bit (did this before and had it locally, must have missed CVS) 2005-10-29 12:25:49 +00:00
wmcoolmon 0e1fe216c3 Safeguard against saved loadout and loadout changes. 2005-10-29 09:06:52 +00:00
wmcoolmon b8509e1701 Better alloc_block function 2005-10-29 09:02:13 +00:00
wmcoolmon 354e641cc6 Minor change to an assert 2005-10-29 09:00:41 +00:00
taylor 0c9d02d4af hmm, didn't even notice that earlier 2005-10-28 14:52:26 +00:00
taylor 6e427e11e9 some minor cleanup and compiler warning fixes 2005-10-28 14:49:35 +00:00
taylor 224cde1275 don't do any decal processing if decals are not enabled 2005-10-28 14:48:26 +00:00
taylor 02480d6485 fix issue where GR_640 based non-standard resolutions (ie. 800x600) would use GR_1024 screen coordinates/sizes 2005-10-28 14:47:16 +00:00
taylor 6f18a905e0 more TMAP_MAX_VERTS overflow protection for non-HTL usage (these are the things that need to be addressed to fix non-HTL)
fix some compiler warning messages
don't do any decal processing if decals are disabled, the math was a waste of CPU cycles in that case
2005-10-28 14:45:55 +00:00
Goober5000 e2092f240b nitpicked a rather dumb non-bug
--Goober5000
2005-10-28 06:10:07 +00:00
phreak 6dcbcc178e Added extra documentation for add-background-bitmap and add-sun-bitmap 2005-10-28 05:48:55 +00:00
phreak 5f8e6a71de added implementation for add-background-bitmap and remove-background-bitmap 2005-10-28 05:25:27 +00:00
taylor f350e06851 some minor fixes to message_translate_tokens(), fixes a bug and adds some out-of-bounds checks 2005-10-27 16:24:24 +00:00
taylor 74e3d5401a go back to using abort() over exit() for Assert's and Int3's but close out SDL first this time, makes debugging much easier 2005-10-27 16:23:03 +00:00
taylor 53d10eabf0 fix some automake errors with OSX 10.4's crappy AutoMake and a couple of other OS X related terminal compile fixage 2005-10-27 16:21:19 +00:00
taylor 5880db458e D3D missed the non-standard resolution updates for aabitmaps, should fix briefing icon positioning 2005-10-26 20:54:18 +00:00
taylor b35d857131 convert Jpegs from RGB to BGR after read, OpenGL had a problem with this, D3D still works fine 2005-10-26 20:53:02 +00:00
taylor 9ac238f864 update Xcode project with IFF stuff 2005-10-26 20:51:55 +00:00
taylor 53d95c6b04 make sure that XMTs don't try to still create an invalid entry when +nocreate is used 2005-10-26 00:43:06 +00:00
wmcoolmon 81499b0c12 Bumped MAX_HOTKEY_TARGET_ITEMS 2005-10-25 01:21:52 +00:00
phreak ae966e5e2c implementation for nebula-change-storm and nebula-toggle-poof. looks like they're working 2005-10-24 23:28:37 +00:00
taylor b664b38efd init thruster stuff properly so that bmpman doesn't have a fit 2005-10-24 12:42:14 +00:00
Goober5000 a8dcf18e3b merge Bobboau's thruster code back in; hopefully this covers everything
--Goober5000
2005-10-24 07:13:05 +00:00
taylor 79f76ca829 not sure what I was smoking there, max shininess value is 128, not 180 2005-10-24 04:48:14 +00:00
phreak 0aeb51d927 Get the new nebula argument types working in fred. 2005-10-24 02:53:48 +00:00
wmcoolmon 14cc8930dc Removed max_overclock restriction related to warpout 2005-10-24 02:15:41 +00:00
taylor dd21fa57f2 some cleanup, fix some general memory leaks, safety stuff and whatever else Valgrind complained about 2005-10-23 20:34:30 +00:00
taylor 7032e999c8 fix crashes and minor slowdowns when sound is disabled (-nosound) 2005-10-23 19:08:01 +00:00
taylor f47f4034dd make AABITMAP use GL_ALPHA rather than GL_LUMINANCE_ALPHA (now 8-bit instead of 16-bit, fixes several minor rendering issues) 2005-10-23 19:07:18 +00:00
taylor b8aa6b368d minor cleanup to screenshot code
force front buffer reads for relevant glReadPixels() calls
2005-10-23 14:12:35 +00:00
taylor 2692d35509 add -ogl_shine to adjust the OGL shininess value so that people can play around and find the best value to use 2005-10-23 11:45:06 +00:00
taylor 5e932a8730 fix memory errors from new[]/delete[] mismatch 2005-10-23 11:44:07 +00:00
wmcoolmon 6e97ac964a Ack, missed testing compile under an Inferno build 2005-10-23 05:37:59 +00:00
wmcoolmon e48b96749b *Fix* 2005-10-23 05:01:49 +00:00
phreak 610a99aa72 add-background-bitmap and add-sun-bitmap needed scale values added
also their sexp functions should not return integers.
2005-10-23 04:48:26 +00:00
phreak 21d4b75975 various background and nebula sexps
add-background-bitmap
add-sun-bitmap
remove-background-bitmap
remove-sun-bitmap
nebula-change-storm
nebula-toggle-poofs

All of these sexps are just stubs for now.
Just want to get in the commit before someone
else commits and i'll make a mess trying to merge.
Everything is compiling fine, so it shouldn't mess up anything.  But you know that murphy guy....

I've put these sexps in a new fred subcategory called "Backgrounds and Nebula"
along with the sexps "change-skybox-model" and "mission-set-nebula"
2005-10-23 04:18:23 +00:00
Goober5000 1b6fff053d made Cmdline_UseNewAI toggle the mission flag, plus fixed a few other flag-related potential bugs
--Goober5000
2005-10-22 22:25:23 +00:00
Goober5000 f510a86176 rolled back UnknownPlayer's commit
--Goober5000
2005-10-22 22:22:41 +00:00
wmcoolmon ab64770625 mission-set-nebula fixage; remainder of python code 2005-10-22 20:17:19 +00:00
taylor 82749f9b17 couple of changes to NULL vec fixes which better match what Volition would have done (makes both Goober and myself happier :))
keep track of what was an error (even if erroneous) and why with "VECMAT-ERROR" comment
2005-10-22 06:26:30 +00:00
unknownplayer 82a8322255 Added -UseNewAI command line option to force the game to always use
the SCP AI changes. As of now there's some problem in gr_d3d_set_render_target
that crashes the game when it gets to a mission.
2005-10-22 04:28:17 +00:00
taylor 64813b19e4 fix main NULL vec errors, still at least one left but these were those that happened most often:
modelinterp.cpp:parse_tmap() -> first IS_VEC_NULL() check would fail, wasn't a second on reassign
  aicode.cpp:ai_path() -> when (Pl_objp->pos == gcvp), fixed globally in vecmat.cpp:vm_vec_dot_to_point()
2005-10-21 11:32:15 +00:00
taylor 6f579ff221 fix player warpout
basic code cleanup (that previous braces change did nothing for readability)
spell "plyr" correctly
tweak warp shrink time to better match WMC's other changes and avoid the skipping during shrink
2005-10-20 17:50:03 +00:00
taylor ff69f8e38c minor readability fix
plug a memmory leak and possible Polygon_models[] madness if a POF can't be found or is otherwise invalid
2005-10-20 15:33:44 +00:00
wmcoolmon 36a0c5f66a More player warpout speed stuff 2005-10-20 06:38:18 +00:00
wmcoolmon a9e5f602b6 Oops, guess I didn't commit this stuff 2005-10-20 06:37:34 +00:00
taylor 4fc5973d71 fix some bugs with spawn type weapon assignments, particularly with TBMs 2005-10-19 20:54:06 +00:00
wmcoolmon 6551410df2 Don't need this anymore 2005-10-19 04:23:05 +00:00
taylor 9906d23845 make sure gamesnd_parse_soundstbl() doesn't inf-loop because of species problems
if we have missing species then report that before the end of table section check so we're sure to know what's missing
2005-10-18 14:57:32 +00:00
taylor 7c7932b963 lowercase filenames in model_load_textures()
turn texture loading debug messages back on but under "Maps" so they are easy to turn off if not wanted
2005-10-17 14:23:21 +00:00
unknownplayer 602090cb05 Final update to the project files - all compile correctly on MSVC_2003
from the sources on the CVS.
2005-10-17 08:43:03 +00:00
unknownplayer 4dc67e1d7a Updated the files from the MSVC 6 projects - they seem to work better. 2005-10-17 08:38:17 +00:00
taylor 44ddf3545c dynamically allocate object collision pairs 2005-10-17 05:48:18 +00:00
unknownplayer bceee9d8f0 Added project files for MSVC_2003 - these are made from the MSVC_7 files. 2005-10-17 02:17:26 +00:00
wmcoolmon acd09d9daf Fix redmenace's compile problem 2005-10-17 02:09:29 +00:00
wmcoolmon 9e635dbe2c Make weapons clip less 2005-10-17 01:54:15 +00:00
wmcoolmon c268bb02b5 Weapon models now shown in lab 2005-10-17 01:51:01 +00:00
wmcoolmon 542c762d6a Some cfile changes that slipped by 2005-10-17 00:13:28 +00:00
wmcoolmon 668fc5354c USE_OPENAL 2005-10-17 00:03:13 +00:00
wmcoolmon 54ff9951c9 Change this back for MSVC.NET? 2005-10-17 00:02:46 +00:00
wmcoolmon 7fa35140e5 CFile stuff 2005-10-17 00:02:09 +00:00
wmcoolmon efed95c7ec Updated & fixed project files 2005-10-16 23:31:58 +00:00
wmcoolmon b00f5f9a55 Hardened cfile against array overflows 2005-10-16 23:15:47 +00:00
wmcoolmon fbfa6253af Small fix for amor code 2005-10-16 23:15:13 +00:00
Goober5000 d59e425522 I need to bone up on my bulletproofing
--Goober5000
2005-10-16 18:54:12 +00:00
taylor be5d54a1ac use unsigned index buffers 2005-10-16 11:20:43 +00:00
taylor 17a5e786a4 (NULL != (int)0); the size and type of NULL is platform and implementation dependant and should only be used for pointers!
fix naughty bug that would set the flyby sound filenames to NULL
2005-10-16 11:19:57 +00:00
taylor 1d6dad9e36 clean up a couple of things 2005-10-16 10:12:14 +00:00
Goober5000 c6691a22c7 ship-create now generates a default name if you specify "<none>" for the ship name
--Goober5000
2005-10-16 00:32:30 +00:00
taylor 73d4f0878d properly handle cases where bm_make_render_target() might have failed 2005-10-15 20:53:29 +00:00
taylor 2df63f7ab6 make sure that bm_make_render_target will handle failure 2005-10-15 20:42:40 +00:00
taylor 58db700691 add error message in case the number of verts on a submodel is in excess of SHRT_MAX 2005-10-15 20:28:26 +00:00
taylor 670c7db695 make some code a bit more readable
speed up index buffer generation just a tad (maybe 1/3rd)
2005-10-15 20:27:32 +00:00
Goober5000 f6c883f15a add weapon-create sexp
--Goober5000
2005-10-14 09:29:56 +00:00
Goober5000 ae639154f9 removed an unneeded parameter and renamed some stuff
--Goober5000
2005-10-14 07:22:24 +00:00
Goober5000 af61e2625b stuff for WMC: fix sexp description and three warnings; plus add some
bulletproofing to name-specified ship_create
--Goober5000
2005-10-14 07:06:59 +00:00
wmcoolmon 6708680ce7 armor.tbl work 2005-10-14 02:13:52 +00:00
wmcoolmon 1ad2884678 Make ship_create not return a value 2005-10-13 23:23:32 +00:00
wmcoolmon 5b18b70cf1 Fixage for ship_create 2005-10-13 18:47:45 +00:00
taylor 0a567569b7 new timer code that shouldn't suffer from multi-cpu (or dual core) systems
clean out all old Windows timer code since that was just a mess at this point
2005-10-12 05:45:35 +00:00
taylor 0d59f876fc temporary cmdline option, -y_bug_fix, to switch between original code (default) and previous attempt at the Y-bug fix 2005-10-12 05:43:40 +00:00
taylor fa84045144 little cleaner since the two sets weren't needed 2005-10-11 12:24:04 +00:00
taylor 79296221d5 fix memory freakage from dynamic spawn weapon types 2005-10-11 08:30:38 +00:00
wmcoolmon 6adc96626d Topdown updates 2005-10-11 07:43:10 +00:00
wmcoolmon e18977d6db Gliding 2005-10-11 05:24:34 +00:00
taylor 20054116b3 actual cmeasure fix, don't know why the hell it didn't end up other commit 2005-10-10 17:32:59 +00:00
taylor d3481714d0 remove NO_NETWORK 2005-10-10 17:21:11 +00:00
taylor b1aafc762d remove NO_NETWORK
little sanity on model_load() calls
fix cmeasure bug where a blank entry was getting added
2005-10-10 17:19:07 +00:00
taylor acb0a733ad remove NO_NETWORK
clean out some old debug messages that were littered about
2005-10-10 17:17:45 +00:00
taylor e04af2c55c remove NO_NETWORK
whether multi is disabled or not is now determined at runtime
clean out some crap and old debug messages that were littered about
2005-10-10 17:16:22 +00:00
taylor 1180236c5a remove NO_NETWORK
fix controlconfig so that axes can be set to joystick/mouse using the mouse (required when no joystick attached)
2005-10-10 17:14:31 +00:00
wmcoolmon 8748c27fa2 Tidied up code a bit 2005-10-10 01:14:11 +00:00
Kazan c2448a5e74 some weird character was on the head of weapons.cpp 2005-10-09 23:56:22 +00:00
wmcoolmon 9c98551411 Added names to the 'limits reached' dialogs in ship/weapons.tbl 2005-10-09 17:38:49 +00:00
wmcoolmon 645f16cf35 Added warpin/warpout speed values to the lab 2005-10-09 09:18:10 +00:00
wmcoolmon 3981b4b7a2 Added warpin/warpout speed override values to ships.tbl 2005-10-09 09:13:29 +00:00
wmcoolmon 8093cd287d Minor update to ship-create description 2005-10-09 08:10:03 +00:00
wmcoolmon 0dbb5e657c New SEXP stuff 2005-10-09 08:03:21 +00:00
wmcoolmon d1f0e95428 Added sexps set-object-speed-x, set-object-speed-y, set-object-speed-z,
and ship-create
2005-10-09 06:10:59 +00:00
wmcoolmon 7e03e42748 Much better laser weapon/pof handling, removed a couple unneccessary
warnings (used to try and track down a bug)
2005-10-09 03:13:13 +00:00
wmcoolmon 754cad0765 Bumped MAX_PAIRS to prevent objects flying through other objects 2005-10-09 01:50:04 +00:00
wmcoolmon 49f27a4ee6 Extendable modular tables (XMTs); added weapon dialogs to the Lab 2005-10-09 00:43:09 +00:00
wmcoolmon 5dd18ef15c Attempt to fix crash bug on 'Mystery of the Trinity' 2005-10-08 19:29:08 +00:00
wmcoolmon 26505b4422 Error checking for dock error 2005-10-08 18:46:38 +00:00
wmcoolmon c3768a5acf Better readability for parse errors 2005-10-08 18:26:40 +00:00
wmcoolmon ad3e402ede These are no longer needed... 2005-10-08 18:25:41 +00:00
taylor 154633d986 fix several asteroid problems, little code duplication but this actually works and is less error prone than the previous method 2005-10-08 15:37:26 +00:00
wmcoolmon 78721098ba Fix Int3() from ship-vanish 2005-10-08 05:41:09 +00:00
taylor e42dac2301 make sure player death message works when using a NO_NETWORK build 2005-10-06 07:53:01 +00:00
Goober5000 c9ecc594c2 fixed the CTD when support is called for a ship lacking a rearming dockpoint
--Goober5000
2005-10-02 23:12:44 +00:00
Goober5000 7787819daf removed a redundant action
--Goober5000
2005-10-02 23:01:17 +00:00
Goober5000 7a0fe0c0f6 juxtaposition for clarity
--Goober5000
2005-10-02 23:00:39 +00:00
taylor 0a7dea55ee remove -rlm, it's always on now since there was never a complaint and pretty much everyone uses it
add -cache_bitmaps and have bitmap caching between levels off by default
when -cache_bitmaps is used then use C-BMP for top-right memory listing, and just BMP otherwise
2005-09-30 09:47:06 +00:00
taylor 98e2ca8ed6 add iff stuff to makefile 2005-09-30 09:44:19 +00:00
Goober5000 7516d29d62 hooray for more work on the iff code
--Goober5000
2005-09-30 03:40:40 +00:00
Goober5000 995aa49245 parsing stuff
--Goober5000
2005-09-30 03:19:57 +00:00
Goober5000 2e06e37264 parse fixage
--Goober5000
2005-09-29 04:26:09 +00:00
Goober5000 86a1963c0f fix debug warning
--Goober5000
2005-09-27 08:09:13 +00:00
Goober5000 97eea3b17d small fix, bah
--Goober5000
2005-09-27 06:39:23 +00:00
Goober5000 ab5bce6796 added iff_defs to project
--Goober5000
2005-09-27 06:39:04 +00:00
Goober5000 556bf806d5 initial commit of basic IFF code
--Goober5000
2005-09-27 05:25:19 +00:00
Goober5000 620e3d8990 betterizing
--Goober5000
2005-09-27 05:01:52 +00:00
Goober5000 4cf60293d3 clarification
--Goober5000
2005-09-27 02:36:58 +00:00
Goober5000 c5d279bd8d this should fix the rest of the briefing icon bugs
--Goober5000
2005-09-26 06:00:59 +00:00
Goober5000 caaa2b3ff4 small fix
--Goober5000
2005-09-26 05:24:25 +00:00
Goober5000 ff2eb59e13 moved these per taylor's recommendation
--Goober5000
2005-09-26 04:53:19 +00:00
Goober5000 956b638685 some more cleanup
--Goober5000
2005-09-26 04:51:00 +00:00
Goober5000 2db3aade28 some more cleanup
--Goober5000
2005-09-26 04:08:54 +00:00
Goober5000 8efd3812ac okay, this should all be working :)
--Goober5000
2005-09-26 02:15:03 +00:00
Goober5000 8f3db90fec and again, gah
--Goober5000
2005-09-25 23:02:29 +00:00
Kazan 24b7d99e83 my bad 2005-09-25 22:29:35 +00:00
Goober5000 dff26b92c2 more fiddly stuff
--Goober5000
2005-09-25 22:24:22 +00:00
Kazan ec652649d2 correct an error 2005-09-25 22:23:39 +00:00
taylor a85c8ac841 gah. 2005-09-25 21:00:40 +00:00
Goober5000 793f113ac9 oh noes!
--Goober5000
2005-09-25 20:55:28 +00:00
Goober5000 cc64562491 taylor forgot something ;)
--Goober5000
2005-09-25 20:42:57 +00:00
Goober5000 4c5696580b okay; everything should be good to go
--Goober5000
2005-09-25 20:31:42 +00:00
taylor f96075c2fd GCC fixage, my Whiffle Bat that was saved for Bobboau's constant breaking is currently getting "Goober5000" etched into it :) 2005-09-25 18:48:25 +00:00
taylor 299b2d0330 fix Subsys_status leak, wasn't a problem in game but can be touchy on exit 2005-09-25 18:44:51 +00:00
Goober5000 6a3c8e79ff Okay, everything should now work again. :p Still have to do a little more with the asteroids.
--Goober5000
2005-09-25 08:25:16 +00:00
Goober5000 bda507de36 remove unneeded #include
--Goober5000
2005-09-25 08:23:38 +00:00
Goober5000 bb03f3a4ef remove duplicate #include
--Goober5000
2005-09-25 08:21:54 +00:00
Goober5000 7236d2f0c3 and again
--Goober5000
2005-09-25 07:27:33 +00:00
Goober5000 25e55bf580 try to fix the headers
--Goober5000
2005-09-25 07:26:05 +00:00
Goober5000 3ae72e2854 partial commit; hang on
--Goober5000
2005-09-25 07:07:34 +00:00
Goober5000 61d603024e bah
--Goober5000
2005-09-25 05:26:13 +00:00
Goober5000 81784bfa63 hopefully complete species upgrade
--Goober5000
2005-09-25 05:13:07 +00:00
Goober5000 0a62ed5121 meh for consistency
--Goober5000
2005-09-25 02:15:02 +00:00
Goober5000 112f43d532 cleaned up some more thruster stuff; honestly, the thruster code is such a
mess that it should probably be reverted to the retail version
--Goober5000
2005-09-24 07:45:31 +00:00
Goober5000 784b494bae fixage
--Goober5000
2005-09-24 07:18:15 +00:00
Goober5000 374b2b21a0 another species overhaul
--Goober5000
2005-09-24 07:07:17 +00:00
Goober5000 9e4037498f a fix
--Goober5000
2005-09-24 02:57:12 +00:00
Goober5000 906c904881 whoops
--Goober5000
2005-09-24 02:43:33 +00:00
Goober5000 d1ade71cc3 get rid of a whole bunch of Microsoft warnings
--Goober5000
2005-09-24 02:40:10 +00:00
Goober5000 60be5fde17 bah
--Goober5000
2005-09-24 02:24:29 +00:00
Goober5000 dbb5c74ed9 a bunch of support ship bulletproofing
--Goober5000
2005-09-24 01:50:10 +00:00
Goober5000 96f63676a7 this isn't needed because of is_support_allowed
--Goober5000
2005-09-24 01:41:21 +00:00
Goober5000 29eb660e83 bettered the web cursor bitmap error message
--Goober5000
2005-09-23 23:07:11 +00:00
Goober5000 13c6d559b7 something for WCS
--Goober5000
2005-09-23 22:48:56 +00:00
taylor dca7e3f5a9 fix screen update of pilot list when you delete one of them 2005-09-22 19:16:48 +00:00
taylor 0d63b59c8e entries for icon file
some general cleanup of the project file
use "Release" and "Debug" for the builds since that's the terminology we use
2005-09-22 11:22:52 +00:00
taylor aaa7e6e243 delay for fox OS X, SDL messes up for some reason and though I don't like this, even Apple does it 2005-09-22 11:21:22 +00:00
taylor 16fee1c55e byte-swap for 32-bit uncompressed DDS images on big endian 2005-09-22 11:20:11 +00:00
taylor 9589f198fa ignore .DS_Store from OS X
add .cvsignore for Xcode project stuff
temporary placeholder for real FS2_Open icon file
2005-09-22 11:18:30 +00:00
Goober5000 c9e63a8972 add option for warp flash; mess with the cmdlines a bit
--Goober5000
2005-09-21 03:55:32 +00:00
wmcoolmon 8e51aeff23 New parsing functions that I'll be using for XMTs once I get them
working
2005-09-20 04:51:45 +00:00
wmcoolmon adb2bba03f Oops. Breathalyzer standing by... 2005-09-20 04:51:01 +00:00
wmcoolmon 31ebacbb5f Some work I did on the camera code 2005-09-20 04:48:52 +00:00
wmcoolmon b413343c63 Fixed techroom crash if there are no entries to display; removed
unneeded MULTIPLAYER_BETA_BUILD define that disallowed supercaps
2005-09-20 04:37:01 +00:00
taylor 8d5524caad fix a couple of things that Valgrind complained about 2005-09-20 02:48:37 +00:00
taylor f2d072ee16 make sure that any extra ship textures get loaded on a class change (that Ares bug which wasn't actually Ares specific) 2005-09-20 02:48:06 +00:00
taylor de8bbd5254 slight speedup for font rendering
fix a couple of things that Valgrind complained about
2005-09-20 02:46:53 +00:00
taylor 9257d21836 bump version to 0.6
add a specified directory to output files to
2005-09-20 02:45:47 +00:00
taylor ab15d95854 gah, revert that since it was never going to work (not sure what I was drinking that day) 2005-09-18 23:06:17 +00:00
wmcoolmon b954e00155 Fixed silly i variable placement mistake 2005-09-18 20:41:10 +00:00
Goober5000 dc858cd4a6 a small fix
--Goober5000
2005-09-18 02:28:18 +00:00
phreak 7a2c4e2a0d radar bitmap should render the correct color using -orbradar 2005-09-17 19:12:37 +00:00
Goober5000 f5d5226073 better tweak 2005-09-17 01:41:49 +00:00
Goober5000 6c1b1b7114 tweak 2005-09-17 01:37:02 +00:00
Goober5000 a150ca39b8 It is a strange fate that we should suffer so much fear and doubt over so small a thing.
Such a little thing...
2005-09-17 01:36:29 +00:00
Goober5000 13f3d01664 roll back taylor's loadout fix and do it this way: it saves memory
(but thanks to taylor for drawing attention to the difference between wing slots and wss slots!)
--Goober5000
2005-09-16 17:02:50 +00:00
taylor 1b5400ad08 fix afterburner bug 2005-09-16 08:11:39 +00:00
taylor 7451942605 when a wing is departing to a bay have ships break formation when playing follow-the-leader 2005-09-16 02:59:55 +00:00
taylor 1f505cdbdb when changing a campaign in the campaign room make sure that the mainhall is properly set without having to play a mission first 2005-09-16 02:51:54 +00:00
taylor a1a8adea45 didn't mean to leave that in there 2005-09-16 00:03:51 +00:00
Kazan f7db4dfbb3 comment out superfluous debug message 2005-09-15 23:54:58 +00:00
taylor 235c7aa72b gah, I still messed that up. Add a NULL check and have register_malloc() actually handle the correct pointer 2005-09-15 05:19:25 +00:00
taylor 0d63e60e92 some vm_* fixage for Windows 2005-09-14 20:38:12 +00:00
taylor d1853b33ea fix ace badges not getting displayed in debriefing 2005-09-14 20:03:40 +00:00
phreak 0b3ad0cc31 fix to a minor annoyance where the hud weapons gauge wouldnt render properly if there were no secondary weapons. 2005-09-14 02:55:04 +00:00
taylor a1f980f14e fix out-of-bounds crash when apply_to_all button is hit 2005-09-13 04:32:11 +00:00
phreak 50cb940d83 sort_weapons_by_type() now also subsorts primaries by whether its supposed to only
be used on big ships or not.
2005-09-11 03:50:42 +00:00
taylor 567357a92c make sure smart shields can't send the strength of a quadrant over the max 2005-09-10 21:10:19 +00:00
Goober5000 9573da9eea "no briefing" flag now works for red-alert missions too
--Goober5000
2005-09-09 05:12:44 +00:00
Goober5000 89c2493853 braces for clarity 2005-09-09 05:11:20 +00:00
phreak c7f4bd2762 sort_weapons_by_type() now subsorts missiles and places fighter-sized weapons ahead of capital weapons and child weapons
its also alot less memory intensive too.
2005-09-08 23:20:54 +00:00
taylor 30106813de make it actually compile under WIN32
bump version to 0.5 since little else is going to be done to this thing
2005-09-08 05:04:15 +00:00
taylor 5b597c5335 fix building/linking of command line tools under Linux/OSX
add tools as targets to OSX project file
2005-09-08 00:09:32 +00:00
taylor def6915ae6 fix mouse position setting in non-standard resolutions 2005-09-06 17:26:39 +00:00
taylor 3bfb995193 use exit(EXIT_FAILURE) rather than abort() so that all atexit() calls will actually get executed 2005-09-06 05:32:12 +00:00
taylor e87ac95a07 fix for -pcx32 on big-endian 2005-09-06 02:40:24 +00:00
Kazan d9f82bda6f fixed a bug related to multiplayer table validation and modular tables 2005-09-06 00:32:20 +00:00
taylor af1df76849 merge of OSX tree
a lot of byte swaps were still missing, will hopefully be fully network compatible now
2005-09-05 09:38:19 +00:00
taylor d06f863d48 merge of OSX tree
fix OGL fullscreen switch for SDL since the old way only worked under Linux and not OSX or Windows
fix OGL version check, it would allow a required major version to be higher if the required minor version was lower than current
2005-09-05 09:36:41 +00:00
taylor 8f43dddac2 a little more cross-platform friendly this way 2005-09-05 09:34:06 +00:00
taylor a91ead80a0 merge of OSX tree
update cmdline stuff for Linux to be less stupid and provide better feedback to the user
2005-09-05 09:33:08 +00:00
taylor 5933f94248 merging of project files for OSX 2005-09-05 09:23:26 +00:00
taylor be1cdd95f9 merging of new files from OSX tree 2005-09-05 09:21:15 +00:00
wmcoolmon f6bb014f7a Fix the ship vanishing in TOPDOWN mode error 2005-09-05 09:02:08 +00:00
phreak 1d279a469d don't wrap the U_offset variable since it causes the beam to jump once it gets reset. 2005-09-03 17:48:21 +00:00
taylor 2520b32796 various weapon_range cap fixes for primary, secondary weapons and hud targetting info 2005-09-01 04:14:04 +00:00
Goober5000 bb71f4b655 hm, typo
--Goober5000
2005-08-31 08:11:58 +00:00
Goober5000 fe4b513b5c All wings will now form on their respective leaders, not just certain starting wings.
If this breaks anything, the old code is commented out.  You know who to yell at. ;)
--Goober5000
2005-08-31 08:09:51 +00:00
Goober5000 78af7600f1 Wings will now form on their leader, not necessarily the player. This is to
account for cases where the player is not the leader of his wing.  It has the
side effect of causing wings that arrive later in the mission to form on *their*
leader rather than the player, but this is probably the preferred behavior (at
least judging from Mike Kulas's comment of 5/9/98).  This does create a
difference from retail AI, but it should be only cosmetic, since ships only form
on a wing until they are ordered (via comm or sexp) to do something else.
--Goober5000
2005-08-31 07:54:33 +00:00
Goober5000 f4cd9067fd removed two unused functions
--Goober5000
2005-08-31 07:17:43 +00:00
Goober5000 8686a71e66 remove a redundant function
--Goober5000
2005-08-31 07:01:40 +00:00
Goober5000 118bbeda61 fix a function prototype to match its counterpart in vecmat.h
--Goober5000
2005-08-31 06:25:27 +00:00
Goober5000 9fa9ae8310 roll back and recommit the minimally invasive version of phreak's fix...
this removes a bit of redundant code
--Goober5000
2005-08-31 06:12:41 +00:00
phreak a8b4fdd4ef real spawn angle fix. The problem stemmed from the matrix argument in vm_vec_random_cone()
being objp->orient and should have been the matrix formed by vm_vector_2_matrix(&m, &objp->orient.vec.fvec, NULL, NULL);
2005-08-31 05:47:02 +00:00
Goober5000 81c940e254 fixed yet another docking bug, based on taylor's original fix :p
--Goober5000
2005-08-31 00:59:35 +00:00
Goober5000 51587ee9ff made spawning missiles work like retail when appropriate
--Goober5000
2005-08-31 00:48:22 +00:00
phreak bcef5f55ff Get rid of alpha blending when using the htl drawing fuctions for lines and spheres.
Right now, gr_opengl_draw_htl_line and gr_opengl_draw_htl_sphere are only used in fred, so
it shouldn't change anything critical
2005-08-29 02:23:04 +00:00
phreak 65a76cd8d6 Record state changes in gr_opengl_set_state() 2005-08-29 02:20:56 +00:00
Kazan dc78cd4498 potential fix for mantis bug 237 2005-08-27 00:21:27 +00:00
taylor 29e119eb05 fix strange static issue experienced with TBP briefing voices 2005-08-26 17:05:13 +00:00
taylor bf90cfdfdc send out multi pings during level load to prevent timeouts on slower computers (does not break network compatibility with older, or retail, clients/servers) 2005-08-26 00:56:17 +00:00
taylor 2a97e46c9b basic cleaning, removing old/useless code, sanity stuff, etc:
- very minor performance boost from not doing stupid things :)
 - minor change to 3d shockwave sizing to better approximate 2d effect movements
 - for shields, Gobal_tris was only holding half as many as the game can/will use, buffer is now set to full size to avoid possible rendering issues
 - removed extra tcache_set on OGL spec map code, not sure how that slipped in
2005-08-25 22:40:04 +00:00
taylor 3832b9d77d fix crash from oversized buffer data requests with OGGs 2005-08-25 22:33:48 +00:00
taylor 3a8e956471 since the geomtry_batcher can send more verts than non-HTL code can handle, avoid drawing in that case to avoid crashing 2005-08-25 22:32:55 +00:00
taylor d440737986 fix Int3() when we are an OGG and need silence data 2005-08-25 06:32:42 +00:00
taylor 01f831c6f8 don't let ai keep firing primary and secondary weapons for fighters and bombers if they are dying (fixes player deathroll too) 2005-08-25 00:48:19 +00:00
Goober5000 4fe9ddb852 tweaky optimization based on the current version of stristr and
the current version of the expanded music.tbl
--Goober5000
2005-08-24 07:20:36 +00:00
Goober5000 2d29d894d0 faster version of stristr
--Goober5000
2005-08-24 07:14:52 +00:00
matt 7aa6a39040 Changed rect_size_y - 1 to rect_size_y. Not really that important, but much more correct. I'll stop barraging cvs now :) 2005-08-23 17:06:28 +00:00
matt b22d44e804 Fixed another screen save bug relating to having your window positioned offscreen. Still isn't great for when the window is offscreen top left 2005-08-23 16:57:28 +00:00
matt 2d93c49a5a Fixed screen save crash when a popup is called 2005-08-23 15:59:51 +00:00
Goober5000 2e6dbb7165 ensure init/reset of goals works cleanly
--Goober5000
2005-08-23 09:18:08 +00:00
Goober5000 6f9563aa62 fix for bug 519
--Goober5000
2005-08-23 09:03:56 +00:00
Goober5000 94462b57a0 removed a thing I apparently forgot to remove on 2005/07/12
--Goober5000
2005-08-23 07:49:24 +00:00
taylor adcd7c68b4 fix navpoint hud brackets and text display in non-standard resolutions 2005-08-23 07:37:14 +00:00
Goober5000 650afb4bc3 some tweaks to parselo, plus ensure that Unicode files don't crash
--Goober5000
2005-08-22 22:24:22 +00:00
Goober5000 d1f5e5efa8 one more change
--Goober5000
2005-08-22 04:59:13 +00:00
Goober5000 c17c45842e final changes to projects and workspace; everything should work now
(in MSVC 6 anyway)
--Goober5000
2005-08-22 04:58:38 +00:00
Goober5000 c74158924c these ogg libs are needed also
--Goober5000
2005-08-22 04:55:38 +00:00
Goober5000 1ee2c1f762 add dx8 libs and headers missing in the dx9 sdk
--Goober5000
2005-08-22 04:53:41 +00:00
Goober5000 82da24cf53 add ogg libs and headers
--Goober5000
2005-08-22 03:11:32 +00:00
taylor 40900e556a fix stats display in debriefing with non-standard resolutions 2005-08-21 21:05:53 +00:00
Goober5000 87b26e68a5 clarified the comment on my original move of the wing departure information assignment
--Goober5000
2005-08-21 06:19:31 +00:00
taylor 8bcc0066b5 more unix->SCP_UNIX define fixing 2005-08-20 20:38:08 +00:00
taylor 99dab0fc7d some bmpman and render_target function name changes so that they make sense
always use bm_set_render_target() rather than the gr_ version so that the graphics state is set properly
save the original gamma ramp on OGL init so that it can be restored on exit
2005-08-20 20:34:51 +00:00
taylor c2716d4ee8 Make sure to always use world pos for shockwaves in HTL mode, avoids the distance check Error()
(if someone can find a better explanation of why this one thing was different please make a better fix)
2005-08-20 20:32:28 +00:00
taylor 0073206944 Fix an old unix define, should be SCP_UNIX 2005-08-20 20:29:47 +00:00
Goober5000 90d22b6bcd made AwacsMultiplier more user-friendly
--Goober5000
2005-08-20 18:23:02 +00:00
matt 13d5f649b8 Fix for D3D white squares issue 2005-08-20 16:00:03 +00:00
taylor 63f6c54661 Address a couple of pilot code issues
- make the same MAX_PILOTS in the barracks that the playerselect screen has since it's a problem here too
 - add a -1 check for ship/weapon name lookups to avoid bounds issues.  NOTE: this can empty the techroom of entries if ithits this check, but it won't crash :)
2005-08-18 01:15:41 +00:00
Kazan aeb846307d # FEATURE BREAK # This breaks a feature in pilot files temporarily to correct a [reproducable] crash - it is merely commenting out the trouble lines - bug report in mantis and assigned to taylor 2005-08-18 00:19:53 +00:00
Kazan abbb5ff762 [hopefully] Fix the bug i introduced in the show memory usage code, and the convergence bug during autopilot [also saves cpu cycles - MANY of them] 2005-08-16 20:06:24 +00:00
Kazan 8136a01885 i introduced a bug in _vm_realloc.. fixed it 2005-08-14 23:05:27 +00:00
Kazan dd2cc96e74 I'm stupid, sorry - fixed release-build-crash 2005-08-14 21:01:59 +00:00
Kazan cbf139d3a3 diabled NEW_MALLOC on windows - it was causing crashing - must have been corrupting it's own heap 2005-08-14 17:20:56 +00:00
taylor 12a4369650 don't do any ambient sound or music stuff in game_pause()/unpause() on options screens when in mission so we can
avoid having mainhall ambient sounds and music start playing and then not stop until you exit the mission
2005-08-11 12:22:26 +00:00
taylor 3460454893 handle rare cases where anims would get freaky if one happened to still be playing or otherwise queued 2005-08-11 12:18:53 +00:00
taylor 3b15226dd4 little safety check, a couple of strange cases allow this to happen so we should look for it 2005-08-11 12:16:23 +00:00
taylor dc87987f6f well that was rather stupid of me, this would crash if old + new pilots went over MAX_PILOTS 2005-08-09 10:06:47 +00:00
taylor 86b1553f57 be sure to remove ships from a wing when that ship gets vanished 2005-08-08 03:13:53 +00:00
taylor 57849e8b03 hopefully fix the problem that was causing geometry issues in just OGL when using VBOs 2005-08-08 01:19:50 +00:00
taylor e001fd52d6 some minor cleanup
don't load the default 2d shockwave graphics if we have a default 3d shockwave, they won't get used and only take up memory
2005-08-07 09:25:55 +00:00
taylor 20ab76817f forgot to commit this before, did this gui code actually compile for anyone? 2005-08-07 09:24:22 +00:00
taylor 9016077974 fix 3-D shockwave frame detection so that it will use the proper number of frames for the animation (not less, not more) 2005-08-05 15:33:45 +00:00
Goober5000 5be7501506 made "stealth" tag more user-friendly, and fixed a bit of punctuation
--Goober5000
2005-08-03 22:02:38 +00:00
taylor 29c8145762 allow for both gamedir and userdir cmdline config files 2005-08-01 10:00:39 +00:00
taylor af7ef107fd never could get Ai_class_names to realloc properly but this does the job just as well 2005-08-01 09:57:52 +00:00
wmcoolmon c3c798ef46 MR_NO_FOGGING for shockwaves 2005-07-31 20:31:41 +00:00
taylor cdc9651d1b we only care about fmt and data tags so once we have them bail out, fixes some really bad seek errors in crappy wav files 2005-07-31 01:35:43 +00:00
taylor cb9267a16b fix a NULL pointer reference if there are no secondary banks on a ship 2005-07-31 01:34:03 +00:00
taylor 25c650fdf1 few data type fixes, was only a problem for big-endian systems as little-endian doesn't really care about this 2005-07-31 01:32:21 +00:00
taylor 2e4fc6030f print file and line info for Int3() calls to the logfile so that they are easier to debug with basic error reports 2005-07-31 01:30:48 +00:00
taylor 8de3c04a56 Temporarily add an empty AIM_GET_BEHIND case to ai_execute_behavior() to avoid hitting Int3() in TBP 2005-07-31 01:29:21 +00:00
wmcoolmon 2ade5eb731 Removed turret thing, added some more armor type calculations 2005-07-30 22:34:42 +00:00
taylor bb1c89b3ab safety check for TYPE_D beam weapons, the +Shots: count needs to be at least 1 to avoid various errors 2005-07-29 10:18:26 +00:00
Goober5000 efbb8aeab7 verified that submode_start_time is updated whenever submode is changed
--Goober5000
2005-07-27 18:27:49 +00:00
Goober5000 1d407f013d more tweaks to the dock code
--Goober5000
2005-07-27 17:22:22 +00:00
taylor 961695ee7e Add ability to use specific refresh rate, needs a soon to be updated Launcher to have set via GUI
but this can go in already.  Defaults to, and falls back on, previous behavior and adds some
  error checking that wasn't there previously.
2005-07-26 08:46:48 +00:00
Goober5000 27b8e4d992 more bugs and tweaks
--Goober5000
2005-07-25 08:22:00 +00:00
Goober5000 79f5b6bff9 forgot this
--Goober5000
2005-07-25 05:55:40 +00:00
Goober5000 01f4026e4c cleaned up some command line and mission flag stuff
--Goober5000
2005-07-25 05:24:17 +00:00
Goober5000 0aa3b69e1a whoops
--Goober5000
2005-07-25 05:23:33 +00:00
Goober5000 5fb5c7faf7 various code cleanups, tweaks, and fixes; most notably the MISSION_FLAG_USE_NEW_AI
should now be added to all places where it is needed (except the turret code, which I still
have to to review)
--Goober5000
2005-07-25 03:13:26 +00:00
Goober5000 66ea180792 cleaned up some rotating submodel code
--Goober5000
2005-07-24 20:12:55 +00:00
Goober5000 1f1f3c65d0 fixed a minor docking bug
--Goober5000
2005-07-24 19:59:24 +00:00
taylor 4a3aa3ba0b proper multi support for fighter beams, already has code to break protocol commented out if we need it,
decided to skip and beam type checks and let beam_fire() reassign it (should work ok)
2005-07-24 18:35:44 +00:00
taylor 8e0d0603d2 hehehe, fix the check to allow fighter beams to count for kills 2005-07-24 18:33:47 +00:00
taylor 2ba8a0c45d various incarnations of freaky and stupid, need to do this everywhere eventually 2005-07-24 18:32:58 +00:00
taylor 3e75f2121a address possible div-by-0 problem 2005-07-24 18:31:59 +00:00
taylor 53029156ad little 64-bit strangeness (longs are 64-bit here rather than 32) 2005-07-24 18:31:17 +00:00
wmcoolmon 67c6bca0de Multiple shockwaves support. 2005-07-24 06:01:37 +00:00
wmcoolmon c9fb193cc2 Synced 3D shockwaves' glowmaps with the model, tossed in some medals.tbl
support for the demo/FS1
2005-07-24 00:32:45 +00:00
wmcoolmon 432dea9401 Fixed formatting FTW 2005-07-23 22:52:44 +00:00
wmcoolmon c2437a1430 Fixx0red description for show-subtitle 2005-07-23 22:48:28 +00:00
Goober5000 784cbc79d5 bah - fixed subsystem comparison
--Goober5000
2005-07-23 21:47:46 +00:00
Goober5000 537258cee3 fixed ai issue where some ships would never call for rearm
--Goober5000
2005-07-23 21:06:24 +00:00
Goober5000 a429884abd fixed a rare but ugly (though amusing) bug
--Goober5000
2005-07-23 18:38:47 +00:00
wmcoolmon b657066dac Fixed bug where camera reset when rotation complete 2005-07-23 18:25:42 +00:00
Goober5000 8173d85842 remove Bobboau's extra warp thing
--Goober5000
2005-07-23 17:27:50 +00:00
Goober5000 3624587ac5 remove an extraneous extern
--Goober5000
2005-07-23 16:25:32 +00:00
Goober5000 41635d4716 fix the support ship bug; taylor should be happy now ;)
--Goober5000
2005-07-23 11:42:54 +00:00
wmcoolmon 2a304773ce Another try at fixing gun turrets sticking straight up 2005-07-23 08:17:04 +00:00
Goober5000 2a307d099a CVS header tweaks
--Goober5000
2005-07-22 10:18:41 +00:00
Goober5000 91b014d39d unhide null vector bug
--Goober5000
2005-07-22 09:59:30 +00:00
wmcoolmon d1d68c6e6e Dynamic AI Class number commit. KNOWN BUG: When AI_CLASS_INCREMENT is hit and vm_realloc is called, memory corruption seems to
result. Not at all sure what causes this; if this can't be resolved soon, we can always treat _INCREMENT like _MAX
2005-07-22 09:19:40 +00:00
Goober5000 81cfbff8fa fixed another bug when changing ship classes
--Goober5000
2005-07-22 04:31:12 +00:00
taylor 85b24f500f better error checking/handling for when you fire primary/beam weapons without a target selected 2005-07-22 03:54:46 +00:00
taylor 087db1ee94 fix crash on commit in the multi ship selection screen
mask_data in the UI code is always cast to ubyte so why it was a ushort type I'll never know
fix unsized text in input boxes (fixed the real problem earlier but forgot to remove this old fix)
2005-07-22 03:53:32 +00:00
taylor 294aa50367 forgot to remove PreProcDefines.h from here too 2005-07-22 03:51:13 +00:00
wmcoolmon 9a33c153dd Changed $Hull Repair Rate and $Subsystem Repair Rate to be percentages,
as well as making them accept all values between -1 and 1
2005-07-21 07:53:14 +00:00
taylor 5b9a5ae0d8 fix problem loading compressed DDS created by DX9 utils 2005-07-20 14:55:12 +00:00
taylor 75fdc06a17 move the "none.wav" init to event_music_init() so it only runs through once (fixes no mission music when modular tbls are used) 2005-07-20 02:37:32 +00:00
taylor 883e973ac2 better UV offsets when using non-standard resolutions (for text mostly), copied from D3D code 2005-07-20 02:35:51 +00:00
taylor a191cc46e0 fix resize fixes 2005-07-19 04:52:56 +00:00
taylor 5e33a5ce59 better "is_640x480" detection, 800x600 res was using GR_1024 where it should have used GR_640 2005-07-18 14:09:03 +00:00
taylor f75566d82d errant unsize was still messing up h-sliders in non-standard resolutions 2005-07-18 12:42:10 +00:00
taylor d901aa63f5 more non-standard res fixing
- I think everything should default to resize now (much easier than having to figure that crap out)
 - new mouse_get_pos_unscaled() function to return 1024x768/640x480 relative values so we don't have to do it later
 - lots of little cleanups which fix several strange offset/size problems
 - fix gr_resize/unsize_screen_pos() so that it won't wrap on int (took too long to track this down)
2005-07-18 03:45:10 +00:00
taylor 34ca40fc63 cleanup hudtargetbox rendering from that total hack job that had been done on it (fixes wireframe view as well)
more non-standard res fixing
 - I think everything should default to resize now (much easier than having to figure that crap out)
 - new mouse_get_pos_unscaled() function to return 1024x768/640x480 relative values so we don't have to do it later
 - lots of little cleanups which fix several strange offset/size problems
 - fix gr_resize/unsize_screen_pos() so that it won't wrap on int (took too long to track this down)
2005-07-18 03:44:01 +00:00
taylor b4ac372e25 PreProcDefines.h has to be removed from here as well so that "make dist" will work 2005-07-18 03:37:35 +00:00
wmcoolmon 509089ce82 Unlike my previous commit, this one does not cause a segmentation
fault. :)
2005-07-16 07:03:49 +00:00
wmcoolmon e0fd57fb36 Commented out lines 554 and 555 so the code would compile 2005-07-16 06:33:16 +00:00
Goober5000 d6a1953b9a cleanup and clarification of phreak's fix of a bug propagated by me and penguin
--Goober5000
2005-07-16 04:41:04 +00:00
wmcoolmon 61fb21b60d I can't compile the source to test this, but this should switch the
hi-res check to "2_ChoosePilot-m" rather than sparky_hi_fs2.
2005-07-15 23:19:10 +00:00
Goober5000 5467d2e8d2 fixed a typo of Kazan's dating all the way back to October 15, 2003 (!!) that
created a nasty stealth bug
--Goober5000
2005-07-15 03:48:40 +00:00
Goober5000 bca4275773 remove PreProcDefines.h from project file; tweak #define's
--Goober5000
2005-07-14 23:46:57 +00:00
mrduckman 262db9a6a1 Restored messages to on-focus channel. If it doesn't work, we'll work around with a pseudo-cmd. 2005-07-14 13:25:03 +00:00
phreak dab936a69d If the web cursor bitmap isn't found, tell the user to move the executable to the main FS2 directory. 2005-07-13 15:15:54 +00:00
Goober5000 2394e9801b remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:35:36 +00:00
Goober5000 c17c11b651 remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:26:00 +00:00
Goober5000 52f136f9ad remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:15:53 +00:00
Goober5000 12c90e780d remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 02:50:53 +00:00
Goober5000 4a6a7cf6d4 remove preprocdefines, yay!
--Goober5000
2005-07-13 02:39:17 +00:00
Goober5000 dd6ef248f7 this seems like it should be handled by the code already...
let's remove it and see what happens :p
--Goober5000
2005-07-13 02:32:22 +00:00
Goober5000 7eaf5dbbf3 removed autopilot #define
--Goober5000
2005-07-13 02:30:54 +00:00
Goober5000 be35a3fef2 move inferno vs. network check here for the time being
--Goober5000
2005-07-13 02:08:26 +00:00
Goober5000 5c6738a534 fixed a bunch of "issues" caused by me with the species stuff
--Goober5000
2005-07-13 02:01:30 +00:00
Goober5000 cbdae3caf0 rolled this back because it causes a syntax error in MSVC
--Goober5000
2005-07-13 02:00:44 +00:00
Goober5000 76d05268fd improved species support and removed need for #define
--Goober5000
2005-07-13 00:44:24 +00:00
Goober5000 41a06a3ac9 removed DECALS_ENABLED
--Goober5000
2005-07-12 22:14:40 +00:00
Goober5000 8d1b92b8dc removed NO_LINKED_PRIMARY_PENALTY as it's better suited for difficulty.tbl or something similar
--Goober5000
2005-07-12 21:58:45 +00:00
Goober5000 fa7ec18c07 fixed "warpout sequence aborted" bug
--Goober5000
2005-07-12 21:10:57 +00:00
Goober5000 4285720027 properly fixed beam_apply_whack()
--Goober5000
2005-07-12 21:01:40 +00:00
mrduckman d850ace866 Better SDL Headers checking for MacOSX 2005-07-12 18:14:53 +00:00
Goober5000 516e57041c remove all restrictions on which ship types can dock with each other
--Goober5000
2005-07-12 07:03:18 +00:00
mrduckman c6d0da47ad Fixed SDL linking for MacOSX 2005-07-11 14:26:30 +00:00
wmcoolmon b3f01c755c Bumped Fs2_open version to 3.6.7 2005-07-11 10:13:09 +00:00
wmcoolmon 5cba03f84f Bumped version for Linux makefile to 3.6.7 2005-07-11 10:12:06 +00:00
wmcoolmon 7efe0c2dde Fixed the bug where sending an ignore command to "All fighters" would
apply to all ships
2005-07-11 10:01:06 +00:00
taylor 4bc11a4191 make sure to tack on a / on the dot dir so that recursive directory making will work properly (code thought it was a file rather than a dir) 2005-07-09 04:34:43 +00:00
wmcoolmon 67ea4a92b7 Added fixes for custom gauges discussed in the recent thread 2005-07-09 03:02:07 +00:00
taylor 92b8c2d6ed various compiler warning fixes (some of these from dizzy) 2005-07-07 16:36:58 +00:00
taylor a0f767e310 make double sure that we actually need to render thruster glows instead of doing it regardless 2005-07-07 16:35:11 +00:00
taylor 1fbb41b020 add value of GL_vertex_data_in to OGL card memory usage 2005-07-07 16:33:39 +00:00
taylor 90c182d5b1 compiler warning fixes
add -noibx troubleshooting cmdline option to disable use of IBX files
don't try to set thuster object number is only one thruster bank is specified (default method should go into affect)
2005-07-07 16:32:33 +00:00
phreak cdec876608 fixed an afterburner bug where AI ships would have infinite AB fuel if NO_NETWORK
was defined.
2005-07-05 17:04:08 +00:00
taylor 597535d8fb bah, forgot to ever check debriefings 2005-07-02 20:57:48 +00:00
taylor fbb630aa2d ton of non-standard resolution fixes 2005-07-02 19:45:02 +00:00
taylor e86d4a7c41 ton of non-standard resolution fixes
make gr_cross_fade() work properly in OGL
2005-07-02 19:40:48 +00:00
taylor e3e826e06b fix compiler warnings introduced by recent stub changes (defining an empty stub as something is wrong, it should be nothing)
assuming that GetStatus thing wasn't tested since it would never have worked
2005-07-02 19:39:23 +00:00
taylor aed9394b5c some supernova fixing 2005-07-02 19:36:04 +00:00
taylor 83145a7add compiler warning fixes 2005-07-02 19:33:18 +00:00
phreak e22f6bcba1 remove the BEAM_NO_WHACK flag in beam_apply_whack() 2005-07-01 17:19:43 +00:00
Goober5000 e2cc46933c the message queue now waits for simulated speech to finish
--Goober5000
2005-06-30 02:36:16 +00:00
Goober5000 d10ad253e6 added functions to check if speech is playing
--Goober5000
2005-06-30 02:35:17 +00:00
Goober5000 6497691a33 * NOX'd none.wav
* changed comparisons on none.wav to only look at the first four letters in case
  we don't have an extension or in case some weirdo decides to put none.ogg
* simulated speech pre-empts "beeps" in in-game messages
--Goober5000
2005-06-30 01:48:52 +00:00
Goober5000 6fbcfa7ffb tweaked the stubs and added a function
--Goober5000
2005-06-30 01:35:52 +00:00
Goober5000 7917104281 if game_busy() is in gamesnd_preload_common_sounds() then it should
also be in gamesnd_load_gameplay_sounds() I would expect
--Goober5000
2005-06-30 00:48:02 +00:00
Goober5000 928cd2870a Removed "beam no whack" as setting the beam's mass to 0 achieves the same effect.
--Goober5000
2005-06-30 00:36:10 +00:00
taylor 6d9cf5ea5c set-skybox-model only takes one argument so don't advertise more
add set-skybox-model help text for FRED2
2005-06-29 18:54:59 +00:00
taylor 47478e6fb0 should fix perpetually damaged subsystems on ships for multi clients 2005-06-29 18:54:02 +00:00
taylor 4dea0537cf FRED2 does special stuff for jumpnode handling so don't try and delete the obj ourselves when FRED is running 2005-06-29 18:53:07 +00:00
taylor e2dd70f652 extra checks to make sure we don't end up targetting a sensor-invisible ship 2005-06-29 18:52:02 +00:00
taylor e9507fb3a3 revert OGL init changes since ATI drivers suck and don't like it 2005-06-29 18:51:05 +00:00
taylor 1c8c8f0b6e little cleanup and error checking 2005-06-29 18:50:13 +00:00
taylor 7661ae057f various FS2NetD fixes:
- replace timer stuff with something that more accurately works cross-platform and without being affected by load
 - better sanity checking for the server list
 - working Linux compatibility that's not dog slow
 - when calling DataReady() make sure that the data is properly valid
 - fix messed up cvs merge cleanup from the Linux merge which did nasty things
2005-06-29 18:49:37 +00:00
taylor 13d63180c8 add option to not scale up movies to fit window/screen, default is to scale
(arguably not a bug but I said I would get it in before 3.6.5 and forgot)
2005-06-29 18:46:13 +00:00
taylor aa7f25fd50 we only want to have m_data_offset be 0 for oggs since the seeking callback will account for the true offset
only extern the one int we need for the -nosound speech fix rather than including the entire header
2005-06-24 19:36:49 +00:00
taylor 0e31fa4e60 compiler warning fix (dizzy) and make sure that it's safe to continue after that switch statement 2005-06-22 15:25:41 +00:00
taylor 265ddfa336 make sure that _mkdir() will return an error if the path is invalid 2005-06-22 15:18:58 +00:00
taylor b9420f5774 objnum check when targetinfo is used, fixes message brackets having random text as info 2005-06-22 15:17:53 +00:00
taylor 9bf2e719da make sure we only have one extension on mission names 2005-06-22 15:16:40 +00:00
taylor eb29c67cbd probably be a good idea to make the valid objnum check here too 2005-06-21 00:25:34 +00:00
taylor 2ef2b8a53c in the model _render functions change "light_ignore_id" to "objnum" since that's what it really is
and this makes it so much easier to realize that
properly deal with the fact that objnum can be -1 in  model_really_render()
add NULL check to neb2_get_fog_values() so that it can just send back defaults if objp is NULL
small compiler warning fix for neb code
2005-06-21 00:20:24 +00:00
taylor 051598a219 unbreak network compatibility with 3.6.5 and earlier builds
fix crashing with turret weapons
2005-06-21 00:15:06 +00:00
taylor c81198eb17 add some better error checking/handling for when GetServerList messes up 2005-06-21 00:13:47 +00:00
taylor 9b8be166a6 add virtual destructor so that GCC4 can shut up 2005-06-21 00:12:11 +00:00
phreak 83cc635e8c added cmdline.h include so the compiler would see the no sound command line option
also added CVS header information.
2005-06-20 15:54:58 +00:00
taylor 5f85d3c0b5 little cleaner ship_get_random_targetable_ship(), for Goober's sake ;) 2005-06-20 04:10:35 +00:00
taylor 383badd8a1 arch and GCC4 compatibility 2005-06-20 04:09:46 +00:00
taylor bd9e659d0f make sure to reset size to 0 on texture free 2005-06-19 09:04:40 +00:00
taylor d3d8a5f15d check_values() shouldn't be inline anymore
remove useless neb2_get_fog_intensity() call
s/alocate/allocate/g
2005-06-19 09:03:05 +00:00
taylor 2e61bf2d41 minor sanity checking for geometry_batcher
make particle batchers allocate dynamically
handle cases where a particle graphic couldn't be loaded
2005-06-19 09:00:09 +00:00
taylor 6a2fd92ec6 disable speech when -nosound is used 2005-06-19 08:56:23 +00:00
taylor c191c9d2a5 woorps! 2005-06-19 04:59:04 +00:00
taylor c4f2d6efd0 remove xmouse.cpp since it's pretty much useless 2005-06-19 02:48:14 +00:00
taylor 569163a265 never "promote" to a lower rank than current 2005-06-19 02:47:00 +00:00
taylor 8c77de35ce OGG streaming fixes to get data reading right and avoid skipping
properly handle seeking in OGG streams
compiler warning fix in OpenAL builds
2005-06-19 02:45:56 +00:00
taylor a5e533c7e3 WMC's build fix, part deux 2005-06-19 02:43:49 +00:00
taylor 4ee7dd823a jumpnodes can get deleted outside of FRED now so allow for that 2005-06-19 02:43:14 +00:00
taylor 0fba391cbb really needed to mention those two things as well given the types of changes those are 2005-06-19 02:42:21 +00:00
taylor a61100399b fix possible crash from popups, especially in multi 2005-06-19 02:38:33 +00:00
taylor fbf69f1284 model_free_all() will unload textures so don't bother doing it twice 2005-06-19 02:37:43 +00:00
taylor 260b800593 general cleanup, remove some old code
speed up gr_opengl_flip() just a tad
inverted gamma slider fix that Sticks made to D3D
possible fix for ATI green screens
move opengl_check_for_errors() out of gropentnl so we can use it everywhere
fix logged OGL info from debug builds to be a little more readable
if an extension is found but required function is not then fail
try to optimize glDrawRangeElements so we are not rendering more than the card is optimized for
some 2d matrix usage checks
2005-06-19 02:37:02 +00:00
taylor c9c52327e0 allow screenshots and backsaves in windowed mode
account for D3D_textures_in size so that it doesn't hit negative values
2005-06-19 02:31:51 +00:00
taylor 1929229e5e MIN Num_iface_sounds fix 2005-06-19 02:29:54 +00:00
taylor d12a2fb8b4 add a _fast version of bm_unload() to be used in modelinterp and future graphics API code
clean up some modelinterp code to not use memcpy() everywhere so it's more platform compatible and matches old code (Jens Granseuer)
NaN check to catch shards-of-death and prevent hitting an Assert() (Jens Granseuer)
fix jumpnode code to catch model errors and close a memory leak
make the call to bm_unload_all() after model_free_all() since we will get bmpman screwups otherwise
don't show hardware sound RAM when using OpenAL build, it will always be 0
print top-right memory figures in debug builds slighly further over when 1024+ res
2005-06-19 02:28:56 +00:00
Goober5000 4f6808444d fixed a CVS log spelling error, plus fixed a tricky sexp allocation bug
--Goober5000
2005-06-16 05:17:32 +00:00
mrduckman 98d8a721a4 Added LIST command and added comment about PRIVMSG for Channels 2005-06-09 14:57:38 +00:00
wmcoolmon 1db7d30986 Hopefully this fixes something :) 2005-06-07 06:34:30 +00:00
wmcoolmon d81092d96f This may stop targeting not-targetable ships in EMP 2005-06-07 06:10:51 +00:00
taylor 685f2afa25 add wxwidgets macro so that the dev package doesn't have to be installed to compile regular builds 2005-06-04 20:03:37 +00:00
wmcoolmon 42a8430c92 I *think* this should fix bool lists 2005-06-03 22:36:57 +00:00
taylor cc24f80476 some IBX debugging info to help determine if an IBX is corrupt post-mortem 2005-06-03 18:18:02 +00:00
matt 8fdeb16f8f D3D gamma now no longer works backwards --Sticks 2005-06-03 16:42:30 +00:00
taylor 2305d2b831 the problem this tried to fix should be properly fixed now but I keep forgetting to remove this block 2005-06-03 06:51:50 +00:00
taylor c5c5382fe4 cleanup of gr_bitmap since it's the same for D3D and OGL, skip if GR_STUB though
fix resize/rendering issue when detail culling is used with optimized opengl_create_texture_sub()
2005-06-03 06:44:17 +00:00
taylor d65f5212f5 eek... fix wrong description of changes 2005-06-03 06:41:37 +00:00
taylor f46a6295f7 better audio pause/unpause support when game window loses focus or is minimized 2005-06-03 06:39:27 +00:00
wmcoolmon 6b1733aa00 Small extern fix 2005-06-03 02:28:54 +00:00
Goober5000 f62f8a9bf6 ugh... reverting taylor's change for now; I'll have to take another look at this
--Goober5000
2005-06-02 03:20:20 +00:00
wmcoolmon 2607cf6af9 Protected ships are safe from spawning weapons. :) 2005-06-02 02:41:52 +00:00
wmcoolmon e23bc76eb4 Removed OF_DESTROYED, replacing it with a deletion cache 2005-06-02 02:09:43 +00:00
wmcoolmon 5acb5295d9 Cast to quiet error 2005-06-02 01:56:32 +00:00
wmcoolmon 9af4132f51 Better missing model handling Pt. 2 2005-06-01 22:54:23 +00:00
wmcoolmon 3e47590d0c Better missing model handling 2005-06-01 22:52:56 +00:00
phreak 7e9d517e84 clarified error messages to say that the files listed on asserts/warnings/errors
are located on the computers that built the exe.
2005-06-01 15:10:26 +00:00
taylor cee7b62c98 bit of cleanup for audiostr-openal and fix a Windows-only enum error
bunch of OGG related fixes for Linux and Windows (DirectSound and OpenAL), fixes audio related TBP 3.2 crashes
gracefully handle OGG logical bitstream changes, shouldn't even load if there is more than 1
2005-06-01 09:41:14 +00:00
taylor af3587c1e8 little cleanup
optimize opengl_create_texture_sub() by not doing any extra image processing if we don't have to
  if an image is already power-of-2 or we don't need power-of-2 then avoid the extra time and memory usage
2005-06-01 09:37:44 +00:00
taylor 10955f821d make sure that newly created entries are properly initialized 2005-06-01 09:35:42 +00:00
taylor 2fa258810c newline fix 2005-06-01 09:34:59 +00:00
taylor 19982f4077 well that previous docking fix wasn't quite enough, this makes sure that code will actually get exec'd
(Goober: might want to double check that this isn't stupid, does appear abort properly though)
2005-06-01 09:34:36 +00:00
wmcoolmon b0bafe235b This should fix redmenace's Assert...I'm not sure why it hasn't been triggering every time a shield is at full strength. 2005-05-30 23:41:36 +00:00
taylor d66f548fa7 if a briefing does have any stages (no text) then don't carry over text from a previous mission
some generic cleanup to V code that isn't a real problem now but could easily have been a memleak
2005-05-30 05:33:11 +00:00
taylor 55998a0d29 make sure we don't show various offscreen indicators and info when hud-disabled-except-messages is used 2005-05-30 05:31:19 +00:00
taylor 38f432110e make sure we stop mission in the redalert case too 2005-05-30 05:30:02 +00:00
taylor e30a2338c5 as soon as the first frame gets released the rest are unreachable in the loop
this was basically became a memory leak as additional frames never got released
2005-05-30 05:29:17 +00:00
taylor 2c363f94f4 me is a moron, this broke audio streaming 2005-05-30 05:27:30 +00:00
Goober5000 e000a106e2 Taylor's the real SCP leader; I just play one on the Internet
--Goober5000
2005-05-30 04:38:33 +00:00
taylor 82104dbffc haven't got a clue what I was thinking with that crap 2005-05-28 19:44:17 +00:00
taylor 5a83abf909 debug message fixing
a little bit of code clarity
2005-05-28 19:43:28 +00:00
taylor 8df05848f4 add a NULL check to model_get() for better error detection over an outright CTD 2005-05-28 19:41:56 +00:00
taylor 478d504f09 fix ani corruption detection so that certain streaming anis don't hit it (check was wrong anyway) 2005-05-28 19:40:59 +00:00
Goober5000 3475444eee moved some prototypes that WMC put in the header file back to the implementation file
--Goober5000
2005-05-27 03:37:53 +00:00
Goober5000 7441e76428 hmm, rolled back to 2.3
--Goober5000
2005-05-27 03:36:20 +00:00
Goober5000 5188f6ca9b removed some old unnecessary prototypes WMC had added
--Goober5000
2005-05-27 02:37:29 +00:00
tbird a882dd68a1 no message 2005-05-26 20:59:59 +00:00
tbird 4c57cd3090 no message 2005-05-26 20:59:58 +00:00
tbird 340881347e Removed due to problems with getting the correct file in place 2005-05-26 20:57:33 +00:00
tbird 33f3b34333 Updated based on VC6 projects 2005-05-26 20:56:10 +00:00
taylor ca7a976823 forgot to take into account F1_0 on timer_get_fixed_seconds(), remove those stupid CRs too 2005-05-26 09:21:28 +00:00
Goober5000 146edc116c some bracket happiness, plus fixed the traning message version of the crazy semicolon bug
(thanks to taylor for fixing the regular message version)
--Goober500
2005-05-26 05:07:19 +00:00
taylor a9570a7646 the Loki extensions are Linux only so don't even bother checking under Windows, the
new spec has a cross-platform way of getting the same thing so this isn't a big deal
2005-05-26 04:32:31 +00:00
taylor 987ea35f15 don't page out textures in ship_delete() since it causes some slowdown which can make
the explosion effects skip/stutter
2005-05-26 04:30:48 +00:00
taylor 031580c7e4 those crazy semi-colons 2005-05-26 04:29:23 +00:00
taylor 58ca9a4fc7 if we switch to a pilot who has a campaign that isn't available then abort the read and
deselect all pilots, should prevent data loss or crashes due to the missing safety check
2005-05-26 04:28:45 +00:00
taylor aac663c449 timer changes to fix game_busy() on the loading screen and 100% incorrect values on some machines,
don't know if this is going to work that great but it's more like the Linux SDL code now which
  has worked for years without major problems
2005-05-26 04:27:11 +00:00
taylor 232f1a1374 make sure batch rendering of lasers happens after fog is disabled in nebula missions 2005-05-24 20:55:21 +00:00
taylor bcfc58b350 couple of extra checks to make sure that we can't enter the barracks or the techroom
if the currently selected campaign isn't available, fixes several pilot crash bugs
2005-05-24 20:54:06 +00:00
taylor b548766341 make sure that we recursively create directories for Linux/OSX
replace older recursive mkdir method in cfileextractor with new method
2005-05-24 20:52:10 +00:00
wmcoolmon a16279ca20 Commented out -fixbugs and -nocrash in preparation for 3.6.7 2005-05-24 07:05:49 +00:00
taylor 3b84c4512b extra check to make sure that RLE reading never goes over frame size in new ANI formats 2005-05-24 03:13:36 +00:00
taylor 273cc3d09b get command sanity check right, fixes lowercase on extract too 2005-05-24 03:12:27 +00:00
taylor 36005939b2 an extra bounds check in sound.cpp
fix audiostr error when filename is !NULL but 0 in len might hit on SDL debug code
2005-05-24 03:11:38 +00:00
taylor 481dcf346b quick catch for some corrupted anis, only a partial fix but it will do until something
a bit more heavy duty comes along in the near future
2005-05-23 05:58:31 +00:00
taylor 4ca07aa1b3 Jens, again:
- compiler warning fixes
 - sanity and readability fixes for bmpman
2005-05-23 05:56:26 +00:00
taylor b275424411 more from Jens...
- make sure that a frame number doesn't get carried over to non-animated weapon glows
 - move the line splitting code in missiontraining.cpp so that we don't have to worry about EOS chars
2005-05-23 05:55:13 +00:00
phreak 10ef1ffbae fix out of bounds error 2005-05-23 04:58:43 +00:00
phreak 6a52ecbe18 compile warning fixage. 2005-05-22 22:47:19 +00:00
taylor 92aaac8242 a medals crash fix that isn't influenced by the evil Java empire (Jens Granseuer) 2005-05-18 14:03:27 +00:00
taylor e1c087c41a some basic Polish language support from the icculus.org version (Janusz Dziemidowicz) 2005-05-18 14:01:31 +00:00
taylor 86e31c7703 a few help text adjustments and fix some compiler warnings 2005-05-18 01:57:54 +00:00
taylor fca8854fde Initial import of cfileextractor, still needs some work but does what it needs to 2005-05-17 21:00:57 +00:00
taylor c22f38ec7e add building for cfileextractor 2005-05-17 20:59:23 +00:00
taylor c13a57bc05 more autogen goodness from Jens
- remove old/unneeded checks (ie. we don't use libtool so don't check for it)
 - use --foreign rather than --gnu on automake so we can get rid of things like NEWS, etc.
2005-05-17 20:58:46 +00:00
taylor 85d25fef5e more missed stuff from the vm_* macro change (thanks Alpha0) 2005-05-17 20:57:05 +00:00
phreak 19370fb061 reverted a tagged only commit, it wasn't needed 2005-05-16 15:40:43 +00:00
phreak 436e9ddb86 custom loading screen fixage. 2005-05-15 21:40:31 +00:00
taylor d09574c403 don't let the ogg callbacks close the file handle on us, let us do it ourselves to keep things straight 2005-05-15 06:47:57 +00:00
phreak 93d2cfeaca another tagged only turret fix 2005-05-14 21:48:22 +00:00
phreak a44e312429 stop turrets from targeting non-bombs. also some tagged-only fixes. 2005-05-14 21:35:04 +00:00
phreak e92d2c5590 fixed an out-of-bounds array bug 2005-05-14 21:34:17 +00:00
phreak 9571e65fc6 medal_stuff needed a copy constructor and an overloaded assignment operator. 2005-05-14 16:16:48 +00:00
taylor d980676576 unbreak joining (when forming, not in-game) (Jens Granseuer) 2005-05-13 23:10:17 +00:00
taylor b4ea91d8ec Ooops! Added the wrong version of the streaming patch from Jens 2005-05-13 23:09:28 +00:00
taylor bbcf21cba7 properly support multiple versions of automake (Jens Granseuer) 2005-05-13 23:08:39 +00:00
phreak 918d3e30f5 possible fix for seeing suns through ships. shouldn't break anything. 2005-05-13 20:55:19 +00:00
taylor 3d499e190b more malloc->vm_malloc, free->vm_free, strdup->vm_strdup fixage 2005-05-13 02:56:34 +00:00
phreak 89d2954f9e fixed another minimum range bug that prevented the Colossus and the Beast from
properly engaging one another in the mission: Their Finest Hour (SM3-08)
2005-05-13 02:50:47 +00:00
taylor 9cc6998566 missed a strdup to vm_strdup conversion 2005-05-13 02:47:58 +00:00
phreak a65132eb30 forgot a vm_strdup in place of a strdup 2005-05-13 02:41:24 +00:00
taylor 3f6e13d20b use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
2005-05-12 17:49:18 +00:00
taylor 64a0cc64a9 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
fix a few streaming errors in OpenAL code (Jens Granseuer)
temporary change to help deal with missing music in OpenAL Windows builds
don't assert when si->data is NULL unless we really need to check (OpenAL only)
2005-05-12 17:47:57 +00:00
taylor d6b8f7305d use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
reallocate sp->triggers with the real vm_realloc() rather than that manual method
2005-05-12 17:45:53 +00:00
taylor 89b916d044 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
fix crash with Warning() message getting the wrong string
2005-05-12 17:44:02 +00:00
taylor f523fa55d8 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
try and keep up with how much VBO data is in memory too since that takes away from texture memory
2005-05-12 17:43:20 +00:00
taylor 1da38b972f use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
set byte_mult to 2 for TCACHE_TYPE_AABITMAP to get the memory size right for Debug builds
2005-05-12 17:42:13 +00:00
taylor 2a94ce514a use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
use correct GL VRAM texture number in OGL mode rather than the D3D number
2005-05-12 17:40:48 +00:00
taylor 2b430d943d use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
change system->decals allocation to use real vm_realloc() rather than that manual method
2005-05-12 17:39:13 +00:00
taylor ab97b115cb add an extra gr_flip() after gr_clear() to make sure the change is made active 2005-05-12 17:37:48 +00:00
taylor 7e67ebee84 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
for the game_busy() text during page in add a "BmpMan" so we know better what's going on
2005-05-12 17:36:59 +00:00
Goober5000 1dd37d804d added dialogs to the project file
--Goober5000
2005-05-12 14:02:57 +00:00
Goober5000 53ebdf2cf7 added a bunch of dialogs to wxFRED... thanks, taylor, for the GUI development :)
--Goober5000
2005-05-12 14:00:15 +00:00
Goober5000 2ef771f4da whoops
--Goober5000
2005-05-12 03:51:17 +00:00
Goober5000 603530fa0e repeating messages with variables should work properly now
--Goober5000
2005-05-12 03:50:10 +00:00
Goober5000 0185bdccd0 removed variables in messages for now
--Goober5000
2005-05-12 01:34:50 +00:00
phreak e5f9f31f5d added mission flag that will not show enemy wing names, just the ship class. 2005-05-11 22:15:49 +00:00
Goober5000 2222c6ef1d fixed a docking bug
--Goober5000
2005-05-11 11:38:03 +00:00
Goober5000 788d2df962 grr
--Goober5000
2005-05-11 09:32:03 +00:00
Goober5000 48261dc983 fixed a few of karajorma's bugs
--Goober5000
2005-05-11 09:28:32 +00:00
Goober5000 cfb28ed364 changed an Assert() to an Error()
--Goober5000
2005-05-11 09:27:35 +00:00
Goober5000 77e9e8f15e variables should now work properly in messages that are sent multiple times
--Goober5000
2005-05-11 08:10:20 +00:00
phreak 6ec85ab59c clean out some old code 2005-05-11 02:16:17 +00:00
phreak fd5eafc9a6 fix the problem where the fade in/out doesn't work if looking at a sun. 2005-05-11 02:15:07 +00:00
phreak 25ee113b2d reverted a change that WMC made. It made Goober mad and delayed the release of
3.6.6 by two months.
2005-05-11 00:25:42 +00:00
phreak e63dfcf41d fixed a minimum weapon range bug that was causing turrets to fire at ships beyond
the actual range of a weapon.
2005-05-10 15:49:04 +00:00
phreak a6ac8901e4 if you're using all_turret_weapons_have_flags() with a WIF2_** flag, use
all_turret_weapons_have_flags_wif2().

Corrected some logic that would dump a valid target for turrets if its objnum is 0, as
opposed to -1.
2005-05-10 02:44:40 +00:00
phreak dfe453a4f7 when finding valid weapons, set i to MAX_SHIP_PRIMARY_BANKS - 1 since i
is incremented at the top of the loop.  otherwise, we would pass over the first secondary
weapon in the bank.
2005-05-10 01:47:34 +00:00
wmcoolmon 7d687d2840 Code betterness 2005-05-08 20:39:10 +00:00
wmcoolmon 75a677d43c Dynamically allocated medals 2005-05-08 20:38:32 +00:00
wmcoolmon fe32a70746 Various turret code changes in a vain attempt to make things more readable/work properly 2005-05-08 20:35:26 +00:00
wmcoolmon 0e21d7a7ed Turret debugging code; Medals stuff; GUI_system change 2005-05-08 20:33:42 +00:00
wmcoolmon 4e9bf0998a Dynamically allocated medals 2005-05-08 20:28:57 +00:00
wmcoolmon 4665eaa40a Change to GUI_system; this will probably break the lab, but is necessary for things to compile properly. 2005-05-08 20:27:51 +00:00
wmcoolmon 5385beb40c Change to GUI_system (to prevent memory leaks and allow for auto-deconstruction) 2005-05-08 20:26:46 +00:00
wmcoolmon 3bb486e17e "backspace" function 2005-05-08 20:23:28 +00:00
wmcoolmon b39cdf84a0 armor.tbl revamp 2005-05-08 20:21:48 +00:00
tbird 6ebd21d573 Added project files for VC.NET 7.0 (the 2005 project files do not work in 7.0) 2005-05-04 00:30:56 +00:00
wmcoolmon a5986495d0 Added variables to permanent location 2005-05-03 07:55:44 +00:00
wmcoolmon 0e624d5596 Removed variables files 2005-05-03 07:54:49 +00:00
wmcoolmon 1b0f1be626 Added Bobb's variable system (with some minor compiler-warning fixes) 2005-05-03 06:33:07 +00:00
wmcoolmon d7e8d415fd Bah, stupid externs. :P 2005-05-02 22:36:54 +00:00
mrduckman abde894aa7 Added /NAMES command (Very needed to know who's in a channel :P) 2005-05-02 15:33:17 +00:00
phreak 3440b0b1c5 bumped MAX_SPAWN_WEAPONS to 30 for inferno builds 2005-05-01 23:40:44 +00:00
phreak 2095b4f8e4 added CVS info to top of file. 2005-05-01 23:23:18 +00:00
phreak cfe5ac5854 when creating the window take into account the top border 2005-05-01 23:17:46 +00:00
phreak d49301b846 fix the window from shrinking if a cutscene is played in windowed mode 2005-05-01 23:16:12 +00:00
phreak c9404c6231 don't confine the cursor in d3d 2005-05-01 23:13:19 +00:00
wmcoolmon c4a0fced8d -output_sexps command line 2005-05-01 07:13:59 +00:00
wmcoolmon be06a65c32 Added (up-to-date) SEXP description info. 2005-05-01 06:18:58 +00:00
phreak 37b6872b9c buckets in sort_weapons_by_type() allocated on the heap instead of the stack. 2005-04-30 18:20:57 +00:00
phreak 4bb01fe267 ABbitmap should default to -1 2005-04-30 18:18:46 +00:00
phreak 837d80e6fb bm_page_in_textures() should return if bitmap_num is any negative value, instead of just -1 2005-04-30 18:17:17 +00:00
wmcoolmon a0a5b6261a Removed FS2_DEMO defines that looked like they wouldn't cause the universe to collapse 2005-04-28 05:29:30 +00:00
wmcoolmon 611f4cb1e8 Cleared up some ambiguity that made MSVC 2003 go on strike 2005-04-28 05:12:26 +00:00
wmcoolmon d9909754b9 stuff_byte to stuff_ubyte 2005-04-28 01:39:14 +00:00
wmcoolmon d0198a41e7 parse_ship uses stuff_bool_list; stuff_byte to stuff_ubyte 2005-04-28 01:38:32 +00:00
wmcoolmon 3030913492 More parsing flexibility 2005-04-28 01:36:46 +00:00
wmcoolmon f46f237468 stuff_byte to stuff_ubyte; does the same thing, but with a better name. 2005-04-28 01:36:09 +00:00
wmcoolmon b6a31c28a2 Switch stuff_string_white to stuff_string (I don't see why _white was used in the first place) 2005-04-28 01:32:57 +00:00
wmcoolmon da20f4ede2 Added stuff_bool_list; Internationalized stuff_boolean. 2005-04-28 01:12:19 +00:00
Goober5000 2f07f21d1e -made the XRC file parsed on load instead of embedded
-migrated wxFRED to wxWidgets 2.6.0
--Goober5000
2005-04-25 12:14:21 +00:00
taylor 43675291f4 newline fix 2005-04-25 06:36:25 +00:00
taylor b44135a195 use full size of Campaign_missions[] for simroom filtering, fixes the problem of campaign
missions still showing up in the single list even after filtering
2005-04-25 06:36:01 +00:00
taylor 1df8270c1e little cleanup so that debug and release build files don't have to be listed twice
add newer wxFRED2 files
2005-04-25 06:33:56 +00:00
wmcoolmon cb91362461 Use parse_sound instead of code chunks 2005-04-25 00:34:00 +00:00
wmcoolmon 6acab304f9 Dynamically allocated engine washes; subsystem sounds; armor fixes. Line 4268 of ship.cpp, apparently, works properly; bears further looking into. 2005-04-25 00:31:14 +00:00
wmcoolmon c73e870650 subsystem sounds 2005-04-25 00:28:58 +00:00
wmcoolmon 31296826e1 MAX_SHIP_TYPES > Num_ship_types 2005-04-25 00:28:17 +00:00
wmcoolmon 865808e34e Commented out unneeded array (Glide) 2005-04-25 00:27:32 +00:00
wmcoolmon 36c25e7479 Dynamically allocated engine washes; subsystem sounds 2005-04-25 00:26:53 +00:00
wmcoolmon fe177851c7 Windows have minimum size according to caption; made lab use another tree level so all ships can be seen 2005-04-25 00:24:34 +00:00
wmcoolmon e70db11b41 Added parse_sound; replaced Assert() with an if() (The latter may not be a good idea, but it keeps missions from being un-debuggable) 2005-04-25 00:22:34 +00:00
wmcoolmon 07ea9a87bc Center title screen, removal of unnecessary #ifdefs 2005-04-25 00:21:30 +00:00
wmcoolmon 1aa4a3bf17 Bumped console printing buffer size so people can play with the neb2 command 2005-04-25 00:07:22 +00:00
wmcoolmon 05b9e92455 MAX_SHIP_TYPES -> Num_ship_types 2005-04-25 00:04:30 +00:00
Goober5000 d90c11f8d9 updated the project file
--Goober5000
2005-04-24 14:45:17 +00:00
Goober5000 d680f65288 wxFRED now uses XRC-based resources
--Goober5000
2005-04-24 14:42:27 +00:00
taylor a11e6910ae really are too many changes here:
- remove all bitmap section support and fix problems with previous attempt
 ( code/bmpman/bmpman.cpp, code/bmpman/bmpman.h, code/globalincs/pstypes.h,
   code/graphics/2d.cpp, code/graphics/2d.h code/graphics/grd3dbmpman.cpp,
   code/graphics/grd3dinternal.h, code/graphics/grd3drender.cpp, code/graphics/grd3dtexture.cpp,
   code/graphics/grinternal.h, code/graphics/gropengl.cpp, code/graphics/gropengl.h,
   code/graphics/gropengllight.cpp, code/graphics/gropengltexture.cpp, code/graphics/gropengltexture.h,
   code/graphics/tmapper.h, code/network/multi_pinfo.cpp, code/radar/radarorb.cpp
   code/render/3ddraw.cpp )
 - use CLAMP() define in gropengl.h for gropengllight instead of single clamp() function
 - remove some old/outdated code from gropengl.cpp and gropengltexture.cpp
2005-04-24 12:56:43 +00:00
taylor 2bbef05162 little cleanup of laser rendering
- fix animated glows
 - proper alpha modification (still messed up somewhere though, shows in neb missions)
 - remove excess batch_render()
2005-04-24 12:47:36 +00:00
taylor d3f18e16a1 possible dev/0 bug fix (Jens Granseuer) 2005-04-24 12:45:14 +00:00
taylor bd28b49b7d make sure we don't build with speech support under Linux unless we specify it as a configure option 2005-04-24 12:44:25 +00:00
Goober5000 35a3b03a2e fix0red the CVS log
--Goober5000
2005-04-24 08:27:17 +00:00
Goober5000 c2c5b253a5 made swarm/corkscrew/flak conflict more friendly
--Goober5000
2005-04-24 07:31:34 +00:00
wmcoolmon fdb42c3908 Enabled movies in windowed mode; if this causes problems for people, they can always use -dnoshowvid 2005-04-24 06:52:23 +00:00
Goober5000 b66d2a3774 eh, stupid quotes
--Goober5000
2005-04-24 05:53:15 +00:00
Goober5000 e60ec606da actually, I think this way works better
--Goober5000
2005-04-24 05:15:24 +00:00
Goober5000 cdfe57c517 added FS2PATH environment variable and removed custom build stuff
--Goober5000
2005-04-24 04:47:58 +00:00
phreak c8c5350859 centered the window on the desktop if the -window command line is used. 2005-04-24 03:06:29 +00:00
wmcoolmon 5bf6f6939d Added resizing option to gr_shade. We can probably merge gr_shade and gr_rect; they do the same thing. 2005-04-24 03:02:43 +00:00
wmcoolmon ec387144ef Might as well fix trainer messages too. 2005-04-24 03:01:56 +00:00
wmcoolmon 4e94f188c5 Lowlevel (ie vertex buffer-mapping) functions for _rect and _shade 2005-04-24 02:40:40 +00:00
wmcoolmon 04b48dd106 Context help fixing goodness 2005-04-24 02:39:36 +00:00
wmcoolmon 34953040c8 Moved gr_rect and gr_shade to be API-nonspecific as the OGL/D3D functions were virtually identical 2005-04-24 02:38:31 +00:00
Goober5000 3b05999da8 subsystem fix
--Goober5000
2005-04-24 02:10:53 +00:00
wmcoolmon 0acb0166a7 Removed GL_SECTIONS 2005-04-23 01:17:09 +00:00
taylor c9560f59e2 wurrps 2005-04-22 02:32:18 +00:00
wmcoolmon 7cc8715ca9 Minor updates to the GUI, and added some code that will (hopefully) resize HUD images in nonstandard resolutions. I couldn't test it; got an out of memory error. 2005-04-22 00:34:55 +00:00
taylor 5e0ebf79c8 sexp to swap the skybox in mission, not tested in FRED, hopefully I didn't mess this up too much 2005-04-21 15:59:42 +00:00
taylor 043758c633 initial changes to mission loading and status in debug builds
- move bmpman page in init to an earlier stage to avoid unloading sexp loaded images
 - small changes to progress reports in debug builds so that it's easier to tell what's slow
 - initialize the loading screen before mission_parse() so that we'll be about to get a more accurate load time
fix memory leak in gamesnd (yes, I made a mistake ;))
make sure we unload models on game shutdown too
2005-04-21 15:58:08 +00:00
taylor 17002e83ab make sure we don't try to process chatbox_close() more than once 2005-04-21 15:53:24 +00:00
taylor 5eaf2f3534 stupid little comment fix, no big deal 2005-04-21 15:52:24 +00:00
taylor 2be5cedfa2 fix source/dest memory overwrite that Valgrind was complaining about 2005-04-21 15:51:40 +00:00
taylor 7b997f9aba we can't resize compressed textures so... don't, fixes rendering problems when not at max texture detail 2005-04-21 15:50:47 +00:00
taylor 75332108e5 update of bmpman and model bitmap management, well tested but things may get a bit bumpy
- use VM_* macros for bmpman since it didn't seem to register the memory correctly (temporary)
 - a little "stupid" fix for dds bitmap reading
 - fix it so that memory is released properly on bitmap read errors
 - some cleanup to model texture loading
 - allow model textures to get released rather than just unloaded, saves bitmap slots
 - bump MAX_BITMAPS to 4750, should be able to decrease after public testing of new code
2005-04-21 15:49:21 +00:00
wmcoolmon 48a10eabcb Nonstandard res fix. 2005-04-20 08:32:01 +00:00
wmcoolmon f5be4600d7 Fix silly armor.tbl parse error. 2005-04-20 08:26:49 +00:00
phreak 83e4d6bde3 NMONO should not interfere with the debug window 2005-04-20 04:34:42 +00:00
phreak 735b2828c2 get the cheat keys for "force weapon" working again 2005-04-20 04:34:01 +00:00
phreak b1726ccbdb CVS file header. take 1 2005-04-20 04:29:50 +00:00
phreak c91e5a8bd6 fix for the slow firing turret problem 2005-04-20 04:27:56 +00:00
wmcoolmon b3f700a4c3 Lock time compression when autopilot is engaged 2005-04-19 23:03:42 +00:00
taylor a94100bf4c try not to buffer output to the speech dev so that the text doesn't just show up some time in the future 2005-04-19 06:29:28 +00:00
taylor 374f6168ad we might actually be needing to load a model here ;) 2005-04-19 06:27:54 +00:00
taylor 371ff6cb0d small compiler warning fixes, more 'always true' stuff 2005-04-19 06:26:56 +00:00
taylor 7736d8fc63 don't try to allocate 0 bytes of memory when there are no shield tris, weird memory stuff frightens me 2005-04-19 06:25:23 +00:00
taylor 03bdf5e87f 8 months I've been meaning to put this in the Linux tree, me == moron 2005-04-19 06:22:20 +00:00
Goober5000 03548e8c38 model and class changes should be all set now
--Goober5000
2005-04-18 08:35:28 +00:00
Goober5000 57c2060758 better subsystem comparison
--Goober5000
2005-04-18 06:59:16 +00:00
Goober5000 693577c8e2 removed ship->alt_modelnum as it was essentially duplicates of ship->modelnum; changed the alt modelnum stuff accordingly
fixes for ship_model_change and change_ship_type
--Goober5000
2005-04-18 05:27:26 +00:00
taylor ccbda0a839 some extra checks to make sure we don't act on invalid gamesnds (fix for WCS) 2005-04-18 03:31:27 +00:00
taylor f08b263d74 more accurate play position for OpenAL when AL_BYTE_LOKI is used (Jens Granseuer) 2005-04-18 03:30:05 +00:00
Goober5000 fae5b4ef0f more sexp goodness
--Goober5000
2005-04-18 03:16:57 +00:00
taylor 14e7f76c3a updated Linux joystick code that's a bit less insane speed wise
remove ability to build without joystick support, no reason to keep it around
fix unusable warning flag with libjpeg building
2005-04-17 05:38:29 +00:00
phreak 9e41484c57 fixed lasers drawing backwards 2005-04-16 18:43:17 +00:00
wmcoolmon febb7b2386 Fixed the lab; Made the storybook look less grotesque without skins. 2005-04-16 08:13:34 +00:00
wmcoolmon 50109e9298 Eh, what the hey. Maybe I should've taken the breathalyzer test. :) 2005-04-16 04:19:21 +00:00
wmcoolmon 9de0e8b059 More optional tag-making for ships.tbl 2005-04-16 04:16:57 +00:00
wmcoolmon cc2dcbb434 Minor changes; made even more fields in ships.tbl optional. 2005-04-16 03:36:13 +00:00
wmcoolmon f281c0a7d3 Removed an unneeded semicolon 2005-04-16 03:05:05 +00:00
wmcoolmon 0e079e49fa Added type "exponential base"; equation is 'final_damage = (x^damage)' 2005-04-15 23:19:13 +00:00
taylor e610e9d5af fix ambient light 2005-04-15 11:42:27 +00:00
taylor 96b16c4896 stupid <expletive-delete> terminal, I <expletive-deleted> <expletive-deleted>!!! 2005-04-15 11:41:28 +00:00
taylor 4465f5ee65 new GCC = new warning messages, yippeeeecvs commit code/parse/encrypt.h code/parse/encrypt.cpp code/scramble/scramble.cpp 2005-04-15 11:36:55 +00:00
taylor dfc610f205 add scramble port
support both FS1 (8bit and 7bit) and FS2 style encryption
2005-04-15 11:35:18 +00:00
taylor 8f791fc83b proposes that WMC be subject to a breathalyzer test before commit ;) 2005-04-15 11:32:26 +00:00
taylor 5288098d1c div-by-zero fix for snd_time_remaining() 2005-04-15 11:28:41 +00:00
taylor a3e26f74fb some cleanup to prevent utilities linking all game libs 2005-04-15 11:27:53 +00:00
wmcoolmon a3e406d67b It's amazing how many possible bugs you can catch simply by doing something completely different than coding 2005-04-15 07:19:29 +00:00
wmcoolmon 8bd110479a One final oops (hopefully). 2005-04-15 06:59:05 +00:00
wmcoolmon 6c864e263b Another oops. 2005-04-15 06:56:02 +00:00
wmcoolmon caaef0253c Er, oops 2005-04-15 06:40:54 +00:00
wmcoolmon ed1ea9d172 Local codebase commit; adds armor system. 2005-04-15 06:23:18 +00:00
Goober5000 692941878b bumped sexp limit
--Goober5000
2005-04-14 20:03:16 +00:00
phreak 0f6f2a97cc Updated the message of a required extension that hasn't been found.
It was referencing the old Glide engine.
2005-04-13 23:24:21 +00:00
Goober5000 0203839ba2 fixed the compile errors (thanks Phreak)
--Goober5000
2005-04-13 22:31:53 +00:00
Goober5000 a9d4b61247 removed spurious folder
--Goober5000
2005-04-13 22:17:27 +00:00
taylor 45d5fb1add I totally blame that on the keyboard 2005-04-12 19:53:44 +00:00
taylor 57473d6996 more demo support (Jens Granseuer) 2005-04-12 19:22:48 +00:00
taylor 4797c07806 not sure what that file was doing there... 2005-04-12 19:22:00 +00:00
taylor 7e3b7769c6 many, many compiler warning and header fixes (Jens Granseuer)
fix free on possible NULL in modelinterp.cpp (Jens Granseuer)
2005-04-12 05:26:38 +00:00
taylor 610e713dd5 more support for 'make dist' (Jens Granseuer) 2005-04-12 05:24:48 +00:00
phreak b538d60aa1 ambient light is set in mission 2005-04-12 02:10:09 +00:00
phreak be01f73830 ambient_light_level added to the mission structure 2005-04-12 02:07:00 +00:00
phreak e70fc5a854 gr_set_ambient_light() function for the ambient light sliders in FRED 2005-04-12 02:04:56 +00:00
taylor d29123c582 changes to facilitate 'make dist' 2005-04-11 10:16:26 +00:00
taylor f7fce69d44 un-revert previous revert since it does apparently affect MinGW (Alpha0) 2005-04-11 10:15:11 +00:00
taylor 8a05cd48e7 some limits.h fixes to make GCC happier
revert timer asm change since it doesn't even get used with Linux and couldn't have been the slowdown problem
2005-04-11 05:50:36 +00:00
taylor 382479b954 make sure use an insensitive case check for Messages[] names (Jens Granseuer)
little clarification of if-else block in message_training_que()
2005-04-11 05:48:34 +00:00
taylor 41b48ea3eb _endthread() doesn't take an argument so do support one (Jens Granseuer)
debug variable fixes in freespace.cpp (Jens Granseuer)
as a safety catch we should Assert() on future usage of things we don't yet support in *nix _splitpath()
2005-04-11 05:45:38 +00:00
taylor 2e4946e744 some demo related fixes (Jens Granseuer) 2005-04-11 05:42:02 +00:00
taylor 98b8273d35 add version checks for autoconf and automake
fix wacky wxFRED2 check (Jens Granseuer)
2005-04-11 05:40:21 +00:00
wmcoolmon d8eace7e79 Fixed some paths stuff. 2005-04-09 07:50:41 +00:00
wmcoolmon d1bc3701d2 *crosses fingers* 2005-04-08 20:03:59 +00:00
wmcoolmon d8426202fd Did things in a somewhat less hackish manner; note that 'Update project' will only update the anjuta directory; you will have to update file, and then manually select the fs2_open/ directory to update *everything* 2005-04-06 18:47:02 +00:00
wmcoolmon 103bfe946e Presumeably, I fixed building in anjuta for anyone who can run
autogen.sh
2005-04-06 18:22:49 +00:00
wmcoolmon 399d745d4a Fixed anjuta project file so it would run from projects subdirectory. 2005-04-06 18:12:17 +00:00
wmcoolmon b2021a1e8c Added some comments to the new turret helper functions. 2005-04-06 18:10:40 +00:00
taylor e1ffad5c85 add audio files for OpenAL, build with USE_OPENAL define to use OpenAL 2005-04-05 12:03:03 +00:00
taylor be88cf017e fix memory error from GL extension list that occurs in certain circumstances 2005-04-05 11:50:57 +00:00
taylor db17bbc63d update what sound files get used 2005-04-05 11:49:37 +00:00
taylor 31d59d3c11 remove acm-unix.cpp, replaced by acm-openal.cpp since it's properly cross-platform now
better error handling for OpenAL functions
Windows can now build properly with OpenAL
extra check to make sure we don't try and use too many hardware bases sources
fix memory error from OpenAL extension list in certain instances
2005-04-05 11:48:23 +00:00
taylor 06c7cc132e handle iostream problems on GCC pre-3.x
fix spacing on wxFRED stuff (yes, I'm that anal)
2005-04-05 11:41:33 +00:00
taylor 7f786136a6 s/vector/vec3d/g, better support for different compilers (Jens Granseuer) 2005-04-05 05:53:25 +00:00
Goober5000 326ffbf902 tweaks
--Goober5000
2005-04-03 11:47:01 +00:00
Goober5000 eac7c7ff45 brought weapon loadout banks into agreement with ship info banks
improved error reporting on apply-to-all
--Goober5000
2005-04-03 08:48:31 +00:00
phreak 9f5f6692d9 put First_secondary_index back in so FRED can compile.
The weapons list is also sorted whenever all loading is done so lasers and beams always
come before missiles.  FRED's loadout code needs this behavior to stick.
2005-04-02 21:34:08 +00:00
Goober5000 d685b6a98c fixed a few errors in apply-to-all
--Goober5000
2005-04-01 08:50:25 +00:00
taylor ba3b396747 fix hanging on exit with OpenAL
some better error handling on OpenAL init and make it more Windows friendly too
basic 3d sound stuff for OpenAL, not working right yet
2005-04-01 07:33:08 +00:00
taylor 068705d442 *that blasted Enter key*, just fixing the log... nothing to see here... 2005-04-01 07:31:10 +00:00
taylor a4c27f3df7 some minor Linux fixage 2005-04-01 07:29:40 +00:00
taylor e64cd14892 code/ship 2005-04-01 07:27:32 +00:00
taylor 4b8a521200 go back to 24-bit depth, 32 didn't help any with ATI bugs 2005-04-01 07:25:54 +00:00
mrduckman 6478d14288 Made a change for wxWidget checks, checking for 2.4.2 version. 2005-03-31 21:12:23 +00:00
Goober5000 f7d48064c5 whoops
--Goober5000
2005-03-31 12:45:22 +00:00
Goober5000 780df94b55 implemented the apply-to-all wing loadout button
--Goober5000
2005-03-31 12:43:51 +00:00
Goober5000 8e29897d7a fix type mismatch
--Goober5000
2005-03-31 12:38:24 +00:00
Goober5000 ea51e277a0 changed a bunch of literal constants to their #define'd keywords
--Goober5000
2005-03-31 11:11:56 +00:00
taylor 0ef264e140 forget the swaps for OSX 2005-03-30 16:06:52 +00:00
taylor 934586df2d a little Linux happiness 2005-03-30 16:06:26 +00:00
taylor 97294532ae basic wxFRED2 building, only works on Linux for now 2005-03-30 16:05:42 +00:00
wmcoolmon a78fc4151d Whoops. 2005-03-30 05:37:22 +00:00
wmcoolmon e7f1c3e1fa Made it so *Snd fields in ships.tbl and weapons.tbl take the sound name
as well as its index (ie "L_sidearm.wav" instead of "76")
2005-03-30 02:32:41 +00:00
Goober5000 d574d77f53 fixed version log
--Goober5000
2005-03-30 01:27:49 +00:00
Goober5000 85e2f9b2a9 added header back in, with a small tweak for the .cpp
--Goober5000
2005-03-30 01:23:32 +00:00
Goober5000 217f4e12dc removed mixed-case header file
--Goober5000
2005-03-30 01:20:05 +00:00
Goober5000 7218898e2e set up the main menu options
--Goober5000
2005-03-29 13:35:53 +00:00
Goober5000 c997ccd546 fixed browse info error
--Goober5000
2005-03-29 09:57:02 +00:00
Goober5000 992e4c6932 wxFRED is now dependent on code.lib
--Goober5000
2005-03-29 08:15:44 +00:00
Goober5000 9cf51c7604 whew... bare-bones "hello world" wxFRED base finally implemented!
--Goober5000
2005-03-29 07:55:19 +00:00
wmcoolmon b911af11ea Removed some warnings under Linux/GCC 2005-03-29 07:03:16 +00:00
wmcoolmon ba6da40a84 Added some comments to #defines to make reading easier 2005-03-29 06:36:37 +00:00
wmcoolmon 38c004708f Fixed extern to compile under Linux 2005-03-29 06:28:52 +00:00
phreak e5ccec4457 global variable "Jump_nodes" needs external linkage for FRED 2005-03-29 03:42:07 +00:00
phreak eeef0b3113 get_num_elements() method, probably coded incorrectly, but its needed for FRED 2005-03-29 03:40:15 +00:00
Goober5000 18b17df6a9 added storybook to the MSVC6 project
--Goober5000
2005-03-29 02:50:48 +00:00
mrduckman be3ecf6509 Added OpenGL include dir parameters 2005-03-28 13:25:18 +00:00
taylor 29c36b04e9 fix to snd_time_remaining() to make sure we are getting the correct index into Sounds[] 2005-03-28 00:40:09 +00:00
mrduckman 164d55f828 Syntax correction 2005-03-27 21:13:05 +00:00
mrduckman 9a2904e793 Added /kill IRC Command 2005-03-27 21:06:31 +00:00
wmcoolmon 01136a497d Forgot to replace 'ship' with 'ai' after copy-paste 2005-03-27 17:33:51 +00:00
Goober5000 762662f5b2 bah 2005-03-27 13:37:15 +00:00
Goober5000 3583fe07e6 rewrote the weapon cheat cycle functions to avoid recursion
--Goober5000
2005-03-27 13:23:05 +00:00
Goober5000 aadcac2a5c two new sexps
--Goober5000
2005-03-27 13:00:40 +00:00
Goober5000 6c17ef09ab clarified max hull/shield strength names and added ship guardian thresholds
--Goober5000
2005-03-27 12:28:35 +00:00
taylor 2efe41b7c2 will hopefully fix the slowdown from mission to mission (thanks Alpha0) 2005-03-27 08:57:52 +00:00
taylor faae782fa9 this is what coding on an empty stomach will get you 2005-03-27 08:51:25 +00:00
wmcoolmon 6a9994683d Bizarre combo of fopen() and close() 2005-03-27 08:12:53 +00:00
taylor 31c8326c4c fill in some stuff for timer and mmio calls, not 100% but it works ok 2005-03-27 06:17:54 +00:00
taylor 7f9ddca157 don't use a platform specific ifdef since the OpenAL code may work under Windows now too 2005-03-27 06:16:46 +00:00
taylor afa0f424bf mmio callbacks work on Linux now and fix problem where system ogg.h would get used rather than the local one 2005-03-27 06:15:31 +00:00
taylor e5ab8a5960 update for streaming support and platform independance 2005-03-27 06:14:30 +00:00
taylor 86011a21cb some pilot file fixing when going between multi and single (partial fix) 2005-03-27 06:12:38 +00:00
taylor 825e6014fb make use of new OpenAL define since it's not platform specific anymore 2005-03-27 06:08:42 +00:00
taylor 7fdd13a785 weapon_num can be 0 so let that through 2005-03-27 06:07:54 +00:00
taylor 601a9cb5ee update with current files 2005-03-27 06:07:00 +00:00
taylor e9c0db567e initial import of OpenAL streaming (many thanks to Pierre Willenbrock for the missing parts) 2005-03-27 05:48:58 +00:00
taylor c05391aa4c unix specific version is obsolete 2005-03-27 05:47:31 +00:00
wmcoolmon c6c0e1f3db Fixed possible infinite loop problem
----------------------------------------------------------------------
2005-03-27 04:16:19 +00:00
wmcoolmon 35afc76d9e Fixed missing/invalid variables 2005-03-27 03:04:09 +00:00
wmcoolmon dd52e2548b Forgot to define 'i' outside of for scope...ironically, in the OGL code. 2005-03-27 02:59:27 +00:00
wmcoolmon 2dce5984c9 Some fixes 2005-03-26 07:53:32 +00:00
wmcoolmon 07669c6a51 Cleaned out old code + fixed min problem 2005-03-26 01:49:46 +00:00
wmcoolmon a6c4f1b322 Added the storybook 2005-03-26 00:26:06 +00:00
Goober5000 c406cbb0dd removed unreferenced variable
--Goober5000
2005-03-25 22:36:01 +00:00
wmcoolmon 0b87ed089e Small change now that the storybook is in CVS 2005-03-25 07:35:22 +00:00
wmcoolmon 714120ab6f Updated MSVC6 project file for AI move 2005-03-25 07:12:05 +00:00
wmcoolmon bf2f2aaade Removed old AI files from CVS 2005-03-25 07:03:12 +00:00
wmcoolmon 6c7273c4ef Added taylor's old-weapon code fix 2005-03-25 07:01:53 +00:00
wmcoolmon 2c2a6334db Big, massive, codebase commit. I have not removed the old ai files as the ones I uploaded aren't up-to-date (But should work with the rest of the codebase) 2005-03-25 06:57:38 +00:00
wmcoolmon 36db6a4931 Initial AI code move commit - note that aigoals.cpp has some escape characters in it, I'm not sure if this is really a problem. 2005-03-25 06:45:13 +00:00
taylor fc56aaebff I think I deserve a medal or something for that one :) 2005-03-25 01:10:51 +00:00
taylor 95719b2742 s/gr_ogl_/gr_opengl_/g
add empty gr_opengl_draw_line_list() so that it's not a NULL pointer
make gr_opengl_draw_htl_sphere() just use GLU so we don't need yet another friggin API
2005-03-24 23:42:21 +00:00
taylor ba1527d474 make sure we don't go one over the number of message avis 2005-03-24 23:38:49 +00:00
taylor c45c29ea5b fix GCC building 2005-03-24 23:37:25 +00:00
taylor b399461826 fix compiler warnings with mismatched types and unused variables
cleanup some debug messages so they can be turned off if needed
get rid of extra strstr() check for thrusters since it should never get that far anyway
page_in/page_out of model glows should be better now
removed a bunch of unneeded casts and get type specific math functions right
2005-03-24 23:36:14 +00:00
taylor c0ca55e591 make sounds.tbl dynamic
"filename" will never be larger than 33 chars so having it 260 is a waste (freespace.cpp)
2005-03-24 23:31:46 +00:00
taylor 476a96e47e (re)move some uneeded variables to fix compiler warnings 2005-03-24 23:29:33 +00:00
taylor c253042a4a make sounds.tbl dynamic
have snd_time_remaining() be less stupid
some OpenAL error fixerage
be able to turn off some typically useless debug messages
2005-03-24 23:27:26 +00:00
taylor 58741be76d use SWARM_MISSILE_DELAY again so that it's easier to keep up with
fix compiler warnings
2005-03-24 23:24:01 +00:00
taylor 0e018dc3a2 make sure we will get the right error message 2005-03-24 23:22:59 +00:00
wmcoolmon 5419b484f6 no more MSVC compiler warning 2005-03-24 05:50:07 +00:00
phreak 638894b53a Starfield bitmaps should now draw in non-htl mode 2005-03-23 20:09:23 +00:00
phreak b25d1ebed9 Some specular values in g3_draw_perspective_bitmap() were being incorrectly set. fixed that 2005-03-23 20:08:33 +00:00
taylor eb653d20d5 fix version check for drivers that support OpenGL 2.0+ 2005-03-22 00:36:48 +00:00
phreak ad698f1810 Orb correctly displays in 640x480 2005-03-21 23:19:55 +00:00
phreak 819bacd7e2 Add a function to check whether any duplicate jumpnode names exist 2005-03-20 21:07:10 +00:00
phreak e14f198169 export the functions that deal with the creation and destruction of the starfield buffer.
FRED needs them
2005-03-20 20:02:29 +00:00
phreak ba4b720a99 draw paths and docking points using HTL 2005-03-20 20:01:15 +00:00
phreak 99ac5020d2 lol forgot to commit the function pointer stuff 2005-03-20 18:05:04 +00:00
phreak a5388d9a88 high-level implementation for gr_draw_htl_line and gr_draw_htl_sphere 2005-03-20 00:11:27 +00:00
phreak 76abb99cb8 Added gr_draw_htl_line and gr_draw_htl sphere
There still needs to be D3D versions implemented, but OGL is done.
Follow that or ask phreak about how its implemented/
2005-03-20 00:09:07 +00:00
wmcoolmon 00528726ee OpenGL display lists 2005-03-19 21:03:54 +00:00
Goober5000 b7fa7d42cb corrected misinformation in comment about surface shields (implicit surface
shields were removed for meshed ships)
--Goober5000
2005-03-19 20:45:23 +00:00
wmcoolmon 2a73780770 small bool fix 2005-03-19 20:35:45 +00:00
bobboau 0064937b9b adding d3d state block files 2005-03-19 18:18:04 +00:00
bobboau b46d8e28c7 added new graphic functions for state blocks
also added a class formanageing a new effect
2005-03-19 18:02:35 +00:00
bobboau e0907340c1 added a geometry batcher and implemented it in sevral places
namely: lasers, thrusters, and particles,
these have been the primary botle necks for some time,
and this seems to have smoothed them out quite a bit.
2005-03-16 01:35:59 +00:00
phreak 1548988f5e properly handle using the old method of selecting primary weapons.
i forgot a return statement so the new method was used instead
2005-03-16 00:37:42 +00:00
wmcoolmon 3c1fc73f57 Commited placeholder turret funcs. 2005-03-16 00:18:31 +00:00
taylor fcc1669388 make sure w,h,bpp are useable before trying to assign values to them 2005-03-15 17:10:58 +00:00
Goober5000 e9a07354b6 *fixed some sexp declaration formatting
*implemented string comparison sexps
*simplified numeric comparison sexps
*fixed numeric comparison (especially equals) sexps to actually work on all their arguments like they were designed to
--Goober5000
2005-03-15 07:26:52 +00:00
phreak fe6f36720a Awesome 2-for-1 deal!!!
Firstly, the Colossus should now warp out correctly.  No more warphole forming inside of it
Secondly, muzzleflashes now are generated at the gunmounts of the firing ship.
2005-03-15 01:40:07 +00:00
Goober5000 28e6ae723e properly fixed the out-of-bounds error, as well as a few other errors of the same kind
--Goober5000
2005-03-14 23:34:59 +00:00
Goober5000 cf34ddd94d rolled back Phreak's commit
--Goober5000
2005-03-14 23:33:22 +00:00
wmcoolmon 13772825dc Hopefully this will fixx0r Num_sounds 2005-03-14 23:31:54 +00:00
wmcoolmon 4840896a10 Whoops, this isn't needed. 2005-03-14 06:38:31 +00:00
wmcoolmon fde469cba1 Commented out now-unneccessary Int3() 2005-03-14 06:38:06 +00:00
wmcoolmon c177d1389c Added memory display thingy to loading screen, if command line is specified and build is a debug build. Also made screenshots go up to 9999 2005-03-14 06:36:30 +00:00
wmcoolmon eaa70ac0b1 Made sounds dynamically allocated 2005-03-14 06:33:38 +00:00
taylor 0033bdc59b fix for mouse cursor problem when running in a window 2005-03-14 03:38:54 +00:00
taylor b7338aa82e speedup grow/shrink time for the warp to avoid the big size skips 2005-03-14 03:24:25 +00:00
phreak 42f0d01eb0 Got rid of the stealth check that only applied to cloaked ships. This should
fix some errorneous behavior that caused the ai to target the player
2005-03-14 02:52:58 +00:00
taylor 350aba83ad enable 32-bit to 16-bit TGA conversion with -tga16 cmdline option (experimental)
fix crash when upgrading from original campaign stats file to current
2005-03-13 23:07:36 +00:00
wmcoolmon a11ba63e5d Squashed compiler warnings 2005-03-13 08:44:10 +00:00
wmcoolmon e0311d0993 Commented out unneeded variables 2005-03-13 08:38:05 +00:00
wmcoolmon 362a30ece3 Might as well sync this 2005-03-13 08:37:01 +00:00
taylor 666cd6349b gotta use MIN/MAX and not min/max now 2005-03-13 08:33:55 +00:00
wmcoolmon 2775baaed0 Hud fixing goodness. I also removed some obsolete code for displaying HUD weapons. 2005-03-13 08:32:28 +00:00
taylor dff6838110 fix various compiler warning messages
make sure screenshot count doesn't get too high
fix movies playing twice in redalert missions
reset time compression for redalert missions and cmdbriefings, just in case
2005-03-13 08:04:43 +00:00
phreak 2f5adb9e46 extra checks in find_parent_rotating_submodel() 2005-03-12 23:53:27 +00:00
phreak a49d6b493e doubled default spawn angle from 180 to 360 since it seems to track better 2005-03-12 21:08:01 +00:00
phreak 108c108f30 the code for the damaged-escort-priority-all sexp started
overwriting outside ofarray bounds.  goodbye call stack... erm goodbye bug.
2005-03-12 20:48:33 +00:00
taylor 05ea8b4fc2 helps to get the stupid check right 2005-03-12 19:28:47 +00:00
taylor 9edcd3fd29 forgot this one, jpeg stuff 2005-03-12 07:42:05 +00:00
phreak 84b5a5f0b2 Fixed a bug where the orb would incorrectly render under alternate FOVs.
Updated the functions that scramble the contacts so the blips show up
somewhat near where they should be.
2005-03-12 06:03:07 +00:00
wmcoolmon 0be56a1aa3 whee! 2005-03-12 05:21:36 +00:00
taylor e66cfb27a9 absolute header location for jpeglib.h in jpgutils.cpp (thanks WMC)
update VC6 project files to correct versions that work properly with internal libjpeg
2005-03-12 04:59:15 +00:00
wmcoolmon 1421a0b59c Fixx0red odd drag problems 2005-03-12 04:44:24 +00:00
wmcoolmon 2be69e963d New commandline option "-noparseerrors" 2005-03-12 03:09:55 +00:00
taylor 0ae94257a7 was causing strange hangs due to really large values, don't know if this will help but SDL should take care of error checking this way 2005-03-11 14:16:02 +00:00
taylor 6f7a4b0f1f forgot to remove this with the MIN/MAX change 2005-03-11 14:14:05 +00:00
taylor 50086ac7a4 apparently this change never got in 2005-03-11 14:11:53 +00:00
taylor 550d17c7ad ignore the typical build specific files 2005-03-11 14:00:01 +00:00
wmcoolmon 066ee3a487 Isn't the extern needed too? causes linking errors on my system w/o it, although it compiles fine. 2005-03-11 01:37:35 +00:00
wmcoolmon e2338e638e Not really. I've got lib files in my main VC.NET libs directory, and include files in grouped subdirectories under my VC.NET include directory. it keeps my HD free of scattered SDK directories and helps keep conflicts down. 2005-03-11 01:34:19 +00:00
wmcoolmon 49223230ef Oops, gotta remember to commit main codebase stuff when fixing FRED 2005-03-11 01:28:23 +00:00
wmcoolmon 34da09b6b1 I like comments 2005-03-11 01:27:17 +00:00
taylor dd846550a5 fix screwed up stars coloring in OGL 2005-03-10 21:16:16 +00:00
taylor 7b36e67f4c maybe WMC can leave the include alone now ;) 2005-03-10 16:16:52 +00:00
taylor 83d4651f9a build file updates to use the internal jpeglib now 2005-03-10 16:15:18 +00:00
taylor 96efe16ac1 internal libjpeg files 2005-03-10 16:13:54 +00:00
taylor 896c01a52a initial libjpeg project file 2005-03-10 16:10:47 +00:00
bobboau ce75d00092 fixed a local/global conflict 2005-03-10 15:35:21 +00:00
taylor 405ba066b9 change min/max to MIN/MAX to fix GCC problems
add lab stuff to Makefile
build unbreakage for everything that's not MSVC++ 6
lots of warning fixes
fix OpenGL rendering problem with ship insignias
no Warnings() in non-debug mode for Linux (like Windows)
some campaign savefile fixage to stop reverting everyones data
2005-03-10 08:00:18 +00:00
wmcoolmon c7c1481bbf Commit for Bobboau. This causes the lab to crash in some circumstances. 2005-03-09 23:45:18 +00:00
bobboau dceb54f914 added a new interface render funtion 2005-03-09 03:23:32 +00:00
Goober5000 a79c665cca whoops 2005-03-08 04:41:39 +00:00
Goober5000 5548a8e954 edited for language ;)
--Goober5000
2005-03-08 03:50:25 +00:00
bobboau 61180ca93d minor change to high level render target code 2005-03-08 02:31:51 +00:00
Goober5000 37b7824118 rolled back my original code on the support ship CTD; thanks taylor :)
--Goober5000
2005-03-07 20:12:36 +00:00
bobboau 37bfe59c6e commit of render target code, d3d should be totaly functional,
OGL still needs implementation.
2005-03-07 13:10:22 +00:00
taylor 98f254d8be can't believe I missed something that obvious. *hides in shame* 2005-03-06 17:16:08 +00:00
taylor 1864025836 don't Assert() when repair_objp is NULL (support ship object is invalid until it's done with warpin) 2005-03-06 16:43:40 +00:00
wmcoolmon 4cbcb63114 Whoops! 2005-03-06 11:32:40 +00:00
wmcoolmon 323bce86d8 RE-fixed stuff. Ogg support. Briefings. 2005-03-06 11:23:45 +00:00
wmcoolmon ef93982342 Switched out model_unload with model_page_out_textures, as it was causing crashes in release mode. 2005-03-06 08:30:22 +00:00
wmcoolmon 2f24f22af2 fix0r for negative values in textboxes, and ubytes 2005-03-05 20:46:12 +00:00
taylor af4326265c make sure we don't scale the restore_screen bitmap, it's already the correct size 2005-03-05 19:11:07 +00:00
taylor fad12aefd0 don't let hud messages walk off screen when res is GR_640 2005-03-05 18:59:28 +00:00
bobboau 0bd7a2c66b made all the gr_d3d_tmapper variants use dynamic a vertex buffer rather
than drawprimitiveup, this also means that these functions can now
handle as much poly data as you might want to through at them
2005-03-04 03:24:44 +00:00
taylor efe1254bb9 animated beam muzzle glows 2005-03-03 16:40:29 +00:00
taylor 385b2073ac lockup fixes, and it's Linux friendly too :) 2005-03-03 16:18:19 +00:00
taylor f08198fbbb support for TMAP_FLAG_TRILIST
extra check to make sure OGL closes down right under Windows
increased depth buffer, it was too small to compare when 32bpp was used
2005-03-03 16:16:55 +00:00
bobboau 6f068d5dc3 fixed a small error from my earlier commit. 2005-03-03 14:29:39 +00:00
Kazan 3ed6c8c1cb !Om_tracker_flag = non-pxo 2005-03-03 12:58:25 +00:00
Goober5000 923d27e0e9 AUGH! Stupid hidden bugs... this one is V's fault
--Goober5000
2005-03-03 08:41:53 +00:00
wmcoolmon e4f3927555 Added new files to the project. Hopefully this works; I have no way to test it. 2005-03-03 08:16:26 +00:00
wmcoolmon 2bcc948054 Oops 2005-03-03 07:32:55 +00:00
wmcoolmon fc3150bb8a Removed my Assert(true)s :p 2005-03-03 07:30:15 +00:00
wmcoolmon 23745c58d7 Made HUD shield icon auto-generation off unless "generate icon" ship flag is specified for the ship. 2005-03-03 07:13:17 +00:00
Goober5000 f32d0a2776 removed the "error" in the new docking code
--Goober5000
2005-03-03 06:41:40 +00:00
wmcoolmon 02e75ddd49 Merge of WMC's codebase. "Features and bugs, making Goober say "Grr!", as release would be stalled now for two months for sure" 2005-03-03 06:05:32 +00:00
taylor 86b32baff4 well that was good and wrong 2005-03-03 05:32:11 +00:00
wmcoolmon 37e8cf21b9 Turret AI code optimizations. If freaky stuff happens, call WMC() 2005-03-03 03:55:03 +00:00
wmcoolmon 927864c581 This should really be like this to prevent crashing 2005-03-03 03:53:18 +00:00
bobboau 413b0c2781 added trilist suport to the poly rendering functions
and a gr_bitmap_list function that uses it
2005-03-03 02:39:14 +00:00
taylor 9ad43ab8f0 use the back buffer for screen saves, this didn't work on Windows at one
point but I'm out of things to try and it may be ok after other fixes
2005-03-03 00:33:41 +00:00
taylor 91e9fb4433 more NO_NETWORK/INF_BUILD goodness for Windows, takes care of a few warnings too 2005-03-02 21:24:48 +00:00
taylor 3f9ffbc393 better support for Inferno builds (in PreProcDefines.h now, no networking support)
make sure NO_NETWORK builds are as friendly on Windows as it is on Linux/OSX
revert a timeout in Client.h back to the original value before Linux merge
2005-03-02 21:18:20 +00:00
taylor 60d25cb9fa that one should never have slipped passed me (Linux specific) 2005-03-02 03:13:00 +00:00
taylor 295426a6eb make sure starfield bitmaps render when not in HTL mode
slight header fix for osapi.h
add some string overflow protection to modelread and bmpman
s/NO_NETWORKING/NO_NETWORK/g  (Inferno builds)
2005-03-01 23:08:24 +00:00
taylor df19f785c1 unbreak Linux build (not valid C/C++ anyway, block scope) 2005-03-01 23:05:38 +00:00
bobboau 9c9876909b oh, hey look I've commited something :D
animation system, weapon models detail box alt-tab bug, probly other stuff
2005-03-01 06:55:45 +00:00
taylor 44ed68339e uugh, missed the initial tree move (WMC: probable locking problem) 2005-02-28 01:24:02 +00:00
wmcoolmon 1fb475ba86 Removed unneccessary variable 2005-02-28 00:29:52 +00:00
wmcoolmon b94b107822 Added a white component to lightning so it isn't just a big blue block 2005-02-27 23:42:07 +00:00
wmcoolmon 3b2a13ae6a Some HUD work 2005-02-27 23:27:50 +00:00
Goober5000 076bdda114 First stage of "apply to all ships in this wing" weapon loadout button code.
Button hooks only, pending interface art.  The "apply-to-all" code itself
still has to be written.
--Goober5000
2005-02-27 14:09:27 +00:00
wmcoolmon 6f73240dcc Nonstandard res stuff 2005-02-27 10:38:06 +00:00
wmcoolmon 23ef0449ab More nonstandard res stuff 2005-02-27 07:08:22 +00:00
wmcoolmon 1e959494d2 nonstandard res HUD stuff 2005-02-27 07:07:47 +00:00
taylor 310a084b1f few more compiler warning fixes (didn't mean to commit iostream.h change)
lower warning level to 3 to stop MSVC6 from complaining about C++ headers
2005-02-23 13:17:05 +00:00
taylor 4304153d4b more consolidation of various graphics variables
some header cleaning
only one tmapper_internal for OGL, don't use more than two tex/pass now
seperate out 2d matrix mode to allow -2d_poof in OGL and maybe fix missing
   interface when set 3d matrix stuff doesn't have corresponding end
add dump_frame stuff for OGL, mostly useless but allows trailer recording
2005-02-23 05:11:13 +00:00
taylor ce810f8195 compiler warning fixes (for MSVC++ 6)
have the warp effect only load as many LODs as will get used
head off strange bug in release when corrupt soundtrack number gets used
   (will still Assert in debug)
don't ever try and save a campaign savefile in multi or standalone modes
first try at 32bit->16bit color conversion for TGA code (for TGA only ship textures)
2005-02-23 05:05:39 +00:00
taylor c70142a0c8 even more bm_unload() -> bm_release() changes 2005-02-23 04:57:29 +00:00
taylor b1c274ee89 more bm_unload() -> bm_release() changes 2005-02-23 04:55:09 +00:00
taylor b370e5b903 some bm_unload() -> bm_release() changes to save bmpman slots 2005-02-23 04:51:56 +00:00
wmcoolmon eb239416c0 Multi-res support 2005-02-21 09:00:58 +00:00
Goober5000 cc3b463dcd restored release version of some cheat codes; removed a cheat for cloaking
--Goober5000
2005-02-21 05:40:16 +00:00
wmcoolmon b25707b74d Camera code updates (subtitles) 2005-02-20 23:14:00 +00:00
wmcoolmon 2564913620 Trails stuff, moved ship docking func declaration so FRED could get to it. 2005-02-20 23:13:01 +00:00
wmcoolmon 22e44c3eac Fix0r3d trails 2005-02-20 23:11:51 +00:00
wmcoolmon 9fc52304e6 More trails updating goodness 2005-02-20 08:24:19 +00:00
wmcoolmon e1554e26f4 Smartified shipcontrails 2005-02-20 08:22:48 +00:00
wmcoolmon 65a6fcbf37 Trails update: Better, faster, stronger, but not much more reliable 2005-02-20 07:39:34 +00:00
Goober5000 163e2b2d83 restored original behavior for cheat code time dilation
--Goober5000
2005-02-20 05:22:44 +00:00
wmcoolmon 12c2e477a4 Removed trails limit 2005-02-19 07:57:03 +00:00
wmcoolmon 846152daab linklist isn't needed for this 2005-02-19 07:52:56 +00:00
wmcoolmon 8789a43e70 OpenGL gradient fix for nonstandard resolutions 2005-02-19 07:50:15 +00:00
wmcoolmon 8f8fdb7779 Fixes for debriefing window in nonstandard res 2005-02-18 21:14:03 +00:00
wmcoolmon aadb753a5f Fixed line misalignment at nonstandard res in the campaign room 2005-02-18 20:50:40 +00:00
wmcoolmon 39c431b00b More nonstandard res fixing 2005-02-18 09:58:40 +00:00
wmcoolmon a89a04d6c6 Since the screen can be wider than 1200 px now, don't auto-cull brackets if they're that big. 2005-02-18 09:54:41 +00:00
wmcoolmon c02651da4b Updates for better nonstandard res support, as well as a fix to the Perseus crash bug I've been experiencing. Bobb, you might want to take a look at my change to grd3d.cpp 2005-02-18 09:51:07 +00:00
Goober5000 06c07b33a3 really fixed the build warning
--Goober5000
2005-02-18 09:03:34 +00:00
wmcoolmon 7655803770 If a vertex buffer fails to be made, don't crash. 2005-02-18 08:05:16 +00:00
wmcoolmon 2067fa9571 Attempt to get rid of compiler warnings 2005-02-18 05:24:26 +00:00
wmcoolmon cd3689feb3 Added $Tech Model (after +Tech Description) 2005-02-18 04:54:44 +00:00
wmcoolmon 8d72b69b60 "-ingame" command line option 2005-02-16 10:00:40 +00:00
taylor 1094be5d9e fix cleanup to avoid breaking the slider when it's still needed 2005-02-15 02:15:04 +00:00
taylor 2223aed74b clean up some model related globals
code to disable individual thruster glows
fix issue where 1 extra OGL light pass didn't render
2005-02-15 00:06:27 +00:00
taylor 639ee761ac don't try and draw starfield bitmaps if they aren't valid
make AB thruster stuff in ship_create() a little less weird
replace an Int3() with debug warning and fix crash in docking code
make D3D Textures[] allocate on use like OGL does, can only use one anyway
2005-02-15 00:03:36 +00:00
taylor 2a8dd7547b make hudparse GCC 3.4 friendly (WMCoolmon way want to check this with tbl)
fix OSX compile problem
debug message in weapons_page_in() should have been real debug message
2005-02-14 23:59:23 +00:00
taylor b604045666 fix mouse click issues in weapon/ship select screen
skip real VCR controls for Closeup check rather than using hardcoded values
2005-02-14 23:56:51 +00:00
taylor c11ae3ff36 make loading screen shader a bit taller
add i.o to credits for Linux and OSX code
add libjpeg and ogg stuff to credits for license compliance
replace an Int3() with a debug message in the hud code
2005-02-14 23:54:11 +00:00
wmcoolmon c9f7473e9a More explicit calculation handling 2005-02-13 08:42:41 +00:00
wmcoolmon eb0593ba11 3D models in weapons selection screen and nonstandard resolution fixes for ship selection screen. 2005-02-13 08:41:25 +00:00
wmcoolmon 403446d77e nonstandard resolution-friendly function updates 2005-02-13 08:38:54 +00:00
wmcoolmon 0ee363c1c6 Made messages display properly in nonstandard resolutions 2005-02-13 08:37:57 +00:00
wmcoolmon b742875688 Lockon should now work properly in nonstandard resolutions 2005-02-13 08:36:51 +00:00
wmcoolmon b07c2a0b66 while loops are dangerous things... 2005-02-12 22:49:24 +00:00
taylor 280066b619 fix Error() check so that it doesn't hit on MAX_BUFFERS_PER_SUBMODEL-1 2005-02-12 12:17:54 +00:00
taylor 75daed2b9b fix possible crash in bm_get_section_size()
get jpeg_read_header() working properly
VBO fixes and minor optimizations
2005-02-12 10:44:11 +00:00
taylor bec567bbab fix an issue with bm_set_components()
abs is for ints fabsf is for floats (camera.cpp)
make the in-cockpit stuff OGL friendly
2005-02-10 14:38:50 +00:00
wmcoolmon ac993ba2e6 Got rid of a couple annoying compiler warnings 2005-02-10 04:05:42 +00:00
wmcoolmon 0aac23683b Addition of the -clipdist argument. 2005-02-10 04:02:37 +00:00
wmcoolmon 175f3118a9 Low-level code for better hi-res support; better error reporting for vertex errors on model load. 2005-02-10 04:01:43 +00:00
taylor 3cdae29516 update/add .cvsignore files for project file changes
silence warning about depreciated strings.h stuff for MSVC 2005
final model_unload() stuff for WMCoolmon, put in missionweaponchoice.cpp
remove really old project files
2005-02-08 23:49:59 +00:00
taylor bc59138af7 moved to projects 2005-02-08 05:19:34 +00:00
taylor a70fea9d6d moved to projects directory 2005-02-08 05:18:02 +00:00
taylor fdcc240eec add something to the README about projects 2005-02-08 05:14:17 +00:00
taylor fbe5cf32fd new projects directory and files 2005-02-08 05:11:19 +00:00
taylor ce6f466d89 should fix linker error in libjpeg 2005-02-07 08:33:14 +00:00
wmcoolmon de684f1e78 Updated camera code 2005-02-06 22:21:25 +00:00
taylor 7b619f40cf more post merge happiness 2005-02-05 04:15:36 +00:00
taylor 4905537d21 add libjpeg and ogg stuff 2005-02-05 00:52:51 +00:00
taylor 6044aef62c fix a few things post merge 2005-02-05 00:30:49 +00:00
taylor b155e6ebd3 merge with Linux/OSX tree - p0204-3 2005-02-04 23:29:32 +00:00
taylor 09167fa382 merge with Linux/OSX tree - p0204-2 2005-02-04 20:06:10 +00:00
taylor a2232be0c7 merge with Linux/OSX tree - p0204 2005-02-04 10:12:33 +00:00
phreak c840b77b0c revert to default d-missile behavior if the electroinics parameters aren't specified.
added an option to customize the old-style disruption calculation as well.
2005-02-03 01:26:45 +00:00
taylor f2059b4e8a only model_load() if we using a ship other than the current one 2005-02-02 15:09:06 +00:00
taylor bf40c2ebff merge with Linux/OSX tree - p0202 2005-02-02 10:36:23 +00:00
taylor 8ac3251761 OGG fix for streams 2005-02-01 06:54:20 +00:00
taylor 0bf7ee01dc merge with Linux/OSX tree - p0131-2 2005-01-31 23:27:55 +00:00
taylor 694fbd606a merge with Linux/OSX tree - p0131 2005-01-31 10:34:40 +00:00
taylor 0e646c0a45 merge with Linux/OSX tree - p0130
remove extra brace in cfile.cpp
2005-01-30 18:32:42 +00:00
taylor 429a65a246 it's -nosound not -noaudio 2005-01-30 14:09:29 +00:00
taylor 2a7b06112d merge with Linux/OSX tree - p0130 2005-01-30 12:50:08 +00:00
Goober5000 ebf7f23559 bah - rolled back the HTL fix that doesn't really work
--Goober5000
2005-01-30 10:49:26 +00:00
Goober5000 7f98f2ce19 optional flags default to false I should think
--Goober5000
2005-01-30 09:36:19 +00:00
Goober5000 be761d4fc1 nitpicked some boolean tests, and fixed two small bugs
--Goober5000
2005-01-30 09:27:41 +00:00
wmcoolmon e180d98164 Make sure hudnavigation uses the correct draw_brackets_Square 2005-01-30 03:28:17 +00:00
wmcoolmon 3bfc7b0911 This isn't needed anymore 2005-01-30 03:27:09 +00:00
wmcoolmon 703791a2f7 HUD updates 2005-01-30 03:26:11 +00:00
wmcoolmon 21bf99b795 Don't try and create a vertex buffer with no vertices (Seems to cause CTD) and fix to brackets in nonstandard res 2005-01-30 03:24:39 +00:00
wmcoolmon 309b9ef3a7 Improved user-friendliness - give an Error instead of a CTD 2005-01-30 03:23:22 +00:00
wmcoolmon 72a92cc902 If a required string doesn't exist, give an error instead of a warning...doi. 2005-01-30 01:38:26 +00:00
wmcoolmon 7d8ea51898 Made a bunch of ship.tbl variables optional 2005-01-30 01:34:39 +00:00
phreak ed29327ca2 smart shield stuff. enabled by command line for now, but this will be changed in the future, i just want people to test it.
-phreak
2005-01-29 16:31:55 +00:00
phreak 9cb422623a smart shield command line stuff. this will be changed in the future, but i want people to test it.
-phreak
2005-01-29 16:30:47 +00:00
phreak 180d4f7168 fixed error message again :)
-p
2005-01-29 15:40:22 +00:00
argv f52ec71693 Fixed compile errors due to several source files not having been updated to
reference "Min/Max_draw_distance" instead of "MIN/MAX_DRAW_DISTANCE".

-- _argv[-1]
2005-01-29 09:19:45 +00:00
wmcoolmon 386e412e19 Clipping stuff 2005-01-29 08:12:20 +00:00
wmcoolmon a870961d4a When drawing the viewer_obj, temporarily clip less close up for in-cockpit models. 2005-01-29 08:11:41 +00:00
wmcoolmon f7bfc7d969 Various updates; shader, clipping 2005-01-29 08:09:47 +00:00
wmcoolmon 72fc9011b5 Various updates; shader, assert, and clipping 2005-01-29 08:08:24 +00:00
wmcoolmon 6a3803653f Update to work with optimized shader func 2005-01-29 08:06:54 +00:00
wmcoolmon 036677d336 Ahh, the sweet smell of optimized code 2005-01-29 08:04:15 +00:00
Goober5000 599da97f1b docking fixes for FRED
--Goober5000
2005-01-29 05:34:30 +00:00
Goober5000 6ac87d4c9b updated Freespace2 project
--Goober5000
2005-01-29 00:58:01 +00:00
Goober5000 0e53df600f added bitarray.h to the code project
--Goober5000
2005-01-29 00:37:10 +00:00
wmcoolmon d0de69e805 Added better too-many-textures error message 2005-01-28 23:45:23 +00:00
taylor acc629e8ba less hacky and faster version... *hopes no one noticed the stupid mistake* 2005-01-28 13:26:14 +00:00
Goober5000 ff9b79a6e1 fixed Bobboau's spelling of 'relative'
--Goober5000
2005-01-28 11:57:36 +00:00
Goober5000 a746194c10 cleaned up some build warnings
--Goober5000
2005-01-28 11:39:18 +00:00
Goober5000 cc85c92369 changed a bunch of transpose-rotate sequences to use unrotate instead
--Goober5000
2005-01-28 11:06:23 +00:00
taylor 7fada66447 little cleanup to get rid of compiler warnings
add some memory management to help keep size of techroom down
new hotkey Ctrl-Shift-S to show all ships rather than just viewable
make Weapon_list allocate on load just like Ship_list
unload all textures and models on techroom_close()
2005-01-28 10:00:59 +00:00
taylor 0268e7ef01 add model_page_out_textures() for use in techroom
make model_page_in_textures() load more textures
2005-01-28 09:56:44 +00:00
Goober5000 56ae570469 finished implementing docking to a rotating submodel
--Goober5000
2005-01-28 09:01:04 +00:00
phreak 40b25f8860 shockwave weapons now work properly with the electronics (d-missible) tag
added in a "randomness factor" for electronics parameters.  This adds or subtracts
a random value between 0 and this factor to the disruption time.  This was hard coded
to be 4 seconds in retail.
2005-01-28 04:05:05 +00:00
wmcoolmon 1554585645 Better debrief memory handling 2005-01-28 03:00:56 +00:00
wmcoolmon 49c4aba4b9 Fixed crash bug in techroom 2005-01-28 02:57:59 +00:00
Goober5000 86ad5d5d40 dock points on rotating submodels is *almost* working
--Goober5000
2005-01-27 11:26:23 +00:00
Goober5000 35323dd78c added a useful bit of information to vm_vec_rotate and vm_vec_unrotate
--Goober5000
2005-01-27 05:26:07 +00:00
wmcoolmon 4702574a59 Ship autorepair, requested by TBP 2005-01-27 04:23:18 +00:00
wmcoolmon defdb93536 Camera code 2005-01-27 04:16:28 +00:00
Goober5000 ae228fcbc9 important bugfix
--Goober5000
2005-01-26 21:42:19 +00:00
phreak 7063549e4b added ogg and objectdock files to project 2005-01-26 14:57:19 +00:00
Goober5000 cdc08e7e78 hm... added a necessary bugfix for something very badly designed
--Goober5000
2005-01-26 06:58:37 +00:00
Goober5000 505e64424f whoops... need to free variable blocks for special hitpoints
--Goober5000
2005-01-26 06:49:50 +00:00
Goober5000 db7ad1acbc AHA... squashed another bug
--Goober5000
2005-01-26 05:44:10 +00:00
Goober5000 7cf1815d54 fixed a nitpicky thing
--Goober5000
2005-01-26 05:42:37 +00:00
argv 97acff37bc Removed the implicit surface shield on mesh-shielded ships.
-- _argv[-1]
2005-01-26 03:40:43 +00:00
Goober5000 a7540ac62d Bah - I am a moron. :) I see the reason why rand shouldn't work
multiple times.  It's been fixed thus.

I also added a rand-multiple sexp for any times when people do
want multiple random numbers.

--Goober5000
2005-01-26 01:52:21 +00:00
Goober5000 2a41ef68ce dockpoints now rotate with rotating subobjects
--Goober5000
2005-01-26 01:26:09 +00:00
Goober5000 adc3a72d47 species will now load from a default table instead of being initialized via code
--Goober5000
2005-01-25 23:32:46 +00:00
Goober5000 2c32bd840d more cool parsing stuff
--Goober5000
2005-01-25 22:47:37 +00:00
Goober5000 554b3a6660 separated one parsing function into two
--Goober5000
2005-01-25 22:21:45 +00:00
Goober5000 e38ab2fe4d streamlined some redundant stuff
--Goober5000
2005-01-25 21:28:58 +00:00
wmcoolmon d4826f46c6 Instead of trying to allocate a ridiculously large buffer if the file is defined but doesn't exist, give a warning. Someone with nebula-code experience should probably double-check this; also added jpg and TGA support. 2005-01-22 22:53:07 +00:00
wmcoolmon 9ffe178006 Nitpick - can be NULL by default 2005-01-22 22:02:28 +00:00
wmcoolmon 3b513034d2 Fix0red the ext error. Always make sure you have room for the string terminator. :) 2005-01-22 20:29:05 +00:00
taylor 8075cf5af7 crap 2005-01-21 21:12:52 +00:00
taylor 8074a3321b cleanup debug messages for texture loading making the output more readable and useful 2005-01-21 08:58:32 +00:00
taylor 5bc5158c4b make Subsys_status dynamic but allocate in blocks for speed and to help prevent memory fragmentation 2005-01-21 08:56:50 +00:00
taylor 6dba3cc43b slightly better memory management 2005-01-21 08:54:53 +00:00
taylor dc22fb9eba add -rlm cmdline option to switch to local viewpoint lighting calculations (OGL only for now) 2005-01-21 08:29:04 +00:00
taylor 9cd822ec0d fill in gr_opengl_set_texture_addressing()
add support for non-power-of-two textures for cards that have it
temporary crash fix from multiple mipmap levels in uncompressed formats
2005-01-21 08:25:15 +00:00
taylor 4b8212e0f0 make sure we can still use TGAs (16-bit) when Cmdline_jpgtga is not set, PCX still takes precedence per retail 2005-01-21 08:20:44 +00:00
Goober5000 83a8cf1681 fixed a crazy error
--Goober5000
2005-01-18 06:15:33 +00:00
Goober5000 c4ed88f317 fixed a silly error
--Goober5000
2005-01-18 06:14:29 +00:00
Goober5000 8d34467ead variables can be specified in training messages too now
--Goober5000
2005-01-18 01:20:03 +00:00
wmcoolmon e3b6c53f4a OGG fixes, ship selection fixes 2005-01-18 01:14:17 +00:00
Goober5000 c616c51e41 clarified a bunch of sexp stuff and fixed a bug
--Goober5000
2005-01-18 00:14:37 +00:00
argv 64590007e7 Surface shields.
See forum thread:
http://dynamic4.gamespy.com/~freespace/forums/showthread.php?s=&threadid=29643

-- _argv[-1]
2005-01-17 23:35:45 +00:00
Goober5000 92f8e99209 variables can now be displayed in messages
--Goober5000
2005-01-17 22:46:32 +00:00
wmcoolmon d1a7051b62 Attempt to fix the crash when a player ship's subsystems receives damage, and it has a lot (ie player ship is a capital ship).This seems to be controlled by SUBSYSTEM_MAX, which also controls the number of subsystems saved in red alert missions. 2005-01-17 06:35:35 +00:00
wmcoolmon 87775f955d Added "show ship" ship flag 2005-01-16 23:18:04 +00:00
wmcoolmon 8e8a748da5 Added VM_TOPDOWN view; Added 2D mission mode, add 16384 to mission +Flags to use. 2005-01-16 22:39:10 +00:00
wmcoolmon e99f222fd2 Current version of the new techroom code -C 2005-01-15 05:53:18 +00:00
argv 1213166f64 Revision 2.42 (Goober's fixes) broke "no pierce shields". Fixed.
-- _argv[-1]
2005-01-14 23:08:17 +00:00
wmcoolmon e587c5c372 gr_curve 2005-01-14 05:28:58 +00:00
taylor 180b2750fa plug leak from VBO crash fix 2005-01-13 04:55:57 +00:00
Goober5000 bce37fb042 hmm, rolled back one of my clarifications since it caused things to get messed up
--Goober5000
2005-01-13 03:33:07 +00:00
phreak 7ab6b70960 difficulty table changes. this lets modders specify how the difficulty level affect
how the AI behaves and controls advantages given to the player based on the
skill level.

--phreak
2005-01-13 02:25:52 +00:00
Goober5000 f431bc6313 forgot to remove a comment
--Goober5000
2005-01-13 01:10:33 +00:00
Goober5000 ca13ce4ee5 fixed another nasty bug
--Goober5000
2005-01-12 23:38:42 +00:00
Goober5000 0e69e9faf6 fixed a nasty bug where dock pointers would run off a cliff and crash
--Goober5000
2005-01-12 04:45:33 +00:00
Goober5000 2b19b94b77 two minor but important bugfixes to the multiple ship docking
--Goober5000
2005-01-12 00:52:42 +00:00
phreak a576a0bf8f new hud is deault off now. this should fix the disappearing gauges problem. 2005-01-12 00:20:27 +00:00
phreak 961bc28b85 nude hud? was this some kind of freudian slip of a sort or what? 2005-01-12 00:18:00 +00:00
phreak 51e955dfba fixed hud offsets bug 2005-01-12 00:17:09 +00:00
Goober5000 099d2700d0 multiple ship docking :)
don't tell anyone yet... check the SCP internal
--Goober500
2005-01-11 21:38:51 +00:00
Goober5000 d6b1e0c922 made a capitalization thing consistent
--Goober500
2005-01-11 21:28:24 +00:00
Goober5000 263f2b7c61 fixed two small things with physics
--Goober500
2005-01-11 21:25:58 +00:00
taylor 8363163b86 fully working (??) -loadonlyused, allocate used_weapons[] and ship_class_used[] only when needed 2005-01-11 04:05:23 +00:00
wmcoolmon 64114c55ec Bug-guard 2005-01-10 06:58:12 +00:00
wmcoolmon fe071e59d5 Debriefing screen updated to only use memory while open 2005-01-10 04:45:09 +00:00
wmcoolmon 0d0174e2ef Small fix, so we don't try to delete the same thing twice 2005-01-10 04:44:03 +00:00
wmcoolmon 7faf664c05 Techroom and Barracks now allocate memory only when open, and only for the number of ships currently loaded 2005-01-09 22:27:38 +00:00
wmcoolmon 5c6594234e Fix for music directory parent 2005-01-09 21:40:07 +00:00
wmcoolmon 42c5d6978d Sound quality in Freespace 2 is now controlled by SoundSampleBits, and SoundSampleRate. Also, some sounds will use hardware rather than software buffers if available. 2005-01-08 10:00:59 +00:00
wmcoolmon fd6d9228d6 Function pointers to inline functions is a no-no... 2005-01-08 09:57:27 +00:00
phreak 1a2e80eeda fixed the bug where the player couldn't use the target hud in reticle key. 2005-01-07 23:15:44 +00:00
argv e3465ddc03 Added missing #include.
-- _argv[-1]
2005-01-07 14:00:04 +00:00
Goober5000 62894590f3 gah
--Goober5000
2005-01-06 00:39:34 +00:00
Goober5000 6aa309268b changed argument from dist to dist_squared
--Goober5000
2005-01-06 00:37:32 +00:00
Goober5000 1b00feef46 added vm_vec_dist_squared_to_line
--Goober5000
2005-01-06 00:27:34 +00:00
Goober5000 603b466d84 small speedup in shpere_tri_edge (spelling should be fixed...); now distance is only calculated once
--Goober5000
2005-01-06 00:22:01 +00:00
taylor 5b7b87648f make sure we're not loading weapons that are left over from larger missions 2005-01-05 23:17:38 +00:00
taylor 625dfac695 more -loadonlyused fixes 2005-01-03 18:47:06 +00:00
taylor 29c631c38d stupid mistake 2005-01-03 18:46:03 +00:00
taylor 4d16203170 dynamic allocation of num supported OpenGL lights
add config option for more realistic light settings
don't render spec maps in nebula to address lighting issue
2005-01-03 18:45:22 +00:00
phreak 90f06ca5ee made custom loading screens work if only one resolution has been specified. 2005-01-03 01:05:08 +00:00
Goober5000 e5c01cb034 got rid of a nasty nasty bug in the beam collision function, and cleaned up some of Bobboau's old comments
--Goober5000
2005-01-02 23:22:22 +00:00
taylor a28df9d69a make use of MR_NO_FOGGING to render models without fog 2005-01-01 19:47:26 +00:00
taylor e7119711d5 add MR_NO_FOGGING flag to easily render models without fog (warp model, targetbox models) 2005-01-01 19:45:32 +00:00
wmcoolmon 302628fcf1 Erg, always make sure CVS is completely up-to-date. 2005-01-01 19:37:05 +00:00
argv 520084a643 Since Taylor's asteroid targeting code does not use the
TURRETS_SHOOT_ASTEROIDS #define, remove it from preprocdefines.h. We can
put it back from an old rev if people decide to use my code instead of his,
which seems unlikely.

-- _argv[-1]
2005-01-01 13:14:19 +00:00
taylor b349a99c92 good OpenGL spec mapping
fix VBO crash with multitexture using same uv coord data
little speedup of opengl_tcache_frame()
error message to make sure hardware supports the minimum texture size
move OpenGL version check out of the extention printout code
disable 2d_poof with OpenGL
2005-01-01 11:24:23 +00:00
taylor d80dd2c00f asteroid targetting code for capships, enabled by default, matches FS1 behavior 2005-01-01 10:38:23 +00:00
wmcoolmon b3ceda2d70 NEW_HUD stuff, turned off this time. :) It's in a state of disrepair at the moment, doesn't show anything. 2005-01-01 07:18:48 +00:00
Goober5000 bf6cf09a4d CVS checkin of bitarray.h; use this for large arrays of boolean values
--Goober5000
2004-12-31 03:48:12 +00:00
argv da012c2f56 I've just been informed that turrets do not shoot asteroids in the retail
game, and that this implementation causes them to shoot at the parent ship,
too. I'll deal with this later; in the mean time, use
"#define TURRETS_SHOOT_ASTEROIDS" to cause turrets to shoot asteroids.

-- _argv[-1]
2004-12-31 03:13:08 +00:00
Goober5000 e1686efae8 stupid parenthesis fix
--Goober5000
2004-12-30 21:41:24 +00:00
taylor 6f643adee8 don't use cfopen() for upgrade check, it was giving strange results 2004-12-30 16:25:22 +00:00
taylor 0142ec0cbb make sure swprintf() doesn't think szFile is already a wide-character string 2004-12-30 16:23:39 +00:00
argv 111d967c7b * For some reason, turret AI wasn't shooting at asteroids. It never has,
but it did in the retail game, and it should. The code to target asteroids
  was apparently missing, so I reimplemented it, and turrets shoot at
  asteroids again.
2004-12-30 08:07:52 +00:00
argv cdf10ac9ba Quick hack to remove the 50% rate-of-fire penalty when primary weapons are
linked. "#define NO_LINKED_PRIMARY_PENALTY" to enable this change; it's
disabled by default.

-- _argv[-1]
2004-12-30 07:26:21 +00:00
taylor 490a528103 make sure the file gets closed in pilot_file_upgrade_check() 2004-12-28 16:20:33 +00:00
taylor 434bda5ba6 fix some hud stuff getting drawn multiple times, don't show target data if HUD_disabled_except_messages is set 2004-12-26 22:45:58 +00:00
Goober5000 75f4c2a5da hud-disable-except-messages now resets after each mission
--Goober5000
2004-12-26 20:46:34 +00:00
wmcoolmon 2cf0159c55 Fixed text not displaying for single-weapon sips. 2004-12-25 19:17:23 +00:00
wmcoolmon fee35f7ea1 Quick update to tempfix possible bug. 2004-12-25 17:45:38 +00:00
wmcoolmon e22781b812 Fixed a couple of blonde moments. 2004-12-25 17:02:18 +00:00
wmcoolmon 58b5bc92af Fix to modular tables workaround with Fs2NetD 2004-12-25 16:42:59 +00:00
wmcoolmon a756e220ad Sync to current NEW_HUD code 2004-12-25 09:28:41 +00:00
wmcoolmon a6a8d4ddbe Fix to modular tables workaround with Fs2NetD + Sync to current NEW_HUD code 2004-12-25 09:27:41 +00:00
wmcoolmon 76b9870a68 Fix to modular tables workaround with Fs2NetD 2004-12-25 09:25:41 +00:00
wmcoolmon 89e3aae940 Ogg support for WIN32 2004-12-25 00:23:46 +00:00
wmcoolmon 02a8eefd80 Added .ogg in proper directories 2004-12-25 00:22:54 +00:00
Goober5000 32772a761f resorted command-line options and added an option for WMC's ballistic gauge
--Goober5000
2004-12-24 19:36:12 +00:00
wmcoolmon 3bfe49a936 NEW_HUD compiles now. :) 2004-12-24 05:07:05 +00:00
wmcoolmon 20dcfb2ccf Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-24 01:07:19 +00:00
wmcoolmon 53e7dfe11f Ballistic primary ammo-gauge to the right of the HUD, support for weapon images in list. 2004-12-24 00:41:23 +00:00
wmcoolmon 5bcfd8bb0d Removed unneccessary function call (.0000001 ms speed increase!) 2004-12-23 23:36:30 +00:00
wmcoolmon 45b2843965 Added +Hud Image: for weapons, which replaces the weapon name in the list with an image. 2004-12-23 23:35:02 +00:00
wmcoolmon a28eaa0f30 Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-23 23:30:45 +00:00
wmcoolmon a818321eda Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-23 23:08:21 +00:00
phreak 20af7801cc commits for scramble-messages and unscramble-messages
-phreak
2004-12-23 15:58:55 +00:00
phreak b494401b36 added a pragma message if DevIL isn't compiled into the build 2004-12-22 23:05:48 +00:00
taylor 984b747cb9 add a popup to make sure people know about pilot upgrade 2004-12-22 21:49:05 +00:00
taylor a0550b9464 safety check against very large missions 2004-12-22 21:48:21 +00:00
taylor c2dee0d4c7 version bump to 3.6.5 2004-12-22 21:47:37 +00:00
wmcoolmon 84242e23bc Quick fix to hudparse.cpp; If this causes any problems, roll it back and I'll take another look at it. 2004-12-22 09:09:38 +00:00
fryday ce5277368e Fixed a tiny error in bob's code in d3d_init_environment (which seems to be called even
if there's no -env command-line) which created the cube-map and didn't check
if the creation of it failed. Added the same sanity check to d3d_render_to_env
2004-12-20 20:28:15 +00:00
fryday dc2c5537b2 Commented out ATL dependencies (And changed one macro to an swprintf instead)
Tiny change in animplay ( pow(2.0, ...) instead of pow(2, ...)) because VS2K5
throws an ambiguity error over that.
2004-12-20 20:18:30 +00:00
taylor 8f3dd91ea1 fix crash from dynamically allocated Personas 2004-12-17 06:43:01 +00:00
Goober5000 1e09b03f15 move wing name initialization to ship_level_init
--Goober5000
2004-12-15 17:32:19 +00:00
Goober5000 b1de454786 commented dumbfire lead indicator back in, because you need to know where your missiles are going
--Goober5000
2004-12-15 15:22:23 +00:00
Goober5000 814a0ced5e added Verify, an error checking macro that works in both release and debug modes
--Goober5000
2004-12-15 15:14:03 +00:00
Goober5000 7ba333529a new version of stristr that doesn't need to allocate memory
--Goober5000
2004-12-14 17:23:52 +00:00
Goober5000 0c48b587a1 allow different wing names than ABGDEZ
--Goober5000
2004-12-14 14:46:13 +00:00
wmcoolmon 0b1c9d34c5 Apparently I never commited -mpnoreturn... 2004-12-11 09:37:50 +00:00
wmcoolmon b811ba76b1 Changed music modular table ending to *-mus.tbm, in case a miscellaneous modular table is needed. 2004-12-11 09:03:08 +00:00
taylor bfb64d9f8a dymanic allocation of Personas 2004-12-10 17:21:00 +00:00
taylor 4ee06b9d79 fix old V bug when cancelling the pilot select screen 2004-12-05 23:47:18 +00:00
bobboau 631ad4151f sevral feature additions that WCS wanted,
and the foundations of a submodel animation system,
the calls to the animation triggering code (exept the procesing code,
wich shouldn't do anything without the triggering code)
have been commented out.
2004-12-05 22:01:12 +00:00
taylor 1655099a83 support uncompressed DDS images
use TexSubImage2D for video anis
2004-12-05 01:28:39 +00:00
taylor 3e94368b92 text of -no_set_gamma cmdline option shouldn't specify D3D since it works in OGL too 2004-12-02 11:20:33 +00:00
taylor 0d1d27627f make OGL use same gamma reg setting as D3D since it's the same ramp
have OGL respect the -no_set_gamma cmdline option
reset gamma to default on OGL exit to make sure the desktop doesn't stay wrong
2004-12-02 11:18:15 +00:00
taylor 3d4b214a19 not used at the moment but that code was stupid 2004-12-02 11:14:29 +00:00
taylor a68b24ceed little reorg to flags so Experimental won't show up twice
add/update the wiki links since none of them worked before
remove all options that require an argument since they won't work
2004-11-29 18:04:53 +00:00
taylor 08e5fca6e6 make sure we are checking the right bitmap_id 2004-11-29 18:02:01 +00:00
taylor 62e24f22b5 more EFF fixes - can't believe I forgot all this crap 2004-11-27 22:08:21 +00:00
taylor b503f12a85 Linux tree merge 2004-11-27 10:51:01 +00:00
taylor 00105ca9be correct positions for default graphics with no table
compiler warning fix
2004-11-27 10:50:32 +00:00
taylor 1ebc32bcef make sure the old behavior still applies to everything that's not a beam 2004-11-27 10:49:14 +00:00
taylor 7ff8c0bd04 some fixes for position problems on the HUD in non-standard resolutions
few compiler warning fixes
2004-11-27 10:48:03 +00:00
taylor db3759d775 this should get movies working again in D3D and help OGL too 2004-11-27 10:42:18 +00:00
taylor efbccb39e4 couple of LAN game vs. FS2NetD fixes 2004-11-26 08:41:11 +00:00
taylor 7d050d1ac7 fix briefing related crash(es) (forgot I had this) 2004-11-24 20:12:25 +00:00
taylor caad3968ec fix 2d warp in D3D, add cmdline option for 3d warp 2004-11-23 19:29:13 +00:00
taylor 412de9480f try and protect the bitmap_entry stuff a bit better
fix the transparent support ship, again, but correctly this time
2004-11-23 00:10:06 +00:00
taylor 05663b5f58 make sure species_defs.tbl can be found outside of root[0] and in VPs 2004-11-22 06:17:57 +00:00
Kazan 33605e78e0 dumbbugfix 2004-11-21 16:07:22 +00:00
Kazan 8904213db2 conflict res 2004-11-21 15:59:45 +00:00
taylor bf0b047002 support for animated beam sections
various weapon-only-used fixes
remove the -1 frame fix since it was fixed elsewhere
2004-11-21 11:38:17 +00:00
taylor 467b2424df some weapon-only-used loading fixes and general page-in cleanup
page in all ship textures from one function rather than two
2004-11-21 11:35:17 +00:00
taylor 9d28382c2b page in all frames at once rather than separately (old code that wasn't updated) 2004-11-21 11:33:23 +00:00
taylor 1470fe2279 newline fix (got tired of seeing this) 2004-11-21 11:31:46 +00:00
taylor 6d76c7cb3b move warning fixes from il_func.cpp to irc.cpp since that's where they are coming from 2004-11-21 11:31:02 +00:00
taylor 1d488daada make hud_disabled_except_messages() do everything at once, add it to hud_show_radar() and hud_show_target_model() so those don't show up (bug #271) 2004-11-21 11:29:53 +00:00
taylor af3e060a17 some 64-bit OS comaptibility fixes 2004-11-21 11:27:31 +00:00
taylor e6cddc470c split bm_load_sub() into fast (memory only) and slow (disk only) versions
EFF bug fix for fps and much better error handling
2004-11-21 11:26:39 +00:00
Goober5000 16a19c165c #pragma'd a bunch of warnings
--Goober5000
2004-11-18 00:05:37 +00:00
Goober5000 bb6f00f1ad added two new sexps
--Goober5000
2004-11-17 22:23:13 +00:00
taylor 609d799691 don't set gamma ramp while running FRED 2004-11-04 22:49:13 +00:00
taylor 81bf709a24 note to self: copy is down pat, now just learn how to paste, moron 2004-11-04 08:33:44 +00:00
taylor 74caede040 animate weapon glow/bitmaps properly while in flight, make sure
we don't exceed bitmap frame numbers, don't try to calculate
frame for particle spew animations since particle_render_all()
does that for us already
2004-11-02 08:32:38 +00:00
Goober5000 52f3eee0df tweaked some project settings
--Goober5000
2004-11-02 01:48:20 +00:00
taylor ef45ad0498 make use of Knossos_warp_ani_used flag - thanks Goober5000 2004-11-01 20:57:04 +00:00
taylor af97948745 new pilot code 2004-10-31 22:07:27 +00:00
taylor 332962030d compiler warning fixes, maybe fix issue that would cause cap ships to not fire beam weapons 2004-10-31 22:06:42 +00:00
taylor f21fcc0332 s/OGL_inited/OGL_enabled/g 2004-10-31 22:05:30 +00:00
taylor 8d65dc1bc4 be sure to initialize splodeing_texture, fix issue that would cause loading problems for glows 2004-10-31 22:04:33 +00:00
taylor 0874eefc8f little cleanup 2004-10-31 22:02:47 +00:00
taylor 07ce347244 new bmpman merge support, add PreProcDefines.h a few new places 2004-10-31 22:00:57 +00:00
taylor 8d585b4358 support external parsing sources without hurting currently parsing file (for EFF code) 2004-10-31 21:57:30 +00:00
taylor 75154c1613 new bmpman support, new OGL fixes don't need the freaky neb lighting fix anymore 2004-10-31 21:56:09 +00:00
taylor 1d084ab9cf s/fisrt/first/g 2004-10-31 21:55:00 +00:00
taylor c9e0491b23 new pilot code support, no-multiplayer and compiler warning fixes, center mouse cursor for redalert missions 2004-10-31 21:53:24 +00:00
taylor 447873f0cf fix math error that was hitting Assert()'s and making OGL models flip around for no reason 2004-10-31 21:49:49 +00:00
taylor 773d5ad4c9 faster setting of 0 spec values (Kazan), comment out second (dumbfire?) lead indicator since it just looked wierd constantly being offset 2004-10-31 21:48:42 +00:00
taylor 4ff9c8e05f bmpman merge 2004-10-31 21:46:38 +00:00
taylor 964bd9f180 Linux tree merge, better DDS support, texture panning 2004-10-31 21:46:10 +00:00
taylor fabd6362a7 Linux tree merge, single array for VBOs/HTL 2004-10-31 21:45:13 +00:00
taylor 274fa3cb3c Linux tree merge, use linear mag filter, small FRED fix, AA lines (disabled), use rgba colors for 3dunlit, proper gamma adjustment, bmpman merge 2004-10-31 21:42:31 +00:00
taylor 368c713975 move some otherwise bmpman stuff into grd3dbmpman.cpp 2004-10-31 21:40:11 +00:00
taylor c8d4f22a78 bmpman merge 2004-10-31 21:39:24 +00:00
taylor e3c58482c7 reinit device if lost - one of the D3D people should make sure this isn't stupid 2004-10-31 21:38:25 +00:00
taylor 18b6bb4d75 s/fisrt/first/g, bmpman merge 2004-10-31 21:36:39 +00:00
taylor 600444c1fc OGL_enabled, s/fisrt/first/g 2004-10-31 21:35:53 +00:00
taylor a8d696efbd rename __ASSERT check to _ASSERT to fix constant warning message - why did no one else fix this? 2004-10-31 21:34:39 +00:00
taylor bc807d17b5 rename OGL_inited to OGL_enabled to match D3D version 2004-10-31 21:33:05 +00:00
taylor 0630102a5d no networking with Inferno builds, basic 64-bit OS support 2004-10-31 21:32:27 +00:00
taylor 61ad202f69 bump COUNT_ESTIMATE, reset time compression at the start of a mission, new pilot file support, add feature_disabled popup 2004-10-31 21:31:34 +00:00
taylor 9927a5ae87 lots of cleanup with support for bmpman changes, full Linux/OSX support 2004-10-31 21:30:01 +00:00
taylor c5efd0be0f EFF animation support 2004-10-31 21:29:00 +00:00
taylor 49303fd117 support new pilot code, Linux code tree merge, don't use same pilot directory for Inferno builds 2004-10-31 21:28:38 +00:00
taylor e764696b29 bmpman merge, EFF animation support, better page in stuff, dozen or so smaller fixes and cleanup 2004-10-31 21:26:27 +00:00
taylor 3aa7acd898 change case of opengl files so I can stop worrying, add gropenglbmpman files 2004-10-31 21:24:11 +00:00
taylor 633729f763 #define if !#defined, add USE_DEVIL and FS2_SPEECH commented out 2004-10-31 21:23:08 +00:00
taylor 90cf3e8614 initial import from bmpman merge 2004-10-31 21:21:11 +00:00
Goober5000 31c41b5296 whoops
--Goober5000
2004-10-31 02:26:15 +00:00
Goober5000 df8319a0f8 added Knossos_warp_ani_used flag for taylor
--Goober5000
2004-10-31 02:04:34 +00:00
taylor 46c50c1120 make sure all spec colors are set to 0 in hud_tri() 2004-10-18 17:13:36 +00:00
Goober5000 d322e2ff67 fixed FRED bug that changed special arguments to (null)
--Goober5000
2004-10-18 09:27:47 +00:00
phreak b402b71221 Made WMCoolmon's hud target info brackets recognize alt-names
--phreak
2004-10-15 13:10:06 +00:00
Goober5000 c940cd79bf added change-alt-name
--Goober5000
2004-10-15 10:03:09 +00:00
Goober5000 35e3ca578c cleaned up some sexp stuff and added wing capability to kamikaze sexp
--Goober5000
2004-10-15 09:21:55 +00:00
Goober5000 d3c82861c9 extra coding insurance
--Goober5000
2004-10-15 08:14:07 +00:00
Goober5000 8405bd055e tweakage
--Goober5000
2004-10-14 23:03:37 +00:00
Goober5000 e3b142e32a added ability for variable names to be used as special arguments
--Goober5000
2004-10-14 22:28:27 +00:00
Goober5000 650954db1c more ubersexp bugfixing
--Goober5000
2004-10-14 01:19:17 +00:00
Goober5000 479498a9d5 fixed a few when-argument bugs
--Goober5000
2004-10-13 10:46:49 +00:00
Goober5000 4279bbb9d8 added toggle-subsystem-scanning ship flag
--Goober5000
2004-10-12 22:47:15 +00:00
Goober5000 f657744e17 added contrail speed threshold
--Goober5000
2004-10-12 07:34:45 +00:00
Goober5000 953e6a99bc added the no-bank ship flag (which works) and the affected-by-gravity flag
(which won't work until I implement gravity points)
--Goober5000
2004-10-11 22:29:25 +00:00
taylor 03aaaacfb5 make sure windowed mode gets the correct size 2004-10-10 22:15:10 +00:00
taylor decacd4b3e warp mouse to center screen on mission start 2004-10-10 22:12:57 +00:00
taylor 0b5681d867 holy crap at the copy-paste error 2004-10-10 16:59:37 +00:00
taylor 4e8849e133 almost forgot this for the IBX stuff 2004-10-09 18:08:33 +00:00
taylor d3f7db383f one more try to fix the memory leak and end-of-mission crash for talking head anis 2004-10-09 17:58:48 +00:00
taylor d203851662 better debugging for g3_end_frame() - mostly for FRED2 2004-10-09 17:54:32 +00:00
taylor 1194082507 safer handling of missing shield ani 2004-10-09 17:51:23 +00:00
taylor d8d1502cd8 da simple IBX code, back to old line rendering for models since it should be faster for OGL now 2004-10-09 17:48:58 +00:00
taylor 6804c59ad1 da simple IBX code 2004-10-09 17:45:45 +00:00
taylor 0e6d298426 don't use DevIL to read the header, slightly more sane error checking 2004-10-09 17:44:10 +00:00
Kazan bb80f8dd7e interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000) 2004-10-06 22:02:54 +00:00
Kazan d330dff907 Autopilot convergence collision fix for ai_fly_to_ship() and ai_waypoints() -- mathematically expensive, only usable by autopilot 2004-10-03 21:41:11 +00:00
Kazan 6c27195392 fix autopilot formation bug 2004-09-28 22:51:41 +00:00
Kazan 9a1b1f2eaa | is binary or, || is boolean or - please use the right one
autopilot velocity ramping biasing
made debugged+k kill guardianed ships
2004-09-28 19:54:32 +00:00
taylor 2f8a2dc863 fix logic error, may be support ship rearm fix 2004-09-26 20:58:29 +00:00
taylor 155a9e36c9 handle lost devices better, fix movie crash 2004-09-26 16:24:51 +00:00
taylor c4101b2fde proper OGL line drawing in HTL... hopefully 2004-09-24 22:40:23 +00:00
Goober5000 29dd848989 some ubersexp fixes
--Goober5000
2004-09-24 02:13:00 +00:00
Goober5000 4964e77ef2 fixed two bugs... still more bugs to be found :p
--Goober5000
2004-09-23 23:52:58 +00:00
Goober5000 e65d00dd33 ubersexp implementation complete
--Goober5000
2004-09-23 22:51:07 +00:00
Goober5000 61449827db a bunch of work on the actual implementation of when-argument
--Goober5000
2004-09-23 05:53:00 +00:00
Goober5000 b184c75e5a further work on ubersexp framework
--Goober5000
2004-09-22 21:52:22 +00:00
Goober5000 a57002681e fixed some small problems in the framework - should be working nicely now;
next step is the actual sexp implementation :-P
--Goober5000
2004-09-22 08:32:05 +00:00
Goober5000 cee8a97426 checking in framework for when-argument special ubersexp
--Goober5000
2004-09-22 06:56:45 +00:00
tbird 85de2b657e Modified the image loading to accept 24 and 32 bit images 2004-09-22 03:50:13 +00:00
Goober5000 31f2466725 a bit of reordering
--Goober5000
2004-09-17 08:07:52 +00:00
Goober5000 12c43798c4 changed around the logic for the 3D warp effect
--Goober5000
2004-09-17 07:12:23 +00:00
Goober5000 810272dc17 moved ssm stuff to header file so it would work in FRED
--Goober5000
2004-09-17 07:11:02 +00:00
Goober5000 50d50878a6 removed player-not-use-ai and changed player-use-ai to take an argument
--Goober5000
2004-09-17 00:28:32 +00:00
Goober5000 4d698cb5b8 changed toggle-hud to hud-disable; added hud-disable-except-messages
--Goober5000
2004-09-17 00:18:18 +00:00
et1 5b8643672c Use yellow warp anim when doing exit jump with "-tbpwarpeffects" 2004-09-10 13:55:49 +00:00
et1 d693230a5c Implemented "+WeaponMinRange" token. Fixed a crash issue with fighter launch checks 2004-09-10 13:54:21 +00:00
et1 1d11353e8c Command line option for TBP for warp stuff, "-tbpwarpeffects" 2004-09-10 13:51:45 +00:00
et1 40e1dfe93f Implemented "+WeaponMinRange" token 2004-09-10 13:50:09 +00:00
Goober5000 4482e8e7cd fix0red something weird
--Goober5000
2004-09-05 20:05:16 +00:00
Goober5000 341d7b09e7 whoops, fixed this for debug mode
--Goober5000
2004-09-05 19:41:31 +00:00
Goober5000 3d158e6a93 we definitely want browse info... and Sticks wants a mapfile too
--Goober5000
2004-09-05 19:25:02 +00:00
Goober5000 3766a10e38 fixed a few warnings
--Goober5000
2004-09-05 19:23:24 +00:00
Goober5000 27b3bc69ed MultiUi.cpp should not be in the "Freespace2" project
--Goober5000
2004-09-05 18:42:31 +00:00
Goober5000 2ddca17e8c fixed a warning
--Goober5000
2004-09-02 04:02:44 +00:00
phreak e349f9b809 MISSION_FLAG_USE_NEW_AI fixes for bomber+ missile selection, rapid dumbfire
firing and primary weapons selection
2004-09-01 01:26:20 +00:00
phreak 31d7488532 created the mission flag MISSION_FLAG_USE_NEW_AI
this lets old missions use the retail AI so they are balanced.  new missions would
be able to select this in fred so designers can take advantage of it.
2004-09-01 00:58:46 +00:00
Goober5000 59731f6812 fixed a small bug in the custom hitpoints mod
--Goober5000
2004-09-01 00:22:36 +00:00
Goober5000 40add6add9 when calculating damage for scoring, don't count beams unless they're fired by a fighter or bomber
--Goober5000
2004-08-31 23:36:28 +00:00
Kazan b139d1b03d small standalone-related multibug fix
prohibited execution of process_debug_keys(int) while Game_mode & GM_MULTIPLAYER
2004-08-26 18:19:36 +00:00
Goober5000 7afc414357 fix0red some warnings
--Goober5000
2004-08-23 07:48:09 +00:00
Goober5000 93c32d683f warp effect is back to FS2 default
--Goober5000
2004-08-23 04:32:40 +00:00
Goober5000 17b8a2fa32 ship-tag and ship-untag sexps
--Goober5000
2004-08-23 04:32:06 +00:00
Goober5000 0bd279e968 ship-tag and ship-untag
--Goober5000
2004-08-23 04:00:15 +00:00
Goober5000 91c79b15ad modularized tag stuff in preparation for sexp
--Goober5000
2004-08-23 03:34:34 +00:00
Kazan fa7c2dad07 wakka wakka - fix minor booboo 2004-08-20 05:13:08 +00:00
Kazan 7d1c8b185d added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this 2004-08-11 05:06:36 +00:00
phreak aa889ef96e fixed the -orbradar launcher string 2004-08-08 02:56:54 +00:00
phreak 08bf4302e7 added radarorb.cpp and radarorb.h to project 2004-08-05 02:18:17 +00:00
phreak fa031f9047 forgot to commit orb change 2004-08-05 02:15:27 +00:00
phreak 220ed35eeb orb radar rendering style 2004-08-02 22:54:07 +00:00
phreak 01b0dec472 orb radar rendering style 2004-08-02 22:43:03 +00:00
phreak 04c8b17831 added -orbradar to enable orb rendering for the radar 2004-08-02 22:40:59 +00:00
phreak ca99486b24 -phreak command line changed to -dualscanlines 2004-08-01 02:31:18 +00:00
et1 51301cfadf Implemented "+SwarmWait:"-token and fixed weapon glow tails 2004-07-31 08:58:07 +00:00
et1 313f069005 Implemented "+SwarmWait:"-token 2004-07-31 08:57:22 +00:00
et1 f5d7c33c1e Fixed inaccuracy problems with non-homing swarmers 2004-07-31 08:54:38 +00:00
et1 4e2ffa189b Make missing briefing icon message to tell the icon missing 2004-07-31 08:53:46 +00:00
et1 f3e70df182 If weapon loadout anim is missing, warn instead of int3 2004-07-31 08:52:45 +00:00
et1 3b9995c3d7 Disabled ship shield load check for TBP 2004-07-31 08:51:47 +00:00
Kazan d51241cd4e bugfixes 2004-07-29 23:41:22 +00:00
Kazan 3ed360e5b2 unbug the JS bug i caused --- kazan 2004-07-29 19:37:50 +00:00
taylor ef4247b55c fix NULL pointer and try to prevent in future, remove excess commands in opengl_cleanup() 2004-07-29 09:35:29 +00:00
Kazan a90f1bafb6 fs2_open.exe was suffering the same problem as fred2 -- it was just a little less obvious 2004-07-29 03:49:44 +00:00
taylor 10e760b780 plug memory leaks 2004-07-29 03:41:46 +00:00
Kazan 5c64668b0b making another bug a little bit more dead inside :D 2004-07-27 20:09:12 +00:00
Kazan 999e6395b2 squished another 2004-07-27 18:52:11 +00:00
Kazan e3f5bb6229 i love it when bugs go crunch (autopilot ai fixup) 2004-07-27 18:04:09 +00:00
Goober5000 0b3af1240f outline of ship-tag and ship-untag sexps
--Goober5000
2004-07-26 21:26:45 +00:00
Goober5000 751d13997a updated launcher link
--Goober5000
2004-07-26 21:19:05 +00:00
Kazan 864e1b5922 remove MCD complete 2004-07-26 20:47:56 +00:00
Kazan da97eaa8d9 remove MCD 2004-07-26 20:19:04 +00:00
Kazan 84a7aae84f add conditional compilation directive 2004-07-26 19:39:49 +00:00
Kazan ab6b7db850 Autopilot system completed -- i am dropping plans for GUI nav map
All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
Fixed FPS counter during time compression
2004-07-26 17:54:05 +00:00
Goober5000 f7618cbfb8 last bit of Unix fixorage
--Goober5000
2004-07-26 17:50:02 +00:00
Goober5000 7adaed42a8 more #ifndef fixorage
--Goober5000
2004-07-26 17:39:20 +00:00
Goober5000 c671012188 fixored a problem when using the command-line compiler to compile everything under Windows
--Goober5000
2004-07-26 16:11:41 +00:00
Kazan bd8b9956fe only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged 2004-07-25 19:27:51 +00:00
Kazan 257d7bef7a -fred_no_warn has become -no_warn and applies to both fred and fs2
added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
2004-07-25 18:46:30 +00:00
Kazan d00cd1bda7 i have absolutely nothing to say about that subject 2004-07-25 00:31:31 +00:00
taylor 983729d9eb fix problem with sectioned menu bitmaps in OGL 2004-07-21 00:03:46 +00:00
wmcoolmon a842f88067 Fixed ifdef, was missing ship_decal_system otherwise 2004-07-20 04:03:21 +00:00
Kazan ca8d5ac051 nothing major 2004-07-18 04:07:26 +00:00
taylor 6f0386d93b stupid braces... 2004-07-17 19:01:15 +00:00
taylor 752ba05bae fix set_*_matrix overcompensation, makes OGL work again 2004-07-17 18:59:01 +00:00
taylor 501ae8c8c1 oops, I can't spell 2004-07-17 18:49:57 +00:00
taylor e574e9f732 various OGL and memory leak fixes 2004-07-17 18:46:09 +00:00
taylor ba9569c372 don't use bitmap sections by default, openil_close() 2004-07-17 18:43:46 +00:00
taylor 463e111810 Bob say we fix OGL, so me fix OGL <grunt> 2004-07-17 18:40:40 +00:00
taylor e273761d63 force image orientation in DevIL 2004-07-17 18:38:04 +00:00
taylor 24df446ad7 make old warpmap and new glow bitmap 3D unlit to render right in OGL 2004-07-17 09:29:13 +00:00
taylor 46f274f38d add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again 2004-07-17 09:26:00 +00:00
taylor 759b7e8b31 make sure avi and mpg movies get added to file cache 2004-07-17 09:03:29 +00:00
taylor 997e5411a3 add .deps directory to ignored entries 2004-07-17 09:00:38 +00:00
taylor ccaa74bfcd misspelled filename 2004-07-17 08:59:25 +00:00
wmcoolmon 4e961ff7c9 I though I fixed this... 2004-07-15 00:16:46 +00:00
wmcoolmon 5ca7069215 Better -load_only_used handling; added mark_weapon_used(weapon ID), which does check for IDs of -1. 2004-07-14 01:27:01 +00:00
wmcoolmon 4478c4ca14 Better -load_only_used handling 2004-07-14 01:26:10 +00:00
Kazan 2d50eb04cb adding mcd 2004-07-12 16:37:01 +00:00
Kazan 428b3dcbc9 MCD - define _MCD_CHECK to use memory tracking 2004-07-12 16:33:09 +00:00
Kazan 670a6e21d7 fix a small multibug in tables validation (I had added this once before.. where did it go) 2004-07-12 14:38:13 +00:00
wmcoolmon 840a8fe5ab More in-game stuff, mostly for restricted games 2004-07-12 03:34:55 +00:00
wmcoolmon 027f21c616 Only send ships on the player's team 2004-07-12 03:26:03 +00:00
Kazan c2882fef09 removed a couple pointless useless messages from the debug console 2004-07-12 03:19:17 +00:00
wmcoolmon ea8bdaae4c ... 2004-07-12 03:04:33 +00:00
wmcoolmon 923e274002 Oops. :p 2004-07-12 03:04:03 +00:00
wmcoolmon a7c3be5299 Ingame joining stuff - use -rt to enabled/disable 2004-07-12 02:50:48 +00:00
bobboau a3422b4d01 added the working decal code 2004-07-11 03:22:54 +00:00
wmcoolmon cb663c76fd Fixed bug with the base ship flag I unwittingly introduced. 2004-07-10 08:03:13 +00:00
Kazan a149ccadad minor bugfixes - oh yeah reenabling a rule for multistats :P 2004-07-10 03:18:23 +00:00
Kazan 7b0a84765e fs2netd 1.0 RC5 full support - Rank and Medal updates 2004-07-09 22:05:32 +00:00
wmcoolmon 68be530ccb Fixed conditional. 2004-07-09 07:32:55 +00:00
wmcoolmon b692956bb3 Fixed HUD escort list for dogfight mode, and for any usage. 2004-07-09 05:53:05 +00:00
wmcoolmon a78be991c9 Re-implemented nomotiondebris, as Bobb overwrote it when he commited his changes. 2004-07-09 05:52:19 +00:00
wmcoolmon f9e86561cf Moved set_current_hud, as well as added a conditional to hud_positions_it; it shouldn't and won't be executed on a standalone server. 2004-07-08 22:08:21 +00:00
wmcoolmon 506d8cfef8 Moving set_current_hud, to ensure compatibility with multiplayer. 2004-07-08 22:06:56 +00:00
Kazan 8c4f1d075a fixed a typo in one of the fs2netd strings
played with WMCoolmon's hacked up escort list
2004-07-07 23:34:08 +00:00
Kazan 5e64177b98 FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages 2004-07-07 21:00:08 +00:00
Kazan 4267ef6b23 minor multi fix 2004-07-06 23:45:34 +00:00
Kazan 5f998b51b1 small multifix 2004-07-06 19:59:37 +00:00
bobboau 97a5c86641 FVF code, only the data that is needed is sent off to the card,,
OGL can take advantage of this if they want but it won't break
anything if they don't. also state block code has been implemented,
that's totaly internal to D3D no high level code is involved.
2004-07-05 05:09:21 +00:00
wmcoolmon 75de78014d Replaced some more Int3s with Warnings and Errors. 2004-07-03 08:23:00 +00:00
wmcoolmon 7310682fd7 Error handling for fire_beam instead of just calling Int3() 2004-07-03 07:55:22 +00:00
wmcoolmon 6ab6c14978 Removed function pointer w/ default arguments for compatibility with .NET Sorry, you'll just have to add that "0" by hand. :p 2004-07-03 06:08:54 +00:00
Kazan f90f1a4ad0 working on autonav 2004-07-01 16:38:19 +00:00
phreak 8830b8d266 function pointer radar update.
will enable us to make different radar styles that we can switch between
2004-07-01 02:07:54 +00:00
phreak c565876ce1 function pointer radar update.
will enable us to make different radar styles that we can switch between
2004-07-01 01:54:59 +00:00
bobboau 2798d7d62b implemented index buffered background bitmaps,
OGL people you realy should get this implemented
2004-07-01 01:12:33 +00:00
wmcoolmon 2c4057c20c Support as well as the extern for "-load_only_used"; this way everything that includes cmdline.h doesn't have to be recompiled. 2004-06-29 06:02:34 +00:00
wmcoolmon e37552357b Added "-load_only_used", which makes FS2 load only used weapon data 2004-06-29 06:00:45 +00:00
wmcoolmon 2c20422772 Fixed weapon miniinfo display 2004-06-28 10:00:33 +00:00
bobboau 69aa1db7ab high level index buffer suport and d3d implementation,
OGL people need to get this working on your end as it's broke now
2004-06-28 02:13:08 +00:00
wmcoolmon 175417d319 Bad return 2004-06-27 01:48:17 +00:00
wmcoolmon e6ce945341 Unneccessary warning removed, small change for VC6. 2004-06-27 01:47:16 +00:00
wmcoolmon eeff56c69b Commented out ogg header 2004-06-27 01:45:23 +00:00
wmcoolmon 26d557f94f Minor optimizations and removal of an errant !stricmp 2004-06-26 19:24:24 +00:00
wmcoolmon cd848eee4d Minor optimizations 2004-06-26 19:23:54 +00:00
wmcoolmon 65a0ca7eec Displayed escorts now settable up to MAX_COMPLETE_ESCORT_LIST via "$Max Escort Ships:" in hud_gauges.tbl
Escort list is now hud_gauges.tbl compatible.
2004-06-26 03:19:53 +00:00
wmcoolmon a88b07b315 Added "-targetinfo" to toggle info next to targeted object. 2004-06-26 00:28:05 +00:00
wmcoolmon 523f09bd78 Basic target info next to targeted object. 2004-06-26 00:27:20 +00:00
wmcoolmon cf122544ab Added teh FS2 ogg support files. Not in the project so you still don't need the SDK. 2004-06-22 23:15:17 +00:00
wmcoolmon b1ab3f347f Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
OGG code has been commented out, so you don't need the SDK yet.
2004-06-22 23:14:10 +00:00
wmcoolmon 49a5e1cb29 Added support for -nomotiondebris 2004-06-19 22:16:20 +00:00
wmcoolmon 5e12eb2e79 Added -nomotion debris command line option; also re-ordered categories. 2004-06-19 22:15:48 +00:00
randomtiger 1b84850bdd Changed startup code to catch D3D9 request from launcher.
No actual startup code has been implemented.
2004-06-19 12:45:47 +00:00
wmcoolmon ed78b00a8d Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values 2004-06-18 04:59:55 +00:00
wmcoolmon ce3e4250ed Bumped MAX_MISSION_MESSAGES to 500 2004-06-15 21:05:30 +00:00
wmcoolmon 3dd7af18a8 Bumped MAX_SEXP_NODES to 3500 2004-06-15 21:04:18 +00:00
wmcoolmon ceafaa27de Added hud-set-color and get-current-speed 2004-06-15 20:49:22 +00:00
wmcoolmon 9b7e017b21 hud-set-color SEXP 2004-06-09 00:18:50 +00:00
wmcoolmon 0835b58f68 Fix0red the current target's hud info appearing in the corner of the screen. 2004-06-08 01:12:58 +00:00
wmcoolmon ee590ea3a9 Added +Color: option for custom gauges. 2004-06-08 00:35:43 +00:00
wmcoolmon d19633cab6 Warpout failure bug fixingness 2004-06-07 07:36:08 +00:00
randomtiger dc897e009c Commented out mprintf, it was swamping debug console.
Uncommented some code which I hope has plugged the memory leak.
2004-06-06 20:04:28 +00:00
randomtiger 52f70453a5 Added new compression option -pcx32dds, build posted in RSB forum.
Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
2004-06-06 12:25:20 +00:00
randomtiger 36572a5cdb Added pcx compression option -pcx32dds, build posted in RSB forum.
Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
2004-06-06 11:16:42 +00:00
wmcoolmon d9bdcaa848 More HUD update stuff. Coordinates are now floats, addparent is now obsolete. 2004-06-05 23:31:12 +00:00
phreak f21eed24a5 spawn weapons can now be specified to be spawned at different angles other than
the sphere thats used in retail
2004-06-05 19:15:39 +00:00
phreak de2e849fc6 added static_random_cone which is used for spawn angle features in multi 2004-06-05 19:14:42 +00:00
wmcoolmon c6200d568c Lotsa stuff. Custom gauges w/ ANIs support added, SEXPs to set gauge text, gauge image frames, and gauge coords. These SEXPs and toggle-hud reside in the Hud/change category. 2004-06-01 07:31:57 +00:00
wmcoolmon 0fad6f3b27 Update to make images (not animations) work 2004-05-31 08:54:13 +00:00
wmcoolmon f96860d4fd Custom HUD support, better loading, etc etc. 2004-05-31 08:32:25 +00:00
wmcoolmon d816460ccc Final draft of the HUD parsing system structure. May change how individual coord positions are specified in the TBL. -C 2004-05-30 08:04:49 +00:00
wmcoolmon 9bab07b0c9 First bugfix in this!: Don't want Freespace exiting if it can't load a hud_gauge file. 2004-05-29 04:09:04 +00:00
wmcoolmon 3e436b6df6 Added HUD gauges placement table, "hud_gauges.tbl" or "*-hdg.tbm" table module 2004-05-29 03:02:53 +00:00
wmcoolmon a991a8a66e Spotted something that might be a problem. 2004-05-29 03:01:00 +00:00
wmcoolmon 4aa9ef3707 Added stuff_float_list 2004-05-29 02:52:17 +00:00
wmcoolmon 5077abe5cf Modular music tables 2004-05-28 23:37:30 +00:00
wmcoolmon 27efe27525 Made HUD.tbl obsolete. Info is now taken directly from $Shield_icon in ships.tbl
Now this table can be used for something more useful...say, hud gauge positions?
2004-05-27 00:49:26 +00:00
wmcoolmon e6c3498787 Fixed cf_matches_spec; small bug was introduced. 2004-05-26 22:02:36 +00:00
wmcoolmon 22ed91e5ad Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages 2004-05-26 21:02:27 +00:00
wmcoolmon eda69a3959 Ship & weapon modular table files 2004-05-26 03:52:08 +00:00
wmcoolmon 96b2905477 Modular ship table support. Uses *-shp.tbm , with the same structure as a normal ships.tbl. Individual sections are optional and entries with the same name will override previous settings. -C 2004-05-26 02:31:39 +00:00
wmcoolmon a304552353 Scratch that - .tbm is a better extension 2004-05-26 02:29:44 +00:00
wmcoolmon 75dfa3d338 Added table chunk extension 2004-05-26 02:26:14 +00:00
wmcoolmon 024c0d3fb5 Updated function calls for VC7 use 2004-05-25 00:38:11 +00:00
wmcoolmon 99d1d45e56 cleared up an ambiguous call for VC7 2004-05-25 00:26:25 +00:00
wmcoolmon f3c9d133e7 Updated to use <fstream> instead of <fstream.h> and fixed an un/signed disagreement 2004-05-25 00:24:00 +00:00
wmcoolmon 2922a55398 Updated to use <iostream> instead of <iostream.h> 2004-05-25 00:21:39 +00:00
taylor aa4856b956 filename case change 2004-05-24 07:25:32 +00:00
taylor 1ff48adebd filename case change 2004-05-24 07:14:13 +00:00
taylor f19b20a52a The Great Linux Merge 2004-05-24 07:04:25 +00:00
taylor 82e9de536b add .cvsingore files 2004-05-24 04:12:07 +00:00
taylor bcee834735 autoconf/automake cleanup 2004-05-24 04:10:47 +00:00
taylor 5d372e603a disable COLOR_MATERIAL, for nvidia drivers 2004-05-13 00:17:20 +00:00
phreak d1743d3eda got rid of the color material call, nebulas should blind the player 2004-05-12 23:24:35 +00:00
phreak 7511e5c48d don't fog the warp model if its being rendered 2004-05-12 22:50:31 +00:00
phreak d96b07e1fd renamed the warp model variable from 'wm' to 'Warp_model' 2004-05-12 22:49:14 +00:00
taylor 234b0cb8ed do page in unlock but not for gr_preload() stuff 2004-05-11 23:08:55 +00:00
phreak 1daa7187e4 fixed an array bounds error that was causing debug builds to crash when
rendering a ship
2004-05-11 19:39:29 +00:00
phreak 968c2e4816 fixed the white boxes appearing on unlit bitmaps 2004-05-11 16:48:19 +00:00
Goober5000 420233b850 completed the FRED import conversion stuff that I started ages ago
--Goober5000
2004-05-11 02:52:12 +00:00
Goober5000 d5ff291e4a fixed the AWACS help message
--Goober5000
2004-05-10 13:07:22 +00:00
Goober5000 e5629bfedc made primary and secondary banks quite a bit more friendly... added error-checking
and reorganized a bunch of code
--Goober5000
2004-05-10 10:51:54 +00:00
Goober5000 6458c81d39 fixored the handling of no lasers and no engines... the tests should check the ship,
not the object
--Goober5000
2004-05-10 08:03:31 +00:00
Goober5000 f72b734d7a fixed $quote and $semicolon... it was simply a matter of moving the spot where
the replacement occurred
--Goober5000
2004-05-10 06:14:40 +00:00
Goober5000 d731d98c1e fixed warp decision
--Goober5000
2004-05-10 06:11:47 +00:00
phreak 633599cee6 bumped to 3.6!!!! 2004-05-09 23:32:40 +00:00
taylor 5de3360d61 prefer ani over pcx for ship textures 2004-05-09 15:02:00 +00:00
Goober5000 6afa0ee914 small fix
--Goober5000
2004-05-08 01:08:48 +00:00
Kazan ff53a2f7ad Sorry Guys! 2004-05-07 23:50:14 +00:00
Goober5000 e7081e2398 added Righteous1's Y bug hack
--Goober5000
2004-05-07 19:06:45 +00:00
taylor a14adc3d95 ...missed one... 2004-05-06 22:39:37 +00:00
taylor 46a51c3ea8 DDS mipmap reading, remove unneeded bm_unlock() during page in 2004-05-06 22:35:26 +00:00
taylor df3c070dc2 get mipmap count off of DDS textures for later use 2004-05-06 22:31:02 +00:00
taylor 5cc3240fcc fix DDS textures 2004-05-06 22:26:52 +00:00
taylor f1bfa1bdfc make sure JPG and DDS files are added to the file cache for maps and effects 2004-05-06 22:12:14 +00:00
Kazan f3b70b0f56 Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
Nav Point / Auto Pilot code (All disabled via #ifdefs)
2004-05-03 21:22:23 +00:00
randomtiger 1fff80dcab fl_abs(theta_goal.xyz.z) < 0.001f is reporting using mprintf now instead of assert 2004-05-03 09:27:16 +00:00
randomtiger f396f88286 Fixed D3D fogging on R7000 2004-05-03 08:41:24 +00:00
taylor 4c3d1233bc don't use HTL line fix with Fred 2004-05-02 16:01:38 +00:00
Goober5000 bc931c35da added a comment
--Goober5000
2004-05-02 03:05:23 +00:00
taylor 60ca06ced0 comment out avi free code for now 2004-05-02 01:26:52 +00:00
randomtiger 6cc8ae76f7 FS2_open will now take flag settings from cmdline_fso.cfg not cmdline.cfg.
This means retail FS2 will not crash because of fs2_open flags.
The new version of the launcher (v5) must used to setup flags now.
Anyone distributing pre 3.6 builds should make this clear and 3.6 should come with Launcher v5.
2004-05-01 22:47:23 +00:00
taylor 73e94dc9b1 add some error handling to vm_strdup() 2004-05-01 21:53:39 +00:00
Kazan b5956ab86e bah! stupid me "NULL" not "null" - i hate when i do that 2004-05-01 21:47:43 +00:00
Kazan d50bf8afed changed delete[] to free(), checked for null, if null ERROR 2004-05-01 21:45:31 +00:00
Kazan 3e60e0bfa2 delete[] str_temp
A null check on str_temp is not needed - take a close look at the for loop
2004-05-01 19:49:31 +00:00
taylor 6beca3c32b add CF_TYPE_MISSIONS to physical check to avoid network transfer problems 2004-05-01 19:33:20 +00:00
Goober5000 4d4e171d0c added an assert
--Goober5000
2004-05-01 17:37:09 +00:00
Kazan 1daeaae91d Multiple -mod - "-mod ModA,ModB,ModC" in order of priority
Giving you:
Root: ModA
Root: ModB
Root: ModC
Root: Fs2Default
Root: CDRom
2004-05-01 17:10:37 +00:00
Goober5000 60eac83870 extra insurance
--Goober5000
2004-04-30 22:20:27 +00:00
Kazan ae174f44c4 Lobby screen only shows when PXO_LOBBY is defined 2004-04-30 18:33:22 +00:00
taylor 43574352c1 fix create game buttons 2004-04-27 20:43:32 +00:00
taylor aca865f8ff add NULL check to game_hacked_data() to prevent crash 2004-04-27 20:41:58 +00:00
Goober5000 af23a3fd9c added back in Kazan's line: now you can slow down in cheat mode
whether you press tilde or not
--Goober5000
2004-04-26 19:50:04 +00:00
Goober5000 b32e508cd0 rolled back Kazan's change
--Goober5000
2004-04-26 19:43:07 +00:00
Kazan d9b1a41cff -no_fps_capping 2004-04-26 18:23:48 +00:00
Kazan 9c4b39258a Be careful when modifying other peoples changes - make sure they still work, and do things the simple way
DON'T TOUCH THE CUSTOM BUILD PATH
2004-04-26 17:27:17 +00:00
taylor a389c72462 forgot to remove some safety checks that aren't needed anymore 2004-04-26 15:51:26 +00:00
taylor 07a76fb1d0 mark view cutscenes ignoring extension and file case 2004-04-26 13:11:11 +00:00
taylor 02b01ae130 cvs log header, mark cutscenes viewable for later, gr_flip() to fix OGL white flash 2004-04-26 13:09:20 +00:00
taylor 52c3de6894 respect -glow and -spec 2004-04-26 13:05:19 +00:00
taylor b8d8e129e2 light setup changes, support cmdline ambient value 2004-04-26 13:02:27 +00:00
taylor 8b4e5c76a1 DevIL stuff 2004-04-26 13:00:56 +00:00
taylor 0e013e4194 convert to dos format, add DevIL stuff 2004-04-26 12:57:47 +00:00
taylor 6f8a0fef97 32-bit targa and jpeg loaders, bug fixes, some preload stuff 2004-04-26 12:44:54 +00:00
taylor ad0a54110f minor fixes, HTL lines, 32-bit texture support 2004-04-26 12:43:58 +00:00
taylor 9c32fa49bd gr_preload() pointer for use in bmpman.cpp 2004-04-26 12:41:46 +00:00
taylor b249d885f5 correct header to keep cvs log, minor changes 2004-04-26 12:39:49 +00:00
taylor 82397f1ca3 use d3_draw_rod() for lightning arcs (for OGL fix), fix debris making HUD in OGL disappear 2004-04-26 12:38:35 +00:00
taylor 002a00827b don't try to load glow maps if they are disabled 2004-04-26 12:37:10 +00:00
taylor c91b801f89 add color and HTL support for g3_draw_rod() 2004-04-26 12:36:10 +00:00
taylor 0eb39a0487 32-bit support with DevIL 2004-04-26 02:14:38 +00:00
taylor 121dad10de initial checkin 2004-04-26 02:05:17 +00:00
taylor baa0bddbb2 initial checkin 2004-04-26 01:58:17 +00:00
taylor 785ef0e926 s/idex/idx/ for brief_unload_anims() 2004-04-26 01:41:52 +00:00
taylor b70c71cf8d better anim free stuff, disable for now to prevent CTD 2004-04-26 01:40:53 +00:00
taylor acfc6f572b use absolute moddir path, faster cfilesystem searching 2004-04-26 00:26:37 +00:00
taylor d74ea38f24 don't preload every sound (fixes some slowdowns), snd_preload option support 2004-04-26 00:25:08 +00:00
taylor 46253ef884 novbo and snd_preload cmdline options, fix moddir getting appended space 2004-04-26 00:23:26 +00:00
Goober5000 bf9da3fe00 made time dilation only available in cheat mode; also fixed an obscure CTD
--Goober5000
2004-04-25 06:31:53 +00:00
Kazan 92c0a64e6f Fixed Lobby screen showing up while exiting from non-tracker games
Time dialiation up to 1/4
2004-04-24 15:44:22 +00:00
randomtiger 477edade7a Added -2d_poof command which allows access to 2D poof rendering
Added -radar_reduce to launcher flag description structure
2004-04-18 19:39:13 +00:00
taylor 316e357f56 let language reg setting override auto detection 2004-04-14 23:17:26 +00:00
taylor a587832a5a render lightning unlit so that it works in OGL 2004-04-14 10:27:24 +00:00
taylor de2409e3b0 don't page in neb poofs unless in a neb2 mission, fix OGL whiteout issue 2004-04-14 10:25:50 +00:00
taylor 24cbf23a19 fix for lines and shaders - shouldn't be textured 2004-04-14 10:24:51 +00:00
taylor 202329fc2a fix extra large model with -ship_choice_3d in OGL 2004-04-14 00:37:36 +00:00
Goober5000 e8d124359c fixed the custom hitpoints subsystem bug
--Goober5000
2004-04-13 05:42:45 +00:00
phreak 96f1d08a48 put in the correct fields for the CVS comments to register
fixed a glowmap problem that occured when rendering glowmapped and non-glowmapped ships
2004-04-13 01:55:41 +00:00
randomtiger 07686ee5b2 Adding batching functions here and there and into gr_screen for use with OGL when its ready. 2004-04-11 13:56:33 +00:00
randomtiger 6ad2af811d Fixed movie playing code for fresh install. Removed NO_DSHOW_CODE paths. 2004-04-11 13:43:26 +00:00
Goober5000 d5d8b729c0 quashed the slider bug!
--Goober5000
2004-04-10 16:55:45 +00:00
Goober5000 1541101eb2 some formatting 2004-04-10 16:55:23 +00:00
phreak ad75e90b8e moved an assignment statement inside an #ifdef block so dds works in release mode 2004-04-09 20:32:31 +00:00
phreak 3fde89bebc fixed DDS not working in OpenGL. there was a misplaced Assert() 2004-04-09 20:07:56 +00:00
phreak 4638bb78e1 got rid of some compile warnings 2004-04-08 20:13:17 +00:00
righteous1 a56ee4b6a2 Backing out mainhall audio fix attempt. 2004-04-08 05:00:13 +00:00
phreak 10e8d7df59 changed around the order of some function calls to get the target model
properly rendering in the hud targetbox
2004-04-07 17:20:24 +00:00
righteous1 5b485200de Updated to call alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1 2004-04-07 03:32:45 +00:00
righteous1 59c2fab09d Updated to add alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1 2004-04-07 03:31:53 +00:00
Goober5000 bbef08ce02 code.dsp should definitely have browse info checked
--Goober5000
2004-04-06 16:25:06 +00:00
Goober5000 1eeca3c3f9 commented out one of Bobboau's hacks because it was messing stuff up
--Goober5000
2004-04-06 16:19:11 +00:00
Goober5000 5c066e259a ugh - added back in something that Bobboau removed
-Goober5000
2004-04-06 05:42:49 +00:00
phreak 9adfa4226f oops, hanging ')' 2004-04-06 05:28:07 +00:00
phreak f808f46118 properly commented Local SSM code.
put in some estimation code so the Local SSMs warp in closer to moving ships
2004-04-06 05:26:59 +00:00
phreak ccee36c720 Local SSMs now working again after the code for setting the jumpout/jumpin
times for the missile were removed.
2004-04-06 04:53:21 +00:00
phreak d9ef57bbdd added a control config option for the wireframe hud targetbox i enabled ages ago 2004-04-06 03:09:53 +00:00
phreak 4c8c1b4ca4 removed gropenglw32x.cpp (obsolete) and gropengl2d.cpp (unused and accidentaly committed) 2004-04-06 01:51:36 +00:00
phreak 63627becda added comments (terms of use, commit history) to the tops of files 2004-04-06 01:37:21 +00:00
Kazan c8889d06a1 make custom build work again 2004-04-06 01:11:41 +00:00
phreak ab202a4cbd OpenGL files spilt up to make developing and finding bugs much easier 2004-04-03 20:29:53 +00:00
Kazan ea69ac448f FRED fixes 2004-04-03 18:11:21 +00:00
Goober5000 3e3bb4a80d fixed some stub functions and a bunch of compile warnings
--Goober5000
2004-04-03 06:22:33 +00:00
bobboau dc29468e31 commiting recent minor bug fixes 2004-04-03 02:55:50 +00:00
randomtiger 32aca5283a Changed D3D secondry texture system to be off by default to save mem.
Added some friendly names for parameters.
2004-04-02 18:25:16 +00:00
taylor 41eecb2255 don't use interface anis as ship textures 2004-04-01 15:31:22 +00:00
taylor 4b19143946 close out briefing menu bitmaps before entering mission 2004-04-01 15:29:39 +00:00
taylor 0816cb182c don't load all starfield bitmaps on level load 2004-04-01 15:28:42 +00:00
Goober5000 c7e9c9934d got rid of all those nasty warnings from xlocale and so forth; also added comments
for #pragma warning disable to indicate the message being disabled
--Goober5000
2004-03-31 05:42:29 +00:00
Goober5000 e7830cda37 got rid of Bobboau's SAFEPOINTs in hudtarget.cpp
--Goober5000
2004-03-31 04:24:49 +00:00
taylor 87c33ceff4 handle movie file extensions better 2004-03-30 08:30:38 +00:00
phreak 2e8465e3ab fixed a minor bug where the version checker
would complain even if the correct version of OpenGL was present
2004-03-29 02:24:20 +00:00
taylor 780c43a94e runtime language selection, mantis:0000133 2004-03-28 17:49:55 +00:00
randomtiger 5b3850bac3 Movies now use win32 calls to clear the screen before playback. 2004-03-27 23:23:36 +00:00
randomtiger cbccf655fa Committed possible fix to cutscene listing problem in techroom, as described in mantis. 2004-03-27 22:27:07 +00:00
randomtiger 83d1c8f524 Bug fix for video playback. 2004-03-21 17:38:18 +00:00
bobboau 8c6001b031 fixed a texture loading bug 2004-03-21 10:34:05 +00:00
randomtiger 662398ed86 Fixed a bug that was causing windowed movie playback and a crash.
Added some batching redirection.
2004-03-21 09:41:54 +00:00
bobboau 766ad441d0 fixed -spec comand line option,
probly some other stuf
2004-03-20 21:17:13 +00:00
randomtiger f188726bb6 Added base for a general dynamic batching solution.
Fixed NO_DSHOW_CODE code path bug.
2004-03-20 14:47:14 +00:00
randomtiger 0b76780762 New command line parameter: -d3d_lesstmem causes D3D to bypass V's secondry texture system. 2004-03-19 14:51:55 +00:00
randomtiger 43e30176cf Further D3D texture system simplification. 2004-03-19 12:35:58 +00:00
randomtiger c793909426 Removed -d3d_notmanaged param.
Tided D3D texture code. Merged remaining section code into the rest of the system.
Prepared for removal of code causing waste of memory for secondry store of textures.
2004-03-19 11:44:04 +00:00
bobboau cc41a40735 new fighter beam code
fixed old after burner trails
had to bump a few limits, working on some dynamic solutions
a few fixed to background POF rendering
fixing asorted bugs
2004-03-17 04:07:32 +00:00
randomtiger 4b4cdb941b Added new launcher flag construction code. 2004-03-16 18:37:02 +00:00
phreak 8834f7297b really fixed opengl shields this time 2004-03-16 17:41:12 +00:00
randomtiger 8371056cc0 Commented out shield fix that broke shield rendering for D3D.
Fix didnt appear to work for OGL so I didnt bother to if(OGL) it.
2004-03-16 11:52:17 +00:00
phreak d9ddfb5019 bumped MAX_SOUNDS to 450 if INF_BUILD is defined 2004-03-12 16:26:39 +00:00
phreak d7bf077d52 bumped MAX_GAME_SOUNDS to 400 if INF_BUILD is defined 2004-03-12 16:23:49 +00:00
Kazan 9fc393c46b irc 2004-03-10 20:51:16 +00:00
Kazan 4ddd8bc2a6 generally it helps if i actually add and commit the files i want to modify on a different system 2004-03-10 19:11:40 +00:00
Kazan dc2634a911 partially complete IRC - so i can work on it on my laptop 2004-03-10 18:45:09 +00:00
Kazan 36fe0fdcd7 Disabled multithreaded TCP_Socket in favor of safer single threaded
FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
2004-03-09 17:59:01 +00:00
Kazan cf9e49bd01 more fs2netd stuff 2004-03-09 00:02:16 +00:00
phreak 44cc3e4712 fugly hack to get skyboxes working in HT&L. please port stars_draw() to use HT&L
so this hack can be removed
2004-03-08 22:16:32 +00:00
Kazan d1be81e41b Lobby GUI screen restored 2004-03-08 22:02:39 +00:00
phreak b3b539399d fixed a bug so that shields now render in Opengl HT&L 2004-03-08 22:01:29 +00:00
phreak b8df81b56c made a minor logical fix to gr_opengl_tmapper_internal
disabled pcx32 and jpgtga flags if they were defined by the user
2004-03-08 21:57:04 +00:00
phreak 41446bfa4a split the star and space debris rendering loops into their own separate functions
this makes it easier to edit them if we ever need to and it also increases readability
i also brought some variable declarations outside of the rendering loops
2004-03-08 21:55:20 +00:00
randomtiger 04a8944fb2 Added complete stub system to replace software. 2004-03-08 18:36:21 +00:00
Kazan 275bc85169 Did, undo 2004-03-08 15:06:24 +00:00
Kazan d8c44cdacd *crosses fingers* 2004-03-08 15:03:27 +00:00
Kazan 288b3ffc54 [Incomplete] Readd of Software renderer so Standalone server works
Also FS2NetD changes
PS: CVS crashing mid-transaction and leaving stale locks = annoying++
2004-03-08 14:53:11 +00:00
Kazan 8cb52a463f [Incomplete] Readd of Software renderer so Standalone server works 2004-03-07 23:07:20 +00:00
randomtiger aa7ac12a18 If user has stub ani's dshow code will fail gracefully instead of throwing up an error. 2004-03-07 14:02:22 +00:00
bobboau 07a789e9dc fixed motion debris
animated laser textures
and added a new error check called a safepoint, mostly for tracking the 'Y bug'
2004-03-06 23:28:24 +00:00
Goober5000 518f868ca2 weapons now display counts up to 9999, instead of just 999
--Goober5000
2004-03-06 00:19:23 +00:00
Goober5000 a1991faeeb d'oh!
--Goober5000
2004-03-05 23:54:48 +00:00
Goober5000 efc7e5dc25 made awacs only ask for help in the main fs2 campaign
--Goober5000
2004-03-05 23:41:04 +00:00
Kazan 9dfd09f7f2 Fixed mission validation (was returning false positives) 2004-03-05 21:24:53 +00:00
Kazan df040bed16 Fixed mission validation (was returning false positives) 2004-03-05 21:19:39 +00:00
Goober5000 7ef2ab2e39 Uber pass at reducing #includes
--Goober5000
2004-03-05 09:02:13 +00:00
phreak ade89bb72a fixed the lack of ships in the hud targetbox
prevented other functions calls to glColor3ub() from messing
with the color of textures in gr_opengl_render_buffer().  this was causing some
minor rendering bugs
2004-03-05 04:33:09 +00:00
phreak 0ac7262e3d made OpenGl use the matrix api if called by g3_start_**** or g3_done_instance 2004-03-05 04:16:20 +00:00
randomtiger 840c073f40 Think I have fixed dshow window focus error, will tidy code when confirmed. 2004-03-04 20:56:43 +00:00
Kazan 3efc279ae7 LAN works A1 Supar! 2004-03-04 05:57:45 +00:00
Goober5000 e4fe4d0724 preliminary checking of globals.h
--Goober5000
2004-02-28 20:26:10 +00:00
randomtiger c64ccecfc8 Removed a few uneeded if DIRECT3D's.
Set laser function to only render the effect one sided.
Added some stuff to the credits.
Set D3D fogging to fall back to vertex fog if table fog not supported.
2004-02-28 14:14:57 +00:00
Goober5000 fb0b00fabc commented a slide_face_ship that I missed before
--Goober5000
2004-02-28 01:36:20 +00:00
bobboau 6bc70bcde1 fixed a Z buffer error in HTL submodel rendering,
and glow points,
and other stuff
2004-02-27 04:09:56 +00:00
Goober5000 a0f776a657 added DONT_SHOW_WARNINGS compile branch
--Goober5000
2004-02-25 05:53:32 +00:00
Goober5000 731038a55d removed an old function
--Goober5000
2004-02-23 07:45:38 +00:00
Kazan 240ce6b91c FS2NETD License Comments 2004-02-21 00:59:43 +00:00
randomtiger e9b74587e1 Added * to - conversion for start mission code to allow launcher missions with '-' in them.
Currently the parsing code counts that as a flag and messes it up.
2004-02-20 21:58:07 +00:00
randomtiger 402bee3d1d Removed some uneeded code between NO_DIRECT3D and added gr_zbias call, ogl is set to a stub func.
Changed -htl param to -nohtl. Fixed some badly named functions to match convention.
Fixed setup of center_alpha in OGL which was causing crash.
2004-02-20 21:45:41 +00:00
randomtiger 6c3a22dc8b Changed memory leak detection to happen after atexit all other calls.
This will mean it doesnt report leaks that are cleared by just before the game quits by preset functions.
2004-02-20 18:04:27 +00:00
bobboau e050aa42c3 pluged memory leaks,
3D HTL lasers (they work perfictly)
and posably fixed Turnsky's shinemap bug
2004-02-20 04:29:57 +00:00
bobboau 0a25d70783 fixing lighting bug I accedently introduced 2004-02-16 21:53:40 +00:00
randomtiger 64f810f2eb Use _REPORT_MEM_LEAKS compile flag in code.lib to get a report of memory leaks from malloc calls. 2004-02-16 21:22:15 +00:00
phreak 6b7f45c845 grr fixed a warning message i didn't see 2004-02-16 16:15:04 +00:00
phreak 33a7e1d944 made the window command line tag recognize non-standard resolutions 2004-02-16 16:09:59 +00:00
randomtiger 7e0ac1dfcd Oops, put two files back in, went a bit too far.
Added NO_DSHOW_CODE as a temp solution to Bobs compiling problem.
2004-02-16 12:53:43 +00:00
randomtiger d52d5cf78c Removed a lot of files that we dont need anymore.
Changed htl to be on by default, command now -nohtl
Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system.
Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing.
Removed old dshow code and took away timerbar compile flag condition since it uses a runtime flag now.
2004-02-16 11:47:34 +00:00
bobboau 315eded215 fixed sevral asorted matrix errors,
OGL people make sure I didn't break anything,
most of what I did was replaceing falses with (if graphicts_mode == D3D)
2004-02-15 06:02:32 +00:00
bobboau 96a19631f1 fixed bug involving 3d shockwaves, note I wasn't able to compile the directshow file, so I ifdefed everything to an older version,
you shouldn't see anything diferent, as the ifdef should be set to the way it should be, if it isn't you will get a warning mesage during compile telling you how to fix it
2004-02-15 03:04:25 +00:00
Goober5000 6f5ba639ed hmph... fixed some bugs
--Goober5000
2004-02-14 04:26:58 +00:00
randomtiger 19bef23d16 Please note that from now on OGL will only run with a registry set by Launcher v4. See forum for details.
OK, these changes effect a lot of file, I suggest everyone updates ASAP:
Removal of many files from project.
Removal of meanless Gr_bitmap_poly variable.
Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
Removal of redundant Fred paths that arent needed for Fred OGL.
Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
Fixed many D3D non standard mode bugs and brought OGL up to the same level.
Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
2004-02-14 00:18:37 +00:00
randomtiger a4c446a059 Turned off fog in OGL for Fred.
Simulated speech doesnt say tags marked by $ now.
The following are fixes to issues that came up testing TBP in fs2_open and fred2_open:
Changed vm_vec_mag and parse_tmap to fail gracefully on bad data.
Error now given on missing briefing icon and bad ship normal data.
Solved more species divide by zero error.
Fixed neb cube crash.
2004-02-13 04:17:14 +00:00
phreak 98df261305 fixed a bug where the inferno build would get lower limits for MAX_PERSONAS if INF_BUILD was defined 2004-02-12 22:29:55 +00:00
Goober5000 2845421e29 fixed the barracks crash bug
--Goober5000
2004-02-10 21:47:47 +00:00
matt 69818ee7bf Fixed issue with ships being rendered off center
in the HUD target box. Much easier than I
thought
-- Sticks
2004-02-10 05:07:38 +00:00
Goober5000 4284745f34 fixed a small bug in FS1-compatible music
--Goober5000
2004-02-08 03:35:08 +00:00
Goober5000 d44c2db672 fix for undestroyable subsystems
--Goober5000
2004-02-07 05:11:08 +00:00
Goober5000 c4e5e4bad2 hehe, fixed the subsystem compare so it's not destructive :-p
and also fixed the model checking routine
--Goober5000
2004-02-07 01:25:15 +00:00
Goober5000 87b4aab308 made FS2 able to account for subsystem mismatches between ships.tbl and the
model file - e.g. communication vs. communications
--Goober5000
2004-02-07 00:48:53 +00:00
Goober5000 af62956719 tweakage
--Goober5000
2004-02-06 23:17:43 +00:00
Goober5000 bee32d3956 commented my tmap_num Asserts
--Goober5000
2004-02-06 23:00:29 +00:00
Goober5000 d646d576c4 fixed a small HUD bug I introduced
--Goober5000
2004-02-06 22:58:18 +00:00
Goober5000 804c6b5551 fixed a small compatibility bug
--Goober5000
2004-02-06 21:26:07 +00:00
Goober5000 e966d87566 ugh... okay, *really* fixed the head thing this time
--Goober5000
2004-02-06 21:25:43 +00:00
matt 093dbca530 Fix for bad ambient lighting in non-htl -Sticks 2004-02-06 05:55:46 +00:00
Goober5000 56ab08b66a fixed a few random bugs
--Goober5000
2004-02-05 14:31:45 +00:00
Goober5000 8344fdd8d7 fixed the talking head error
--Goober5000
2004-02-05 14:29:33 +00:00
randomtiger 6155d89c49 Small changes, deleted old dshow stuff 2004-02-05 01:41:33 +00:00
Goober5000 ef9e6c785f commented a decal function that someone missed
--Goober5000
2004-02-04 10:14:58 +00:00
Goober5000 546cd60863 changed spec and glow to be off by default; command lines are now -spec and -glow
--Goober5000
2004-02-04 10:14:25 +00:00
Goober5000 e8ae3106de more player ai stuff
--Goober5000
2004-02-04 09:21:36 +00:00
Goober5000 c89af3a84a got rid of unnecessary double semicolons
--Goober5000
2004-02-04 09:02:45 +00:00
Goober5000 1f27a82d03 made code more uniform and simplified some things,
specifically shield percentage and quadrant stuff
--Goober5000
2004-02-04 08:41:04 +00:00
Goober5000 5e72cca3bf fixed Asserts in two places and commented out an unneeded variable
--Goober5000
2004-02-04 04:28:15 +00:00
randomtiger afcd0f031d Fixed OGL fogging in HTL
Changed htl laser function to work in D3D, commented out until function flat bug is fixed
2004-02-03 18:29:30 +00:00
phreak 6f96a71434 commented out decal references 2004-01-31 04:06:29 +00:00
phreak dc33567316 changed "now" to unsigned int 2004-01-31 03:56:46 +00:00
phreak db7df6a934 commented out decal references 2004-01-31 03:54:50 +00:00
phreak 3dccd906b0 commented out file pending rewrite 2004-01-31 03:52:41 +00:00
Goober5000 ffbbe7aff8 whew - I just went through all the code I ever added (or at least, that I could
find that I commented with a Goober5000 tag) and added a bunch of Asserts
and error-checking
--Goober5000
2004-01-30 07:39:09 +00:00
randomtiger 5d68bb08e0 Added malloc montoring system, use -show_mem_usage, debug exes only to get an ingame list of heap usage.
Also added -d3d_notmanaged flag to activate non managed D3D path, in experimental stage.
2004-01-29 01:34:02 +00:00
phreak 8c9f3d8236 bumped MAX_AI_CLASSES to 30 if INF_BUILD is defined 2004-01-26 23:07:43 +00:00
randomtiger 2db21cd009 Fix to blurring of interface bitmaps from TGA and JPG.
Changes to the pointsprite system, better but not perfect yet.
2004-01-26 20:03:51 +00:00
randomtiger 1ef4ec188d I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window.
In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from.
2004-01-24 15:52:26 +00:00
randomtiger 9e60b3ee26 Added the D3D particle code, its not bugfree but works perfectly on my card and helps with the framerate.
Its optional and off by default, use -d3d_particle to activiate.
Also bumped up D3D ambient light setting, it was way too dark.
Its now set to something similar to the original game.
2004-01-24 14:31:27 +00:00
randomtiger 7c03fdd837 Font and other small changes for Fred 2004-01-24 12:47:48 +00:00
randomtiger 45d32bf358 Fixed serious memory leak causes by use of -pcx32 flag 2004-01-23 00:14:27 +00:00
phreak 8a819826b4 bumped MAX_POLYGON_MODELS to 300 if INF_BUILD is defined. 2004-01-21 17:37:48 +00:00
phreak 809da42da3 added MAX_DRAW_DISTANCE to the ship selection display. This will only take effect if the ani isn't there 2004-01-21 17:37:04 +00:00
phreak baf8a555fe bumped MAX_PERSONAS to 25 if INF_BUILD is defined. 2004-01-21 17:34:31 +00:00
phreak a88a02f67e added MAX_DRAW_DISTANCE constant 2004-01-21 17:33:47 +00:00
phreak 365f79683a added version string message if build is an inferno build 2004-01-21 17:32:05 +00:00
Goober5000 fa827adfed whoops, messed up the speech slightly
--Goober5000
2004-01-20 23:56:28 +00:00
Goober5000 09edaebbee added some initialization to get rid of warnings
--Goober5000
2004-01-20 23:01:52 +00:00
Goober5000 457b7f5d85 got rid of some warnings... it actually looks like Gr_gamma_lookup can be changed
from int to ubyte, because everything that accesses it converts to a ubyte  O.o
--Goober5000
2004-01-20 22:59:09 +00:00
Goober5000 d184558a99 changed the speech stubs to #defines
--Goober5000
2004-01-20 22:50:18 +00:00
Goober5000 89c8d6626f commented the variables in a commented function
--Goober5000
2004-01-20 22:39:06 +00:00
Goober5000 71092135e5 First of all, this should be more readable, second of all, old_fog_color wasn't
initialized and VC++ is complaining.  Someone want to fix this?
--Goober5000
2004-01-20 22:37:44 +00:00
Goober5000 fb9e1d5e58 bumped MAX_SEXP_NODES to 3000
--Goober5000
2004-01-20 22:20:41 +00:00
Goober5000 ba357466f4 er... corrected some inexplicable code... Bobboau, mind explaining?
--Goober5000
2004-01-20 22:13:06 +00:00
Goober5000 84f705b670 heat-seekers now home in on hidden ships
--Goober5000
2004-01-20 22:10:01 +00:00
randomtiger 4205d2b648 *** empty log message *** 2004-01-19 00:57:18 +00:00
randomtiger 9991bd0f9d Some more small changes for Fred OGL 2004-01-19 00:56:10 +00:00
randomtiger 7fe84f909f Few more small changes for Fred OGL 2004-01-18 14:55:08 +00:00
randomtiger bb5afccf1f A couple of FRED_OGL changes. 2004-01-18 14:03:23 +00:00
randomtiger 9c46c6836f Changed the #ifndef FRED I added to #ifndef FRED_OGL so they only effect OGL FRED compile 2004-01-18 13:17:55 +00:00
randomtiger 6c4e48b042 Some small changes to the main codebase that allow Fred_open OGL to compile. 2004-01-17 21:59:56 +00:00
Goober5000 e2253ae5f5 I think this will fix the problem of the death head ani sometimes incorrectly playing
--Goober5000
2004-01-14 21:12:24 +00:00
Goober5000 5ecf54a969 added error checking for an annoying crash when running an out-of-range
sound; also, Phreak misspelled "tertiary"
--Goober5000
2004-01-14 07:07:14 +00:00
Goober5000 3dff76704a fixx0red a bug
--Goober5000
2004-01-14 06:38:41 +00:00
Goober5000 64b55daf77 made set-support-ship number align with general FS convention
--Goober5000
2004-01-14 06:34:07 +00:00
randomtiger 88a7397972 Added new D3D particle module, will commit the code that uses it when its bug free. 2004-01-13 02:19:59 +00:00
randomtiger 9f8385ceda Added fix for fogging debris in D3D htl. 2004-01-12 21:12:42 +00:00
phreak 76ec27ee01 fixed a null pointer 2003-12-19 05:58:44 +00:00
phreak 373df408ba oops switched the signs in a comparison. thats what was causing debug builds to go haywire 2003-12-18 15:35:52 +00:00
phreak 185a4ae66e added a MAX_BUFFERS_PER_SUBMODEL define so it can be easily changed if we ever want to change the 16 texture limit 2003-12-17 23:25:10 +00:00
phreak 4fbb6f6e6c fixed some logic when dealing with parsing local ssms 2003-12-17 20:38:26 +00:00
phreak 4d0baba496 added ai code for "small only" weapons. works for turrets at the moment 2003-12-17 16:42:20 +00:00
phreak b3f0771bee "small only" weapons flag added. weapon shoots at small ships like fighters 2003-12-17 16:41:25 +00:00
phreak ea210ba10c disabled tertiary weapons support pending a rewrite of critical code 2003-12-16 21:06:21 +00:00
phreak 2b173bd522 disabled tertiary weapons support pending a rewrite of critical code 2003-12-16 20:55:13 +00:00
phreak a2a815701d made gr_set_proj_matrix use the MIN/MAX_DRAW_DISTANCE constants 2003-12-16 20:48:41 +00:00
phreak f68a6176f5 created two constants
MAX_DRAW_DISTANCE = 250000
MIN_DRAW_DISTANCE = 1
2003-12-16 20:42:36 +00:00
phreak 9427f0494a replaced asserts in parse_ship with more descriptive warnings 2003-12-15 21:36:42 +00:00
phreak 9dbdf6f449 made turrets use bob's $shots code 2003-12-15 21:32:59 +00:00
phreak 14ad989e7f upped MAX_WEAPON_TYPES to 300 when INF_BUILD is defined 2003-12-15 21:30:24 +00:00
randomtiger 735f5e199b Put render state and other direct D3D calls repetition check back in, provides speed boost.
Fixed bug that caused fullscreen only crash with DXT textures
Put dithering back in for tgas and jpgs
2003-12-08 22:30:02 +00:00
randomtiger 94ac5d433a D3D now supports loading for DXT1-5 into the texture itself, defaults to on same as OGL.
Fixed bug in old ship choice screen that stopped ani repeating.
Changed all builds (demo, OEM) to use retail reg path, this means launcher can set all them up successfully.
2003-12-05 18:17:07 +00:00
randomtiger 3207e0165d Added DDS image support for D3D
Added new command flag '-ship_choice_3d' to activate 3D models instead of ani's in ship choice, feature now off by default
Hopefully have fixed D3D text batching bug that caused old values to appear
Added Hud_target_object_factor variable to control 3D object sizes of zoom in HUD target
Fixed jump nodes not showing
2003-12-04 20:39:10 +00:00
randomtiger 30a2465547 Changed -t32 flag to -jpgtga
Added -query_flag to identify builds with speech not compiled and other problems
Now loads up launcher if videocard reg entry not found
Now offers to go online to download launcher if its not present
Changed target view not to use lower res texture, hi res one is already chached so might as well use it
2003-12-03 19:27:01 +00:00
Goober5000 390e969586 fixed CVS log header so that changes would update more cleanly
--Goober5000
2003-12-02 03:16:16 +00:00
randomtiger 74c183a2cc Undid my node fix, it introduced a lot of bugs, update again if you have that version. 2003-11-29 17:13:54 +00:00
fryday 273b4ca528 Fixed normal loading in OpenGL HT&L.
Fixed lighting in OpenGL HT&L, hopefully for the last time.
Added a test if a normal is valid during model load, if not, replaced with face normal
2003-11-29 16:11:46 +00:00
randomtiger 1923156d28 Small changes to D3D setup 2003-11-29 15:48:11 +00:00
randomtiger 22d4bfe51e Rendering jumpnodes in htl via the old system to make them display again, appears to be so cheap it wouldnt be worth the effort to convert it to true htl. 2003-11-29 14:54:35 +00:00
randomtiger e63d3ed8b1 Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit.
Added stats command for ingame stats on memory usage.
Trys to play intro.mve and intro.avi, just to be safe since its not set by table.
Added fix for fonts wrapping round in non standard hi res modes.
Changed D3D mipmapping to a good value to suit htl mode.
Added new fog colour method which makes use of the bitmap, making this htl feature backcompatible again.
2003-11-29 10:52:10 +00:00
fryday 772de2a9d2 Got lasers to work in HT&L OpenGL
Messed a bit with opengl_tmapper_internal3d, draw_laser functions, and added draw_laser_htl
2003-11-25 15:04:46 +00:00
Goober5000 9100afcbc6 fixed an old omission
--Goober5000
2003-11-25 02:32:16 +00:00
Goober5000 9a38fff930 fixed bug in tech-reset-to-default
--Goober5000
2003-11-24 18:18:00 +00:00
Goober5000 cf7af6a24b fixed a bug introduced by Penguin for running with NO_NETWORK defined
--Goober5000
2003-11-23 00:59:01 +00:00
fryday ba0927f69f Changed default alpha value for lasers in OpenGL to be like in D3D
Fixed Glowmaps being rendered with GL_NEAREST instead of GL_LINEAR.
Dynamic Lighting almost there. It looks like some normals are fudged or something.
2003-11-22 10:36:32 +00:00
phreak 42653ac423 changed PLAYER_MAX_DIST_WARNING to 700000 (700km)
changed PLAYER_MAX_DIST_END to 750000           (750km)

this makes the playing field much bigger
this way you don't get the "return to the field of battle messages"
in the future we should have the mission designer set this limit
2003-11-21 22:30:45 +00:00
randomtiger d18ad3ac24 Almost fully working 32 bit pcx, use -pcx32 flag to activate.
Made some commandline variables fit the naming standard.
Changed timerbar system not to run pushes and pops if its not in use.
Put in a note about not uncommenting asserts.
Fixed up a lot of missing POP's on early returns?
Perhaps the motivation for Assert functionality getting commented out?
Fixed up some bad asserts.
Changed nebula poofs to render in 2D in htl, it makes it look how it used to in non htl. (neb.cpp,1248)
Before the poofs were creating a nasty stripe effect where they intersected with ships hulls.
Put in a special check for the signs of that D3D init bug I need to lock down.
2003-11-19 20:37:25 +00:00
bobboau 065ac67581 got assert to work again 2003-11-17 06:52:52 +00:00
bobboau 5a2ec84253 made the poly list dynamicly alocated,
started work on fixing the node model not rendering,
but most of that got commented out so I wouldn't have to deal with it
while mucking about with the polylist
2003-11-17 04:25:58 +00:00
Goober5000 514ec25eb9 clarified and pruned debug spew messages
--Goober5000
2003-11-16 09:42:38 +00:00
Goober5000 4c165d76ef language 2003-11-16 04:09:27 +00:00
Goober5000 3e7cfa2cf2 fixed briefing scroll and display of "more"
--Goober5000
2003-11-16 04:08:47 +00:00
randomtiger e89dba3e18 Put TGA and JPG stuff on -t32 flag
Put 32 bit PCX stuff on -pcx32 (still has bugs)
Added multisample checking on device initialisation
Changed unrecognised parameter message (as requested) to be more user friendly
Speech now chooses voice based on reg value set by launcher v3.1
2003-11-15 18:09:34 +00:00
Kazan 5358cfb5c4 *WARNING* Multi Compatability with previous versions now in question *WARNING*
[But that's ok, i incremented the multi version number the other day so that it will say "you don't have a compatable version"]

I upped the MAX_PACKET_SIZE from 512 to 4096 -- try and bust multi with more than ?130? ships now :D
2003-11-14 22:47:37 +00:00
Kazan 12422861c6 PXO_SID changed from unsigned to signed 2003-11-13 03:59:54 +00:00
Goober5000 4703b4fb52 added Bobboau's real name to the credits, with his permission
--Goober5000
2003-11-12 06:05:00 +00:00
Kazan b3ce7c19d9 (Kazan) /me slaps forehead... make sure things compile before committing.. sorry guys 2003-11-12 00:44:52 +00:00
Kazan f7c7b28b3b A few multi tweaks - fixed a couple warning-killing collisions between goober and me (kazan) 2003-11-12 00:31:45 +00:00
phreak caac0815dc changed g3_done_instance() calls to take a parameter to pop the T&L matrices 2003-11-11 18:12:41 +00:00
phreak 609188df0c made some functions that are there for 2d drawing not modify T&L matrices 2003-11-11 18:06:49 +00:00
phreak 16b11cc1c8 support for GL_ARB_vertex_buffer_object. should run real fast now with _VERY_
high poly ships
2003-11-11 18:05:02 +00:00
phreak ced9ba8623 made g3_done_instance take a parameter that decides wether to pop the matrix stack.
without it, underflows would have been caused
2003-11-11 18:04:06 +00:00
phreak 3a7f85da10 made some g3_start_instance_matrix calls not affect any of the HT&L graphics
calls since they were called for internal calculations for 2D stuff
2003-11-11 17:59:27 +00:00
bobboau df0bab0bcf shit load of bug fixing, much of it in nebula and bitmap drawing 2003-11-11 03:56:13 +00:00
Goober5000 401967dd9d ubercommit - basically spelling and language fixes with some additional
warnings disabled
--Goober5000
2003-11-11 02:15:47 +00:00
matt 51a1901726 Fixed the projection matrix issues -Sticks 2003-11-10 02:44:36 +00:00
Goober5000 21656d6636 fixed spelling
--Goober5000
2003-11-09 07:36:52 +00:00
Kazan d9277c0227 a couple of htl functions being called in nonhtl (ie NULL functions) problems fixed
conflicts in cmdline and timerbar.h log entries
cvs stopped acting like it was on crack obviously
2003-11-09 06:31:40 +00:00
Goober5000 a8853113c1 edited for language
--Goober5000
2003-11-09 04:09:18 +00:00
Kazan bc8256cfa9 Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar"
DONT FUCK WITH OTHER PEOPLES INCLUDE PATHS
DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths!
2003-11-08 22:25:47 +00:00
Kazan d07c181a45 yeah.. why didn't this commit last time 2003-11-08 21:55:03 +00:00
Goober5000 356b397487 fixed a bug in my sexp code
--Goober5000
2003-11-08 04:31:02 +00:00
phreak 4e15f5cb7d reenabled timerbar 2003-11-07 20:55:15 +00:00
randomtiger d688fb033d Fixed a nohtl call to htl funcs (crash with NULL pointer)
Fixed a bug with 32bit PCX code.
Fixed a bug in the d3d_string batch system that was messing up screen shaking.
Added a couple of checks to try and stop timerbar push and pop overloads, check returns missing pops if you use the system.
Put in a higher res icon until we get something better sorted out.
2003-11-07 18:31:02 +00:00
Goober5000 4690c01e2a added some credit stuff
--Goober5000
2003-11-07 07:12:21 +00:00
phreak 070fbb9349 fixed up some of the matrix functions that were causing problems
bob: i there is an important change here. i don't know if its going to cause any d3d problems
2003-11-06 22:49:22 +00:00
phreak b86820c4b8 added gr_start_**_matrix() and gr_end_**_matrix() around where 3d stuff is rendered 2003-11-06 22:47:37 +00:00
phreak e14f8a37b3 added gr_start_**_matrix() and gr_end_**_matrix() around where ships are rendered 2003-11-06 22:47:02 +00:00
phreak bf1c595f03 bob's stack functions implemented in opengl 2003-11-06 22:36:04 +00:00
randomtiger ec26db6d70 Added my batching solution for more efficient d3d_string.
Its part of the new grd3dbatch module, most of this isnt in use but it might help out later so I've left it in.
2003-11-06 21:10:26 +00:00
Kazan 98d823a100 slight change to .dsp - leave the damn release target as fs2_open_r.exe already
added myself to credit
killed some of the stupid fscking warnings (including doing some casting and commenting out unused vars in the graphics modules)
Release builds should have warning level set no higher than 2 (default is 1)
Why the hell are we getting warning's about function selected for inline expansion... (killing them with warning disables)
FS2_SPEECH was not defined (source file doesn't appear to capture preproc defines correctly either)
2003-11-06 20:22:18 +00:00
matt 180ce17286 Added myself to the credits. -Sticks 2003-11-06 19:35:51 +00:00
randomtiger d3ac81046c Added -d3d_no_vsync command to make turning off vsync optional.
Removed 32bit command, it doesnt do anything.
Made aa multisample reg check safe.
2003-11-03 18:07:26 +00:00
bobboau 6a4a9b8e97 modified trails to render with tristrips now rather than with stinky old trifans,
MUCH faster now, at least one order of magnatude.
2003-11-02 05:50:08 +00:00
bobboau b5497ebcdf new matrix handeling code, and fixed some problems with 3D lit verts,
several other small fixes
2003-11-01 21:59:22 +00:00
Kazan 12d4be057f lil update 2003-10-30 15:30:23 +00:00
fryday 0e7438fce4 Added code to handle MR_NO_ZBUFFER in d3d VB rendering code. 2003-10-30 08:20:36 +00:00
randomtiger b1553e3202 D3D particle flicker fix, also fixes explosions and thruster glows 2003-10-29 18:18:52 +00:00
randomtiger 3df8c973fd Updated timerbar code to work properly, also added support for it in OGL.
In D3D red is general processing (and generic graphics), green is 2D rendering, dark blue is 3D unlit, light blue is HT&L renders and yellow is the presentation of the frame to D3D. OGL is all red for now. Use compile flag TIMERBAR_ON with code lib to activate it.
Also updated some more D3D device stuff that might get a bit more speed out of some cards.
2003-10-29 02:09:18 +00:00
Goober5000 2ecbce19fa tweakage
--Goober5000
2003-10-28 23:59:02 +00:00
randomtiger 6b1b1751ce Added -no_set_gamma flags
Fixed up some more non standard res stuff
Improved selection of device type, this includes using a pure device when allowed which means dev should not use Get* functions in D3D
Made fade in credits work
Stopped a call to gr_reser_lighting() in non htl mode when the pointer was NULL, was causing a crash loading a fogged level
Deleted directx8 directory content, has never been needed.
2003-10-27 23:04:23 +00:00
randomtiger c4bd0bddd9 Fixed hulls not drawing (with Phreaks advise).
Put my 32bit PCX loading under PCX_32 compile flag until its working.
Fixed a bug with res 640x480 I introduced with my non standard mode code.
Changed JPG and TGA loading command line param to "-t32"
2003-10-26 00:31:59 +00:00
phreak 0b8c242f3c added an INF_BUILD option to bump max sounds to 400 if INF_BUILD is defined 2003-10-25 20:42:19 +00:00
bobboau 5b504cc840 adding FOF stuff,
and fixed a small error in the matrix code,
I told you it was indeed suposed to be gr_start_instance_matrix
in g3_done_instance,
g3_start_instance_angles needs to have an gr_ API abstraction version of it made
2003-10-25 06:56:07 +00:00
phreak 764c8a8a87 fixed some old bugs that reappeared after RT committed his texture code 2003-10-25 03:27:50 +00:00
randomtiger 3d12981ddc Implemented support for 32bit TGA and JPG for D3D
Also 32 bit PCX, but it still has some bugs to be worked out
Moved convert_24_to_16 out of the bitmap pfunction structures and into packunpack.cpp because thats the only place that uses it.
2003-10-24 17:35:05 +00:00
phreak e3e204bcdf added code to render the user-defined skybox 2003-10-23 23:49:12 +00:00
phreak 190147afa3 added code for the mission parser to recognize user defined skyboxes 2003-10-23 23:48:03 +00:00
randomtiger d86faac276 Bobs changes (take 2) 2003-10-23 18:03:25 +00:00
fryday aa04dcdaeb Simplified model rendering, and it fixed up a serious bug on my system in which models with submodels didn't get their hull rendered 2003-10-23 13:53:36 +00:00
phreak 1aa48038a0 commented out some mprintfs that kazan missed 2003-10-22 23:10:14 +00:00
phreak 1cb419f4fc added gr_flip_window back in. its used in FRED 2003-10-21 18:23:15 +00:00
phreak c30f286087 cleaned up a bunch of repeated code 2003-10-20 22:32:37 +00:00
Goober5000 946868c67a added min, max, and avg sexps
--Goober5000
2003-10-20 11:49:18 +00:00
randomtiger c3876df4dd Set gamma to 1.0 when quitting, someone was getting it carrying onto the desktop 2003-10-19 17:44:30 +00:00
phreak 890549c301 clipping planes now work 2003-10-19 01:10:05 +00:00
phreak 797ae8b425 changed gr_start_instance_matrix(void) to gr_start_instance_matrix((vector*, matrix*) 2003-10-18 02:46:45 +00:00
phreak 0222fbab29 edited gr_d3d_start_instance_matrix to make it take a vector* and a matrix*, but it doesn't do anything yet 2003-10-18 02:45:39 +00:00
phreak 139b1acda2 oops! forgot to bracket something off with an if :rolleyes: 2003-10-18 02:43:59 +00:00
phreak 73c340d0cf switched around positions of gr_start_instance_matrix and gr_end_instance_matrix 2003-10-18 01:59:02 +00:00
phreak cf8e621064 hardware transformation is working. now lighting needs to be done 2003-10-18 01:22:39 +00:00
randomtiger caf2178399 Big restructure for D3D and new modules grd3dlight and grd3dsetup 2003-10-17 17:18:43 +00:00
randomtiger 4f39ed5890 D3D now has its own gamma system (stored in GammaD3D reg entry) that effects everything.
Put in Bobs specular fog fix.
2003-10-16 17:36:29 +00:00
Kazan c21809a609 couple more types in species_defs.cpp, also finished up "Da Species Upgrade" 2003-10-16 16:38:17 +00:00
Kazan 86ade3d80e fixed typo in fallback code array index 2003-10-16 01:55:26 +00:00
randomtiger bbd0319330 Added incomplete code to allow selection of non-standard modes in D3D (requires new launcher).
As well as initialised in a different mode, bitmaps are stretched and for these modes
previously point filtered textures now use linear to keep them smooth.
I also had to shuffle some of the GR_1024 a bit.
Put my HT&L flags in ready for my work to sort out some of the render order issues.
Tided some other stuff up.
2003-10-16 00:17:18 +00:00
Kazan 1737d0bcd1 Da Species Update :D 2003-10-15 22:03:27 +00:00
randomtiger 910b9e5516 Implemented hardware fog for the HT&L code path.
It doesnt use the backgrounds anymore but its still an improvement.
Currently it fogs to a brighter colour than it should because of Bob specular code.
I will fix this after discussing it with Bob.

Also tided up some D3D stuff, a cmdline variable name and changed a small bit of
the htl code to use the existing D3D engine instead of work around it.
And added extra information in version number on bottom left of frontend screen.
2003-10-14 17:39:18 +00:00
Goober5000 2d60d16956 tweaked a thingy with FS1-style music to make deciding the style less of a hack
--Goober5000
2003-10-14 16:47:34 +00:00
Goober5000 0410d8f4da commented back in null vector warning, because any code that flags this
is buggy and should be fixed (and it only pops up in release builds anyway)
--Goober5000
2003-10-14 16:27:01 +00:00
matt ec88451660 prelim reworking of lighting code, dynamic lights work properly now
albeit at only 8 lights per object, although it looks just as good as
the old software version --Sticks
2003-10-13 19:39:20 +00:00
Kazan f52f7e3b7b Added Log Comment Thingy to these files 2003-10-13 06:02:50 +00:00
Kazan 4b042fcbeb Removed a bunch of Useless *_printf()s in the rendering pipeline that were just slowing stuff down
Commented out the "warning null vector in vector normalize" crap since we don't give a rats arse
Added "beam no whack" flag for beams - said beams NEVER whack
Some reliability updates in FS2NetD
2003-10-13 05:57:50 +00:00
Kazan 9c5ac6b86f #Kazan# FS2NetD client code gone multithreaded, some Fred2 Open -mod stuff [obvious code.lib] including a change in cmdline.cpp, changed Stick's "-nohtl" to "-htl" - HTL is _OFF_ by default here (Bobboau and I decided this was a better idea for now) 2003-10-12 03:46:23 +00:00
matt c1fff6095f Added -nohtl command line param to disable HT&L, nothing is IFDEFd
out now. -Sticks
2003-10-10 03:59:41 +00:00
phreak 7cdd01495b grabbed the most current version from: http://oss.sgi.com/projects/ogl-sample/ABI/ 2003-10-08 21:01:21 +00:00
argv f698c34b0c Negative repeat count means repeat indefinitely. A trivial change, it should not break anything. 2003-10-08 06:32:06 +00:00
Goober5000 ed3e3b0e79 fixed some warnings
--Goober5000
2003-10-07 03:43:22 +00:00
Kazan 5fe9505544 Oopsie! Forgot to commit these with the rest of the fs2netd TCP update 2003-10-06 04:33:11 +00:00
phreak 309f9fc217 bug squashing.
preliminary tnl work done
2003-10-05 23:40:54 +00:00
Kazan 5b6ca4220c fs2netd now TCP 2003-10-04 22:42:23 +00:00
phreak 4a093ef6f3 shinemapping completed. it works!
-phreak
2003-10-04 00:26:43 +00:00
Goober5000 bb42e3f3e1 updated FRED to import FS1 default weapons loadouts as well as missions
--Goober5000
2003-09-30 04:05:09 +00:00
Goober5000 4717f0d3ce added the option to import FSM missions, added a replace function, spruced
up my $player, $rank, etc. code, and fixed encrypt being misspelled as 'encrpyt'
--Goober5000
2003-09-28 21:22:59 +00:00
Kazan b179aba75a ##Kazan## Quick little update of fs2netd stuff to resolve a few issues 2003-09-26 15:34:26 +00:00
bobboau 300d5fc2c1 commiting Hardware T&L code, everything is ifdefed out with the compile flag HTL
still needs a lot of work, ubt the frame rates were getting with it are incredable
the biggest problem it still has is a bad lightmanegment system, and the zbuffer
doesn't work well with things still getting rendered useing the sofware pipeline, like thrusters,
and weapons, I think these should be modifyed to be sent through hardware,
it would be slightly faster and it would likely fix the problem

also the thruster glow/particle stuff I did is now in.
2003-09-26 14:37:16 +00:00
Kazan 9a0493a48d ##Kazan## FS2NetD Completed! Just needs some thorough bug checking (i don't think there are any serious bugs)
Also D3D8 Screenshots work now.
2003-09-25 21:12:24 +00:00
Kazan c2cfffcfba ##KAZAN## FS2 Open PXO --- W00t! Stats Storage, everything but table verification completed! 2003-09-24 19:35:59 +00:00
Kazan 25daac0184 ##KAZAN## - FS2NetD Support! (FS2 Open PXO) -- Game Server Listing, and mission validation completed - stats storing to come - needs fs2open_pxo.cfg file [VP-able] 2003-09-23 02:42:54 +00:00
unknownplayer c8d1fb9142 Minor bugfix to the 3D ship code. There still may be some cases where it will
fail to load the model file it needs, but I'm at present mystified as to why.
2003-09-16 13:30:16 +00:00
unknownplayer 7611d4814b Changed the ship selection window to load the 3D FS2 ship models instead
of the custom *.ani files. It just does a techroom rotation for now, but I'll add
more features later - tell me of any problems or weirdness caused by it, or if
you don't like it and want it as an option only.
2003-09-16 11:56:46 +00:00
fryday 468cdf3450 Rollback killed my lens-flare. D'oh. 2003-09-15 12:34:09 +00:00
wmcoolmon cb0002c4e2 Changed "cell" to "Cmdline_cell" -C 2003-09-14 19:02:06 +00:00
wmcoolmon 860a74c63e Changed "nospec" to "Cmdline_nospec" -C 2003-09-14 19:00:36 +00:00
wmcoolmon f32f566219 Changed "nospec" and "cell" to "Cmdline_nospec" and "Cmdline_cell" 2003-09-14 19:00:02 +00:00
wmcoolmon 8e98865c0a Added "-safeloading" command line parameter, which uses old fs2_retail-style loading code -C 2003-09-14 18:32:41 +00:00
Goober5000 52afd31304 fixed case-sensitivity bugs and possibly that Zeta wing bug
--Goober5000
2003-09-13 20:59:54 +00:00
Goober5000 3ff0cc78c1 added some minor things, such as code cleanup and the following:
--turrets will not fire at cargo
--MAX_SHIELD_SECTIONS substituted for the number 4 in many places
--supercaps have their own default message bitfields (distinguished from capships)
--turrets are allowed on fighters
--jump speed capped at 65m/s, to avoid ship travelling too far
--non-huge weapons now scale their damage, instead of arbitrarily cutting off
----Goober5000
2003-09-13 08:27:29 +00:00
Goober5000 51b4692afd clean rollback of all of argv's stuff
--Goober5000
2003-09-13 06:02:08 +00:00
Goober5000 8ffae02b63 fixed a bunch of compile-time errors and warnings
--Goober5000
2003-09-12 03:57:01 +00:00
Goober5000 9e8083c95e grr...fixed more stuff
--Goober5000
2003-09-12 03:17:33 +00:00
Goober5000 f623737a98 clarified stuff and tweaked the damage ratio for big ships
--Goober5000
2003-09-12 02:08:57 +00:00
Goober5000 30ca59faf5 why was the bomb commented out?
--Goober5000
2003-09-12 01:43:57 +00:00
Goober5000 addfa03981 added XSTR and fixed readability
--Goober5000
2003-09-12 01:38:13 +00:00
Goober5000 78d74edb77 rolled back _argv[-1]'s supercilious commit -- fyi, INF_BUILD is used by
the Inferno campaign
--Goober5000
2003-09-12 01:23:53 +00:00
Goober5000 d28f7402b3 cleaned up some logic
--Goober5000
2003-09-12 01:12:49 +00:00
argv 879df5f46b Removed #ifdef INF_BUILD -- this is only referenced once, so what the hell is it for? 2003-09-12 01:02:50 +00:00
argv 5b5158178a Minor cosmetic fix. 2003-09-12 00:34:05 +00:00
Goober5000 562683087c nitpicked the number 4 to the constant MAX_SHIELD_SECTIONS
--Goober5000
2003-09-12 00:12:13 +00:00
Goober5000 f038ad0551 made code a bit more readable
--Goober5000
2003-09-11 23:59:32 +00:00
Goober5000 9c12379555 minor fix because initialization is done in various routines
--Goober5000
2003-09-11 23:39:01 +00:00
Goober5000 e848a1588d Rolled back _argv[-1]'s changes to the sexp infrastructure, which would
have broken a huge amount of stuff and created some nasty bugs.
Also commented most of _argv[-1]'s new sexps pending consolidation,
and added a placeholder help entry for the one good sexp.
--Goober5000
2003-09-11 23:21:54 +00:00
argv a5c904c210 New weapon table flags, configurable beam whacking, subsystem display names, new energy system, modified the meaning of big damage. 2003-09-11 19:48:00 +00:00
argv 9cbe6c8742 Random beam slash, new energy system, redefinition of what hurts big ships (beams don't), subsystem display names, configurable beam whacking. 2003-09-11 19:45:34 +00:00
argv c337e4b8d2 Made the EMP flash message look a little better. 2003-09-11 19:44:27 +00:00
argv b29cd59a27 New energy system, fixes, random beam slash, don't slash if targeting a subsystem, surface shields, singular shields, configurable beam whacking, friendly beam fire does full damage. 2003-09-11 19:43:43 +00:00
argv 57570e1458 Fix really nasty crash bug when not all stars table entries have a flare. 2003-09-11 19:39:55 +00:00
argv 0e36d39aa1 New energy system, fixes, apply skill damage scaling to all ships, new energy system. 2003-09-11 19:39:03 +00:00
argv d1ca92017c Fix fast player ships missing the subspace tunnel when jumping out, increased max simultaneous ship explosions to 16, new energy system. 2003-09-11 19:36:20 +00:00
argv 85ab9cbe9a New energy system, ship table flag big guns in front, increase max ship types to 400. 2003-09-11 19:34:29 +00:00
argv 14f6f4cf7a New energy system, singular shield support, some new ship table flags, no draw of thrusters when they are off, fixes. 2003-09-11 19:33:07 +00:00
argv 38966b823a Singular shield support, and a couple of fixes. 2003-09-11 19:28:52 +00:00
argv 175a3af33f All kinds of changes, from AI intelligence to singular shield support. 2003-09-11 19:27:30 +00:00
argv 18d11d1030 Ship flag big guns in front. 2003-09-11 19:26:13 +00:00
argv ccbd3d5020 New energy system. 2003-09-11 19:25:00 +00:00
argv ed58b3b127 All player ships may now carry turrets, not just bombers. 2003-09-11 19:24:11 +00:00
argv 583f156912 Lateral movement speed is now affected by engine power. 2003-09-11 19:23:18 +00:00
argv 93985ab901 Several new sexps, such as power drain control. Also increased maximum sexp operators to 4096, though there may be another limit at 1024. 2003-09-11 19:18:13 +00:00
argv a40b30f45b Singular shield support. 2003-09-11 19:16:45 +00:00
argv 35d5a0c23d Surface shields. 2003-09-11 19:15:29 +00:00
argv a63ec351c4 New energy system, table subsystem flags including beam free by default, subsystem display name. 2003-09-11 19:14:14 +00:00
argv abc2ce88d4 Ship flag2 beam-free-all. 2003-09-11 19:12:40 +00:00
argv 0bda676510 Don't restore saved loadouts on scramble missions. 2003-09-11 19:11:36 +00:00
argv 516274ab81 Crash avoidance, ship flag2 beam-free-all. 2003-09-11 19:10:33 +00:00
argv 6a1546b96b Singular shield support, beam-free-all ship flag2, negative repeat count means repeat indefinitely. 2003-09-11 19:09:44 +00:00
argv fa015588e9 Negative repeat count means repeat indefinitely. 2003-09-11 19:08:11 +00:00
argv 44c5c6cf9e Turret display names. 2003-09-11 19:07:11 +00:00
argv 26328e8ccd Singular shield support, and a couple of other things. 2003-09-11 19:06:27 +00:00
argv d430fc233b New energy system support. 2003-09-11 19:05:10 +00:00
argv dbf498eb91 New energy system, auto ETS, etc. 2003-09-11 19:04:36 +00:00
argv e647340153 Various new command-line options, stuffed into my own Argv_options struct to avoid namespace pollution. 2003-09-11 18:55:23 +00:00
fryday 9df64dfef2 Added Lens Flares, enabled by optional table entry in stars.tbl on a per-sun basis 2003-09-10 11:38:31 +00:00
fryday 01da562732 Fixed specular for dynamic lights, optimized it a bit 2003-09-09 21:26:23 +00:00
matt 672b4b3e13 Broke stars last commit, fixed -Sticks 2003-09-09 17:18:25 +00:00
matt 7173cff56f Added -nospec cmd line param to disable specular -Sticks 2003-09-09 17:10:55 +00:00
Goober5000 0c0fb587dd if player has primitive sensors, hud will not display shield icons or message sender brackets
--Goober5000
2003-09-09 05:51:14 +00:00
randomtiger b74c16d3c0 Checked in new speech code and calls from relevent modules to make it play.
Should all work now if setup properly with version 2.4 of the launcher.
FS2_SPEECH can be used to make the speech code compile if you have SAPI 5.1 SDK installed.
Otherwise the compile flag should not be set and it should all compile OK.

- RT
2003-09-07 18:14:54 +00:00
drevil 4c8ea75d88 Testing commits. 2003-09-07 12:42:46 +00:00
wmcoolmon 3fd5154cdd Added "+Subsystem Repair Ceiling:" after "+Hull Repair Ceiling:" (formerly "+Support Repair Ceiling:" 2003-09-06 20:41:52 +00:00
wmcoolmon 340da39cfc Added ability to limit subsystem repairs 2003-09-06 20:40:01 +00:00
wmcoolmon e3354cbfee Minor bugfix (changed an == to >=) 2003-09-06 19:14:50 +00:00
wmcoolmon cce8493724 Added optional mission parameter "+Support Repair Ceiling", which sets what percentage a support ship can repair a ship's hull to. 2003-09-06 19:09:24 +00:00
wmcoolmon f876bf2cac Made it possible to limit how much support ships repair a ship's hull. 2003-09-06 19:07:31 +00:00
matt 3f5676c408 Minor d3d star popping fix 2003-09-05 22:35:33 +00:00
Goober5000 1527d71131 bah - fixed a dumb bug
--Goober5000
2003-09-05 10:41:48 +00:00
Goober5000 d5822a203c merged num-ships-in-battle and num-ships-in-battle-team, making the
team argument optional
--Goober5000
2003-09-05 05:06:32 +00:00
Goober5000 8d2b742020 merge of Phreak's and my sexp.cpp
--Goober5000
2003-09-05 04:48:03 +00:00
Goober5000 80003037b8 merge of Phreak's and my sexp.h
--Goober5000
2003-09-05 04:39:55 +00:00
Goober5000 86d041d581 well, let's see here...
* persistent variables
* rotating gun barrels
* positive/negative numbers fixed
* sexps to trigger whether the player is controlled by AI
* sexp for force a subspace jump

I think that's it :)
--Goober5000
2003-09-05 04:25:29 +00:00
phreak f0bb987ebb fixed a small bug in num-ships-in-battle-team
added an option to loop sounds played by play-sound-from-file
2003-09-05 02:15:34 +00:00
bobboau 04716e55dd an asortment of bugfixes, mostly with the specular code,
HUD flickering should be completly gone now
2003-08-31 06:00:42 +00:00
phreak c804368f37 added num-ships-in-battle and num-ships-in-battle-team sexp 2003-08-30 21:59:48 +00:00
Goober5000 b8a31619ce bumped version to 3.5.5
--Goober5000
2003-08-30 20:55:09 +00:00
phreak f4a6b33906 fixed some random specular lighting bugs 2003-08-30 14:49:01 +00:00
Goober5000 9f54fe1114 implemented rotating barrels for firing primary weapons
--Goober5000
2003-08-28 20:42:18 +00:00
Goober5000 11bcd10805 trying to commit
--Goober5000
2003-08-28 06:17:29 +00:00
Goober5000 5c1f7e5c19 trying to commit
--Goober5000
2003-08-28 05:46:52 +00:00
Goober5000 a3f2d48869 added percent-ships-disarmed and percent-ships-disabled
--Goober5000
2003-08-27 02:04:54 +00:00
Goober5000 9ba71612a1 added is-ship-type, is-ship-class, lock-rotating-subsystem, and free-rotating-subsystem;
also fixed the argument and return values for various sexps so that they work
properly for negative numbers
--Goober5000
2003-08-27 01:38:00 +00:00
Goober5000 9940d28a07 fixed a strange thing that Bobboau inexplicably put in
--Goober5000
2003-08-27 01:36:22 +00:00
Goober5000 3e22143d10 added extra code to enable playing of FS1 music tracks
--Goober5000
2003-08-25 04:46:53 +00:00
Goober5000 a04f658b1b added replacement of $rank with the player's rank in any string that appears
in-game (same as with $callsign); also bumped the limit on the length of text
allowed per entry in species.tbl
--Goober5000
2003-08-25 04:45:57 +00:00
Goober5000 1377f3304c fixed unreachable code
--Goober5000
2003-08-25 04:39:17 +00:00
bobboau a76ebd336e specular code should be bugless now,
cell shadeing has been added activated via the comand line '-cell',
3D shockwave models, and a transparency method I'm calling edge and center alpha that could be usefull for other things, ask for details
2003-08-22 07:35:09 +00:00
Goober5000 205b89b7fa bumped max intel entries to 30
--Goober5000
2003-08-22 07:24:07 +00:00
Goober5000 935fd42370 implemented $callsign to add the player callsign in a briefing, message, or whatever
--Goober5000
2003-08-22 07:01:57 +00:00
phreak a9dfeb1ac0 warp effects and fireballs have their own distinct colors 2003-08-22 03:39:35 +00:00
randomtiger f071b8be41 Fixed switching - RT 2003-08-21 20:54:39 +00:00
phreak a6223bf7c7 added specular highlights. still needs shine mapping 2003-08-21 15:07:45 +00:00
phreak 4035c1d69e zeroed out the specular fields since they caused some flickering 2003-08-21 15:04:17 +00:00
Goober5000 21d60243dc yet another attempt to commit dsp files
--Goober5000
2003-08-21 09:00:58 +00:00
Goober5000 d3ae2fe948 fixed set-support-ship sexp
--Goober5000
2003-08-21 09:00:19 +00:00
Goober5000 e28f0bb38c fixed turret text display for non-laser weapons
--Goober5000
2003-08-21 08:31:24 +00:00
Goober5000 a17149a915 ships that have no afterburners will no longer have the afterburner gauge drawn
--Goober5000
2003-08-21 06:31:19 +00:00
Goober5000 6effe38517 primary weapons will now truncate properly at a '#' symbol, just like secondaries
--Goober5000
2003-08-21 06:18:52 +00:00
Goober5000 b458ec8fc7 removed an extraneous thingy
--Goober5000
2003-08-21 06:11:32 +00:00
Goober5000 161da1e84b Ballistic primaries will now deplete ammo correctly - that is, ammo will be
reduced by the number of firing points, not necessarily 1.
--Goober5000
2003-08-21 06:11:09 +00:00
Goober5000 b26ff24d85 "Fixed" the ballistic primary rearm bug. I have no idea how... I have to assume
it's a bug in MSVC.
--Goober5000
2003-08-21 05:50:00 +00:00
wmcoolmon d05b709fb3 Modified find_file_location to speed up file loading. 2003-08-20 08:14:50 +00:00
wmcoolmon 22d476ba2e Made cfile_delete return 0 on failure, 1 on success 2003-08-20 08:12:08 +00:00
wmcoolmon 13be53d104 Added error screens to the barracks and start screens when a pilot file can't be deleted 2003-08-20 08:11:28 +00:00
bobboau 0ace2693ee update for the specmapping code includeing
suport for seperate specular levels on lights and
optional strings for the stars table
code has been made more organised,
though there seems to be a bug in the state selecting code
resulting in the HUD being rendered incorectly
and specmapping failing ocasionaly
2003-08-16 03:52:24 +00:00
bobboau fb698a7a28 Specular 'shine' mapping;
useing a phong lighting model I have made specular highlights
that are mapped to the model,
rendering them is still slow, but they look real purdy

also 4 new (untested) comand lines, the XX is a floating point value
-spec_exp XX
the n value, you can set this from 0 to 200 (actualy more than that, but this is the recomended range), it will make the highlights bigger or smaller, defalt is 16.0 so start playing around there
-spec_point XX
-spec_static XX
-spec_tube XX
these are factors for the three diferent types of lights that FS uses, defalt is 1.0,
static is the local stars,
point is weapons/explosions/warp in/outs,
tube is beam weapons,
for thouse of you who think any of these lights are too bright you can configure them you're self for personal satisfaction
2003-08-12 03:18:34 +00:00
bobboau 86615245e5 slightly better implementation of the new zbuffer thing, it now checks only three diferent formats defalting to the 16 bit if neither the 24 or 32 bit versions are suported 2003-08-09 06:07:24 +00:00
phreak ea7dfc171f added code to take into account a tertiary reactor pod 2003-08-06 17:50:01 +00:00
phreak a717e8d13a changed the weapon ammo gauges to show additional ammo if a tertiary ammo pod is being used 2003-08-06 17:44:20 +00:00
phreak 3bf90ddac7 since the launcher has a space between 1024 and 768 for the videocard string, i changed the detection to reflect this
also changed intro.mve to intro.avi since we can't use MVEs
2003-08-06 17:42:47 +00:00
phreak d6778bb9c1 since the afterburners are routed through the physics engine, i needed to route the boost pod through here too 2003-08-06 17:39:49 +00:00
phreak 0aa9daafd9 added a thing to set max thrust when tertiary boost pod is engaged 2003-08-06 17:39:04 +00:00
phreak 99e73f948f preliminary work on tertiary weapons. it doesn't really function yet, but i want to get something committed 2003-08-06 17:37:08 +00:00
phreak b1f73372ad changed default texture filtering to GL_LINEAR 2003-08-06 17:26:20 +00:00
phreak 9293801be0 optimized the way cloaking is handled 2003-08-06 17:24:57 +00:00
bobboau 137c211b64 glow maps, for some reason they wern't in here, they should be now,
also there is some debug code for changeing the FOV in game,
and I have some changes to the init code to try and get a 32 or 24 bit back buffer
if posable, this may cause problems for people
the changes were all marked and if needed can be undone
2003-08-05 23:45:18 +00:00
phreak ca6d1ed53d ai now properly uses rapid fire dumbfires 2003-08-03 23:38:08 +00:00
phreak 2815857683 changed some z-buffer stuff so it doesn't clip as noticably 2003-08-03 23:35:36 +00:00
inquisitor 83ec4f7c6b cleanup of old makefile dsws 2003-07-22 14:11:06 +00:00
fryday 784e477788 added fsspeech.cpp fsspeech.h speech.cpp speech.h into code/sound
They include RT's speech code. Add the preprocessor definition FS2_SPEECH to enable text-to-speech at compile-time.
Requires the Microsoft speech SDK Version 5.1 (around 55MB download).
2003-07-19 16:10:48 +00:00
phreak 0c53451f6e fixed a dumb bug 2003-07-16 23:12:44 +00:00
phreak c302bb1409 lighting in the render functions now work for opengl as they do in d3d 2003-07-15 16:09:46 +00:00
phreak ba5b2d2cfa trails now properly alphablend in ogl as it does in d3d 2003-07-15 16:07:12 +00:00
phreak 69fee0a5b2 higher particle limits for opengl. now matched d3d 2003-07-15 16:06:24 +00:00
phreak fb5996b06b the game handles colored laser lighting for opengl now.
this used to be exclusive to d3d
2003-07-15 16:05:33 +00:00
phreak f6dbb169eb the cutscene section in the techroom does not append *.mve onto a filename 2003-07-15 02:58:08 +00:00
phreak a0b8313126 opengl now doesn't try to shutdown when its not running.
could cause problems on startup
2003-07-15 02:53:54 +00:00
phreak add60f26d8 ships now decloak when firing 2003-07-15 02:52:40 +00:00
phreak ec3d8395a6 cloaked ships will reduce brightness with distance 2003-07-15 02:51:43 +00:00
phreak 1575894d9a fixed a warning.
previous cvs message should read: cloaked ship will decloak if a turret fires
2003-07-15 02:51:01 +00:00
phreak 42f5a1c556 cloaked ships now are less visible with distance 2003-07-15 02:41:41 +00:00
phreak ddec102ece fixed problem where beams that ignore shields do not fully damage the target
disabled attenuation for beams, pending rework
2003-07-15 02:39:59 +00:00
phreak 4a166a2751 models that are fully cloaked draw front-to-back 2003-07-15 02:37:59 +00:00
phreak d6c95e36a6 changed the model_setup_cloak() function to allow an alpha value 2003-07-15 02:36:54 +00:00
phreak 797b7cf1c4 added a debug key to cloak targeted ship ~+shift+x 2003-07-15 02:35:59 +00:00
phreak d2f5c9b978 fun work optimizing the cloak effect 2003-07-15 02:34:59 +00:00
randomtiger 4b529848c0 Random Tiger 6/7/2003
fs2_open now uses the registry entry 'VideocardFs2open' instead of 'Videocard' to store its video settings. To run fs2_open now you MUST use the launcher I have provided.

Launcher binary:      http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/Launcher.rar
Launcher source code: http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/Launcher_code.rar

I have also taken the opertunity to fix a few bugs in the launcher and add a new feature to make selecting mods a bit easier.

The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher wont compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted.

I have also removed the internal launcher from the D3D8 module.
Please contact me if you have any problems.

When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and cant afford to find out.
2003-07-06 00:19:25 +00:00
phreak b61270e607 support for cloaking added. needs a cloakmap.pcx
to cloak the players ship, activate cheats and press tilde + x
some more work can be done to smooth out the animation.
2003-07-04 02:30:54 +00:00
phreak 16d3f993db changes for cloaking implemented 2003-07-04 02:28:37 +00:00
phreak ff63885bc2 added support for cloaking.
i will need to contact someone who knows d3d to get this to work
2003-07-04 02:27:48 +00:00
phreak 28dfd08de6 tilde + x cloaks a ship 2003-07-04 02:26:15 +00:00
phreak 3ba479444b ai now properly fires bomber+ missiles at capital ships. 2003-07-02 03:31:27 +00:00
phreak 5b5a4c4bd4 added support for weapons that only fire when tagged
also added limited firing range for local ssms
2003-06-25 03:21:03 +00:00
phreak 702fc1b0cb added support for weapons that only fire when tagged 2003-06-25 03:19:40 +00:00
phreak fdafdd1bcb changed around ai code to take into account a limited lock range for local ssms 2003-06-25 03:16:32 +00:00
phreak fa8fde6780 weapon energy cheat does not carry over from mission to mission 2003-06-25 03:13:48 +00:00
phreak 61e670b408 display lock triangle for local ssms only if its in range specified in weapons.tbl 2003-06-25 03:13:02 +00:00
phreak 6559cbf8c5 added turret-tagged-specific and turret-tagged-clear-specific sexps 2003-06-19 18:12:12 +00:00
phreak 27b28dc0b5 undefined DBUGFILE_ACTIVE for release builds 2003-06-16 16:39:42 +00:00
phreak cbd422cfb8 fixed a small bug where rotating subobjects wouldn't work on a player ship
also changed "+PBank Capacity:" to "$PBank Capacity:" when parsing
ballistic primaries. goob knows about this
2003-06-16 03:36:08 +00:00
phreak 080ac424f9 fixed a bug where local ssms may miss the warphole when entering subspace 2003-06-14 22:56:17 +00:00
phreak d69cb5a4b7 capital ship turrets that use the "huge" flag will not target bombs
this will prevent large beams from shooting the player if he shoots a bomb at a destroyer
2003-06-14 21:22:42 +00:00
phreak 97d550de8c added a warning that will display if a modder puts in a local ssm that:
is a laser or beam
doesn't home
2003-06-13 15:33:57 +00:00
phreak 7236a2e555 local ssms fired without lock will not enter subspace at all 2003-06-12 21:21:26 +00:00
phreak cee725592e local ssm warpin is now handled better than what i committed earlier 2003-06-12 17:45:54 +00:00
phreak b4dd4e6527 fixed a minor bug where local ssms will warpin at 0,0,0 if their target was destroyed while in subspace 2003-06-12 16:54:06 +00:00
phreak 010cafc687 turrets now properly use local ssms 2003-06-12 16:53:16 +00:00
phreak fb5e002728 i hate to update again so soon, but i forgot to mark hostile local ssms that
were in stages 2 or 4 as warping so their blip color would then be blue
2003-06-11 03:15:17 +00:00
phreak 5101801bbe i hate to update again so soon, but there was a compile warning that i accidently passed over 2003-06-11 03:13:39 +00:00
phreak 49704751cf local subspace missiles are now in game. yay 2003-06-11 03:06:07 +00:00
phreak 955dbfcfff the ai can now use local ssms. they are able to use them at *very* long range 2003-06-11 03:03:16 +00:00
phreak c1f74f1ca9 the radar will not show stage 3 local ssms 2003-06-11 03:01:27 +00:00
phreak b4827254db changed around collision code to handle the possible variance in speeds when using local ssms 2003-06-11 03:00:50 +00:00
phreak 4a912539e9 local ssm stuff for hud.
they are always in lock range due to the subspace drive on them
they also can't be targeted when in stage 3.
2003-06-11 02:59:48 +00:00
phreak 63efc36dfe the real position is now copied in g3_rotate_vertex 2003-06-08 17:39:35 +00:00
phreak 51a9b7dbba added a vector in the vertex struct that stores the real world position
the x,y,z variables do not accurately reflect the real position
this is for opengl fogging
2003-06-08 17:38:21 +00:00
phreak 1e4365fd32 debris is now properly fogged 2003-06-08 17:31:37 +00:00
phreak c0daceabb1 fixed a compile error that was accidently committed 2003-06-08 17:29:51 +00:00
phreak a832944f39 bmp_gfx_get_components now works with 32 bit opengl 2003-06-07 21:08:09 +00:00
phreak 2362ee54e4 fixed minor fogging bug 2003-06-07 20:51:06 +00:00
phreak a217fd3a6d final fix (hopefully) to zero mass value bug 2003-06-04 15:32:54 +00:00
phreak eca3de01ef fixed a small bug
ai_select_primary_weapon may have a null pointer passed to it.
2003-06-04 15:31:49 +00:00
phreak d9a9f9e750 added some code that took advantage of opengl fogging stuff 2003-06-04 15:28:24 +00:00
phreak a556505a19 added Sesquipedalian's kamikaze and not-kamikaze sexps 2003-05-24 16:47:58 +00:00
phreak 8acf855707 defined USE_OPENGL
should eliminate the "unable to init 104" warnings
2003-05-22 19:41:52 +00:00
phreak 5cd16d5bfb fixed *minor* problem where ships that were disabled during warpout were not
registering on sensors
2003-05-21 21:07:31 +00:00
phreak 19112128b7 fixed disappearing ship bug when a ship is disabled during warpout 2003-05-21 20:28:53 +00:00
phreak e5da7d1fbe hud is drawn when in chase camera for player 2003-05-21 20:27:07 +00:00
phreak a023d4c724 improved chase camera code.. you can now fight using this camera 2003-05-21 20:26:07 +00:00
phreak c4b49e52c1 improved glowmap rendering speed 2003-05-21 20:23:00 +00:00
phreak 1362e3a518 clarified an error message in subsys_set 2003-05-15 19:08:24 +00:00
phreak 41f2f2e507 game_loading_callback_init() now displays a user-defined loading screen 2003-05-09 23:54:59 +00:00
phreak 3476c814e4 possible fix to ships with no mass values 2003-05-09 23:53:32 +00:00
phreak 4b297c377e changed around code in parse_mission_info() to support user-defined loading screens 2003-05-09 23:52:01 +00:00
phreak 8c5d957c19 added fields to the "mission" struct to allow for user-specified loading screens 2003-05-09 23:51:04 +00:00
phreak 2575249ae7 fixed old bug that created "mouse trails" during a popup screen
a result of doing something a long time ago that i thought was right, but wasn't
2003-05-07 00:52:36 +00:00
phreak a3071ddef8 if "Show Background" is not set it FRED,
it used to show background bitmaps and suns
not anymore
2003-05-05 21:27:46 +00:00
Goober5000 527d43e28b fixed small bug inadvertently added by Phreak affecting the custom hitpoints
mod; also fixed a small bug in the new disruption mod (disrupting all subsystems,
as opposed to only those within the weapon radius)
--Goober5000
2003-05-05 20:55:44 +00:00
phreak 4cf75eb1a7 minor fred bug fixed 2003-05-05 20:13:07 +00:00
phreak 5c5e0b1a07 added my real name 2003-05-05 19:29:24 +00:00
phreak cdd3cf652a added additional error info incase gr_opengl_flip() fails for some unknown reason 2003-05-04 23:52:40 +00:00
phreak 6e4e1bd791 ABtrails are only processed if they are using a bitmap.
this should be the end of the "missiles without trails" bug
2003-05-04 20:51:14 +00:00
phreak 88addb4c60 bumped MAX_TRAILS to 500 because of afterburner trails 2003-05-04 20:50:06 +00:00
phreak 055353d403 minor fix in gr_opengl_flip()
should be end of the "unable to swap buffer" error
2003-05-04 20:49:18 +00:00
phreak ccf24c31a5 beams can't fire when disrupted.
cycle ends if the beam is firing and shooting ship is disrupted
2003-05-04 20:21:00 +00:00
phreak cf036e2af8 ships that are disrupted now have arcs around them much like the emp effect 2003-05-04 20:08:04 +00:00
phreak 04d6f2039b fixed mispelling 2003-05-04 19:51:28 +00:00
phreak c157c24b62 added multipliers for beam turrets and sensors for disruptor missiles 2003-05-03 23:47:04 +00:00
phreak fae1d11cf7 background stars are now somewhat colored, just here as a sort of useless feature test 2003-05-03 16:58:40 +00:00
phreak 2c271ff1c3 changed around the way disruptor weapons work 2003-05-03 16:48:08 +00:00
Goober5000 458634292a implemented the custom hitpoints mod
--Goober5000
2003-04-29 01:03:24 +00:00
Goober5000 583814f945 fixed some scrolling issues; added scroll bar to mission select
--Goober5000
2003-04-06 03:56:54 +00:00
Goober5000 f99632553d gotta love those compiler errors ;)
fixed those and cleaned up conflicts with the missile-locked sexp
--Goober5000
2003-04-05 20:47:58 +00:00
sesquipedalian 50b8201d0c Recommit of is-missile-locked.
I changed the sexp's category from non-campaign to training, so you may get a conflict with that.
2003-04-05 20:17:23 +00:00
Goober5000 7ba034c182 fixed some fiddly bits with scrolling and ui stuff
--Goober5000
2003-04-05 11:09:22 +00:00
Goober5000 7d53165468 arg - forgot something
--Goober5000
2003-04-05 08:51:04 +00:00
Goober5000 03b969ac12 command briefing scroll buttons implemented :)
--Goober5000
2003-04-05 08:46:51 +00:00
Goober5000 71be2cdfe6 commit to fix the FRED compile error
--Goober5000
2003-04-04 22:11:06 +00:00
Goober5000 8fe330b59a fixed stupid spelling mistake
--Goober5000
2003-03-30 21:16:21 +00:00
Goober5000 c3f9bba534 preliminary work on adding scroll buttons to command briefings
--Goober5000
2003-03-30 21:08:42 +00:00
Goober5000 1a70dcbd48 resolved a nasty bug that caused some missions to crash
--Goober5000
2003-03-30 07:27:34 +00:00
Goober5000 b1e4605bed preliminary work on ai facing sexp
--Goober5000
2003-03-30 04:34:38 +00:00
sesquipedalian c038548f67 Aaaand nevermind... 2003-03-29 11:23:46 +00:00
Goober5000 3f0643a9b2 made beams default shield piercing again
also added a beam no pierce command line flag
and fixed something else which I forgot :P
--Goober5000
2003-03-29 09:42:05 +00:00
sesquipedalian 14b68cabef Added is-missile-locked sexp 2003-03-29 08:52:59 +00:00
Goober5000 66c3a13ed7 yay for limit bumping!
bumped number of battle tracks and briefing/mainhall/credits tracks, both to 30
--Goober5000
2003-03-29 05:18:17 +00:00
Goober5000 6120df56af got rid of an annoying compile warning
--Goober5000
2003-03-28 19:56:02 +00:00
Goober5000 66c5e48b95 added beginning functionality for $Texture Replace implementation in FRED
--Goober5000
2003-03-25 07:03:30 +00:00
Goober5000 328364df88 argh - lol
--Goober5000
2003-03-22 08:17:34 +00:00
Goober5000 e41e8f97e0 bleah
--Goober5000
2003-03-22 07:24:53 +00:00
Goober5000 8e3b1f3405 bugs are bad, mmkay?
--Goober5000
2003-03-22 06:35:37 +00:00
Goober5000 2047aa4ae5 added play-sound-from-table, play-sound-from-file, and close-sound-from-file
--Goober5000
2003-03-22 06:11:51 +00:00
Goober5000 6373887892 changed event_sexp_change_music to event_change_sexp_soundtrack
--Goober5000
2003-03-22 06:06:22 +00:00
Goober5000 8738a13c2f yuck - fixed a nasty error when FRED provides a default value for warp-effect
and explosion-effect
--Goober5000
2003-03-21 08:33:33 +00:00
Goober5000 8c9e40b21e added get-relative-object-*, where * = x, y, and z; these sexps return the
world coordinates of a set of relative coordinates to an object; also, fixed many
places in sexp.cpp so that now sexps can accept other sexps as parameters,
wherease before they weren't able to
--Goober5000
2003-03-21 04:51:33 +00:00
Goober5000 b81f64088a comments
--Goober500
2003-03-20 23:30:03 +00:00
Goober5000 f67379b05d comments
--Goober500
2003-03-20 23:20:46 +00:00
Goober5000 2578faf0ad moved ballistic primary reload sounds to indexes 171 and 172 2003-03-20 22:58:43 +00:00
unknownplayer 507db274f1 Fixed the bug with shields where it would consistently display the low detail
shield regardless of what the setting was. Turns out some OGL person was
quite thoughtless in their use of || instead of the correct && for the situation
so the game would always go for low detail shields because OGL and D3D
can't both be active at the same time!
2003-03-20 09:48:25 +00:00
Goober5000 2e6ec62838 implemented EMP as part of weapon-effect sexp
--Goober5000
2003-03-20 09:17:16 +00:00
unknownplayer 1d91c0dbd1 Modified the command line options so they are all in lower-case characters.
Made a slight AI adjustment to how ships choose to attack turrets (they now have a 25% chance of attacking a beam turret which has fired at them from another ship)
2003-03-20 08:24:45 +00:00
Goober5000 26a0a8467b implemented mission flags for no briefing or no debriefing - yay!
--Goober5000
2003-03-20 07:15:37 +00:00
Goober5000 90e56619cf extended sexps
--Goober5000
2003-03-20 04:27:10 +00:00
Goober5000 f1341cf14c making sexps better
--Goober5000
2003-03-20 00:08:08 +00:00
Goober5000 74f56b2bba bit o' housecleaning
--Goober5000
2003-03-19 23:06:40 +00:00
Goober5000 4b7de188af added some mission flags
--Goober5000
2003-03-19 22:49:32 +00:00
unknownplayer 92da077924 Woohoo! Killed two birds with one stone!
Fixed the 'black screen around dialog boxes' problem and also the much more serious freezing problem experienced by Goober5000. It wasn't a crash, just an infinite loop. DX8 merge is GO! once again :)
2003-03-19 12:29:02 +00:00
Goober5000 a8ecbb2980 more housecleaning, this time for debug warnings
--Goober5000
2003-03-19 09:05:26 +00:00
unknownplayer 0eb80bb327 Updated the DX8 code to allow it to be run in 640x480 windowed mode. The game will only procede to do so if your registry settings are set to 640x480 to begin with, but this is accomplished simply enough. 2003-03-19 07:17:05 +00:00
Goober5000 72d5aa53e3 added warp-effect sexp
--Goober5000
2003-03-19 06:23:28 +00:00
Goober5000 3b5e63f1c5 added typecasting to get rid of some build warnings
--Goober5000
2003-03-19 06:22:58 +00:00
unknownplayer 6de76f47f0 Fixed up a bug in the code which was causing all mission loads to crash.
As of this update, the DX merge is officially functional and complete within the CVS main branch. Tell Inquisitor we won't need to roll back at all, but Goober5000 needs to go and look at his SEXP code since he messed up a bunch of checking functions with it
2003-03-18 13:38:07 +00:00
unknownplayer 3a7cc9cc63 The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can. 2003-03-18 10:07:06 +00:00
Goober5000 5b2b6f4b1e added explosion-effect sexp and did some other minor housekeeping
--Goober5000
2003-03-18 08:44:06 +00:00
Goober5000 988b046585 fixed a subtle bug with EMP parsing which probably never happened and never will,
but it's nice to know it's solved :)
--Goober5000
2003-03-18 06:10:14 +00:00
Goober5000 4214c8c99f fixed some misspellings
--Goober5000
2003-03-18 01:44:31 +00:00
Goober5000 974a939d40 pressing Q no longer makes a sound if the player's ship doesn't have shields
--Goober5000
2003-03-17 10:37:32 +00:00
penguin 508026f4a8 Got autoconf to build w/ dx8 libs (for cutscenes). DX8 files must be in C:/dx8 dir for now, will fix later.
Also got rid of the fs2- prefix on the object files.
penguin
2003-03-11 19:00:05 +00:00
phreak d26c56a4b2 worked a hack to fix opengl support with dx8show movies 2003-03-07 01:00:37 +00:00
phreak 3dbe12dbfe added some hacks that shutdown and restore opengl because of cutscenes 2003-03-07 00:15:45 +00:00
Goober5000 ab0a0cbb37 fixed what should be the last bug with bank-specific loadouts
--Goober5000
2003-03-06 09:13:43 +00:00
Goober5000 7bf2515974 rewrote the restricted bank loadout code; it should work now
--Goober5000
2003-03-05 12:38:01 +00:00
Goober5000 75c7f89e73 cleaned out Bobboau's buggy code - about to rewrite with new, bug-free code :)
--Goober5000
2003-03-05 09:17:15 +00:00
Goober5000 0608f193b9 fixed misspelling of "attenuation"
--Goober5000
2003-03-04 04:41:03 +00:00
Goober5000 e946f44853 made error message appear if EMP used without necessary parameters
--Goober5000
2003-03-04 02:25:25 +00:00
Goober5000 f71b8a2740 fixed custom banks so that they no longer need the ":" between each entry
--Goober5000
2003-03-03 17:15:16 +00:00
bobboau 8a1be5efb8 forgot something 2003-03-03 16:50:14 +00:00
bobboau e30344809f forgot something 2003-03-03 10:29:39 +00:00
bobboau 70696fc427 fixed a bug in the bank specific loadout relaiting to secondaries 2003-03-03 10:21:08 +00:00
Goober5000 2d20fa0ccb fixed the warp effect from always being the knossos type
--Goober5000
2003-03-03 09:53:32 +00:00
Goober5000 b50516343e changed "Subspace node activated" message to "Subspace drive activated"
--Goober5000
2003-03-03 09:31:59 +00:00
Goober5000 4e8174b0e8 fixed the tech room bug! yay!
--Goober5000
2003-03-03 04:28:37 +00:00
inquisitor fb38850485 Readme word doc
-Inquisitor
2003-03-02 18:25:49 +00:00
Goober5000 1431e1d1d8 commented an unneeded variable
-- Goober5000
2003-03-02 17:19:45 +00:00
penguin 6d0e2fec80 Added type for static var
- penguin
2003-03-02 07:39:34 +00:00
penguin cb8ef47709 file needed by automake 2003-03-02 06:58:45 +00:00
penguin fc4923df25 file generated by autoconf 2003-03-02 06:49:23 +00:00
penguin b64f4d9312 Use multimedia headers in local dir, not system's (headers are not present in MinGW distribution)
- penguin
2003-03-02 06:37:24 +00:00
penguin ff7d11234c Added multimedia headers not present in MinGW distribution
- penguin
2003-03-02 06:28:12 +00:00
penguin 1c38ebbf66 Tweaked for gcc
- penguin
2003-03-02 06:25:31 +00:00
penguin 5b620ab6f4 Made a debug error message less confusing
- penguin
2003-03-02 06:10:58 +00:00
penguin 91eb23c859 Added versions of _outp() and _inp() for gcc.
- penguin
2003-03-02 06:04:00 +00:00
penguin fc5f42d677 Added newline at end of file to keep gcc from complaining.
- penguin
2003-03-02 06:03:01 +00:00
penguin b684404c43 Added #ifdef WIN32 and #ifdef MSC_VER
- penguin
2003-03-02 06:01:55 +00:00
penguin fa45233e73 Added #ifdef WIN32 around non-standard header file io.h
- penguin
2003-03-02 05:56:56 +00:00
penguin e15dc894fe Moved Gr_scaler_zbuffering definition to top of file
- penguin
2003-03-02 05:55:51 +00:00
penguin 57fae5f5d0 ANSI C++ - namespace clash on ai_rotation; renamed type to ai_rotation_t
- penguin
2003-03-02 05:54:23 +00:00
penguin 6a0e52c863 Added gcc-compatible asm blocks
- penguin
2003-03-02 05:46:28 +00:00
penguin 0d7964b62b 1. Added gcc-compatible asm code.
2. Added #ifndef NO_SOFTWARE_RENDERING
 - penguin
2003-03-02 05:45:04 +00:00
penguin 59a22006b9 ANSI C++ - fixed non-compliant casts to unsigned short and unsigned char
- penguin
2003-03-02 05:43:49 +00:00
penguin 335408b5d5 Added some #ifndef NO_SOFTWARE_RENDERING
- penguin
2003-03-02 05:41:52 +00:00
penguin 50a45e1c08 Abort if unimplemented asm section is called
- penguin
2003-03-02 05:40:28 +00:00
penguin ad32a0ee91 Added #ifdef _MSC_VER to MSVC-specific code
- penguin
2003-03-02 05:30:26 +00:00
penguin 73a75798a6 only define min() and max() if they're not already defined
- penguin
2003-03-02 05:27:44 +00:00
penguin d6886396ac defined FX_ENTRY and FX_CALL for gcc
- penguin
2003-03-02 05:26:23 +00:00
penguin 13b3b59fff 1. Renamed or, og, ob vars to o_r, o_g, o_b ("or" caused gcc to choke).
2. Added #ifndef NO_SOFTWARE_RENDERING around software rendering code
3. Added #ifdef _MSC_VER around MSVC-specific exception handing code
 - penguin
2003-03-02 05:23:34 +00:00
penguin 313323f149 Moved "extern int wm" declaration inside the header #ifdef block
- penguin
2003-03-02 05:12:39 +00:00
penguin a48c33a2a2 Added #ifdef _MSC_VER around strange exception-handling code
- penguin
2003-03-02 05:10:42 +00:00
penguin 48b19f764c ANSI C++ changes
- penguin
2003-03-02 05:07:12 +00:00
penguin 615a687127 Removed -- this was the old Linux makefile. GNU-style makefiles are now generated by autoconf/automake
- penguin
2003-03-02 05:03:11 +00:00
penguin 607adfff39 New files for autoconf/automake support.
- penguin
2003-03-02 04:53:46 +00:00
Goober5000 93e32d0854 bumped alternate names from 10 to 25
--Goober5000
2003-03-02 02:10:11 +00:00
Goober5000 742c4c1484 fixed the initial status bug 2003-03-01 01:15:38 +00:00
bobboau 0806e440db fixed the bug with fighter beams not giveing you kills 2003-02-26 02:56:55 +00:00
bobboau 08dd102c24 fixing my bug fix for the warp model, and not being able to find it 2003-02-25 16:46:01 +00:00
bobboau 417e500307 doh... forgot something in the beam rendering code 2003-02-25 07:15:07 +00:00
bobboau 03fb48d8aa fixed a bunch of fighter beam bugs,
most notabley the sound now works corectly,
and they have limeted range with atenuated damage (table option)
added bank specific compatabilities
2003-02-25 06:22:50 +00:00
inquisitor bbd8f8ce3e added dxguid, ddraw, and strmiids.lib 2003-02-24 02:01:49 +00:00
inquisitor d221fa35c0 added dxguid, ddraw, and strmiids.lib 2003-02-24 01:25:11 +00:00
wmcoolmon 8407fade43 Refixed the splash screen loading code so that it still works with the demo VPs (Loading "2_PreLoad" and "PreLoad") and put logo support back in. Logo support does nothing unless "PreLoadLogo" and/or"2_PreLoadLogo" exist within the search path. 2003-02-23 20:55:57 +00:00
wmcoolmon 769f9334a2 Uncommented the sections of code that actually played a movie for a given mission. (Removed when daveb cleaned out the movie code for the release) 2003-02-23 03:13:03 +00:00
wmcoolmon 04858a66f3 Added cutscenes/movie.cpp(.h) and directx/dx8show.cpp(.h), which contain movie playing code. Don't compile these if you don't have the DX8 SDK. 2003-02-22 04:24:59 +00:00
wmcoolmon c0217891ff DirectX-specific code for movie-playing functions in cutscenes/movie.cpp. Ask RT if you have any questions about it; I just commited it :). 2003-02-22 04:20:47 +00:00
wmcoolmon a286cdd2a3 Movie playing code; use movie_play and movie_play_two to play movies using Directshow. Depends on directx/dx8show.cpp 2003-02-22 04:17:58 +00:00
wmcoolmon 5d79b222cf Added "os_app_activate_set" 2003-02-22 04:14:21 +00:00
wmcoolmon c26df5cbd5 Added "-dshowvid" command-line option, which must be set in order for movies to play. 2003-02-22 04:13:17 +00:00
phreak 61a409aef1 stupid typo -- my bad 2003-02-16 19:00:56 +00:00
phreak cbc3f3fb09 fixed typecasting warnings 2003-02-16 18:55:59 +00:00
phreak 217955d6d0 fixed around splash screen
2_splash.pcx is loaded in 1024x768
splash.pcx is loaded in 640x480 or 2_splash.pcx isn't found
2003-02-16 18:53:59 +00:00
phreak 1de695fef9 tweaked some more stuff 2003-02-16 18:43:13 +00:00
bobboau 013930bc99 added glow map nebula bug fix for d3d, someone should add a fix for glide too
more importantly I (think I) have fixed all major bugs with fighter beams, and added a bit of new functionality
2003-02-16 05:14:29 +00:00
Goober5000 f28334f782 fixed version bumpage... the version is 3.5.0, not 3.50.0 ;)
--Goober5000
2003-02-05 07:04:31 +00:00
Goober5000 555a830058 made my fighterbay code more forgiving of eccentric modeling hacks...
ships can now use the Faustus hangar again :)
--Goober5000
2003-02-05 06:57:56 +00:00
phreak aa92a9c131 started to finalize before 3.50 release.
added support for GL_EXT_texture_filter_ansiotropic
2003-02-01 02:57:42 +00:00
phreak b7450e15f0 bumped to 3.50 2003-01-30 23:24:34 +00:00
phreak 594bfddf7b cleaned up debug output 2003-01-30 23:19:33 +00:00
phreak aa412718e4 enabled RGB lighting for OpenGL 2003-01-30 23:19:14 +00:00
Goober5000 37e4dd5bc7 finished up my fighterbay code - ships will not be able to arrive from or depart into
fighterbays that have been destroyed (but you have to explicitly say in the tables
that the fighterbay takes damage in order to enable this)
--Goober5000
2003-01-27 07:46:33 +00:00
DTP 143f252099 Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. 2003-01-27 01:12:15 +00:00
DTP 72495ef96d Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. 2003-01-27 00:51:46 +00:00
DTP 265628ffb2 temporary fix, added some // so that we can do debug builds. i expect Goober5000 will fix it soon. 2003-01-26 23:30:53 +00:00
wmcoolmon 4aeba649e9 Minor mod to preload screen code, added separate 1024x768 logo
-C
2003-01-26 20:04:32 +00:00
Goober5000 d7a3b618b1 changed change-music to change-soundtrack
--Goober5000
2003-01-26 18:37:19 +00:00
wmcoolmon 7ad0621937 Added title screen support to retail version. When FS2 loads, it will build a list of PCX files in the current directory, then attempt to display one. If no PCX files exist, it will try to display one of the title screens defined in the code. Freespace 2 will then attempt to superimpose a logo in the upper-left hand corner of the screen. If neither can be displayed, FS2 will function normally. 2003-01-26 02:58:33 +00:00
Goober5000 cda3657a3a oops - fixed the nebula bug that wasn't completely fixed :)
--Goober5000
2003-01-26 00:20:01 +00:00
Goober5000 5616cbd065 added preloader to change-ship-model and change-ship-class so that the game
doesn't hesitate when switching models in the middle of missions
--Goober5000
2003-01-25 04:54:36 +00:00
Goober5000 4a5e9969a9 added change-music sexp and bumped MAX_SOUNDTRACKS from 10 to 25
--Ian Warfield
2003-01-25 04:17:39 +00:00
Goober5000 5a23f97266 aw, nuts - fixed a dumb bug with my new don't-collide-invisible code :p
--Goober5000
2003-01-24 03:48:11 +00:00
Goober5000 71d9d1975e fixed a small nebula ship trail bug
--Goober5000
2003-01-24 03:15:11 +00:00
Goober5000 09b61901c5 fixed a few bugs in Bobboau's implementation of the glow sexps; also added
help for the sexps in sexp_tree
--Goober5000
2003-01-21 17:24:16 +00:00
bobboau 67faca1076 added several sExps for turning glow points and glow maps on and off 2003-01-20 05:40:50 +00:00
Goober5000 1d6093cc85 cleaned up build output a bit
--Goober5000
2003-01-19 22:45:35 +00:00
Goober5000 f34be99a5e removed unreferenced variable
--Goober5000
2003-01-19 22:25:10 +00:00
Goober5000 31d970d8ee fixed a bunch of bugs -- the support ship sexp, the "no-subspace-drive" flag,
and departure into hangars should now all work properly
--Goober5000
2003-01-19 22:20:23 +00:00
Goober5000 a60f00ec20 fixed fiddly code
--Goober5000
2003-01-19 09:14:05 +00:00
Goober5000 c3c63dff85 more tweaky bug fixes
--Goober5000
2003-01-19 09:10:40 +00:00
Goober5000 db0c1b2e88 fixed two dumb bugs in the set-support-ship code
--Goober5000
2003-01-19 08:37:52 +00:00
Goober5000 9041337baa actually added the set-support-ship sexp; much of the other commit was
groundwork (data types and stuff)
--Goober5000
2003-01-19 07:45:38 +00:00
Goober5000 55135e0f68 oops - forgot a bit of departure code :)
--Goober5000
2003-01-19 07:13:05 +00:00
Goober5000 341803c8c0 fixed a bunch of bugs - "no-subspace-drive" should now work properly for
all ships, and all ships who have their departure anchor set to a capital ship
should exit to that ship when told to depart
--Goober5000
2003-01-19 07:02:16 +00:00
Goober5000 6256e4a634 got rid of nameplate stuff (superceded by texture replacement)
--Goober5000
2003-01-19 06:44:39 +00:00
bobboau d4f242427d redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it 2003-01-19 01:07:43 +00:00
Goober5000 512b21ee37 made "no-subspace-drive" applicable to all ships and fixed a really *STUPID*
bug that made FRED keep crashing (missing comma, bleagh!)
--Goober5000
2003-01-18 23:25:39 +00:00
phreak 2306c3057d added 'ddsutils' folder to project 2003-01-18 20:00:49 +00:00
phreak 3320a58a9b fixed around the bmpman system to now accept compressed textures 2003-01-18 19:55:16 +00:00
phreak 34fdcc5355 texture mapper now supports DXTC compressed textures 2003-01-18 19:49:45 +00:00
phreak fc351837a5 added tcache flag TCACHE_FLAG_COMPRESSED 2003-01-18 19:49:02 +00:00
phreak b58dd37100 added some defines that deal with mages using DXTC 2003-01-18 19:48:19 +00:00
phreak 401b6c8f8f these files deal with reading .dds files which use DXTC texture compression 2003-01-18 19:45:20 +00:00
Goober5000 09fef27bf5 added "no-subspace-drive" flag for ships
--Goober5000
2003-01-18 10:00:43 +00:00
Goober5000 c9ea61c266 fixed bug I inadvertently introduced by modifying SIF_ flags with sexps rather
than SF_ flags
--Goober5000
2003-01-18 09:25:42 +00:00
Goober5000 a411961c93 fixed some really strange behavior with strings not being truncated at the
# symbol
--Goober5000
2003-01-17 07:59:09 +00:00
Goober5000 f0899ed35b Allowed selection of either $Texture Replace, which keeps track of individual
replacement textures for a ship, or $Duplicate Model Texture Replace, which
duplicates a model and reskins it.  Use $Duplicate Model Texture Replace
if you want to substitute an animated texture or a transparent texture.
--Goober5000
2003-01-17 04:57:17 +00:00
Goober5000 881306223e added capability to the $Texture replace code to substitute the textures
without needing and extra model, however, this way you can't substitute
transparent or animated textures
--Goober5000
2003-01-17 01:48:50 +00:00
Goober5000 4373cdde4f yay! got texture replacement to work!!!
--Goober5000
2003-01-16 06:49:11 +00:00
Goober5000 dd8fbddae1 NOW the model duplicates work! :p
still gotta do the textures, but it shouldn't be hard now
--Goober5000
2003-01-15 23:23:30 +00:00
anonymous 9cd430eb81 fixed the demo compilation. Define FS2_DEMO globally to compile as a demo. Make sure warp.pof is in your data/models directory. 2003-01-15 21:29:05 +00:00
inquisitor 2d54615c04 Test commit, ignore 2003-01-15 20:49:50 +00:00
Goober5000 9dd2db4400 did the XSTR for the turret thing
--Goober5000
2003-01-15 20:49:10 +00:00
Goober5000 6d3fd14816 oops, that'll introduce a bug - naming it just plain "Turret" instead
--Goober5000
2003-01-15 16:52:27 +00:00
Goober5000 926e57b2bd capship ballistic weapon displays "Cannon" on HUD instead of "Laser Turret"
--Goober5000
2003-01-15 16:48:59 +00:00
Goober5000 1b66a0101e assigning duplicate models to ships now works; committing so I have a base
to fall back to as I work on texture replacement
--Goober5000
2003-01-15 08:57:23 +00:00
Goober5000 22f3dc3889 changed most references to modelnum to use ship instead of ship_info --
this will help with the change-model sexp and any other instances of model
changing
--Goober5000
2003-01-15 07:09:09 +00:00
Goober5000 9dfdd02a3f added texture replacement parse - will be implemented later
--Goober5000
2003-01-15 05:24:23 +00:00
Goober5000 9cb006a325 bumped main halls down to 10
--Goober5000
2003-01-15 05:19:07 +00:00
Goober5000 ff0c118dab moved texture loading around a bit; added Texture_replace in preparation
for some cool stuff
--Goober5000
2003-01-15 05:18:13 +00:00
Goober5000 5f72df9715 argh - fixed the stupid message persona bug with <any wingman>
Bobboau, please check your code!
--Goober5000
2003-01-14 06:13:23 +00:00
Goober5000 43023ce714 commented out some mprintfs that were clogging up the debug spew
--Goober5000
2003-01-14 05:53:58 +00:00
Goober5000 ec4cd287bf fixed minor potential bug
--Goober5000
2003-01-14 04:01:33 +00:00
Goober5000 89d54e88db allowed for up to 256 main halls
--Goober5000
2003-01-14 04:00:16 +00:00
Goober5000 78976694ff bug hunting; fixed the beam whack effect bug
--Goober5000
2003-01-13 23:20:01 +00:00
wmcoolmon be8031165b Added MISSION_FLAG_NO_NEB_TRAILS and removed MISSION_FLAG_ST_OVERRIDE_NEB. Also changed code to set flags as necessary 2003-01-13 02:09:12 +00:00
wmcoolmon 68d003d185 Very slightly optimized code 2003-01-12 03:26:41 +00:00
wmcoolmon 0743bceed4 It turns out the version in the CVS did not toggle the ship trails with the flag...fixed this. 2003-01-12 00:19:55 +00:00
wmcoolmon e7d2f6bfee Added code for "Ship Trails override Nebula" 2003-01-11 01:00:25 +00:00
Goober5000 07ba05b7a6 I found these two beautiful functions in ship.cpp - ship_change_model
and change_ship_type - so I made them into sexps :)
--Goober5000
2003-01-10 04:14:19 +00:00
inquisitor 8ed007424b Rollback to 2.7 to fix glow code issue that phreak noticed.
-Quiz
2003-01-09 22:23:38 +00:00
phreak 1ec16a0dce fixed a small error in bob's glowmap code 2003-01-09 21:22:36 +00:00
phreak 531c34e48c fixed a small error in bob's code 2003-01-09 21:20:21 +00:00
phreak e4906d5051 glowmaps in OpenGL, yay! 2003-01-09 21:19:54 +00:00
phreak 290471b544 glowmaps unloaded if their parent is 2003-01-09 21:19:25 +00:00
Goober5000 81227d877a fixed the giant thruster glow bug
--Goober5000
2003-01-09 05:55:55 +00:00
Goober5000 4320767bc6 snagged a potential bug
--Goober5000
2003-01-09 05:52:25 +00:00
Goober5000 0ce01a077f fixed debriefing music in non-campaign missions
--Goober5000
2003-01-08 19:49:15 +00:00
Goober5000 4587aa1d8d added ai-chase-any-except sexp
--Goober5000
2003-01-07 20:06:44 +00:00
phreak 5541f13c99 fixed problem in win32_create_window() that disabled OpenGL from running in windowed mode 2003-01-07 00:02:08 +00:00
Goober5000 f56a7e8b8d implemented keep-safe-distance
--Goober5000
2003-01-06 22:57:23 +00:00
Goober5000 a9b917211c allowed fighters and bombers to accept the stay-near-ship and
keep-safe-distance orders
--Goober5000
2003-01-06 21:52:58 +00:00
Goober5000 bdb95b3655 nasssty bugs, we hates them, yesss we do, preciousssss
:)
--Goober5000
2003-01-06 20:29:28 +00:00
Goober5000 a67d462b4c cleaned up some stuff with model_set_thrust and a commented Assert that
shouldn't have been
--Goober5000
2003-01-06 19:33:22 +00:00
Goober5000 40e711e493 a wee failsafe added
--Goober5000
2003-01-06 18:50:37 +00:00
Goober5000 c3bf521a0b hmm... moved +Squad Logo to immediately beneath $Name
--Goober5000
2003-01-06 17:19:14 +00:00
Goober5000 3ef1984b40 added wing configurable squad logos - put +Squad Logo: filename.pcx as
the last entry in each wing that you want (but the player's squad logo will
still be the squad logo for the player's wing)
--Goober5000
2003-01-06 17:14:52 +00:00
bobboau 12f8b745d2 disabled decals (for now), removed the warp ray thingys,
made some better error mesages while parseing weapons and ships tbls,
and... oh ya, added glow mapping
2003-01-05 23:41:51 +00:00
Goober5000 30cf9c6ac4 added capability of is-iff and change-iff to have wings as well as ships
as their arguments; also allowed a bunch of sexps to accept the player
as an argument where they would previously display a parse error
--Goober5000
2003-01-05 01:26:35 +00:00
Goober5000 b8e5217739 fixed the order sexp
--Goober5000
2003-01-04 23:15:39 +00:00
Goober5000 b53761bbd4 Fixed some minor bugs, and added a primitive-sensors flag, where if a ship
has primitive sensors it can't target anything and objects don't appear
on radar if they're outside a certain range.  This range can be modified
via the sexp primitive-sensors-set-range.
--Goober5000
2003-01-03 21:58:08 +00:00
Goober5000 99d6040adc this is the way we squash the bugs, squash the bugs, squash the bugs
this is the way we squash the bugs, so early in the morning :p
--Goober5000
2003-01-02 03:09:01 +00:00
Goober5000 ab653af1d9 added don't-collide-invisible and collide-invisible sexps
--Goober5000
2003-01-02 00:35:21 +00:00
Goober5000 a17af66a44 added ship-vaporize and ship-no-vaporize sexps
--Goober5000
2003-01-01 23:33:34 +00:00
Goober5000 64ac1f20ca bumped to 3.4
--Goober5000
2002-12-31 20:09:14 +00:00
Goober5000 54ecd11df2 tweaked stuff
--Goober5000
2002-12-31 19:35:14 +00:00
Goober5000 f7eb18db90 if it ain't broke, don't fix it
--Goober5000
2002-12-31 19:18:41 +00:00
Goober5000 1e8f49d1ef if it ain't broke, don't fix it
--Goober5000
2002-12-31 18:59:43 +00:00
Goober5000 acefe1a8a9 simplified end-user implementation of ballistic primaries
--Goober5000
2002-12-31 08:20:31 +00:00
Goober5000 f01c0616a5 added damaged-escort-priority-all sexp
--Goober5000
2002-12-31 07:26:40 +00:00
Goober5000 04b3c2dae4 fixed escort list behavior for stealthy ships
--Goober5000
2002-12-31 05:17:13 +00:00
Goober5000 16d3193e9b made force feedback stronger when firing ballistic primaries
--Goober5000
2002-12-30 06:16:09 +00:00
phreak aff3972663 added damage-escort-list as a new sexp 2002-12-27 20:16:18 +00:00
Goober5000 1c73dc4cf9 the insidious beam bug is now squashed AND committed!
--Goober5000
2002-12-27 17:58:11 +00:00
Goober5000 ba5816809b removed the existing stealth sexps and replaced them with the following...
ship-stealthy
ship-unstealthy
is-ship-stealthy
friendly-stealth-invisible
friendly-stealth-visible
is-friendly-stealth-visible
--Goober5000
2002-12-27 02:57:51 +00:00
Goober5000 7ec35e1a28 meh - changed is-cargo-x to is-cargo
--Goober5000
2002-12-25 01:22:23 +00:00
Goober5000 b07017dfaf added change-ai-class and is-ai-class, and I think I may also have nailed the
is-iff bug; did some other bug hunting as well
--Goober5000
2002-12-24 07:42:29 +00:00
Goober5000 3cffeb1b7c added a wee cautionary note
--Goober5000
2002-12-24 07:38:59 +00:00
Goober5000 f9dd8f6bbc added set-cargo and is-cargo-x sexps
--Goober5000
2002-12-23 23:01:27 +00:00
phreak 8d6ef8f888 defined USE_OPENGL for debug and release builds 2002-12-23 21:13:41 +00:00
phreak 8931674cb7 dumb typo 2002-12-23 19:25:39 +00:00
phreak 59dba1bb95 added code that displays an error if user's OGL version is less than 1.2 2002-12-23 17:52:51 +00:00
Goober5000 77db458273 Bah - Andsager is a moron. :) I see no reason why rand shouldn't work
multiple times.  It's been fixed thus.
--Goober5000
2002-12-23 05:41:08 +00:00
Goober5000 fedebbd53a Squashed some Volition bugs! :O Some of the sexps for dealing with more than
one ship would return after only dealing with the first ship.

Also added the following sexps:
is-ship-stealthed
ship-force-stealth
ship-force-nostealth
ship-remove-stealth-forcing

They toggle the stealth flag on and off.  If a ship is forced stealthy, it won't even
show up for friendly ships.
--Goober5000
2002-12-23 05:18:52 +00:00
Goober5000 b03fc12235 removed stipulation that "Instructor" be present for training-msg sexp to work
--Goober5000

(This is fun! :))
2002-12-23 01:47:17 +00:00
Goober5000 2d141063b9 hack: turn on ship trails if in nebula - restores backward compatibility
--Goober5000
2002-12-22 22:59:04 +00:00
Goober5000 99dc4fda23 tweaked positioning of the new HUD graphics
--Goober5000
2002-12-22 21:31:01 +00:00
Goober5000 138c0c646c added primaries-depleted and primary-ammo-pct sexps -- useful for ships with
ballistic primaries
--Goober5000
2002-12-22 21:12:22 +00:00
Goober5000 4305d29efd Subcategories implemented. :) So far all that's been done is the Change menu, but other
subcategorizations are possible.  Here are the instructions from sexp.h...
"Adding more subcategories is possible with the new code.  All that needs to be done is
to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it
goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that
will return the subcategory for each sexp that uses it, and the submenu name in the
op_submenu[] array in sexp_tree.cpp."

Please note that I rearranged a whole bunch of sexps in the Operators[] array in sexp.cpp
in order to make the subcategories work better, so if you get a whole bunch of differences
or even conflicts, just ignore them. :)
--Goober5000
2002-12-22 17:22:47 +00:00
Goober5000 3427b62b65 commented out the warning if you don't have the new ballistic HUD graphics - it would probably get annoying (just use the old ones without comment)
--Goober5000
2002-12-21 18:03:49 +00:00
Goober5000 eb73f43a64 rearranged the sexp list and got the preliminary subcategories working - still need to work on the actual submenu
--Goober5000
2002-12-21 17:58:11 +00:00
DTP 6d7b143c5b did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe 2002-12-21 13:39:25 +00:00
Goober5000 aa0e29d421 Updated the cargo-known-delay and cap-subsys-cargo-known-delay sexps to work correctly if set-scanned and set-unscanned are used repeatedly with the same ship or ship subsystem. In most cases, this functionality will never be needed, but it's nice to know that it's here. :) However, I should point out that cap-subsys-cargo-known-delay will recognize only the first instance of a subsystem being revealed once the ship is no longer in the mission. Here is the relevant bit I put into the sexp handling routine...
"Since there is no way to keep track of subsystem status once a ship has departed or has been destroyed, check the mission log.  This will work in 99.9999999% of all cases; however, if the mission designer repeatedly sets and resets the scanned status of the subsystem, the mission log will only return the first occurrence of the subsystem cargo being revealed (regardless of whether it was first hidden using set-unscanned).  Normally, ships keep track of cargo data in the subsystem struct, but once/ the ship has left the mission, the subsystem linked list is purged, causing the loss of this information.  I judged the significant rework of the subsystem code not worth the rare instance that this sexp may be required to work in this way, especially since this problem only occurs after the ship departs.  If the mission designer really needs this functionality, he or she can achieve the same result with creative combinations of event chaining and is-event-true."

Please note that this problem only occurs with cap-subsys-cargo-known-delay, only if the subsystem scanned status is revealed more than once, and then only after the ship is no longer in the mission.  Sufficiently rare, I figured, that I could afford to not worry about it.
--Goober5000
2002-12-20 07:17:23 +00:00
Goober5000 19ae132431 added capability of storing time_subsys_cargo_revealed
--Goober5000
2002-12-20 07:09:03 +00:00
DTP eb8ee38f08 DTP FIX, fast fix to the beam/shield bug problem. will maybe commit later when i find out why this is getting triggered when it should not 2002-12-20 00:50:41 +00:00
Goober5000 dfd893af4f oops - squashed a bug :)
--Goober5000
2002-12-19 10:54:37 +00:00
Goober5000 31945881ef implemented the revised HUD weapon display for ballistic primaries
--Goober5000
2002-12-19 10:46:14 +00:00
phreak 8fedea6256 tidied up game_init() a bit.. took out a bunch of unneeded ifdefs like E3_BUILD
Added option to access OpenGL from the registry keys.  searches for "OpenGL-"
whoever is in charge of the launcher might want to know this.
2002-12-18 22:21:23 +00:00
Goober5000 af3f74d28f added set-scanned and set-unscanned sexps
PLEASE NOTE: These sexps will cause cargo-known-delay and cap-subsys-cargo-known-delay to not work correctly if set-scanned and set-unscanned are used more than once.  I'll fix this later.

--Goober5000
2002-12-17 03:25:30 +00:00
DTP 9a7d2e8e54 fix to Show_framerate. seems it will call an unresolved external error during fred builds. modified my ifndefs a bit, dsw modified to include preprocessor tag FRED. 2002-12-17 03:08:18 +00:00
DTP 039cff48ca wrong name :) 2002-12-17 02:22:34 +00:00
Goober5000 d99573079f cosmetic fixed; also OP_SET_SCANNED and OP_SET_UNSCANNED added in preparation for the set-scanned and set-unscanned sexp commit
--Goober5000
2002-12-17 02:21:42 +00:00
DTP f42b56fa94 cleaned up after Goober5000 :). it will make a mess in debug builds. added a couple of ifndef _debugs. 2002-12-17 02:21:06 +00:00
Goober5000 817f9a9741 added functionality and fixed a few things with cargo being revealed and hidden in preparation for the set-scanned and set-unscanned sexp commit
--Goober5000
2002-12-17 02:18:40 +00:00
DTP fe4c454d12 Bumped MAX JUMP-nodes to 50. if anybody wants a Jump-node forest 2002-12-17 01:56:36 +00:00
phreak 3f7f79c703 optimized fullscreen/minimized functions.. alot faster 2002-12-16 23:28:52 +00:00
DTP e778d90ad4 fixed a minor glitch, replaced <> with ", so that it takes project glXXX.h, and not compilers glXXX.h 2002-12-15 18:59:57 +00:00
phreak ac64d9a2ac opengl headers 2002-12-15 16:57:15 +00:00
DTP 2efd73e598 FIX; player can now have all ships set in FRED2 as allowed playerships in singleplayer 2002-12-15 06:50:49 +00:00
DTP d587bd16f4 Bumped fire_dealy on_empty_secondary to 1000 2002-12-15 06:29:24 +00:00
Goober5000 d2707c08a9 removed mission flag for fighterbay damage; instead made damage display contingent on whether the fighterbay subsystem is assigned a damage percentage in ships.tbl
--Goober5000
2002-12-14 17:09:28 +00:00
phreak 4c192bfdba added a command line that displays frames per second when enabled.
use "-fps"
2002-12-14 17:09:08 +00:00
phreak 50f78056c4 copied from grgpenglw32x.cpp. 2002-12-14 16:14:52 +00:00
Goober5000 1d04b8005e added mission flag to show subsystem damage for fighterbays
~Goober5000~
2002-12-14 01:55:04 +00:00
Goober5000 f9f73970b8 small tweaks and bug fixes for the ballistic primary conversion
~Goober5000~
2002-12-13 08:13:30 +00:00
Goober5000 b2ebdbf7cb added distance-ship-subsystem sexp
~Goober5000~
2002-12-12 08:01:57 +00:00
Goober5000 e2a757bbbe Full-fledged ballistic primary support added! Try it and see! :) 2002-12-10 05:43:35 +00:00
Goober5000 c2661d8d8d Full-fledged ballistic primary support added! Try it and see! :)
Fixed lead indicator behavior; Phreak's version didn't work properly.
2002-12-10 05:42:42 +00:00
Goober5000 83cb4c99ad Full-fledged ballistic primary support added! Try it and see! :)
Preliminary support added for selecting additional primaries (more than 2) and secondaries (more than 3) if this is implemented later.
Transports can now dock with fighters, bombers, & stealth ships.
2002-12-10 05:41:38 +00:00
DTP bb55e367ef DTP; added decals.h and decals.cpp to the project, aswell as the directory 2002-12-10 00:44:38 +00:00
Goober5000 9d9a89434a fixed misspelling 2002-12-09 08:37:31 +00:00
Goober5000 07f5493036 fixed misspelling 2002-12-09 08:26:24 +00:00
bobboau 2dbc7e5277 inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
it needs a better renderer, but is in prety good shape for now,
I also (think) I squashed a bug in the warpmodel code
2002-12-07 01:37:43 +00:00
phreak 083b43ee43 extension framework implemented(no extensions work YET) -phreak 2002-12-05 00:49:25 +00:00
DTP 6d9921f6c5 lowered MAX_POLYGON_MODELS FROM 198 to 128 for safety reasons since we bumped back MAX_SHIP_TYPES to 130 2002-12-04 09:44:34 +00:00
Goober5000 5600370231 implemented beam-free-all-by-default mission flag 2002-12-03 23:05:13 +00:00
Goober5000 3c31b5236c added myself to the credits list :)
~Goober5000
2002-12-03 22:14:06 +00:00
Goober5000 5131e7dcd8 fixed player-entry-delay bug 2002-12-03 00:00:52 +00:00
Goober5000 e6118e84fc fixed misspelling 2002-12-02 23:56:12 +00:00
Goober5000 49e1f9cfbe fixed misspelling 2002-12-02 23:26:08 +00:00
Goober5000 cbda9dde96 fixed misspelling of "category" as "catagory" 2002-12-02 23:24:35 +00:00
Goober5000 4b7700f317 commented out an unneeded variable (int ret) in psnet_socket_options 2002-12-02 23:18:53 +00:00
Goober5000 88011c314a commented out an unneeded variable (ship *shipp) in model_really_render 2002-12-02 23:16:45 +00:00
Goober5000 9ed133d2f0 fixed mispelling of "category" as "catagory" 2002-12-02 23:14:17 +00:00
Goober5000 1548da9bfb fixed mispelling of "category" as "catagory" 2002-12-02 20:49:14 +00:00
Goober5000 64a26aaa81 fixed mispelling of "category" as "catagory" 2002-12-02 20:37:26 +00:00
sesquipedalian f8a99ca19c end-mission sexp added 2002-11-28 00:00:37 +00:00
sesquipedalian d91b827f0e Added Phreak's fix for the weapons room bug. Can now view a modified weapons.tbl in the tech room without crashing 2002-11-27 01:20:51 +00:00
phreak dac9ebfba6 added OGL_inited global. Sets to 0 even if OGL isn't defined by preproccessor
-phreak
2002-11-22 20:56:15 +00:00
phreak 2913b030b7 changed around some page-in functions to work with opengl
changed bm_set_components_opengl
-phreak
2002-11-22 20:55:27 +00:00
phreak 832191512c finished off all remaining problems with 32 bit mode, fullscreen mode
and colors.  Still needs some tweaking, but works near perfect
2002-11-22 20:54:16 +00:00
phreak 24545765bc added some opengl defines for shield detail -phreak 2002-11-22 20:52:29 +00:00
DTP 5e1b9b2133 DTP; fix at line 6785 in parse/SEXP.cpp, a forgotten "{", when the is tagged thing was Fixed 2002-11-20 21:22:31 +00:00
sesquipedalian 14bc599f38 Adding in EdrickV's fix to the is-tagged sexp. 2002-11-19 02:15:50 +00:00
phreak 78ffd21eee made ogl be used if "NDEBUG" is not defined and "USE_OPENGL" is defined - phreak 2002-11-18 21:34:16 +00:00
phreak ea6fadcd11 added some lines that makes ogl work in windowed mode for fullneb - phreak 2002-11-18 21:32:48 +00:00
phreak 912c0e7c3b added some ogl functionality - phreak 2002-11-18 21:32:11 +00:00
phreak c13bfa5487 complete overhaul, works in 16 bit mode -phreak 2002-11-18 21:31:36 +00:00
phreak 21dec76efd added bm_select_components functions for OpenGL -phreak 2002-11-18 21:27:13 +00:00
bobboau 1534138f83 added nameplate code 2002-11-14 06:15:03 +00:00
bobboau 0a93058abc added warp model and type 1 glow points
and well as made the new glow file type,
some general improvement to fighter beams,
2002-11-14 04:18:17 +00:00
phreak 40a131bf76 updated parse_weapon to parse custom corkscrew missiles 2002-11-11 20:18:30 +00:00
phreak 1781459b96 changed around the 'weapon_info' struct to allow for custom corkscrew missiles 2002-11-11 20:11:02 +00:00
phreak 2a78be3257 changed cscrew_create and cscrew_process_post
to allow for custom corkscrew properties
2002-11-11 20:09:12 +00:00
phreak 30b04bd204 changed a line in ship_fire_secondary to allow for custom
amounts of corkscrew missiles fired
2002-11-11 20:05:52 +00:00
inquisitor 311ef3c714 Bumped to 3.3 2002-11-10 20:40:02 +00:00
DTP 1000fddaab DTP bumped back MAX_SHIP_TYPES to 130 2002-11-10 19:57:36 +00:00
DTP 4996d146a8 -DTP reworked mod support, 2002-11-10 16:32:42 +00:00
DTP d0008ffd9f -DTP reworked mod support, 2002-11-10 16:30:53 +00:00
phreak 918e20b198 Parser error handling for fighter flak, it didn't want flak on player weapons, now it doesn't care 2002-11-06 23:22:05 +00:00
phreak 552f0e6c8a Fighter flak code, it doesn't blow up in your face anymore! 2002-11-06 23:21:06 +00:00
DTP 391e276e91 Made sure, that VP and Plain files dont get added twice to the search order. Side-effect of Mod support. 2002-11-04 08:32:38 +00:00
DTP ec8c500c08 DOh,uhmm, define error again, this is getting to me. 2002-11-02 23:06:59 +00:00
DTP 9281b5e6c6 DOh, fixed that define, learn to count DTP :) 2002-11-02 23:04:46 +00:00
inquisitor 9184437b10 Cleaned up the presentation a little, added HLP and VW, and, no offense to Kazan, removed Kazan. 2002-11-02 22:25:26 +00:00
DTP 9f6c744f30 DOH forgot \n 2002-11-02 22:11:35 +00:00
DTP 7fc5878f43 shameless self promotion 2002-11-02 22:10:48 +00:00
DTP 4d9c673c4a DTP Bumped Max_exited_ships from 200 to double that of MAX_SHIPS = 800 . make sense ehh. for logging effect. 2002-10-31 21:56:44 +00:00
DTP ec9427a8e2 DTP Quickly added something needed to cmdline.h, since otherwise we can not compile the code as it misses some externals. Thought a rollback rolled all back. 2002-10-31 21:14:16 +00:00
penguin 61a205f03a Hopelessly out of date, and only applied to Linux anyhow 2002-10-31 03:49:35 +00:00
penguin 00ff020052 updated 2002-10-31 03:46:27 +00:00
inquisitor af917b66d2 Bad Committ, Rolling back 2002-10-30 20:22:30 +00:00
DTP 32d1ba73b0 doh!, used upper case in include, dont know how much it matters for *nix systems, but here it is 2002-10-30 06:31:05 +00:00
DTP bd40aee5f6 DTP Implemented basic VP files handling. mission and campaign files inside VP files found in mod dir still not supported, cheking / creating directories not implented either 2002-10-30 06:26:11 +00:00
sesquipedalian 21a3a8cb1e no message 2002-10-29 22:41:48 +00:00
DTP 7ae9f0d805 Crap, somebody may restore cmdline.h to 2 version before this. 2002-10-28 02:28:52 +00:00
DTP 4704315480 DTP; started basic implementation of mod-support
plain files only for now. fs2_open.exe -mod X will look for files in fs2/ X /all-legal-subdirectories. no checking/creating dirs yet. directories must be there.
2002-10-27 23:59:28 +00:00
randomtiger afe941612f Made Phreaks alternative scanning style optional under the command line tag "-phreak"
Fixed bug that changes HUD colour when targetting debris in a full nebula. - RT
2002-10-22 23:02:40 +00:00
randomtiger fc4eceb11b Fixed lighting bug that caused special pause to crash on debug build.
Also added TAB functionality for special pause that toggles HUD. - RT
2002-10-22 17:42:09 +00:00
bobboau c4c099ac0b inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam sheild hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry 2002-10-19 19:29:29 +00:00
randomtiger b5105fa8c2 Added special pause mode for easier action screenshots.
Added new command line parameter for accessing all single missions in tech room. - RT
2002-10-19 03:50:29 +00:00
randomtiger 2ca7e10af9 Added ability to remove HUD ingame on keypress shift O
So I've added a new key to the bind list and made use of already existing hud removal code.
2002-10-17 20:40:51 +00:00
phreak 408e85dff6 screenshots, yay! 2002-10-14 19:49:08 +00:00
phreak b1274d2b58 further optimizations 2002-10-13 21:43:24 +00:00
phreak 69661089ca fixed text 2002-10-12 17:48:11 +00:00
phreak 26998eb80c dont use this one 2002-10-11 21:35:51 +00:00
phreak 32ce4b8718 first run at opengl for w32, only useful in main hall, barracks and campaign room 2002-10-11 21:31:17 +00:00
randomtiger 7cd2d35891 Added us fs2_open people to the credits. Worth looking at just for that.
Added timer bar code, by default its not compiled in.
Use TIMEBAR_ACTIVE in project and dependancy code settings to activate.
Added the new timebar files with the new code.
2002-10-05 16:46:10 +00:00
phreak 10f395b570 did glare stuff in game_sunspot_process() 2002-09-20 20:09:01 +00:00
phreak 59deec97d1 glare parser stuff in stars_init() 2002-09-20 20:05:29 +00:00
phreak 9bac9a3c32 added glare variable for ambient suns
if glare is 0 then the sun glare whiteout is not shown when looking at the sun
2002-09-20 20:04:54 +00:00
phreak fadea4253c lead indicator for dumbfire missiles 2002-09-20 20:02:00 +00:00
phreak 0a8251c060 extra effects during cargo scan 2002-09-20 20:01:30 +00:00
randomtiger d058c0ed5b Tiny change to DX branch to keep movie code optional (default off) 2002-08-28 21:47:02 +00:00
randomtiger 315b852604 Woh! I sure as hell didnt modify all these files it says I did.
I will put this down to the branch! Note: I did start from a fresh checkout!
2002-08-28 10:51:04 +00:00
penguin 0678516880 Moved DirectX8 stuff to directx8 branch; reverted to previous 2002-08-27 13:38:58 +00:00
randomtiger a0891d9240 Added new lib files: strmiids and ddraw to get dshow working
Added new command line parameter to active direct show movie play: -dshowvid
Uncommented movie_play calls and includes
2002-08-18 19:48:29 +00:00
penguin 41d83bd1b2 Added #include, needed for FRED 2002-08-15 04:41:17 +00:00
penguin cf3bca8876 updated 2002-08-13 04:31:25 +00:00
penguin 864adcea2f 1. Disable CD checking
2. Add CVS tag to version string
2002-08-13 03:34:00 +00:00
penguin bdc565d380 Bumped to version 3.2 2002-08-13 03:32:25 +00:00
DTP f773219f91 Implented -GF4FIX commandline switch & #include "cmdline/cmdline.h" 2002-08-07 00:45:25 +00:00
DTP c8e6a4363e Implented -GF4FIX commandline switch 2002-08-07 00:44:13 +00:00
penguin f91f37c9df Updated 2002-08-06 21:21:42 +00:00
phreak 1a153fa6f5 added wireframe targetbox feature 2002-08-06 16:50:44 +00:00
phreak 5becd6b823 added Targetbox_wire variable to check what mode the
hud targetbox uses
2002-08-06 16:50:13 +00:00
phreak 188003ab91 added keybing for wireframe hud,
fixed previous missile cheat
2002-08-06 16:49:22 +00:00
penguin 7d3f9305df Use text strings for wingmen names instead of ANI 2002-08-06 04:39:26 +00:00
penguin c19eda4302 inserted "class" keyword on "friend" definitions (ANSI C++ ) 2002-08-06 03:50:48 +00:00
penguin 142154e162 Fixed problem w/ compile options for Debug mode 2002-08-06 02:43:02 +00:00
penguin c65c35bd15 Removed a couple more include dirs I missed 2002-08-06 01:49:47 +00:00
penguin 42177e22ba Renamed ccode members to cc_or and cc_and 2002-08-06 01:49:08 +00:00
penguin 0b00270cb8 Moved ChangeLog to top-level directory 2002-08-04 05:43:13 +00:00
penguin a7544c679a Change version display 2002-08-04 05:13:00 +00:00
penguin e884bc0e68 Display fs2_open version instead of "Freespace 2" 2002-08-04 05:12:42 +00:00
penguin e18b0827f7 Change version display location 2002-08-04 05:12:10 +00:00
penguin bf8447be42 Update version number to 3.1 2002-08-04 05:11:36 +00:00
penguin c610326295 Don't write version to registry; change way version string is formatted 2002-08-04 05:11:05 +00:00
randomtiger d7e1c53bd5 Fixed Geforce 4 bug that caused font and hall video distortion.
Very small change in 'gr_d3d_aabitmap_ex_internal'

Tested and works on the following systems

OUTSIDER Voodoo 3 win98
OUTSIDER Geforce 2 win2000
Me Geforce 4 PNY 4600 XP
JBX-Phoenix Geforce 4 PNY XP
Mehrunes GeForce 3 XP
WMCoolmon nVidia TNT2 M64 win2000
Orange GeForce 4 4200 XP
ShadowWolf_IH Monster2 win98
ShadowWolf_IH voodoo 2 win98
2002-08-03 19:42:17 +00:00
wmcoolmon 8c7658a934 Fixed Win32 debug configuration 2002-08-03 18:35:21 +00:00
wmcoolmon 3a86cd0576 Sync with makefile 1.4 2002-08-03 17:42:40 +00:00
penguin 82d4e6f42b updated 2002-08-01 04:04:01 +00:00
penguin 462b5c2576 The big include file move 2002-08-01 02:00:46 +00:00
penguin 0c503be8d1 The big include file move 2002-08-01 01:41:11 +00:00
wmcoolmon 72a1ee3ab1 Fixed a bug I added in ship_do_rearm_frame 2002-07-30 18:11:25 +00:00
wmcoolmon fdb748d0f5 Modified to add hull repair capabilities and toggling of them via a mission flag, MISSION_FLAG_SUPPORT_REPAIRS_HULL 2002-07-30 17:57:40 +00:00
wmcoolmon b355211cfe Added mission flag "MISSION_FLAG_SUPPORT_REPAIRS_HULL" for toggling Support Ship hull repair on and off 2002-07-30 17:35:22 +00:00
unknownplayer d8c81cd2a3 Started work on DX8.1 implementation. Updated the project files to encompass
the new files. Disable the compiler tag to use old DX code (THERE IS NO
NEW CODE YET!)
2002-07-30 14:29:15 +00:00
penguin c496dd29a5 Added Network/fs2ox.cpp 2002-07-29 22:24:57 +00:00
penguin caaf1172a6 First attempt at "fs2_open exchange" (PXO substitute) screen 2002-07-29 22:24:26 +00:00
penguin eaf2dbb75b We finally have a ChangeLog 2002-07-29 22:14:48 +00:00
penguin eee99b1a5f Moved extern declaration of ssm_create outside of block (it wouldn't compile w/ gcc) 2002-07-29 20:48:51 +00:00
penguin b9e9036d2c added #ifdef _WIN32 around windows-specific system headers 2002-07-29 20:12:31 +00:00
penguin 15e0ba365f removed bogus #include windows.h 2002-07-29 20:12:02 +00:00
penguin 8af02282c5 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:52:48 +00:00
penguin 478e9d7461 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:37:21 +00:00
penguin 41422e2e83 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:17:21 +00:00
penguin 69e2d92570 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:04:48 +00:00
DTP 92640cdc73 Forgot to Bump MAX_MODEL_SUBSYSTEMS from 128 to 200 2002-07-29 08:31:52 +00:00
DTP 22d3bddd00 BUMPED MAX_POLYGON_MODELS TO 198 , MAX_SHIP_TYPES - 2 = 198 2002-07-29 08:28:00 +00:00
DTP 7d9405df1f Bumped all MAX_SHIPS, and SHIP_LIMIT to 400.(let the mission designers decide what is good, and what is bad 2002-07-29 08:24:42 +00:00
DTP b667544505 Bumped MAX_SHIP_SUBOBJECTS to 2100(2100 /(average fighter has 7 subsystems) = 400 fighters 2002-07-29 08:22:42 +00:00
DTP 14e5fa9759 Bumped MAX_SUBSYS_LIST from 32 to 200 2002-07-29 08:19:41 +00:00
DTP c44f0100d0 -almission(autoload mission) commandline arguement handling implemented 2002-07-29 08:05:20 +00:00
DTP c4ee5bec33 FIX; Startgame arguement dont go ahead when a singleplayer pilot is selected 2002-07-29 07:56:10 +00:00
DTP 7e1ab3fe34 added -almission commandline arguement, will autoload mission i.e fs2_open.exe -almission kickass will autoload kickass.fs2 which should be a multiplayer mission. 2002-07-29 06:35:15 +00:00
DTP 0355ac71b3 FIX -stargame commandline arguement will now let you quit, a thing not possible before when using the startgame arguement 2002-07-28 15:07:43 +00:00
penguin 91d6d5f835 Testing commit as penguin 2002-07-26 18:02:33 +00:00
penguin 7ab0f6ba11 renamed 'big' and 'small' (conflict w/ MS include file) 2002-07-26 16:17:46 +00:00
penguin f1252fce9a fixed bug where winsock.h wasn't defined 2002-07-26 16:12:05 +00:00
wmcoolmon e0bf60b559 Added Bobboau's beam tiling code 2002-07-26 03:11:24 +00:00
wmcoolmon 34119582f2 Added Bobboau's fighter-beam code. 2002-07-25 04:50:48 +00:00
penguin 0910c540f5 Added ifndef NO_STANDALONE 2002-07-22 01:39:24 +00:00
penguin 48f4b0e5d6 Stub defines for NO_SOUND 2002-07-22 01:37:24 +00:00
penguin 72db48921a Linux port -- added NO_STANDALONE ifdefs 2002-07-22 01:22:26 +00:00
penguin 5083ae69c1 Made more compatible w/ Win32; defines for NO_SOUND, NO_JOYSTICK, NO_NETWORK 2002-07-22 01:14:09 +00:00
penguin 3482678e04 Moved the dummy "sound" definitions to main program (freespace.cpp) 2002-07-22 01:10:10 +00:00
penguin bacd2d62c1 More defines for winsock compatibility 2002-07-22 01:06:04 +00:00
penguin 5fdc6764e4 took out GAME_CD_CHECK define 2002-07-22 01:04:37 +00:00
DTP 707b284cb5 Bumped Max Shield Icons to 80 2002-07-20 23:51:59 +00:00
DTP 2517536169 Fixed multiplayer music. succes music on all Primary goals complete, fail music
if otherwise
2002-07-20 23:50:53 +00:00
DTP 84ba4e2d0c Fixed Secondary bank bug, where next valid secondary bank inherits current
valid banks FULL fire delay
2002-07-20 23:49:46 +00:00
DTP 0b44cd0f05 bumped MAX_MISSION_TEXT to 1000000 in code/parse/parselo.h 2002-07-20 19:21:13 +00:00
penguin b0e1aac704 Fixed bug (potential access of unitialized pointer) in hud_config_render_gauges() -- thanks to DTP for finding it! 2002-07-18 20:07:49 +00:00
unknownplayer 8235f563c9 no message 2002-07-18 14:36:53 +00:00
unknownplayer 4e401fa68e Revised AI primary selection code again to be more intelligent. 2002-07-18 09:55:26 +00:00
unknownplayer 6a015b9a1d Rewrote my original algorithm to search by proportional hull damage.
Does the same thing a little better.
2002-07-18 05:38:28 +00:00
unknownplayer e32babefe9 Fixed AI problems with using the maxim on fighters. 2002-07-18 03:27:38 +00:00
unknownplayer c9ef8fe12d Added some commentry to the low detail shield function. 2002-07-18 03:26:35 +00:00
unknownplayer 577c232559 no message 2002-07-18 03:25:10 +00:00
unknownplayer e520244a2f Altered project files to properly build debug info. Should save you all some time. 2002-07-17 23:59:56 +00:00
unknownplayer ffdc5a768c Minor commenting added to two functions. 2002-07-17 23:58:46 +00:00
wmcoolmon 1cdcfc1503 Added SSM code for Tag C from Bobboau. Note that strings.tbl may need to be updated. 2002-07-17 20:04:00 +00:00
unknownplayer ec6d9d4485 Added a custom build step to copy to c:\games\freespace2\fs2_open.exe
when you build.
2002-07-17 12:52:01 +00:00
unknownplayer 65dff673a4 Updated to enable compilation under MSVC++ - all changes are marked
with my name ##UnknownPlayer##
2002-07-16 14:39:16 +00:00
unknownplayer 0ed7df259f This is the code project file. Use the workspace file I included to get at this. 2002-07-16 14:37:51 +00:00
unknownplayer 25db1467ef This is the workspace for freespace2.dsp - it contains everything needed to
compile fs2_open.exe
2002-07-16 14:37:09 +00:00
unknownplayer 65c8d2f9af This is the project file to compile fs2_open. It's a real project file - use the
workspace though
2002-07-16 14:36:30 +00:00
penguin a05f76f579 Changed so that debug make debug and release makes release :) 2002-07-16 01:15:59 +00:00
penguin 596092b9ef Commented out "fs2_open.dep" stuff 2002-07-16 01:15:15 +00:00
inquisitor 2be4c8a0ef Visual Studio files
compiles fs2_open.exe - 0 error(s), 7 warning(s)
2002-07-15 22:36:08 +00:00
wmcoolmon 51b3c691d9 Added support for toggling ship trails 2002-07-15 02:11:00 +00:00
wmcoolmon e0976a005f Added initial code for "ship-lights-on" and "ship-lights-off" SEXPs 2002-07-13 09:16:18 +00:00
penguin 42117df4fe Added flags2 (ran out of bits in flags!) to ship struct; bit 0 will be used
to toggle Bobboau's lights.
2002-07-12 16:59:04 +00:00
penguin 74fff521b8 Removed dummy include file 2002-07-12 02:56:07 +00:00
penguin 12da216e48 Fixed endian-ness of new "GLOW" IDs 2002-07-12 02:44:18 +00:00
wmcoolmon c53db880a8 Added Bobboau's glow code; all comments include "-Bobboau" 2002-07-10 18:42:14 +00:00
penguin 3463682f1a Back-port to MSVC 2002-07-07 19:56:00 +00:00
penguin e945f679ed Makefile for Microsoft Visual C++ 2002-07-07 19:49:42 +00:00
penguin 97cb77ba5f Added machine-independent version of MulDiv (in case we don't know
the processor type)
2002-06-04 06:38:21 +00:00
penguin 596e6adfdd Minor changes 2002-06-03 05:03:45 +00:00
penguin 1988cb0eef Initial revision 2002-06-03 04:34:38 +00:00
penguin 8f92eebd34 Warpcore CVS sync 2002-06-03 04:10:40 +00:00
penguin b8d8c68dc7 Dummy include file 2002-06-03 04:08:13 +00:00
penguin ad911724e9 Warpcore CVS sync 2002-06-03 03:55:40 +00:00
penguin 663b3471b9 Volition sources -- warpcore CVS import 2002-06-03 03:26:03 +00:00
1090 changed files with 251484 additions and 71102 deletions

No files matched your search

View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
+9 -7
View File
@@ -12,16 +12,18 @@ Win32-MinGW:
Linux and other unix variants (NOT YET COMPLETE)
./configure [options] (options tbd)
make -f makefile.linux
./configure [options]
make
=== for the project maintainers (people who need to
=== keep the makefiles up to date):
=== keep the makefiles up to date) and those building
=== from CVS:
aclocal
autoconf
automake
./configure
./autogen.sh (should only has to be done once)
./configure [options]
make
automake v1.6.1+ and
autoconf v2.54+ are required
+12 -3
View File
@@ -2,7 +2,7 @@
#
# This file uses GNU Automake to generate makefiles
SUBDIRS = libjpeg code
SUBDIRS = libjpeg lua code
EXTRA_DIST = \
@@ -10,13 +10,22 @@ EXTRA_DIST = \
projects/MSVC_2005/Freespace2.sln \
projects/MSVC_2005/Freespace2.vcproj \
projects/MSVC_2005/code.vcproj \
projects/MSVC_6/Fred2.dsp \
projects/MSVC_6/Freespace2.dsp \
projects/MSVC_6/Freespace2.dsw \
projects/MSVC_6/code.dsp \
projects/MSVC_6/libjpeg.dsp \
projects/MSVC_6/liblua.dsp \
projects/MSVC_6/wxFRED2.dsp \
projects/anjuta1/FS2_Open.prj \
projects/anjuta1/README
projects/Xcode/English.lproj/InfoPlist.strings \
projects/Xcode/FS2_Open.icns \
projects/Xcode/FS2_Open.xcodeproj/project.pbxproj \
projects/Xcode/Frameworks.tgz \
projects/Xcode/Info-debug.plist \
projects/Xcode/Info.plist \
projects/Xcode/README.Xcode \
projects/Xcode/SDLMain.h \
projects/Xcode/SDLMain.m
# D_ variants are defaults and should always be used
View File
File renamed without changes.
View File
File renamed without changes.
+332
View File
@@ -380,3 +380,335 @@ AC_DEFUN([AM_PATH_WXCONFIG],
AC_SUBST(WX_LIBS_STATIC)
AC_SUBST(WX_VERSION)
])
# Configure paths for libogg
# Jack Moffitt <[email protected]> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
if test "x$ogg_libraries" != "x" ; then
OGG_LIBS="-L$ogg_libraries"
elif test "x$ogg_prefix" != "x" ; then
OGG_LIBS="-L$ogg_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
OGG_LIBS="-L$libdir"
fi
OGG_LIBS="$OGG_LIBS -logg"
if test "x$ogg_includes" != "x" ; then
OGG_CFLAGS="-I$ogg_includes"
elif test "x$ogg_prefix" != "x" ; then
OGG_CFLAGS="-I$ogg_prefix/include"
elif test "x$prefix" != "xNONE"; then
OGG_CFLAGS=""
fi
AC_MSG_CHECKING(for Ogg)
no_ogg=""
if test "x$enable_oggtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>
int main ()
{
system("touch conf.oggtest");
return 0;
}
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_ogg" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.oggtest ; then
:
else
echo "*** Could not run Ogg test program, checking why..."
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <ogg/ogg.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
echo "*** or that you have moved Ogg since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OGG_CFLAGS=""
OGG_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OGG_CFLAGS)
AC_SUBST(OGG_LIBS)
rm -f conf.oggtest
])
# Configure paths for libvorbis
# Jack Moffitt <[email protected]> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
dnl
AC_DEFUN([XIPH_PATH_VORBIS],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
if test "x$vorbis_libraries" != "x" ; then
VORBIS_LIBS="-L$vorbis_libraries"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_LIBS="-L$vorbis_prefix/lib"
elif test "x$prefix" != "xNONE"; then
VORBIS_LIBS="-L$libdir"
fi
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
VORBISFILE_LIBS="-lvorbisfile"
VORBISENC_LIBS="-lvorbisenc"
if test "x$vorbis_includes" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_includes"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_prefix/include"
elif test "x$prefix" != "xNONE"; then
VORBIS_CFLAGS=""
fi
AC_MSG_CHECKING(for Vorbis)
no_vorbis=""
if test "x$enable_vorbistest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Vorbis is sufficiently new.
dnl
rm -f conf.vorbistest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
int main ()
{
vorbis_block vb;
vorbis_dsp_state vd;
vorbis_info vi;
vorbis_info_init (&vi);
vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
vorbis_analysis_init (&vd, &vi);
vorbis_block_init (&vd, &vb);
/* this function was added in 1.0rc3, so this is what we're testing for */
vorbis_bitrate_addblock (&vb);
system("touch conf.vorbistest");
return 0;
}
],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_vorbis" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.vorbistest ; then
:
else
echo "*** Could not run Vorbis test program, checking why..."
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <vorbis/codec.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
echo "*** or that you have moved Vorbis since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
VORBIS_CFLAGS=""
VORBIS_LIBS=""
VORBISFILE_LIBS=""
VORBISENC_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(VORBIS_CFLAGS)
AC_SUBST(VORBIS_LIBS)
AC_SUBST(VORBISFILE_LIBS)
AC_SUBST(VORBISENC_LIBS)
rm -f conf.vorbistest
])
dnl XIPH_PATH_THEORA([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libtheora, and define THEORA_CFLAGS and THEORA_LIBS
dnl
AC_DEFUN([XIPH_PATH_THEORA],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(theora,[ --with-theora=PFX Prefix where libtheora is installed (optional)], theora_prefix="$withval", theora_prefix="")
AC_ARG_WITH(theora-libraries,[ --with-theora-libraries=DIR Directory where libtheora library is installed (optional)], theora_libraries="$withval", theora_libraries="")
AC_ARG_WITH(theora-includes,[ --with-theora-includes=DIR Directory where libtheora header files are installed (optional)], theora_includes="$withval", theora_includes="")
AC_ARG_ENABLE(theoratest, [ --disable-theoratest Do not try to compile and run a test Theora program],, enable_theoratest=yes)
if test "x$theora_libraries" != "x" ; then
THEORA_LIBS="-L$theora_libraries"
elif test "x$theora_prefix" != "x" ; then
THEORA_LIBS="-L$theora_prefix/lib"
elif test "x$prefix" != "xNONE"; then
THEORA_LIBS="-L$libdir"
fi
THEORA_LIBS="$THEORA_LIBS -ltheora"
if test "x$theora_includes" != "x" ; then
THEORA_CFLAGS="-I$theora_includes"
elif test "x$theora_prefix" != "x" ; then
THEORA_CFLAGS="-I$theora_prefix/include"
elif test "x$prefix" != "xNONE"; then
THEORA_CFLAGS=""
fi
AC_MSG_CHECKING(for Theora)
no_theora=""
if test "x$enable_theoratest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $THEORA_CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $THEORA_LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Theora is sufficiently new.
dnl
rm -f conf.theoratest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <theora/theora.h>
#include <vorbis/codec.h>
int main ()
{
theora_info ti;
theora_state ts;
theora_info_init(&ti);
system("touch conf.theoratest");
return 0;
}
],, no_theora=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_theora" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.theoratest ; then
:
else
echo "*** Could not run Theora test program, checking why..."
CFLAGS="$CFLAGS $THEORA_CFLAGS"
LIBS="$LIBS $THEORA_LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <vorbis/codec.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Theora or finding the wrong"
echo "*** version of Theora. If it is not finding Theora, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Theora was incorrectly installed"
echo "*** or that you have moved Theora since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
THEORA_CFLAGS=""
THEORA_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(THEORA_CFLAGS)
AC_SUBST(THEORA_LIBS)
rm -f conf.theoratest
])
View File
File renamed without changes.
+245 -55
View File
@@ -1,6 +1,6 @@
## code/Makefile.am for fs2_open
##
## $Id: Makefile.am,v 1.20 2005-07-18 03:37:35 taylor Exp $
## $Id: Makefile.am,v 1.31.2.10 2007-11-22 04:52:12 taylor Exp $
EXTRA_DIST = \
@@ -12,13 +12,180 @@ EXTRA_DIST = \
freespace2/goal_inc.bmp \
freespace2/goal_none.bmp \
freespace2/goal_ord.bmp \
wxfred2/res/FRED.ico \
fred2/addvariabledlg.cpp \
fred2/addvariabledlg.h \
fred2/adjustgriddlg.cpp \
fred2/adjustgriddlg.h \
fred2/asteroideditordlg.cpp \
fred2/asteroideditordlg.h \
fred2/bgbitmapdlg.cpp \
fred2/bgbitmapdlg.h \
fred2/briefingeditordlg.cpp \
fred2/briefingeditordlg.h \
fred2/campaigneditordlg.cpp \
fred2/campaigneditordlg.h \
fred2/campaignfilelistbox.cpp \
fred2/campaignfilelistbox.h \
fred2/campaigntreeview.cpp \
fred2/campaigntreeview.h \
fred2/campaigntreewnd.cpp \
fred2/campaigntreewnd.h \
fred2/cmdbrief.cpp \
fred2/cmdbrief.h \
fred2/createwingdlg.cpp \
fred2/createwingdlg.h \
fred2/customwingnames.cpp \
fred2/customwingnames.h \
fred2/debriefingeditordlg.cpp \
fred2/debriefingeditordlg.h \
fred2/dialog1.cpp \
fred2/dialog1.h \
fred2/dumpstats.cpp \
fred2/dumpstats.h \
fred2/editor.h \
fred2/eventeditor.cpp \
fred2/eventeditor.h \
fred2/folderdlg.cpp \
fred2/folderdlg.h \
fred2/fred.cpp \
fred2/fred.h \
fred2/fred.rc \
fred2/freddoc.cpp \
fred2/freddoc.h \
fred2/fredrender.cpp \
fred2/fredrender.h \
fred2/fredstubs.cpp \
fred2/fredview.cpp \
fred2/fredview.h \
fred2/grid.cpp \
fred2/grid.h \
fred2/ignoreordersdlg.cpp \
fred2/ignoreordersdlg.h \
fred2/initialships.cpp \
fred2/initialships.h \
fred2/initialstatus.cpp \
fred2/initialstatus.h \
fred2/mainfrm.cpp \
fred2/mainfrm.h \
fred2/makehelp.bat \
fred2/management.cpp \
fred2/management.h \
fred2/messageeditordlg.cpp \
fred2/messageeditordlg.h \
fred2/missiongoalsdlg.cpp \
fred2/missiongoalsdlg.h \
fred2/missionnotesdlg.cpp \
fred2/missionnotesdlg.h \
fred2/missionsave.cpp \
fred2/missionsave.h \
fred2/modifyvariabledlg.cpp \
fred2/modifyvariabledlg.h \
fred2/operatorargtypeselect.cpp \
fred2/operatorargtypeselect.h \
fred2/orienteditor.cpp \
fred2/orienteditor.h \
fred2/playerstarteditor.cpp \
fred2/playerstarteditor.h \
fred2/prefsdlg.cpp \
fred2/prefsdlg.h \
fred2/reinforcementeditordlg.cpp \
fred2/reinforcementeditordlg.h \
fred2/resource.h \
fred2/resource.hm \
fred2/setglobalshipflags.cpp \
fred2/setglobalshipflags.h \
fred2/sexp_tree.cpp \
fred2/sexp_tree.h \
fred2/shieldsysdlg.cpp \
fred2/shieldsysdlg.h \
fred2/ship_select.cpp \
fred2/ship_select.h \
fred2/shipchecklistbox.cpp \
fred2/shipchecklistbox.h \
fred2/shipclasseditordlg.cpp \
fred2/shipclasseditordlg.h \
fred2/shipeditordlg.cpp \
fred2/shipeditordlg.h \
fred2/shipflagsdlg.cpp \
fred2/shipflagsdlg.h \
fred2/shipgoalsdlg.cpp \
fred2/shipgoalsdlg.h \
fred2/shipspecialdamage.cpp \
fred2/shipspecialdamage.h \
fred2/shipspecialhitpoints.cpp \
fred2/shipspecialhitpoints.h \
fred2/shiptexturesdlg.cpp \
fred2/shiptexturesdlg.h \
fred2/starfieldeditor.cpp \
fred2/starfieldeditor.h \
fred2/stdafx.cpp \
fred2/stdafx.h \
fred2/textviewdlg.cpp \
fred2/textviewdlg.h \
fred2/voiceactingmanager.cpp \
fred2/voiceactingmanager.h \
fred2/waypointpathdlg.cpp \
fred2/waypointpathdlg.h \
fred2/weaponeditordlg.cpp \
fred2/weaponeditordlg.h \
fred2/wing.cpp \
fred2/wing.h \
fred2/wing_editor.cpp \
fred2/wing_editor.h \
fred2/hlp/afxcore.rtf \
fred2/hlp/afxhelp.hm \
fred2/hlp/afxprint.rtf \
fred2/hlp/appexit.bmp \
fred2/hlp/bullet.bmp \
fred2/hlp/curarw2.bmp \
fred2/hlp/curarw4.bmp \
fred2/hlp/curhelp.bmp \
fred2/hlp/editcopy.bmp \
fred2/hlp/editcut.bmp \
fred2/hlp/editpast.bmp \
fred2/hlp/editundo.bmp \
fred2/hlp/filenew.bmp \
fred2/hlp/fileopen.bmp \
fred2/hlp/fileprnt.bmp \
fred2/hlp/filesave.bmp \
fred2/hlp/fred.hm \
fred2/hlp/fred.hpj \
fred2/hlp/help.log \
fred2/hlp/hlpsbar.bmp \
fred2/hlp/hlptbar.bmp \
fred2/hlp/recfirst.bmp \
fred2/hlp/reclast.bmp \
fred2/hlp/recnext.bmp \
fred2/hlp/recprev.bmp \
fred2/hlp/scmax.bmp \
fred2/hlp/scmenu.bmp \
fred2/hlp/scmin.bmp \
fred2/res/bitmap1.bmp \
fred2/res/black_do.bmp \
fred2/res/bmp00001.bmp \
fred2/res/chained.bmp \
fred2/res/chained_directive.bmp \
fred2/res/cursor1.cur \
fred2/res/cursor2.cur \
fred2/res/data.bmp \
fred2/res/fred.ico \
fred2/res/fred.rc2 \
fred2/res/freddoc.ico \
fred2/res/green_do.bmp \
fred2/res/root.bmp \
fred2/res/root_directive.bmp \
fred2/res/toolbar.bmp \
fred2/res/toolbar1.bmp \
fred2/res/variable.bmp \
sound/phrases.xml \
sound/gc.exe \
wxfred2/res/fred.ico \
wxfred2/wxfred.xrc
# D_ variants are defaults and should always be used
# FS2_ variants are for game building and wxFRED
AM_CXXFLAGS = @D_CFLAGS@ @FS2_CXXFLAGS@
AM_CXXFLAGS = @D_CFLAGS@ @FS2_CXXFLAGS@ -I../lua
AM_LDFLAGS = @D_LDFLAGS@ @FS2_LDFLAGS@
noinst_LIBRARIES = libcode.a
@@ -42,6 +209,8 @@ FS2_SOURCES = \
ai/aiinternal.h \
ai/ailocal.h \
ai/aiturret.cpp \
ai/ai_profiles.cpp \
ai/ai_profiles.h \
anim/animplay.cpp \
anim/animplay.h \
anim/packunpack.cpp \
@@ -71,8 +240,16 @@ FS2_SOURCES = \
controlconfig/controlsconfigcommon.cpp \
cutscene/cutscenes.cpp \
cutscene/cutscenes.h \
cutscene/decoder16.cpp \
cutscene/decoder8.cpp \
cutscene/movie.cpp \
cutscene/movie.h \
cutscene/mve_audio.cpp \
cutscene/mvelib.cpp \
cutscene/mvelib.h \
cutscene/mveplayer.cpp \
cutscene/oggplayer.cpp \
cutscene/oggplayer.h \
ddsutils/ddsutils.cpp \
ddsutils/ddsutils.h \
debris/debris.cpp \
@@ -90,14 +267,13 @@ FS2_SOURCES = \
fireball/fireballs.cpp \
fireball/fireballs.h \
fireball/warpineffect.cpp \
fs2open_pxo/Client.cpp \
fs2open_pxo/Client.h \
fs2open_pxo/TCP_Client.cpp \
fs2open_pxo/TCP_Socket.cpp \
fs2open_pxo/TCP_Socket.h \
fs2open_pxo/protocol.h \
fs2open_pxo/udpsocket.cpp \
fs2open_pxo/udpsocket.h \
fs2netd/fs2netd_client.cpp \
fs2netd/fs2netd_client.h \
fs2netd/tcp_client.cpp \
fs2netd/tcp_client.h \
fs2netd/tcp_socket.cpp \
fs2netd/tcp_socket.h \
fs2netd/protocol.h \
gamehelp/contexthelp.cpp \
gamehelp/contexthelp.h \
gamehelp/gameplayhelp.cpp \
@@ -108,6 +284,8 @@ FS2_SOURCES = \
globalincs/alphacolors.h \
globalincs/crypt.cpp \
globalincs/crypt.h \
globalincs/def_files.cpp \
globalincs/def_files.h \
globalincs/globals.h \
globalincs/linklist.h \
globalincs/pstypes.h \
@@ -119,6 +297,8 @@ FS2_SOURCES = \
graphics/2d.h \
graphics/font.cpp \
graphics/font.h \
graphics/generic.cpp \
graphics/generic.h \
graphics/grbatch.cpp \
graphics/grbatch.h \
graphics/grinternal.h \
@@ -126,17 +306,22 @@ FS2_SOURCES = \
graphics/gropengl.h \
graphics/gropenglbmpman.cpp \
graphics/gropenglbmpman.h \
graphics/gropengldraw.cpp \
graphics/gropengldraw.h \
graphics/gropenglextension.cpp \
graphics/gropenglextension.h \
graphics/gropengllight.cpp \
graphics/gropengllight.h \
graphics/gropenglshader.cpp \
graphics/gropenglshader.h \
graphics/gropenglstate.cpp \
graphics/gropenglstate.h \
graphics/gropengltexture.cpp \
graphics/gropengltexture.h \
graphics/gropengltnl.cpp \
graphics/gropengltnl.h \
graphics/grstub.cpp \
graphics/grstub.h \
graphics/grzbuffer.cpp \
graphics/grzbuffer.h \
graphics/line.h \
graphics/tmapper.h \
hud/hud.cpp \
@@ -175,6 +360,14 @@ FS2_SOURCES = \
hud/hudtargetbox.h \
hud/hudwingmanstatus.cpp \
hud/hudwingmanstatus.h \
iff_defs/iff_defs.cpp \
iff_defs/iff_defs.h \
inetfile/cftp.cpp \
inetfile/cftp.h \
inetfile/chttpget.cpp \
inetfile/chttpget.h \
inetfile/inetgetfile.cpp \
inetfile/inetgetfile.h \
io/key.cpp \
io/key.h \
io/keycontrol.cpp \
@@ -183,8 +376,8 @@ FS2_SOURCES = \
io/mouse.h \
io/timer.cpp \
io/timer.h \
irc/irc.cpp \
irc/irc.h \
io/trackir.cpp \
io/trackir.h \
jpgutils/jpgutils.cpp \
jpgutils/jpgutils.h \
jumpnode/jumpnode.cpp \
@@ -232,8 +425,6 @@ FS2_SOURCES = \
menuui/readyroom.h \
menuui/snazzyui.cpp \
menuui/snazzyui.h \
menuui/storybook.cpp \
menuui/storybook.h \
menuui/techmenu.cpp \
menuui/techmenu.h \
menuui/trainingmenu.cpp \
@@ -260,6 +451,8 @@ FS2_SOURCES = \
mission/missiontraining.h \
missionui/chatbox.cpp \
missionui/chatbox.h \
missionui/fictionviewer.cpp \
missionui/fictionviewer.h \
missionui/missionbrief.cpp \
missionui/missionbrief.h \
missionui/missioncmdbrief.cpp \
@@ -283,6 +476,8 @@ FS2_SOURCES = \
missionui/redalert.cpp \
missionui/redalert.h \
model/model.h \
model/modelanim.cpp \
model/modelanim.h \
model/modelcollide.cpp \
model/modelinterp.cpp \
model/modelsinc.h \
@@ -292,10 +487,11 @@ FS2_SOURCES = \
nebula/neb.h \
nebula/neblightning.cpp \
nebula/neblightning.h \
network/fs2ox.cpp \
network/fs2ox.h \
network/chat_api.cpp \
network/chat_api.h \
network/multi.cpp \
network/multi.h \
network/multilag.cpp \
network/multilag.h \
network/multimsgs.cpp \
network/multimsgs.h \
@@ -334,6 +530,8 @@ FS2_SOURCES = \
network/multi_ping.h \
network/multi_pmsg.cpp \
network/multi_pmsg.h \
network/multi_pxo.cpp \
network/multi_pxo.h \
network/multi_rate.cpp \
network/multi_rate.h \
network/multi_respawn.cpp \
@@ -349,26 +547,41 @@ FS2_SOURCES = \
network/psnet.h \
network/psnet2.cpp \
network/psnet2.h \
network/stand_gui.cpp \
network/stand_gui-unix.cpp \
network/stand_gui.h \
object/collidedebrisship.cpp \
object/collidedebrisweapon.cpp \
object/collideshipship.cpp \
object/collideshipweapon.cpp \
object/collideweaponweapon.cpp \
object/deadobjectdock.cpp \
object/deadobjectdock.h \
object/objcollide.cpp \
object/objcollide.h \
object/objectdock.cpp \
object/objectdock.h \
object/object.cpp \
object/object.h \
object/objectshield.cpp \
object/objectshield.h \
object/objectsort.cpp \
object/parseobjectdock.cpp \
object/parseobjectdock.h \
object/waypoint.cpp \
object/waypoint.h \
observer/observer.cpp \
observer/observer.h \
palman/palman.cpp \
palman/palman.h \
parse/encrypt.cpp \
parse/encrypt.h \
parse/lua.cpp \
parse/lua.h \
parse/parselo.cpp \
parse/parselo.h \
parse/scripting.cpp \
parse/scripting.h \
parse/sexp.cpp \
parse/sexp.h \
particle/particle.cpp \
@@ -481,23 +694,10 @@ endif
if FS2_OS_UNIX
JOY_SOURCES = \
io/joy.h \
io/joy_ff.h \
io/joy-unix.cpp
endif
## networking support sources
if FS2_OS_WIN32
FS2_SOURCES += \
network/multilag.cpp \
network/stand_gui.cpp \
network/stand_gui.h
endif
if FS2_OS_UNIX
FS2_SOURCES += \
network/stand_gui-unix.cpp \
network/stand_gui.h
endif
## sound support sources
if FS2_SOUND
SOUND_SOURCES = \
@@ -519,6 +719,8 @@ SOUND_SOURCES = \
sound/ds.h \
sound/ds3d.cpp \
sound/ds3d.h \
sound/dscap.cpp \
sound/dscap.h \
sound/midifile.cpp \
sound/midifile.h \
sound/midiseq.h \
@@ -536,14 +738,9 @@ SOUND_SOURCES = \
sound/fsspeech.cpp \
sound/fsspeech.h \
sound/speech.cpp \
sound/speech.h
if FS2_OS_WIN32
SOUND_SOURCES += \
sound/dscap.cpp \
sound/dscap.h
endif
sound/speech.h \
sound/voicerec.cpp \
sound/voicerec.h
endif
## Win32-specific sources
@@ -566,13 +763,10 @@ WIN32_SOURCES = \
graphics/gl/Gl.h \
graphics/gl/Glext.h \
graphics/gl/wglext.h \
graphics/GrD3DParticle.cpp \
graphics/GrD3DParticle.h \
graphics/GrD3DStateBlock.cpp \
graphics/GrD3DStateBlock.h \
graphics/grd3d.cpp \
graphics/grd3d.h \
graphics/grd3dbatch.cpp \
graphics/grd3dbatch.h \
graphics/grd3dcalls.cpp \
graphics/grd3dbmpman.cpp \
graphics/grd3dbmpman.h \
@@ -627,15 +821,13 @@ FS2OPEN_SOURCES = \
freespace2/levelpaging.h
fs2_open_d_SOURCES = \
${FS2OPEN_SOURCES} \
${PLATFORM_SOURCES}
${FS2OPEN_SOURCES}
fs2_open_r_SOURCES = \
${FS2OPEN_SOURCES} \
${PLATFORM_SOURCES}
${FS2OPEN_SOURCES}
fs2_open_d_LDADD = libcode.a ../libjpeg/libjpeg.a
fs2_open_r_LDADD = libcode.a ../libjpeg/libjpeg.a
fs2_open_d_LDADD = libcode.a ../libjpeg/libjpeg.a ../lua/liblua.a
fs2_open_r_LDADD = libcode.a ../libjpeg/libjpeg.a ../lua/liblua.a
##
## End MAIN binary
@@ -656,12 +848,10 @@ wxFRED_SOURCES = \
wxfred2/wxfred_xrc.h
wxFRED2_d_SOURCES = \
${wxFRED_SOURCES} \
${PLATFORM_SOURCES}
${wxFRED_SOURCES}
wxFRED2_r_SOURCES = \
${wxFRED_SOURCES} \
${PLATFORM_SOURCES}
${wxFRED_SOURCES}
wxFRED2_d_LDADD = libcode.a ../libjpeg/libjpeg.a
wxFRED2_r_LDADD = libcode.a ../libjpeg/libjpeg.a
File renamed without changes.
+55 -41
View File
@@ -9,11 +9,43 @@
/*
* $Logfile: /Freespace2/code/Ship/ai.h $
* $Revision: 1.7 $
* $Date: 2005-07-27 17:22:22 $
* $Revision: 1.12.2.2 $
* $Date: 2007-08-11 16:51:55 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 1.12.2.1 2006/06/04 01:03:12 Goober5000
* add fighterbay restriction code
* --Goober5000
*
* Revision 1.12 2006/02/25 21:46:59 Goober5000
* spelling
*
* Revision 1.11 2006/02/20 02:13:07 Goober5000
* added ai-ignore-new which hopefully should fix the ignore bug
* --Goober5000
*
* Revision 1.10 2006/02/19 22:00:09 Goober5000
* restore original ignore behavior and remove soon-to-be-obsolete ai-chase-any-except
* --Goober5000
*
* Revision 1.9 2005/11/24 08:46:11 Goober5000
* * cleaned up mission_do_departure
* * fixed a hidden crash (array index being -1; would only
* be triggered for ships w/o subspace drives under certain conditions)
* * removed finding a new fighterbay target because it might screw up missions
* * improved clarity, code flow, and readability :)
* * added custom AI flag for disabling warpouts if navigation subsystem fails
* --Goober5000
*
* Revision 1.8 2005/11/21 00:46:05 Goober5000
* add ai_settings.tbl
* --Goober5000
*
* Revision 1.7 2005/07/27 17:22:22 Goober5000
* more tweaks to the dock code
* --Goober5000
*
* Revision 1.6 2005/07/25 03:13:24 Goober5000
* various code cleanups, tweaks, and fixes; most notably the MISSION_FLAG_USE_NEW_AI
* should now be added to all places where it is needed (except the turret code, which I still
@@ -114,7 +146,7 @@
* Full-fledged ballistic primary support added! Try it and see! :)
*
* Revision 2.2 2002/10/19 19:29:28 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
* initial commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.1 2002/08/01 01:41:09 penguin
* The big include file move
@@ -301,6 +333,7 @@ struct object;
// Goober5000
#define AIF_UNLOAD_PRIMARIES (1 << 24) // Fire primaries as fast as possible!
#define AIF_TRYING_UNSUCCESSFULLY_TO_WARP (1 << 25) // Trying to warp, but can't warp at the moment
#define AIF_AVOID_SHOCKWAVE (AIF_AVOID_SHOCKWAVE_SHIP | AIF_AVOID_SHOCKWAVE_WEAPON)
#define AIF_FORMATION (AIF_FORMATION_WING | AIF_FORMATION_OBJECT)
@@ -355,10 +388,6 @@ struct object;
#define KAMIKAZE_HULL_ON_DEATH -1000.0f // Hull strength ship gets set to if it crash-dies.
// Goober5000, currently only used for the ai-chase-any-except behavior. This can never go
// above 32, because 32 is the maximum number of bits possible in a unit data type. If you
// need more, you're out of luck - you'll have to add a second special object array. :)
#define MAX_SPECIAL_OBJECTS 32
// structure for AI goals
typedef struct ai_goal {
@@ -374,13 +403,6 @@ typedef struct ai_goal {
int wp_index; // index into waypoints list of waypoints that this ship might fly.
int weapon_signature; // signature of weapon this ship might be chasing. Paired with above value to get target.
// Goober5000
char *special_object[MAX_SPECIAL_OBJECTS]; // name of ship (or wing) that this goal acts upon
int special_object_num[MAX_SPECIAL_OBJECTS]; // index of ship or wing in Ship[] or Wing[]
int special_object_index[MAX_SPECIAL_OBJECTS]; // index of special_object in Goal_ship_names[][]
uint special_object_flags;
int num_special_objects;
// unions for docking stuff.
// (AIGF_DOCKER_INDEX_VALID and AIGF_DOCKEE_INDEX_VALID tell us to use indexes; otherwise we use names)
// these are the dockpoints used on the docker and dockee ships, not the ships themselves
@@ -424,19 +446,8 @@ typedef struct ai_goal {
#define MAX_AI_BEHAVIORS 22 // Number of AIM_xxxx types
#define MAX_WAYPOINTS_PER_LIST 20
#define MAX_WAYPOINT_LISTS 32
#define MAX_ENEMY_DISTANCE 2500.0f // maximum distance from which a ship will pursue an enemy.
// waypoint list flags bitmasks.
#define WL_MARKED 0x01
typedef struct waypoint_list {
char name[NAME_LENGTH];
int count;
char flags[MAX_WAYPOINTS_PER_LIST];
vec3d waypoints[MAX_WAYPOINTS_PER_LIST];
} waypoint_list;
#define AI_GOAL_NONE -1
#define AI_ACTIVE_GOAL_DYNAMIC 999
@@ -527,13 +538,16 @@ typedef struct pnode {
extern pnode Path_points[MAX_PATH_POINTS];
extern pnode *Ppfp; // Free pointer in path points.
// Goober5000 (based on the "you can only remember 7 things in short-term memory" assumption)
#define MAX_IGNORE_NEW_OBJECTS 7
typedef struct ai_info {
int ai_flags; // Special flags for AI behavior.
int shipnum; // Ship using this slot, -1 means none.
int type; //
int wing; // Member of what wing? -1 means none.
int behavior; // AI Class. Doesn't change after initial setting.
int behavior; // AI behavior; vestigial field from early development of FS1
int mode;
int previous_mode;
int mode_time; // timestamp at which current mode elapses.
@@ -563,6 +577,10 @@ typedef struct ai_info {
int ignore_objnum; // ship to be ignored, based on player order. UNUSED_OBJNUM if none. -(wing_num+1) if ignoring wing.
int ignore_signature; // signature of ship to be ignored
// Goober5000
int ignore_new_objnums[MAX_IGNORE_NEW_OBJECTS];
int ignore_new_signatures[MAX_IGNORE_NEW_OBJECTS];
int ai_class; // Class. Might be override of default.
// Probably become obsolete, to be replaced by path_start, path_cur, etc.
@@ -733,7 +751,6 @@ extern int Num_ai_classes;
extern int Ai_firing_enabled;
extern char *Skill_level_names(int skill_level, int translate = 1);
extern int Skill_level_max_attackers[NUM_SKILL_LEVELS];
extern int Ai_goal_signature;
// need access to following data in AiBig.cpp
@@ -761,15 +778,12 @@ int get_wingnum(int objnum);
void set_wingnum(int objnum, int wingnum);
char *ai_get_goal_ship_name(char *name, int *index);
extern waypoint_list Waypoint_lists[MAX_WAYPOINT_LISTS];
extern int Num_waypoint_lists;
extern void init_ai_system(void);
extern void ai_attack_object(object *attacker, object *attacked, int priority, ship_subsys *ssp, int except = 0);
extern void ai_evade_object(object *evader, object *evaded, int priority);
extern void ai_ignore_object(object *ignorer, object *ignored, int priority);
extern void ai_attack_object(object *attacker, object *attacked, ship_subsys *ssp);
extern void ai_evade_object(object *evader, object *evaded);
extern void ai_ignore_object(object *ignorer, object *ignored, int ignore_new);
extern void ai_ignore_wing(object *ignorer, int wingnum, int priority);
extern void ai_dock_with_object(object *docker, int docker_index, object *dockee, int dockee_index, int priority, int dock_type);
extern void ai_dock_with_object(object *docker, int docker_index, object *dockee, int dockee_index, int dock_type);
extern void ai_stay_still(object *still_objp, vec3d *view_pos);
extern void ai_set_default_behavior(object *obj, int classnum);
extern void ai_do_default_behavior(object *obj);
@@ -790,14 +804,14 @@ extern void ai_update_danger_weapon(int objnum, int weapon_objnum);
// called externally from MissionParse.cpp to position ships in wings upon arrival into the
// mission.
extern void get_absolute_wing_pos( vec3d *result_pos, object *leader_objp, int wing_index, int formation_object_flag);
extern void get_absolute_wing_pos_autopilot( vec3d *result_pos, object *leader_objp, int wing_index, int formation_object_flag);
// Interface from goals code to AI. Set ship to guard. *objp guards *other_objp
extern void ai_set_guard_object(object *objp, object *other_objp);
extern void ai_set_evade_object(object *objp, object *other_objp);
extern void ai_set_guard_wing(object *objp, int wingnum);
extern void ai_warp_out(object *objp, vec3d *vp);
extern void ai_attack_wing(object *attacker, int wingnum, int priority);
extern void ai_attack_wing(object *attacker, int wingnum);
extern void ai_deathroll_start(object *ship_obj);
extern void ai_fly_in_formation(int wing_num); // Force wing to fly in formation.
extern void ai_disband_formation(int wing_num); // Force wing to disband formation flying.
@@ -805,7 +819,7 @@ extern int set_target_objnum(ai_info *aip, int objnum);
extern void ai_form_on_wing(object *objp, object *goal_objp);
extern void ai_do_stay_near(object *objp, object *other_obj, float dist);
extern ship_subsys *set_targeted_subsys(ai_info *aip, ship_subsys *new_subsys, int parent_objnum);
extern void ai_rearm_repair( object *objp, int docker_index, object *goal_objp, int dockee_index, int priority );
extern void ai_rearm_repair( object *objp, int docker_index, object *goal_objp, int dockee_index );
extern void ai_add_rearm_goal( object *requester_objp, object *support_objp );
extern void create_model_path(object *pl_objp, object *mobjp, int path_num, int subsys_path=0);
@@ -813,8 +827,8 @@ extern void create_model_path(object *pl_objp, object *mobjp, int path_num, int
extern void ai_do_safety(object *objp);
// used to get path info for fighter bay emerging and departing
int ai_acquire_emerge_path(object *pl_objp, int parent_objnum, vec3d *pos, vec3d *fvec);
int ai_acquire_depart_path(object *pl_objp, int parent_objnum);
int ai_acquire_emerge_path(object *pl_objp, int parent_objnum, int path_mask, vec3d *pos, vec3d *fvec);
int ai_acquire_depart_path(object *pl_objp, int parent_objnum, int path_mask);
// used by AiBig.cpp
extern void ai_set_positions(object *pl_objp, object *en_objp, ai_info *aip, vec3d *player_pos, vec3d *enemy_pos);
@@ -835,7 +849,7 @@ extern int ai_maybe_fire_afterburner(object *objp, ai_info *aip);
extern void set_predicted_enemy_pos(vec3d *predicted_enemy_pos, object *pobjp, object *eobjp, ai_info *aip);
extern int is_instructor(object *objp);
extern int find_enemy(int objnum, float range, int max_attackers, int except = 0);
extern int find_enemy(int objnum, float range, int max_attackers);
float ai_get_weapon_speed(ship_weapon *swp);
void set_predicted_enemy_pos_turret(vec3d *predicted_enemy_pos, vec3d *gun_pos, object *pobjp, vec3d *enemy_pos, vec3d *enemy_vel, float weapon_speed, float time_enemy_in_range);
@@ -853,7 +867,7 @@ extern int find_danger_weapon(object *sobjp, float dtime, float *atime, float do
void ai_set_mode_warp_out(object *objp, ai_info *aip);
// prototyped by Goober5000
int get_nearest_objnum(int objnum, int enemy_team_mask, int enemy_wing, float range, int max_attackers, int except = 0);
int get_nearest_objnum(int objnum, int enemy_team_mask, int enemy_wing, float range, int max_attackers);
// moved to header file by Goober5000
void ai_announce_ship_dying(object *dying_objp);
+444
View File
@@ -0,0 +1,444 @@
/*
* Created by Ian "Goober5000" Warfield for the FreeSpace2 Source Code Project.
* You may not sell or otherwise commercially exploit the source or things you
* create based on the source.
*/
/*
* $Logfile: /Freespace2/code/ai/ai_profiles.cpp $
* $Revision: 1.13.2.9 $
* $Date: 2007-10-15 06:43:08 $
* $Author: taylor $
*
* $Log: not supported by cvs2svn $
* Revision 1.13.2.8 2007/09/02 02:07:37 Goober5000
* added fixes for #1415 and #1483, made sure every read_file_text had a corresponding setjmp, and sync'd the parse error messages between HEAD and stable
*
* Revision 1.13.2.7 2007/07/28 22:04:13 Goober5000
* apply some of Turey's changes to stable branch
*
* Revision 1.13.2.6 2007/07/15 02:45:48 Goober5000
* fixed a small bug in the lab
* moved WMC's no damage scaling flag to ai_profiles and made it work correctly
* removed my old supercap damage scaling change
* moved Turey's truefire flag to ai_profiles
*
* Revision 1.13.2.5 2007/02/27 01:44:44 Goober5000
* add two features for WCS: specifyable shield/weapon recharge rates, and removal of linked fire penalty
*
* Revision 1.13.2.4 2006/09/11 01:15:03 taylor
* fixes for stuff_string() bounds checking
*
* Revision 1.13.2.3 2006/07/12 04:57:20 taylor
* fix the endless-loop fix ;) (this is what broke shield recharging btw)
*
* Revision 1.13.2.2 2006/07/06 18:19:55 Goober5000
* fix dumb endless loop bug
* --Goober5000
*
* Revision 1.13.2.1 2006/07/02 03:39:34 Goober5000
* remove associated AI flags
* --Goober5000
*
* Revision 1.13 2006/04/20 06:32:00 Goober5000
* proper capitalization according to Volition
*
* Revision 1.12 2006/03/20 06:25:19 taylor
* change wording to ease Goober's ulcer. ;)
*
* Revision 1.11 2006/03/20 06:19:03 taylor
* add ai_profiles flag to get rid of limit on minimum speed a docked ship can move
* (not going to Int3() here from < 0.1 speed by default, a support ship actually hit it)
*
* Revision 1.10 2006/02/13 04:56:58 Goober5000
* enabled modular tables for ai_profiles and added the default table to def_files
* --Goober5000
*
* Revision 1.9 2006/02/13 00:20:44 Goober5000
* more tweaks, plus clarification of checks for the existence of files
* --Goober5000
*
* Revision 1.8 2005/12/22 04:32:44 taylor
* GCC knows that fix == int so it hates the utility functions here, for sanity sake just rename them to type specific to avoid rampant casting
*
* Revision 1.7 2005/12/06 03:17:48 taylor
* cleanup some debug log messages:
* note that a nprintf() with "Warning" or "General" is basically the same thing as mprintf()
* make sure that OpenAL init failures always get to the debug log
*
* Revision 1.6 2005/11/24 09:08:44 Goober5000
* bah, forgot a colon
* --Goober5000
*
* Revision 1.5 2005/11/24 08:46:11 Goober5000
* * cleaned up mission_do_departure
* * fixed a hidden crash (array index being -1; would only
* be triggered for ships w/o subspace drives under certain conditions)
* * removed finding a new fighterbay target because it might screw up missions
* * improved clarity, code flow, and readability :)
* * added custom AI flag for disabling warpouts if navigation subsystem fails
* --Goober5000
*
* Revision 1.4 2005/11/24 07:27:14 taylor
* fix fred2 startup crash (we probably need to Assert() this case so it doesn't easily happen again)
*
* Revision 1.3 2005/11/21 15:01:18 taylor
* little cleaner, lot more friendly to 64-bit archs (long type is usually 64-bit there)
*
* Revision 1.2 2005/11/21 03:47:51 Goober5000
* bah and double bah
* --Goober5000
*
* Revision 1.1 2005/11/21 02:43:30 Goober5000
* change from "setting" to "profile"; this way makes more sense
* --Goober5000
*
*/
#include "globalincs/pstypes.h"
#include "globalincs/def_files.h"
#include "ai/ai_profiles.h"
#include "parse/parselo.h"
#include "localization/localize.h"
// global stuff
int Num_ai_profiles;
int Default_ai_profile;
ai_profile_t Ai_profiles[MAX_AI_PROFILES];
// local to this file
static int Ai_profiles_initted = 0;
static char Default_profile_name[NAME_LENGTH];
// utility
void set_flag(ai_profile_t *profile, char *name, int flag)
{
if (optional_string(name))
{
bool val;
stuff_boolean(&val);
if (val)
profile->flags |= flag;
else
profile->flags &= ~flag;
}
}
void parse_ai_profiles_tbl(char *filename)
{
int i, rval;
bool no_create = false;
char profile_name[NAME_LENGTH];
ai_profile_t dummy_profile;
char *saved_Mp = NULL;
// open localization
lcl_ext_open();
if ((rval = setjmp(parse_abort)) != 0)
{
mprintf(("TABLES: Unable to parse '%s'! Error code = %i.\n", (filename) ? filename : "<default ai_profiles.tbl>", rval));
lcl_ext_close();
return;
}
if (filename == NULL)
read_file_text_from_array(defaults_get_file("ai_profiles.tbl"));
else
read_file_text(filename, CF_TYPE_TABLES);
reset_parse();
// start parsing
required_string("#AI Profiles");
// new default?
if (optional_string("$Default Profile:"))
stuff_string(Default_profile_name, F_NAME, NAME_LENGTH);
// begin reading data
while (required_string_either("#End","$Profile Name:"))
{
ai_profile_t *profile = &dummy_profile;
ai_profile_t *previous_profile = NULL;
// get the name
required_string("$Profile Name:");
stuff_string(profile_name, F_NAME, NAME_LENGTH);
// see if it exists
for (i = 0; i < Num_ai_profiles; i++)
{
if (!stricmp(Ai_profiles[i].profile_name, profile_name))
{
previous_profile = &Ai_profiles[i];
break;
}
}
// modular table stuff
if (optional_string("+nocreate"))
{
no_create = true;
// use the previous one if possible,
// otherwise continue to use the dummy one
if (previous_profile != NULL)
profile = previous_profile;
}
else
{
// don't create multiple profiles with the same name
if (previous_profile != NULL)
{
Warning(LOCATION, "An ai profile named '%s' already exists! The new one will not be created.\n", profile_name);
}
else
{
// make sure we're under the limit
if (Num_ai_profiles >= MAX_AI_PROFILES)
{
Warning(LOCATION, "Too many profiles in ai_profiles.tbl! Max is %d.\n", MAX_AI_PROFILES-1); // -1 because one is built-in
skip_to_string("#End", NULL);
break;
}
profile = &Ai_profiles[Num_ai_profiles];
Num_ai_profiles++;
}
}
// initialize profile if we're not building from a previously parsed one
if (!no_create)
{
// base profile, so zero it out
if (profile == &Ai_profiles[0])
{
memset(profile, 0, sizeof(ai_profile_t));
}
// brand new profile, so set it to the base defaults
else
{
memcpy(profile, &Ai_profiles[0], sizeof(ai_profile_t));
}
}
// set the name
strcpy(profile->profile_name, profile_name);
// fill in any and all settings; they're all optional and can be in any order
while (!check_for_string("$Profile Name:") && !check_for_string("#End"))
{
if (optional_string("$Player Afterburner Recharge Scale:"))
parse_float_list(profile->afterburner_recharge_scale, NUM_SKILL_LEVELS);
if (optional_string("$Max Beam Friendly Fire Damage:"))
parse_float_list(profile->beam_friendly_damage_cap, NUM_SKILL_LEVELS);
if (optional_string("$Player Countermeasure Life Scale:"))
parse_float_list(profile->cmeasure_life_scale, NUM_SKILL_LEVELS);
if (optional_string("$AI Countermeasure Firing Chance:"))
parse_float_list(profile->cmeasure_fire_chance, NUM_SKILL_LEVELS);
if (optional_string("$AI In Range Time:"))
parse_float_list(profile->in_range_time, NUM_SKILL_LEVELS);
if (optional_string("$AI Always Links Ammo Weapons:"))
parse_float_list(profile->link_ammo_levels_always, NUM_SKILL_LEVELS);
if (optional_string("$AI Maybe Links Ammo Weapons:"))
parse_float_list(profile->link_ammo_levels_maybe, NUM_SKILL_LEVELS);
if (optional_string("$AI Always Links Energy Weapons:"))
parse_float_list(profile->link_energy_levels_always, NUM_SKILL_LEVELS);
if (optional_string("$AI Maybe Links Energy Weapons:"))
parse_float_list(profile->link_energy_levels_maybe, NUM_SKILL_LEVELS);
if (optional_string("$Max Missles Locked on Player:"))
parse_int_list(profile->max_allowed_player_homers, NUM_SKILL_LEVELS);
if (optional_string("$Max Player Attackers:"))
parse_int_list(profile->max_attackers, NUM_SKILL_LEVELS);
if (optional_string("$Max Incoming Asteroids:"))
parse_int_list(profile->max_incoming_asteroids, NUM_SKILL_LEVELS);
if (optional_string("$Player Damage Factor:") || optional_string("$AI Damage Reduction to Player Hull:"))
parse_float_list(profile->player_damage_scale, NUM_SKILL_LEVELS);
if (optional_string("$Player Subsys Damage Factor:") || optional_string("$AI Damage Reduction to Player Subsys:"))
parse_float_list(profile->subsys_damage_scale, NUM_SKILL_LEVELS);
// represented in fractions of F1_0
if (optional_string("$Predict Position Delay:"))
{
int i;
float temp_list[NUM_SKILL_LEVELS];
parse_float_list(temp_list, NUM_SKILL_LEVELS);
for (i = 0; i < NUM_SKILL_LEVELS; i++)
profile->predict_position_delay[i] = fl2f(temp_list[i]);
}
if (optional_string("$Player Shield Recharge Scale:"))
parse_float_list(profile->shield_energy_scale, NUM_SKILL_LEVELS);
if (optional_string("$AI Shield Manage Delay:") || optional_string("$AI Shield Manage Delays:"))
parse_float_list(profile->shield_manage_delay, NUM_SKILL_LEVELS);
if (optional_string("$Friendly AI Fire Delay Scale:"))
parse_float_list(profile->ship_fire_delay_scale_friendly, NUM_SKILL_LEVELS);
if (optional_string("$Hostile AI Fire Delay Scale:"))
parse_float_list(profile->ship_fire_delay_scale_hostile, NUM_SKILL_LEVELS);
if (optional_string("$Friendly AI Secondary Fire Delay Scale:"))
parse_float_list(profile->ship_fire_secondary_delay_scale_friendly, NUM_SKILL_LEVELS);
if (optional_string("$Hostile AI Secondary Fire Delay Scale:"))
parse_float_list(profile->ship_fire_secondary_delay_scale_hostile, NUM_SKILL_LEVELS);
if (optional_string("$Player Subsys Damage Factor:") || optional_string("$AI Damage Reduction to Player Subsys:"))
parse_float_list(profile->subsys_damage_scale, NUM_SKILL_LEVELS);
if (optional_string("$AI Turn Time Scale:"))
parse_float_list(profile->turn_time_scale, NUM_SKILL_LEVELS);
if (optional_string("$Player Weapon Recharge Scale:"))
parse_float_list(profile->weapon_energy_scale, NUM_SKILL_LEVELS);
if (optional_string("$Max Turret Target Ownage:"))
parse_int_list(profile->max_turret_ownage_target, NUM_SKILL_LEVELS);
if (optional_string("$Max Turret Player Ownage:"))
parse_int_list(profile->max_turret_ownage_player, NUM_SKILL_LEVELS);
if (optional_string("$Percentage Required For Kill Scale:"))
parse_float_list(profile->kill_percentage_scale, NUM_SKILL_LEVELS);
if (optional_string("$Percentage Required For Assist Scale:"))
parse_float_list(profile->assist_percentage_scale, NUM_SKILL_LEVELS);
if (optional_string("$Percentage Awarded For Capship Assist:"))
parse_float_list(profile->assist_award_percentage_scale, NUM_SKILL_LEVELS);
set_flag(profile, "$big ships can attack beam turrets on untargeted ships:", AIPF_BIG_SHIPS_CAN_ATTACK_BEAM_TURRETS_ON_UNTARGETED_SHIPS);
set_flag(profile, "$smart primary weapon selection:", AIPF_SMART_PRIMARY_WEAPON_SELECTION);
set_flag(profile, "$smart secondary weapon selection:", AIPF_SMART_SECONDARY_WEAPON_SELECTION);
set_flag(profile, "$smart shield management:", AIPF_SMART_SHIELD_MANAGEMENT);
set_flag(profile, "$smart afterburner management:", AIPF_SMART_AFTERBURNER_MANAGEMENT);
set_flag(profile, "$allow rapid secondary dumbfire:", AIPF_ALLOW_RAPID_SECONDARY_DUMBFIRE);
set_flag(profile, "$huge turret weapons ignore bombs:", AIPF_HUGE_TURRET_WEAPONS_IGNORE_BOMBS);
set_flag(profile, "$don't insert random turret fire delay:", AIPF_DONT_INSERT_RANDOM_TURRET_FIRE_DELAY);
set_flag(profile, "$hack improve non-homing swarm turret fire accuracy:", AIPF_HACK_IMPROVE_NON_HOMING_SWARM_TURRET_FIRE_ACCURACY);
set_flag(profile, "$shockwaves damage small ship subsystems:", AIPF_SHOCKWAVES_DAMAGE_SMALL_SHIP_SUBSYSTEMS);
set_flag(profile, "$navigation subsystem governs warpout capability:", AIPF_NAVIGATION_SUBSYS_GOVERNS_WARP);
set_flag(profile, "$ignore lower bound for minimum speed of docked ship:", AIPF_NO_MIN_DOCK_SPEED_CAP);
set_flag(profile, "$disable linked fire penalty:", AIPF_DISABLE_LINKED_FIRE_PENALTY);
set_flag(profile, "$disable weapon damage scaling:", AIPF_DISABLE_WEAPON_DAMAGE_SCALING);
set_flag(profile, "$use additive weapon velocity:", AIPF_USE_ADDITIVE_WEAPON_VELOCITY);
set_flag(profile, "$use newtonian dampening:", AIPF_USE_NEWTONIAN_DAMPENING);
set_flag(profile, "$include beams for kills and assists:", AIPF_INCLUDE_BEAMS_IN_STAT_CALCS);
set_flag(profile, "$score kills based on damage caused:", AIPF_KILL_SCORING_SCALES_WITH_DAMAGE);
set_flag(profile, "$score assists based on damage caused:", AIPF_ASSIST_SCORING_SCALES_WITH_DAMAGE);
set_flag(profile, "$allow event and goal scoring in multiplayer:", AIPF_ALLOW_MULTI_EVENT_SCORING);
set_flag(profile, "$fix linked primary weapon decision bug:", AIPF_FIX_LINKED_PRIMARY_BUG);
set_flag(profile, "$prevent turrets targeting too distant bombs:", AIPF_PREVENT_TARGETING_BOMBS_BEYOND_RANGE);
set_flag(profile, "$smart subsystem targeting for turrets:", AIPF_SMART_SUBSYSTEM_TARGETING_FOR_TURRETS);
set_flag(profile, "$fix heat seekers homing on stealth ships bug:", AIPF_FIX_HEAT_SEEKER_STEALTH_BUG);
set_flag(profile, "$multi allow empty primaries:", AIPF_MULTI_ALLOW_EMPTY_PRIMARIES);
set_flag(profile, "$multi allow empty secondaries:", AIPF_MULTI_ALLOW_EMPTY_SECONDARIES);
// if we've been through once already and are at the same place, force a move
if ( saved_Mp && (saved_Mp == Mp) )
Mp++;
// find next valid option
skip_to_start_of_string_either("$", "#");
saved_Mp = Mp;
}
}
required_string("#End");
// add tbl/tbm to multiplayer validation list
extern void fs2netd_add_table_validation(char *tblname);
fs2netd_add_table_validation(filename);
// close localization
lcl_ext_close();
}
void ai_profiles_init()
{
int temp;
if (Ai_profiles_initted)
return;
Num_ai_profiles = 0;
Default_ai_profile = 0;
Default_profile_name[0] = '\0';
// init retail entry first
parse_ai_profiles_tbl(NULL);
// now parse the supplied table (if any)
if (cf_exists_full("ai_profiles.tbl", CF_TYPE_TABLES))
parse_ai_profiles_tbl("ai_profiles.tbl");
// parse any modular tables
parse_modular_table("*-aip.tbm", parse_ai_profiles_tbl);
// set default if specified
temp = ai_profile_lookup(Default_profile_name);
if (temp >= 0)
Default_ai_profile = temp;
Ai_profiles[Default_ai_profile].flags |= AIPF_SMART_SECONDARY_WEAPON_SELECTION;
Ai_profiles_initted = 1;
}
int ai_profile_lookup(char *name)
{
for (int i = 0; i < Num_ai_profiles; i++)
if (!stricmp(name, Ai_profiles[i].profile_name))
return i;
return -1;
}
+156
View File
@@ -0,0 +1,156 @@
/*
* Created by Ian "Goober5000" Warfield for the FreeSpace2 Source Code Project.
* You may not sell or otherwise commercially exploit the source or things you
* create based on the source.
*/
/*
* $Logfile: /Freespace2/code/ai/ai_profiles.h $
* $Revision: 1.4.2.5 $
* $Date: 2007-07-28 22:04:14 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 1.4.2.4 2007/07/15 02:45:48 Goober5000
* fixed a small bug in the lab
* moved WMC's no damage scaling flag to ai_profiles and made it work correctly
* removed my old supercap damage scaling change
* moved Turey's truefire flag to ai_profiles
*
* Revision 1.4.2.3 2007/02/27 01:44:44 Goober5000
* add two features for WCS: specifyable shield/weapon recharge rates, and removal of linked fire penalty
*
* Revision 1.4.2.2 2006/07/02 04:13:43 Goober5000
* bah
*
* Revision 1.4.2.1 2006/07/02 03:39:34 Goober5000
* remove associated AI flags
* --Goober5000
*
* Revision 1.4 2006/04/20 06:32:00 Goober5000
* proper capitalization according to Volition
*
* Revision 1.3 2006/03/20 06:19:03 taylor
* add ai_profiles flag to get rid of limit on minimum speed a docked ship can move
* (not going to Int3() here from < 0.1 speed by default, a support ship actually hit it)
*
* Revision 1.2 2005/11/24 08:46:11 Goober5000
* * cleaned up mission_do_departure
* * fixed a hidden crash (array index being -1; would only
* be triggered for ships w/o subspace drives under certain conditions)
* * removed finding a new fighterbay target because it might screw up missions
* * improved clarity, code flow, and readability :)
* * added custom AI flag for disabling warpouts if navigation subsystem fails
* --Goober5000
*
* Revision 1.1 2005/11/21 02:43:30 Goober5000
* change from "setting" to "profile"; this way makes more sense
* --Goober5000
*
*/
#ifndef _AI_PROFILES_H_
#define _AI_PROFILES_H_
#include "globalincs/pstypes.h"
#include "globalincs/globals.h"
#include "globalincs/systemvars.h"
// flags
#define AIPF_SMART_SHIELD_MANAGEMENT (1 << 0)
#define AIPF_BIG_SHIPS_CAN_ATTACK_BEAM_TURRETS_ON_UNTARGETED_SHIPS (1 << 1)
#define AIPF_SMART_PRIMARY_WEAPON_SELECTION (1 << 2)
#define AIPF_SMART_SECONDARY_WEAPON_SELECTION (1 << 3)
#define AIPF_ALLOW_RAPID_SECONDARY_DUMBFIRE (1 << 4)
#define AIPF_HUGE_TURRET_WEAPONS_IGNORE_BOMBS (1 << 5)
#define AIPF_DONT_INSERT_RANDOM_TURRET_FIRE_DELAY (1 << 6)
#define AIPF_HACK_IMPROVE_NON_HOMING_SWARM_TURRET_FIRE_ACCURACY (1 << 7)
#define AIPF_SHOCKWAVES_DAMAGE_SMALL_SHIP_SUBSYSTEMS (1 << 8)
#define AIPF_NAVIGATION_SUBSYS_GOVERNS_WARP (1 << 9)
#define AIPF_NO_MIN_DOCK_SPEED_CAP (1 << 10)
#define AIPF_DISABLE_LINKED_FIRE_PENALTY (1 << 11)
#define AIPF_DISABLE_WEAPON_DAMAGE_SCALING (1 << 12)
#define AIPF_USE_ADDITIVE_WEAPON_VELOCITY (1 << 13)
#define AIPF_USE_NEWTONIAN_DAMPENING (1 << 14)
#define AIPF_INCLUDE_BEAMS_IN_STAT_CALCS (1 << 15)
#define AIPF_KILL_SCORING_SCALES_WITH_DAMAGE (1 << 16)
#define AIPF_ASSIST_SCORING_SCALES_WITH_DAMAGE (1 << 17)
#define AIPF_ALLOW_MULTI_EVENT_SCORING (1 << 18)
#define AIPF_SMART_AFTERBURNER_MANAGEMENT (1 << 19)
#define AIPF_FIX_LINKED_PRIMARY_BUG (1 << 20)
#define AIPF_PREVENT_TARGETING_BOMBS_BEYOND_RANGE (1 << 21)
#define AIPF_SMART_SUBSYSTEM_TARGETING_FOR_TURRETS (1 << 22)
#define AIPF_FIX_HEAT_SEEKER_STEALTH_BUG (1 << 23)
#define AIPF_MULTI_ALLOW_EMPTY_PRIMARIES (1 << 24)
#define AIPF_MULTI_ALLOW_EMPTY_SECONDARIES (1 << 25)
#define MAX_AI_PROFILES 5
typedef struct ai_profile_t {
char profile_name[NAME_LENGTH];
int flags;
// difficulty-related values
int max_incoming_asteroids[NUM_SKILL_LEVELS]; // max number of asteroids thrown at friendlies
int max_allowed_player_homers[NUM_SKILL_LEVELS]; // max number of simultaneous homing weapons on player
int max_attackers[NUM_SKILL_LEVELS]; // max number of ships that can attack a ship
fix predict_position_delay[NUM_SKILL_LEVELS]; // how long until AI predicts a ship position
float in_range_time[NUM_SKILL_LEVELS]; // seconds to add to time it takes to get enemy in range (only for player's enemies)
float shield_manage_delay[NUM_SKILL_LEVELS]; // how long before AI manages shields (note that the player's team always uses the average skill's delay)
// AI ships link primaries if energy levels greater than these percents
float link_energy_levels_always[NUM_SKILL_LEVELS]; // always link
float link_energy_levels_maybe[NUM_SKILL_LEVELS]; // link if hull strength low
// AI ships link primaries if ammunition levels greater than these percents
float link_ammo_levels_always[NUM_SKILL_LEVELS]; // always link
float link_ammo_levels_maybe[NUM_SKILL_LEVELS]; // link if hull strength low
// difficulty-related scales
float cmeasure_life_scale[NUM_SKILL_LEVELS]; // life of countermeasures
float cmeasure_fire_chance[NUM_SKILL_LEVELS]; // chance a countermeasure will be fired based on skill level (also scaled by ai_class)
float weapon_energy_scale[NUM_SKILL_LEVELS]; // weapon energy available
float shield_energy_scale[NUM_SKILL_LEVELS]; // shield energy available
float afterburner_recharge_scale[NUM_SKILL_LEVELS]; // speed of afterburner recharge
float player_damage_scale[NUM_SKILL_LEVELS]; // damage applied to the player
float subsys_damage_scale[NUM_SKILL_LEVELS]; // damage applied to a player subsystem
float beam_friendly_damage_cap[NUM_SKILL_LEVELS]; // damage cap values for friendly beam fire
float turn_time_scale[NUM_SKILL_LEVELS]; // speed at which enemy ships turn
// Multiplicative delay factors for increasing skill levels.
float ship_fire_delay_scale_hostile[NUM_SKILL_LEVELS];
float ship_fire_delay_scale_friendly[NUM_SKILL_LEVELS];
// Multiplicative secondary delay factors for increasing skill levels.
float ship_fire_secondary_delay_scale_hostile[NUM_SKILL_LEVELS];
float ship_fire_secondary_delay_scale_friendly[NUM_SKILL_LEVELS];
// Maximum turrets of one ship allowed to shoot the same target
int max_turret_ownage_target[NUM_SKILL_LEVELS];
int max_turret_ownage_player[NUM_SKILL_LEVELS];
// percentage of damage caused required for a kill/assist
float kill_percentage_scale[NUM_SKILL_LEVELS];
float assist_percentage_scale[NUM_SKILL_LEVELS];
// percentage of the capships score given to other team mates on a kill
float assist_award_percentage_scale[NUM_SKILL_LEVELS];
} ai_profile_t;
extern int Num_ai_profiles;
extern int Default_ai_profile;
extern ai_profile_t Ai_profiles[MAX_AI_PROFILES];
void ai_profiles_init();
int ai_profile_lookup(char *name);
#endif
@@ -9,13 +9,37 @@
/*
* $Logfile: /Freespace2/code/Ship/AiBig.cpp $
* $Revision: 1.6 $
* $Date: 2005-09-01 04:14:03 $
* $Author: taylor $
* $Revision: 1.12.2.2 $
* $Date: 2007-07-15 04:19:32 $
* $Author: Goober5000 $
*
* C module for AI code related to large ships
*
* $Log: not supported by cvs2svn $
* Revision 1.12.2.1 2007/02/20 04:19:09 Goober5000
* the great big duplicate model removal commit
*
* Revision 1.12 2006/02/25 21:46:59 Goober5000
* spelling
*
* Revision 1.11 2006/01/13 03:30:59 Goober5000
* übercommit of custom IFF stuff :)
*
* Revision 1.10 2005/11/21 02:43:30 Goober5000
* change from "setting" to "profile"; this way makes more sense
* --Goober5000
*
* Revision 1.9 2005/11/21 00:46:05 Goober5000
* add ai_settings.tbl
* --Goober5000
*
* Revision 1.8 2005/10/22 22:22:41 Goober5000
* rolled back UnknownPlayer's commit
* --Goober5000
*
* Revision 1.6 2005/09/01 04:14:03 taylor
* various weapon_range cap fixes for primary, secondary weapons and hud targetting info
*
* Revision 1.5 2005/07/27 18:27:49 Goober5000
* verified that submode_start_time is updated whenever submode is changed
* --Goober5000
@@ -80,7 +104,7 @@
* --Goober5000
*
* Revision 2.2 2002/10/19 19:29:28 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
* initial commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.1 2002/08/01 01:41:09 penguin
* The big include file move
@@ -415,6 +439,7 @@
#include "weapon/weapon.h"
#include "io/timer.h"
#include "mission/missionparse.h"
#include "iff_defs/iff_defs.h"
@@ -472,11 +497,12 @@ void ai_bpap(object *objp, vec3d *attacker_objp_pos, vec3d *attacker_objp_fvec,
model_octant *octp;
polymodel *pm;
int i, q, octs[4];
ship_info *sip = &Ship_info[Ships[objp->instance].ship_info_index];
best_point = objp->pos;
nearest_dist = weapon_travel_dist;
model_which_octant_distant_many(attacker_objp_pos, Ships[objp->instance].modelnum, &objp->orient, &objp->pos, &pm, octs);
model_which_octant_distant_many(attacker_objp_pos, sip->model_num, &objp->orient, &objp->pos, &pm, octs);
num_tries = (int) (vm_vec_dist(&objp->pos, attacker_objp_pos)/objp->radius);
@@ -551,7 +577,7 @@ done_1:
}
mc_info mc;
mc.model_num = Ships[objp->instance].modelnum;
mc.model_num = sip->model_num;
mc.orient = &objp->orient;
mc.pos = &objp->pos;
mc.p0 = attacker_objp_pos;
@@ -753,7 +779,7 @@ int ai_big_maybe_follow_subsys_path(int do_dot_check)
int subsys_path_num, subsys_in_sight, checked_sight;
float dist;
pm = model_get( Ships[Pl_objp->instance].modelnum );
pm = model_get( Ship_info[Ships[Pl_objp->instance].ship_info_index].model_num );
// If attacking a subsystem, ensure that we have an unobstructed line of sight... if not, then move
// towards path linked to subsystem
@@ -768,8 +794,8 @@ int ai_big_maybe_follow_subsys_path(int do_dot_check)
aip->path_subsystem_next_check = timestamp(1500);
// get world pos of eye (stored in geye)
ep = &(pm->view_positions[0] );
model_find_world_point( &geye, &ep->pnt, Ships[Pl_objp->instance].modelnum, 0, &Pl_objp->orient, &Pl_objp->pos );
ep = &(pm->view_positions[Ships[Pl_objp->instance].current_viewpoint]);
model_find_world_point( &geye, &ep->pnt, pm->id, 0, &Pl_objp->orient, &Pl_objp->pos );
// get world pos of subsystem
vm_vec_unrotate(&gsubpos, &aip->targeted_subsys->system_info->pnt, &En_objp->orient);
@@ -891,7 +917,7 @@ int ai_big_maybe_start_strafe(ai_info *aip, ship_info *sip)
test_objp = &Objects[so->objnum];
test_sp = &Ships[test_objp->instance];
if ( test_sp->team != Ships[Pl_objp->instance].team ) {
if ( iff_x_attacks_y(Ships[Pl_objp->instance].team, test_sp->team) ) {
if ( Ship_info[test_sp->ship_info_index].flags & SIF_SMALL_SHIP ) {
dist_squared = vm_vec_dist_squared(&Pl_objp->pos, &test_objp->pos);
if ( dist_squared < ENTER_STRAFE_THREAT_DIST_SQUARED ) {
@@ -924,7 +950,7 @@ void ai_big_chase_attack(ai_info *aip, ship_info *sip, vec3d *enemy_pos, float d
if (Pl_objp->phys_info.speed < 3.0f) {
object *objp;
for ( objp = GET_FIRST(&obj_used_list); objp !=END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) {
if ((objp->type == OBJ_WEAPON) && (Weapons[objp->instance].team != Ships[Pl_objp->instance].team))
if ((objp->type == OBJ_WEAPON) && (iff_x_attacks_y(Ships[Pl_objp->instance].team, Weapons[objp->instance].team)))
if (Weapon_info[objp->instance].subtype == WP_LASER) {
vec3d in_vec;
float dist;
@@ -1227,7 +1253,7 @@ void ai_big_chase()
} else if (En_objp->flags & OF_PROTECTED) { // If protected and we're not attacking a subsystem, stop attacking!
update_aspect_lock_information(aip, &vec_to_enemy, dist_to_enemy - En_objp->radius, En_objp->radius);
aip->target_objnum = -1;
if (find_enemy(Pl_objp-Objects, MAX_ENEMY_DISTANCE, Skill_level_max_attackers[Game_skill_level]) == -1) {
if (find_enemy(Pl_objp-Objects, MAX_ENEMY_DISTANCE, The_mission.ai_profile->max_attackers[Game_skill_level]) == -1) {
ai_do_default_behavior(Pl_objp);
return;
}
@@ -1265,7 +1291,7 @@ void ai_big_chase()
case SM_ATTACK:
case SM_SUPER_ATTACK:
case SM_ATTACK_FOREVER:
ai_big_chase_attack(aip, sip, &enemy_pos, dist_to_enemy, shipp->modelnum);
ai_big_chase_attack(aip, sip, &enemy_pos, dist_to_enemy, sip->model_num);
break;
case SM_EVADE:
@@ -1497,7 +1523,7 @@ void ai_big_attack_get_data(vec3d *enemy_pos, float *dist_to_enemy, float *dot_t
predicted_enemy_pos=*enemy_pos;
} else {
vec3d gun_pos, pnt;
polymodel *po = model_get( shipp->modelnum );
polymodel *po = model_get( Ship_info[shipp->ship_info_index].model_num );
float weapon_speed;
// Compute position of gun in absolute space and use that as fire position.
@@ -1962,7 +1988,7 @@ void ai_big_strafe_maybe_attack_turret(object *ship_objp, object *weapon_objp)
// the ai will not always go after different ships firing beams at them.
// Approx 1/4 chance we'll go after the other ship's beam.
bool attack_turret_on_different_ship = (The_mission.flags & MISSION_FLAG_USE_NEW_AI)
bool attack_turret_on_different_ship = (The_mission.ai_profile->flags & AIPF_BIG_SHIPS_CAN_ATTACK_BEAM_TURRETS_ON_UNTARGETED_SHIPS)
&& (Weapon_info[weapon_objp->instance].wi_flags & WIF_BEAM) && (frand()*100 < 25.0f);
// unless we're making an exception, we should only attack a turret if it sits on the current target
File renamed without changes.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -9,13 +9,28 @@
/*
* $Logfile: /Freespace2/code/Ship/AiGoals.h $
* $Revision: 1.2 $
* $Date: 2005-07-13 02:50:48 $
* $Revision: 1.6 $
* $Date: 2006-04-20 06:32:00 $
* $Author: Goober5000 $
*
* <insert description of file here>
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2006/02/20 02:13:07 Goober5000
* added ai-ignore-new which hopefully should fix the ignore bug
* --Goober5000
*
* Revision 1.4 2006/02/19 22:00:09 Goober5000
* restore original ignore behavior and remove soon-to-be-obsolete ai-chase-any-except
* --Goober5000
*
* Revision 1.3 2005/12/29 08:08:33 wmcoolmon
* Codebase commit, most notably including objecttypes.tbl
*
* Revision 1.2 2005/07/13 02:50:48 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 1.1 2005/03/25 06:45:13 wmcoolmon
* Initial AI code move commit - note that aigoals.cpp has some escape characters in it, I'm not sure if this is really a problem.
*
@@ -149,10 +164,10 @@
* add more stuff to save/restore
*
* 24 7/24/97 4:55p Allender
* added ai-evade-ship to fred and to Freespace
* added ai-evade-ship to Fred and to FreeSpace
*
* 23 7/17/97 4:23p Allender
* ai-guard-wing now in both Fred and Freespace
* ai-guard-wing now in both Fred and FreeSpace
*
* 22 7/15/97 11:57a Hoffoss
* Added a general ai goal reference update mode.
@@ -168,6 +183,7 @@
#define _AIGOALS_H
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
struct wing;
struct ai_info;
@@ -179,6 +195,7 @@ struct ai_goal;
// ai_update_goal_references() and query_referenced_in_ai_goals() or else risk breaking
// Fred. If the goal you add doesn't have a target (such as chase_any), then you don't have
// to worry about doing this. Also add it to list in Fred\Management.cpp, and let Hoffoss know!
// WMC - Oh and add them to Ai_goal_names plz. TY! :)
#define AI_GOAL_CHASE (1<<1)
#define AI_GOAL_DOCK (1<<2) // used for undocking as well
#define AI_GOAL_WAYPOINTS (1<<3)
@@ -201,26 +218,20 @@ struct ai_goal;
#define AI_GOAL_KEEP_SAFE_DISTANCE (1<<18)
#define AI_GOAL_REARM_REPAIR (1<<19)
// resume regular goals
#define AI_GOAL_STAY_STILL (1<<20)
#define AI_GOAL_PLAY_DEAD (1<<21)
#define AI_GOAL_CHASE_WEAPON (1<<22)
// Goober5000: new goals go here
// Goober5000: this new goal is special: it doesn't take the usual kind of argument; it takes
// many arguments, requiring a modification to the ai_goal data type. Therefore, I didn't
// add it to ai_update_goal_references() or ai_query_goal_references(). I also didn't add it
// to the list in Fred\Management.cpp, because it can't be specified as an initial order - it
// can only be specified through a sexp.
#define AI_GOAL_CHASE_ANY_EXCEPT (1<<23) // hey Hoffoss! I added a new goal! :p
#define AI_GOAL_FLY_TO_SHIP (1<<24) // kazan
#define AI_GOAL_FLY_TO_SHIP (1<<23) // kazan
#define AI_GOAL_IGNORE_NEW (1<<24) // Goober5000
// now the masks for ship types
// Goober5000: added AI_GOAL_STAY_NEAR_SHIP and AI_GOAL_KEEP_SAFE_DISTANCE as valid for fighters
#define AI_GOAL_ACCEPT_FIGHTER ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_CHASE | AI_GOAL_WAYPOINTS | AI_GOAL_WAYPOINTS_ONCE | AI_GOAL_WARP | AI_GOAL_DESTROY_SUBSYSTEM | AI_GOAL_CHASE_WING | AI_GOAL_GUARD | AI_GOAL_DISABLE_SHIP | AI_GOAL_DISARM_SHIP | AI_GOAL_CHASE_ANY | AI_GOAL_IGNORE | AI_GOAL_GUARD_WING | AI_GOAL_EVADE_SHIP | AI_GOAL_STAY_STILL | AI_GOAL_PLAY_DEAD | AI_GOAL_STAY_NEAR_SHIP | AI_GOAL_KEEP_SAFE_DISTANCE | AI_GOAL_CHASE_ANY_EXCEPT )
//WMC - Don't need these anymore. Whee!
/*
#define AI_GOAL_ACCEPT_FIGHTER ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_CHASE | AI_GOAL_WAYPOINTS | AI_GOAL_WAYPOINTS_ONCE | AI_GOAL_WARP | AI_GOAL_DESTROY_SUBSYSTEM | AI_GOAL_CHASE_WING | AI_GOAL_GUARD | AI_GOAL_DISABLE_SHIP | AI_GOAL_DISARM_SHIP | AI_GOAL_CHASE_ANY | AI_GOAL_IGNORE | AI_GOAL_IGNORE_NEW | AI_GOAL_GUARD_WING | AI_GOAL_EVADE_SHIP | AI_GOAL_STAY_STILL | AI_GOAL_PLAY_DEAD | AI_GOAL_STAY_NEAR_SHIP | AI_GOAL_KEEP_SAFE_DISTANCE )
#define AI_GOAL_ACCEPT_BOMBER ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_ACCEPT_FIGHTER | AI_GOAL_STAY_NEAR_SHIP )
#define AI_GOAL_ACCEPT_STEALTH ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_ACCEPT_FIGHTER | AI_GOAL_STAY_NEAR_SHIP )
#define AI_GOAL_ACCEPT_TRANSPORT ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_CHASE | AI_GOAL_CHASE_WING | AI_GOAL_DOCK | AI_GOAL_WAYPOINTS | AI_GOAL_WAYPOINTS_ONCE | AI_GOAL_WARP | AI_GOAL_UNDOCK | AI_GOAL_STAY_STILL | AI_GOAL_PLAY_DEAD| AI_GOAL_STAY_NEAR_SHIP )
@@ -233,9 +244,15 @@ struct ai_goal;
#define AI_GOAL_ACCEPT_SUPERCAP ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_ACCEPT_CAPITAL | AI_GOAL_STAY_NEAR_SHIP )
#define AI_GOAL_ACCEPT_SUPPORT ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_DOCK | AI_GOAL_UNDOCK | AI_GOAL_WAYPOINTS | AI_GOAL_WAYPOINTS_ONCE | AI_GOAL_STAY_NEAR_SHIP | AI_GOAL_KEEP_SAFE_DISTANCE | AI_GOAL_STAY_STILL | AI_GOAL_PLAY_DEAD)
#define AI_GOAL_ACCEPT_ESCAPEPOD ( AI_GOAL_FLY_TO_SHIP | AI_GOAL_ACCEPT_TRANSPORT| AI_GOAL_STAY_NEAR_SHIP )
*/
#define MAX_AI_DOCK_NAMES 25
typedef flag_def_list ai_goal_list;
extern ai_goal_list Ai_goal_names[];
extern int Num_ai_goals;
extern int Num_ai_dock_names;
extern char Ai_dock_names[MAX_AI_DOCK_NAMES][NAME_LENGTH];
@@ -246,7 +263,10 @@ extern void ai_post_process_mission();
extern void ai_maybe_add_form_goal( wing *wingp );
extern void ai_process_mission_orders( int objnum, ai_info *aip );
extern int ai_goal_num(ai_goal *goals);
// adds goals to ships/wing through sexpressions
extern void ai_add_ship_goal_scripting(int mode, int submode, int priority, char *shipname, ai_info *aip);
extern void ai_add_ship_goal_sexp( int sexp, int type, ai_info *aip );
extern void ai_add_wing_goal_sexp( int sexp, int type, int wingnum );
extern void ai_add_goal_sub_sexp( int sexp, int type, ai_goal *aigp );
@@ -10,9 +10,6 @@
#ifndef _AIINTERNAL_H
#define _AIINTERNAL_H
//Returns the enemy team mask for the specified subobject
int get_enemy_team_mask(int objnum);
//Returns true if the specified object is a stealth ship, false if not
bool is_object_stealth_ship(object* objp);
File renamed without changes.
File diff suppressed because it is too large. Load diff
@@ -9,13 +9,25 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.cpp $
* $Revision: 2.17 $
* $Date: 2005-05-28 19:40:59 $
* $Revision: 2.19.2.2 $
* $Date: 2006-09-11 01:00:27 $
* $Author: taylor $
*
* C module for playing back anim files
*
* $Log: not supported by cvs2svn $
* Revision 2.19.2.1 2006/06/22 14:59:44 taylor
* fix various things that Valgrind has been complaining about
*
* Revision 2.19 2006/03/21 00:27:27 taylor
* some minor cleanup
*
* Revision 2.18 2005/11/13 06:39:38 taylor
* remove Cmdline_cache_ani support, it only worked if not in a VP and only on streaming ani so it was pretty much useless
*
* Revision 2.17 2005/05/28 19:40:59 taylor
* fix ani corruption detection so that certain streaming anis don't hit it (check was wrong anyway)
*
* Revision 2.16 2005/05/23 05:58:31 taylor
* quick catch for some corrupted anis, only a partial fix but it will do until something
* a bit more heavy duty comes along in the near future
@@ -368,7 +380,7 @@ void anim_render_one(int screen_id, anim_instance *ani, float frametime)
}
}
MONITOR(NumANIPlayed);
MONITOR(NumANIPlayed)
// Setup an anim_play_struct for passing into anim_play(). Will fill in default values, which you
// can then change before calling anim_play().
@@ -456,6 +468,7 @@ anim_instance *anim_play(anim_play_struct *aps)
}
instance->frame = (ubyte *) vm_malloc(instance->parent->width * instance->parent->height * 2);
Assert( instance->frame != NULL );
memset( instance->frame, 0, instance->parent->width * instance->parent->height * 2 );
instance->time_elapsed = 0.0f;
instance->stop_at = aps->stop_at;
instance->x = aps->x;
@@ -895,7 +908,7 @@ void anim_release_all_instances(int screen_id)
// 2 | width
// 2 | height
// 2 | number of frames
// 2 | packer code
// 1 | packer code
// 763 | palette
// 2 | number of key frames
// 2 | key frame number } repeats
@@ -951,14 +964,13 @@ void anim_read_header(anim *ptr, CFILE *fp)
if (diff != 0) {
if (ptr->height > 16) {
mprintf(("ANI %s with size %dx%d (%.1f%% wasted)\n", ptr->name, ptr->height, ptr->height, waste));
mprintf(("ANI %s with size %dx%d (%.1f%% wasted)\n", ptr->name, ptr->width, ptr->height, waste));
}
}
#endif
ptr->total_frames = cfread_short(fp);
cfread(&ptr->packer_code, 1, 1, fp);
ptr->packer_code = INTEL_SHORT(ptr->packer_code);
ptr->packer_code = cfread_ubyte(fp);
cfread(&ptr->palette, 256, 3, fp);
ptr->num_keys = cfread_short(fp);
@@ -986,17 +998,13 @@ void anim_read_header(anim *ptr, CFILE *fp)
// returns: pointer to anim that is loaded => sucess
// NULL => failure
//
anim *anim_load(char *real_filename, int file_mapped)
anim *anim_load(char *real_filename, int cf_dir_type, int file_mapped)
{
anim *ptr;
CFILE *fp;
int count,idx;
char name[_MAX_PATH];
if(Cmdline_cache_ani) {
file_mapped = PAGE_FROM_MEM;
}
Assert ( real_filename != NULL );
strcpy( name, real_filename );
@@ -1015,7 +1023,7 @@ anim *anim_load(char *real_filename, int file_mapped)
}
if (!ptr) {
fp = cfopen(name, "rb");
fp = cfopen(name, "rb", CFILE_NORMAL, cf_dir_type);
if ( !fp )
return NULL;
@@ -1072,14 +1080,14 @@ anim *anim_load(char *real_filename, int file_mapped)
if ( file_mapped == PAGE_FROM_MEM) {
// Try mapping the file to memory
ptr->flags |= ANF_MEM_MAPPED;
ptr->cfile_ptr = cfopen(name, "rb", CFILE_MEMORY_MAPPED);
ptr->cfile_ptr = cfopen(name, "rb", CFILE_MEMORY_MAPPED, cf_dir_type);
}
// couldn't memory-map file... must be in a packfile, so stream manually
if ( file_mapped && !ptr->cfile_ptr ) {
ptr->flags &= ~ANF_MEM_MAPPED;
ptr->flags |= ANF_STREAMED;
ptr->cfile_ptr = cfopen(name, "rb");
ptr->cfile_ptr = cfopen(name, "rb", CFILE_NORMAL, cf_dir_type);
}
ptr->cache = NULL;
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.h $
* $Revision: 2.6 $
* $Date: 2005-07-13 02:50:48 $
* $Author: Goober5000 $
* $Revision: 2.6.2.1 $
* $Date: 2006-09-08 06:14:43 $
* $Author: taylor $
*
* Header file for playing back anim files
*
* $Log: not supported by cvs2svn $
* Revision 2.6 2005/07/13 02:50:48 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.5 2005/04/05 05:53:14 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -122,11 +126,11 @@
#define __ANIMPLAY_H__
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
struct anim;
struct anim_info;
struct anim_instance;
struct CFILE;
// structure passed in when playing an anim. Talk about overkill..
typedef struct {
@@ -149,7 +153,7 @@ enum
{
PAGE_FROM_MEM = 0,
PAGE_FROM_DISK = 1,
PAGE_FROM_DISK_FORCED = 2,
PAGE_FROM_DISK_FORCED = 2
};
extern int Anim_paused;
@@ -166,7 +170,7 @@ int anim_stop_playing(anim_instance* anim_instance);
int anim_show_next_frame(anim_instance *instance, float frametime);
void anim_release_all_instances(int screen_id = 0);
void anim_release_render_instance(anim_instance* instance);
anim *anim_load(char *name, int file_mapped = PAGE_FROM_MEM);
anim *anim_load(char *name, int cf_dir_type = CF_TYPE_ANY, int file_mapped = PAGE_FROM_MEM);
int anim_free(anim *ptr);
int anim_playing(anim_instance *ai);
int anim_write_frames_out(char *filename);
@@ -9,8 +9,8 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.cpp $
* $Revision: 2.10 $
* $Date: 2005-05-24 03:13:36 $
* $Revision: 2.13.2.2 $
* $Date: 2007-10-28 16:32:06 $
* $Author: taylor $
*
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
@@ -18,6 +18,21 @@
* utilizing an Anim), and getting getting frames of the Anim.
*
* $Log: not supported by cvs2svn $
* Revision 2.13.2.1 2006/06/22 14:59:44 taylor
* fix various things that Valgrind has been complaining about
*
* Revision 2.13 2006/03/21 00:27:27 taylor
* some minor cleanup
*
* Revision 2.12 2006/01/22 19:57:35 wmcoolmon
* 0...1...2...4?
*
* Revision 2.11 2005/11/13 06:40:19 taylor
* add support for 8/16/24/32 bit output from ani frame decoder
*
* Revision 2.10 2005/05/24 03:13:36 taylor
* extra check to make sure that RLE reading never goes over frame size in new ANI formats
*
* Revision 2.9 2005/05/23 05:58:31 taylor
* quick catch for some corrupted anis, only a partial fix but it will do until something
* a bit more heavy duty comes along in the near future
@@ -215,8 +230,8 @@
int packer_code = PACKER_CODE;
int transparent_code = 254;
const int packer_code = PACKER_CODE;
const int transparent_code = 254;
void anim_check_for_palette_change(anim_instance *instance) {
if ( instance->parent->screen_sig != gr_screen.signature ) {
@@ -257,11 +272,10 @@ anim_instance *init_anim_instance(anim *ptr, int bpp)
inst->stop_now = FALSE;
inst->aa_color = NULL;
if(bpp == 16){
inst->frame = (ubyte *) vm_malloc(inst->parent->width * inst->parent->height * 2);
} else {
inst->frame = (ubyte *) vm_malloc(inst->parent->width * inst->parent->height);
}
inst->frame = (ubyte *) vm_malloc(inst->parent->width * inst->parent->height * (bpp >> 3));
Assert( inst->frame != NULL );
memset( inst->frame, 0, inst->parent->width * inst->parent->height * (bpp >> 3) );
return inst;
}
@@ -834,7 +848,7 @@ void convert_24_to_16(int bit_24, ushort *bit_16)
ubyte *pixel = (ubyte*)&bit_24;
ubyte alpha = 1;
bm_set_components((ubyte*)bit_16, (ubyte*)&pixel[0], (ubyte*)&pixel[1], (ubyte*)&pixel[2], &alpha);
bm_set_components((ubyte*)bit_16, (ubyte*)&pixel[0], (ubyte*)&pixel[1], (ubyte*)&pixel[2], &alpha);
}
// unpack a pixel given the passed index and the anim_instance's palette, return bytes stuffed
@@ -845,8 +859,9 @@ int unpack_pixel(anim_instance *ai, ubyte *data, ubyte pix, int aabitmap, int bp
ubyte bit_8 = 0;
ubyte al = 0;
ubyte r, g, b;
int pixel_size = (bpp / 8);
anim *a = ai->parent;
Assert(a);
Assert(a);
// if this is an aabitmap, don't run through the palette
if(aabitmap){
@@ -863,35 +878,61 @@ int unpack_pixel(anim_instance *ai, ubyte *data, ubyte pix, int aabitmap, int bp
} else {
// if the pixel value is 255, or is the xparent color, make it so
if(((a->palette[pix*3] == a->xparent_r) && (a->palette[pix*3+1] == a->xparent_g) && (a->palette[pix*3+2] == a->xparent_b)) ){
r = b = 0;
g = 255;
bm_set_components((ubyte*)&bit_16, &r, &g, &b, &al);
} else {
// stuff the 24 bit value
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
if (pixel_size > 2) {
bit_24 = 0;
} else {
r = b = 0;
g = 255;
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
bm_set_components((ubyte*)&bit_16, &r, &g, &b, &al);
}
} else {
if (pixel_size > 2) {
ubyte pixel[4];
pixel[0] = ai->parent->palette[pix * 3 + 2];
pixel[1] = ai->parent->palette[pix * 3 + 1];
pixel[2] = ai->parent->palette[pix * 3];
pixel[3] = 255;
memcpy(&bit_24, pixel, sizeof(int));
if (pixel_size == 4) {
bit_24 = INTEL_INT(bit_24);
}
} else {
// stuff the 24 bit value
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
}
}
}
// stuff the pixel
switch(bpp){
case 16 :
memcpy(data, &bit_16, sizeof(ushort));
return sizeof(ushort);
switch (bpp) {
case 32:
case 24:
memcpy(data, &bit_24, pixel_size);
break;
case 8 :
*data = bit_8;
return sizeof(ubyte);
case 16:
memcpy(data, &bit_16, pixel_size);
break;
case 8:
*data = bit_8;
break;
default:
Int3();
return 0;
}
Int3();
return 0;
return pixel_size;
}
// unpack a pixel given the passed index and the anim_instance's palette, return bytes stuffed
int unpack_pixel_count(anim_instance *ai, ubyte *data, ubyte pix, int count, int aabitmap, int bpp)
int unpack_pixel_count(anim_instance *ai, ubyte *data, ubyte pix, int count = 0, int aabitmap = 0, int bpp = 8)
{
int bit_24;
int idx;
@@ -899,6 +940,7 @@ int unpack_pixel_count(anim_instance *ai, ubyte *data, ubyte pix, int count, int
ushort bit_16 = 0;
ubyte bit_8 = 0;
anim *a = ai->parent;
int pixel_size = (bpp / 8);
ubyte r, g, b;
Assert(a);
@@ -917,34 +959,55 @@ int unpack_pixel_count(anim_instance *ai, ubyte *data, ubyte pix, int count, int
} else {
// if the pixel value is 255, or is the xparent color, make it so
if(((a->palette[pix*3] == a->xparent_r) && (a->palette[pix*3+1] == a->xparent_g) && (a->palette[pix*3+2] == a->xparent_b)) ){
r = b = 0;
g = 255;
bm_set_components((ubyte*)&bit_16, &r, &g, &b, &al);
if (pixel_size > 2) {
bit_24 = 0;
} else {
r = b = 0;
g = 255;
bm_set_components((ubyte*)&bit_16, &r, &g, &b, &al);
}
} else {
// stuff the 24 bit value
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
if (pixel_size > 2) {
ubyte pixel[4];
pixel[0] = ai->parent->palette[pix * 3 + 2];
pixel[1] = ai->parent->palette[pix * 3 + 1];
pixel[2] = ai->parent->palette[pix * 3];
pixel[3] = 255;
memcpy(&bit_24, pixel, sizeof(int));
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
if (pixel_size == 4) {
bit_24 = INTEL_INT(bit_24);
}
} else {
// stuff the 24 bit value
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
}
}
}
// stuff the pixel
for(idx=0; idx<count; idx++){
switch(bpp){
case 16 :
memcpy(data + (idx*2), &bit_16, sizeof(ushort));
break;
case 8 :
*(data + idx) = bit_8;
break;
}
for (idx=0; idx<count; idx++) {
switch (bpp) {
case 32:
case 24:
memcpy(data + (idx * pixel_size), &bit_24, pixel_size);
break;
case 16:
memcpy(data + (idx * pixel_size), &bit_16, pixel_size);
break;
case 8:
*(data + idx) = bit_8;
break;
}
}
if(bpp == 16){
return sizeof(ushort) * count;
}
return sizeof(ubyte) * count;
return (pixel_size * count);
}
// ptr = packed data to unpack
@@ -955,7 +1018,7 @@ ubyte *unpack_frame(anim_instance *ai, ubyte *ptr, ubyte *frame, int size, ubyte
{
int xlate_pal, value, count = 0;
int stuffed;
int pixel_size = (bpp == 16) ? 2 : 1;
int pixel_size = (bpp / 8);
if ( pal_translate == NULL ) {
xlate_pal = 0;
@@ -1142,7 +1205,7 @@ int unpack_frame_from_file(anim_instance *ai, ubyte *frame, int size, ubyte *pal
int xlate_pal, value, count = 0;
int offset = 0;
int stuffed;
int pixel_size = (bpp == 16) ? 2 : 1;
int pixel_size = (bpp / 8);
if ( pal_translate == NULL ) {
xlate_pal = 0;
@@ -9,15 +9,19 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.h $
* $Revision: 2.5 $
* $Date: 2005-07-13 02:50:48 $
* $Author: Goober5000 $
* $Revision: 2.6 $
* $Date: 2006-03-21 00:27:27 $
* $Author: taylor $
*
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
* Anim files. Also handles Anim loading, creating Anim instances (for
* utilizing an Anim), and getting getting frames of the Anim.
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2005/07/13 02:50:48 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.4 2005/04/05 05:53:14 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -248,8 +252,6 @@ typedef struct anim_instance {
int loop_count; // starts at 0, and is incremented each time it loops
} anim_instance;
extern int packer_code;
int pack_key_frame(ubyte *frame, ubyte *save, long size, long max, int compress_type);
int pack_frame(ubyte *frame, ubyte *frame2, ubyte *save, long size, long max, int compress_type);
@@ -9,13 +9,103 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.cpp $
* $Revision: 2.20 $
* $Date: 2005-07-22 10:18:36 $
* $Author: Goober5000 $
* $Revision: 2.35.2.12 $
* $Date: 2007-12-28 02:10:34 $
* $Author: Backslash $
*
* C module for asteroid code
*
* $Log: not supported by cvs2svn $
* Revision 2.35.2.11 2007/09/02 02:07:38 Goober5000
* added fixes for #1415 and #1483, made sure every read_file_text had a corresponding setjmp, and sync'd the parse error messages between HEAD and stable
*
* Revision 2.35.2.10 2007/05/28 18:27:32 wmcoolmon
* Added armor support for asteroid, debris, ship, and beam damage
*
* Revision 2.35.2.9 2007/02/20 04:19:09 Goober5000
* the great big duplicate model removal commit
*
* Revision 2.35.2.8 2007/02/11 09:35:11 taylor
* add VALID_FNAME() macro and put it around a few places (more to come)
* clean out some old variables
* move CLAMP() macro from opengl header to global header
* update COUNT_ESTIMATE to match new bmpman changes
*
* Revision 2.35.2.7 2006/12/07 17:53:08 taylor
* a little clean up for bits of code that isn't used
*
* Revision 2.35.2.6 2006/11/15 00:36:08 taylor
* various bits of little cleanup
* get rid of some more compiler warnings
*
* Revision 2.35.2.5 2006/09/11 01:15:03 taylor
* fixes for stuff_string() bounds checking
*
* Revision 2.35.2.4 2006/08/27 18:12:38 taylor
* make Species_info[] and Asteroid_info[] dynamic
*
* Revision 2.35.2.3 2006/08/19 04:38:46 taylor
* maybe optimize the (PI/2), (PI*2) and (RAND_MAX/2) stuff a little bit
*
* Revision 2.35.2.2 2006/07/06 04:06:00 Goober5000
* 1) complete (almost) changeover to reorganized texture mapping system
* 2) finally fix texture animation; textures now animate at the correct speed
* --Goober5000
*
* Revision 2.35.2.1 2006/07/04 07:42:09 Goober5000
* --in preparation for fixing an annoying animated texture bug, reorganize the various texture structs and glow point structs and clarify several parts of the texture code :P
* --this breaks animated glow maps, and animated regular maps still aren't fixed, but these will be remedied shortly
* --Goober5000
*
* Revision 2.35 2006/05/13 07:02:27 taylor
* add lazy (ie, faster) checking of asteroid collisions for time-to-impact
*
* Revision 2.34 2006/01/26 03:23:29 Goober5000
* pare down the pragmas some more
* --Goober5000
*
* Revision 2.33 2006/01/13 03:30:59 Goober5000
* übercommit of custom IFF stuff :)
*
* Revision 2.32 2005/11/21 02:43:30 Goober5000
* change from "setting" to "profile"; this way makes more sense
* --Goober5000
*
* Revision 2.31 2005/11/21 00:46:05 Goober5000
* add ai_settings.tbl
* --Goober5000
*
* Revision 2.30 2005/10/11 12:24:04 taylor
* little cleaner since the two sets weren't needed
*
* Revision 2.29 2005/10/10 17:21:03 taylor
* remove NO_NETWORK
*
* Revision 2.28 2005/10/08 15:37:26 taylor
* fix several asteroid problems, little code duplication but this actually works and is less error prone than the previous method
*
* Revision 2.27 2005/09/25 22:29:35 Kazan
* my bad
*
* Revision 2.26 2005/09/25 22:23:39 Kazan
* correct an error
*
* Revision 2.25 2005/09/25 20:55:28 Goober5000
* oh noes!
* --Goober5000
*
* Revision 2.24 2005/09/25 20:31:42 Goober5000
* okay; everything should be good to go
* --Goober5000
*
* Revision 2.23 2005/09/25 08:25:14 Goober5000
* Okay, everything should now work again. :p Still have to do a little more with the asteroids.
* --Goober5000
*
* Revision 2.20 2005/07/22 10:18:36 Goober5000
* CVS header tweaks
* --Goober5000
*
* Revision 2.19 2005/07/13 02:50:48 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
@@ -57,7 +147,7 @@
*
* Revision 2.7 2004/03/31 05:42:25 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* to indicate which warnings were being disabled
* --Goober5000
*
* Revision 2.6 2004/03/05 09:01:53 Goober5000
@@ -363,12 +453,14 @@
#include "parse/parselo.h"
#include "math/vecmat.h"
#include "model/model.h"
#ifndef NO_NETWORK
#include "species_defs/species_defs.h"
#include "iff_defs/iff_defs.h"
#include "network/multiutil.h"
#include "network/multimsgs.h"
#include "network/multi.h"
#endif
#include "parse/scripting.h"
#include <vector>
//WMC - we want asteroid ability with demo!!
@@ -385,15 +477,15 @@ asteroid_obj Asteroid_obj_list; // head of linked list of asteroid_obj stru
#define LARGE_DEBRIS_WEIGHT 1
int Asteroids_enabled = 1;
int Num_asteroid_types;
int Num_asteroids = 0;
int Asteroid_throw_objnum = -1; // Object index of ship to throw asteroids at.
int Next_asteroid_throw;
asteroid_info Asteroid_info[MAX_DEBRIS_TYPES];
std::vector<asteroid_info> Asteroid_info;
asteroid Asteroids[MAX_ASTEROIDS];
asteroid_field Asteroid_field;
static int Asteroid_impact_explosion_ani;
static float Asteroid_impact_explosion_radius;
@@ -467,6 +559,8 @@ float asteroid_cap_speed(int asteroid_info_index, float speed)
{
float max, double_max;
Assert( asteroid_info_index < (int)Asteroid_info.size() );
max = Asteroid_info[asteroid_info_index].max_speed;
double_max = max * 2;
@@ -555,12 +649,12 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
int rand_base;
// bogus
if(asfieldp == NULL){
if(asfieldp == NULL) {
return NULL;
}
for (n=0; n<MAX_ASTEROIDS; n++ ) {
if ( !(Asteroids[n].flags & AF_USED) ){
for (n=0; n<MAX_ASTEROIDS; n++) {
if (!(Asteroids[n].flags & AF_USED)) {
break;
}
}
@@ -570,7 +664,11 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
return NULL;
}
if((asteroid_type < 0) || (asteroid_type >= Num_asteroid_types)){
if((asteroid_type < 0) || (asteroid_type >= (((int)Species_info.size() + 1) * NUM_DEBRIS_SIZES))) {
return NULL;
}
if((asteroid_subtype < 0) || (asteroid_subtype >= NUM_DEBRIS_POFS)) {
return NULL;
}
@@ -579,19 +677,15 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
asteroid_subtype = 0;
}
if( (asteroid_subtype < 0) || (asteroid_subtype >= MAX_ASTEROID_POFS)){
return NULL;
}
asip = &Asteroid_info[asteroid_type];
// bogus
if(asip->modelp[asteroid_subtype] == NULL){
if(asip->modelp[asteroid_subtype] == NULL) {
return NULL;
}
asp = &Asteroids[n];
asp->type = asteroid_type;
asp->asteroid_type = asteroid_type;
asp->asteroid_subtype = asteroid_subtype;
asp->flags = 0;
asp->flags |= AF_USED;
@@ -616,11 +710,10 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
inner_bound_pos_fixup(asfieldp, &pos);
// vm_set_identity(&orient);
angs.p = frand() * 2*PI;
angs.b = frand() * 2*PI;
angs.h = frand() * 2*PI;
angs.p = frand() * PI2;
angs.b = frand() * PI2;
angs.h = frand() * PI2;
} else {
#ifndef NO_NETWORK
signature = multi_assign_network_signature( MULTI_SIG_ASTEROID );
rand_base = signature;
@@ -630,10 +723,9 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
inner_bound_pos_fixup(asfieldp, &pos);
// vm_set_identity(&orient);
angs.p = static_randf( rand_base++ ) * 2*PI;
angs.b = static_randf( rand_base++ ) * 2*PI;
angs.h = static_randf( rand_base++ ) * 2*PI;
#endif
angs.p = static_randf( rand_base++ ) * PI2;
angs.b = static_randf( rand_base++ ) * PI2;
angs.h = static_randf( rand_base++ ) * PI2;
}
vm_angles_2_matrix(&orient, &angs);
@@ -728,11 +820,9 @@ void asteroid_sub_create(object *parent_objp, int asteroid_type, vec3d *relvec)
if (new_objp == NULL)
return;
#ifndef NO_NETWORK
if ( MULTIPLAYER_MASTER ){
send_asteroid_create( new_objp, parent_objp, asteroid_type, relvec );
}
#endif
// Now, bash some values.
vm_vec_scale_add(&new_objp->pos, &parent_objp->pos, relvec, 0.5f * parent_objp->radius);
@@ -765,6 +855,13 @@ void asteroid_load(int asteroid_info_index, int asteroid_subtype)
asteroid_info *asip;
// int pof_index;
Assert( asteroid_info_index < (int)Asteroid_info.size() );
Assert( asteroid_subtype < NUM_DEBRIS_POFS );
if ( (asteroid_info_index >= (int)Asteroid_info.size()) || (asteroid_subtype >= NUM_DEBRIS_POFS) ) {
return;
}
asip = &Asteroid_info[asteroid_info_index];
// pick one of MAX_ASTEROID_POFS models
@@ -777,6 +874,9 @@ void asteroid_load(int asteroid_info_index, int asteroid_subtype)
// pof_index = 0;
// }
if ( !VALID_FNAME(asip->pof_files[asteroid_subtype]) )
return;
asip->model_num[asteroid_subtype] = model_load( asip->pof_files[asteroid_subtype], 0, NULL );
if (asip->model_num[asteroid_subtype] > -1) {
@@ -793,28 +893,34 @@ void asteroid_load(int asteroid_info_index, int asteroid_subtype)
int get_debris_from_same_group(int index) {
int group_base, group_offset;
group_base = (index / 3) * 3;
group_base = (index / NUM_DEBRIS_SIZES) * NUM_DEBRIS_SIZES;
group_offset = index - group_base;
// group base + offset
// offset is formed by adding 1 or 2 (since 3 in model group) and mapping back in the 0-2 range
return group_base + ((group_offset + rand()%2 + 1) % 3);
return group_base + ((group_offset + rand()%(NUM_DEBRIS_SIZES-1) + 1) % NUM_DEBRIS_SIZES);
}
// returns a weight that depends on asteroid size.
// the weight is then used to determine the frequencty of different sizes of ship debris
int get_debris_weight(int ship_debris_index)
{
if (ship_debris_index % 3 == 0)
return SMALL_DEBRIS_WEIGHT;
int size = ship_debris_index % NUM_DEBRIS_SIZES;
switch (size)
{
case ASTEROID_TYPE_SMALL:
return SMALL_DEBRIS_WEIGHT;
if (ship_debris_index % 3 == 1)
return MEDIUM_DEBRIS_WEIGHT;
case ASTEROID_TYPE_MEDIUM:
return MEDIUM_DEBRIS_WEIGHT;
if (ship_debris_index % 3 == 2)
return LARGE_DEBRIS_WEIGHT;
//Int3();
return 1;
case ASTEROID_TYPE_LARGE:
return LARGE_DEBRIS_WEIGHT;
default:
Int3();
return 1;
}
}
// Create all the asteroids for the mission, called from
@@ -825,8 +931,12 @@ void asteroid_create_all()
// ship_debris_odds_table keeps track of debris type of the next debris piece
// each different type (size) of debris piece has a diffenent weight, smaller weighted more heavily than larger.
// choose next type from table ship_debris_odds_table by rand()%max_weighted_range,
// the first column in ship_debris_odds_table random number *below* which the debris type in the second column is selected.
int ship_debris_odds_table[3][2];
// the threshold *below* which the debris type is selected.
struct {
int random_threshold;
int debris_type;
} ship_debris_odds_table[MAX_ACTIVE_DEBRIS_TYPES];
int max_weighted_range = 0;
if (!Asteroids_enabled)
@@ -842,7 +952,7 @@ void asteroid_create_all()
// get number of ship debris types
if (Asteroid_field.debris_genre == DG_SHIP) {
for (idx=0; idx<3; idx++) {
for (idx=0; idx<MAX_ACTIVE_DEBRIS_TYPES; idx++) {
if (Asteroid_field.field_debris_type[idx] != -1) {
num_debris_types++;
}
@@ -851,8 +961,8 @@ void asteroid_create_all()
// Calculate the odds table
for (idx=0; idx<num_debris_types; idx++) {
int debris_weight = get_debris_weight(Asteroid_field.field_debris_type[idx]);
ship_debris_odds_table[idx][0] = max_weighted_range + debris_weight;
ship_debris_odds_table[idx][1] = Asteroid_field.field_debris_type[idx];
ship_debris_odds_table[idx].random_threshold = max_weighted_range + debris_weight;
ship_debris_odds_table[idx].debris_type = Asteroid_field.field_debris_type[idx];
max_weighted_range += debris_weight;
}
}
@@ -866,19 +976,19 @@ void asteroid_create_all()
if (Asteroid_field.field_debris_type[0] != -1) {
asteroid_load(ASTEROID_TYPE_SMALL, 0);
asteroid_load(ASTEROID_TYPE_MEDIUM, 0);
asteroid_load(ASTEROID_TYPE_BIG, 0);
asteroid_load(ASTEROID_TYPE_LARGE, 0);
}
if (Asteroid_field.field_debris_type[1] != -1) {
asteroid_load(ASTEROID_TYPE_SMALL, 1);
asteroid_load(ASTEROID_TYPE_MEDIUM, 1);
asteroid_load(ASTEROID_TYPE_BIG, 1);
asteroid_load(ASTEROID_TYPE_LARGE, 1);
}
if (Asteroid_field.field_debris_type[2] != -1) {
asteroid_load(ASTEROID_TYPE_SMALL, 2);
asteroid_load(ASTEROID_TYPE_MEDIUM, 2);
asteroid_load(ASTEROID_TYPE_BIG, 2);
asteroid_load(ASTEROID_TYPE_LARGE, 2);
}
}
@@ -888,21 +998,21 @@ void asteroid_create_all()
// For asteroid, load only large asteroids
// get a valid subtype
int subtype = rand() % 3;
int subtype = rand() % NUM_DEBRIS_POFS;
while (Asteroid_field.field_debris_type[subtype] == -1) {
subtype = (subtype + 1) % 3;
subtype = (subtype + 1) % NUM_DEBRIS_POFS;
}
asteroid_create(&Asteroid_field, ASTEROID_TYPE_BIG, subtype);
asteroid_create(&Asteroid_field, ASTEROID_TYPE_LARGE, subtype);
} else {
Assert(num_debris_types > 0);
int rand_choice = rand() % max_weighted_range;
for (idx=0; idx<3; idx++) {
for (idx=0; idx<MAX_ACTIVE_DEBRIS_TYPES; idx++) {
// for ship debris, choose type according to odds table
if (rand_choice < ship_debris_odds_table[idx][0]) {
asteroid_create(&Asteroid_field, ship_debris_odds_table[idx][1], 0);
if (rand_choice < ship_debris_odds_table[idx].random_threshold) {
asteroid_create(&Asteroid_field, ship_debris_odds_table[idx].debris_type, 0);
break;
}
}
@@ -923,10 +1033,8 @@ void asteroid_level_init()
// 0 from this function. We will force a wrap on the clients when server tells us
int asteroid_should_wrap(object *objp, asteroid_field *asfieldp)
{
#ifndef NO_NETWORK
if ( MULTIPLAYER_CLIENT )
return 0;
#endif
if (objp->pos.xyz.x < asfieldp->min_bound.xyz.x) {
return 1;
@@ -1041,8 +1149,6 @@ void asteroid_aim_at_target(object *objp, object *asteroid_objp, float delta_tim
vm_vec_scale_add(&asteroid_objp->last_pos, &asteroid_objp->pos, &asteroid_objp->phys_info.vel, -flFrametime);
}
int Max_incoming_asteroids[NUM_SKILL_LEVELS] = {3, 4, 5, 7, 10};
// Call once per frame to maybe throw an asteroid at a ship.
// "count" asteroids already targeted on
void maybe_throw_asteroid(int count)
@@ -1057,7 +1163,7 @@ void maybe_throw_asteroid(int count)
nprintf(("AI", "Incoming asteroids: %i\n", count));
if (count > Max_incoming_asteroids[Game_skill_level])
if (count > The_mission.ai_profile->max_incoming_asteroids[Game_skill_level])
return;
Next_asteroid_throw = timestamp(1000 + 1200 * count/(Game_skill_level+1));
@@ -1066,11 +1172,11 @@ void maybe_throw_asteroid(int count)
for ( so = GET_FIRST(&Ship_obj_list); so != END_OF_LIST(&Ship_obj_list); so = GET_NEXT(so) ) {
object *A = &Objects[so->objnum];
if (so->objnum == Asteroid_throw_objnum) {
int subtype = rand() % 3;
int subtype = rand() % NUM_DEBRIS_POFS;
while (Asteroid_field.field_debris_type[subtype] == -1) {
subtype = (subtype + 1) % 3;
subtype = (subtype + 1) % NUM_DEBRIS_POFS;
}
object *objp = asteroid_create(&Asteroid_field, ASTEROID_TYPE_BIG, subtype);
object *objp = asteroid_create(&Asteroid_field, ASTEROID_TYPE_LARGE, subtype);
if (objp != NULL) {
asteroid_aim_at_target(A, objp, ASTEROID_MIN_COLLIDE_TIME + frand() * 20.0f);
@@ -1083,11 +1189,9 @@ void maybe_throw_asteroid(int count)
// this line gives too many collision pairs.
// asteroid_update_collide(objp);
#ifndef NO_NETWORK
if ( MULTIPLAYER_MASTER ) {
send_asteroid_throw( objp );
}
#endif
}
}
@@ -1166,10 +1270,8 @@ void asteroid_maybe_reposition(object *objp, asteroid_field *asfieldp)
asteroid_update_collide(objp);
#ifndef NO_NETWORK
if ( MULTIPLAYER_MASTER )
send_asteroid_throw( objp );
#endif
}
}
}
@@ -1184,10 +1286,10 @@ void lerp(float *goal, float f1, float f2, float scale)
void asteroid_process_pre( object *objp, float frame_time)
{
if (Asteroids_enabled) {
vec3d *v, *vv;
// vec3d *v, *vv;
v = &objp->phys_info.vel;
vv = &objp->phys_info.desired_vel;
// v = &objp->phys_info.vel;
// vv = &objp->phys_info.desired_vel;
//nprintf(("AI", "Frm %i: Obj #%2i: Hull: %5.1f Vel: %5.1f %5.1f %5.1f Des: %5.1f %5.1f %5.1f\n", Framecount, objp-Objects, objp->hull_strength, v->xyz.x, v->xyz.y, v->xyz.z, vv->xyz.x, vv->xyz.y, vv->xyz.z));
@@ -1198,8 +1300,6 @@ void asteroid_process_pre( object *objp, float frame_time)
}
}
#pragma warning ( push )
#pragma warning ( disable : 4701 ) // possible use of variable without initialization
int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos, collision_info_struct *asteroid_hit_info)
{
if (!Asteroids_enabled) {
@@ -1221,7 +1321,7 @@ int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos
if ( asteroid_hit_info == NULL ) {
// asteroid weapon collision
Assert( other_obj->type == OBJ_WEAPON );
mc.model_num = Asteroid_info[Asteroids[num].type].model_num[asteroid_subtype]; // Fill in the model to check
mc.model_num = Asteroid_info[Asteroids[num].asteroid_type].model_num[asteroid_subtype]; // Fill in the model to check
model_clear_instance( mc.model_num );
mc.orient = &pasteroid->orient; // The object's orient
mc.pos = &pasteroid->pos; // The object's position
@@ -1280,7 +1380,7 @@ int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos
int mc_ret_val = 0;
if ( asteroid_hit_info->heavy == ship_obj ) { // ship is heavier, so asteroid is sphere. Check sphere collision against ship poly model
mc.model_num = Ships[ship_obj->instance].modelnum; // Fill in the model to check
mc.model_num = Ship_info[Ships[ship_obj->instance].ship_info_index].model_num; // Fill in the model to check
mc.orient = &ship_obj->orient; // The object's orient
mc.radius = pasteroid->radius;
mc.flags = (MC_CHECK_MODEL | MC_CHECK_SPHERELINE);
@@ -1311,7 +1411,7 @@ int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos
model_get_rotating_submodel_list(submodel_list, &num_rotating_submodels, heavy_obj);
// Get polymodel and turn off all rotating submodels, collide against only 1 at a time.
pm = model_get(Ships[heavy_obj->instance].modelnum);
pm = model_get(Ship_info[Ships[heavy_obj->instance].ship_info_index].model_num);
// turn off all rotating submodels and test for collision
int i;
@@ -1402,10 +1502,10 @@ int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos
} else {
// Asteroid is heavier obj
mc.model_num = Asteroid_info[Asteroids[num].type].model_num[asteroid_subtype]; // Fill in the model to check
mc.model_num = Asteroid_info[Asteroids[num].asteroid_type].model_num[asteroid_subtype]; // Fill in the model to check
model_clear_instance( mc.model_num );
mc.orient = &pasteroid->orient; // The object's orient
mc.radius = model_get_core_radius( Ships[ship_obj->instance].modelnum );
mc.radius = model_get_core_radius(Ship_info[Ships[ship_obj->instance].ship_info_index].model_num);
// check for collision between asteroid model and ship sphere
mc.flags = (MC_CHECK_MODEL | MC_CHECK_SPHERELINE);
@@ -1455,8 +1555,6 @@ int asteroid_check_collision(object *pasteroid, object *other_obj, vec3d *hitpos
return 0;
}
}
#pragma warning ( pop )
void asteroid_render(object * obj)
{
@@ -1473,8 +1571,8 @@ void asteroid_render(object * obj)
Assert( asp->flags & AF_USED );
model_clear_instance( Asteroid_info[asp->type].model_num[asp->asteroid_subtype]);
model_render(Asteroid_info[asp->type].model_num[asp->asteroid_subtype], &obj->orient, &obj->pos, MR_NORMAL|MR_IS_ASTEROID, OBJ_INDEX(obj) ); // Replace MR_NORMAL with 0x07 for big yellow blobs
model_clear_instance( Asteroid_info[asp->asteroid_type].model_num[asp->asteroid_subtype]);
model_render(Asteroid_info[asp->asteroid_type].model_num[asp->asteroid_subtype], &obj->orient, &obj->pos, MR_NORMAL|MR_IS_ASTEROID, OBJ_INDEX(obj) ); // Replace MR_NORMAL with 0x07 for big yellow blobs
}
}
@@ -1503,8 +1601,8 @@ float asteroid_get_fireball_scale_multiplier(int num)
{
if (Asteroids[num].flags & AF_USED) {
switch(Asteroids[num].type) {
case ASTEROID_TYPE_BIG:
switch(Asteroids[num].asteroid_type) {
case ASTEROID_TYPE_LARGE:
return 1.5f;
break;
@@ -1528,7 +1626,7 @@ float asteroid_create_explosion(object *objp)
fireball_scale_multiplier = asteroid_get_fireball_scale_multiplier(objp->instance);
fireball_objnum = fireball_create( &objp->pos, FIREBALL_ASTEROID, OBJ_INDEX(objp), objp->radius*fireball_scale_multiplier, 0, &objp->phys_info.vel );
fireball_objnum = fireball_create( &objp->pos, FIREBALL_ASTEROID, FIREBALL_LARGE_EXPLOSION, OBJ_INDEX(objp), objp->radius*fireball_scale_multiplier, 0, &objp->phys_info.vel );
if ( fireball_objnum > -1 ) {
explosion_life = fireball_lifeleft(&Objects[fireball_objnum]);
} else {
@@ -1544,14 +1642,14 @@ void asteriod_explode_sound(object *objp, int type, int play_loud)
int sound_index = -1;
float range_factor = 1.0f; // how many times sound should traver farther than normal
if (type % 3 <= 1)
if (type % NUM_DEBRIS_SIZES <= 1)
{
sound_index = SND_ASTEROID_EXPLODE_SMALL;
range_factor = 5.0;
}
else
{
sound_index = SND_ASTEROID_EXPLODE_BIG;
sound_index = SND_ASTEROID_EXPLODE_LARGE;
range_factor = 10.0f;
}
@@ -1578,7 +1676,7 @@ void asteroid_do_area_effect(object *asteroid_objp)
asteroid_info *asip;
asp = &Asteroids[asteroid_objp->instance];
asip = &Asteroid_info[asp->type];
asip = &Asteroid_info[asp->asteroid_type];
if ( asip->damage <= 0 ) { // do a quick out if there is no damage to apply
return;
@@ -1617,11 +1715,9 @@ void asteroid_hit( object * asteroid_obj, object * other_obj, vec3d * hitpos, fl
return;
}
#ifndef NO_NETWORK
if ( MULTIPLAYER_MASTER ){
send_asteroid_hit( asteroid_obj, other_obj, hitpos, damage );
}
#endif
asteroid_obj->hull_strength -= damage;
@@ -1635,7 +1731,7 @@ void asteroid_hit( object * asteroid_obj, object * other_obj, vec3d * hitpos, fl
if ( asp->collide_objnum == OBJ_INDEX(other_obj) ) {
// play_loud_collision = 1;
}
asteriod_explode_sound(asteroid_obj, asp->type, play_loud_collision);
asteriod_explode_sound(asteroid_obj, asp->asteroid_type, play_loud_collision);
asteroid_do_area_effect(asteroid_obj);
asp->final_death_time = timestamp( fl2i(explosion_life*1000.0f)/5 ); // Wait till 30% of vclip time before breaking the asteroid up.
@@ -1752,56 +1848,56 @@ void asteroid_maybe_break_up(object *asteroid_obj)
if ( timestamp_elapsed(asp->final_death_time) ) {
vec3d relvec, vfh, tvec;
asteroid_obj->flags |= OF_SHOULD_BE_DEAD;
Script_system.SetHookObject("Self", asteroid_obj);
if(!Script_system.IsConditionOverride(CHA_DEATH, asteroid_obj))
{
asteroid_obj->flags |= OF_SHOULD_BE_DEAD;
// multiplayer clients won't go through the following code. asteroid_sub_create will send
// a create packet to the client in the above named function
#ifndef NO_NETWORK
if ( !MULTIPLAYER_CLIENT ) {
#endif
if (asp->type <= ASTEROID_TYPE_BIG) // 3
// multiplayer clients won't go through the following code. asteroid_sub_create will send
// a create packet to the client in the above named function
if ( !MULTIPLAYER_CLIENT ) {
// if this isn't true it's just debris, and debris doesn't break up
{
switch (asp->type) {
case ASTEROID_TYPE_SMALL:
break;
case ASTEROID_TYPE_MEDIUM:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &relvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec);
if (asp->asteroid_type <= ASTEROID_TYPE_LARGE)
{
switch (asp->asteroid_type) {
case ASTEROID_TYPE_SMALL:
break;
case ASTEROID_TYPE_MEDIUM:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &relvec);
break;
case ASTEROID_TYPE_BIG:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &relvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &tvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec);
break;
case ASTEROID_TYPE_LARGE:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &relvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &tvec);
while (frand() > 0.6f) {
vec3d rvec, tvec2;
vm_vec_rand_vec_quick(&rvec);
vm_vec_scale_add(&tvec2, &vfh, &rvec, 0.75f);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec2);
}
break;
while (frand() > 0.6f) {
vec3d rvec, tvec2;
vm_vec_rand_vec_quick(&rvec);
vm_vec_scale_add(&tvec2, &vfh, &rvec, 0.75f);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec2);
}
break;
default: // this isn't going to happen.. really
break;
default: // this isn't going to happen.. really
break;
}
}
}
#ifndef NO_NETWORK
asp->final_death_time = timestamp(-1);
}
#endif
asp->final_death_time = timestamp(-1);
Script_system.RunCondition(CHA_DEATH, '\0', NULL, asteroid_obj);
Script_system.RemHookVar("Self");
}
}
@@ -1824,7 +1920,7 @@ int asteroid_get_random_in_cone(vec3d *pos, vec3d *dir, float ang, int danger)
return -1;
}
void asteroid_test_collide(object *asteroid_obj, object *ship_obj, mc_info *mc)
void asteroid_test_collide(object *asteroid_obj, object *ship_obj, mc_info *mc, bool lazy = false)
{
float asteroid_ray_dist;
vec3d asteroid_fvec, terminus;
@@ -1844,13 +1940,16 @@ void asteroid_test_collide(object *asteroid_obj, object *ship_obj, mc_info *mc)
ship_model_start(ship_obj);
mc->model_num = Ships[ship_obj->instance].modelnum; // Fill in the model to check
mc->model_num = Ship_info[Ships[ship_obj->instance].ship_info_index].model_num; // Fill in the model to check
mc->orient = &ship_obj->orient; // The object's orientation
mc->pos = &ship_obj->pos; // The object's position
mc->p0 = &asteroid_obj->pos; // Point 1 of ray to check
mc->p1 = &terminus; // Point 2 of ray to check
// mc->flags = MC_CHECK_MODEL | MC_ONLY_BOUND_BOX;
mc->flags = MC_CHECK_MODEL | MC_CHECK_SPHERELINE;
if (lazy) {
mc->flags = MC_CHECK_MODEL | MC_ONLY_BOUND_BOX;
} else {
mc->flags = MC_CHECK_MODEL | MC_CHECK_SPHERELINE;
}
mc->radius = asteroid_obj->radius;
model_collide(mc);
@@ -1884,7 +1983,8 @@ int asteroid_valid_ship_to_warn_collide(ship *shipp)
return 0;
}
if ( (shipp->team != Player_ship->team) || (Player_ship->team == TEAM_TRAITOR) ) {
// Goober5000 used to be if teams were unequal and player was not traitor, but this works for allies not on your team
if ( iff_x_attacks_y(Player_ship->team, shipp->team) ) {
return 0;
}
@@ -1903,12 +2003,10 @@ void asteroid_update_collide_flag(object *asteroid_objp)
asp->collide_objnum = -1;
asp->collide_objsig = -1;
#ifndef NO_NETWORK
// multiplayer dogfight
if((Game_mode & GM_MULTIPLAYER) && (Netgame.type_flags & NG_TYPE_DOGFIGHT)){
return;
}
#endif
num_escorts = hud_escort_num_ships_on_list();
@@ -1989,7 +2087,7 @@ float asteroid_time_to_impact(object *asteroid_objp)
return time;
}
asteroid_test_collide(asteroid_objp, &Objects[asp->collide_objnum], &mc);
asteroid_test_collide(asteroid_objp, &Objects[asp->collide_objnum], &mc, true);
if ( mc.num_hits ) {
total_dist = vm_vec_dist(&mc.hit_point_world, &asteroid_objp->pos) - asteroid_objp->radius;
@@ -2004,24 +2102,20 @@ float asteroid_time_to_impact(object *asteroid_objp)
}
// read in a single asteroid section from asteroid.tbl
void asteroid_parse_section()
void asteroid_parse_section(asteroid_info *asip)
{
asteroid_info *asip;
asip = &Asteroid_info[Num_asteroid_types];
required_string("$Name:");
stuff_string(asip->name, F_NAME, NULL);
stuff_string(asip->name, F_NAME, NAME_LENGTH);
required_string( "$POF file1:" );
stuff_string(asip->pof_files[0], F_NAME, NULL);
stuff_string(asip->pof_files[0], F_NAME, MAX_FILENAME_LEN);
required_string( "$POF file2:" );
stuff_string(asip->pof_files[1], F_NAME, NULL);
stuff_string(asip->pof_files[1], F_NAME, MAX_FILENAME_LEN);
if ( (strstr(asip->name,"Asteroid") != NULL) || (strstr(asip->name, "asteroid") != NULL) ) {
if ( (stristr(asip->name,"Asteroid") != NULL) ) {
required_string( "$POF file3:" );
stuff_string(asip->pof_files[2], F_NAME, NULL);
stuff_string(asip->pof_files[2], F_NAME, MAX_FILENAME_LEN);
}
asip->num_detail_levels = 0;
@@ -2032,6 +2126,12 @@ void asteroid_parse_section()
required_string("$Max Speed:");
stuff_float(&asip->max_speed);
if(optional_string("$Damage Type:")) {
char buf[NAME_LENGTH];
stuff_string(buf, F_NAME, NAME_LENGTH);
asip->damage_type_idx = damage_type_add(buf);
}
required_string("$Expl inner rad:");
stuff_float(&asip->inner_rad);
@@ -2047,40 +2147,72 @@ void asteroid_parse_section()
required_string("$Hitpoints:");
stuff_float(&asip->initial_asteroid_strength);
}
extern int True_NumSpecies;
// read in data from asteroid.tbl into Asteroid_info[] array
void asteroid_parse_tbl()
{
char impact_ani_file[FILESPEC_LENGTH];
Num_asteroid_types = 0;
char impact_ani_file[MAX_FILENAME_LEN];
int *asteroid_tally = NULL;
int i, rval;
// open localization
lcl_ext_open();
read_file_text("asteroid.tbl");
if ((rval = setjmp(parse_abort)) != 0) {
mprintf(("TABLES: Unable to parse '%s'! Error code = %i.\n", "asteroid.tbl", rval));
lcl_ext_close();
return;
}
read_file_text("asteroid.tbl", CF_TYPE_TABLES);
reset_parse();
required_string("#Asteroid Types");
// total we're expecting
int Total_asteroid_types = ((True_NumSpecies + 1) * 3);
asteroid_tally = new int[Species_info.size() + 1];
while (required_string_either("#End","$Name:")) {
Assert( Num_asteroid_types < Total_asteroid_types );
asteroid_parse_section();
Num_asteroid_types++;
memset(asteroid_tally, 0, sizeof(int) * (Species_info.size()+1));
while (required_string_either("#End","$Name:"))
{
asteroid_info new_asteroid;
for (i = 0; i < NUM_DEBRIS_POFS; i++)
new_asteroid.model_num[i] = -1;
asteroid_parse_section( &new_asteroid );
Assert( Species_info.size() );
// sanity check for debris type sizes
for (i = Species_info.size(); i >= 0; i--) {
// must remain in proper order
// 0 - generic debris types
// > 0 - species specific debris types
if ( (i == 0) || stristr(new_asteroid.name, Species_info[i-1].species_name) ) {
Assert( asteroid_tally[i] < NUM_DEBRIS_SIZES );
if ( asteroid_tally[i] >= NUM_DEBRIS_SIZES ) {
// too many sizes specified, don't increment Num_debris_types and we'll overwrite
// the current entry with the next
break;
}
// we're safe to continue
asteroid_tally[i]++;
Asteroid_info.push_back( new_asteroid );
break;
}
}
}
required_string("#End");
// check all read in
Assert(Num_asteroid_types == Total_asteroid_types);
Asteroid_impact_explosion_ani = -1;
required_string("$Impact Explosion:");
stuff_string(impact_ani_file, F_NAME, NULL);
if ( stricmp(impact_ani_file,NOX("none"))) {
stuff_string(impact_ani_file, F_NAME, MAX_FILENAME_LEN);
if ( VALID_FNAME(impact_ani_file) ) {
int num_frames;
Asteroid_impact_explosion_ani = bm_load_animation( impact_ani_file, &num_frames, NULL, 1);
}
@@ -2090,6 +2222,32 @@ void asteroid_parse_tbl()
// close localization
lcl_ext_close();
// check for any missing info
char *errormsg = new char[75 + (Species_info.size() * (NAME_LENGTH))];
bool species_missing = false;
strcpy(errormsg, "The following species are missing debris types in asteroids.tbl:\n");
for (i = 0; i < (int)Species_info.size(); i++)
{
int idx = (i+1); // offset from generic asteroids at 0..NUM_DEBRIS_SIZES
if (asteroid_tally[idx] < NUM_DEBRIS_SIZES)
{
strcat(errormsg, Species_info[i].species_name);
strcat(errormsg, "\n");
species_missing = true;
}
}
strcat(errormsg, "\0");
if (species_missing)
{
Error(LOCATION, errormsg);
}
delete[] asteroid_tally;
delete[] errormsg;
}
// Return number of asteroids expected to collide with a ship.
@@ -2163,6 +2321,8 @@ void asteroid_init()
asteroid_parse_tbl();
}
extern int Cmdline_targetinfo;
// Draw brackets around on-screen asteroids that are about to collide, otherwise draw an offscreen indicator
void asteroid_show_brackets()
{
@@ -2196,8 +2356,11 @@ void asteroid_show_brackets()
g3_project_vertex(&asteroid_vertex);
if (!(asteroid_vertex.flags & PF_OVERFLOW)) {
gr_set_color_fast(&IFF_colors[IFF_COLOR_SELECTION][1]);
gr_set_color_fast(iff_get_color(IFF_COLOR_SELECTION, 1));
hud_show_brackets(asteroid_objp, &asteroid_vertex);
if ( Cmdline_targetinfo ) {
hud_show_lead_indicator_quick(&asteroid_objp->pos, asteroid_objp);
}
}
// if asteroid is not on screen, draw an offscreen indicator
@@ -2206,7 +2369,7 @@ void asteroid_show_brackets()
float dist;
// dist = vm_vec_dist_quick(&Player_obj->pos, &asteroid_objp->pos);
dist = hud_find_target_distance( asteroid_objp, Player_obj );
gr_set_color_fast(&IFF_colors[IFF_COLOR_SELECTION][1]);
gr_set_color_fast(iff_get_color(IFF_COLOR_SELECTION, 1));
hud_draw_offscreen_indicator(&asteroid_vertex, &asteroid_objp->pos, dist);
}
}
@@ -2252,12 +2415,13 @@ void asteroid_page_in()
nprintf(( "Paging", "Paging in asteroids\n" ));
// max of 3 possible debris field models
for (i=0; i<3; i++) {
// max of MAX_ACTIVE_DEBRIS_TYPES possible debris field models
for (i=0; i<MAX_ACTIVE_DEBRIS_TYPES; i++) {
asteroid_info *asip;
if (Asteroid_field.debris_genre == DG_ASTEROID) {
// asteroid
Assert(i < NUM_DEBRIS_SIZES);
asip = &Asteroid_info[i];
} else {
// ship debris - always full until empty
@@ -2269,7 +2433,7 @@ void asteroid_page_in()
}
for (k=0; k<3; k++) {
for (k=0; k<NUM_DEBRIS_POFS; k++) {
// SHIP DEBRIS - use subtype 0
if (Asteroid_field.debris_genre == DG_SHIP) {
@@ -2282,16 +2446,15 @@ void asteroid_page_in()
continue;
}
}
if (asip->model_num[k] < 0)
continue;
asip->modelp[k] = model_get(asip->model_num[k]);
// Page in textures
for (j=0; j<asip->modelp[k]->n_textures; j++ ) {
int bitmap_num = asip->modelp[k]->original_textures[j];
if ( bitmap_num > -1 ) {
bm_page_in_texture( bitmap_num );
}
asip->modelp[k]->maps[j].PageIn();
}
}
@@ -9,13 +9,35 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.h $
* $Revision: 2.9 $
* $Date: 2005-07-13 02:50:48 $
* $Author: Goober5000 $
* $Revision: 2.12.2.4 $
* $Date: 2007-05-28 18:27:32 $
* $Author: wmcoolmon $
*
* Header file for asteroids
*
* $Log: not supported by cvs2svn $
* Revision 2.12.2.3 2006/11/15 00:36:08 taylor
* various bits of little cleanup
* get rid of some more compiler warnings
*
* Revision 2.12.2.2 2006/09/11 01:15:04 taylor
* fixes for stuff_string() bounds checking
*
* Revision 2.12.2.1 2006/08/27 18:12:39 taylor
* make Species_info[] and Asteroid_info[] dynamic
*
* Revision 2.12 2005/09/25 20:31:42 Goober5000
* okay; everything should be good to go
* --Goober5000
*
* Revision 2.11 2005/09/25 08:25:14 Goober5000
* Okay, everything should now work again. :p Still have to do a little more with the asteroids.
* --Goober5000
*
* Revision 2.9 2005/07/13 02:50:48 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.8 2005/07/13 02:01:28 Goober5000
* fixed a bunch of "issues" caused by me with the species stuff
* --Goober5000
@@ -156,19 +178,31 @@
#include "globalincs/pstypes.h"
#include "globalincs/globals.h" // for NAME_LENGTH
#include <vector>
struct object;
struct polymodel;
struct collision_info_struct;
#define MAX_ASTEROIDS 256
#define NUM_DEBRIS_SIZES 3
#define NUM_DEBRIS_POFS 3 // Number of POFs per debris size
#define ASTEROID_TYPE_SMALL 0
#define ASTEROID_TYPE_MEDIUM 1
#define ASTEROID_TYPE_BIG 2
#define ASTEROID_TYPE_LARGE 2
// This is for the asteroid types plus DEBRIS_X_Y
// (X is each species and Y is SMALL, MEDIUM, and LARGE)
#define MAX_DEBRIS_TYPES ((MAX_SPECIES + 1) * 3)
// 20060826 - made dynamic -- taylor
//#define MAX_DEBRIS_TYPES ((MAX_SPECIES + 1) * NUM_DEBRIS_SIZES)
// these should always be equal for the benefit of generic asteroids (c.f. asteroid_page_in)
#define MAX_ACTIVE_DEBRIS_TYPES NUM_DEBRIS_SIZES
// Goober5000 - currently same as MAX_SHIP_DETAIL_LEVELS (put here to avoid an #include)
#define MAX_ASTEROID_DETAIL_LEVELS 5
// Data structure to track the active asteroids
@@ -179,33 +213,32 @@ typedef struct asteroid_obj {
extern asteroid_obj Asteroid_obj_list;
#define MAX_ASTEROID_POFS 3 // Max number of POFs per asteroid type
#define AF_USED (1<<0) // Set means used.
// Goober5000 - currently same as MAX_SHIP_DETAIL_LEVELS (put here to avoid an #include)
#define MAX_ASTEROID_DETAIL_LEVELS 5
typedef struct asteroid_info {
char name[NAME_LENGTH]; // name for the asteroid
char pof_files[MAX_ASTEROID_POFS][NAME_LENGTH]; // POF files to load/associate with ship
char name[NAME_LENGTH]; // name for the asteroid
char pof_files[NUM_DEBRIS_POFS][MAX_FILENAME_LEN]; // POF files to load/associate with ship
int num_detail_levels; // number of detail levels for this ship
int detail_distance[MAX_ASTEROID_DETAIL_LEVELS]; // distance to change detail levels at
float max_speed; // cap on speed for asteroid
int damage_type_idx; //Damage type of the asteroid
float inner_rad; // radius within which maximum area effect damage is applied
float outer_rad; // radius at which no area effect damage is applied
float damage; // maximum damage applied from area effect explosion
float blast; // maximum blast impulse from area effect explosion
float initial_asteroid_strength; // starting strength of asteroid
polymodel *modelp[MAX_ASTEROID_POFS];
int model_num[MAX_ASTEROID_POFS];
polymodel *modelp[NUM_DEBRIS_POFS];
int model_num[NUM_DEBRIS_POFS];
asteroid_info() { memset(this, 0, sizeof(asteroid_info)); damage_type_idx = -1; };
} asteroid_info;
#define AF_USED (1<<0) // Set means used.
typedef struct asteroid {
int flags;
int objnum;
int type; // In 0..Num_asteroid_types
int asteroid_subtype; // Which index into asteroid_info for modelnum and modelp
int asteroid_type; // 0..MAX_DEBRIS_TYPES
int asteroid_subtype; // Index in asteroid_info for modelnum and modelp
int check_for_wrap; // timestamp to check for asteroid wrapping around field
int check_for_collide; // timestamp to check for asteroid colliding with escort ships
int final_death_time; // timestamp to swap in new models after explosion starts
@@ -215,6 +248,7 @@ typedef struct asteroid {
int target_objnum; // Yes, hah! Asteroids can have targets. See asteroid_aim_at_target().
} asteroid;
// TYPEDEF FOR DEBRIS TYPE
typedef enum {
DG_ASTEROID,
@@ -227,8 +261,6 @@ typedef enum {
FT_PASSIVE
} field_type_t;
#define MAX_ACTIVE_DEBRIS_TYPES 3
typedef struct asteroid_field {
vec3d min_bound; // Minimum range of field.
vec3d max_bound; // Maximum range of field.
@@ -243,11 +275,10 @@ typedef struct asteroid_field {
int field_debris_type[MAX_ACTIVE_DEBRIS_TYPES]; // one of the debris type defines above
} asteroid_field;
extern asteroid_info Asteroid_info[MAX_DEBRIS_TYPES];
extern std::vector<asteroid_info> Asteroid_info;
extern asteroid Asteroids[MAX_ASTEROIDS];
extern asteroid_field Asteroid_field;
extern int Num_asteroid_types;
extern int Num_asteroids;
extern int Asteroids_enabled;
File diff suppressed because it is too large. Load diff
@@ -4,11 +4,24 @@
/*
* $Logfile: /Freespace2/code/Autopilot/Autopilot.h $
* $Revision: 1.8 $
* $Date: 2005-07-13 02:50:49 $
* $Revision: 1.9.2.3 $
* $Date: 2007-09-02 02:07:38 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 1.9.2.2 2007/07/24 20:08:29 Kazan
* Make asteroid/debris fields interrupt autopilot, add "hazards near" message to autopilot.tbl, add use-nav-cinematics sexp, fix mantis #1441
*
* Revision 1.9.2.1 2007/07/23 16:08:23 Kazan
* Autopilot updates, minor misc fixes, working MSVC2005 project files
*
* Revision 1.9 2006/02/25 21:42:31 Goober5000
* fixes from last commit
*
* Revision 1.8 2005/07/13 02:50:49 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 1.7 2005/04/05 05:53:14 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -39,9 +52,10 @@
#define _AUTOPILOT_H_
#include "globalincs/pstypes.h"
#include <map>
// milliseconds between updates
#define NPS_TICKRATE 250
#define NPS_TICKRATE 125
#define MAX_NAVPOINTS 8
@@ -62,13 +76,31 @@ struct NavPoint
void *target_obj;
int waypoint_num; //only used when flags & NP_WAYPOINT
vec3d GetPosition();
vec3d *GetPosition();
char* GetInteralName();
};
#define NP_NUM_MESSAGES 6
#define NP_MSG_FAIL_NOSEL 0
#define NP_MSG_FAIL_GLIDING 1
#define NP_MSG_FAIL_TOCLOSE 2
#define NP_MSG_FAIL_HOSTILES 3
#define NP_MSG_MISC_LINKED 4
#define NP_MSG_FAIL_HAZARD 5
struct NavMessage
{
char message[256];
char filename[256]; // can be ""
};
extern bool AutoPilotEngaged;
extern int CurrentNav;
extern NavPoint Navs[MAX_NAVPOINTS];
extern NavMessage NavMsgs[NP_NUM_MESSAGES];
extern int LockAPConv;
extern std::map<int,int> autopilot_wings;
// Cycles through the NavPoint List
bool Sel_NextNav();
@@ -79,7 +111,8 @@ bool Sel_NextNav();
// * Nav point selected
// * No enemies within 5,000 meters
// * Destination > 1,000 meters away
bool CanAutopilot();
bool CanAutopilot(bool send_msg=false);
bool CanAutopilotPos(vec3d targetPos);
// Engages autopilot
// This does:
@@ -113,6 +146,9 @@ void NavSystem_Do();
// Inits the Nav System
void NavSystem_Init();
// parse autopilot.tbl
void parse_autopilot_table(char *filename);
// Finds a Nav point by name
int FindNav(char *Nav);
@@ -148,5 +184,8 @@ unsigned int DistanceTo(int nav);
bool IsVisited(char *nav);
bool IsVisited(int nav);
void send_autopilot_msg(char *msg, char *snd=NULL);
void send_autopilot_msgID(int msgid);
#endif
@@ -9,13 +9,52 @@
/*
* $Logfile: /Freespace2/code/bmpman/bm_internal.h $
* $Revision: 2.3 $
* $Date: 2005-04-21 15:49:20 $
* $Revision: 2.6.2.1 $
* $Date: 2007-02-11 09:51:21 $
* $Author: taylor $
*
* bmpman info that's internal to bmpman related files only
*
* $Log: not supported by cvs2svn $
* Revision 2.6 2006/05/27 17:20:48 taylor
* clean up BM_TYPE_* stuff so it's a little easier to tell what is what
* bm_load_sub_fast() doesn't need to lowercase filenames, so don't
* byte-swap 16-bit DDS on big endian (they still don't look right though)
* update bm_has_alpha_channel() to be less dumb
*
* Revision 2.5 2006/05/13 07:29:51 taylor
* OpenGL envmap support
* newer OpenGL extension support
* add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
* add cubemap reading and writing support to DDS loader
* fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
* add support for a default envmap named "cubemap.dds"
* new mission flag "$Environment Map:" to use a pre-existing envmap
* minor cleanup of compiler warning messages
* get rid of wasteful math from gr_set_proj_matrix()
* remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
* clean up bmpman flags in reguards to cubemaps and render targets
* disable D3D envmap code until it can be upgraded to current level of code
* remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
* replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
*
* Revision 2.4 2005/11/13 06:44:17 taylor
* small bit of EFF cleanup
* add -img2dds support
* cleanup some D3D stuff (missing a lot since the old code is so unstable I couldn't get it working like I wanted)
* some minor OGL cleanup and small performance changes
* converge the various pcx_read_bitmap* functions into one
* cleanup/rename/remove some cmdline options
*
* Revision 2.3 2005/04/21 15:49:20 taylor
* update of bmpman and model bitmap management, well tested but things may get a bit bumpy
* - use VM_* macros for bmpman since it didn't seem to register the memory correctly (temporary)
* - a little "stupid" fix for dds bitmap reading
* - fix it so that memory is released properly on bitmap read errors
* - some cleanup to model texture loading
* - allow model textures to get released rather than just unloaded, saves bitmap slots
* - bump MAX_BITMAPS to 4750, should be able to decrease after public testing of new code
*
* Revision 2.2 2005/03/03 14:29:37 bobboau
* fixed a small error from my earlier commit.
*
@@ -40,46 +79,52 @@
#include "bmpman/bmpman.h"
// keep this defined to use per-ship nondarkening pixels
#define BMPMAN_SPECIAL_NONDARK
#define BM_TYPE_NONE 0
#define BM_TYPE_PCX 1
#define BM_TYPE_USER 2
#define BM_TYPE_ANI 3 // in-house ANI format
#define BM_TYPE_EFF 4 // specifies any type of animated image, the EFF itself is just text
#define BM_TYPE_32_BIT_FORMATS 5 // everything after this could/should be 24/32-bit
#define BM_TYPE_TGA 6 // 16 or 32 bit targa
#define BM_TYPE_DDS 7 // generic identifier for DDS
// no-type ( used in: bm_bitmaps[i].type )
#define BM_TYPE_NONE 0
// in-memory type ( used in: bm_bitmaps[i].type )
#define BM_TYPE_USER 1
// file-type types ( used in: bm_bitmaps[i].type )
#define BM_TYPE_PCX 2
#define BM_TYPE_TGA 3 // 16 or 32 bit targa
#define BM_TYPE_DDS 4 // generic identifier for DDS
#define BM_TYPE_JPG 5 // 32 bit jpeg
#define BM_TYPE_ANI 6 // in-house ANI format
#define BM_TYPE_EFF 7 // specifies any type of animated image, the EFF itself is just text
// c-type types ( used in: bm_bitmaps[i].c_type )
#define BM_TYPE_DXT1 8 // 24 bit with switchable alpha (compressed)
#define BM_TYPE_DXT3 9 // 32 bit with 4 bit alpha (compressed)
#define BM_TYPE_DXT5 10 // 32 bit with 8 bit alpha (compressed)
#define BM_TYPE_JPG 11 // 32 bit jpeg
#define BM_TYPE_RENDER_TARGET 12 // 32 bit setup internaly as a render target
#define BM_TYPE_CUBEMAP_DDS 11 // generic DDS cubemap (uncompressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT1 12 // 24-bit cubemap (compressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT3 13 // 32-bit cubemap (compressed cubemap surface)
#define BM_TYPE_CUBEMAP_DXT5 14 // 32-bit cubemap (compressed cubemap surface)
// special types ( used in: bm_bitmaps[i].type )
#define BM_TYPE_RENDER_TARGET_STATIC 16 // 24/32 bit setup internally as a static render target
#define BM_TYPE_RENDER_TARGET_DYNAMIC 17 // 24/32 bit setup internally as a dynamic render target
/// Moved from cpp file ///////////////////
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
typedef struct bm_extra_info {
typedef union bm_extra_info {
struct {
// Stuff needed for animations
int first_frame; // used for animations -- points to index of first frame
ubyte num_frames; // used for animation -- number of frames in the animation
ubyte fps; // used for animation -- frames per second
ubyte num_frames; // used for animation -- number of frames in the animation
ubyte fps; // used for animation -- frames per second
struct {
// stuff for static animations
ubyte type; // type for individual images
char filename[MAX_FILENAME_LEN]; // filename for individual images
} eff;
} ani;
struct {
// Stuff needed for user bitmaps
void *data; // For user bitmaps, this is where the data comes from
ubyte bpp; // For user bitmaps, this is what format the data is
ubyte flags; // Flags passed to bm_create
} user;
struct {
// Stuff for static animations
ubyte type; // type for individual images
char filename[MAX_FILENAME_LEN]; // filename for individual images
} eff;
} bm_extra_info;
@@ -92,7 +137,8 @@ typedef struct bitmap_entry {
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
int last_used; // When this bitmap was last used
ubyte type; // PCX, USER, ANI, etc
ubyte type; // PCX, USER, ANI, etc
ubyte comp_type; // What sort of compressed type, BM_TYPE_NONE if not compressed
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
int dir_type; // which directory this was loaded from (to skip other locations with same name)
@@ -137,4 +183,3 @@ void bm_lock_user( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, uby
#endif // BMPMAN_INTERNAL
#endif // __BM_INTERNAL_H__
File diff suppressed because it is too large. Load diff
@@ -10,13 +10,103 @@
/*
* $Logfile: /Freespace2/code/Bmpman/BmpMan.h $
*
* $Revision: 2.25 $
* $Date: 2005-08-20 20:34:49 $
* $Revision: 2.37.2.6 $
* $Date: 2007-03-22 20:14:16 $
* $Author: taylor $
*
* Prototypes for Bitmap Manager functions
*
* $Log: not supported by cvs2svn $
* Revision 2.37.2.5 2007/02/11 09:51:21 taylor
* remove some dead code
* better texture memory handling (a work in-progress)
* new image finding/loading
* get rid of -pcx32 and -jpgtga
* change the game_busy() reporting during bitmap page-in to only catch one frame of an animation
* fix numerous little bugs in gropenglbmpman relating to -img2dds
*
* Revision 2.37.2.4 2007/01/07 12:07:40 taylor
* fix bm_page_in_texture() so that it will load all frames of an animation (caused slowdowns in-game with it)
*
* Revision 2.37.2.3 2006/07/05 23:41:02 Goober5000
* spelling
*
* Revision 2.37.2.2 2006/07/05 23:36:55 Goober5000
* cvs comment tweaks
*
* Revision 2.37.2.1 2006/06/22 14:59:44 taylor
* fix various things that Valgrind has been complaining about
*
* Revision 2.37 2006/05/27 17:20:48 taylor
* clean up BM_TYPE_* stuff so it's a little easier to tell what is what
* bm_load_sub_fast() doesn't need to lowercase filenames, so don't
* byte-swap 16-bit DDS on big endian (they still don't look right though)
* update bm_has_alpha_channel() to be less dumb
*
* Revision 2.36 2006/05/13 07:29:51 taylor
* OpenGL envmap support
* newer OpenGL extension support
* add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
* add cubemap reading and writing support to DDS loader
* fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
* add support for a default envmap named "cubemap.dds"
* new mission flag "$Environment Map:" to use a pre-existing envmap
* minor cleanup of compiler warning messages
* get rid of wasteful math from gr_set_proj_matrix()
* remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
* clean up bmpman flags in reguards to cubemaps and render targets
* disable D3D envmap code until it can be upgraded to current level of code
* remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
* replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
*
* Revision 2.35 2006/02/16 05:00:01 taylor
* various bmpman related fixes
* - some new error checking (and fixes related to that) and cleanup
* - fix EFFs not getting released/unloaded properly (was in a local tree but apparently missed CVS)
* - minor fixes for bm_release() to produce a more properly cleaned slot
* - use fast unloading for page_in stuff since we don't actually want really want the load count changing for texture maps
* and to make sure that we free the memory usage regardless of load count
*
* Revision 2.34 2006/01/21 02:22:04 wmcoolmon
* Scripting updates; Special scripting image list; Better operator meta; Orientation type; Wing type; Texture type. Fix for MSVC7 compiling.
*
* Revision 2.33 2005/12/06 03:05:53 taylor
* add base support for 8-bit DDS images
* clean up some DDS error messages and other minor bug/comment fixes
* move bitmap stuff from pstypes.h, it makes more sense here anyway
* start of 8-bit palette conversion, needs work but is here for WMCoolmon to look at and play with
*
* Revision 2.32 2005/12/04 19:07:48 wmcoolmon
* Final commit of codebase
*
* Revision 2.31 2005/11/08 01:03:59 wmcoolmon
* More warnings instead of Int3s/Asserts, better Lua scripting, weapons_expl.tbl is no longer needed nor read, added "$Disarmed ImpactSnd:", fire-beam fix
*
* Revision 2.30 2005/09/26 04:53:19 Goober5000
* moved these per taylor's recommendation
* --Goober5000
*
* Revision 2.29 2005/09/26 04:08:53 Goober5000
* some more cleanup
* --Goober5000
*
* Revision 2.28 2005/09/26 02:15:02 Goober5000
* okay, this should all be working :)
* --Goober5000
*
* Revision 2.27 2005/09/25 05:13:07 Goober5000
* hopefully complete species upgrade
* --Goober5000
*
* Revision 2.26 2005/09/24 07:07:17 Goober5000
* another species overhaul
* --Goober5000
*
* Revision 2.25 2005/08/20 20:34:49 taylor
* some bmpman and render_target function name changes so that they make sense
* always use bm_set_render_target() rather than the gr_ version so that the graphics state is set properly
* save the original gamma ramp on OGL init so that it can be restored on exit
*
* Revision 2.24 2005/07/13 02:50:49 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
@@ -149,7 +239,8 @@
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
*
* Revision 2.3 2003/01/19 01:07:41 bobboau
* redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it
* redid the way glow maps are handled; you now must set a global variable before you render a poly that uses a glow map, then set it to -1 when you're done with it
* fixed a few other misc bugs too
*
* Revision 2.2 2003/01/18 19:55:16 phreak
* fixed around the bmpman system to now accept compressed textures
@@ -372,13 +463,39 @@
// -- Taylor
// 16 bit pixel formats
#define BM_PIXEL_FORMAT_ARGB 0 // for glide - can assume certain things, like 1555 LFB writes, whee!
#define BM_PIXEL_FORMAT_D3D 1 // d3d - card dependant. booo!
#define BM_PIXEL_FORMAT_ARGB_D3D 2 // this card has nice 1555 textures like Glide - ahhhhh!
#define BMP_AABITMAP (1<<0) // antialiased bitmap
#define BMP_TEX_XPARENT (1<<1) // transparent texture
#define BMP_TEX_OTHER (1<<2) // so we can identify all "normal" textures
#define BMP_TEX_DXT1 (1<<3) // dxt1 compressed 8r8g8b1a (24bit)
#define BMP_TEX_DXT3 (1<<4) // dxt3 compressed 8r8g8b4a (32bit)
#define BMP_TEX_DXT5 (1<<5) // dxt5 compressed 8r8g8b8a (32bit)
#define BMP_TEX_CUBEMAP (1<<6) // a texture made for cubic environment map
// ***** NOTE: bitmap.flags is an 8-bit value, no more BMP_TEX_* flags can be added unless the type is changed!! ******
//compressed texture types
#define BMP_TEX_COMP ( BMP_TEX_DXT1 | BMP_TEX_DXT3 | BMP_TEX_DXT5 )
//non compressed textures
#define BMP_TEX_NONCOMP ( BMP_TEX_XPARENT | BMP_TEX_OTHER )
// any texture type
#define BMP_TEX_ANY ( BMP_TEX_COMP | BMP_TEX_NONCOMP )
#define BMP_FLAG_RENDER_TARGET_STATIC (1<<0)
#define BMP_FLAG_RENDER_TARGET_DYNAMIC (1<<1)
#define BMP_FLAG_CUBEMAP (1<<2)
typedef struct bitmap {
short w, h; // Width and height
short rowsize; // What you need to add to go to next row
ubyte bpp; // How many bits per pixel it is. (7,8,15,16,24,32) (what is requested)
ubyte true_bpp; // How many bits per pixel the image actually is.
ubyte flags; // See the BMP_???? defines for values (this isn't for the BMP_FLAG_* stuff)
ptr_u data; // Pointer to data, or maybe offset into VRAM.
ubyte *palette; // If bpp==8, this is pointer to palette. If the BMP_NO_PALETTE_MAP flag
// is not set, this palette just points to the screen palette. (gr_palette)
} bitmap;
extern int bm_inited;
extern int Bm_paging;
@@ -394,11 +511,6 @@ void *bm_malloc(int n, int size);
void bm_update_memory_used(int n, int size);
// 16 bit pixel formats
extern int Bm_pixel_format;
#define BYTES_PER_PIXEL(x) ((x+7)/8)
// how many bytes of textures are used.
extern int bm_texture_ram;
@@ -421,27 +533,30 @@ int bm_load_duplicate(char *filename);
// On success, it returns the bitmap number. You cannot
// free that RAM until bm_release is called on that bitmap.
// See example at bottom of this file
int bm_create( int bpp, int w, int h, void * data, int flags = 0);
int bm_create( int bpp, int w, int h, void *data = NULL, int flags = 0);
// Frees up a bitmap's data, but bitmap number 'n' can
// still be used, it will just have to be paged in next
// time it is locked.
int bm_unload( int n, bool = false );
int bm_unload( int n, int clear_render_targets = 0 );
// like bm_unload() except that it's safe to use to free data without worrying about
// load_count so it's safe to use in relation to bm_release() and in gr_*_texture functions
int bm_unload_fast( int n, bool = false );
int bm_unload_fast( int n, int clear_render_targets = 0 );
// Frees up a bitmap's data, and it's slot, so bitmap
// number 'n' cannot be used anymore, and bm_load or
// bm_create might reuse the slot.
void bm_release(int n);
int bm_release( int n, int clear_render_targets = 0 );
// This loads a bitmap sequence so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number of the first frame and nframes is set.
extern int bm_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
extern int bm_load_animation( char * filename, int * nframes = NULL, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
//Loads either animation (bm_load_animation) or still image (bm_load)
extern int bm_load_either(char *filename, int *nframes = NULL, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY);
// This locks down a bitmap and returns a pointer to a bitmap
// that can be accessed until you call bm_unlock. Only lock
@@ -457,8 +572,12 @@ extern uint bm_get_signature( int bitmapnum);
// Unlocks a bitmap
extern void bm_unlock( int bitmapnum );
//WMC - Returns 0 if invalid, nonzero if valid
extern int bm_is_valid(int handle);
// Gets info. w,h,or flags,nframes or fps can be NULL if you don't care.
extern void bm_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL );
//WMC - Returns -1 on failure, handle or first frame handle on success.
int bm_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL );
// get filename
extern void bm_get_filename(int bitmapnum, char *filename);
@@ -535,11 +654,7 @@ void bm_page_in_stop();
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_texture( int bitmapnum, int num_frames=1 );
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
void bm_page_in_texture( int bitmapnum, int num_frames = 0 );
// marks a texture as being a transparent textyre used for this level
// Marks a texture as being used for this level
@@ -568,8 +683,6 @@ void BM_SELECT_ALPHA_TEX_FORMAT();
// set the rgba components of a pixel, any of the parameters can be NULL
extern void (*bm_set_components)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
extern void (*bm_set_components_32)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_d3d(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_32_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
@@ -578,18 +691,22 @@ void bm_set_components_argb_d3d_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *
// get the rgba components of a pixel, any of the parameters can be NULL
void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
extern int GLOWMAP; //this holds a reference to a map that is a fully lit version of it's index -Bobboau
extern int GLOWMAP; //this holds a reference to a map that is a fully lit version of its index -Bobboau
extern int SPECMAP; //this holds a reference to a map that is for specular mapping -Bobboau
extern int ENVMAP; //this holds a reference to a map that is for environment mapping -Bobboau
extern int NORMMAP; // normal mapping
extern int HEIGHTMAP; // height map for normal mapping
int bm_is_compressed(int num);
int bm_get_tcache_type(int num);
int bm_get_size(int num);
int bm_get_num_mipmaps(int num);
int bm_has_alpha_channel(int handle);
void bm_print_bitmaps();
int bm_make_render_target( int &x_res, int &y_res, int flags );
bool bm_is_render_target(int bitmap_id);
bool bm_set_render_target(int handle, int face = -1);
int bm_make_render_target( int width, int height, int flags );
int bm_is_render_target(int bitmap_id);
int bm_set_render_target(int handle, int face = -1);
#endif
File diff suppressed because it is too large. Load diff
+179
View File
@@ -0,0 +1,179 @@
#ifndef _CAMERA_H
#define _CAMERA_H
#include "graphics/2d.h"
#include "globalincs/pstypes.h"
#include "globalincs/globals.h"
#include "physics/physics.h" //for avd
#include "object/object.h"
#include <string>
#include <vector>
#define CAM_STATIONARY_FOV (1<<0)
#define CAM_STATIONARY_ORI (1<<1)
#define CAM_STATIONARY_POS (1<<2)
#define CAM_DEFAULT_FLAGS 0
class camera
{
friend class avd_camera;
protected:
char name[NAME_LENGTH];
int sig;
int flags;
object_h object_host;
int object_host_submodel;
object_h object_target;
int object_target_submodel;
void (*func_custom_position)(camera *cam, vec3d *pos);
void (*func_custom_orientation)(camera *cam, matrix *ori);
avd_movement fov;
avd_movement pos_x;
avd_movement pos_y;
avd_movement pos_z;
//avd_movement ori_p;
//avd_movement ori_b;
//avd_movement ori_h;
//avd_movement ori_progress;
//matrix ori_initial;
//matrix ori_final;
avd_movement ori[9];
//Cache stuff
float c_fov;
vec3d c_pos;
matrix c_ori;
public:
camera(char *in_name=NULL, int in_signature=-1);
~camera();
void clear();
void reset();
//Set
void set_name(char *in_name);
void set_object_host(object *objp, int n_object_host_submodel = -1);
void set_object_target(object *objp, int n_object_target_submodel = -1);
void set_custom_position_function(void (*n_func_custom_position)(camera *cam, vec3d *pos));
void set_custom_orientation_function(void (*n_func_custom_orientation)(camera *cam, matrix *ori));
void set_fov(float in_fov, float in_fov_time = 0.0f, float in_fov_acceleration_time = 0.0f, float in_deceleration_time = 0.0f);
void set_position(vec3d *in_position = NULL, float in_translation_time = 0.0f, float in_translation_acceleration_time = 0.0f, float in_translation_deceleration_time = 0.0f, float in_end_velocity = 0.0f);
void set_translation_velocity(vec3d *in_velocity, float in_acceleration_time = 0.0f);
void set_rotation(matrix *in_orientation = NULL, float in_rotation_time = 0.0f, float in_rotation_acceleration_time = 0.0f, float in_rotation_deceleration_time = 0.0f);
void set_rotation(angles *in_angles, float in_rotation_time = 0.0f, float in_rotation_acceleration_time = 0.0f, float in_rotation_deceleration_time = 0.0f);
void set_rotation_facing(vec3d *in_target, float in_rotation_time = 0.0f, float in_rotation_acceleration_time = 0.0f, float in_rotation_deceleration_time = 0.0f);
void set_rotation_velocity(angles *in_rotation_rate, float in_acceleration_time = 0.0f);
//Get
char *get_name() {return name;}
int get_signature() {return sig;}
object *get_object_host();
int get_object_host_submodel();
object *get_object_target();
int get_object_target_submodel();
float get_fov();
void get_info(vec3d *position, matrix *orientation);
//Is
bool is_empty(){return sig < 0;}
//Do
void do_frame(float in_frametime);
};
class warp_camera
{
private:
float c_time;
float c_damping;
vec3d c_vel;
vec3d c_desired_vel;
vec3d c_pos;
matrix c_ori;
public:
warp_camera();
warp_camera(object *objp);
void reset();
void set_position(vec3d *in_pos);
void set_rotation(matrix *in_ori);
void set_velocity(vec3d *in_vel, bool instantaneous);
void do_frame(float in_frametime);
void get_info(vec3d *position, matrix *orientation);
};
extern warp_camera Warp_camera;
class subtitle
{
private:
void clone(const subtitle &sub);
std::vector<std::string> text_lines;
float text_pos[2];
float display_time;
float fade_time;
color text_color;
//Done with set
char imageanim[MAX_FILENAME_LEN];
int image_id;
int image_pos[2];
//Time this has been displayed
float time_displayed;
//When to end it
float time_displayed_end;
public:
subtitle(int in_x_pos, int in_y_pos, char* in_text, float in_display_time, char* in_imageanim = NULL, float in_fade_time = 0.0f, color *in_text_color = NULL, bool center_x = false, bool center_y = false, int in_width = 200);
~subtitle();
subtitle(const subtitle &sub) { clone(sub); }
const subtitle &operator=(const subtitle &sub);
void do_frame(float frametime);
};
//Some global stuff
extern std::vector<subtitle> Subtitles;
extern float VIEWER_ZOOM_DEFAULT;
extern float Sexp_fov;
//Helpful functions
void cam_init();
void cam_close();
void cam_do_frame(float frametime);
camid cam_create(char *n_name=NULL, vec3d *n_pos=NULL, matrix *n_ori=NULL, object *n_object=NULL, int n_submodel_parent=-1);
camid cam_create(char *n_name, vec3d *n_pos, vec3d *n_norm, object *n_object=NULL, int n_submodel_parent=-1);
void cam_delete(camid cid);
bool cam_set_camera(camid cid);
void cam_reset_camera();
camid cam_lookup(char *name);
camid cam_get_camera(uint index);
camid cam_get_current();
uint cam_get_num();
void subtitles_init();
void subtitles_close();
void subtitles_do_frame(float frametime);
#endif // _CAMERA_H
File diff suppressed because it is too large. Load diff
@@ -9,13 +9,67 @@
/*
* $Logfile: /Freespace2/code/CFile/cfile.h $
* $Revision: 2.12 $
* $Date: 2005-07-13 02:50:49 $
* $Revision: 2.17.2.5 $
* $Date: 2007-11-21 07:27:45 $
* $Author: Goober5000 $
*
* <insert description of file here>
*
* $Log: not supported by cvs2svn $
* Revision 2.17.2.4 2007/04/11 18:21:20 taylor
* cleanup of chcksum stuff (works properly on 64-bit systems now)
* add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
* little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
*
* Revision 2.17.2.3 2007/03/22 20:22:44 taylor
* a little better error handling for cf_exists_full()
* add a cf_exists_full_ext() which can find a series of extensions and returns true if any of them exist
* use cf_exists_full_ext() for eventmusic file checks (to check for ogg and wav)
* get rid of SPM hack, it's wrong (just commented out for now though)
* fix a bunch of bugs in cf_find_file_location_ext():
* - try to handle files with multiple periods a bit better (for the wav files like: blah_1.5.wav)
* - load issue with finding incorrect files by mistake
* - prevent finding different file types in various paths/roots
*
* Revision 2.17.2.2 2007/02/11 09:25:42 taylor
* some CFILE cleanup and slight directory order reorg
* add cfopen_special() for quickly opening files that have already been found with cf_find_file_location_ext()
* remove NO_SOUND
*
* Revision 2.17.2.1 2006/08/27 18:01:45 taylor
* various small cleanup and speedup changes
* add a cf_find_file_location_ext() function, which you can pass a filename and a list of extensions and it will search for all of them at once
*
* Revision 2.17 2006/02/13 00:20:45 Goober5000
* more tweaks, plus clarification of checks for the existence of files
* --Goober5000
*
* Revision 2.16 2006/01/17 02:33:20 wmcoolmon
* data/scripts directory
*
* Revision 2.15 2005/12/28 22:06:47 taylor
* fix up cf_find_file_location() and related elements so that it's safer (based on WMC's work, but actually safe this time ;))
*
* Revision 2.14 2005/12/06 03:13:49 taylor
* fix quite a few CFILE issues:
* use #define's for path lengths when possible so it's easier to move between functions
* fix huge Cfile_stack[] issue (how the hell did that get through :v: QA?)
* add Int3() check on cfopen() so it's easier to know if it get's called before cfile is ready to use
* move path separators to pstypes.h
* fix possible string overruns when setting up CFILE roots
* make sure we don't try to init current directory again thinking it's a CD-ROM
* add the list of VP roots to debug log, this will undoubtedly be useful
* when -nosound is use go ahead and set -nomusic too to both checks are correct
* add list of cmdline options to debug log
* fix possible overwrite issues with get_version_string() and remove '(fs2_open)' from string plus change OGL->OpenGL, D3D->Direct3D
*
* Revision 2.13 2005/10/16 23:15:46 wmcoolmon
* Hardened cfile against array overflows
*
* Revision 2.12 2005/07/13 02:50:49 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.11 2005/04/05 05:53:14 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -378,16 +432,6 @@
#include <time.h>
#include "globalincs/pstypes.h"
#if defined _WIN32
#define DIR_SEPARATOR_CHAR '\\'
#define DIR_SEPARATOR_STR "\\"
#elif defined SCP_UNIX
#define DIR_SEPARATOR_CHAR '/'
#define DIR_SEPARATOR_STR "/"
#else
#error unknown OS
#endif
#define CF_EOF (-1)
#define CF_SEEK_SET (0)
@@ -415,39 +459,40 @@ typedef struct {
#define CF_TYPE_DATA 2
#define CF_TYPE_MAPS 3
#define CF_TYPE_TEXT 4
#define CF_TYPE_MISSIONS 5
#define CF_TYPE_MODELS 6
#define CF_TYPE_TABLES 7
#define CF_TYPE_SOUNDS 8
#define CF_TYPE_SOUNDS_8B22K 9
#define CF_TYPE_SOUNDS_16B11K 10
#define CF_TYPE_VOICE 11
#define CF_TYPE_VOICE_BRIEFINGS 12
#define CF_TYPE_VOICE_CMD_BRIEF 13
#define CF_TYPE_VOICE_DEBRIEFINGS 14
#define CF_TYPE_VOICE_PERSONAS 15
#define CF_TYPE_VOICE_SPECIAL 16
#define CF_TYPE_VOICE_TRAINING 17
#define CF_TYPE_MUSIC 18
#define CF_TYPE_MOVIES 19
#define CF_TYPE_INTERFACE 20
#define CF_TYPE_FONT 21
#define CF_TYPE_EFFECTS 22
#define CF_TYPE_HUD 23
#define CF_TYPE_PLAYER_MAIN 24
#define CF_TYPE_PLAYER_IMAGES_MAIN 25
#define CF_TYPE_CACHE 26
#define CF_TYPE_PLAYERS 27
#define CF_TYPE_SINGLE_PLAYERS 28
#define CF_TYPE_MULTI_PLAYERS 29
#define CF_TYPE_MULTI_CACHE 30
#define CF_TYPE_MODELS 5
#define CF_TYPE_TABLES 6
#define CF_TYPE_SOUNDS 7
#define CF_TYPE_SOUNDS_8B22K 8
#define CF_TYPE_SOUNDS_16B11K 9
#define CF_TYPE_VOICE 10
#define CF_TYPE_VOICE_BRIEFINGS 11
#define CF_TYPE_VOICE_CMD_BRIEF 12
#define CF_TYPE_VOICE_DEBRIEFINGS 13
#define CF_TYPE_VOICE_PERSONAS 14
#define CF_TYPE_VOICE_SPECIAL 15
#define CF_TYPE_VOICE_TRAINING 16
#define CF_TYPE_MUSIC 17
#define CF_TYPE_MOVIES 18
#define CF_TYPE_INTERFACE 19
#define CF_TYPE_FONT 20
#define CF_TYPE_EFFECTS 21
#define CF_TYPE_HUD 22
#define CF_TYPE_PLAYERS 23
#define CF_TYPE_PLAYER_IMAGES 24
#define CF_TYPE_SQUAD_IMAGES 25
#define CF_TYPE_SINGLE_PLAYERS 26
#define CF_TYPE_MULTI_PLAYERS 27
#define CF_TYPE_CACHE 28
#define CF_TYPE_MULTI_CACHE 29
#define CF_TYPE_MISSIONS 30
#define CF_TYPE_CONFIG 31
#define CF_TYPE_SQUAD_IMAGES_MAIN 32
#define CF_TYPE_DEMOS 33
#define CF_TYPE_CBANIMS 34
#define CF_TYPE_INTEL_ANIMS 35
#define CF_TYPE_DEMOS 32
#define CF_TYPE_CBANIMS 33
#define CF_TYPE_INTEL_ANIMS 34
#define CF_TYPE_SCRIPTS 35
#define CF_TYPE_FICTION 36
#define CF_MAX_PATH_TYPES 36 // Can be as high as you'd like //DTP; yeah but beware alot of things uses CF_MAX_PATH_TYPES
#define CF_MAX_PATH_TYPES 37 // Can be as high as you'd like //DTP; yeah but beware alot of things uses CF_MAX_PATH_TYPES
// TRUE if type is specified and valid
@@ -495,6 +540,10 @@ int cf_get_dir_type(CFILE *cfile);
// default path. If mode is NULL, delete the file.
CFILE *cfopen(char *filename, char *mode, int type = CFILE_NORMAL, int dir_type = CF_TYPE_ANY, bool localize = false);
// like cfopen(), but it accepts a fully qualified path only (ie, the result of a cf_find_file_location() call)
// NOTE: only supports reading files!!
CFILE *cfopen_special(char *file_path, char *mode, const int size, const int offset, int dir_type = CF_TYPE_ANY);
// Flush the open file buffer
int cflush(CFILE *cfile);
@@ -503,13 +552,21 @@ int cflush(CFILE *cfile);
void cf_set_version( CFILE * cfile, int version );
// Deletes a file. Returns 0 on error, 1 if successful
int cf_delete( char *filename, int dir_type );
int cf_delete(char *filename, int dir_type);
// Same as _access function to read a file's access bits
int cf_access( char *filename, int dir_type, int mode );
int cf_access(char *filename, int dir_type, int mode);
// Returns 1 if file exists, 0 if not.
int cf_exist( char *filename, int dir_type );
// Returns 1 if the file exists, 0 if not.
// Checks only the file system.
int cf_exists(char *filename, int dir_type);
// Goober5000
// Returns 1 if the file exists, 0 if not.
// Checks both the file system and the VPs.
int cf_exists_full(char *filename, int dir_type);
// check num_ext worth of ext_list extensions
int cf_exists_full_ext(char *filename, int dir_type, const int num_ext, const char **ext_list);
// ctmpfile() opens a temporary file stream. File is deleted automatically when closed
CFILE *ctmpfile();
@@ -517,6 +574,9 @@ CFILE *ctmpfile();
// Closes the file
int cfclose(CFILE *cfile);
//Checks if the given handle is valid
int cf_is_valid(CFILE *cfile);
// Returns size of file...
int cfilelength(CFILE *fp);
@@ -568,13 +628,15 @@ int cf_chksum_long(char *filename, uint *chksum, int max_size = -1, int cf_type
// NOTE : preserves current file position
int cf_chksum_long(CFILE *file, uint *chksum, int max_size = -1);
int cf_chksum_pack(char *filename, uint *chk_long, bool full = false);
// convenient for misc checksumming purposes ------------------------------------------
// update cur_chksum with the chksum of the new_data of size new_data_size
ushort cf_add_chksum_short(ushort seed, char *buffer, int size);
ushort cf_add_chksum_short(ushort seed, ubyte *buffer, int size);
// update cur_chksum with the chksum of the new_data of size new_data_size
unsigned long cf_add_chksum_long(unsigned long seed, char *buffer, int size);
uint cf_add_chksum_long(uint seed, ubyte *buffer, int size);
// convenient for misc checksumming purposes ------------------------------------------
@@ -642,11 +704,26 @@ void cf_sort_filenames( int n, char **list, int sort, file_list_info *info = NUL
// CD's and pack files.
// Input: filespace - Filename & extension
// pathtype - See CF_TYPE_ defines in CFILE.H
// max_out - Maximum string size to be stuffed into pack_filename
// Output: pack_filename - Absolute path and filename of this file. Could be a packfile or the actual file.
// size - File size
// offset - Offset into pack file. 0 if not a packfile.
// Returns: If not found returns 0.
int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, int *size, int *offset, bool localize = false);
int cf_find_file_location( char *filespec, int pathtype, int max_out, char *pack_filename, int *size, int *offset, bool localize = false);
// Searches for a file. Follows all rules and precedence and searches
// CD's and pack files. Searches all locations in order for first filename using ext filter list.
// Input: filename - Filename & extension
// ext_num - number of extensions to look for
// ext_list - extension filter list
// pathtype - See CF_TYPE_ defines in CFILE.H
// max_out - Maximum string length that should be stuffed into pack_filename
// Output: pack_filename - Absolute path and filename of this file. Could be a packfile or the actual file.
// size - File size
// offset - Offset into pack file. 0 if not a packfile.
// Returns: If not found returns -1, else returns offset into ext_list.
// (NOTE: This function is exponentially slow, so don't use it unless truely needed!!)
int cf_find_file_location_ext(char *filename, const int ext_num, const char **ext_list, int pathtype, int max_out = 0, char *pack_filename = NULL, int *size = NULL, int *offset = NULL, bool localize = false);
// Functions to change directories
int cfile_chdir(char *dir);
@@ -112,14 +112,14 @@
#include "cfile/cfile.h"
#include "cfile/cfilearchive.h"
#include "luaconf.h"
#define CHECK_POSITION
// Called once to setup the low-level reading code.
void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size )
void cf_init_lowlevel_read_code( CFILE * cfile, int lib_offset, int size, int pos )
{
Assert(cfile != NULL);
@@ -127,8 +127,8 @@ void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size )
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
cb = &Cfile_block_list[cfile->id];
cb->lib_offset = offset;
cb->raw_position = 0;
cb->lib_offset = lib_offset;
cb->raw_position = pos;
cb->size = size;
if ( cb->fp ) {
@@ -268,22 +268,22 @@ int cfseek( CFILE *cfile, int offset, int where )
//
int cfread(void *buf, int elsize, int nelem, CFILE *cfile)
{
Assert(cfile != NULL);
Assert(buf != NULL);
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
Cfile_block *cb;
cb = &Cfile_block_list[cfile->id];
// cfread() not supported for memory-mapped files
Assert( !cb->data );
Assert(cb->fp != NULL);
if(!cf_is_valid(cfile))
return 0;
int size = elsize*nelem;
Assert(nelem > 0);
Assert(elsize > 0);
Assert(size > 0);
if(buf == NULL || size <= 0)
return 0;
Cfile_block *cb = &Cfile_block_list[cfile->id];
// cfread() not supported for memory-mapped files
if(cb->data != NULL)
{
Warning(LOCATION, "Writing is not supported for mem-mapped files");
return 0;
}
if ( (cb->raw_position+size) > cb->size ) {
size = cb->size - cb->raw_position;
@@ -308,3 +308,34 @@ int cfread(void *buf, int elsize, int nelem, CFILE *cfile)
}
int cfread_lua_number(double *buf, CFILE *cfile)
{
if(!cf_is_valid(cfile))
return 0;
if(buf == NULL)
return 0;
Cfile_block *cb = &Cfile_block_list[cfile->id];
// cfread() not supported for memory-mapped files
if(cb->data != NULL)
{
Warning(LOCATION, "Writing is not supported for mem-mapped files");
return 0;
}
long orig_pos = ftell(cb->fp);
int items_read = fscanf(cb->fp, LUA_NUMBER_SCAN, buf);
cb->raw_position += ftell(cb->fp)-orig_pos;
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int tmp_offset;
tmp_offset = ftell(cb->fp) - cb->lib_offset;
Assert(tmp_offset==cb->raw_position);
#endif
return items_read;
}
@@ -90,6 +90,6 @@ extern Cfile_block Cfile_block_list[MAX_CFILE_BLOCKS];
extern CFILE Cfile_list[MAX_CFILE_BLOCKS];
// Called once to setup the low-level reading code.
void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size );
void cf_init_lowlevel_read_code( CFILE * cfile, int lib_offset, int size, int pos );
#endif
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileList.cpp $
* $Revision: 2.6 $
* $Date: 2005-01-31 23:27:51 $
* $Revision: 2.6.2.2 $
* $Date: 2007-05-20 02:51:26 $
* $Author: taylor $
*
* Code for doing directory lists and sorts
*
* $Log: not supported by cvs2svn $
* Revision 2.6.2.1 2006/08/19 04:16:49 taylor
* "byte" was the same as "ubyte", but since "byte" has to be an extra #define on everything but Windows, lets just get rid of it
*
* Revision 2.6 2005/01/31 23:27:51 taylor
* merge with Linux/OSX tree - p0131-2
*
* Revision 2.5 2004/07/26 20:47:25 Kazan
* remove MCD complete
*
@@ -161,14 +167,22 @@ void cf_sort_filenames( int n, char **list, int sort, file_list_info *info )
} else if (sort == CF_SORT_REVERSE) {
incr = n / 2;
char buffer[MAX_FILENAME_LEN];
file_list_info tt_tmp;
for (i = 0; i < incr; i++) {
t = list[n - 1 - i];
if ( stricmp(list[i], t) > 0 ) {
if (list[i] != t) {
strcpy(buffer, list[i]);
strcpy(list[i], t);
strcpy(t, buffer);
if (info) {
tt = info[n - 1 - i];
tt_tmp = info[i];
info[i] = tt;
tt = tt_tmp;
}
}
}
@@ -364,7 +378,7 @@ int cfread_compressed(void *buf, int elsize, int nelem, CFILE *cfile)
while(1) {
byte count;
ubyte count;
if ( cfread( &count, 1, 1, cfile ) != 1 ) {
break;
@@ -377,7 +391,7 @@ int cfread_compressed(void *buf, int elsize, int nelem, CFILE *cfile)
if ( count > 0 ) {
if ( run_span ) {
// RLE'd data
byte c;
ubyte c;
if ( cfread( &c, 1, 1, cfile ) != 1 ) {
break;
}
File diff suppressed because it is too large. Load diff
@@ -9,8 +9,8 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileSystem.h $
* $Revision: 2.3 $
* $Date: 2005-07-13 02:50:49 $
* $Revision: 2.5 $
* $Date: 2006-04-20 06:32:00 $
* $Author: Goober5000 $
*
* Functions to keep track of and find files that can exist
@@ -20,6 +20,13 @@
* all those locations, inherently enforcing precedence orders.
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2005/10/16 23:15:46 wmcoolmon
* Hardened cfile against array overflows
*
* Revision 2.3 2005/07/13 02:50:49 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.2 2004/08/11 05:06:19 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
@@ -65,7 +72,7 @@ void cf_free_secondary_filelist();
// Internal stuff
typedef struct cf_pathtype {
int index; // To verify that the CF_TYPE define is correctly indexed into this array
char *path; // Path relative to Freespace root, has ending backslash.
char *path; // Path relative to FreeSpace root, has ending backslash.
char *extensions; // Extensions used in this pathtype, separated by spaces
int parent_index; // Index of this directory's parent. Used for creating directories when writing.
} cf_pathtype;
@@ -79,9 +86,11 @@ extern cf_pathtype Pathtypes[CF_MAX_PATH_TYPES];
// If filename isn't null it will also tack the filename
// on the end, creating a completely valid filename.
// Input: pathtype - CF_TYPE_??
// path_max - Maximum characters in the path
// filename - optional, if set, tacks the filename onto end of path.
// Output: path - Fully qualified pathname.
void cf_create_default_path_string( char *path, int pathtype, char *filename=NULL, bool localize = false);
//Returns 0 if result would be too long (invalid result)
int cf_create_default_path_string( char *path, uint path_max, int pathtype, char *filename=NULL, bool localize = false);
#endif //_CFILESYSTEM_H
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/Cfilearchiver/CfileArchiver.cpp $
* $Revision: 2.3 $
* $Date: 2005-09-08 00:09:31 $
* $Revision: 2.4.2.1 $
* $Date: 2007-05-11 03:09:21 $
* $Author: taylor $
*
* Program to create an archive file for use with cfile stuff
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2005/11/13 06:38:04 taylor
* never did port this stupid thing to PPC
*
* Revision 2.3 2005/09/08 00:09:31 taylor
* fix building/linking of command line tools under Linux/OSX
* add tools as targets to OSX project file
*
* Revision 2.2 2005/01/30 12:50:08 taylor
* merge with Linux/OSX tree - p0130
*
@@ -52,9 +59,32 @@
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
static int data_error;
static int no_dir;
// right out of pstypes.h but we don't want to use the INTEL_INT macro here
// since it would require SDL which isn't used on WIN32 platforms
#if BYTE_ORDER == BIG_ENDIAN
#define INT_SWAP(x) ( \
(x << 24) | \
(((ulong)x) >> 24) | \
((x & 0x0000ff00) << 8) | \
((x & 0x00ff0000) >> 8) \
)
#else
#define INT_SWAP(x) (x)
#endif
size_t fswrite_int(int *wint, FILE *stream)
{
int tmp = *wint;
tmp = INT_SWAP(tmp);
return fwrite(&tmp, 1, sizeof(int), stream);
}
unsigned int Total_size=16; // Start with size of header
unsigned int Num_files =0;
FILE *fp_out = NULL;
@@ -79,26 +109,36 @@ char tmp_data[BLOCK_SIZE]; // 1 MB
void write_header()
{
int ver = VERSION_NUMBER;
fseek(fp_out, 0, SEEK_SET);
fwrite("VPVP", 1, 4, fp_out);
int ver = VERSION_NUMBER;
fwrite(&ver, 1, 4, fp_out);
fwrite(&Total_size, 1, 4, fp_out);
fwrite(&Num_files, 1, 4, fp_out);
fswrite_int(&ver, fp_out);
fswrite_int((int*)&Total_size, fp_out);
fswrite_int((int*)&Num_files, fp_out);
}
int write_index(char *hf, char *df)
{
FILE *h = fopen(hf, "rb");
if (!h) return 0;
FILE *d = fopen(df, "a+b");
if (!d) return 0;
for (unsigned int i=0;i<Num_files;i++) {
FILE *h = NULL, *d = NULL;
unsigned int i;
h = fopen(hf, "rb");
d = fopen(df, "a+b");
if ( (h == NULL) || (d == NULL) )
return 0;
for (i = 0; i < Num_files; i++) {
fread(tmp_data, 32+4+4+4, 1, h);
fwrite(tmp_data, 32+4+4+4, 1, d);
}
fclose(h);
fclose(d);
unlink(hf);
return 1;
}
@@ -121,16 +161,18 @@ void pack_file( char *filespec, char *filename, int filesize, _fs_time_t time_wr
return;
}
memset( path, 0, sizeof(path));
strcpy( path, filename );
if ( strlen(filename)>31 ) {
printf( "Filename '%s' too long\n", filename );
exit(1);
if ( strlen(filename) > 31 ) {
printf( "Filename '%s' too long! Skipping...\n", filename );
return;
}
fwrite( &Total_size, 1, 4, fp_out_hdr );
fwrite( &filesize, 1, 4, fp_out_hdr );
memset( path, 0, sizeof(path) );
strcpy( path, filename );
fswrite_int( (int*)&Total_size, fp_out_hdr );
fswrite_int( &filesize, fp_out_hdr );
fwrite( &path, 1, 32, fp_out_hdr );
fwrite( &time_write, 1, sizeof(_fs_time_t), fp_out_hdr);
fswrite_int( (int*)&time_write, fp_out_hdr );
Total_size += filesize;
Num_files++;
@@ -169,17 +211,21 @@ void add_directory( char * dirname)
char path[256];
char *pathptr = path;
char *tmpptr;
int i = 0;
strcpy(path, dirname);
fwrite(&Total_size, 1, 4, fp_out_hdr);
int i = 0;
fwrite(&i, 1, 4, fp_out_hdr);
fswrite_int( (int*)&Total_size, fp_out_hdr);
fswrite_int( &i, fp_out_hdr);
// strip out any directories that this dir is a subdir of
while ((tmpptr = strchr(pathptr, DIR_SEPARATOR_CHAR)) != NULL) {
while ( (tmpptr = strchr(pathptr, DIR_SEPARATOR_CHAR)) != NULL ) {
pathptr = tmpptr+1;
}
fwrite(pathptr, 1, 32, fp_out_hdr);
fwrite(&i, 1, 4, fp_out_hdr); // timestamp = 0
fswrite_int( &i, fp_out_hdr); // timestamp = 0
Num_files++;
}
@@ -191,28 +237,11 @@ void pack_directory( char * filespec)
#endif
char tmp[512];
char tmp1[512];
/*
char dir_name[512];
char *last_slash;
last_slash = strrchr(filespec, '\\');
if ( last_slash ) {
strcpy(dir_name, last_slash+1);
} else {
strcpy(dir_name, filespec);
}
if ( !stricmp(dir_name, "voice") ) {
return;
}
*/
char *ts;
// strip trailing slash
ts = filespec+(strlen(filespec)-1);
while(*ts == DIR_SEPARATOR_CHAR && ts > filespec)
ts = filespec + (strlen(filespec) - 1);
while ( (*ts == DIR_SEPARATOR_CHAR) && (ts > filespec) )
*ts = '\0';
strcpy( tmp1, filespec );
@@ -226,7 +255,7 @@ void pack_directory( char * filespec)
find_handle = _findfirst( tmp1, &find );
if( find_handle != -1 ) {
if ( find.attrib & _A_SUBDIR ) {
if (strcmp( "..", find.name) && strcmp( ".", find.name)) {
if (strcmp( "..", find.name) && strcmp( ".", find.name) && strcmp( ".svn", find.name)) {
strcpy( tmp, filespec );
strcat( tmp, "\\" );
strcat( tmp, find.name );
@@ -238,7 +267,7 @@ void pack_directory( char * filespec)
while( !_findnext( find_handle, &find ) ) {
if ( find.attrib & _A_SUBDIR ) {
if (strcmp( "..", find.name) && strcmp( ".", find.name)) {
if (strcmp( "..", find.name) && strcmp( ".", find.name) && strcmp( ".svn", find.name)) {
strcpy( tmp, filespec );
strcat( tmp, "\\" );
strcat( tmp, find.name );
@@ -271,6 +300,10 @@ void pack_directory( char * filespec)
continue;
}
if ( (strcmp(dir->d_name, ".svn") == 0) ) {
continue;
}
if (S_ISDIR(buf.st_mode)) {
strcpy( tmp, filespec );
strcat( tmp, "/" );
@@ -296,11 +329,11 @@ int verify_directory( char *filespec )
// strip trailing '/'
ts = filespec+(strlen(filespec)-1);
while(*ts == DIR_SEPARATOR_CHAR && ts > filespec)
while ( (*ts == DIR_SEPARATOR_CHAR) && (ts > filespec) )
*ts = '\0';
// make sure last directory is named "data", ignoring case
dd = filespec+(strlen(filespec)-4);
dd = filespec + (strlen(filespec) - 4);
if ( stricmp( dd, "data" ) )
data_error = 1;
@@ -310,8 +343,8 @@ int verify_directory( char *filespec )
void print_instructions()
{
printf( "Creates a vp archive out of a FreeSpace data tree.\n\n" );
printf( "Usage: cfilearchiver archive_name src_dir\n");
printf( "Example: cfilearchiver freespace /tmp/freespace/data\n\n");
printf( "Usage: cfilearchiver archive_name src_dir\n");
printf( "Example: cfilearchiver freespace /tmp/freespace/data\n\n");
printf( "Directory structure options:\n" );
printf( " Effects (.ani .pcx .neb .tga)\n" );
printf( " Fonts (.vf)\n" );
@@ -5,13 +5,25 @@
/*
* $Logfile: /Freespace2/code/cfileextractor/cfileextractor.cpp $
* $Revision: 1.6 $
* $Date: 2005-09-08 05:04:15 $
* $Author: taylor $
* $Revision: 1.9 $
* $Date: 2006-01-20 07:10:33 $
* $Author: Goober5000 $
*
* Cross-platform cmdline extractor for VP files
*
* $Log: not supported by cvs2svn $
* Revision 1.8 2005/09/24 02:40:09 Goober5000
* get rid of a whole bunch of Microsoft warnings
* --Goober5000
*
* Revision 1.7 2005/09/20 02:45:47 taylor
* bump version to 0.6
* add a specified directory to output files to
*
* Revision 1.6 2005/09/08 05:04:15 taylor
* make it actually compile under WIN32
* bump version to 0.5 since little else is going to be done to this thing
*
* Revision 1.5 2005/09/08 00:09:31 taylor
* fix building/linking of command line tools under Linux/OSX
* add tools as targets to OSX project file
@@ -33,6 +45,9 @@
* $NoKeywords: $
*/
#include "cfile/cfile.h"
#include "globalincs/pstypes.h"
#include <vector>
#include <iostream>
#include <cstdlib>
@@ -50,9 +65,6 @@
#include <sys/types.h>
#include <errno.h>
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
// /////////////////////////////////////////////////////////////////////////////
//
@@ -75,6 +87,12 @@
FILE *fp_in = NULL;
FILE *fp_out = NULL;
#ifndef MAX_PATH
#define MAX_PATH 255
#endif
char out_dir[MAX_PATH];
#define BLOCK_SIZE (1024*1024)
char tmp_data[BLOCK_SIZE]; // 1 MB
@@ -82,11 +100,12 @@ char tmp_data[BLOCK_SIZE]; // 1 MB
static int have_index = 0;
static int have_header = 0;
#define ERR_NO_FP_IN 0
#define ERR_NO_FP_OUT 1
#define ERR_INVALID_VP 2
#define ERR_NO_INDEX 3
#define ERR_NO_HEADER 4
#define ERR_NO_FP_IN 0
#define ERR_NO_FP_OUT 1
#define ERR_INVALID_VP 2
#define ERR_NO_INDEX 3
#define ERR_NO_HEADER 4
#define ERR_PATH_TOO_LONG 5
typedef struct vp_header {
char id[4]; // 'VPVP'
@@ -158,6 +177,9 @@ void print_error(int err)
case ERR_NO_HEADER:
printf("ERROR: No file header is available! Exiting...\n");
break;
case ERR_PATH_TOO_LONG:
printf("ERROR: Path to output directory is too long! Exiting...\n");
break;
default:
break;
}
@@ -261,15 +283,34 @@ void extract_all_files(char *file)
int status, m_error, nbytes, nbytes_remaining;
char path[CF_MAX_PATHNAME_LENGTH+CF_MAX_FILENAME_LENGTH+1]; // path length + filename length + extra NULL
char path2[CF_MAX_PATHNAME_LENGTH+CF_MAX_FILENAME_LENGTH+1]; // path length + filename length + extra NULL
char *c;
ubyte have_outdir = 0;
printf("VP file extractor - version 0.01\n");
int out_len = strlen(out_dir);
if (out_len > 0)
have_outdir = 1;
printf("VP file extractor - version 0.6\n");
printf("\n");
if (have_outdir) {
printf("Output directory: \"%s\"\n", out_dir);
}
printf("Extracting: %s...\n", file);
for (uint i = 0; i < VP_FileInfo.size(); i++) {
// save the file path to a temp location and recursively make the needed directories
sprintf(path, "%s%s", VP_FileInfo[i].file_path, DIR_SEPARATOR_STR);
if (have_outdir) {
if ( (out_len + 1 + strlen(path)) > MAX_PATH-1 )
print_error(ERR_PATH_TOO_LONG);
sprintf(path, "%s%s%s%s", out_dir, DIR_SEPARATOR_STR, VP_FileInfo[i].file_path, DIR_SEPARATOR_STR);
} else {
sprintf(path, "%s%s", VP_FileInfo[i].file_path, DIR_SEPARATOR_STR);
}
c = &path[0];
@@ -296,11 +337,24 @@ void extract_all_files(char *file)
}
}
memset( path, 0, CF_MAX_PATHNAME_LENGTH+CF_MAX_FILENAME_LENGTH+1);
// start writing out the file
fseek(fp_in, VP_FileInfo[i].offset, SEEK_SET);
sprintf(path, "%s%s%s", VP_FileInfo[i].file_path, DIR_SEPARATOR_STR, VP_FileInfo[i].file_name);
fp_out = fopen(path, "wb");
// this is cheap, I know.
if (have_outdir) {
if ( (out_len + 1 + strlen(path)) > MAX_PATH-1 )
print_error(ERR_PATH_TOO_LONG);
sprintf(path2, "%s%s%s", out_dir, DIR_SEPARATOR_STR, path);
} else {
strcpy(path2, path);
}
fp_out = fopen(path2, "wb");
printf(" %s ... ", path);
@@ -344,7 +398,7 @@ void list_all_files(char *file)
print_error(ERR_NO_INDEX);
printf("VP file extractor - version 0.01\n");
printf("VP file extractor - version 0.6\n");
printf("\n");
printf("%s:\n", file);
printf("\n");
@@ -390,9 +444,9 @@ void list_all_files(char *file)
void help()
{
printf("VP file extractor - version 0.5\n");
printf("VP file extractor - version 0.6\n");
printf("\n");
printf("Usage: cfileextractor [-x | -l] [-L] <vp_filename>\n");
printf("Usage: cfileextractor [-x | -l] [-L] [-o <dir>] <vp_filename>\n");
printf("\n");
printf(" Commands (only one at the time):\n");
printf(" -x | --extract Extract all files into current directory.\n");
@@ -401,6 +455,8 @@ void help()
printf("\n");
printf(" Options:\n");
printf(" -L | --lowercase Force all filenames to be lower case.\n");
printf(" -o <dir> Extract files to <dir> instead of current directory.\n");
printf(" NOTE: No spaces allowed, enclose path in \" \" if needed.\n");
printf("\n");
printf(" (No command specified will list all files in the VP archive.)\n");
printf("\n");
@@ -435,6 +491,8 @@ int main(int argc, char *argv[])
// if the header is invalid then read_header() should exit us out
read_header();
memset(out_dir, 0, MAX_PATH);
// TODO: add filter based extraction
for (int i = 1; i < argc-1; i++) {
if (!strcmp(argv[i], "-x") || !strcmp(argv[i], "--extract")) {
@@ -451,6 +509,9 @@ int main(int argc, char *argv[])
exit(0);
}
list = 1;
} else if ( !strcmp(argv[i], "-o") && (i+1 < argc) && (argv[i+1][0] != '-') ) {
strncpy(out_dir, argv[i+1], MAX_PATH-1);
i++; // have to increment "i" past the output directory
} else {
help();
return 0;
File diff suppressed because it is too large. Load diff
@@ -11,11 +11,130 @@
/*
* $Logfile: /Freespace2/code/Cmdline/cmdline.h $
* $Revision: 2.73 $
* $Date: 2005-07-25 05:24:16 $
* $Author: Goober5000 $
* $Revision: 2.89.2.9 $
* $Date: 2008-01-08 01:41:13 $
* $Author: Kazan $
*
* $Log: not supported by cvs2svn $
* Revision 2.89.2.8 2007/10/15 06:43:08 taylor
* FS2NetD v.2 (still a work in progress, but is ~98% complete)
*
* Revision 2.89.2.7 2007/04/11 18:21:22 taylor
* cleanup of chcksum stuff (works properly on 64-bit systems now)
* add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
* little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
*
* Revision 2.89.2.6 2007/04/06 12:55:37 karajorma
* Add the -cap_object_update command line to force multiplayer clients to a more server friendly object update setting.
*
* Revision 2.89.2.5 2007/02/11 09:24:08 taylor
* remove -pcx32 and -jpgtga
*
* Revision 2.89.2.4 2006/11/15 00:21:40 taylor
* clean up some cmdline options which were/weren't FSO only
* add back the "-32bit" option, for retail compatibility (doesn't do anything, it's just there to avoid the unknown option message)
* add "-debug_window" to turn on the Windows-only extra debug output window (it's off by default now, only logging to file instead)
*
* Revision 2.89.2.3 2006/07/08 18:09:41 taylor
* remove -allslev
* make CTRL-SHIFT-S hotkey work in mission simulator (it's a toggle, so you can turn it on or off while on the screen)
* fix a bug where blank lines would show up in the campaign list for branch/alternate type missions that are otherwise marked as not completed
*
* Revision 2.89.2.2 2006/06/18 17:21:49 taylor
* add a -disable_fbo troubleshooting option for those ATI users having trouble with FBOs, but can still use envmapping otherwise
*
* Revision 2.89.2.1 2006/06/15 00:16:23 taylor
* remove previous attempts at the Y bug fix, it's now back to the retail code for that
*
* Revision 2.89 2006/05/27 17:17:57 taylor
* few things:
* - comment out that -fixbugs and -nocrash crap, that's just stupid
* - move -env off of the experimental list (since it's working pretty well in OGL)
* - remove -nobeampierce
* - remove -max_subdivide (didn't do anything)
* - remove -rt (didn't do anything, and per-coder cmdline options should never be in CVS)
* - move -cache_bitmaps to game speed rather than graphics
* - add options for env and spec map scaling for envmaps (temporary, to be removed before official 3.6.8)
* - add option for new alpha blend mode so that artists can still test with it but not mess up normal users with the bad MediaVPs
* - remove -d3d_particle (it's obsolete now)
*
* Revision 2.88 2006/05/13 07:29:51 taylor
* OpenGL envmap support
* newer OpenGL extension support
* add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
* add cubemap reading and writing support to DDS loader
* fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
* add support for a default envmap named "cubemap.dds"
* new mission flag "$Environment Map:" to use a pre-existing envmap
* minor cleanup of compiler warning messages
* get rid of wasteful math from gr_set_proj_matrix()
* remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
* clean up bmpman flags in reguards to cubemaps and render targets
* disable D3D envmap code until it can be upgraded to current level of code
* remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
* replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
*
* Revision 2.87 2006/04/05 13:47:01 taylor
* remove -tga16, it's obsolete now
* add a temporary -no_emissive_light option to not use emission type light in OGL
*
* Revision 2.86 2006/03/18 10:17:58 taylor
* we already have a variable to show the framerate so lets just use the one
*
* Revision 2.85 2006/02/24 07:36:49 taylor
* try and make some sense out of that cmdline option mess, maybe it will stay sane for a few days at least :)
*
* Revision 2.84 2006/01/10 18:37:45 randomtiger
* Improvements to voice recognition system.
* Also function put on -voicer launcher option.
*
* Revision 2.83 2005/11/24 06:37:47 phreak
* Added -missile_lighting command line
*
* Revision 2.82 2005/11/23 00:43:20 phreak
* Command lines for rearm countdown timer.
*
* Revision 2.81 2005/11/21 00:46:06 Goober5000
* add ai_settings.tbl
* --Goober5000
*
* Revision 2.80 2005/11/13 06:55:38 taylor
* cmdline option cleanup:
* remove from launcher -pcx32, -cell, -UseNewAI
* remove from game -loadonlyused, -dxt, -pcx2dds
* rename -d3dmipmap, -d3d_no_vsync, -dnoshowvid to non API specific sounding names
* add -nograb into help output under Linux/OSX
* add -loadallweps and -img2dds
*
* Revision 2.79 2005/10/30 20:00:22 taylor
* same basic cleanup and self-sanity changes
* split up WinMain() and main() so it doesn't resemble ifdef hell
* rename WinMainSub() to game_main() and move anything that should have been in WinMain() to WinMain()
*
* Revision 2.78 2005/10/23 11:45:06 taylor
* add -ogl_shine to adjust the OGL shininess value so that people can play around and find the best value to use
*
* Revision 2.77 2005/10/22 04:28:16 unknownplayer
* Added -UseNewAI command line option to force the game to always use
* the SCP AI changes. As of now there's some problem in gr_d3d_set_render_target
* that crashes the game when it gets to a mission.
*
* Revision 2.76 2005/10/12 05:43:40 taylor
* temporary cmdline option, -y_bug_fix, to switch between original code (default) and previous attempt at the Y-bug fix
*
* Revision 2.75 2005/09/30 09:47:06 taylor
* remove -rlm, it's always on now since there was never a complaint and pretty much everyone uses it
* add -cache_bitmaps and have bitmap caching between levels off by default
* when -cache_bitmaps is used then use C-BMP for top-right memory listing, and just BMP otherwise
*
* Revision 2.74 2005/09/21 03:55:31 Goober5000
* add option for warp flash; mess with the cmdlines a bit
* --Goober5000
*
* Revision 2.73 2005/07/25 05:24:16 Goober5000
* cleaned up some command line and mission flag stuff
* --Goober5000
*
* Revision 2.72 2005/07/13 02:50:49 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
@@ -483,11 +602,8 @@
#ifndef FS_CMDLINE_HEADER_FILE
#define FS_CMDLINE_HEADER_FILE
#ifdef _WIN32
int parse_cmdline(char *cmdline);
#else
int parse_cmdline(int argc, char *argv[]);
#endif
int fred2_parse_cmdline(int argc, char *argv[]);
// COMMAND LINE SETTINGS
@@ -497,109 +613,127 @@ int fred2_parse_cmdline(int argc, char *argv[]);
// Add any extern definitions here and put the actual variables inside of cmdline.cpp for ease of use
// Also, check to make sure anything you add doesn't break Fred or TestCode
extern int Cmdline_multi_stream_chat_to_file;
extern int Cmdline_freespace_no_sound;
extern int Cmdline_freespace_no_music;
extern int Cmdline_gimme_all_medals;
extern int Cmdline_use_last_pilot;
extern int Cmdline_cd_check;
extern int Cmdline_start_netgame;
extern int Cmdline_closed_game;
extern int Cmdline_restricted_game;
extern int Cmdline_network_port;
// RETAIL OPTIONS ----------------------------------------------
extern char *Cmdline_connect_addr;
extern char *Cmdline_game_name;
extern char *Cmdline_game_password;
extern char *Cmdline_rank_above;
extern char *Cmdline_rank_below;
extern char *Cmdline_connect_addr;
extern int Cmdline_multi_log;
extern int Cmdline_server_firing;
extern int Cmdline_cd_check;
extern int Cmdline_client_dodamage;
extern int Cmdline_spew_pof_info;
extern int Cmdline_closed_game;
extern int Cmdline_freespace_no_music;
extern int Cmdline_freespace_no_sound;
extern int Cmdline_gimme_all_medals;
extern int Cmdline_mouse_coords;
extern int Cmdline_multi_log;
extern int Cmdline_multi_stream_chat_to_file;
extern int Cmdline_network_port;
extern int Cmdline_restricted_game;
extern int Cmdline_server_firing;
extern int Cmdline_spew_pof_info;
extern int Cmdline_start_netgame;
extern int Cmdline_timeout;
extern int Cmdline_SpewMission_CRCs;
extern int Cmdline_SpewTable_CRCs;
extern int Cmdline_use_last_pilot;
extern int Cmdline_window;
extern char *Cmdline_almission; //DTP for autoload mission
extern int Cmdline_gf4fix; //DTP for Random tigers GF4fix.
extern int Cmdline_allslev;
extern int Cmdline_dualscanlines;
extern int Cmdline_dnoshowvid; //WMC Toggles movie playing support
extern int Cmdline_noscalevid; // disables fit-to-window for movies - taylor
extern char *Cmdline_mod; //DTP for mod support
extern int Cmdline_show_fps;//DTP moved here because it is the correct place for it to be.
extern int Cmdline_show_stats;
extern int Cmdline_safeloading;
extern int Cmdline_nospec;
extern int Cmdline_orb_radar;
extern int Cmdline_TBPWarpEffects; // TBP warp effects -Et1
extern char *Cmdline_res;
extern int Cmdline_cache_ani;
extern int Cmdline_d3dmipmap;
extern int Cmdline_beams_no_pierce_shields; // Goober5000
extern float Cmdline_fov;
// FSO OPTIONS -------------------------------------------------
extern float static_light_factor;
extern float static_tube_factor;
extern float static_point_factor;
// Graphics related
extern double specular_exponent_value;
extern float Cmdline_clip_dist;
extern float Cmdline_fov;
extern float Cmdline_ogl_spec;
extern float Cmdline_glow_factor;
extern float static_light_factor;
extern float static_point_factor;
extern float static_tube_factor;
extern int Cmdline_ambient_factor;
extern int Cmdline_cell;
extern int Cmdline_nohtl;
extern int Cmdline_dxt;
extern int Cmdline_jpgtga;
extern int Cmdline_no_set_gamma;
extern int Cmdline_d3d_no_vsync;
extern int Cmdline_pcx32;
extern int Cmdline_pcx32dds;
extern int Cmdline_decals;
extern int Cmdline_env;
extern int Cmdline_mipmap;
extern int Cmdline_missile_lighting;
extern int Cmdline_glow;
extern int Cmdline_nomotiondebris;
extern int Cmdline_rlm;
extern int Cmdline_noibx;
extern int Cmdline_noscalevid; // disables fit-to-window for movies - taylor
extern int Cmdline_spec;
extern int Cmdline_normal;
extern int Cmdline_height;
extern int Cmdline_enable_3d_shockwave;
// Game Speed related
extern int Cmdline_cache_bitmaps;
extern int Cmdline_img2dds;
extern int Cmdline_NoFPSCap;
extern int Cmdline_no_vsync;
// HUD related
extern int Cmdline_ballistic_gauge;
extern int Cmdline_dualscanlines;
extern int Cmdline_orb_radar;
extern int Cmdline_rearm_timer;
extern int Cmdline_targetinfo;
// Gameplay related
extern int Cmdline_3dwarp;
extern int Cmdline_ship_choice_3d;
extern int Cmdline_weapon_choice_3d;
extern int Cmdline_warp_flash;
extern int Cmdline_autopilot_interruptable;
// Audio related
extern int Cmdline_query_speech;
extern int Cmdline_snd_preload;
extern int Cmdline_voice_recognition;
// MOD related
extern char *Cmdline_mod; // DTP for mod support
extern int Cmdline_tbp;
extern int Cmdline_wcsaga;
// Multiplayer/Network related
extern char *Cmdline_almission; // DTP for autoload mission (for multi only)
extern int Cmdline_ingamejoin;
extern int Cmdline_mpnoreturn;
extern char *Cmdline_spew_mission_crcs;
extern char *Cmdline_spew_table_crcs;
extern int Cmdline_objupd;
// Troubleshooting
extern int Cmdline_d3d_lesstmem;
extern int Cmdline_load_all_weapons;
extern int Cmdline_nohtl;
extern int Cmdline_noibx;
extern int Cmdline_nomovies; // WMC Toggles movie playing support
extern int Cmdline_no_set_gamma;
extern int Cmdline_novbo;
extern int Cmdline_safeloading;
extern int Cmdline_no_fbo;
extern int Cmdline_noglsl;
extern int Cmdline_ati_color_swap;
// Developer/Testing related
extern char *Cmdline_start_mission;
extern int Cmdline_dis_collisions;
extern int Cmdline_dis_weapons;
extern int Cmdline_noparseerrors;
extern int Cmdline_nowarn;
extern int Cmdline_show_mem_usage;
extern int Cmdline_show_pos;
extern int Cmdline_show_stats;
extern int Cmdline_timerbar;
extern int Cmdline_save_render_targets;
extern int Cmdline_debug_window;
extern int Cmdline_verify_vps;
#ifdef SCP_UNIX
extern int Cmdline_no_grab;
extern int Cmdline_no_grab;
#endif
extern int Cmdline_noglow;
extern int Cmdline_timerbar;
extern int Cmdline_query_speech;
extern int Cmdline_ship_choice_3d;
extern int Cmdline_d3d_particle;
extern int Cmdline_ambient_factor;
extern int Cmdline_show_mem_usage;
extern int Cmdline_rt;
extern int Cmdline_ingamejoin;
extern char *Cmdline_start_mission;
extern int Cmdline_d3d_lesstmem;
extern int Cmdline_batch_3dunlit;
extern int Cmdline_2d_poof;
extern int Cmdline_3dwarp;
extern int Cmdline_FRED2_htl;
extern int CmdLine_NoWarn;
extern int Cmdline_novbo;
extern int Cmdline_snd_preload;
extern int Cmdline_NoFPSCap;
extern float Cmdline_max_subdivide;
extern int Cmdline_alpha_env;
extern int Cmdline_env;
extern int Cmdline_decals;
extern int Cmdline_ballistic_gauge;
extern int Cmdline_smart_shields;
extern int Cmdline_tga16;
extern int Cmdline_wcsaga;
//extern char FreeSpace_Directory[]; // allievating a cfilesystem problem caused by fred -- Kazan
#endif
@@ -9,13 +9,24 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.cpp $
* $Revision: 2.6 $
* $Date: 2005-04-05 05:53:15 $
* $Author: taylor $
* $Revision: 2.9 $
* $Date: 2005-12-04 19:07:48 $
* $Author: wmcoolmon $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2005/11/21 02:43:30 Goober5000
* change from "setting" to "profile"; this way makes more sense
* --Goober5000
*
* Revision 2.7 2005/11/21 00:46:06 Goober5000
* add ai_settings.tbl
* --Goober5000
*
* Revision 2.6 2005/04/05 05:53:15 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
* Revision 2.5 2004/07/26 20:47:25 Kazan
* remove MCD complete
*
@@ -230,26 +241,31 @@
* $NoKeywords: $
*/
#include "globalincs/systemvars.h"
#include "cmeasure/cmeasure.h"
#include "freespace2/freespace.h"
#include "model/model.h"
//#include "freespace2/freespace.h"
//#include "model/model.h"
#include "ship/ship.h"
#include "math/staticrand.h"
#include "object/object.h"
#include "weapon/weapon.h"
#include "hud/hud.h"
#include "gamesnd/gamesnd.h"
#include "network/multimsgs.h"
#include "mission/missionparse.h"
//cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
//cmeasure Cmeasures[MAX_CMEASURES];
cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
cmeasure Cmeasures[MAX_CMEASURES];
int Num_cmeasure_types = 0;
int Num_cmeasures = 0;
int Cmeasure_inited = 0;
//int Num_cmeasure_types = 0;
//int Num_cmeasures = 0;
//int Cmeasure_inited = 0;
int Cmeasures_homing_check = 0;
int Countermeasures_enabled = 1; // Debug, set to 0 means no one can fire countermeasures.
// This will get called at the start of each level.
//Not anymore - WMC
/*
void cmeasure_init()
{
int i;
@@ -264,8 +280,8 @@ void cmeasure_init()
Cmeasures[i].subtype = CMEASURE_UNUSED;
}
}
}*/
/*
void cmeasure_render(object * objp)
{
// JAS TODO: Replace with proper fireball
@@ -279,16 +295,6 @@ void cmeasure_render(object * objp)
Int3(); // Hey, what are we doing in here?
return;
}
// float size = -1.0f;
// vertex p;
// g3_rotate_vertex(&p, &objp->pos );
// if ( rand() > RAND_MAX/2 ) {
// gr_set_color( 255, 0, 0 );
// } else {
// gr_set_color( 255, 255, 255 );
// }
// g3_draw_sphere(&p, 100.0f );
if ( cmip->model_num > -1 ) {
model_clear_instance(cmip->model_num);
@@ -296,39 +302,8 @@ void cmeasure_render(object * objp)
} else {
mprintf(( "Not rendering countermeasure because model_num is negative\n" ));
}
}*/
/*
// JAS TODO: Replace with proper fireball
int framenum = -1;
float size = -1.0f;
vertex p;
cmeasure *cmp;
fireball_data *fd;
cmp = &Cmeasures[objp->instance];
fd = &Fireball_data[FIREBALL_SHIP_EXPLODE1];
switch (cmp->subtype) {
case CMEASURE_UNUSED:
Int3(); // Hey, what are we doing in here?
break;
default:
framenum = (int) (fd->num_frames * Cmeasures[objp->instance].lifeleft*4) % fd->num_frames;
size = objp->radius;
break;
}
Assert(framenum != -1);
Assert(size != -1.0f);
gr_set_bitmap(fd->bitmap_id + framenum);
g3_rotate_vertex(&p, &objp->pos );
g3_draw_bitmap(&p, 0, size*0.5f, TMAP_FLAG_TEXTURED );
*/
}
void cmeasure_delete( object * objp )
{
int num;
@@ -340,15 +315,15 @@ void cmeasure_delete( object * objp )
Cmeasures[num].subtype = CMEASURE_UNUSED;
Num_cmeasures--;
Assert( Num_cmeasures >= 0 );
}
}*/
// broke cmeasure_move into two functions -- process_pre and process_post (as was done with
// all *_move functions). Nothing to do for process_pre
/*
void cmeasure_process_pre( object *objp, float frame_time)
{
}
}*/
/*
void cmeasure_process_post(object * objp, float frame_time)
{
int num;
@@ -365,13 +340,12 @@ void cmeasure_process_post(object * objp, float frame_time)
}
}
}
float Skill_level_cmeasure_life_scale[NUM_SKILL_LEVELS] = {3.0f, 2.0f, 1.5f, 1.25f, 1.0f};
}*/
// creates one countermeasure. A ship fires 1 of these per launch. rand_val is used
// in multiplayer. If -1, then create a random number. If non-negative, use this
// number for static_rand functions
/*
int cmeasure_create( object * source_obj, vec3d * pos, int cm_type, int rand_val )
{
int n, objnum, parent_objnum, arand;
@@ -380,11 +354,6 @@ int cmeasure_create( object * source_obj, vec3d * pos, int cm_type, int rand_val
cmeasure *cmp;
cmeasure_info *cmeasurep;
#ifndef NDEBUG
if (!Countermeasures_enabled || !Ai_firing_enabled)
return -1;
#endif
Cmeasures_homing_check = 2; // Tell homing code to scan everything for two frames. If only one frame, get sync problems due to objects being created at end of frame!
parent_objnum = OBJ_INDEX(source_obj);
@@ -423,7 +392,7 @@ int cmeasure_create( object * source_obj, vec3d * pos, int cm_type, int rand_val
cmp->lifeleft = static_randf(arand) * (cmeasurep->life_max - cmeasurep->life_min) / cmeasurep->life_min;
if (source_obj->flags & OF_PLAYER_SHIP){
cmp->lifeleft *= Skill_level_cmeasure_life_scale[Game_skill_level];
cmp->lifeleft *= The_mission.ai_profile->cmeasure_life_scale[Game_skill_level];
}
cmp->lifeleft = cmeasurep->life_min + cmp->lifeleft * (cmeasurep->life_max - cmeasurep->life_min);
@@ -442,47 +411,105 @@ int cmeasure_create( object * source_obj, vec3d * pos, int cm_type, int rand_val
Num_cmeasures++;
//Set countermeasure velocity
vec3d vel, rand_vec;
//Get cmeasure rear velocity in world
vm_vec_scale_add(&vel, &source_obj->phys_info.vel, &source_obj->orient.vec.fvec, -25.0f);
//Get random velocity vector
static_randvec(arand+1, &rand_vec);
//Add it to the rear velocity
vm_vec_scale_add2(&vel, &rand_vec, 2.0f);
obj->phys_info.vel = vel;
vm_vec_zero(&obj->phys_info.rotvel);
vm_vec_zero(&obj->phys_info.max_vel);
vm_vec_zero(&obj->phys_info.max_rotvel);
// blow out his reverse thrusters. Or drag, same thing.
obj->phys_info.rotdamp = 10000.0f;
obj->phys_info.side_slip_time_const = 10000.0f;
vm_vec_zero(&obj->phys_info.max_vel); // make so he can't turn on his own VOLITION anymore.
obj->phys_info.max_vel.xyz.z = -25.0f;
vm_vec_copy_scale(&obj->phys_info.desired_vel, &obj->orient.vec.fvec, obj->phys_info.max_vel.xyz.z );
vm_vec_zero(&obj->phys_info.max_rotvel); // make so he can't change speed on his own VOLITION anymore.
// obj->phys_info.flags |= PF_USE_VEL;
return arand; // need to return this value for multiplayer purposes
}*/
//Used to set a countermeasure velocity after being launched from a ship as a countermeasure
//ie not as a primary or secondary.
void cmeasure_set_ship_launch_vel(object *objp, object *parent_objp, int arand)
{
vec3d vel, rand_vec;
//Get cmeasure rear velocity in world
vm_vec_scale_add(&vel, &parent_objp->phys_info.vel, &parent_objp->orient.vec.fvec, -25.0f);
//Get random velocity vector
static_randvec(arand+1, &rand_vec);
//Add it to the rear velocity
vm_vec_scale_add2(&vel, &rand_vec, 2.0f);
objp->phys_info.vel = vel;
//Zero out this stuff so it isn't moving
vm_vec_zero(&objp->phys_info.rotvel);
vm_vec_zero(&objp->phys_info.max_vel);
vm_vec_zero(&objp->phys_info.max_rotvel);
//Idunnit. -WMC
//objp->phys_info.flags |= PF_CONST_VEL;
//WMC - I don't think this stuff is needed with the flag I set
//WMC - Or maybe it is.
// blow out his reverse thrusters. Or drag, same thing.
objp->phys_info.rotdamp = 10000.0f;
objp->phys_info.side_slip_time_const = 10000.0f;
objp->phys_info.max_vel.xyz.z = -25.0f;
vm_vec_copy_scale(&objp->phys_info.desired_vel, &objp->orient.vec.fvec, objp->phys_info.max_vel.xyz.z );
}
void cmeasure_select_next(object *objp)
void cmeasure_select_next(ship *shipp)
{
ship *shipp;
Assert(shipp != NULL);
int i, new_index;
Assert(objp->type == OBJ_SHIP);
for (i = 1; i < Num_weapon_types; i++)
{
new_index = (shipp->current_cmeasure + i) % Num_weapon_types;
shipp = &Ships[objp->instance];
shipp->current_cmeasure++;
if (shipp->current_cmeasure >= Num_cmeasure_types)
shipp->current_cmeasure = 0;
if(Weapon_info[new_index].wi_flags & WIF_CMEASURE)
{
shipp->current_cmeasure = new_index;
return;
}
}
//snd_play( &Snds[SND_CMEASURE_CYCLE] );
mprintf(("Countermeasure type set to %i in frame %i\n", shipp->current_cmeasure, Framecount));
}
// If this is a player countermeasure, let the player know he evaded a missile
void cmeasure_maybe_alert_success(object *objp)
{
//Is this a countermeasure, and does it have a parent
if ( objp->type != OBJ_WEAPON || objp->parent < 0) {
return;
}
Assert(Weapon_info[Weapons[objp->instance].weapon_info_index].wi_flags & WIF_CMEASURE);
if ( objp->parent == OBJ_INDEX(Player_obj) ) {
hud_start_text_flash(XSTR("Evaded", 1430), 800);
snd_play(&Snds[SND_MISSILE_EVADED_POPUP]);
} else if ( Objects[objp->parent].flags & OF_PLAYER_SHIP ) {
send_countermeasure_success_packet( objp->parent );
}
}
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.h $
* $Revision: 2.5 $
* $Date: 2005-07-13 02:50:50 $
* $Author: Goober5000 $
* $Revision: 2.6 $
* $Date: 2005-12-04 19:07:48 $
* $Author: wmcoolmon $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2005/07/13 02:50:50 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.4 2005/04/05 05:53:15 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -129,31 +133,32 @@
#define _CMEASURE_H
#include "globalincs/globals.h"
#include "globalincs/systemvars.h"
struct object;
struct vec3d;
//struct vec3d;
#define MAX_CMEASURES 64
//#define MAX_CMEASURES 64
// Goes in cmeasure.subtype
#define CMEASURE_UNUSED -1
//#define CMEASURE_UNUSED -1
#define MAX_CMEASURE_TYPES 3
//#define MAX_CMEASURE_TYPES 3
#define CMEASURE_WAIT 333 // delay in milliseconds between countermeasure firing.
#define CMF_DUD_HEAT 0x01 // If set, this cmeasure is a dud to heat seekers. Set at create time.
#define CMF_DUD_ASPECT 0x02 // If set, this cmeasure is a dud to aspect seekers. Set at create time.
//#define CMF_DUD_HEAT 0x01 // If set, this cmeasure is a dud to heat seekers. Set at create time.
//#define CMF_DUD_ASPECT 0x02 // If set, this cmeasure is a dud to aspect seekers. Set at create time.
#define CMF_DUD (CMF_DUD_HEAT | CMF_DUD_ASPECT)
//#define CMF_DUD (CMF_DUD_HEAT | CMF_DUD_ASPECT)
// Maximum distance at which a countermeasure can be tracked
// If this value is too large, missiles will always be tracking countermeasures.
#define MAX_CMEASURE_TRACK_DIST 300.0f
/*
typedef struct cmeasure_info {
char cmeasure_name[NAME_LENGTH];
float max_speed; // launch speed, relative to ship
//float max_speed; // launch speed, relative to ship
float fire_wait; // time between launches
float life_min, life_max; // lifetime will be in range min..max.
int launch_sound; // Sound played when launched.
@@ -170,19 +175,24 @@ typedef struct cmeasure {
int team; // Team of the ship where the cmeasure came from
float lifeleft; // When 0 or less object dies
} cmeasure;
extern cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
extern cmeasure Cmeasures[MAX_CMEASURES];
extern int Num_cmeasure_types;
extern int Num_cmeasures;
*/
//extern cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
//extern cmeasure Cmeasures[MAX_CMEASURES];
//extern int Num_cmeasure_types;
//extern int Num_cmeasures;
extern int Cmeasures_homing_check;
extern int Countermeasures_enabled;
extern void cmeasure_init();
extern void cmeasure_render( object * obj );
extern void cmeasure_delete( object * obj );
extern void cmeasure_process_pre( object * obj, float frame_time);
extern void cmeasure_process_post( object * obj, float frame_time);
extern int cmeasure_create( object * source_obj, vec3d *pos, int cm_type, int rand_val = -1 );
//extern void cmeasure_init();
//extern void cmeasure_render( object * obj );
//extern void cmeasure_delete( object * obj );
//extern void cmeasure_process_pre( object * obj, float frame_time);
//extern void cmeasure_process_post( object * obj, float frame_time);
//extern int cmeasure_create( object * source_obj, vec3d *pos, int cm_type, int rand_val = -1 );
extern void cmeasure_set_ship_launch_vel(object *objp, object *parent_objp, int arand);
extern void cmeasure_select_next(object *objp);
extern void cmeasure_maybe_alert_success(object *objp);
extern float Skill_level_cmeasure_life_scale[NUM_SKILL_LEVELS];
#endif // _CMEASURE_H
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.cpp $
* $Revision: 2.17 $
* $Date: 2005-07-22 10:18:37 $
* $Author: Goober5000 $
* $Revision: 2.18.2.1 $
* $Date: 2007-12-28 02:10:35 $
* $Author: Backslash $
*
* C module for keyboard, joystick and mouse configuration
*
* $Log: not supported by cvs2svn $
* Revision 2.18 2005/10/10 17:14:30 taylor
* remove NO_NETWORK
* fix controlconfig so that axes can be set to joystick/mouse using the mouse (required when no joystick attached)
*
* Revision 2.17 2005/07/22 10:18:37 Goober5000
* CVS header tweaks
* --Goober5000
*
* Revision 2.16 2005/07/13 02:50:50 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
@@ -382,11 +390,9 @@
#include "popup/popup.h"
#include "ui/uidefs.h"
#include "globalincs/alphacolors.h"
#ifndef NO_NETWORK
#include "network/multi_pmsg.h"
#include "network/multiutil.h"
#endif
#ifndef NDEBUG
#include "hud/hud.h"
@@ -747,6 +753,7 @@ int control_config_detect_axis()
{
int i, d, axis = -1, delta = 16384;
int axes_values[JOY_NUM_AXES];
int dx, dy, dz, fudge = 7;
joystick_read_raw_axis(JOY_NUM_AXES, axes_values);
for (i=0; i<JOY_NUM_AXES; i++) {
@@ -757,6 +764,18 @@ int control_config_detect_axis()
}
}
if ( (axis == -1) && Use_mouse_to_fly ) {
mouse_get_delta( &dx, &dy, &dz );
if ( (dx > fudge) || (dx < -fudge) ) {
axis = 0;
} else if ( (dy > fudge) || (dy < -fudge) ) {
axis = 1;
} else if ( (dz > fudge) || (dz < -fudge) ) {
axis = 2;
}
}
return axis;
}
@@ -1851,8 +1870,8 @@ void control_config_do_frame(float frametime)
break;
}
if (Cc_lines[Selected_line].cc_index == BANK_WHEN_PRESSED) // a special hack just for Mike K.
if ( (Last_key >= 0) && (k <= 0) && !keyd_pressed[Last_key] )
if (Cc_lines[Selected_line].cc_index == BANK_WHEN_PRESSED || /*Cc_lines[Selected_line].cc_index == SLIDE_WHEN_PRESSED ||*/ Cc_lines[Selected_line].cc_index == GLIDE_WHEN_PRESSED) // a special hack just for Mike K.
if ( (Last_key >= 0) && (k <= 0) && !keyd_pressed[Last_key] ) //Backslash - ok it's not just for Mike K. any more :-P but seriously, this is so we can bind such controls to Shift or Alt. Does this actually get used?
k = Last_key;
if ((k > 0) && !Config_allowed[k & KEY_MASK]) {
@@ -2472,12 +2491,10 @@ int check_control(int id, int key)
last_key = key;
#ifndef NO_NETWORK
// if we're in multiplayer text enter (for chat) mode, check to see if we should ignore controls
if ((Game_mode & GM_MULTIPLAYER) && multi_ignore_controls()){
return 0;
}
#endif
if (Control_config[id].type == CC_TYPE_CONTINUOUS) {
if (joy_down(Control_config[id].joy_id) || joy_down_count(Control_config[id].joy_id, 1)) {
@@ -9,13 +9,23 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.h $
* $Revision: 2.13 $
* $Date: 2005-07-13 02:50:50 $
* $Author: Goober5000 $
* $Revision: 2.15.2.1 $
* $Date: 2007-12-28 02:10:34 $
* $Author: Backslash $
*
* Header file for keyboard, joystick and mouse configuration
*
* $Log: not supported by cvs2svn $
* Revision 2.15 2006/02/25 21:46:59 Goober5000
* spelling
*
* Revision 2.14 2005/10/11 05:24:33 wmcoolmon
* Gliding
*
* Revision 2.13 2005/07/13 02:50:50 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.12 2005/07/13 02:30:52 Goober5000
* removed autopilot #define
* --Goober5000
@@ -52,7 +62,7 @@
* fixed misspelling of "category" as "catagory"
*
* Revision 2.2 2002/10/19 19:29:27 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
* initial commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.1 2002/10/17 20:40:50 randomtiger
* Added ability to remove HUD ingame on keypress shift O
@@ -455,8 +465,10 @@ typedef struct config_item {
#define XFER_SHIELD 81
#define XFER_LASER 82
#define SHOW_DAMAGE_POPUP 83 // AL: this binding should be removing next time the controls are reorganized
//#define SHOW_DAMAGE_POPUP 83 // AL: this binding should be removing next time the controls are reorganized
#define GLIDE_WHEN_PRESSED 83
//Backslash -- this was a convenient place for Glide When Pressed, since Show Damage Popup isn't used
#define BANK_WHEN_PRESSED 84
#define SHOW_NAVMAP 85
#define ADD_REMOVE_ESCORT 86
@@ -504,8 +516,11 @@ typedef struct config_item {
#define AUTO_PILOT_TOGGLE 115
#define NAV_CYCLE 116
//Gliding
#define TOGGLE_GLIDING 117
// this should be the total number of control action defines above (or last define + 1)
#define CCFG_MAX 117
#define CCFG_MAX 118
extern int Failed_key_index;
extern int Invert_heading;
@@ -9,13 +9,27 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfigCommon.cpp $
* $Revision: 2.12 $
* $Date: 2005-07-13 02:30:52 $
* $Author: Goober5000 $
* $Revision: 2.14.2.2 $
* $Date: 2007-12-28 02:10:35 $
* $Author: Backslash $
*
* C module for keyboard, joystick and mouse configuration common stuff (between Fred and FreeSpace)
*
* $Log: not supported by cvs2svn $
* Revision 2.14.2.1 2006/07/20 01:51:20 Goober5000
* tweak control text
* --Goober5000
*
* Revision 2.14 2006/02/25 21:46:59 Goober5000
* spelling
*
* Revision 2.13 2005/10/11 05:24:33 wmcoolmon
* Gliding
*
* Revision 2.12 2005/07/13 02:30:52 Goober5000
* removed autopilot #define
* --Goober5000
*
* Revision 2.11 2005/03/03 06:05:27 wmcoolmon
* Merge of WMC's codebase. "Features and bugs, making Goober say "Grr!", as release would be stalled now for two months for sure"
*
@@ -45,7 +59,7 @@
* --Goober5000
*
* Revision 2.3 2002/10/19 19:29:27 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
* initial commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.2 2002/10/17 20:40:50 randomtiger
* Added ability to remove HUD ingame on keypress shift O
@@ -451,13 +465,13 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_Y, 4, TARGET_TAB, true, "Target Ship in Reticle" },
{ KEY_G, -1, TARGET_TAB, true, "Target Target's Nearest Attacker" },
{ KEY_ALTED | KEY_Y, -1, TARGET_TAB, true, "Target Last Ship to Send Transmission" },
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, true, "Turn Off Auto-Targeting" },
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, true, "Turn Off Targeting" },
// targeting a ship's subsystem
{ KEY_V, -1, TARGET_TAB, true, "Target Subsystem in Reticle" },
{ KEY_S, -1, TARGET_TAB, true, "Target Next Subsystem" },
{ KEY_SHIFTED | KEY_S, -1, TARGET_TAB, true, "Target Previous Subsystem" },
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, true, "Turn Off Auto-Targeting of Subsystems" },
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, true, "Turn Off Targeting of Subsystems" },
// matching speed
{ KEY_M, -1, COMPUTER_TAB, true, "Match Target Speed" },
@@ -494,15 +508,15 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_SHIFTED | KEY_A, -1, COMPUTER_TAB, true, "Attack My Target" },
{ KEY_SHIFTED | KEY_Z, -1, COMPUTER_TAB, true, "Disarm My Target" },
{ KEY_SHIFTED | KEY_D, -1, COMPUTER_TAB, true, "Disable My Target" },
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, true, "Attack my Subsystem" },
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, true, "Attack My Subsystem" },
{ KEY_SHIFTED | KEY_X, -1, COMPUTER_TAB, true, "Capture My Target" },
{ KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Engage Enemy" },
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, true, "Form on my Wing" },
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, true, "Ignore my Target" },
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, true, "Protect my Target" },
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, true, "Cover me" },
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, true, "Return to base" },
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, true, "Rearm me" },
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, true, "Form on My Wing" },
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, true, "Ignore My Target" },
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, true, "Protect My Target" },
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, true, "Cover Me" },
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, true, "Return to Base" },
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, true, "Rearm Me" },
{ KEY_R, 6, TARGET_TAB, true, "Target Closest Attacking Ship" },
@@ -510,7 +524,7 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_PADMULTIPLY, -1, COMPUTER_TAB, true, "Chase View" },
{ KEY_PADPERIOD, -1, COMPUTER_TAB, true, "External View"},
{ KEY_PADENTER, -1, COMPUTER_TAB, true, "Toggle External Camera Lock"},
{ KEY_PAD0, -1, COMPUTER_TAB, true, "Free Look View", CC_TYPE_CONTINUOUS },
{ KEY_PAD0, -1, COMPUTER_TAB, true, "Free Look View", CC_TYPE_CONTINUOUS }, // Not in use anymore (Swifty)
{ KEY_PADDIVIDE, -1, COMPUTER_TAB, true, "Current Target View" },
{ KEY_PADPLUS, -1, COMPUTER_TAB, true, "Increase View Distance", CC_TYPE_CONTINUOUS },
{ KEY_PADMINUS, -1, COMPUTER_TAB, true, "Decrease View Distance", CC_TYPE_CONTINUOUS },
@@ -535,17 +549,19 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_PAGEDOWN, -1, COMPUTER_TAB, true, "Decrease Engine Energy" },
{ KEY_ALTED | KEY_D, -1, COMPUTER_TAB, true, "Equalize Energy Settings" },
{ KEY_Q, 7, COMPUTER_TAB, true, "Equalize Shield" },
{ KEY_Q, 7, COMPUTER_TAB, true, "Equalize Shields" },
{ KEY_UP, -1, COMPUTER_TAB, true, "Augment Forward Shield" },
{ KEY_DOWN, -1, COMPUTER_TAB, true, "Augment Rear Shield" },
{ KEY_LEFT, -1, COMPUTER_TAB, true, "Augment Left Shield" },
{ KEY_RIGHT, -1, COMPUTER_TAB, true, "Augment Right Shield" },
{ KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Laser->Shield" },
{ KEY_SHIFTED | KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Shield->Laser" },
{ -1, -1, -1, true, "Show Damage Popup Window" },
// { -1, -1, -1, true, "Show Damage Popup Window" },
{ -1, -1, SHIP_TAB, false, "Glide When Pressed", CC_TYPE_CONTINUOUS },
//Backslash -- this was a convenient place for Glide When Pressed, as Show Damage Popup isn't used
{ -1, -1, SHIP_TAB, true, "Bank When Pressed", CC_TYPE_CONTINUOUS },
{ -1, -1, -1, true, "Show NavMap" },
{ -1, -1, -1, true, "Show Nav Map" },
{ KEY_ALTED | KEY_E, -1, COMPUTER_TAB, true, "Add or Remove Escort" },
{ KEY_ALTED | KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Clear Escort List" },
{ KEY_E, -1, TARGET_TAB, true, "Target Next Escort Ship" },
@@ -553,7 +569,7 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_U, -1, TARGET_TAB, true, "Target Next Uninspected Cargo" },
{ KEY_SHIFTED | KEY_U, -1, TARGET_TAB, true, "Target Previous Uninspected Cargo" },
{ KEY_N, -1, TARGET_TAB, true, "Target Newest Ship In Area" },
{ KEY_N, -1, TARGET_TAB, true, "Target Newest Ship in Area" },
{ KEY_K, -1, TARGET_TAB, true, "Target Next Live Turret" },
{ KEY_SHIFTED | KEY_K, -1, TARGET_TAB, true, "Target Previous Live Turret" },
@@ -565,15 +581,12 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_2, -1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
{ KEY_3, -1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
{ KEY_4, -1, COMPUTER_TAB, true, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, true, "(Multiplayer) Observer zoom to target"},
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, true, "Increase time compression" },
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, true, "Decrease time compression" },
{ KEY_L, -1, COMPUTER_TAB, true, "Toggle high HUD contrast" },
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, true, "(Multiplayer) Toggle network info"},
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, true, "(Multiplayer) Self destruct"},
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, true, "(Multiplayer) Observer Zoom to Target"},
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, true, "Increase Time Compression" },
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, true, "Decrease Time Compression" },
{ KEY_L, -1, COMPUTER_TAB, true, "Toggle High HUD Contrast" },
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, true, "(Multiplayer) Toggle Network Info"},
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, true, "(Multiplayer) Self Destruct"},
// Misc
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, true, "Toggle HUD"},
@@ -581,14 +594,13 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_SHIFTED | KEY_1, -1, SHIP_TAB, true, "Left Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, true, "Up Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, true, "Down Thrust", CC_TYPE_CONTINUOUS},
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, true, "Toggle HUD Wireframe Targetbox"},
{ -1, -1, COMPUTER_TAB, false, "Top-down View"},
{ -1, -1, COMPUTER_TAB, false, "Track targeted object", CC_TYPE_CONTINUOUS},
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, true, "Toggle HUD Wireframe Target View"},
{ -1, -1, COMPUTER_TAB, false, "Top-Down View"},
{ -1, -1, COMPUTER_TAB, false, "Target Padlock View"}, // (Swifty) Toggle for VM_TRACK
// Auto Navigation Systen
{ KEY_ALTED | KEY_A, -1, COMPUTER_TAB, false, "Toggle Auto Pilot"},
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, false, "Cycle Nav Points"},
{ KEY_ALTED | KEY_G, -1, SHIP_TAB, false, "Toggle Gliding"},
{ -1, -1, -1, false, "" }
};
@@ -875,8 +887,10 @@ char *textify_scancode(int code)
if (code < 0)
return "None";
int keycode = code & KEY_MASK;
*text = 0;
if (code & KEY_ALTED) {
if (code & KEY_ALTED && !(keycode == KEY_LALT || keycode == KEY_RALT)) {
if(Lcl_gr){
strcat(text, "Alt-");
} else if(Lcl_fr){
@@ -886,7 +900,7 @@ char *textify_scancode(int code)
}
}
if (code & KEY_SHIFTED) {
if (code & KEY_SHIFTED && !(keycode == KEY_LSHIFT || keycode == KEY_RSHIFT)) {
if(Lcl_gr){
strcat(text, "Shift-");
} else if(Lcl_fr){
@@ -896,7 +910,7 @@ char *textify_scancode(int code)
}
}
strcat(text, Scan_code_text[code & KEY_MASK]);
strcat(text, Scan_code_text[keycode]);
return text;
}
//XSTR:ON
File renamed without changes.
@@ -9,16 +9,32 @@
/*
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.cpp $
* $Revision: 2.17 $
* $Date: 2005-07-02 19:42:14 $
* $Author: taylor $
* $Revision: 2.17 $
* $Date: 2005-07-02 19:42:14 $
* $Author: taylor $
* $Revision: 2.18.2.4 $
* $Date: 2007-09-02 02:07:39 $
* $Author: Goober5000 $
* $Revision: 2.18.2.4 $
* $Date: 2007-09-02 02:07:39 $
* $Author: Goober5000 $
*
* Code for the cutscenes viewer screen
*
* $Log: not supported by cvs2svn $
* Revision 2.18.2.3 2007/03/22 20:54:00 taylor
* give a better msg when movies can't play because they are user-disabled with the cmdline option
*
* Revision 2.18.2.2 2007/02/09 23:58:28 taylor
* add the "show all" hotkey to the cutscene viewer
*
* Revision 2.18.2.1 2006/09/11 01:15:04 taylor
* fixes for stuff_string() bounds checking
*
* Revision 2.18 2006/05/09 09:21:15 taylor
* fix incorrect button locations, it matches the correct layout of the other techroom screens now
* (thought Backslash was going to fix this, but I got tired of waiting. :))
*
* Revision 2.17 2005/07/02 19:42:14 taylor
* ton of non-standard resolution fixes
*
* Revision 2.16 2005/05/12 17:49:11 taylor
* use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
* fixes various problems and is past time to make the switch
@@ -239,6 +255,9 @@
#include "parse/parselo.h"
extern int Cmdline_nomovies;
char *Cutscene_bitmap_name[GR_NUM_RESOLUTIONS] = {
"ViewFootage",
"2_ViewFootage"
@@ -248,53 +267,71 @@ char *Cutscene_mask_name[GR_NUM_RESOLUTIONS] = {
"2_ViewFootage-m"
};
int Num_cutscenes;
using std::vector;
size_t Num_cutscenes;
int Cutscenes_viewable;
int Description_index;
cutscene_info Cutscenes[MAX_CUTSCENES];
vector<cutscene_info> Cutscenes;
//extern int All_movies_enabled; // If set, all movies may be viewed. Keyed off cheat code.
void cutsceen_close(){
for(int i = 0; i<MAX_CUTSCENES; i++)
if(Cutscenes[i].description)vm_free(Cutscenes[i].description);
void cutscene_close()
{
for(size_t i = 0; i < Num_cutscenes; i++)
{
if(Cutscenes[i].description)
{
vm_free(Cutscenes[i].description);
}
}
}
// initialization stuff for cutscenes
void cutscene_init()
{
atexit(cutsceen_close);
atexit(cutscene_close);
char buf[MULTITEXT_LENGTH];
int rval;
if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Error parsing 'rank.tbl'\r\nError code = %i.\r\n", rval);
}
cutscene_info cutinfo;
// open localization
lcl_ext_open();
read_file_text("cutscenes.tbl");
if ((rval = setjmp(parse_abort)) != 0) {
mprintf(("TABLES: Unable to parse '%s'! Error code = %i.\n", "cutscenes.tbl", rval));
lcl_ext_close();
return;
}
read_file_text("cutscenes.tbl", CF_TYPE_TABLES);
reset_parse();
// parse in all the rank names
// parse in all the cutscenes
Num_cutscenes = 0;
skip_to_string("#Cutscenes");
ignore_white_space();
while ( required_string_either("#End", "$Filename:") ) {
Assert ( Num_cutscenes < MAX_CUTSCENES );
while ( required_string_either("#End", "$Filename:") )
{
memset(&cutinfo, 0, sizeof(cutscene_info));
required_string("$Filename:");
stuff_string( Cutscenes[Num_cutscenes].filename, F_PATHNAME, NULL );
stuff_string( cutinfo.filename, F_PATHNAME, MAX_FILENAME_LEN );
required_string("$Name:");
stuff_string( Cutscenes[Num_cutscenes].name, F_NAME, NULL );
stuff_string( cutinfo.name, F_NAME, NAME_LENGTH );
required_string("$Description:");
stuff_string(buf, F_MULTITEXT, NULL);
stuff_string(buf, F_MULTITEXT, sizeof(buf));
drop_white_space(buf);
compact_multitext_string(buf);
Cutscenes[Num_cutscenes].description = vm_strdup(buf);
required_string("$cd:");
stuff_int( &Cutscenes[Num_cutscenes].cd );
cutinfo.description = vm_strdup(buf);
Num_cutscenes++;
required_string("$cd:");
stuff_int( &cutinfo.cd );
Cutscenes.push_back(cutinfo);
Num_cutscenes++;
}
required_string("#End");
@@ -312,7 +349,7 @@ int cutscenes_get_cd_num( char *filename )
#if defined(OEM_BUILD)
return 0; // only 1 cd for OEM
#else
int i;
size_t i;
for (i = 0; i < Num_cutscenes; i++ ) {
if ( !stricmp(Cutscenes[i].filename, filename) ) {
@@ -327,7 +364,7 @@ int cutscenes_get_cd_num( char *filename )
// marks a cutscene as viewable
void cutscene_mark_viewable(char *filename)
{
int i;
size_t i;
char cut_file[MAX_FILENAME_LEN];
char file[MAX_FILENAME_LEN];
@@ -369,7 +406,7 @@ void cutscene_mark_viewable(char *filename)
#define EXIT_BUTTON 7
static int Num_files;
static int Cutscene_list[MAX_CUTSCENES];
static vector<int> Cutscene_list;
//static int Stats_scroll_offset; // not used - taylor
static int Selected_line = 0; // line that is currently selected for binding
static int Scroll_offset;
@@ -379,8 +416,8 @@ static UI_WINDOW Ui_window;
static ui_button_info Buttons[GR_NUM_RESOLUTIONS][NUM_BUTTONS] = {
{ // GR_640
ui_button_info("TDB_00", 7, 5, 37, 7, 0), // tech database 1
ui_button_info("TDB_01", 7, 19, 37, 23, 1), // tech database 2
ui_button_info("TDB_00", 7, 3, 37, 7, 0), // tech database 1
ui_button_info("TDB_01", 7, 18, 37, 23, 1), // tech database 2
ui_button_info("TDB_02", 7, 34, 37, 38, 2), // tech database 3
ui_button_info("TDB_03", 7, 49, 37, 54, 3), // tech database 4
@@ -390,7 +427,7 @@ static ui_button_info Buttons[GR_NUM_RESOLUTIONS][NUM_BUTTONS] = {
ui_button_info("VFB_07", 574, 431, 587, 413, 7), // exit
},
{ // GR_1024
ui_button_info("2_TDB_00", 12, 7, 59, 12, 0), // tech database 1
ui_button_info("2_TDB_00", 12, 5, 59, 12, 0), // tech database 1
ui_button_info("2_TDB_01", 12, 31, 59, 37, 1), // tech database 2
ui_button_info("2_TDB_02", 12, 56, 59, 62, 2), // tech database 3
ui_button_info("2_TDB_03", 12, 81, 59, 88, 3), // tech database 4
@@ -539,13 +576,18 @@ void cutscenes_screen_play()
// full_name = cf_add_ext(name, NOX(".mve"));
main_hall_stop_music();
main_hall_stop_ambient();
int rval = movie_play(name);
main_hall_start_music();
if ( !rval ) {
char str[256];
sprintf(str, XSTR( "Unable to play movie %s.", 204), Cutscenes[which_cutscene].name );
if (Cmdline_nomovies)
sprintf(str, XSTR("Movies are currently disabled.", -1));
else
sprintf(str, XSTR("Unable to play movie %s.", 204), Cutscenes[which_cutscene].name);
popup(0, 1, POPUP_OK, str );
}
@@ -660,6 +702,7 @@ int cutscenes_screen_button_pressed(int n)
void cutscenes_screen_init()
{
int i;
size_t j;
ui_button_info *b;
Ui_window.create(0, 0, gr_screen.max_w_unscaled, gr_screen.max_h_unscaled, 0);
@@ -704,9 +747,10 @@ void cutscenes_screen_init()
// Cutscenes_viewable = 0xffffffff; // Cheat code enables all movies.
Num_files = 0;
for ( i = 0; i < Num_cutscenes; i++ ) {
if ( Cutscenes_viewable & (1<<i) ) {
Cutscene_list[Num_files] = i;
Cutscene_list.clear();
for ( j = 0; j < Num_cutscenes; j++ ) {
if ( Cutscenes_viewable & (1<<j) ) {
Cutscene_list.push_back((int)j);
Num_files++;
}
}
@@ -723,6 +767,7 @@ void cutscenes_screen_close()
void cutscenes_screen_do_frame()
{
int i, k, y, z;
size_t t;
int font_height = gr_get_font_height();
int select_tease_line = -1;
@@ -761,6 +806,19 @@ void cutscenes_screen_do_frame()
case KEY_F2: // goto options screen
gameseq_post_event(GS_EVENT_OPTIONS_MENU);
break;
// the "show-all" hotkey
case KEY_CTRLED | KEY_SHIFTED | KEY_S:
{
Num_files = 0;
Cutscene_list.clear();
for (t = 0; t < Num_cutscenes; t++) {
Cutscene_list.push_back((int)t);
Num_files++;
}
break;
}
} // end switch
for (i=0; i<NUM_BUTTONS; i++){
@@ -65,8 +65,7 @@
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
#define MAX_CUTSCENES 10
#include <vector>
// this cutscene is always available.
#define INTRO_CUTSCENE_FLAG (1<<0)
@@ -79,8 +78,8 @@ typedef struct cutscene_info
int cd;
} cutscene_info;
extern cutscene_info Cutscenes[MAX_CUTSCENES];
extern int Num_cutscenes;
extern std::vector<cutscene_info> Cutscenes;
extern size_t Num_cutscenes;
extern int Cutscenes_viewable;
// initializa table data
+669
View File
@@ -0,0 +1,669 @@
/*
* $Logfile: /Freespace2/src/cutscene/decoder16.cpp $
* $Revision: 2.1.2.1 $
* $Date: 2006-08-19 04:14:57 $
* $Author: taylor $
*
* decoder for 16-bit MVE image data
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2006/05/13 06:59:48 taylor
* MVE player (audio only works with OpenAL builds!)
*
*
* $NoKeywords: $
*
*/
#include "globalincs/pstypes.h"
extern int g_width, g_height;
extern void *g_vBackBuf1, *g_vBackBuf2;
/* 16 bit decoding routines */
static ushort *backBuf1, *backBuf2;
static int lookup_initialized;
static void dispatchDecoder16(ushort **pFrame, unsigned char codeType, unsigned char **pData, unsigned char **pOffData, int *pDataRemain, int *curXb, int *curYb);
static void genLoopkupTable();
void decodeFrame16(unsigned char *pFrame, unsigned char *pMap, int mapRemain, unsigned char *pData, int dataRemain)
{
unsigned char *pOrig;
unsigned char *pOffData, *pEnd;
ushort offset;
int length;
int op;
int i, j;
int xb, yb;
if (!lookup_initialized) {
genLoopkupTable();
}
backBuf1 = (ushort *)g_vBackBuf1;
backBuf2 = (ushort *)g_vBackBuf2;
xb = g_width >> 3;
yb = g_height >> 3;
offset = pData[0]|(pData[1]<<8);
pOffData = pData + offset;
pEnd = pData + offset;
pData += 2;
pOrig = pData;
length = offset - 2; /*dataRemain-2;*/
for (j=0; j<yb; j++) {
for (i=0; i<xb/2; i++) {
op = (*pMap) & 0xf;
dispatchDecoder16((ushort **)&pFrame, op, &pData, &pOffData, &dataRemain, &i, &j);
op = ((*pMap) >> 4) & 0xf;
dispatchDecoder16((ushort **)&pFrame, op, &pData, &pOffData, &dataRemain, &i, &j);
pMap++;
mapRemain--;
}
pFrame += 7*g_width*2;
}
if ((length-(pData-pOrig)) != 0) {
nprintf(("MVE", "DEBUG: junk left over: %d,%d,%d\n", (pData-pOrig), length, (length-(pData-pOrig))));
}
}
static ushort GETPIXEL(unsigned char **buf, int off)
{
ushort val = (*buf)[0+off] | ((*buf)[1+off] << 8);
return val;
}
static ushort GETPIXELI(unsigned char **buf, int off)
{
ushort val = (*buf)[0+off] | ((*buf)[1+off] << 8);
(*buf) += 2;
return val;
}
static void relClose(int i, int *x, int *y)
{
int ma, mi;
ma = i >> 4;
mi = i & 0xf;
*x = mi - 8;
*y = ma - 8;
}
static void relFar(int i, int sign, int *x, int *y)
{
if (i < 56) {
*x = sign * (8 + (i % 7));
*y = sign * (i / 7);
} else {
*x = sign * (-14 + (i - 56) % 29);
*y = sign * (8 + (i - 56) / 29);
}
}
static int close_table[512];
static int far_p_table[512];
static int far_n_table[512];
static void genLoopkupTable()
{
int i;
int x, y;
for (i = 0; i < 256; i++) {
relClose(i, &x, &y);
close_table[i*2+0] = x;
close_table[i*2+1] = y;
relFar(i, 1, &x, &y);
far_p_table[i*2+0] = x;
far_p_table[i*2+1] = y;
relFar(i, -1, &x, &y);
far_n_table[i*2+0] = x;
far_n_table[i*2+1] = y;
}
lookup_initialized = 1;
}
static void copyFrame(ushort *pDest, ushort *pSrc)
{
int i;
for (i=0; i<8; i++) {
memcpy(pDest, pSrc, 16);
pDest += g_width;
pSrc += g_width;
}
}
static void patternRow4Pixels(ushort *pFrame, unsigned char pat0, unsigned char pat1, ushort *p)
{
ushort mask=0x0003;
ushort shift=0;
ushort pattern = (pat1 << 8) | pat0;
while (mask != 0) {
*pFrame++ = p[(mask & pattern) >> shift];
mask <<= 2;
shift += 2;
}
}
static void patternRow4Pixels2(ushort *pFrame, unsigned char pat0, ushort *p)
{
unsigned char mask=0x03;
unsigned char shift=0;
ushort pel;
/* ORIGINAL VERSION IS BUGGY
int skip=1;
while (mask != 0) {
pel = p[(mask & pat0) >> shift];
pFrame[0] = pel;
pFrame[2] = pel;
pFrame[g_width + 0] = pel;
pFrame[g_width + 2] = pel;
pFrame += skip;
skip = 4 - skip;
mask <<= 2;
shift += 2;
}
*/
while (mask != 0) {
pel = p[(mask & pat0) >> shift];
pFrame[0] = pel;
pFrame[1] = pel;
pFrame[g_width + 0] = pel;
pFrame[g_width + 1] = pel;
pFrame += 2;
mask <<= 2;
shift += 2;
}
}
static void patternRow4Pixels2x1(ushort *pFrame, unsigned char pat, ushort *p)
{
unsigned char mask=0x03;
unsigned char shift=0;
ushort pel;
while (mask != 0) {
pel = p[(mask & pat) >> shift];
pFrame[0] = pel;
pFrame[1] = pel;
pFrame += 2;
mask <<= 2;
shift += 2;
}
}
static void patternQuadrant4Pixels(ushort *pFrame, unsigned char pat0, unsigned char pat1, unsigned char pat2, unsigned char pat3, ushort *p)
{
unsigned long mask = 0x00000003UL;
int shift=0;
int i;
unsigned long pat = (pat3 << 24) | (pat2 << 16) | (pat1 << 8) | pat0;
for (i=0; i<16; i++) {
pFrame[i&3] = p[(pat & mask) >> shift];
if ((i&3) == 3)
pFrame += g_width;
mask <<= 2;
shift += 2;
}
}
static void patternRow2Pixels(ushort *pFrame, unsigned char pat, ushort *p)
{
unsigned char mask=0x01;
while (mask != 0) {
*pFrame++ = p[(mask & pat) ? 1 : 0];
mask <<= 1;
}
}
static void patternRow2Pixels2(ushort *pFrame, unsigned char pat, ushort *p)
{
ushort pel;
unsigned char mask=0x1;
/* ORIGINAL VERSION IS BUGGY
int skip=1;
while (mask != 0x10) {
pel = p[(mask & pat) ? 1 : 0];
pFrame[0] = pel;
pFrame[2] = pel;
pFrame[g_width + 0] = pel;
pFrame[g_width + 2] = pel;
pFrame += skip;
skip = 4 - skip;
mask <<= 1;
}
*/
while (mask != 0x10) {
pel = p[(mask & pat) ? 1 : 0];
pFrame[0] = pel;
pFrame[1] = pel;
pFrame[g_width + 0] = pel;
pFrame[g_width + 1] = pel;
pFrame += 2;
mask <<= 1;
}
}
static void patternQuadrant2Pixels(ushort *pFrame, unsigned char pat0, unsigned char pat1, ushort *p)
{
ushort mask = 0x0001;
int i;
ushort pat = (pat1 << 8) | pat0;
for (i=0; i<16; i++) {
pFrame[i&3] = p[(pat & mask) ? 1 : 0];
if ((i&3) == 3)
pFrame += g_width;
mask <<= 1;
}
}
static void dispatchDecoder16(ushort **pFrame, unsigned char codeType, unsigned char **pData, unsigned char **pOffData, int *pDataRemain, int *curXb, int *curYb)
{
ushort p[4];
unsigned char pat[16];
int i, j, k;
int x, y;
ushort *pDstBak;
pDstBak = *pFrame;
switch(codeType) {
case 0x0:
copyFrame(*pFrame, *pFrame + (backBuf2 - backBuf1));
break; // ADDED
case 0x1:
break;
case 0x2:
/* relFar(*(*pOffData)++, 1, &x, &y); */
k = *(*pOffData)++;
x = far_p_table[k*2+0];
y = far_p_table[k*2+1];
copyFrame(*pFrame, *pFrame + x + y*g_width);
*pDataRemain--;
break;
case 0x3:
/* relFar(*(*pOffData)++, -1, &x, &y); */
k = *(*pOffData)++;
x = far_n_table[k*2+0];
y = far_n_table[k*2+1];
copyFrame(*pFrame, *pFrame + x + y*g_width);
*pDataRemain--;
break;
case 0x4:
/* relClose(*(*pOffData)++, &x, &y); */
k = *(*pOffData)++;
x = close_table[k*2+0];
y = close_table[k*2+1];
copyFrame(*pFrame, *pFrame + (backBuf2 - backBuf1) + x + y*g_width);
*pDataRemain--;
break;
case 0x5:
x = (char)*(*pData)++;
y = (char)*(*pData)++;
copyFrame(*pFrame, *pFrame + (backBuf2 - backBuf1) + x + y*g_width);
*pDataRemain -= 2;
break;
case 0x6:
nprintf(("MVE", "STUB: encoding 6 not tested\n"));
for (i=0; i<2; i++) {
*pFrame += 16;
if (++*curXb == (g_width >> 3)) {
*pFrame += 7*g_width;
*curXb = 0;
if (++*curYb == (g_height >> 3))
return;
}
}
break;
case 0x7:
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
if (!((p[0]/*|p[1]*/)&0x8000)) {
for (i=0; i<8; i++) {
patternRow2Pixels(*pFrame, *(*pData), p);
(*pData)++;
*pFrame += g_width;
}
} else {
for (i=0; i<2; i++) {
patternRow2Pixels2(*pFrame, *(*pData) & 0xf, p);
*pFrame += 2*g_width;
patternRow2Pixels2(*pFrame, *(*pData) >> 4, p);
(*pData)++;
*pFrame += 2*g_width;
}
}
break;
case 0x8:
p[0] = GETPIXEL(pData, 0);
if (!(p[0] & 0x8000)) {
for (i=0; i<4; i++) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
(*pData) += 2;
patternQuadrant2Pixels(*pFrame, pat[0], pat[1], p);
if (i & 1) {
*pFrame -= (4*g_width - 4);
} else {
*pFrame += 4*g_width;
}
}
} else {
p[2] = GETPIXEL(pData, 8);
if (!(p[2]&0x8000)) {
for (i=0; i<4; i++) {
if ((i & 1) == 0) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
}
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternQuadrant2Pixels(*pFrame, pat[0], pat[1], p);
if (i & 1) {
*pFrame -= (4*g_width - 4);
} else {
*pFrame += 4*g_width;
}
}
} else {
for (i=0; i<8; i++) {
if ((i & 3) == 0) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
}
patternRow2Pixels(*pFrame, *(*pData), p);
(*pData)++;
*pFrame += g_width;
}
}
}
break;
case 0x9:
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
p[2] = GETPIXELI(pData, 0);
p[3] = GETPIXELI(pData, 0);
*pDataRemain -= 8;
if (!(p[0] & 0x8000)) {
if (!(p[2] & 0x8000)) {
for (i=0; i<8; i++) {
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
(*pData) += 2;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
}
*pDataRemain -= 16;
} else {
patternRow4Pixels2(*pFrame, (*pData)[0], p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, (*pData)[1], p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, (*pData)[2], p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, (*pData)[3], p);
(*pData) += 4;
*pDataRemain -= 4;
}
} else {
if (!(p[2] & 0x8000)) {
for (i=0; i<8; i++) {
pat[0] = (*pData)[0];
(*pData) += 1;
patternRow4Pixels2x1(*pFrame, pat[0], p);
*pFrame += g_width;
}
*pDataRemain -= 8;
} else {
for (i=0; i<4; i++) {
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
(*pData) += 2;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
}
*pDataRemain -= 8;
}
}
break;
case 0xa:
p[0] = GETPIXEL(pData, 0);
if (!(p[0] & 0x8000)) {
for (i=0; i<4; i++) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
p[2] = GETPIXELI(pData, 0);
p[3] = GETPIXELI(pData, 0);
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
pat[2] = (*pData)[2];
pat[3] = (*pData)[3];
(*pData) += 4;
patternQuadrant4Pixels(*pFrame, pat[0], pat[1], pat[2], pat[3], p);
if (i & 1) {
*pFrame -= (4*g_width - 4);
} else {
*pFrame += 4*g_width;
}
}
} else {
p[0] = GETPIXEL(pData, 16);
if (!(p[0] & 0x8000)) {
for (i=0; i<4; i++) {
if ((i&1) == 0) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
p[2] = GETPIXELI(pData, 0);
p[3] = GETPIXELI(pData, 0);
}
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
pat[2] = (*pData)[2];
pat[3] = (*pData)[3];
(*pData) += 4;
patternQuadrant4Pixels(*pFrame, pat[0], pat[1], pat[2], pat[3], p);
if (i & 1) {
*pFrame -= (4*g_width - 4);
} else {
*pFrame += 4*g_width;
}
}
} else {
for (i=0; i<8; i++) {
if ((i&3) == 0) {
p[0] = GETPIXELI(pData, 0);
p[1] = GETPIXELI(pData, 0);
p[2] = GETPIXELI(pData, 0);
p[3] = GETPIXELI(pData, 0);
}
pat[0] = (*pData)[0];
pat[1] = (*pData)[1];
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
(*pData) += 2;
}
}
}
break;
case 0xb:
for (i=0; i<8; i++) {
#if BYTE_ORDER == BIG_ENDIAN
ubyte frame_tmp[16];
memcpy(&frame_tmp, *pData, 16);
ushort *swap_tmp;
for (j = 0; j < 16; j += 2) {
swap_tmp = (ushort*)(frame_tmp + j);
*swap_tmp = INTEL_SHORT(*swap_tmp);
}
memcpy(*pFrame, &frame_tmp, 16);
#else
memcpy(*pFrame, *pData, 16);
#endif
*pFrame += g_width;
*pData += 16;
*pDataRemain -= 16;
}
break;
case 0xc:
for (i=0; i<4; i++) {
p[0] = GETPIXEL(pData, 0);
p[1] = GETPIXEL(pData, 2);
p[2] = GETPIXEL(pData, 4);
p[3] = GETPIXEL(pData, 6);
for (j=0; j<2; j++) {
for (k=0; k<4; k++) {
(*pFrame)[2*k] = p[k];
(*pFrame)[2*k+1] = p[k];
// (*pFrame)[j+2*k] = p[k];
// (*pFrame)[g_width+j+2*k] = p[k];
}
*pFrame += g_width;
}
*pData += 8;
*pDataRemain -= 8;
}
break;
case 0xd:
for (i=0; i<2; i++) {
p[0] = GETPIXEL(pData, 0);
p[1] = GETPIXEL(pData, 2);
for (j=0; j<4; j++) {
for (k=0; k<4; k++) {
(*pFrame)[k*g_width+j] = p[0];
(*pFrame)[k*g_width+j+4] = p[1];
}
}
*pFrame += 4*g_width;
*pData += 4;
*pDataRemain -= 4;
}
break;
case 0xe:
p[0] = GETPIXEL(pData, 0);
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++) {
(*pFrame)[j] = p[0];
}
*pFrame += g_width;
}
*pData += 2;
*pDataRemain -= 2;
break;
case 0xf:
p[0] = GETPIXEL(pData, 0);
p[1] = GETPIXEL(pData, 1);
for (i=0; i<8; i++) {
for (j=0; j<8; j++) {
(*pFrame)[j] = p[(i+j)&1];
}
*pFrame += g_width;
}
*pData += 4;
*pDataRemain -= 4;
break;
default:
break;
}
*pFrame = pDstBak+8;
}
+545
View File
@@ -0,0 +1,545 @@
/*
* $Logfile: /Freespace2/src/cutscene/decoder8.cpp $
* $Revision: 1.1.2.1 $
* $Date: 2006-08-19 04:14:57 $
* $Author: taylor $
*
* decoder for 8-bit MVE image data
*
* $Log: not supported by cvs2svn $
*
* $NoKeywords: $
*
*/
#include "globalincs/pstypes.h"
extern int g_width, g_height;
extern void *g_vBackBuf1, *g_vBackBuf2;
static void dispatchDecoder8(ubyte **pFrame, ubyte codeType, ubyte **pData, int *pDataRemain, int *curXb, int *curYb);
void decodeFrame8(ubyte *pFrame, ubyte *pMap, int mapRemain, ubyte *pData, int dataRemain)
{
int i, j;
int xb, yb;
xb = g_width >> 3;
yb = g_height >> 3;
for (j = 0; j < yb; j++) {
for (i = 0; i < (xb / 2); i++) {
dispatchDecoder8(&pFrame, (*pMap) & 0xf, &pData, &dataRemain, &i, &j);
dispatchDecoder8(&pFrame, (*pMap) >> 4, &pData, &dataRemain, &i, &j);
pMap++;
mapRemain--;
}
pFrame += 7*g_width;
}
}
static void relClose(int i, int *x, int *y)
{
int ma, mi;
ma = i >> 4;
mi = i & 0xf;
*x = mi - 8;
*y = ma - 8;
}
static void relFar(int i, int sign, int *x, int *y)
{
if (i < 56) {
*x = sign * (8 + (i % 7));
*y = sign * (i / 7);
} else {
*x = sign * (-14 + (i - 56) % 29);
*y = sign * (8 + (i - 56) / 29);
}
}
/* copies an 8x8 block from pSrc to pDest.
pDest and pSrc are both g_width bytes wide */
static void copyFrame(ubyte *pDest, ubyte *pSrc)
{
int i;
for (i = 0; i < 8; i++) {
memcpy(pDest, pSrc, 8);
pDest += g_width;
pSrc += g_width;
}
}
// Fill in the next eight bytes with p[0], p[1], p[2], or p[3],
// depending on the corresponding two-bit value in pat0 and pat1
static void patternRow4Pixels(ubyte *pFrame, ubyte pat0, ubyte pat1, ubyte *p)
{
ushort mask = 0x0003;
ushort shift = 0;
ushort pattern = (pat1 << 8) | pat0;
while (mask != 0) {
*pFrame++ = p[(mask & pattern) >> shift];
mask <<= 2;
shift += 2;
}
}
// Fill in the next four 2x2 pixel blocks with p[0], p[1], p[2], or p[3],
// depending on the corresponding two-bit value in pat0.
static void patternRow4Pixels2(ubyte *pFrame, ubyte pat0, ubyte *p)
{
ubyte mask = 0x03;
ubyte shift = 0;
ubyte pel;
while (mask != 0) {
pel = p[(mask & pat0) >> shift];
pFrame[0] = pel;
pFrame[1] = pel;
pFrame[g_width + 0] = pel;
pFrame[g_width + 1] = pel;
pFrame += 2;
mask <<= 2;
shift += 2;
}
}
// Fill in the next four 2x1 pixel blocks with p[0], p[1], p[2], or p[3],
// depending on the corresponding two-bit value in pat.
static void patternRow4Pixels2x1(ubyte *pFrame, ubyte pat, ubyte *p)
{
ubyte mask = 0x03;
ubyte shift = 0;
ubyte pel;
while (mask != 0) {
pel = p[(mask & pat) >> shift];
pFrame[0] = pel;
pFrame[1] = pel;
pFrame += 2;
mask <<= 2;
shift += 2;
}
}
// Fill in the next 4x4 pixel block with p[0], p[1], p[2], or p[3],
// depending on the corresponding two-bit value in pat0, pat1, pat2, and pat3.
static void patternQuadrant4Pixels(ubyte *pFrame, ubyte pat0, ubyte pat1, ubyte pat2, ubyte pat3, ubyte *p)
{
unsigned long mask = 0x00000003UL;
int shift=0;
int i;
unsigned long pat = (pat3 << 24) | (pat2 << 16) | (pat1 << 8) | pat0;
for (i = 0; i < 16; i++) {
pFrame[i&3] = p[(pat & mask) >> shift];
if ( (i & 3) == 3 )
pFrame += g_width;
mask <<= 2;
shift += 2;
}
}
// fills the next 8 pixels with either p[0] or p[1], depending on pattern
static void patternRow2Pixels(ubyte *pFrame, ubyte pat, ubyte *p)
{
ubyte mask=0x01;
while (mask != 0) {
*pFrame++ = p[(mask & pat) ? 1 : 0];
mask <<= 1;
}
}
// fills the next four 2 x 2 pixel boxes with either p[0] or p[1], depending on pattern
static void patternRow2Pixels2(ubyte *pFrame, ubyte pat, ubyte *p)
{
ubyte pel;
ubyte mask=0x1;
while (mask != 0x10) {
pel = p[(mask & pat) ? 1 : 0];
pFrame[0] = pel; // upper-left
pFrame[1] = pel; // upper-right
pFrame[g_width + 0] = pel; // lower-left
pFrame[g_width + 1] = pel; // lower-right
pFrame += 2;
mask <<= 1;
}
}
// fills pixels in the next 4 x 4 pixel boxes with either p[0] or p[1], depending on pat0 and pat1.
static void patternQuadrant2Pixels(ubyte *pFrame, ubyte pat0, ubyte pat1, ubyte *p)
{
ubyte pel;
ushort mask = 0x0001;
int i, j;
ushort pat = (pat1 << 8) | pat0;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
pel = p[(pat & mask) ? 1 : 0];
pFrame[j + i * g_width] = pel;
mask <<= 1;
}
}
}
static void dispatchDecoder8(ubyte **pFrame, ubyte codeType, ubyte **pData, int *pDataRemain, int *curXb, int *curYb)
{
ubyte p[4];
ubyte pat[16];
int i, j, k;
int x, y;
switch(codeType) {
case 0x0:
copyFrame(*pFrame, *pFrame + ((ubyte *)g_vBackBuf2 - (ubyte *)g_vBackBuf1));
*pFrame += 8;
break;
case 0x1:
*pFrame += 8;
break;
case 0x2:
relFar(*(*pData)++, 1, &x, &y);
copyFrame(*pFrame, *pFrame + x + y*g_width);
*pFrame += 8;
*pDataRemain--;
break;
case 0x3:
relFar(*(*pData)++, -1, &x, &y);
copyFrame(*pFrame, *pFrame + x + y*g_width);
*pFrame += 8;
*pDataRemain--;
break;
case 0x4:
relClose(*(*pData)++, &x, &y);
copyFrame(*pFrame, *pFrame + ((ubyte *)g_vBackBuf2 - (ubyte *)g_vBackBuf1) + x + y*g_width);
*pFrame += 8;
*pDataRemain--;
break;
case 0x5:
x = (signed char)*(*pData)++;
y = (signed char)*(*pData)++;
copyFrame(*pFrame, *pFrame + ((ubyte *)g_vBackBuf2 - (ubyte *)g_vBackBuf1) + x + y*g_width);
*pFrame += 8;
*pDataRemain -= 2;
break;
case 0x6:
for (i = 0; i < 2; i++) {
*pFrame += 16;
if (++*curXb == (g_width >> 3)) {
*pFrame += 7*g_width;
*curXb = 0;
if (++*curYb == (g_height >> 3))
return;
}
}
break;
case 0x7:
p[0] = *(*pData)++;
p[1] = *(*pData)++;
if (p[0] <= p[1]) {
for (i = 0; i < 8; i++) {
patternRow2Pixels(*pFrame, *(*pData)++, p);
*pFrame += g_width;
}
} else {
for (i = 0; i < 2; i++) {
patternRow2Pixels2(*pFrame, *(*pData) & 0xf, p);
*pFrame += 2*g_width;
patternRow2Pixels2(*pFrame, *(*pData)++ >> 4, p);
*pFrame += 2*g_width;
}
}
*pFrame -= (8*g_width - 8);
break;
case 0x8:
if ( (*pData)[0] <= (*pData)[1] ) {
// four quadrant case
for (i = 0; i < 4; i++) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternQuadrant2Pixels(*pFrame, pat[0], pat[1], p);
// alternate between moving down and moving up and right
if (i & 1)
*pFrame += 4 - 4*g_width; // up and right
else
*pFrame += 4*g_width; // down
}
} else if ( (*pData)[6] <= (*pData)[7] ) {
// split horizontal
for (i = 0; i < 4; i++) {
if ((i & 1) == 0) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
}
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternQuadrant2Pixels(*pFrame, pat[0], pat[1], p);
if (i & 1)
*pFrame -= (4*g_width - 4);
else
*pFrame += 4*g_width;
}
} else {
// split vertical
for (i = 0; i < 8; i++) {
if ((i & 3) == 0) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
}
patternRow2Pixels(*pFrame, *(*pData)++, p);
*pFrame += g_width;
}
*pFrame -= (8*g_width - 8);
}
break;
case 0x9:
if ( (*pData)[0] <= (*pData)[1] ) {
if ( (*pData)[2] <= (*pData)[3] ) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
for (i = 0; i < 8; i++) {
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
}
*pFrame -= (8*g_width - 8);
} else {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
patternRow4Pixels2(*pFrame, *(*pData)++, p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, *(*pData)++, p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, *(*pData)++, p);
*pFrame += 2*g_width;
patternRow4Pixels2(*pFrame, *(*pData)++, p);
*pFrame -= (6*g_width - 8);
}
} else {
if ( (*pData)[2] <= (*pData)[3] ) {
// draw 2x1 strips
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
for (i = 0; i < 8; i++) {
pat[0] = *(*pData)++;
patternRow4Pixels2x1(*pFrame, pat[0], p);
*pFrame += g_width;
}
*pFrame -= (8*g_width - 8);
} else {
// draw 1x2 strips
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
for (i = 0; i < 4; i++) {
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
}
*pFrame -= (8*g_width - 8);
}
}
break;
case 0xa:
if ( (*pData)[0] <= (*pData)[1] ) {
for (i = 0; i < 4; i++) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
pat[2] = *(*pData)++;
pat[3] = *(*pData)++;
patternQuadrant4Pixels(*pFrame, pat[0], pat[1], pat[2], pat[3], p);
if (i & 1)
*pFrame -= (4*g_width - 4);
else
*pFrame += 4*g_width;
}
} else {
if ( (*pData)[12] <= (*pData)[13] ) {
// split vertical
for (i = 0; i < 4; i++) {
if ((i&1) == 0) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
}
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
pat[2] = *(*pData)++;
pat[3] = *(*pData)++;
patternQuadrant4Pixels(*pFrame, pat[0], pat[1], pat[2], pat[3], p);
if (i & 1)
*pFrame -= (4*g_width - 4);
else
*pFrame += 4*g_width;
}
} else {
// split horizontal
for (i = 0; i < 8; i++) {
if ((i&3) == 0) {
p[0] = *(*pData)++;
p[1] = *(*pData)++;
p[2] = *(*pData)++;
p[3] = *(*pData)++;
}
pat[0] = *(*pData)++;
pat[1] = *(*pData)++;
patternRow4Pixels(*pFrame, pat[0], pat[1], p);
*pFrame += g_width;
}
*pFrame -= (8*g_width - 8);
}
}
break;
case 0xb:
for (i = 0; i < 8; i++) {
memcpy(*pFrame, *pData, 8);
*pFrame += g_width;
*pData += 8;
*pDataRemain -= 8;
}
*pFrame -= (8*g_width - 8);
break;
case 0xc:
for (i = 0; i < 4; i++) {
for (j = 0; j < 2; j++) {
for (k = 0; k < 4; k++) {
(*pFrame)[2*k] = (*pData)[k];
(*pFrame)[2*k+1] = (*pData)[k];
}
*pFrame += g_width;
}
*pData += 4;
*pDataRemain -= 4;
}
*pFrame -= (8*g_width - 8);
break;
case 0xd:
for (i = 0; i < 2; i++) {
for (j = 0; j < 4; j++) {
for (k = 0; k < 4; k++) {
(*pFrame)[k*g_width+j] = (*pData)[0];
(*pFrame)[k*g_width+j+4] = (*pData)[1];
}
}
*pFrame += 4*g_width;
*pData += 2;
*pDataRemain -= 2;
}
*pFrame -= (8*g_width - 8);
break;
case 0xe:
for (i = 0; i < 8; i++) {
memset(*pFrame, **pData, 8);
*pFrame += g_width;
}
(*pData)++;
*pDataRemain--;
*pFrame -= (8*g_width - 8);
break;
case 0xf:
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++) {
(*pFrame)[j] = (*pData)[(i+j)&1];
}
*pFrame += g_width;
}
*pData += 2;
*pDataRemain -= 2;
*pFrame -= (8*g_width - 8);
break;
default:
break;
}
}
+260
View File
@@ -0,0 +1,260 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/cutscene/movie.cpp $
* $Revision: 2.31.2.11 $
* $Date: 2007-02-11 09:23:14 $
* $Author: taylor $
*
* movie player code
*
* $Log: not supported by cvs2svn $
* Revision 2.31.2.10 2007/01/07 12:10:18 taylor
* remove D3D support for Theora movies, make sure that it doesn't try to play them (since it wouldn't work properly anyway)
* fix triple-buffer problem with page flipping (Mantis #1190)
*
* Revision 2.31.2.9 2006/12/26 05:13:29 taylor
* add support for Theora movies (the default format)
* some little bits of cleanup
* add second gr_clear() so that double-buffer'd visuals will work properly (ie, not flicker when playing MVE/OGG)
*
* Revision 2.31.2.8 2006/12/07 17:57:25 taylor
* cleanup for movie init stuff (this will be even cleaner once the rest of the Theora code finally gets in)
* get rid of the clear screen hack for Windows, we can handle that better now
*
* Revision 2.31.2.7 2006/11/15 00:24:47 taylor
* clean up AVI movie stuff a bit:
* - use the default black brush for clearing the screen, it's a little less stupid this way
* - have the AVI player send messages back to the game rather than trying to poll for that extra crap
* - remove the only DivX6 fix, there is better addressed by newer window handling code
*
* Revision 2.31.2.6 2006/09/09 21:27:50 taylor
* be sure to reset color and clear color before MVE playback (fix for Mantis bug #1041)
*
* Revision 2.31.2.5 2006/08/28 17:14:52 taylor
* stupid, stupid, stupid...
* - fix AVI/MPG movie playback
* - fix missing campaign craziness
*
* Revision 2.31.2.4 2006/08/27 18:02:26 taylor
* switch to using cf_find_file_location_ext() when looking for movies
*
* Revision 2.31.2.3 2006/08/19 04:14:57 taylor
* add decoder for 8-bit MVEs
* a basic fix for finding AVIs over MVEs, for mod dir stuff (this needs some CFILE support added to be a true fix, it's on the TODO list)
* little bits of cleanup for old/unused code
* make sure MVE filenames are correct in mvelib
*
* Revision 2.31.2.2 2006/07/13 22:06:38 taylor
* handle non-MVE movies a bit better in OpenGL (don't get freaky with the window, don't lose input, etc.)
* some cleanup to OpenGL window handling, to fix min/max/full issues, and try to make shutdown a little nicer
*
* Revision 2.31.2.1 2006/06/18 16:54:36 taylor
* various compiler warning fixes
*
* Revision 2.31 2006/05/27 17:13:22 taylor
* add NO_DIRECT3D support
*
* Revision 2.30 2006/05/13 06:59:48 taylor
* MVE player (audio only works with OpenAL builds!)
*
* Revision 2.29 2005/12/28 22:17:01 taylor
* deal with cf_find_file_location() changes
* add a central parse_modular_table() function which anything can use
* fix up weapon_expl so that it can properly handle modular tables and LOD count changes
* add support for for a fireball TBM (handled a little different than a normal TBM is since it only changes rather than adds)
*
* Revision 2.28 2005/11/13 06:46:10 taylor
* some minor movie cleanup, not what I would like but enough for now
*
* Revision 2.27 2005/10/16 23:15:46 wmcoolmon
* Hardened cfile against array overflows
*
* Revision 2.26 2005/05/12 17:37:48 taylor
* add an extra gr_flip() after gr_clear() to make sure the change is made active
*
* Revision 2.25 2005/04/24 06:52:23 wmcoolmon
* Enabled movies in windowed mode; if this causes problems for people, they can always use -dnoshowvid
*
* Revision 2.24 2005/02/05 00:30:49 taylor
* fix a few things post merge
*
* Revision 2.23 2004/11/27 10:42:18 taylor
* this should get movies working again in D3D and help OGL too
*
* Revision 2.22 2004/07/26 20:47:26 Kazan
* remove MCD complete
*
* Revision 2.21 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.20 2004/04/26 13:09:20 taylor
* cvs log header, mark cutscenes viewable for later, gr_flip() to fix OGL white flash
*
*
*
* $NoKeywords: $
*/
#ifdef _WIN32
#include <windows.h>
#include "graphics/grd3dinternal.h"
#endif
#include "graphics/2d.h"
#include "globalincs/systemvars.h"
#include "cutscene/movie.h"
#include "osapi/osapi.h"
#include "cmdline/cmdline.h"
#include "cfile/cfile.h"
#include "cutscene/cutscenes.h" // cutscene_mark_viewable()
#include "cutscene/mvelib.h"
#include "cutscene/oggplayer.h"
extern int Game_mode;
#define MOVIE_NONE -1
#define MOVIE_OGG 0
#define MOVIE_MVE 1
// This module links freespace movie calls to the actual API calls the play the movie.
// This module handles all the different requires of OS and gfx API and finding the file to play
// filename - file to search for
// out_name - output, full path to file
// returns non-zero if file is found
int movie_find(char *filename, char *out_name)
{
char full_path[MAX_PATH];
char tmp_name[MAX_PATH];
int size, offset = 0;
const int NUM_EXT = 2;
const char *movie_ext[NUM_EXT] = { ".ogg", ".mve" };
if (out_name == NULL)
return MOVIE_NONE;
memset( full_path, 0, sizeof(full_path) );
memset( tmp_name, 0, sizeof(tmp_name) );
// remove extension
strcpy( tmp_name, filename );
char *p = strrchr(tmp_name, '.');
if ( p ) *p = 0;
int rc = cf_find_file_location_ext(tmp_name, NUM_EXT, movie_ext, CF_TYPE_ANY, sizeof(full_path) - 1, full_path, &size, &offset, 0);
if (rc == MOVIE_NONE)
return MOVIE_NONE;
strcpy( out_name, full_path );
return rc;
}
// Play one movie
bool movie_play(char *name)
{
// mark the movie as viewable to the player when in a campaign
// do this before anything else so that we're sure the movie is available
// to the player even if it's not going to play right now
if (Game_mode & GM_CAMPAIGN_MODE) {
cutscene_mark_viewable(name);
}
extern int Mouse_hidden;
extern int Is_standalone;
if (Cmdline_nomovies || Is_standalone)
return false;
char full_name[MAX_PATH];
int rc = 0;
memset(full_name, 0, sizeof(full_name));
rc = movie_find(name, full_name);
if (rc == MOVIE_NONE) {
strcpy(full_name, name);
char *p = strrchr(full_name, '.');
if ( p ) *p = 0;
mprintf(("Movie Error: Unable to open '%s' movie in any supported format.\n", full_name));
return false;
}
// clear the screen and hide the mouse cursor
Mouse_hidden++;
gr_reset_clip();
gr_set_color(255, 255, 255);
gr_set_clear_color(0, 0, 0);
gr_zbuffer_clear(0);
// clear first buffer
gr_clear();
gr_flip();
// clear second buffer (may not be one, but that's ok)
gr_clear();
gr_flip();
// clear third buffer (may not be one, but that's ok)
gr_clear();
if (rc == MOVIE_OGG) {
if (gr_screen.mode == GR_DIRECT3D) {
mprintf(("MOVIE ERROR: Theora movies are not currently supported in Direct3D mode!\n"));
return false;
}
THEORAFILE *movie_ogg = theora_open(name);
if (movie_ogg) {
// start playing ...
theora_play(movie_ogg);
// ... done playing, close the movie
theora_close(movie_ogg);
} else {
// uh-oh, movie is invalid... Abory, Retry, Fail?
mprintf(("MOVIE ERROR: Found invalid movie! (%s)\n", name));
return false;
}
} else if (rc == MOVIE_MVE) {
MVESTREAM *movie_mve = mve_open(name);
if (movie_mve) {
// start playing ...
mve_init(movie_mve);
mve_play(movie_mve);
// ... done playing, close the movie
mve_shutdown();
mve_close(movie_mve);
} else {
// uh-oh, movie is invalid... Abory, Retry, Fail?
mprintf(("MOVIE ERROR: Found invalid movie! (%s)\n", name));
return false;
}
}
// show the mouse cursor again
Mouse_hidden--;
return true;
}
void movie_play_two(char *name1, char *name2)
{
if ( movie_play(name1) )
movie_play(name2);
}
+29
View File
@@ -0,0 +1,29 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/cutscene/movie.h $
* $Revision: 2.6.2.1 $
* $Date: 2007-02-11 09:23:14 $
* $Author: taylor $
*
* movie player header
*
* $Log: not supported by cvs2svn $
*
* $NoKeywords: $
*/
#ifndef _MOVIE_HEADER_FILE
#define _MOVIE_HEADER_FILE
bool movie_play(char *name);
void movie_play_two(char *name1, char *name2);
#endif
+79
View File
@@ -0,0 +1,79 @@
/*
* $Logfile: /Freespace2/src/cutscene/mve_audio.cpp $
* $Revision: 2.1 $
* $Date: 2006-05-13 06:59:48 $
* $Author: taylor $
*
* Handles compressed audio data in MVE files
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/29 07:50:34 taylor
* Update to newest movie code with much better video support and audio support from
* Pierre Willenbrock. Movies are enabled always now (no longer a build option)
* and but can be skipped with the "--nomovies" or "-n" cmdline options.
*
*
*
* $NoKeywords: $
*
*/
#ifdef USE_OPENAL
static int audio_exp_table[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 47, 51, 56, 61,
66, 72, 79, 86, 94, 102, 112, 122, 133, 145, 158, 173, 189, 206, 225, 245,
267, 292, 318, 348, 379, 414, 452, 493, 538, 587, 640, 699, 763, 832, 908, 991,
1081, 1180, 1288, 1405, 1534, 1673, 1826, 1993, 2175, 2373, 2590, 2826, 3084, 3365, 3672, 4008,
4373, 4772, 5208, 5683, 6202, 6767, 7385, 8059, 8794, 9597, 10472, 11428, 12471, 13609, 14851, 16206,
17685, 19298, 21060, 22981, 25078, 27367, 29864, 32589, -29973, -26728, -23186, -19322, -15105, -10503, -5481, -1,
1, 1, 5481, 10503, 15105, 19322, 23186, 26728, 29973, -32589, -29864, -27367, -25078, -22981, -21060, -19298,
-17685, -16206, -14851, -13609, -12471, -11428, -10472, -9597, -8794, -8059, -7385, -6767, -6202, -5683, -5208, -4772,
-4373, -4008, -3672, -3365, -3084, -2826, -2590, -2373, -2175, -1993, -1826, -1673, -1534, -1405, -1288, -1180,
-1081, -991, -908, -832, -763, -699, -640, -587, -538, -493, -452, -414, -379, -348, -318, -292,
-267, -245, -225, -206, -189, -173, -158, -145, -133, -122, -112, -102, -94, -86, -79, -72,
-66, -61, -56, -51, -47, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33,
-32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17,
-16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1
};
static int getWord(unsigned char **fin)
{
int value = ((*fin)[1] << 8) | (*fin)[0];
*fin += 2;
return value;
}
static void sendWord(short **fout, int nOffset)
{
*(*fout)++ = nOffset;
}
static void processSwath(short *fout, unsigned char *data, int swath, int *offsets)
{
int i;
for (i=0; i<swath; i++)
{
offsets[i&1] += audio_exp_table[data[i]];
sendWord(&fout, offsets[i&1]);
}
}
void mveaudio_uncompress(short *buffer, unsigned char *data, int length)
{
int nCurOffsets[2];
int swath;
data += 4;
swath = getWord(&data) / 2;
nCurOffsets[0] = getWord(&data);
nCurOffsets[1] = getWord(&data);
sendWord(&buffer, nCurOffsets[0]);
sendWord(&buffer, nCurOffsets[1]);
processSwath(buffer, data, swath, nCurOffsets);
}
#endif
+385
View File
@@ -0,0 +1,385 @@
/*
* $Logfile: /Freespace2/src/cutscene/mvelib.cpp $
* $Revision: 2.1.2.1 $
* $Date: 2006-08-19 04:14:57 $
* $Author: taylor $
*
* main lib for using MVEs
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2006/05/13 06:59:48 taylor
* MVE player (audio only works with OpenAL builds!)
*
*
* $NoKeywords: $
*
*/
#include "globalincs/pstypes.h"
#include "cutscene/mvelib.h"
#include "cfile/cfile.h"
static const char MVE_HEADER[] = "Interplay MVE File\x1A";
static const short MVE_HDRCONST1 = 0x001A;
static const short MVE_HDRCONST2 = 0x0100;
static const short MVE_HDRCONST3 = 0x1133;
// -----------------------------------------------------------
// public MVEFILE functions
// -----------------------------------------------------------
// utility functions for mvefile and mveplayer
short mve_get_short(ubyte *data)
{
short value;
value = data[0] | (data[1] << 8);
return value;
}
ushort mve_get_ushort(ubyte *data)
{
ushort value;
value = data[0] | (data[1] << 8);
return value;
}
int mve_get_int(ubyte *data)
{
int value;
value = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
return value;
}
// open an MVE file
MVEFILE *mvefile_open(char *filename)
{
int cf_opened = 0;
int mve_valid = 1;
char lower_name[MAX_FILENAME_LEN];
char buffer[20];
MVEFILE *file;
// create the file
file = (MVEFILE *)vm_malloc(sizeof(MVEFILE));
// set defaults
file->stream = NULL;
file->cur_chunk = NULL;
file->buf_size = 0;
file->cur_fill = 0;
file->next_segment = 0;
// lower case filename for checking
strncpy(lower_name, filename, strlen(filename)+1);
strlwr(lower_name);
char *p = strchr( lower_name, '.' );
if ( p ) *p = 0;
SAFE_STRCAT( lower_name, ".mve", sizeof(lower_name) );
// NOTE: CF_TYPE *must* be ANY to get movies off of the CDs
// assume lower case filename for *nix
if ( (file->stream = cfopen(lower_name, "rb", CFILE_NORMAL, CF_TYPE_ANY)) ) {
cf_opened = 1;
}
if (!cf_opened) {
mvefile_close(file);
return NULL;
}
// initialize the buffer
file->cur_chunk = (ubyte *)vm_malloc(100 + 1024);
file->buf_size = 100 + 1024;
// verify the file's header
cfread_string(buffer, 20, file->stream);
if (strcmp(buffer, MVE_HEADER))
mve_valid = 0;
if (cfread_short(file->stream) != MVE_HDRCONST1)
mve_valid = 0;
if (cfread_short(file->stream) != MVE_HDRCONST2)
mve_valid = 0;
if (cfread_short(file->stream) != MVE_HDRCONST3)
mve_valid = 0;
if (!mve_valid) {
mvefile_close(file);
return NULL;
}
// now, prefetch the next chunk
mvefile_fetch_next_chunk(file);
return file;
}
// close a MVE file
void mvefile_close(MVEFILE *file)
{
// free the stream
if (file->stream)
cfclose(file->stream);
file->stream = NULL;
// free the buffer
if (file->cur_chunk)
vm_free(file->cur_chunk);
file->cur_chunk = NULL;
// not strictly necessary
file->buf_size = 0;
file->cur_fill = 0;
file->next_segment = 0;
// free the struct
vm_free(file);
}
// get the size of the next segment
int mvefile_get_next_segment_size(MVEFILE *file)
{
// if nothing is cached, fail
if (file->cur_chunk == NULL || file->next_segment >= file->cur_fill)
return -1;
// if we don't have enough data to get a segment, fail
if (file->cur_fill - file->next_segment < 4)
return -1;
// otherwise, get the data length
return mve_get_short(file->cur_chunk + file->next_segment);
}
// get type of next segment in chunk (0xff if no more segments in chunk)
ubyte mvefile_get_next_segment_major(MVEFILE *file)
{
// if nothing is cached, fail
if (file->cur_chunk == NULL || file->next_segment >= file->cur_fill)
return 0xff;
// if we don't have enough data to get a segment, fail
if (file->cur_fill - file->next_segment < 4)
return 0xff;
// otherwise, get the data length
return file->cur_chunk[file->next_segment + 2];
}
// get subtype (version) of next segment in chunk (0xff if no more segments in chunk)
ubyte mvefile_get_next_segment_minor(MVEFILE *file)
{
// if nothing is cached, fail
if (file->cur_chunk == NULL || file->next_segment >= file->cur_fill)
return 0xff;
// if we don't have enough data to get a segment, fail
if (file->cur_fill - file->next_segment < 4)
return 0xff;
// otherwise, get the data length
return file->cur_chunk[file->next_segment + 3];
}
// see next segment (return NULL if no next segment)
ubyte *mvefile_get_next_segment(MVEFILE *file)
{
// if nothing is cached, fail
if (file->cur_chunk == NULL || file->next_segment >= file->cur_fill)
return NULL;
// if we don't have enough data to get a segment, fail
if (file->cur_fill - file->next_segment < 4)
return NULL;
// otherwise, get the data length
return file->cur_chunk + file->next_segment + 4;
}
// advance to next segment
void mvefile_advance_segment(MVEFILE *file)
{
// if nothing is cached, fail
if (file->cur_chunk == NULL || file->next_segment >= file->cur_fill)
return;
// if we don't have enough data to get a segment, fail
if (file->cur_fill - file->next_segment < 4)
return;
// else, advance to next segment
file->next_segment += (4 + mve_get_ushort(file->cur_chunk + file->next_segment));
}
// fetch the next chunk (return 0 if at end of stream)
int mvefile_fetch_next_chunk(MVEFILE *file)
{
ubyte buffer[4];
ubyte *new_buffer;
ushort length;
// fail if not open
if (file->stream == NULL)
return 0;
// fail if we can't read the next segment descriptor
if (cfread(buffer, 1, 4, file->stream) < 4)
return 0;
// pull out the next length
length = mve_get_short(buffer);
// setup a new buffer if needed --
// only allocate new buffer is old one is too small
if (length > file->buf_size) {
// allocate new buffer
new_buffer = (ubyte *)vm_malloc(100 + length);
// copy old data
if (file->cur_chunk && file->cur_fill)
memcpy(new_buffer, file->cur_chunk, file->cur_fill);
// free old buffer
if (file->cur_chunk) {
vm_free(file->cur_chunk);
file->cur_chunk = NULL;
}
// install new buffer
file->cur_chunk = new_buffer;
file->buf_size = 100 + length;
}
// read the chunk
if (length > 0) {
if (cfread(file->cur_chunk, 1, length, file->stream) < length)
return 0;
}
file->cur_fill = length;
file->next_segment = 0;
return 1;
}
// -----------------------------------------------------------
// public MVESTREAM functions
// -----------------------------------------------------------
// open an MVE stream
MVESTREAM *mve_open(char *filename)
{
MVESTREAM *stream;
// allocate
stream = (MVESTREAM *)vm_malloc(sizeof(MVESTREAM));
// defaults
stream->movie = NULL;
// open
stream->movie = mvefile_open(filename);
if (stream->movie == NULL) {
mve_close(stream);
return NULL;
}
return stream;
}
// close an MVE stream
void mve_close(MVESTREAM *stream)
{
// close MVEFILE
if (stream->movie)
mvefile_close(stream->movie);
stream->movie = NULL;
vm_free(stream);
}
// play next chunk
int mve_play_next_chunk(MVESTREAM *stream)
{
ubyte major, minor;
ubyte *data;
int len;
// loop over segments
major = mvefile_get_next_segment_major(stream->movie);
while (major != 0xff) {
// check whether to handle the segment
if (major < 32) {
minor = mvefile_get_next_segment_minor(stream->movie);
len = mvefile_get_next_segment_size(stream->movie);
data = mvefile_get_next_segment(stream->movie);
switch (major) {
case 0x00:
mve_end_movie();
break;
case 0x01:
mve_end_chunk();
break;
case 0x02:
mve_timer_create(data);
break;
case 0x03:
mve_audio_createbuf(minor, data);
break;
case 0x04:
mve_audio_play();
break;
case 0x05:
if (!mve_video_createbuf(minor, data))
return 0;
break;
case 0x07:
mve_video_display();
break;
case 0x08:
mve_audio_data(major, data);
break;
case 0x09:
mve_audio_data(major, data);
break;
case 0x0a:
if (!mve_video_init(data))
return 0;
break;
case 0x0c:
mve_video_palette(data);
break;
case 0x0f:
mve_video_codemap(data, len);
break;
case 0x11:
mve_video_data(data, len);
break;
default:
break;
}
}
// advance to next segment
mvefile_advance_segment(stream->movie);
major = mvefile_get_next_segment_major(stream->movie);
}
if (!mvefile_fetch_next_chunk(stream->movie))
return 0;
// return status
return 1;
}
+101
View File
@@ -0,0 +1,101 @@
/*
* $Logfile: /Freespace2/src/cutscene/mvelib.h $
* $Revision: 2.1 $
* $Date: 2006-05-13 06:59:48 $
* $Author: taylor $
*
* main lib for using MVEs
*
* $Log: not supported by cvs2svn $
*
* $NoKeywords: $
*
*/
#ifndef INCLUDED_MVELIB_H
#define INCLUDED_MVELIB_H
#include "globalincs/pstypes.h"
struct CFILE;
// structure for maintaining info on a MVEFILE stream
typedef struct MVEFILE
{
CFILE *stream;
ubyte *cur_chunk;
int buf_size;
int cur_fill;
int next_segment;
} MVEFILE;
// open a .MVE file
MVEFILE *mvefile_open(char *filename);
// close a .MVE file
void mvefile_close(MVEFILE *movie);
// get size of next segment in chunk (-1 if no more segments in chunk)
int mvefile_get_next_segment_size(MVEFILE *movie);
// get type of next segment in chunk (0xff if no more segments in chunk)
ubyte mvefile_get_next_segment_major(MVEFILE *movie);
// get subtype (version) of next segment in chunk (0xff if no more segments in chunk)
ubyte mvefile_get_next_segment_minor(MVEFILE *movie);
// see next segment (return NULL if no next segment)
ubyte *mvefile_get_next_segment(MVEFILE *movie);
// advance to next segment
void mvefile_advance_segment(MVEFILE *movie);
// fetch the next chunk (return 0 if at end of stream)
int mvefile_fetch_next_chunk(MVEFILE *movie);
// structure for maintaining an MVE stream
typedef struct MVESTREAM
{
MVEFILE *movie;
} MVESTREAM;
// open an MVE stream
MVESTREAM *mve_open(char *filename);
// close an MVE stream
void mve_close(MVESTREAM *movie);
// play next chunk
int mve_play_next_chunk(MVESTREAM *movie);
// basic movie playing functions
void mve_init(MVESTREAM *mve);
void mve_play(MVESTREAM *mve);
void mve_shutdown();
// utility functions
short mve_get_short(ubyte *data);
ushort mve_get_ushort(ubyte *data);
int mve_get_int(ubyte *data);
// callbacks for data handling
// audio
void mve_audio_createbuf(ubyte minor, ubyte *data);
int mve_audio_data(ubyte major, ubyte *data);
void mve_audio_play();
// video
int mve_video_createbuf(ubyte minor, ubyte *data);
int mve_video_init(ubyte *data);
void mve_video_palette(ubyte *data);
void mve_video_data(ubyte *data, int len);
void mve_video_codemap(ubyte *data, int len);
void mve_video_display();
// misc
void mve_end_movie();
void mve_end_chunk();
int mve_timer_create(ubyte *data);
typedef short mves;
#endif /* INCLUDED_MVELIB_H */
+846
View File
@@ -0,0 +1,846 @@
/*
* $Logfile: /Freespace2/code/cutscene/mveplayer.cpp $
* $Revision: 2.1.2.4 $
* $Date: 2007-02-10 00:01:53 $
* $Author: taylor $
*
* MVE movie playing routines
*
* $Log: not supported by cvs2svn $
* Revision 2.1.2.3 2006/12/26 05:14:52 taylor
* get rid of some stale vars that we don't use any longer
* a little at-exit cleanup
* handle rounding error on X/Y placement locations under Windows
*
* Revision 2.1.2.2 2006/12/07 17:55:51 taylor
* port over some Theora player stuff:
* - support for GL_ARB_texture_rectangle
* - fix GL tear-down on movie exit
* - fix sound tear-down order issue on OS X
* - some speed increases, and get rid of the extra gr_clear() per-frame now that it's handled properly
* - proper support for widescreen resolutions
*
* Revision 2.1.2.1 2006/08/19 04:14:57 taylor
* add decoder for 8-bit MVEs
* a basic fix for finding AVIs over MVEs, for mod dir stuff (this needs some CFILE support added to be a true fix, it's on the TODO list)
* little bits of cleanup for old/unused code
* make sure MVE filenames are correct in mvelib
*
* Revision 2.1 2006/05/13 06:59:48 taylor
* MVE player (audio only works with OpenAL builds!)
*
*
* $NoKeywords: $
*/
#ifdef SCP_UNIX
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#endif
#include "graphics/gropengl.h"
#include "graphics/gropengltexture.h"
#include "graphics/gropenglextension.h"
#include "graphics/gropenglstate.h"
#include "globalincs/pstypes.h"
#include "cutscene/mvelib.h"
#include "cutscene/movie.h"
#include "graphics/2d.h"
#include "io/key.h"
#include "osapi/osapi.h"
#include "io/timer.h"
#include "sound/sound.h"
#include "sound/ds.h"
#include "bmpman/bmpman.h"
//#include "sound/audiostr.h"
extern int Cmdline_noscalevid;
static int mve_playing;
// timer variables
static int micro_frame_delay = 0;
static int timer_started = 0;
#ifdef SCP_UNIX
static struct timeval timer_expire = { 0, 0 };
#else
static int timer_expire;
#endif
// audio variables
#define MVE_AUDIO_BUFFERS 64 // total buffers to interact with stream
static int mve_audio_buffer_tail = 0;
static int mve_audio_playing = 0;
static int mve_audio_canplay = 0;
static int mve_audio_compressed = 0;
static int audiobuf_created;
#ifdef USE_OPENAL
// struct for the audio stream information
typedef struct MVE_AUDIO_T {
ALenum format;
int sample_rate;
int bytes_per_sec;
int channels;
int bitsize;
ALuint source_id;
ALuint audio_buffer[MVE_AUDIO_BUFFERS];
} mve_audio_t;
mve_audio_t *mas; // mve_audio_stream
// audio decompressor
extern void mveaudio_uncompress(short *buffer, unsigned char *data, int length);
#endif // USE_OPENAL
// video variables
int g_width, g_height;
void *g_vBuffers = NULL;
void *g_vBackBuf1, *g_vBackBuf2;
ushort *pixelbuf = NULL;
static GLuint GLtex = 0;
static GLint gl_screenYH = 0;
static GLint gl_screenXW = 0;
static GLfloat gl_screenU = 0;
static GLfloat gl_screenV = 0;
static int g_screenWidth, g_screenHeight;
static int g_screenX, g_screenY;
static int g_truecolor = 0;
static ubyte g_palette[768];
static ubyte *g_pCurMap = NULL;
static int g_nMapLength = 0;
static int videobuf_created, video_inited;
static int hp2, wp2;
static uint mve_video_skiptimer = 0;
static int mve_scale_video = 0;
// video externs from API graphics functions
extern void opengl_tcache_get_adjusted_texture_size(int w_in, int h_in, int *w_out, int *h_out);
extern GLenum GL_previous_texture_target;
// the decoders
extern void decodeFrame16(ubyte *pFrame, ubyte *pMap, int mapRemain, ubyte *pData, int dataRemain);
extern void decodeFrame8(ubyte *pFrame, ubyte *pMap, int mapRemain, ubyte *pData, int dataRemain);
/*************************
* general handlers
*************************/
void mve_end_movie()
{
mve_playing = 0;
}
/*************************
* timer handlers
*************************/
int mve_timer_create(ubyte *data)
{
int rate = mve_get_int(data);
int subd = mve_get_short(data+4);
micro_frame_delay = rate * subd;
return 1;
}
static void mve_timer_start(void)
{
#ifdef SCP_UNIX
int nsec = 0;
gettimeofday(&timer_expire, NULL);
timer_expire.tv_usec += micro_frame_delay;
if (timer_expire.tv_usec > 1000000) {
nsec = timer_expire.tv_usec / 1000000;
timer_expire.tv_sec += nsec;
timer_expire.tv_usec -= nsec * 1000000;
}
#else
timer_expire = timer_get_microseconds();
timer_expire += micro_frame_delay;
#endif
timer_started = 1;
}
static int mve_do_timer_wait(void)
{
if (!timer_started)
return 0;
#ifdef SCP_UNIX
int nsec = 0;
struct timespec ts, tsRem;
struct timeval tv;
gettimeofday(&tv, NULL);
if (tv.tv_sec > timer_expire.tv_sec)
goto end;
if ( (tv.tv_sec == timer_expire.tv_sec) && (tv.tv_usec >= timer_expire.tv_usec) )
goto end;
ts.tv_sec = timer_expire.tv_sec - tv.tv_sec;
ts.tv_nsec = 1000 * (timer_expire.tv_usec - tv.tv_usec);
if (ts.tv_nsec < 0) {
ts.tv_nsec += 1000000000UL;
--ts.tv_sec;
}
if ( (nanosleep(&ts, &tsRem) == -1) && (errno == EINTR) ) {
// so we got an error that was a signal interupt, try to sleep again with remainder of time
if ( (nanosleep(&tsRem, NULL) == -1) && (errno == EINTR) ) {
mprintf(("MVE: Timer error! Aborting movie playback!\n"));
return 1;
}
}
end:
timer_expire.tv_usec += micro_frame_delay;
if (timer_expire.tv_usec > 1000000) {
nsec = timer_expire.tv_usec / 1000000;
timer_expire.tv_sec += nsec;
timer_expire.tv_usec -= nsec * 1000000;
}
#else
int tv, ts, ts2;
tv = timer_get_microseconds();
if (tv > timer_expire)
goto end;
ts = timer_expire - tv;
ts2 = ts/1000;
Sleep(ts2);
end:
timer_expire += micro_frame_delay;
#endif
return 0;
}
static void mve_timer_stop()
{
#ifdef SCP_UNIX
timer_expire.tv_sec = 0;
timer_expire.tv_usec = 0;
#else
timer_expire = 0;
#endif
timer_started = 0;
}
/*************************
* audio handlers
*************************/
// setup the audio information from the data stream
void mve_audio_createbuf(ubyte minor, ubyte *data)
{
if (audiobuf_created)
return;
// if game sound disabled don't try and play movie audio
if (!Sound_enabled) {
mve_audio_canplay = 0;
return;
}
#ifdef USE_OPENAL
int flags, desired_buffer, sample_rate;
mas = (mve_audio_t *) vm_malloc ( sizeof(mve_audio_t) );
memset(mas, 0, sizeof(mve_audio_t));
mas->format = AL_INVALID;
flags = mve_get_ushort(data + 2);
sample_rate = mve_get_ushort(data + 4);
desired_buffer = mve_get_int(data + 6);
mas->channels = (flags & 0x0001) ? 2 : 1;
mas->bitsize = (flags & 0x0002) ? 16 : 8;
mas->sample_rate = sample_rate;
if (minor > 0) {
mve_audio_compressed = flags & 0x0004 ? 1 : 0;
} else {
mve_audio_compressed = 0;
}
if (mas->bitsize == 16) {
if (mas->channels == 2) {
mas->format = AL_FORMAT_STEREO16;
} else if (mas->channels == 1) {
mas->format = AL_FORMAT_MONO16;
}
} else if (mas->bitsize == 8) {
if (mas->channels == 2) {
mas->format = AL_FORMAT_STEREO8;
} else if (mas->channels == 1) {
mas->format = AL_FORMAT_MONO8;
}
}
// somethings wrong, bail now
if (mas->format == AL_INVALID) {
mve_audio_canplay = 0;
audiobuf_created = 1;
return;
}
OpenAL_ErrorCheck( alGenSources(1, &mas->source_id), { mve_audio_canplay = 0; return; } );
mve_audio_canplay = 1;
OpenAL_ErrorPrint( alSourcef(mas->source_id, AL_GAIN, 1.0f) );
memset(mas->audio_buffer, 0, MVE_AUDIO_BUFFERS * sizeof(ALuint));
#endif // USE_OPENAL
mve_audio_buffer_tail = 0;
audiobuf_created = 1;
}
// play and stream the audio
void mve_audio_play()
{
if (mve_audio_canplay) {
#ifdef USE_OPENAL
ALint status, bqueued;
OpenAL_ErrorCheck( alGetSourcei(mas->source_id, AL_SOURCE_STATE, &status), return );
OpenAL_ErrorCheck( alGetSourcei(mas->source_id, AL_BUFFERS_QUEUED, &bqueued), return );
mve_audio_playing = 1;
if (status != AL_PLAYING && bqueued > 0) {
OpenAL_ErrorPrint( alSourcePlay(mas->source_id) );
}
#endif // USE_OPENAL
}
}
// call this in shutdown to stop and close audio
static void mve_audio_stop()
{
if (!audiobuf_created)
return;
#ifdef USE_OPENAL
ALint p = 0;
mve_audio_playing = 0;
OpenAL_ErrorPrint( alSourceStop(mas->source_id) );
OpenAL_ErrorPrint( alGetSourcei(mas->source_id, AL_BUFFERS_PROCESSED, &p) );
OpenAL_ErrorPrint( alSourceUnqueueBuffers(mas->source_id, p, mas->audio_buffer) );
OpenAL_ErrorPrint( alDeleteSources(1, &mas->source_id) );
for (int i = 0; i < MVE_AUDIO_BUFFERS; i++) {
// make sure that the buffer is real before trying to delete, it could crash for some otherwise
if ( (mas->audio_buffer[i] != 0) && alIsBuffer(mas->audio_buffer[i]) ) {
OpenAL_ErrorPrint( alDeleteBuffers(1, &mas->audio_buffer[i]) );
}
}
if (mas != NULL) {
vm_free(mas);
mas = NULL;
}
#endif // USE_OPENAL
}
int mve_audio_data(ubyte major, ubyte *data)
{
static const int selected_chan=1;
int chan;
int nsamp;
if (mve_audio_canplay) {
#ifdef USE_OPENAL
chan = mve_get_ushort(data + 2);
nsamp = mve_get_ushort(data + 4);
if (chan & selected_chan) {
ALint bprocessed, bqueued, status;
ALuint bid;
OpenAL_ErrorCheck( alGetSourcei(mas->source_id, AL_BUFFERS_PROCESSED, &bprocessed), return 0 );
while (bprocessed-- > 2)
OpenAL_ErrorPrint( alSourceUnqueueBuffers(mas->source_id, 1, &bid) );
OpenAL_ErrorCheck( alGetSourcei(mas->source_id, AL_BUFFERS_QUEUED, &bqueued), return 0 );
if (bqueued == 0)
mprintf(("MVE: Buffer underun (First is normal)\n"));
OpenAL_ErrorCheck( alGetSourcei(mas->source_id, AL_SOURCE_STATE, &status), return 0 );
if ( (mve_audio_playing) && (status != AL_PLAYING) && (bqueued > 0) ) {
OpenAL_ErrorCheck( alSourcePlay(mas->source_id), return 0 );
}
if (bqueued < MVE_AUDIO_BUFFERS) {
short *buf = NULL;
/* HACK: +4 mveaudio_uncompress adds 4 more bytes */
if (major == 8) {
if (mve_audio_compressed) {
nsamp += 4;
buf = (short *)vm_malloc(nsamp);
mveaudio_uncompress(buf, data, -1); /* XXX */
} else {
nsamp -= 8;
data += 8;
buf = (short *)vm_malloc(nsamp);
memcpy(buf, data, nsamp);
}
} else {
buf = (short *)vm_malloc(nsamp);
memset(buf, 0, nsamp); /* XXX */
}
if (!mas->audio_buffer[mve_audio_buffer_tail]) {
OpenAL_ErrorCheck( alGenBuffers(1,&mas->audio_buffer[mve_audio_buffer_tail]), { vm_free(buf); return 0; } );
}
OpenAL_ErrorCheck( alBufferData(mas->audio_buffer[mve_audio_buffer_tail], mas->format, buf, nsamp, mas->sample_rate), { vm_free(buf); return 0; } );
OpenAL_ErrorCheck( alSourceQueueBuffers(mas->source_id, 1, &mas->audio_buffer[mve_audio_buffer_tail]), { vm_free(buf); return 0;} );
//fprintf(stderr,"Queued buffer %d(%d)\n", mve_audio_buftail, mas->audio_buffer[mve_audio_buftail]);
if (++mve_audio_buffer_tail == MVE_AUDIO_BUFFERS)
mve_audio_buffer_tail = 0;
bqueued++;
vm_free(buf);
} else {
mprintf(("MVE: Buffer overrun: Queue full\n"));
}
}
#endif // USE_OPENAL
}
return 1;
}
/*************************
* video handlers
*************************/
int mve_video_createbuf(ubyte minor, ubyte *data)
{
if (videobuf_created)
return 1;
short w, h;
short count, truecolor;
w = mve_get_short(data);
h = mve_get_short(data+2);
if (minor > 0) {
count = mve_get_short(data+4);
} else {
count = 1;
}
if (minor > 1) {
truecolor = mve_get_short(data+6);
} else {
truecolor = 0;
}
g_width = w << 3;
g_height = h << 3;
g_vBackBuf1 = g_vBuffers = vm_malloc(g_width * g_height * 4);
if (g_vBackBuf1 == NULL) {
nprintf(("MOVIE", "ERROR: Can't allocate video buffer"));
videobuf_created = 1;
return 0;
}
if (truecolor)
g_vBackBuf2 = (ushort *)g_vBackBuf1 + (g_width * g_height);
else
g_vBackBuf2 = (ubyte *)g_vBackBuf1 + (g_width * g_height);
memset(g_vBackBuf1, 0, g_width * g_height * 4);
g_truecolor = truecolor;
videobuf_created = 1;
if (gr_screen.mode == GR_OPENGL) {
GLfloat scale_by = 1.0f;
float screen_ratio = (float)gr_screen.max_w / (float)gr_screen.max_h;
float movie_ratio = (float)g_width / (float)g_height;
if (screen_ratio > movie_ratio)
scale_by = (float)gr_screen.max_h / (float)g_height;
else
scale_by = (float)gr_screen.max_w / (float)g_width;
// don't bother setting anything if we aren't going to need it
if (!Cmdline_noscalevid && (scale_by != 1.0f)) {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glScalef( scale_by, scale_by, 1.0f );
mve_scale_video = 1;
}
if (mve_scale_video) {
g_screenX = ((fl2i(gr_screen.max_w / scale_by + 0.5f) - g_width) / 2);
g_screenY = ((fl2i(gr_screen.max_h / scale_by + 0.5f) - g_height) / 2);
} else {
// centers on 1024x768, fills on 640x480
g_screenX = ((gr_screen.max_w - g_width) / 2);
g_screenY = ((gr_screen.max_h - g_height) / 2);
}
// set additional values for screen width/height and UV coords
if (gr_screen.mode == GR_OPENGL) {
gl_screenYH = g_screenY + g_height;
gl_screenXW = g_screenX + g_width;
gl_screenU = i2fl(g_width) / i2fl(wp2);
gl_screenV = i2fl(g_height) / i2fl(hp2);
}
}
return 1;
}
static void mve_convert_and_draw()
{
ushort *pDests;
ushort *pSrcs = NULL;
ushort *pixels = (ushort *)g_vBackBuf1;
int x, y;
ubyte *pSrcs8 = NULL;
ubyte *pixels8 = (ubyte *)g_vBackBuf1;
ubyte r, g, b;
ushort bit_16;
if (g_truecolor)
pSrcs = pixels;
else
pSrcs8 = pixels8;
pDests = pixelbuf;
if (gr_screen.mode != GR_OPENGL) {
if (g_screenWidth > g_width)
pDests += ((g_screenWidth - g_width) / 2) / 2;
if (g_screenHeight > g_height)
pDests += ((g_screenHeight - g_height) / 2) * g_screenWidth;
}
for (y=0; y<g_height; y++) {
for (x = 0; x < g_width; x++) {
if (g_truecolor) {
Assert( pSrcs != NULL );
pDests[x] = (1<<15)|*pSrcs;
pSrcs++;
} else {
Assert( pSrcs8 != NULL );
// grab rgb color
r = (g_palette[(*pSrcs8)*3] / 2);
g = (g_palette[(*pSrcs8)*3 + 1] / 2);
b = (g_palette[(*pSrcs8)*3 + 2] / 2);
// stuff the color
bit_16 = (ushort)(r << Gr_t_red.shift);
bit_16 |= (ushort)(g << Gr_t_green.shift);
bit_16 |= (ushort)(b << Gr_t_blue.shift);
bit_16 |= (ushort)(Gr_t_alpha.mask);
// stuff the pixel
pDests[x] = (1<<15)|bit_16;
pSrcs8++;
}
}
pDests += g_screenWidth;
}
}
void mve_video_display()
{
fix t1 = timer_get_fixed_seconds();
mve_convert_and_draw();
// this thing is basically stupid but I don't care
// micro_frame_delay is divided by 10 to match mve_video_skiptimer overflow catch
if ( mve_video_skiptimer > (uint)(micro_frame_delay/10) ) {
// we are running slow so subtract desired time from actual and skip this frame
mve_video_skiptimer -= (micro_frame_delay/10);
return;
} else {
// zero out so we can get a new count
mve_video_skiptimer = 0;
}
if (gr_screen.mode == GR_OPENGL) {
glTexSubImage2D(GL_state.Texture.GetTarget(), 0, 0, 0, g_width, g_height, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, pixelbuf);
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2i(g_screenX, g_screenY);
glTexCoord2f(0, gl_screenV);
glVertex2i(g_screenX, gl_screenYH);
glTexCoord2f(gl_screenU, gl_screenV);
glVertex2i(gl_screenXW, gl_screenYH);
glTexCoord2f(gl_screenU, 0);
glVertex2i(gl_screenXW, g_screenY);
glEnd();
} else {
// DDOI - This is probably really fricking slow
int bitmap = bm_create (16, g_screenWidth, g_screenHeight, pixelbuf, 0);
gr_set_bitmap (bitmap);
gr_bitmap (g_screenX, g_screenY, true);
bm_release (bitmap);
}
gr_flip();
os_poll();
fix t2 = timer_get_fixed_seconds();
// only get a new count if we are definitely through with old count
if ( mve_video_skiptimer == 0 ) {
// for a more accurate count convert the frame rate to a float and multiply
// by one-hundred-thousand before converting to an uint.
mve_video_skiptimer = (uint)(f2fl(t2-t1) * 100000);
}
int k = key_inkey();
switch (k) {
case KEY_ESC:
case KEY_ENTER:
case KEY_SPACEBAR:
mve_playing = 0;
}
//mprintf(("mve frame took this long: %.6f\n", f2fl(t2-t1) / 1000.0f));
}
int mve_video_init(ubyte *data)
{
if (video_inited)
return 1;
short width, height;
width = mve_get_short(data);
height = mve_get_short(data+2);
g_screenWidth = width;
g_screenHeight = height;
// DDOI - Allocate RGB565 pixel buffer
pixelbuf = (ushort *)vm_malloc(g_screenWidth * g_screenHeight * 2);
if (pixelbuf == NULL) {
nprintf(("MOVIE", "ERROR: Can't allocate memory for pixelbuf"));
video_inited = 1;
return 0;
}
memset(pixelbuf, 0, g_screenWidth * g_screenHeight * 2);
if (gr_screen.mode == GR_OPENGL) {
opengl_set_texture_target(GL_TEXTURE_2D);
opengl_tcache_get_adjusted_texture_size(g_screenWidth, g_screenHeight, &wp2, &hp2);
glGenTextures(1, &GLtex);
Assert( GLtex != 0 );
if ( GLtex == 0 ) {
nprintf(("MOVIE", "ERROR: Can't create a GL texture"));
video_inited = 1;
return 0;
}
gr_set_lighting(false, false);
GL_state.Texture.DisableAll();
GL_state.Texture.SetActiveUnit(0);
GL_state.Texture.SetTarget(GL_texture_target);
GL_state.Texture.Enable(GLtex);
GL_state.SetTextureSource(TEXTURE_SOURCE_DECAL);
GL_state.SetAlphaBlendMode(ALPHA_BLEND_NONE);
GL_state.SetZbufferType(ZBUFFER_TYPE_NONE);
GL_state.Texture.SetWrapS(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapT(GL_CLAMP_TO_EDGE);
// NOTE: using NULL instead of pixelbuf crashes some drivers, but then so does pixelbuf
glTexImage2D(GL_state.Texture.GetTarget(), 0, GL_RGB5_A1, wp2, hp2, 0, GL_BGRA_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV, NULL);
// set our color so that we can make sure that it's correct
glColor3f(1.0f, 1.0f, 1.0f);
}
#ifndef NO_DIRECT3D
else if (gr_screen.mode == GR_DIRECT3D) {
// TODO: is there a fast way to do frames in D3D too?
}
#endif
memset(g_palette, 0, 768);
video_inited = 1;
return 1;
}
void mve_video_palette(ubyte *data)
{
short start, count;
start = mve_get_short(data);
count = mve_get_short(data+2);
memcpy(g_palette + 3*start, data+4, 3*count);
}
void mve_video_codemap(ubyte *data, int len)
{
g_pCurMap = data;
g_nMapLength = len;
}
void mve_video_data(ubyte *data, int len)
{
short nFrameHot, nFrameCold;
short nXoffset, nYoffset;
short nXsize, nYsize;
ushort nFlags;
ubyte *temp;
nFrameHot = mve_get_short(data);
nFrameCold = mve_get_short(data+2);
nXoffset = mve_get_short(data+4);
nYoffset = mve_get_short(data+6);
nXsize = mve_get_short(data+8);
nYsize = mve_get_short(data+10);
nFlags = mve_get_ushort(data+12);
if (nFlags & 1) {
temp = (ubyte *)g_vBackBuf1;
g_vBackBuf1 = g_vBackBuf2;
g_vBackBuf2 = temp;
}
if (g_truecolor)
decodeFrame16((ubyte *)g_vBackBuf1, g_pCurMap, g_nMapLength, data+14, len-14);
else
decodeFrame8((ubyte *)g_vBackBuf1, g_pCurMap, g_nMapLength, data+14, len-14);
}
void mve_end_chunk()
{
g_pCurMap = NULL;
}
void mve_init(MVESTREAM *mve)
{
// reset to default values
mve_audio_buffer_tail = 0;
mve_audio_playing = 0;
mve_audio_canplay = 0;
mve_audio_compressed = 0;
audiobuf_created = 0;
videobuf_created = 0;
video_inited = 0;
mve_scale_video = 0;
mve_playing = 1;
}
void mve_play(MVESTREAM *mve)
{
int init_timer = 0, timer_error = 0;
int cont = 1;
if (!timer_started)
mve_timer_start();
while (cont && mve_playing && !timer_error) {
cont = mve_play_next_chunk(mve);
if (micro_frame_delay && !init_timer) {
mve_timer_start();
init_timer = 1;
}
timer_error = mve_do_timer_wait();
}
}
void mve_shutdown()
{
if (gr_screen.mode == GR_OPENGL) {
if (mve_scale_video) {
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}
GL_state.Texture.Disable();
GL_state.Texture.Delete(GLtex);
glDeleteTextures(1, &GLtex);
GLtex = 0;
}
if (pixelbuf != NULL) {
vm_free(pixelbuf);
pixelbuf = NULL;
}
if (g_vBuffers != NULL) {
vm_free(g_vBuffers);
g_vBuffers = NULL;
}
mve_audio_stop();
mve_timer_stop();
}
+957
View File
@@ -0,0 +1,957 @@
/*
* $Logfile: /Freespace2/code/cutscene/oggplayer.cpp $
* $Revision: 1.1.2.5 $
* $Date: 2007-04-11 14:44:32 $
* $Author: taylor $
*
* movie player code
*
* $Log: not supported by cvs2svn $
* Revision 1.1.2.4 2007/03/22 20:23:58 taylor
* fix stupidness that screwed up RGB values (Mantis #1307)
*
* Revision 1.1.2.3 2007/02/10 00:01:53 taylor
* make sure that our color is getting set properly (should properly fix the red/green tint problem, Mantis #1041)
* slight optimization for Theora YUV->RGB converter
*
* Revision 1.1.2.2 2007/01/07 12:10:18 taylor
* remove D3D support for Theora movies, make sure that it doesn't try to play them (since it wouldn't work properly anyway)
* fix triple-buffer problem with page flipping (Mantis #1190)
*
* Revision 1.1.2.1 2006/12/25 21:44:11 taylor
* initial OGG Theora movie support (likely to be rewritten at least in large part)
*
*
*
* $NoKeywords: $
*
*/
// This player code is based largely on the player example in the libtheora package
// and so they get a fair bit of credit for this code, even if in ideas/comments only
#ifdef SCP_UNIX
#include <sys/time.h>
#include <errno.h>
#endif
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#include "graphics/gropengl.h"
#include "graphics/gropengltexture.h"
#include "graphics/gropenglextension.h"
#include "graphics/gropenglshader.h"
#include "graphics/gropenglstate.h"
#include "graphics/2d.h"
#include "io/key.h"
#include "osapi/osapi.h"
#include "sound/sound.h"
#include "sound/ds.h"
#include "bmpman/bmpman.h"
#include "cutscene/oggplayer.h"
#include "io/timer.h"
#include "theora/theora.h"
#include "vorbis/codec.h"
extern int Cmdline_noscalevid;
static int hp2, wp2;
static int video_inited = 0;
static int scale_video = 0;
static int playing = 1;
static ubyte *pixelbuf = NULL;
static uint g_screenWidth = 0;
static uint g_screenHeight = 0;
static int g_screenX = 0;
static int g_screenY = 0;
static GLuint GLtex = 0;
static GLint gl_screenYH = 0;
static GLint gl_screenXW = 0;
static GLfloat gl_screenU = 0;
static GLfloat gl_screenV = 0;
// video externs from API graphics functions
extern void opengl_tcache_get_adjusted_texture_size(int w_in, int h_in, int *w_out, int *h_out);
static int timer_started = 0;
static longlong base_time = -1;
#ifdef SCP_UNIX
static struct timeval timer_expire = { 0, 0 };
#else
static int timer_expire;
#endif
static int audio_inited = 0;
static int audio_buffer_tail = 0;
static ALuint audio_sid = 0;
#define OGG_AUDIO_BUFFERS 15
static ALuint audio_buffers[OGG_AUDIO_BUFFERS];
// single audio fragment audio buffering
static int audiobuf_fill = 0;
static short *audiobuf = NULL;
static longlong audiobuf_granulepos = 0; // time position of last sample
static int audiofd_fragsize = 0;
// single frame video buffering
static longlong videobuf_granulepos = -1;
static double videobuf_time = 0;
// -----------------------------------------------------------------------------
// Utility items
//
// helper; just grab some more compressed bitstream and sync it for page extraction
static int OGG_buffer_data(THEORAFILE *movie)
{
char *buffer = ogg_sync_buffer(&movie->osyncstate, 4096);
int bytes = cfread(buffer, 1, 4096, movie->cfp);
ogg_sync_wrote(&movie->osyncstate, bytes);
return bytes;
}
// helper: push a page into the appropriate steam
// this can be done blindly; a stream won't accept a page that doesn't belong to it
static void OGG_queue_page(THEORAFILE *movie)
{
Assert( movie->theora_p );
ogg_stream_pagein(&movie->t_osstate, &movie->opage);
if (movie->vorbis_p)
ogg_stream_pagein(&movie->v_osstate, &movie->opage);
}
// get relative time since beginning playback, compensating for A/V drift
static double OGG_get_time()
{
#ifdef SCP_UNIX
longlong now;
struct timeval tv;
gettimeofday(&tv, NULL);
now = tv.tv_sec * 1000 + tv.tv_usec / 1000;
if (base_time == -1)
base_time = now;
return (now - base_time) * 0.001;
#else
if (base_time == -1)
base_time = timer_get_milliseconds();
return (timer_get_milliseconds() - base_time) * 0.001;
#endif
}
static void OGG_timer_init()
{
#if SCP_UNIX
int nsec = 0;
gettimeofday(&timer_expire, NULL);
timer_expire.tv_usec += (int)((videobuf_time - OGG_get_time()) * 1000000.0);
if (timer_expire.tv_usec > 1000000) {
nsec = timer_expire.tv_usec / 1000000;
timer_expire.tv_sec += nsec;
timer_expire.tv_usec -= nsec * 1000000;
}
#else
timer_expire = timer_get_microseconds();
timer_expire += (int)((videobuf_time - OGG_get_time()) * 1000000.0);
#endif
timer_started = 1;
}
static void OGG_timer_do_wait()
{
if (!timer_started)
OGG_timer_init();
#if SCP_UNIX
int nsec = 0;
struct timespec ts, tsRem;
struct timeval tv;
gettimeofday(&tv, NULL);
if (tv.tv_sec > timer_expire.tv_sec)
goto end;
if ( (tv.tv_sec == timer_expire.tv_sec) && (tv.tv_usec >= timer_expire.tv_usec) )
goto end;
ts.tv_sec = timer_expire.tv_sec - tv.tv_sec;
ts.tv_nsec = 1000 * (timer_expire.tv_usec - tv.tv_usec);
if (ts.tv_nsec < 0) {
ts.tv_nsec += 1000000000UL;
--ts.tv_sec;
}
if ( (nanosleep(&ts, &tsRem) == -1) && (errno == EINTR) ) {
// so we got an error that was a signal interupt, try to sleep again with remainder of time
if ( (nanosleep(&tsRem, NULL) == -1) && (errno == EINTR) ) {
mprintf(("MVE: Timer error! Aborting movie playback!\n"));
return;
}
}
end:
timer_expire.tv_usec += (int)((videobuf_time - OGG_get_time()) * 1000000.0);
if (timer_expire.tv_usec > 1000000) {
nsec = timer_expire.tv_usec / 1000000;
timer_expire.tv_sec += nsec;
timer_expire.tv_usec -= nsec * 1000000;
}
#else
int tv, ts, ts2;
tv = timer_get_microseconds();
if (tv > timer_expire)
goto end;
ts = timer_expire - tv;
ts2 = ts/1000;
Sleep(ts2);
end:
timer_expire += (int)((videobuf_time - OGG_get_time()) * 1000000.0);
#endif
}
//
// End Utility items
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// That wonderful Audio
//
static void OGG_audio_init(vorbis_info *vinfo)
{
if (audio_inited)
return;
Assert( vinfo != NULL );
audio_inited = 1;
OpenAL_ErrorCheck( alGenSources(1, &audio_sid), return );
OpenAL_ErrorPrint( alSourcef(audio_sid, AL_GAIN, 1.0f) );
memset( &audio_buffers, 0, sizeof(ALuint) * OGG_AUDIO_BUFFERS );
audiofd_fragsize = (((vinfo->channels * 16) / 8) * vinfo->rate);
audiobuf = (short *) vm_malloc(audiofd_fragsize);
}
static void OGG_audio_close()
{
if ( !audio_inited )
return;
audio_inited = 0;
ALint p = 0;
OpenAL_ErrorPrint( alSourceStop(audio_sid) );
OpenAL_ErrorPrint( alGetSourcei(audio_sid, AL_BUFFERS_PROCESSED, &p) );
OpenAL_ErrorPrint( alSourceUnqueueBuffers(audio_sid, p, audio_buffers) );
OpenAL_ErrorPrint( alDeleteSources(1, &audio_sid) );
for (int i = 0; i < OGG_AUDIO_BUFFERS; i++) {
// make sure that the buffer is real before trying to delete, it could crash for some otherwise
if ( (audio_buffers[i] != 0) && alIsBuffer(audio_buffers[i]) ) {
OpenAL_ErrorPrint( alDeleteBuffers(1, &audio_buffers[i]) );
}
}
audio_sid = 0;
audio_buffer_tail = 0;
audiobuf_fill = 0;
audiobuf_granulepos = 0;
audiofd_fragsize = 0;
if (audiobuf != NULL) {
vm_free(audiobuf);
audiobuf = NULL;
}
}
static void OGG_audio_write(vorbis_info *vorbis, bool *ready)
{
ALint status, queued, processed = 0;
ALuint bid = 0;
if ( !audio_inited || !(*ready) )
return;
OpenAL_ErrorCheck( alGetSourcei(audio_sid, AL_BUFFERS_PROCESSED, &processed), return );
while (processed-- > 2)
OpenAL_ErrorPrint( alSourceUnqueueBuffers(audio_sid, 1, &bid) );
if ( !(*ready) )
return;
OpenAL_ErrorCheck( alGetSourcei(audio_sid, AL_BUFFERS_QUEUED, &queued), return );
if ( audiobuf_fill && (queued < OGG_AUDIO_BUFFERS) ) {
if ( !audio_buffers[audio_buffer_tail] )
OpenAL_ErrorCheck( alGenBuffers(1, &audio_buffers[audio_buffer_tail]), return );
ALenum format = (vorbis->channels == 2) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16;
OpenAL_ErrorCheck( alBufferData(audio_buffers[audio_buffer_tail], format, audiobuf, audiobuf_fill, vorbis->rate), return );
OpenAL_ErrorCheck( alSourceQueueBuffers(audio_sid, 1, &audio_buffers[audio_buffer_tail]), return );
if (++audio_buffer_tail == OGG_AUDIO_BUFFERS)
audio_buffer_tail = 0;
audiobuf_fill = 0;
*ready = false;
} else {
// mprintf(("Theora WARN: Buffer overrun: Queue full\n"));
}
OpenAL_ErrorCheck( alGetSourcei(audio_sid, AL_SOURCE_STATE, &status), return );
OpenAL_ErrorCheck( alGetSourcei(audio_sid, AL_BUFFERS_QUEUED, &queued), return );
if ( (status != AL_PLAYING) && (queued > 0) )
OpenAL_ErrorPrint( alSourcePlay(audio_sid) );
}
//
// End Audio stuff
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Video related stuff
//
static void OGG_video_init(theora_info *tinfo)
{
float scale_by = 0.0f;
if (video_inited)
return;
Assert( tinfo != NULL );
g_screenWidth = tinfo->frame_width;
g_screenHeight = tinfo->frame_height;
if (gr_screen.mode == GR_OPENGL) {
opengl_set_texture_target(GL_TEXTURE_2D);
opengl_tcache_get_adjusted_texture_size(g_screenWidth, g_screenHeight, &wp2, &hp2);
glGenTextures(1, &GLtex);
Assert( GLtex != 0 );
if ( GLtex == 0 ) {
nprintf(("MOVIE", "ERROR: Can't create a GL texture"));
video_inited = 1;
return;
}
gr_set_lighting(false, false);
GL_state.Texture.DisableAll();
GL_state.Texture.SetActiveUnit(0);
GL_state.Texture.SetTarget(GL_texture_target);
GL_state.Texture.Enable(GLtex);
GL_state.SetTextureSource(TEXTURE_SOURCE_DECAL);
GL_state.SetAlphaBlendMode(ALPHA_BLEND_NONE);
GL_state.SetZbufferType(ZBUFFER_TYPE_NONE);
GL_state.Texture.SetWrapS(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapT(GL_CLAMP_TO_EDGE);
// NOTE: using NULL instead of pixelbuf crashes some drivers, but then so does pixelbuf
glTexImage2D(GL_state.Texture.GetTarget(), 0, GL_RGB8, wp2, hp2, 0, GL_BGR, GL_UNSIGNED_BYTE, NULL);
float screen_ratio = (float)gr_screen.max_w / (float)gr_screen.max_h;
float movie_ratio = (float)g_screenWidth / (float)g_screenHeight;
if (screen_ratio > movie_ratio)
scale_by = (float)gr_screen.max_h / (float)g_screenHeight;
else
scale_by = (float)gr_screen.max_w / (float)g_screenWidth;
// don't bother setting anything if we aren't going to need it
if (!Cmdline_noscalevid && (scale_by != 1.0f)) {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glScalef( scale_by, scale_by, -1.0f );
scale_video = 1;
}
// set our color so that we can make sure that it's correct
glColor3f(1.0f, 1.0f, 1.0f);
}
pixelbuf = (ubyte *) vm_malloc_q(g_screenWidth * g_screenHeight * 3);
if (pixelbuf == NULL) {
nprintf(("MOVIE", "ERROR: Can't allocate memory for pixelbuf"));
video_inited = 1;
return;
}
memset( pixelbuf, 0, g_screenWidth * g_screenHeight * 3 );
if (scale_video) {
g_screenX = ((fl2i(gr_screen.max_w / scale_by + 0.5f) - g_screenWidth) / 2);
g_screenY = ((fl2i(gr_screen.max_h / scale_by + 0.5f) - g_screenHeight) / 2);
} else {
// centers on 1024x768, fills on 640x480
g_screenX = ((gr_screen.max_w - g_screenWidth) / 2);
g_screenY = ((gr_screen.max_h - g_screenHeight) / 2);
}
// set additional values for screen width/height and UV coords
if (gr_screen.mode == GR_OPENGL) {
gl_screenYH = g_screenY + g_screenHeight;
gl_screenXW = g_screenX + g_screenWidth;
gl_screenU = i2fl(g_screenWidth) / i2fl(wp2);
gl_screenV = i2fl(g_screenHeight) / i2fl(hp2);
}
video_inited = 1;
}
static void OGG_video_close()
{
if ( !video_inited ) {
return;
}
if (gr_screen.mode == GR_OPENGL) {
if (scale_video) {
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}
GL_state.Texture.Disable();
GL_state.Texture.Delete(GLtex);
glDeleteTextures(1, &GLtex);
opengl_set_texture_target();
GLtex = 0;
}
if (pixelbuf != NULL) {
vm_free(pixelbuf);
pixelbuf = NULL;
}
video_inited = 0;
scale_video = 0;
pixelbuf = NULL;
g_screenWidth = 0;
g_screenHeight = 0;
g_screenX = 0;
g_screenY = 0;
GLtex = 0;
gl_screenYH = 0;
gl_screenXW = 0;
gl_screenU = 0;
gl_screenV = 0;
}
static void convert_YUV_to_RGB(yuv_buffer *yuv)
{
int Y1, Y2, U, V;
int R = 0, G = 0, B = 0;
int C, D, E;
uint x, y;
uint width_2 = g_screenWidth/2;
ubyte *pix = &pixelbuf[0];
ubyte *y_ptr = (ubyte *)yuv->y;
ubyte *u_ptr = (ubyte *)yuv->u;
ubyte *v_ptr = (ubyte *)yuv->v;
for (y = 0; y < g_screenHeight; y++) {
for (x = 0; x < width_2; x++) {
// we need two pixels of Y
Y1 = *y_ptr; y_ptr++;
Y2 = *y_ptr; y_ptr++;
// only one pixel of U and V (half the size of Y)
U = u_ptr[x];
V = v_ptr[x];
D = (U - 128);
E = (V - 128);
// first pixel
C = (Y1 - 16) * 298;
R = ((C + 409 * E + 128) >> 8);
G = ((C - 100 * D - 208 * E + 128) >> 8);
B = ((C + 516 * D + 128) >> 8);
CLAMP(R, 0, 255);
CLAMP(G, 0, 255);
CLAMP(B, 0, 255);
*pix++ = (ubyte)B;
*pix++ = (ubyte)G;
*pix++ = (ubyte)R;
// second pixel (U and V values are resused)
C = (Y2 - 16) * 298;
R = ((C + 409 * E + 128) >> 8);
G = ((C - 100 * D - 208 * E + 128) >> 8);
B = ((C + 516 * D + 128) >> 8);
CLAMP(R, 0, 255);
CLAMP(G, 0, 255);
CLAMP(B, 0, 255);
*pix++ = (ubyte)B;
*pix++ = (ubyte)G;
*pix++ = (ubyte)R;
}
y_ptr += (yuv->y_stride - yuv->y_width);
// u and v have to be done every other row (it's a 2x2 block)
if (y % 2) {
u_ptr += yuv->uv_stride;
v_ptr += yuv->uv_stride;
}
}
}
static void OGG_video_draw(theora_state *tstate)
{
yuv_buffer yuv;
theora_decode_YUVout(tstate, &yuv);
convert_YUV_to_RGB(&yuv);
if (gr_screen.mode == GR_OPENGL) {
glTexSubImage2D(GL_state.Texture.GetTarget(), 0, 0, 0, g_screenWidth, g_screenHeight, GL_BGR, GL_UNSIGNED_BYTE, pixelbuf);
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2i(g_screenX, g_screenY);
glTexCoord2f(0, gl_screenV);
glVertex2i(g_screenX, gl_screenYH);
glTexCoord2f(gl_screenU, gl_screenV);
glVertex2i(gl_screenXW, gl_screenYH);
glTexCoord2f(gl_screenU, 0);
glVertex2i(gl_screenXW, g_screenY);
glEnd();
}
gr_flip();
os_poll();
int k = key_inkey();
switch (k) {
case KEY_ESC:
case KEY_ENTER:
case KEY_SPACEBAR:
playing = 0;
}
}
//
// End Video related stuff
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// The global stuff...
//
// close out a theora movie and free it's memory
void theora_close(THEORAFILE *movie)
{
Assert( movie != NULL );
timer_started = 0;
base_time = -1;
videobuf_granulepos = -1;
videobuf_time = 0;
if (movie->vorbis_p) {
ogg_stream_clear(&movie->v_osstate);
vorbis_block_clear(&movie->vblock);
vorbis_dsp_clear(&movie->vstate);
vorbis_comment_clear(&movie->vcomment);
vorbis_info_clear(&movie->vinfo);
}
if (movie->theora_p) {
ogg_stream_clear(&movie->t_osstate);
theora_clear(&movie->tstate);
theora_comment_clear(&movie->tcomment);
theora_info_clear(&movie->tinfo);
}
ogg_sync_clear(&movie->osyncstate);
// free the stream
if (movie->cfp)
cfclose(movie->cfp);
// free the struct
vm_free(movie);
playing = 1;
}
// opens a theora file, verifies we can use it, initializes everything needed
// to decode and use the file
THEORAFILE *theora_open(char *filename)
{
char lower_name[MAX_FILENAME_LEN];
THEORAFILE *movie;
int stateflag = 0;
// create the file
movie = (THEORAFILE *) vm_malloc_q( sizeof(THEORAFILE) );
if (movie == NULL)
return NULL;
memset( movie, 0, sizeof(THEORAFILE) );
// lower case filename for checking
memset( lower_name, 0, sizeof(lower_name) );
strncpy( lower_name, filename, strlen(filename) );
strlwr(lower_name);
char *p = strchr( lower_name, '.' );
if ( p ) *p = 0;
SAFE_STRCAT( lower_name, ".ogg", sizeof(lower_name) );
// NOTE: Because the .ogg extension is used for both movies and sounds, we have to
// be a bit more specific about our search locations, so we look only in the
// two places that Theora movies might exist.
movie->cfp = cfopen(lower_name, "rb", CFILE_NORMAL, CF_TYPE_ROOT);
if (movie->cfp == NULL)
movie->cfp = cfopen(lower_name, "rb", CFILE_NORMAL, CF_TYPE_MOVIES);
if (movie->cfp == NULL) {
mprintf(("Theora ERROR: Unable to find and open movie file named '%s'\n", lower_name));
goto Error;
}
// start up Ogg stream synchronization layer
ogg_sync_init(&movie->osyncstate);
// init supporting Vorbis structures needed in header parsing
vorbis_info_init(&movie->vinfo);
vorbis_comment_init(&movie->vcomment);
// init supporting Theora structures needed in header parsing
theora_comment_init(&movie->tcomment);
theora_info_init(&movie->tinfo);
// ogg file open so parse the headers
// we are only interested in Vorbis/Theora streams
while ( !stateflag ) {
int ret = OGG_buffer_data(movie);
if (ret == 0)
break;
while (ogg_sync_pageout(&movie->osyncstate, &movie->opage) > 0) {
ogg_stream_state test;
// is this a mandated initial header? If not, stop parsing
if ( !ogg_page_bos(&movie->opage) ) {
// don't leak the page; get it into the appropriate stream
OGG_queue_page(movie);
stateflag = 1;
break;
}
ogg_stream_init(&test, ogg_page_serialno(&movie->opage));
ogg_stream_pagein(&test, &movie->opage);
ogg_stream_packetout(&test, &movie->opacket);
// identify the codec: try theora
if ( !movie->theora_p && (theora_decode_header(&movie->tinfo, &movie->tcomment, &movie->opacket) >= 0) ) {
// it is theora
memcpy( &movie->t_osstate, &test, sizeof(test) );
movie->theora_p = 1;
} else if ( !movie->vorbis_p && (vorbis_synthesis_headerin(&movie->vinfo, &movie->vcomment, &movie->opacket) >= 0) ) {
// it is vorbis
memcpy( &movie->v_osstate, &test, sizeof(test) );
movie->vorbis_p = 1;
} else {
// whatever it is, we don't care about it
ogg_stream_clear(&test);
}
}
// fall through to non-bos page parsing
}
// if we don't have usable video then bail out now
if ( !movie->theora_p ) {
mprintf(("Theora ERROR: Unable to find video data in '%s'\n", lower_name));
goto Error;
}
// go ahead and do some audio stream error checking...
if ( (movie->vinfo.channels < 0) || (movie->vinfo.channels > 2) ) {
mprintf(("Theora ERROR: Unsupported number of audio channels!\n"));
movie->vorbis_p = 0;
}
// if we don't have usable audio then close out it's partial setup and just use the video
if ( !Sound_enabled || !movie->vorbis_p ) {
vorbis_info_clear(&movie->vinfo);
vorbis_comment_clear(&movie->vcomment);
movie->vorbis_p = 0;
}
// we're expecting more header packets.
while ( (movie->theora_p < 3) || (movie->vorbis_p && (movie->vorbis_p < 3)) ) {
int ret;
// look for further theora headers
while ( (movie->theora_p < 3) && (ret = ogg_stream_packetout(&movie->t_osstate, &movie->opacket)) ){
if ( (ret < 0) || theora_decode_header(&movie->tinfo, &movie->tcomment, &movie->opacket) ) {
mprintf(("Theora ERROR: Error parsing Theora stream headers on '%s'! Corrupt stream?\n", lower_name));
goto Error;
}
if (++movie->theora_p == 3)
break;
}
// look for more vorbis header packets
while ( movie->vorbis_p && (movie->vorbis_p < 3) && (ret = ogg_stream_packetout(&movie->v_osstate, &movie->opacket)) ) {
if ( (ret < 0) || vorbis_synthesis_headerin(&movie->vinfo, &movie->vcomment, &movie->opacket) ) {
mprintf(("Theora ERROR: Error parsing Vorbis stream headers on '%s'! Corrupt stream?\n", lower_name));
goto Error;
}
if (++movie->vorbis_p == 3)
break;
}
// The header pages/packets will arrive before anything else we care about, or the stream is not obeying spec
if ( ogg_sync_pageout(&movie->osyncstate, &movie->opage) > 0 ) {
OGG_queue_page(movie); // demux into the appropriate stream
} else {
ret = OGG_buffer_data(movie); // someone needs more data
if ( ret == 0 ) {
mprintf(("Theora ERROR: End of file while searching for codec headers in '%s'!\n", lower_name));
goto Error;
}
}
}
// initialize video decoder
theora_decode_init(&movie->tstate, &movie->tinfo);
// and now for video stream error checking...
if (movie->tinfo.pixelformat != OC_PF_420) {
mprintf(("Theora ERROR: Only the yuv420p chroma is supported!\n"));
goto Error;
}
if (movie->tinfo.offset_x || movie->tinfo.offset_y) {
mprintf(("Theora ERROR: Player does not support frame offsets!\n"));
goto Error;
}
// initialize audio decoder, if there is audio
if (movie->vorbis_p) {
vorbis_synthesis_init(&movie->vstate, &movie->vinfo);
vorbis_block_init(&movie->vstate, &movie->vblock);
}
return movie;
Error:
theora_close(movie);
return NULL;
}
// play that funky music... err, movie!
void theora_play(THEORAFILE *movie)
{
int i, j;
bool stateflag = false;
bool videobuf_ready = false;
bool audiobuf_ready = false;
double last_time = 0.0; // for frame skipper
if ( (movie == NULL) || !movie->theora_p )
return;
// only OGL is supported
if (gr_screen.mode != GR_OPENGL)
return;
// open audio
if (movie->vorbis_p)
OGG_audio_init(&movie->vinfo);
// open video
OGG_video_init(&movie->tinfo);
// on to the main decode loop. We assume in this example that audio
// and video start roughly together, and don't begin playback until
// we have a start frame for both. This is not necessarily a valid
// assumption in Ogg A/V streams! It will always be true of the
// example_encoder (and most streams) though.
while (playing) {
// we want a video and audio frame ready to go at all times. If
// we have to buffer incoming, buffer the compressed data (ie, let
// ogg do the buffering)
while ( movie->vorbis_p && !audiobuf_ready ) {
int ret;
float **pcm;
// if there's pending, decoded audio, grab it
if ( (ret = vorbis_synthesis_pcmout(&movie->vstate, &pcm)) > 0 ) {
int count = (audiobuf_fill / 2);
int maxsamples = (audiofd_fragsize - audiobuf_fill) / 2 / movie->vinfo.channels;
for (i = 0; (i < ret) && (i < maxsamples); i++) {
for (j = 0; j < movie->vinfo.channels; j++) {
int val = fl2i(pcm[j][i] * 32767.0f + 0.5f);
if (val > 32767)
val = 32767;
if (val < -32768)
val = -32768;
audiobuf[count++] = val;
}
}
vorbis_synthesis_read(&movie->vstate, i);
audiobuf_fill += (i * movie->vinfo.channels * 2);
if (audiobuf_fill == audiofd_fragsize)
audiobuf_ready = true;
if (movie->vstate.granulepos >= 0)
audiobuf_granulepos = movie->vstate.granulepos - ret + i;
else
audiobuf_granulepos += i;
} else {
// no pending audio; is there a pending packet to decode?
if ( ogg_stream_packetout(&movie->v_osstate, &movie->opacket) > 0 ) {
if ( vorbis_synthesis(&movie->vblock, &movie->opacket) == 0 )
vorbis_synthesis_blockin(&movie->vstate, &movie->vblock);
}
// we need more data; break out to suck in another page
else {
break;
}
}
}
while ( !videobuf_ready ) {
// theora is one in, one out...
if ( ogg_stream_packetout(&movie->t_osstate, &movie->opacket) <= 0 )
break;
theora_decode_packetin(&movie->tstate, &movie->opacket);
videobuf_time = theora_granule_time(&movie->tstate, movie->tstate.granulepos);
double now_time = OGG_get_time();
double delay = videobuf_time - OGG_get_time();
// if we are running slow then skip the frame, otherwise to go into ready mode
if ( (delay >= 0.0) || (now_time - last_time >= 1.0) )
videobuf_ready = true;
}
if ( !videobuf_ready && (movie->vorbis_p && !audiobuf_ready) && cfeof(movie->cfp) )
break;
if ( !videobuf_ready || (movie->vorbis_p && !audiobuf_ready) ) {
// no data yet for somebody. Grab another page
OGG_buffer_data(movie);
while (ogg_sync_pageout(&movie->osyncstate, &movie->opage) > 0)
OGG_queue_page(movie);
}
// If playback has begun, top audio buffer off immediately.
if ( stateflag )
OGG_audio_write(&movie->vinfo, &audiobuf_ready);
// are we at or past time for this video frame?
if ( stateflag && videobuf_ready && (videobuf_time <= OGG_get_time()) ) {
OGG_video_draw(&movie->tstate);
last_time = OGG_get_time();
videobuf_ready = false;
}
// if our buffers either don't exist or are ready to go, we can begin playback
if ( videobuf_ready && (audiobuf_ready || !movie->vorbis_p) )
stateflag = true;
// bail if we run into eof
// if ( cfeof(movie->cfp) )
// break;
if (videobuf_ready)
OGG_timer_do_wait();
}
// tear it all down
OGG_audio_close();
OGG_video_close();
}
+52
View File
@@ -0,0 +1,52 @@
/*
* $Logfile: /Freespace2/src/cutscene/oggplayer.h $
* $Revision: 1.1.2.1 $
* $Date: 2006-12-25 21:44:11 $
* $Author: taylor $
*
* main lib for using Theora movies
*
* $Log: not supported by cvs2svn $
*
* $NoKeywords: $
*
*/
#ifndef _OGGPLAYER_H
#define _OGGPLAYER_H
#include "globalincs/pstypes.h"
#include "theora/theora.h"
#include "vorbis/codec.h"
struct CFILE;
// structure for maintaining info on a THEORAFILE stream
typedef struct THEORAFILE
{
CFILE *cfp;
ubyte theora_p;
ubyte vorbis_p;
ogg_sync_state osyncstate;
ogg_page opage;
ogg_packet opacket;
ogg_stream_state v_osstate;
ogg_stream_state t_osstate;
theora_info tinfo;
theora_comment tcomment;
theora_state tstate;
vorbis_info vinfo;
vorbis_dsp_state vstate;
vorbis_block vblock;
vorbis_comment vcomment;
} THEORAFILE;
void theora_play(THEORAFILE *movie);
THEORAFILE *theora_open(char *filename);
void theora_close(THEORAFILE *movie);
#endif
+501
View File
@@ -0,0 +1,501 @@
#include "ddsutils/ddsutils.h"
#include "cfile/cfile.h"
#include "osapi/osregistry.h"
/* Currently supported formats:
* DXT1a (compressed)
* DXT1c (compressed)
* DXT3 (compressed)
* DXT5 (compressed)
* uncompressed 1555 (16-bit, 1-bit being alpha)
* uncompressed 8888 (32-bit)
* uncompressed 888 (24-bit, no alpha)
* paletted 8-bit (256 colors)
*/
int Texture_compression_available = 0;
int Use_compressed_textures = 0;
// power of two check, to verify that a given DDS will always be usable since
// some may not be power-of-2
static inline int is_power_of_two(int w, int h)
{
return ( (w && !(w & (w-1))) && (h && !(h & (h-1))) );
}
int dds_read_header(char *filename, CFILE *img_cfp, int *width, int *height, int *bpp, int *compression_type, int *levels, int *size, ubyte *palette)
{
DDSURFACEDESC2 dds_header;
int code = 0;
CFILE *ddsfile;
char real_name[MAX_FILENAME_LEN];
int retval = DDS_ERROR_NONE;
int ct = DDS_UNCOMPRESSED;
int bits = 0;
int i, trash, is_cubemap = 0;
int d_width = 0, d_height = 0, d_depth = 0, d_size = 0;
if (img_cfp == NULL) {
// this better not happen.. ever
Assert(filename != NULL);
// make sure there is an extension
strcpy(real_name, filename);
char *p = strchr(real_name, '.');
if (p) { *p=0; }
strcat(real_name, ".dds");
// try to open the file
ddsfile = cfopen(real_name, "rb");
// file not found
if (ddsfile == NULL)
return DDS_ERROR_INVALID_FILENAME;
} else {
ddsfile = img_cfp;
}
// read the code
code = cfread_int(ddsfile);
// check it
if (code != DDS_FILECODE) {
retval = DDS_ERROR_BAD_HEADER;
goto Done;
}
// read header variables
dds_header.dwSize = cfread_uint(ddsfile);
dds_header.dwFlags = cfread_uint(ddsfile);
dds_header.dwHeight = cfread_uint(ddsfile);
dds_header.dwWidth = cfread_uint(ddsfile);
dds_header.dwPitchOrLinearSize = cfread_uint(ddsfile);
dds_header.dwDepth = cfread_uint(ddsfile);
dds_header.dwMipMapCount = cfread_uint(ddsfile);
// skip over the crap we don't care about
for (i = 0; i < 11; i++)
trash = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwSize = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwFlags = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwFourCC = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwRGBBitCount = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwRBitMask = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwGBitMask = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwBBitMask = cfread_uint(ddsfile);
dds_header.ddpfPixelFormat.dwRGBAlphaBitMask = cfread_uint(ddsfile);
dds_header.ddsCaps.dwCaps1 = cfread_uint(ddsfile);
dds_header.ddsCaps.dwCaps2 = cfread_uint(ddsfile);
// sanity
if (dds_header.dwDepth == 0)
dds_header.dwDepth = 1;
if (dds_header.dwMipMapCount < 1)
dds_header.dwMipMapCount = 1;
d_width = dds_header.dwWidth;
d_height = dds_header.dwHeight;
d_depth = dds_header.dwDepth;
// calculate the type and size of the data
if (dds_header.ddpfPixelFormat.dwFlags & DDPF_FOURCC) {
// did I mention lately that I hate Microsoft?
// this is here to fix the situation where Microsoft doesn't follow their own docs
if ( dds_header.dwPitchOrLinearSize <= 0 ) {
// calculate the block size, mult by 8 for DXT1, 16 for DXT3 & 5
d_size = ((dds_header.dwWidth + 3)/4) * ((dds_header.dwHeight + 3)/4) * ((dds_header.dwDepth + 3)/4) * ((dds_header.ddpfPixelFormat.dwFourCC == FOURCC_DXT1) ? 8 : 16);
} else {
d_size = dds_header.dwPitchOrLinearSize;
}
// if we have mipmaps then compute them into the final size too
for (i = 1; i < (int)dds_header.dwMipMapCount; i++) {
// reduce size by half for the next pass
d_width /= 2;
d_height /= 2;
if (d_width <= 0)
d_width = 1;
if (d_height <= 0)
d_height = 1;
// size of data block (4x4)
d_size += ((d_width + 3) / 4) * ((d_height + 3) / 4) * ((dds_header.ddpfPixelFormat.dwFourCC == FOURCC_DXT1) ? 8 : 16);
}
if ( dds_header.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP ) {
if ( !(dds_header.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP_ALLFACES) ) {
retval = DDS_ERROR_CUBEMAP_FACES;
ct = DDS_DXT_INVALID;
goto Done;
}
// it's a valid cubemap, probably
is_cubemap = 1;
// the previously computed size is just per face, mult by 6 for full size
d_size *= 6;
}
Assert( d_size > 0 );
*size = d_size;
switch (dds_header.ddpfPixelFormat.dwFourCC) {
case FOURCC_DXT1:
bits = 24;
ct = (is_cubemap) ? DDS_CUBEMAP_DXT1 : DDS_DXT1;
break;
case FOURCC_DXT3:
bits = 32;
ct = (is_cubemap) ? DDS_CUBEMAP_DXT3 : DDS_DXT3;
break;
case FOURCC_DXT5:
bits = 32;
ct = (is_cubemap) ? DDS_CUBEMAP_DXT5 : DDS_DXT5;
break;
// dxt2 and dxt4 aren't supported
case FOURCC_DXT2:
case FOURCC_DXT4:
retval = DDS_ERROR_UNSUPPORTED;
ct = DDS_DXT_INVALID;
goto Done;
break;
// none of the above
default:
retval = DDS_ERROR_INVALID_FORMAT;
ct = DDS_DXT_INVALID;
goto Done;
break;
}
} else if ( dds_header.ddpfPixelFormat.dwFlags & (DDPF_RGB | DDPF_PALETTEINDEXED8) ) {
d_size += d_width * d_height * d_depth * (dds_header.ddpfPixelFormat.dwRGBBitCount / 8);
// calculate full data size for all mipmap levels
for (i = 1; i < (int)dds_header.dwMipMapCount; i++) {
d_width /= 2;
d_height /= 2;
d_depth /= 2;
if (d_width < 1)
d_width = 1;
if (d_height < 1)
d_height = 1;
if (d_depth < 1)
d_depth = 1;
d_size += d_width * d_height * d_depth * (dds_header.ddpfPixelFormat.dwRGBBitCount / 8);
}
Assert( d_size > 0 );
if ( dds_header.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP ) {
if ( !(dds_header.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP_ALLFACES) ) {
retval = DDS_ERROR_CUBEMAP_FACES;
ct = DDS_DXT_INVALID;
goto Done;
}
// it's a valid cubemap, probably
is_cubemap = 1;
// the previously computed size is just per face, mult by 6 for full size
d_size *= 6;
}
*size = d_size;
bits = dds_header.ddpfPixelFormat.dwRGBBitCount;
ct = (is_cubemap) ? DDS_CUBEMAP_UNCOMPRESSED : DDS_UNCOMPRESSED;
} else {
// it's not a readable format
retval = DDS_ERROR_INVALID_FORMAT;
goto Done;
}
// we don't support compressed, non-power-of-2 images
if ( (ct != DDS_UNCOMPRESSED) && (!is_power_of_two(dds_header.dwWidth, dds_header.dwHeight)) ) {
retval = DDS_ERROR_NON_POWER_OF_2;
goto Done;
}
// make sure that the video card can handle compressed textures before using them
if ( !Use_compressed_textures && (ct != DDS_UNCOMPRESSED) && (ct != DDS_DXT_INVALID) ) {
retval = DDS_ERROR_NO_COMPRESSION;
goto Done;
}
// stuff important info
if (bpp)
*bpp = bits;
if (compression_type)
*compression_type = ct;
if (width)
*width = dds_header.dwWidth;
if (height)
*height = dds_header.dwHeight;
if (levels)
*levels = dds_header.dwMipMapCount;
if (palette && (bits == 8)) {
cfseek(ddsfile, DDS_OFFSET, CF_SEEK_SET);
cfread(palette, 1, 1024, ddsfile);
}
Done:
if (img_cfp == NULL) {
// close file and return
cfclose(ddsfile);
ddsfile = NULL;
}
return retval;
}
//reads pixel info from a dds file
int dds_read_bitmap(char *filename, ubyte *data, ubyte *bpp, int cf_type)
{
int retval;
int w,h,ct,lvl;
int size = 0, bits = 0;
CFILE *cfp;
char real_name[MAX_FILENAME_LEN];
// this better not happen.. ever
Assert(filename != NULL);
// make sure there is an extension
strcpy(real_name, filename);
char *p = strchr(real_name, '.');
if (p) { *p = 0; }
strcat(real_name, ".dds");
// open it up and go to the data section
cfp = cfopen(real_name, "rb", CFILE_NORMAL, cf_type);
// just in case
if (cfp == NULL)
return DDS_ERROR_INVALID_FILENAME;
// read the header -- if its at this stage, it should be legal.
retval = dds_read_header(real_name, cfp, &w, &h, &bits, &ct, &lvl, &size);
Assert(retval == DDS_ERROR_NONE);
// this really shouldn't be needed but better safe than sorry
if (retval != DDS_ERROR_NONE) {
return retval;
}
cfseek(cfp, DDS_OFFSET, CF_SEEK_SET);
// read in the data
cfread(data, 1, size, cfp);
if (bpp)
*bpp = (ubyte)bits;
// we look done here
cfclose(cfp);
return DDS_ERROR_NONE;
}
// save some image data as a DDS image
// NOTE: we only support, uncompressed, 24-bit RGB and 32-bit RGBA images here!!
void dds_save_image(int width, int height, int bpp, int num_mipmaps, ubyte *data, int cubemap, char *filename)
{
DDSURFACEDESC2 dds_header;
char real_filename[MAX_FILENAME_LEN];
if (data == NULL) {
Int3();
return;
}
// header size check
if (sizeof(DDSURFACEDESC2) != 124) {
Int3();
return;
}
// not that that's out of the way we can get down to business, constructing a sane filename
memset( &real_filename, 0, sizeof(real_filename) );
int count = os_config_read_uint(NULL, "ImageExportNum", 0);
if (count > 999)
count = 0;
if (filename == NULL) {
if (cubemap) {
sprintf(real_filename, "cubemap%.3d.dds", count++);
} else {
sprintf(real_filename, "image%.3d.dds", count++);
}
os_config_write_uint(NULL, "ImageExportNum", count);
} else {
Assert( strlen(filename) < MAX_FILENAME_LEN-5 );
strcpy(real_filename, filename);
char *p = strchr(real_filename, '.');
if (p) { *p = 0; }
strcat(real_filename, ".dds");
}
CFILE *image = cfopen( real_filename, "wb", CFILE_NORMAL, CF_TYPE_CACHE );
if (image == NULL) {
mprintf(("Unable to open DDS image for saving!!\n"));
return;
}
if (num_mipmaps < 1)
num_mipmaps = 1;
// we have a filename and file handle, so now lets create our DDS header...
memset( &dds_header, 0, sizeof(DDSURFACEDESC2) );
uint flags = (DDSD_CAPS | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT);
uint pixel_flags = DDPF_RGB;
uint caps1 = DDSCAPS_TEXTURE;
uint caps2 = 0;
if (bpp == 32) {
pixel_flags |= DDPF_ALPHAPIXELS;
}
if (num_mipmaps > 1) {
flags |= DDSD_MIPMAPCOUNT;
caps1 |= (DDSCAPS_COMPLEX | DDSCAPS_MIPMAP);
}
if (cubemap) {
caps1 |= DDSCAPS_COMPLEX;
caps2 |= (DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_ALLFACES);
}
dds_header.dwSize = 124;
dds_header.dwFlags = flags;
dds_header.dwHeight = height;
dds_header.dwWidth = width;
dds_header.dwPitchOrLinearSize = (width * (bpp >> 3));
dds_header.dwDepth = 0;
dds_header.dwMipMapCount = num_mipmaps;
dds_header.ddpfPixelFormat.dwSize = 32;
dds_header.ddpfPixelFormat.dwFlags = pixel_flags;
dds_header.ddpfPixelFormat.dwFourCC = 0;
dds_header.ddpfPixelFormat.dwRGBBitCount = bpp;
dds_header.ddpfPixelFormat.dwRBitMask = 0x00ff0000;
dds_header.ddpfPixelFormat.dwGBitMask = 0x0000ff00;
dds_header.ddpfPixelFormat.dwBBitMask = 0x000000ff;
dds_header.ddpfPixelFormat.dwRGBAlphaBitMask = (bpp == 32) ? 0xff000000 : 0x00000000;
dds_header.ddsCaps.dwCaps1 = caps1;
dds_header.ddsCaps.dwCaps2 = caps2;
// now save it all...
uint dds_id = DDS_FILECODE;
cfwrite(&dds_id, 1, 4, image);
cfwrite(&dds_header, 1, sizeof(DDSURFACEDESC2), image);
int faces = (cubemap) ? 6 : 1;
int f_width = width;
int f_height = height;
int f_size = 0, f_offset = 0;
// cubemaps are written:
// face 1
// all face 1 mipmaps
// face 2
// all face 2 mipmaps
// ... etc.
for (int i = 0; i < faces; i++) {
for (int j = 0; j < num_mipmaps; j++) {
f_size = (f_width * f_height * (bpp >> 3));
cfwrite(data + f_offset, 1, f_size, image);
// increase offset for next mipmap level
f_offset += f_size;
// half width and height for next mipmap level
f_width /= 2;
f_height /= 2;
if (f_width < 1)
f_width = 1;
if (f_height < 1)
f_height = 1;
}
// reset width and height to original values for the next face
f_width = width;
f_height = height;
}
// done! now lets go get something to eat...
cfclose(image);
}
// returns string representation of DDS_** error code
const char *dds_error_string(int code)
{
switch (code)
{
case DDS_ERROR_NONE:
return "No error";
case DDS_ERROR_INVALID_FILENAME:
return "File not found";
case DDS_ERROR_BAD_HEADER:
return "Filecode did not equal \"DDS \"";
case DDS_ERROR_INVALID_FORMAT:
return "DDS was in an unsupported/unknown format";
case DDS_ERROR_UNSUPPORTED:
return "DDS format was known but is not supported (ie. DXT2/DXT4)";
case DDS_ERROR_NO_COMPRESSION:
return "DDS is compressed but compression support is not enabled";
case DDS_ERROR_NON_POWER_OF_2:
return "Cannot load DDS if not power-of-2";
case DDS_ERROR_CUBEMAP_FACES:
return "Cubemaps must have all 6 faces";
default:
return "Abort, retry, fail?";
}
//get a warning otherwise
return "Abort, retry, fail?";
}
+156
View File
@@ -0,0 +1,156 @@
//header file to load .dds files
//these use dxtc texture compression
#ifndef __DDS_H
#define __DDS_H
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#define DDS_ERROR_NONE 0 // everything went fine
#define DDS_ERROR_INVALID_FILENAME 1 // bad or missing file
#define DDS_ERROR_UNSUPPORTED 2 // a known format but one we don't support
#define DDS_ERROR_INVALID_FORMAT 3 // format that's not supported
#define DDS_ERROR_BAD_HEADER 4 // header was not "DDS "
#define DDS_ERROR_NO_COMPRESSION 5 // file is compressed, compression isn't supported
#define DDS_ERROR_NON_POWER_OF_2 6 // file is not a power of 2 in dimensions
#define DDS_ERROR_CUBEMAP_FACES 7 // file is a cubemap, but doesn't have all six faces
#define DDS_DXT_INVALID -1
#define DDS_UNCOMPRESSED 0
#define DDS_DXT1 1
#define DDS_DXT3 3
#define DDS_DXT5 5
#define DDS_CUBEMAP_UNCOMPRESSED 10
#define DDS_CUBEMAP_DXT1 11
#define DDS_CUBEMAP_DXT3 13
#define DDS_CUBEMAP_DXT5 15
#ifndef MAKEFOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((uint)(ubyte)(ch0) | ((uint)(ubyte)(ch1) << 8) | \
((uint)(ubyte)(ch2) << 16) | ((uint)(ubyte)(ch3) << 24 ))
#endif //defined(MAKEFOURCC)
// FOURCC codes for DX compressed-texture pixel formats
#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
#define DDS_FILECODE 0x20534444 // "DDS " in file
// DDS format stuff ...
#define DDSD_LINEARSIZE 0x00080000
#define DDSD_PITCH 0x00000008
#define DDPF_ALPHAPIXELS 0x00000001
#define DDPF_FOURCC 0x00000004
#define DDPF_PALETTEINDEXED4 0x00000008
#define DDPF_PALETTEINDEXEDTO8 0x00000010
#define DDPF_PALETTEINDEXED8 0x00000020
#define DDPF_RGB 0x00000040
#define DDSD_PIXELFORMAT 0x00001000
#define DDSD_WIDTH 0x00000004
#define DDSD_HEIGHT 0x00000002
#define DDSD_CAPS 0x00000001
#define DDSD_MIPMAPCOUNT 0x00020000
#define DDSCAPS_COMPLEX 0x00000008
#define DDSCAPS_PRIMARYSURFACE 0x00000200
#define DDSCAPS_MIPMAP 0x00400000
#define DDSCAPS_TEXTURE 0x00001000
#define DDSCAPS2_CUBEMAP 0x00000200
#define DDSCAPS2_VOLUME 0x00200000
#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX | \
DDSCAPS2_CUBEMAP_NEGATIVEX | \
DDSCAPS2_CUBEMAP_POSITIVEY | \
DDSCAPS2_CUBEMAP_NEGATIVEY | \
DDSCAPS2_CUBEMAP_POSITIVEZ | \
DDSCAPS2_CUBEMAP_NEGATIVEZ )
#pragma pack(1)
// these structures are the headers for a dds file
/*typedef struct _DDPIXELFORMAT {
uint dwSize;
uint dwFlags;
uint dwFourCC;
uint dwRGBBitCount;
uint dwRBitMask;
uint dwGBitMask;
uint dwBBitMask;
uint dwRGBAlphaBitMask;
} DDPIXELFORMAT;
typedef struct _DDSCAPS2
{
uint dwCaps1;
uint dwCaps2;
uint Reserved[2];
} DDSCAPS2;*/
typedef struct _DDSURFACEDESC2
{
uint dwSize; // size of the DDSURFACEDESC structure
uint dwFlags; // determines what fields are valid
uint dwHeight; // height of surface to be created
uint dwWidth; // width of input surface
uint dwPitchOrLinearSize;
uint dwDepth;
uint dwMipMapCount;
uint dwReserved1[11];
struct {
uint dwSize;
uint dwFlags;
uint dwFourCC;
uint dwRGBBitCount;
uint dwRBitMask;
uint dwGBitMask;
uint dwBBitMask;
uint dwRGBAlphaBitMask;
} ddpfPixelFormat;
struct {
uint dwCaps1;
uint dwCaps2;
uint Reserved[2];
} ddsCaps;
// DDPIXELFORMAT ddpfPixelFormat;
// DDSCAPS2 ddsCaps; // direct draw surface capabilities
uint dwReserved2;
} DDSURFACEDESC2;
#pragma pack()
#define DDS_OFFSET 4+sizeof(DDSURFACEDESC2) //place where the data starts -- should be 128
//reads a dds header
//returns one of the error values
//'compression_type' comes back as one of the DDS_DXTC* defines
int dds_read_header(char *filename, CFILE *img_cfp = NULL, int *width = 0, int *height = 0, int *bpp = 0, int *compression_type = 0, int *levels = 0, int *size = 0, ubyte *palette = NULL);
//reads bitmap
//size of the data it stored in size
int dds_read_bitmap(char *filename, ubyte *data, ubyte *bpp = NULL, int cf_type = CF_TYPE_ANY);
// writes a DDS file using given data
void dds_save_image(int width, int height, int bpp, int num_mipmaps, ubyte *data = NULL, int cubemap = 0, char *filename = NULL);
//returns a string from a DDS error code
const char *dds_error_string(int code);
extern int Texture_compression_available;
extern int Use_compressed_textures;
#endif //__DDS_H
@@ -9,13 +9,66 @@
/*
* $Logfile: /Freespace2/code/Debris/Debris.cpp $
* $Revision: 2.17 $
* $Date: 2005-07-22 10:18:37 $
* $Revision: 2.23.2.8 $
* $Date: 2007-02-20 04:19:09 $
* $Author: Goober5000 $
*
* Code for the pieces of exploding object debris.
*
* $Log: not supported by cvs2svn $
* Revision 2.23.2.7 2007/02/12 00:22:05 taylor
* some generic_bitmap fixes to go with new changes (not in CVS just yet, don't freak out)
* make use of VALID_FNAME() where possible
* fix an animation time issue (sub-second animation playback caused div-by-0)
*
* Revision 2.23.2.6 2007/02/11 09:21:12 taylor
* remove NO_SOUND
* fix debris recycling
*
* Revision 2.23.2.5 2006/09/11 01:00:27 taylor
* various small compiler warning and strict compiling fixes
*
* Revision 2.23.2.4 2006/08/27 18:12:40 taylor
* make Species_info[] and Asteroid_info[] dynamic
*
* Revision 2.23.2.3 2006/08/19 04:22:33 taylor
* an int wrap-around issue could (and was) make debris not have electrical arcs (or lighting or sounds) since it would always fail this check
*
* Revision 2.23.2.2 2006/07/06 04:06:00 Goober5000
* 1) complete (almost) changeover to reorganized texture mapping system
* 2) finally fix texture animation; textures now animate at the correct speed
* --Goober5000
*
* Revision 2.23.2.1 2006/07/04 07:42:09 Goober5000
* --in preparation for fixing an annoying animated texture bug, reorganize the various texture structs and glow point structs and clarify several parts of the texture code :P
* --this breaks animated glow maps, and animated regular maps still aren't fixed, but these will be remedied shortly
* --Goober5000
*
* Revision 2.23 2006/01/26 03:23:29 Goober5000
* pare down the pragmas some more
* --Goober5000
*
* Revision 2.22 2005/12/29 08:08:33 wmcoolmon
* Codebase commit, most notably including objecttypes.tbl
*
* Revision 2.21 2005/10/30 06:44:56 wmcoolmon
* Codebase commit - nebula.tbl, scripting, new dinky explosion/shockwave stuff, moving muzzle flashes
*
* Revision 2.20 2005/10/10 17:21:03 taylor
* remove NO_NETWORK
*
* Revision 2.19 2005/09/25 05:13:05 Goober5000
* hopefully complete species upgrade
* --Goober5000
*
* Revision 2.18 2005/09/24 07:07:15 Goober5000
* another species overhaul
* --Goober5000
*
* Revision 2.17 2005/07/22 10:18:37 Goober5000
* CVS header tweaks
* --Goober5000
*
* Revision 2.16 2005/07/13 02:50:51 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
@@ -54,7 +107,7 @@
*
* Revision 2.6 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* to indicate which warnings were being disabled
* --Goober5000
*
* Revision 2.5 2004/03/05 09:01:59 Goober5000
@@ -293,13 +346,11 @@
#include "io/timer.h"
#include "species_defs/species_defs.h"
#include "ship/ship.h"
#include "ship/shipfx.h"
#include "radar/radarsetup.h"
#ifndef NO_NETWORK
#include "network/multi.h"
#include "network/multimsgs.h"
#include "network/multiutil.h"
#endif
@@ -309,7 +360,8 @@
#define DEBRIS_SOUND_DELAY 2000 // time to start debris sound after created
// limit the number of hull debris chunks that can exist.
#define MAX_HULL_PIECES 10
//#define MAX_HULL_PIECES 10
#define MAX_HULL_PIECES MAX_DEBRIS_PIECES //-WMCD
int Num_hull_pieces; // number of hull pieces in existance
debris Hull_debris_list; // head of linked list for hull debris chunks, for quick search
@@ -322,11 +374,6 @@ int Debris_model = -1;
int Debris_vaporize_model = -1;
int Debris_num_submodels = 0;
char Debris_texture_files[MAX_SPECIES][FILESPEC_LENGTH];
int Debris_textures[MAX_SPECIES];
#define MAX_DEBRIS_DIST 10000.0f // Debris goes away if it's this far away.
#define DEBRIS_DISTANCE_CHECK_TIME (10*1000) // Check every 10 seconds.
#define DEBRIS_INDEX(dp) (dp-Debris)
@@ -334,7 +381,7 @@ int Debris_textures[MAX_SPECIES];
#define MAX_SPEED_SMALL_DEBRIS 200 // maximum velocity of small debris piece
#define MAX_SPEED_BIG_DEBRIS 150 // maximum velocity of big debris piece
#define MAX_SPEED_CAPITAL_DEBRIS 100 // maximum velocity of capital debris piece
#define DEBRIS_SPEED_DEBUG
//#define DEBRIS_SPEED_DEBUG
// ---------------------------------------------------------------------------------------
// debris_start_death_roll()
@@ -345,13 +392,14 @@ static void debris_start_death_roll(object *debris_obj, debris *debris_p)
{
if (debris_p->is_hull) {
// tell everyone else to blow up the piece of debris
#ifndef NO_NETWORK
if( MULTIPLAYER_MASTER )
send_debris_update_packet(debris_obj,DEBRIS_UPDATE_NUKE);
#endif
int fireball_type = FIREBALL_EXPLOSION_LARGE1 + rand()%FIREBALL_NUM_LARGE_EXPLOSIONS;
fireball_create( &debris_obj->pos, fireball_type, OBJ_INDEX(debris_obj), debris_obj->radius*1.75f);
int fireball_type = fireball_ship_explosion_type(&Ship_info[debris_p->ship_info_index]);
if(fireball_type < 0) {
fireball_type = FIREBALL_EXPLOSION_LARGE1 + rand()%FIREBALL_NUM_LARGE_EXPLOSIONS;
}
fireball_create( &debris_obj->pos, fireball_type, FIREBALL_LARGE_EXPLOSION, OBJ_INDEX(debris_obj), debris_obj->radius*1.75f);
// only play debris destroy sound if hull piece and it has been around for at least 2 seconds
if ( Missiontime > debris_p->time_started + 2*F1_0 ) {
@@ -395,7 +443,7 @@ void debris_init()
// Page in debris bitmaps at level load
void debris_page_in()
{
int i;
uint i;
Debris_model = model_load( NOX("debris01.pof"), 0, NULL );
if (Debris_model >= 0) {
@@ -406,19 +454,25 @@ void debris_page_in()
Debris_vaporize_model = model_load( NOX("debris02.pof"), 0, NULL );
for (i=0; i<True_NumSpecies; i++ ) {
nprintf(( "Paging", "Paging in debris texture '%s'\n", Debris_texture_files[i] ));
Debris_textures[i] = bm_load( Debris_texture_files[i] );
if ( Debris_textures[i] < 0 ) {
Warning( LOCATION, "Couldn't load species %d debris\ntexture, '%s'\n", i, Debris_texture_files[i] );
for (i=0; i<Species_info.size(); i++ )
{
species_info *species = &Species_info[i];
nprintf(( "Paging", "Paging in debris texture '%s'\n", species->debris_texture.filename));
species->debris_texture.bitmap_id = bm_load(species->debris_texture.filename);
if (species->debris_texture.bitmap_id < 0)
{
Warning( LOCATION, "Couldn't load species %s debris\ntexture, '%s'\n", species->species_name, species->debris_texture.filename);
}
bm_page_in_texture( Debris_textures[i] );
bm_page_in_texture(species->debris_texture.bitmap_id);
}
}
MONITOR(NumSmallDebrisRend);
MONITOR(NumHullDebrisRend);
MONITOR(NumSmallDebrisRend)
MONITOR(NumHullDebrisRend)
// ---------------------------------------------------------------------------------------
// debris_render()
@@ -435,19 +489,23 @@ void debris_render(object * obj)
pm = NULL;
num = obj->instance;
Assert(num >= 0 && num < MAX_DEBRIS_PIECES );
Assert(num >= 0 && num < MAX_DEBRIS_PIECES);
db = &Debris[num];
Assert( db->flags & DEBRIS_USED );
Assert(db->flags & DEBRIS_USED);
texture_info *tbase = NULL;
// Swap in a different texture depending on the species
if ( (db->species > -1) && (db->species < MAX_SPECIES) ) {
if (db->species >= 0)
{
pm = model_get( db->model_num );
if ( pm && (pm->n_textures == 1) ) {
swapped = pm->textures[0];
pm->textures[0] = Debris_textures[db->species];
//WMC - Someday, we should have glowing debris.
if ( pm != NULL && (pm->n_textures == 1) ) {
tbase = &pm->maps[0].textures[TM_BASE_TYPE];
swapped = tbase->GetTexture();
tbase->SetTexture(Species_info[db->species].debris_texture.bitmap_id);
}
}
@@ -470,8 +528,8 @@ void debris_render(object * obj)
submodel_render( db->model_num, db->submodel_num, &obj->orient, &obj->pos, MR_NO_LIGHTING );
}
if ((swapped!=-1) && pm) {
pm->textures[0] = swapped;
if (tbase != NULL && (swapped!=-1) && pm) {
tbase->SetTexture(swapped);
}
}
@@ -520,7 +578,7 @@ void maybe_delete_debris(debris *db)
{
object *objp;
if (timestamp_elapsed(db->next_distance_check)) {
if (timestamp_elapsed(db->next_distance_check) && timestamp_elapsed(db->must_survive_until)) {
if (!(Game_mode & GM_MULTIPLAYER)) { // In single player game, just check against player.
if (vm_vec_dist_quick(&Player_obj->pos, &Objects[db->objnum].pos) > MAX_DEBRIS_DIST)
db->lifeleft = 0.1f;
@@ -546,8 +604,8 @@ void debris_process_pre( object *objp, float frame_time)
{
}
MONITOR(NumSmallDebris);
MONITOR(NumHullDebris);
MONITOR(NumSmallDebris)
MONITOR(NumHullDebris)
// ---------------------------------------------------------------------------------------
// debris_process_post()
@@ -572,9 +630,7 @@ void debris_process_post(object * obj, float frame_time)
radar_plot_object( obj );
if ( timestamp_elapsed(db->sound_delay) ) {
#ifndef NO_SOUND
obj_snd_assign(objnum, SND_DEBRIS, &vmd_zero_vector, 0);
#endif
db->sound_delay = 0;
}
} else {
@@ -739,12 +795,15 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
debris *db;
polymodel *pm;
int vaporize;
physics_info *pi = NULL;
ship_info *sip = NULL;
parent_objnum = OBJ_INDEX(source_obj);
Assert( (source_obj->type == OBJ_SHIP ) || (source_obj->type == OBJ_GHOST));
Assert( source_obj->instance >= 0 && source_obj->instance < MAX_SHIPS );
shipp = &Ships[source_obj->instance];
sip = &Ship_info[shipp->ship_info_index];
vaporize = (shipp->flags &SF_VAPORIZE);
if ( !hull_flag ) {
@@ -772,21 +831,57 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
break;
}
if ( n == MAX_DEBRIS_PIECES ) {
if (n == MAX_DEBRIS_PIECES) {
n = debris_find_oldest();
if (n >= 0)
debris_start_death_roll(&Objects[Debris[n].objnum], &Debris[n]);
nprintf(("Warning","Frame %i: Could not create debris, no more slots left\n", Framecount));
return NULL;
}
db = &Debris[n];
// Create Debris piece n!
if ( hull_flag ) {
if (rand() < RAND_MAX/6) // Make some pieces blow up shortly after explosion.
db->lifeleft = 2.0f * ((float) myrand()/(float) RAND_MAX) + 0.5f;
else
db->lifeleft = -1.0f; // large hull pieces stay around forever
} else {
db->lifeleft = (i2fl(myrand())/i2fl(RAND_MAX))*2.0f+0.1f;
//WMC - We must survive until now, at least.
db->must_survive_until = timestamp();
if(hull_flag && sip->debris_min_lifetime >= 0.0f && sip->debris_max_lifetime >= 0.0f)
{
db->lifeleft = (( sip->debris_max_lifetime - sip->debris_min_lifetime ) * frand()) + sip->debris_min_lifetime;
}
else
{
// Create Debris piece n!
if ( hull_flag ) {
if (rand() < RAND_MAX/6) // Make some pieces blow up shortly after explosion.
db->lifeleft = 2.0f * ((float) myrand()/(float) RAND_MAX) + 0.5f;
else
db->lifeleft = -1.0f; // large hull pieces stay around forever
} else {
db->lifeleft = (i2fl(myrand())/i2fl(RAND_MAX))*2.0f+0.1f;
}
}
//WMC - Oh noes, we may need to change lifeleft
if(hull_flag)
{
if(sip->debris_min_lifetime >= 0.0f && sip->debris_max_lifetime >= 0.0f)
{
db->must_survive_until = timestamp(fl2i(sip->debris_min_lifetime * 1000.0f));
db->lifeleft = (( sip->debris_max_lifetime - sip->debris_min_lifetime ) * frand()) + sip->debris_min_lifetime;
}
else if(sip->debris_min_lifetime >= 0.0f)
{
db->must_survive_until = timestamp(fl2i(sip->debris_min_lifetime * 1000.0f));
if(db->lifeleft < sip->debris_min_lifetime)
db->lifeleft = sip->debris_min_lifetime;
}
else if(sip->debris_max_lifetime >= 0.0f)
{
if(db->lifeleft > sip->debris_max_lifetime)
db->lifeleft = sip->debris_max_lifetime;
}
}
// increase lifetime for vaporized debris
@@ -803,6 +898,7 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
db->time_started = Missiontime;
db->species = Ship_info[shipp->ship_info_index].species;
db->next_distance_check = (myrand() % 2000) + 4*DEBRIS_DISTANCE_CHECK_TIME;
db->parent_alt_name = shipp->alt_type_index;
for (i=0; i<MAX_DEBRIS_ARCS; i++ ) {
db->arc_timestamp[i] = timestamp(-1);
@@ -811,7 +907,7 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
if ( db->is_hull ) {
// Only make 1/2 of the pieces have arcs
if ( myrand() < RAND_MAX*2/3 ) {
if ( myrand() < RAND_MAX_2 ) {
db->arc_frequency = 1000;
} else {
db->arc_frequency = 0;
@@ -850,15 +946,15 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
db->objnum = objnum;
obj = &Objects[objnum];
pi = &obj->phys_info;
// assign the network signature. The signature will be 0 for non-hull pieces, but since that
// is our invalid signature, it should be okay.
obj->net_signature = 0;
#ifndef NO_NETWORK
if ( (Game_mode & GM_MULTIPLAYER) && hull_flag ) {
obj->net_signature = multi_get_next_network_signature( MULTI_SIG_DEBRIS );
}
#endif
// -- No long need shield: bset_shield_strength(obj, 100.0f); // Hey! Set to some meaningful value!
@@ -932,31 +1028,6 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
vm_vec_add (&obj->phys_info.vel, &radial_vel, &source_obj->phys_info.vel);
vm_vec_add2(&obj->phys_info.vel, &vel_from_rotvel);
#ifdef DEBRIS_SPEED_DEBUG
// check that debris is not created with too high a velocity
if (hull_flag) {
int ship_info_flag = Ship_info[Ships[source_obj->instance].ship_info_index].flags;
if (ship_info_flag & (SIF_SMALL_SHIP | SIF_NOT_FLYABLE | SIF_HARMLESS)) {
if (vm_vec_mag_squared(&obj->phys_info.vel) > MAX_SPEED_SMALL_DEBRIS*MAX_SPEED_SMALL_DEBRIS) {
float scale = MAX_SPEED_SMALL_DEBRIS / vm_vec_mag(&obj->phys_info.vel);
vm_vec_scale(&obj->phys_info.vel, scale);
}
} else if (ship_info_flag & SIF_BIG_SHIP) {
if (vm_vec_mag_squared(&obj->phys_info.vel) > MAX_SPEED_BIG_DEBRIS*MAX_SPEED_BIG_DEBRIS) {
float scale = MAX_SPEED_BIG_DEBRIS / vm_vec_mag(&obj->phys_info.vel);
vm_vec_scale(&obj->phys_info.vel, scale);
}
} else if (ship_info_flag & SIF_HUGE_SHIP) {
if (vm_vec_mag_squared(&obj->phys_info.vel) > MAX_SPEED_CAPITAL_DEBRIS*MAX_SPEED_CAPITAL_DEBRIS) {
float scale = MAX_SPEED_CAPITAL_DEBRIS / vm_vec_mag(&obj->phys_info.vel);
vm_vec_scale(&obj->phys_info.vel, scale);
}
} else {
Warning(LOCATION, "Ship has info flag that is not among the following: SMALL, NOT_FLYABLE, HARMLESS, BIG, CAPITAL, SUPERCAP");
}
}
#endif
// vm_vec_scale_add(&obj->phys_info.vel, &radial_vel, &source_obj->phys_info.vel, frand()/2.0f + 0.5f);
// nprintf(("Andsager","object vel from rotvel: %0.2f, %0.2f, %0.2f\n",vel_from_rotvel.x, vel_from_rotvel.y, vel_from_rotvel.z));
@@ -970,26 +1041,31 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vec3d
vm_vec_rand_vec_quick(&rotvel);
vm_vec_scale(&rotvel, scale);
obj->phys_info.flags |= PF_DEAD_DAMP;
obj->phys_info.rotvel = rotvel;
pi->flags |= PF_DEAD_DAMP;
pi->rotvel = rotvel;
check_rotvel_limit( &obj->phys_info );
// check that debris is not created with too high a velocity
if (hull_flag)
{
shipfx_debris_limit_speed(db, shipp);
}
// blow out his reverse thrusters. Or drag, same thing.
obj->phys_info.rotdamp = 10000.0f;
obj->phys_info.side_slip_time_const = 10000.0f;
obj->phys_info.flags |= (PF_REDUCED_DAMP | PF_DEAD_DAMP); // set damping equal for all axis and not changable
pi->rotdamp = 10000.0f;
pi->side_slip_time_const = 10000.0f;
pi->flags |= (PF_REDUCED_DAMP | PF_DEAD_DAMP); // set damping equal for all axis and not changable
vm_vec_zero(&obj->phys_info.max_vel); // make so he can't turn on his own VOLITION anymore.
vm_vec_zero(&obj->phys_info.max_rotvel); // make so he can't change speed on his own VOLITION anymore.
vm_vec_zero(&pi->max_vel); // make so he can't turn on his own VOLITION anymore.
vm_vec_zero(&pi->max_rotvel); // make so he can't change speed on his own VOLITION anymore.
// ensure vel is valid
Assert( !vm_is_vec_nan(&obj->phys_info.vel) );
// if ( hull_flag ) {
// vm_vec_zero(&obj->phys_info.vel);
// vm_vec_zero(&obj->phys_info.rotvel);
// vm_vec_zero(&pi->vel);
// vm_vec_zero(&pi->rotvel);
// }
return obj;
@@ -1033,12 +1109,10 @@ void debris_hit(object *debris_obj, object *other_obj, vec3d *hitpos, float dama
particle_emit( &pe, PARTICLE_FIRE, 0 );
}
#ifndef NO_NETWORK
// multiplayer clients bail here
if(MULTIPLAYER_CLIENT){
return;
}
#endif
if ( damage < 0.0f ) {
damage = 0.0f;
@@ -1050,11 +1124,9 @@ void debris_hit(object *debris_obj, object *other_obj, vec3d *hitpos, float dama
debris_start_death_roll(debris_obj, debris_p );
} else {
// otherwise, give all the other players an update on the debris
#ifndef NO_NETWORK
if(MULTIPLAYER_MASTER){
send_debris_update_packet(debris_obj,DEBRIS_UPDATE_UPDATE);
}
#endif
}
}
@@ -1065,8 +1137,6 @@ void debris_hit(object *debris_obj, object *other_obj, vec3d *hitpos, float dama
// NOTE: debris_hit_info pointer NULL for debris:weapon collision, otherwise debris:ship collision.
// Return true if hit, else return false.
//
#pragma warning ( push )
#pragma warning ( disable : 4701 ) // possible use of variable without initialization
int debris_check_collision(object *pdebris, object *other_obj, vec3d *hitpos, collision_info_struct *debris_hit_info)
{
mc_info mc;
@@ -1138,7 +1208,7 @@ int debris_check_collision(object *pdebris, object *other_obj, vec3d *hitpos, co
int mc_ret_val = 0;
if ( debris_hit_info->heavy == ship_obj ) { // ship is heavier, so debris is sphere. Check sphere collision against ship poly model
mc.model_num = Ships[ship_obj->instance].modelnum; // Fill in the model to check
mc.model_num = Ship_info[Ships[ship_obj->instance].ship_info_index].model_num; // Fill in the model to check
mc.orient = &ship_obj->orient; // The object's orient
mc.radius = pdebris->radius;
mc.flags = (MC_CHECK_MODEL | MC_CHECK_SPHERELINE);
@@ -1169,7 +1239,7 @@ int debris_check_collision(object *pdebris, object *other_obj, vec3d *hitpos, co
model_get_rotating_submodel_list(submodel_list, &num_rotating_submodels, heavy_obj);
// Get polymodel and turn off all rotating submodels, collide against only 1 at a time.
pm = model_get(Ships[heavy_obj->instance].modelnum);
pm = model_get(Ship_info[Ships[heavy_obj->instance].ship_info_index].model_num);
// turn off all rotating submodels and test for collision
int i;
@@ -1264,7 +1334,7 @@ int debris_check_collision(object *pdebris, object *other_obj, vec3d *hitpos, co
mc.submodel_num = Debris[num].submodel_num;
model_clear_instance( mc.model_num );
mc.orient = &pdebris->orient; // The object's orient
mc.radius = model_get_core_radius( Ships[ship_obj->instance].modelnum );
mc.radius = model_get_core_radius(Ship_info[Ships[ship_obj->instance].ship_info_index].model_num);
// check for collision between debris model and ship sphere
mc.flags = (MC_CHECK_MODEL | MC_SUBMODEL | MC_CHECK_SPHERELINE);
@@ -1314,8 +1384,6 @@ int debris_check_collision(object *pdebris, object *other_obj, vec3d *hitpos, co
return 0;
}
}
#pragma warning ( pop )
// ---------------------------------------------------------------------------------------
// debris_get_team()
@@ -1353,5 +1421,3 @@ void calc_debris_physics_properties( physics_info *pi, vec3d *mins, vec3d *maxs
pi->I_body_inv.vec.fvec.xyz.y = 0.0f;
pi->I_body_inv.vec.fvec.xyz.z = 12.0f / (pi->mass * (dx*dx + dy*dy));
}
@@ -173,6 +173,7 @@ typedef struct debris {
int team; // Team of the ship where the debris came from
int objnum; // What object this is linked to
float lifeleft; // When 0 or less object dies
int must_survive_until; //WMC - timestamp of earliest point that it can be murthered.
int model_num; // What model this uses
int submodel_num; // What submodel this uses
int next_fireball; // When to start a fireball
@@ -186,6 +187,7 @@ typedef struct debris {
vec3d arc_pts[MAX_DEBRIS_ARCS][2]; // The endpoints of each arc
int arc_timestamp[MAX_DEBRIS_ARCS]; // When this times out, the spark goes away. -1 is not used
int arc_frequency; // Starts at 0, gets bigger
char parent_alt_name;
} debris;
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/DebugConsole/Console.cpp $
* $Revision: 2.6 $
* $Date: 2005-04-25 00:07:22 $
* $Author: wmcoolmon $
* $Revision: 2.6.2.2 $
* $Date: 2007-02-18 21:26:52 $
* $Author: Goober5000 $
*
* Routines for managing the debug console window.
*
* $Log: not supported by cvs2svn $
* Revision 2.6.2.1 2006/09/08 06:14:43 taylor
* fix things that strict compiling balked at (from compiling with -ansi and -pedantic)
*
* Revision 2.6 2005/04/25 00:07:22 wmcoolmon
* Bumped console printing buffer size so people can play with the neb2 command
*
* Revision 2.5 2004/07/26 20:47:27 Kazan
* remove MCD complete
*
@@ -213,11 +219,11 @@ int command_scroll = 0;
///=========================== SCANNER =======================
typedef enum {
LETTER, QUOTE, SPECIAL, EOF_CODE, DIGIT,
LETTER, QUOTE, SPECIAL, EOF_CODE, DIGIT
} CHAR_CODE;
typedef enum {
NO_TOKEN, IDENTIFIER, NUMBER, STRING,
NO_TOKEN, IDENTIFIER, NUMBER, STRING
} TOKEN_CODE;
@@ -476,6 +482,11 @@ void debug_do_command(char * command)
dc_get_arg( ARG_ANY );
}
if ( !stricmp( Dc_arg, "xyzzy" ) ) {
dc_printf("Nothing happens.\n");
return;
}
if ( !strcmp( Dc_arg, "?" ) ) {
mode = 1;
dc_get_arg( ARG_ANY );
@@ -1,3 +1,6 @@
#include "dbugfile.h"
#include "globalincs/pstypes.h"
#ifdef _WIN32
#include <windows.h>
#endif
@@ -7,11 +10,6 @@
#include <sys/types.h>
#include <sys/timeb.h>
#include "dbugfile.h"
#pragma warning(disable:4711) // function selected for inlining
int dbugfile_counters[MAX_COUNTERS];
bool dbugfile_init_var = false;
File renamed without changes.
@@ -1,5 +1,5 @@
/*
* Code created by Thomas Whittaker (RT) for a Freespace 2 source code project
* Code created by Thomas Whittaker (RT) for a FreeSpace 2 source code project
*
* You may not sell or otherwise commercially exploit the source or things you
* created based on the source.
@@ -1,5 +1,5 @@
/*
* Code created by Thomas Whittaker (RT) for a Freespace 2 source code project
* Code created by Thomas Whittaker (RT) for a FreeSpace 2 source code project
*
* You may not sell or otherwise commercially exploit the source or things you
* created based on the source.
@@ -8,11 +8,15 @@
/*
* $Logfile: /Freespace2/code/debugconsole/timerbar.h $
* $Revision: 1.10 $
* $Date: 2005-07-13 02:50:50 $
* $Revision: 1.11 $
* $Date: 2006-04-20 06:32:00 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 1.10 2005/07/13 02:50:50 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 1.9 2004/08/11 05:06:20 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
@@ -37,7 +37,7 @@ of the management functions it is never used directly)
polygon mamagement is on the other hand signifigant enough to warent it's own section.
Low Level Polygon Management
initaly I thought of useing a similar simple lookup system as thedecal management, but the
initially I thought of useing a similar simple lookup system as thedecal management, but the
lookup of polygons is both more frequent (about a dozen times per created decal) and more
intinsive (there are MAX_GLOBAL_DECAL_POLYS to sort through, at the time of documentation
this was defined as _11000_ !). I had to devise something a bit more clever. the big_ol_decal_poly_array
@@ -128,6 +128,7 @@ texture for the list is set, then a call is made to render the vertex buffer.
*/
#ifdef ENABLE_DECALS
#include "object/object.h"
#include "globalincs/linklist.h"
@@ -1696,6 +1697,12 @@ void decal_create_tmappoly(ubyte * p)
nv = dw(p+36);
if ( nv < 0 ) return;
if ( nv > TMAP_MAX_VERTS ) {
Int3();
return;
}
//TIMERBAR_PUSH(TIMERBAR_WHITE);
verts = (model_tmap_vert *)(p+44);
@@ -2222,3 +2229,4 @@ check_poly_decals();
*/
}
#endif // ENABLE_DECALS
@@ -4,8 +4,11 @@
#ifndef _DECAL_H
#define _DECAL_H
#include "object/object.h"
#include "globalincs/pstypes.h"
//#include "ship/ship.h"
#ifdef ENABLE_DECALS
#define MAX_DECAL_POLY 40
#define MAX_DECAL_POLY_POINT 10
@@ -17,9 +20,6 @@
#define QUICKFIND_SEGMENT_LENGTH (MAX_GLOBAL_DECAL_POLYS/QUICKFIND_SUBDIVISION)
#define MAX_GLOBAL_DECALS 5000
#include "globalincs/pstypes.h"
//#include "ship/ship.h"
#define DP_EOF 0
#define DP_DEFPOINTS 1
#define DP_FLATPOLY 2
@@ -27,6 +27,8 @@
#define DP_SORTNORM 4
#define DP_BOUNDBOX 5
#endif // ENABLE_DECALS
struct decal;
struct decal_list;
struct decal_list_controle;
@@ -95,6 +97,8 @@ struct decal_point{
float radius;
};
#ifdef ENABLE_DECALS
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000);//makes the decal
int decal_create_simple(object * obj, decal_point *point, int texture);//makes a simple non-clipped decal
@@ -105,4 +109,21 @@ int decal_create_sub(void *model_ptr);
void clear_decals(decal_system *system);
#endif
void init_decals();
#else // ENABLE_DECALS
inline int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000)
{
return 0;
}
#define decal_create_simple(a, b, c) (0)
#define decal_render_all(a)
#define decal_create_sub(a) (0);
#define clear_decals(a)
#define init_decals()
#endif // ENABLE_DECALS
#endif // _DECAL_H
@@ -9,12 +9,16 @@
/*
* $Logfile: /Freespace2/code/Demo/Demo.cpp $
* $Revision: 2.8 $
* $Date: 2005-05-12 17:49:11 $
* $Author: taylor $
* $Revision: 2.8.2.1 $
* $Date: 2007-09-02 18:52:50 $
* $Author: Goober5000 $
*
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2005/05/12 17:49:11 taylor
* use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
* fixes various problems and is past time to make the switch
*
* Revision 2.7 2005/04/05 05:53:15 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -1001,7 +1005,7 @@ int demo_playback_seek_sub(int frame_size)
ship_index = ship_get_by_signature(obj_sig);
if(ship_index >= 0){
Ships[ship_index].flags = ship_flags;
ship_departed(ship_index);
ship_actually_depart(ship_index);
}
}
break;
File renamed without changes.
@@ -1,3 +1,4 @@
#include <windows.h>
#include <dshow.h>
#include <stdio.h>
@@ -17,9 +18,9 @@ enum PLAYSTATE {Stopped, Paused, Running, Init};
void Msg(TCHAR *szFormat, ...);
// Local
HRESULT InitPlayerWindow(HWND ghApp);
//HRESULT InitPlayerWindow(HWND ghApp);
HRESULT InitVideoWindow(HWND ghApp, long w, long h);
bool HandleGraphEvent(void);
//bool HandleGraphEvent(void);
void CheckVisibility(void);
void CloseInterfaces(void);
@@ -58,7 +59,7 @@ char *ParseDShowError(HRESULT hr)
//
BOOL g_bAudioOnly=FALSE;
LONG g_lVolume=VOLUME_FULL;
DWORD g_dwGraphRegister=0;
//DWORD g_dwGraphRegister=0;
PLAYSTATE g_psCurrent=Stopped;
// DirectShow interfaces
@@ -71,10 +72,11 @@ IBasicVideo *pBV = NULL;
IMediaSeeking *pMS = NULL;
IMediaPosition *pMP = NULL;
/*
void PassMsgToVideoWindow(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (pVW)
pVW->NotifyOwnerMessage((long) hWnd, message, wParam, lParam);
if (pVW)
pVW->NotifyOwnerMessage((long) hWnd, message, wParam, lParam);
}
void SetCurrentState(PLAYSTATE state)
@@ -91,6 +93,7 @@ BOOL IsAudioOnly()
{
return g_bAudioOnly;
}
*/
HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
{
@@ -113,6 +116,9 @@ HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
{
HRESULT load_attempt = pGB->RenderFile(wFile, NULL);
// f%#$ing DivX6...
// SetForegroundWindow(ghApp);
// Have the graph builder construct its the appropriate graph automatically
if(FAILED(load_attempt))
{
@@ -142,13 +148,15 @@ HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
pBV->get_VideoWidth(&width);
pBV->get_VideoHeight(&height);
JIF(InitVideoWindow(ghApp,width, height));
// JIF(InitVideoWindow(ghApp,width, height));
if (!g_bAudioOnly)
{
JIF(pVW->put_Owner((OAHWND)ghApp));
JIF(pVW->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE));
JIF(InitVideoWindow(ghApp, width, height));
JIF(pVW->SetWindowForeground(OATRUE));
JIF(pVW->put_MessageDrain((OAHWND)ghApp));
}
// Run the graph to play the media file
@@ -279,23 +287,25 @@ void CloseClip(HWND ghApp)
void CloseInterfaces(void)
{
// Relinquish ownership (IMPORTANT!) after hiding video window
if(pVW)
pVW->put_Visible(OAFALSE);
// Relinquish ownership (IMPORTANT!) after hiding video window
if (pVW) {
pVW->put_Visible(OAFALSE);
pVW->put_Owner(NULL);
}
// Disable event callbacks
if (pME)
pME->SetNotifyWindow((OAHWND)NULL, 0, 0);
if (pME)
pME->SetNotifyWindow((OAHWND)NULL, 0, 0);
// Release and zero DirectShow interfaces
SAFE_RELEASE(pME);
SAFE_RELEASE(pMS);
SAFE_RELEASE(pMP);
SAFE_RELEASE(pMC);
SAFE_RELEASE(pBA);
SAFE_RELEASE(pBV);
SAFE_RELEASE(pVW);
SAFE_RELEASE(pGB);
SAFE_RELEASE(pME);
SAFE_RELEASE(pMS);
SAFE_RELEASE(pMP);
SAFE_RELEASE(pMC);
SAFE_RELEASE(pBA);
SAFE_RELEASE(pBV);
SAFE_RELEASE(pVW);
SAFE_RELEASE(pGB);
}
void Msg(TCHAR *szFormat, ...)
@@ -338,4 +348,3 @@ bool dx8show_stream_movie(void)
return false;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,13 +9,24 @@
/*
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.cpp $
* $Revision: 2.8 $
* $Date: 2005-01-31 23:27:52 $
* $Revision: 2.10.2.1 $
* $Date: 2006-11-15 00:26:03 $
* $Author: taylor $
*
* Main file for dealing with exception handling
*
* $Log: not supported by cvs2svn $
* Revision 2.10 2006/01/26 03:23:29 Goober5000
* pare down the pragmas some more
* --Goober5000
*
* Revision 2.9 2006/01/20 07:10:33 Goober5000
* reordered #include files to quash Microsoft warnings
* --Goober5000
*
* Revision 2.8 2005/01/31 23:27:52 taylor
* merge with Linux/OSX tree - p0131-2
*
* Revision 2.7 2004/07/26 20:47:27 Kazan
* remove MCD complete
*
@@ -24,7 +35,7 @@
*
* Revision 2.5 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* to indicate which warnings were being disabled
* --Goober5000
*
* Revision 2.4 2004/03/06 23:28:22 bobboau
@@ -78,11 +89,11 @@ on how to hook it in.
#ifdef _WIN32
#include "globalincs/pstypes.h"
#include <windows.h>
#pragma warning(disable:4711) // function selected for inlining
// --------------------
//
// Defines
@@ -551,7 +562,10 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
}
#endif
#ifndef NDEBUG
if (safe_string[0])
hprintf(LogFile, "Last safe point: %s\r\n", safe_string);
#endif
RecordModuleList(LogFile);
@@ -559,7 +573,6 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
// Return the magic value which tells Win32 that this handler didn't
// actually handle the exception - so that things will proceed as per
// normal.
if(safe_string[0])hprintf(LogFile, "\nlast safe point \n%s\n",safe_string);
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -9,13 +9,56 @@
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.cpp $
* $Revision: 2.26 $
* $Date: 2005-04-05 05:53:15 $
* $Author: taylor $
* $Revision: 2.33.2.4 $
* $Date: 2007-09-02 02:07:39 $
* $Author: Goober5000 $
*
* Code to move, render and otherwise deal with fireballs.
*
* $Log: not supported by cvs2svn $
* Revision 2.33.2.3 2007/07/28 21:31:04 Goober5000
* this should really be capitalized
*
* Revision 2.33.2.2 2007/02/11 09:53:33 taylor
* support for tbl specified fireball explosion color ("$Light color:")
*
* Revision 2.33.2.1 2006/09/11 01:12:50 taylor
* fixes for stuff_string() bounds checking
* stict compiler build fixes
*
* Revision 2.33 2006/02/25 21:46:59 Goober5000
* spelling
*
* Revision 2.32 2006/02/13 00:20:45 Goober5000
* more tweaks, plus clarification of checks for the existence of files
* --Goober5000
*
* Revision 2.31 2006/01/20 07:10:33 Goober5000
* reordered #include files to quash Microsoft warnings
* --Goober5000
*
* Revision 2.30 2005/12/29 08:08:33 wmcoolmon
* Codebase commit, most notably including objecttypes.tbl
*
* Revision 2.29 2005/12/28 22:17:01 taylor
* deal with cf_find_file_location() changes
* add a central parse_modular_table() function which anything can use
* fix up weapon_expl so that it can properly handle modular tables and LOD count changes
* add support for for a fireball TBM (handled a little different than a normal TBM is since it only changes rather than adds)
*
* Revision 2.28 2005/12/01 07:45:21 Goober5000
* bypass annoying warnings when loading optional models
* --Goober5000
*
* Revision 2.27 2005/10/20 17:50:00 taylor
* fix player warpout
* basic code cleanup (that previous braces change did nothing for readability)
* spell "plyr" correctly
* tweak warp shrink time to better match WMC's other changes and avoid the skipping during shrink
*
* Revision 2.26 2005/04/05 05:53:15 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
* Revision 2.25 2005/03/19 18:02:33 bobboau
* added new graphic functions for state blocks
* also added a class formanageing a new effect
@@ -116,7 +159,7 @@
* --Goober5000
*
* Revision 2.3 2002/12/07 01:37:41 bobboau
* inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
* initial decals code, if you are worried a bug is being caused by the decals code it's only references are in,
* collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
* it needs a better renderer, but is in prety good shape for now,
* I also (think) I squashed a bug in the warpmodel code
@@ -435,8 +478,6 @@
* $NoKeywords: $
*/
#include <stdlib.h>
#include "fireball/fireballs.h"
#include "graphics/tmapper.h"
#include "render/3d.h"
@@ -447,12 +488,21 @@
#include "localization/localize.h"
#include "cmdline/cmdline.h"
#include "parse/parselo.h"
#include "globalincs/pstypes.h"
#include <stdlib.h>
#include <vector>
// make use of the LOD checker for tbl/tbm parsing (from weapons.cpp)
extern std::vector<lod_checker> LOD_checker;
static std::vector<color> LOD_color;
int Warp_model;
int Knossos_warp_ani_used;
#define WARPHOLE_GROW_TIME (2.5f) // time for warphole to reach max size (also time to shrink to nothing once it begins to shrink)
#define WARPHOLE_GROW_TIME (2.35f) // time for warphole to reach max size (also time to shrink to nothing once it begins to shrink)
#define MAX_FIREBALL_LOD 4
@@ -464,8 +514,12 @@ fireball Fireballs[MAX_FIREBALLS];
fireball_info Fireball_info[MAX_FIREBALL_TYPES];
int fireball_used[MAX_FIREBALL_TYPES];
int Num_fireballs = 0;
int Num_fireball_types = 0;
int fireballs_inited = 0;
int Warp_glow_bitmap = -1;
@@ -488,7 +542,9 @@ void fireball_play_warphole_open_sound(int ship_class, fireball *fb)
sound_index = SND_WARP_IN;
if((ship_class >= 0) && (ship_class < Num_ship_types)){
if(fb->warp_open_sound_index > -1) {
sound_index = fb->warp_open_sound_index;
} else if((ship_class >= 0) && (ship_class < Num_ship_classes)){
if ( Ship_info[ship_class].flags & SIF_HUGE_SHIP ) {
sound_index = SND_CAPITAL_WARP_IN;
fb->flags |= FBF_WARP_CAPITAL_SIZE;
@@ -497,10 +553,6 @@ void fireball_play_warphole_open_sound(int ship_class, fireball *fb)
fb->flags |= FBF_WARP_CRUISER_SIZE;
}
}
else
{
sound_index = fb->warp_open_sound_index;
}
snd_play_3d(&Snds[sound_index], &fireball_objp->pos, &Eye_position, fireball_objp->radius, NULL, 0, 1.0f, SND_PRIORITY_DOUBLE_INSTANCE, NULL, range_multiplier); // play warp sound effect
}
@@ -516,10 +568,10 @@ void fireball_play_warphole_close_sound(fireball *fb)
sound_index = SND_WARP_OUT;
if ( fb->flags & FBF_WARP_CAPITAL_SIZE ) {
sound_index = SND_CAPITAL_WARP_OUT;
} else if ( fb->flags & FBF_WARP_VIA_SEXP ) {
if ( fb->warp_close_sound_index > -1 ) {
sound_index = fb->warp_close_sound_index;
} else if ( fb->flags & FBF_WARP_CAPITAL_SIZE ) {
sound_index = SND_CAPITAL_WARP_OUT;
} else {
// AL 27-3-98: Decided that warphole closing is only required for capital ship sized warp effects.
return;
@@ -528,69 +580,204 @@ void fireball_play_warphole_close_sound(fireball *fb)
snd_play_3d(&Snds[sound_index], &fireball_objp->pos, &Eye_position, fireball_objp->radius); // play warp sound effect
}
void fireball_parse_tbl()
// set default colors for each explosion type (original values from object.cpp)
static void fireball_set_default_color(int idx)
{
int rval, idx;
char base_filename[256] = "";
Assert( (idx >= 0) && (idx < MAX_FIREBALL_TYPES) );
switch (idx)
{
case FIREBALL_EXPLOSION_LARGE1:
case FIREBALL_EXPLOSION_LARGE2:
case FIREBALL_EXPLOSION_MEDIUM:
case FIREBALL_ASTEROID:
Fireball_info[idx].exp_color[0] = 1.0f;
Fireball_info[idx].exp_color[1] = 0.5f;
Fireball_info[idx].exp_color[2] = 0.125f;
break;
case FIREBALL_WARP:
Fireball_info[idx].exp_color[0] = 0.75f;
Fireball_info[idx].exp_color[1] = 0.75f;
Fireball_info[idx].exp_color[2] = 1.0f;
break;
case FIREBALL_KNOSSOS:
Fireball_info[idx].exp_color[0] = 0.75f;
Fireball_info[idx].exp_color[1] = 1.0f;
Fireball_info[idx].exp_color[2] = 0.75f;
break;
default:
Fireball_info[idx].exp_color[0] = 1.0f;
Fireball_info[idx].exp_color[1] = 1.0f;
Fireball_info[idx].exp_color[2] = 1.0f;
break;
}
}
// NOTE: we can't be too trusting here so a tbm will only modify the LOD count, not add an entry
void parse_fireball_tbl(char *filename)
{
int rval;
lod_checker lod_check;
color fb_color;
// open localization
lcl_ext_open();
if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Unable to parse fireball.tbl! Code = %i.\n", rval);
}
else {
read_file_text(NOX("fireball.tbl"));
reset_parse();
mprintf(("TABLES: Unable to parse '%s'! Error code = %i.\n", filename, rval));
lcl_ext_close();
return;
}
int ntypes = 0;
read_file_text(filename, CF_TYPE_TABLES);
reset_parse();
required_string("#Start");
while (required_string_either("#End","$Name:")) {
Assert( ntypes < MAX_FIREBALL_TYPES);
while (required_string_either("#End", "$Name:")) {
memset( &lod_check, 0, sizeof(lod_checker) );
// base filename
required_string("$Name:");
stuff_string(base_filename, F_NAME, NULL);
stuff_string(lod_check.filename, F_NAME, MAX_FILENAME_LEN);
// # of lod levels - make sure old fireball.tbl is compatible
Fireball_info[ntypes].lod_count = 1;
if(optional_string("$LOD:")){
stuff_int(&Fireball_info[ntypes].lod_count);
}
lod_check.override = -1;
// stuff default filename
strcpy(Fireball_info[ntypes].lod[0].filename, base_filename);
// stuff LOD level filenames
for(idx=1; idx<Fireball_info[ntypes].lod_count; idx++){
if(idx >= MAX_FIREBALL_LOD){
break;
// these entries should only be in TBMs, and it has to include at least one
if ( Parsing_modular_table ) {
if (optional_string("+Explosion_Medium")) {
lod_check.override = FIREBALL_EXPLOSION_MEDIUM;
} else if (optional_string("+Warp_Effect")) {
lod_check.override = FIREBALL_WARP;
} else if (optional_string("+Knossos_Effect")) {
lod_check.override = FIREBALL_KNOSSOS;
} else if (optional_string("+Asteroid")) {
lod_check.override = FIREBALL_ASTEROID;
} else if (optional_string("+Explosion_Large1")) {
lod_check.override = FIREBALL_EXPLOSION_LARGE1;
} else if (optional_string("+Explosion_Large2")){
lod_check.override = FIREBALL_EXPLOSION_LARGE2;
} else {
required_string("+Custom_Fireball");
stuff_int(&lod_check.override);
}
sprintf(Fireball_info[ntypes].lod[idx].filename, "%s_%d", base_filename, idx);
}
ntypes++;
lod_check.num_lods = 1;
// Do we have an LOD num
if (optional_string("$LOD:")) {
stuff_int(&lod_check.num_lods);
}
if (lod_check.num_lods > MAX_FIREBALL_LOD) {
lod_check.num_lods = MAX_FIREBALL_LOD;
}
// check for particular lighting color
if ( optional_string("$Light color:") ) {
int r, g, b;
stuff_int(&r);
stuff_int(&g);
stuff_int(&b);
CLAMP(r, 0, 255);
CLAMP(g, 0, 255);
CLAMP(b, 0, 255);
gr_init_color(&fb_color, r, g, b);
} else {
// to keep things simple, we just use 0 alpha to indicate that a default value should be used
memset( &fb_color, 0, sizeof(color) );
}
// we may use one filename for multiple entries so we'll have to handle dupes post parse
LOD_checker.push_back(lod_check);
LOD_color.push_back(fb_color);
}
required_string("#End");
// close localization
lcl_ext_close();
}
void fireball_parse_tbl()
{
int i, j;
memset( &Fireball_info, 0, sizeof(fireball_info) * MAX_FIREBALL_TYPES );
parse_fireball_tbl("fireball.tbl");
// look for any modular tables
parse_modular_table(NOX("*-fbl.tbm"), parse_fireball_tbl);
// we've got our list so pass it off for final checking and loading.
// we assume that entries in fireball.tbl are in the correct order
for (i = 0; i < (int)LOD_checker.size(); i++) {
if ( (i < MAX_FIREBALL_TYPES) && (LOD_checker[i].override < 0) ) {
strcpy( Fireball_info[i].lod[0].filename, LOD_checker[i].filename );
Fireball_info[i].lod_count = LOD_checker[i].num_lods;
Num_fireball_types++;
if (LOD_color[i].alpha == 255) {
Fireball_info[i].exp_color[0] = (LOD_color[i].red / 255.0f);
Fireball_info[i].exp_color[1] = (LOD_color[i].green / 255.0f);
Fireball_info[i].exp_color[2] = (LOD_color[i].blue / 255.0f);
} else {
fireball_set_default_color(i);
}
}
}
// having to do this twice is less than optimal, but less error prone too.
// this handles (and should only have to handle) TBM related entries
for (i = 0; i < (int)LOD_checker.size(); i++) {
// try entry replacement
if ( (LOD_checker[i].override >= 0) && (LOD_checker[i].override < Num_fireball_types) ) {
strcpy( Fireball_info[LOD_checker[i].override].lod[0].filename, LOD_checker[i].filename );
Fireball_info[LOD_checker[i].override].lod_count = LOD_checker[i].num_lods;
if (LOD_color[i].alpha == 255) {
Fireball_info[LOD_checker[i].override].exp_color[0] = (LOD_color[i].red / 255.0f);
Fireball_info[LOD_checker[i].override].exp_color[1] = (LOD_color[i].green / 255.0f);
Fireball_info[LOD_checker[i].override].exp_color[2] = (LOD_color[i].blue / 255.0f);
} else {
fireball_set_default_color(LOD_checker[i].override);
}
}
}
// fill in extra LOD filenames
for (i = 0; i < Num_fireball_types; i++) {
for (j = 1; j < Fireball_info[i].lod_count; j++) {
sprintf( Fireball_info[i].lod[j].filename, "%s_%d", Fireball_info[i].lod[0].filename, j);
}
}
// done
LOD_checker.clear();
}
void fireball_load_data()
{
int i, idx;
fireball_info *fd;
for ( i = 0; i < MAX_FIREBALL_TYPES; i++ ) {
for ( i = 0; i < Num_fireball_types; i++ ) {
fd = &Fireball_info[i];
for(idx=0; idx<fd->lod_count; idx++){
// we won't use a warp effect lod greater than MAX_WARP_LOD so don't load it either
if ( (i == FIREBALL_WARP_EFFECT) && (idx > MAX_WARP_LOD) )
if ( (i == FIREBALL_WARP) && (idx > MAX_WARP_LOD) )
continue;
fd->lod[idx].bitmap_id = bm_load_animation( fd->lod[idx].filename, &fd->lod[idx].num_frames, &fd->lod[idx].fps, 1 );
@@ -639,15 +826,19 @@ void fireball_init()
// Goober5000 - reset Knossos warp flag
Knossos_warp_ani_used = 0;
mprintf(("loading warp model"));
mprintf(("Loading warp model\n"));
Warp_model = -1;
Warp_model = model_load("warp.pof", 0, NULL, 0);
// Goober5000 - check for existence of file before trying to load it
if (cf_exists_full("warp.pof", CF_TYPE_MODELS))
{
Warp_model = model_load("warp.pof", 0, NULL, 0);
}
mprintf((" %d\n", Warp_model));
}
MONITOR( NumFireballsRend );
MONITOR( NumFireballsRend )
void fireball_render(object * obj)
{
@@ -682,29 +873,20 @@ void fireball_render(object * obj)
g3_transfer_vertex(&p, &obj->pos);
}
switch( fb->fireball_info_index ) {
case FIREBALL_EXPLOSION_MEDIUM:
switch( fb->fireball_render_type ) {
case FIREBALL_MEDIUM_EXPLOSION:
gr_set_bitmap(Fireballs[num].current_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.3f );
g3_draw_bitmap(&p, fb->orient, obj->radius, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
break;
case FIREBALL_EXPLOSION_LARGE1:
case FIREBALL_EXPLOSION_LARGE2:
// case FIREBALL_EXPLOSION_LARGE3:
/*
if (!tcache_hit(Fireballs[num].current_bitmap)) {
// if we're over 200k exp vram upload this frame, change to lower lod
}*/
case FIREBALL_ASTEROID:
case FIREBALL_LARGE_EXPLOSION:
// Make the big explosions rotate with the viewer.
gr_set_bitmap(Fireballs[num].current_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.3f );
g3_draw_rotated_bitmap(&p, (i2fl(fb->orient)*PI)/180.0f, obj->radius, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT);
break;
case FIREBALL_WARP_EFFECT:
case FIREBALL_KNOSSOS_EFFECT: {
case FIREBALL_WARP_EFFECT: {
float percent_life = fb->time_elapsed / fb->total_time;
@@ -796,7 +978,7 @@ void fireball_set_framenum(int num)
return;
}
if ( fb->fireball_info_index == FIREBALL_WARP_EFFECT || fb->fireball_info_index == FIREBALL_KNOSSOS_EFFECT ) {
if ( fb->fireball_render_type == FIREBALL_WARP_EFFECT ) {
float total_time = i2fl(fl->num_frames) / fl->fps; // in seconds
framenum = fl2i(fb->time_elapsed * fl->num_frames / total_time + 0.5);
@@ -839,10 +1021,10 @@ int fireball_is_perishable(object * obj)
fb = &Fireballs[num];
if ( fb->fireball_info_index == FIREBALL_EXPLOSION_MEDIUM )
if ( fb->fireball_render_type == FIREBALL_MEDIUM_EXPLOSION )
return 1;
if ( !((fb->fireball_info_index == FIREBALL_WARP_EFFECT) || (fb->fireball_info_index == FIREBALL_KNOSSOS_EFFECT)) ) {
if ( !(fb->fireball_render_type == FIREBALL_WARP_EFFECT) ) {
if ( !(obj->flags & OF_WAS_RENDERED)) {
return 1;
}
@@ -905,7 +1087,7 @@ int fireball_is_warp(object * obj)
fb = &Fireballs[num];
if ( fb->fireball_info_index == FIREBALL_WARP_EFFECT || fb->fireball_info_index == FIREBALL_KNOSSOS_EFFECT)
if ( fb->fireball_render_type == FIREBALL_WARP_EFFECT)
return 1;
return 0;
@@ -917,7 +1099,7 @@ void fireball_maybe_play_warp_close_sound(fireball *fb)
float life_left;
// If not a warphole fireball, do a quick out
if ( !(fb->fireball_info_index == FIREBALL_WARP_EFFECT || fb->fireball_info_index == FIREBALL_KNOSSOS_EFFECT)) {
if ( !(fb->fireball_render_type == FIREBALL_WARP_EFFECT)) {
return;
}
@@ -934,7 +1116,7 @@ void fireball_maybe_play_warp_close_sound(fireball *fb)
}
}
MONITOR( NumFireballs );
MONITOR( NumFireballs )
void fireball_process_post(object * obj, float frame_time)
{
@@ -1008,14 +1190,13 @@ int fireball_get_lod(vec3d *pos, fireball_info *fd, float size)
}
// start the frame
extern float Viewer_zoom;
extern int G3_count;
if(!G3_count){
g3_start_frame(1);
must_stop = 1;
}
g3_set_view_matrix(&Eye_position, &Eye_matrix, Viewer_zoom);
g3_set_view_matrix(&Eye_position, &Eye_matrix, Eye_fov);
// get extents of the rotated bitmap
g3_rotate_vertex(&v, pos);
@@ -1076,7 +1257,7 @@ int fireball_get_lod(vec3d *pos, fireball_info *fd, float size)
}
// Create a fireball, return object index.
int fireball_create( vec3d * pos, int fireball_type, int parent_obj, float size, int reverse, vec3d *velocity, float warp_lifetime, int ship_class, matrix *orient_override, int low_res, int extra_flags, int warp_open_sound, int warp_close_sound)
int fireball_create( vec3d * pos, int fireball_type, int render_type, int parent_obj, float size, int reverse, vec3d *velocity, float warp_lifetime, int ship_class, matrix *orient_override, int low_res, int extra_flags, int warp_open_sound, int warp_close_sound)
{
int n, objnum, fb_lod;
object *obj;
@@ -1085,17 +1266,21 @@ int fireball_create( vec3d * pos, int fireball_type, int parent_obj, float size,
fireball_lod *fl;
Assert( fireball_type > -1 );
Assert( fireball_type < MAX_FIREBALL_TYPES );
Assert( fireball_type < Num_fireball_types );
fd = &Fireball_info[fireball_type];
// check to make sure this fireball type exists
if (!fd->lod_count)
return -1;
if ( !(Game_detail_flags & DETAIL_FLAG_FIREBALLS) ) {
if ( !((fireball_type == FIREBALL_WARP_EFFECT) || (fireball_type == FIREBALL_KNOSSOS_EFFECT)) ) {
if ( !((fireball_type == FIREBALL_WARP) || (fireball_type == FIREBALL_KNOSSOS)) ) {
return -1;
}
}
if ( (Num_fireballs >= MAX_FIREBALLS) || (num_objects >= MAX_OBJECTS) ) {
if ( (Num_fireballs >= MAX_FIREBALLS) || (Num_objects >= MAX_OBJECTS) ) {
// who cares if we don't create a spark.
// JAS - Should this code be in? Is it better to remove an old spark
// and start a new one, or just not start the new one?
@@ -1134,7 +1319,7 @@ int fireball_create( vec3d * pos, int fireball_type, int parent_obj, float size,
}
// if this is a warpout fireball, never go higher than LOD 1
if(fireball_type == FIREBALL_WARP_EFFECT){
if(fireball_type == FIREBALL_WARP){
/*
if(fb_lod > 1){
fb_lod = 1;
@@ -1171,25 +1356,22 @@ int fireball_create( vec3d * pos, int fireball_type, int parent_obj, float size,
obj = &Objects[objnum];
fb->fireball_info_index = fireball_type;
fb->fireball_render_type = render_type;
fb->time_elapsed = 0.0f;
fb->objnum = objnum;
fb->current_bitmap = -1;
switch( fb->fireball_info_index ) {
switch( fb->fireball_render_type ) {
case FIREBALL_EXPLOSION_MEDIUM:
case FIREBALL_MEDIUM_EXPLOSION:
fb->orient = (myrand()>>8) & 7; // 0 - 7
break;
case FIREBALL_EXPLOSION_LARGE1:
case FIREBALL_EXPLOSION_LARGE2:
// case FIREBALL_EXPLOSION_LARGE3:
case FIREBALL_ASTEROID:
case FIREBALL_LARGE_EXPLOSION:
fb->orient = (myrand()>>8) % 360; // 0 - 359
break;
case FIREBALL_WARP_EFFECT:
case FIREBALL_KNOSSOS_EFFECT:
// Play sound effect for warp hole opening up
fireball_play_warphole_open_sound(ship_class, fb);
@@ -1209,7 +1391,7 @@ int fireball_create( vec3d * pos, int fireball_type, int parent_obj, float size,
break;
}
if ( fb->fireball_info_index == FIREBALL_WARP_EFFECT || fb->fireball_info_index == FIREBALL_KNOSSOS_EFFECT ) {
if ( fb->fireball_render_type == FIREBALL_WARP_EFFECT ) {
Assert( warp_lifetime > 4.0f ); // Warp lifetime must be at least 4 seconds!
fb->total_time = warp_lifetime; // in seconds
} else {
@@ -1266,23 +1448,67 @@ void fireballs_page_in()
{
int i, idx;
fireball_info *fd;
for ( i = 0; i < MAX_FIREBALL_TYPES ; i++ ) {
fd = &Fireball_info[i];
// if this is a Knossos ani, only load if Knossos_warp_ani_used is true
if ( (i == FIREBALL_KNOSSOS_EFFECT) && !Knossos_warp_ani_used)
continue;
for ( i = 0; i < Num_fireball_types; i++ ) {
if((i < NUM_DEFAULT_FIREBALLS) || fireball_used[i]){
fd = &Fireball_info[i];
for(idx=0; idx<fd->lod_count; idx++) {
// we won't use a warp effect lod greater than MAX_WARP_LOD so don't load it either
if ( (i == FIREBALL_WARP_EFFECT) && (idx > MAX_WARP_LOD) )
// if this is a Knossos ani, only load if Knossos_warp_ani_used is true
if ( (i == FIREBALL_KNOSSOS) && !Knossos_warp_ani_used)
continue;
bm_page_in_texture( fd->lod[idx].bitmap_id, fd->lod[idx].num_frames );
for(idx=0; idx<fd->lod_count; idx++) {
// we won't use a warp effect lod greater than MAX_WARP_LOD so don't load it either
if ( (i == FIREBALL_WARP) && (idx > MAX_WARP_LOD) )
continue;
bm_page_in_texture( fd->lod[idx].bitmap_id, fd->lod[idx].num_frames );
}
}
}
bm_page_in_texture( Warp_glow_bitmap );
bm_page_in_texture( Warp_ball_bitmap );
}
void fireball_get_color(int idx, float *red, float *green, float *blue)
{
Assert( red && blue && green );
if ( (idx < 0) || (idx >= Num_fireball_types) ) {
Int3();
*red = 1.0f;
*green = 1.0f;
*blue = 1.0f;
return;
}
fireball_info *fbi = &Fireball_info[idx];
*red = fbi->exp_color[0];
*green = fbi->exp_color[1];
*blue = fbi->exp_color[2];
}
int fireball_ship_explosion_type(ship_info *sip)
{
Assert( sip != NULL );
int index = -1;
int ship_fireballs = (int)sip->explosion_bitmap_anims.size();
int objecttype_fireballs = -1;
if (sip->class_type >= 0) {
objecttype_fireballs = (int)Ship_types[sip->class_type].explosion_bitmap_anims.size();
}
if(ship_fireballs > 0){
index = sip->explosion_bitmap_anims[rand()%ship_fireballs];
} else if(objecttype_fireballs > 0){
index = Ship_types[sip->class_type].explosion_bitmap_anims[rand()%objecttype_fireballs];
}
return index;
}
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.h $
* $Revision: 2.14 $
* $Date: 2005-07-13 02:50:52 $
* $Author: Goober5000 $
* $Revision: 2.14.2.2 $
* $Date: 2007-11-22 05:02:28 $
* $Author: taylor $
*
* Prototypes for fireball functions
*
* $Log: not supported by cvs2svn $
* Revision 2.14.2.1 2007/02/11 09:53:33 taylor
* support for tbl specified fireball explosion color ("$Light color:")
*
* Revision 2.14 2005/07/13 02:50:52 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.13 2005/04/05 05:53:15 taylor
* s/vector/vec3d/g, better support for different compilers (Jens Granseuer)
*
@@ -215,19 +222,28 @@
#include "globalincs/pstypes.h"
struct object;
struct ship_info;
// these values correspond to the fireball.tbl entries
// values correspond to the fireball render types
#define FIREBALL_MEDIUM_EXPLOSION 0
#define FIREBALL_LARGE_EXPLOSION 1
#define FIREBALL_WARP_EFFECT 2
// these values correspond to the fireball.tbl default entries
#define FIREBALL_EXPLOSION_MEDIUM 0 // Used for the 4 little explosions before a ship explodes
#define FIREBALL_WARP_EFFECT 1 // Used for the warp in / warp out effect
#define FIREBALL_KNOSSOS_EFFECT 2 // Used for the KNOSSOS warp in / warp out effect
#define FIREBALL_WARP 1 // Used for the warp in / warp out effect
#define FIREBALL_KNOSSOS 2 // Used for the KNOSSOS warp in / warp out effect
#define FIREBALL_ASTEROID 3
#define FIREBALL_EXPLOSION_LARGE1 4 // Used for the big explosion when a ship breaks into pieces
#define FIREBALL_EXPLOSION_LARGE2 5 // Used for the big explosion when a ship breaks into pieces
// #define FIREBALL_EXPLOSION_LARGE3 6 // Used for the big explosion when a ship breaks into pieces
#define MAX_FIREBALL_TYPES 6 // How many types there are
#define MAX_FIREBALL_TYPES 32 // The maximum number of fireballs that can be defined
#define NUM_DEFAULT_FIREBALLS 6
#define FIREBALL_NUM_LARGE_EXPLOSIONS 2
extern int fireball_used[MAX_FIREBALL_TYPES];
// all this moved here by Goober5000 because it makes more sense in the H file
typedef struct fireball_lod {
char filename[MAX_FILENAME_LEN];
@@ -237,7 +253,8 @@ typedef struct fireball_lod {
} fireball_lod;
typedef struct fireball_info {
int lod_count;
int lod_count;
float exp_color[3];
fireball_lod lod[4];
} fireball_info;
@@ -251,6 +268,7 @@ typedef struct fireball_info {
typedef struct fireball {
int objnum; // If -1 this object is unused
int fireball_info_index; // Index into Fireball_info array
int fireball_render_type;
int current_bitmap;
int orient; // For fireballs, which orientation. For warps, 0 is warpin, 1 is warpout
int flags; // see #define FBF_*
@@ -271,7 +289,7 @@ void fireball_process_post(object * obj, float frame_time);
// reversed is for warp_in/out effects
// Velocity: If not NULL, the fireball will move at a constant velocity.
// warp_lifetime: If warp_lifetime > 0.0f then makes the explosion loop so it lasts this long. Only works for warp effect
int fireball_create(vec3d *pos, int fireball_type, int parent_obj, float size, int reversed=0, vec3d *velocity=NULL, float warp_lifetime=0.0f, int ship_class=-1, matrix *orient=NULL, int low_res=0, int extra_flags=0, int warp_open_sound=0, int warp_close_sound=0);
int fireball_create(vec3d *pos, int fireball_type, int render_type, int parent_obj, float size, int reversed=0, vec3d *velocity=NULL, float warp_lifetime=0.0f, int ship_class=-1, matrix *orient=NULL, int low_res=0, int extra_flags=0, int warp_open_sound=-1, int warp_close_sound=-1);
void fireball_render_plane(int plane);
void fireball_close();
void fireball_level_close();
@@ -289,10 +307,14 @@ float fireball_lifeleft( object *obj );
// Returns life left of a fireball in percent
float fireball_lifeleft_percent( object *obj );
// returns the lighting color (in [0...1] range) to use for explosion
void fireball_get_color(int idx, float *red, float *green, float *blue);
// returns the index of the fireball bitmap for this ship. -1 if there is none.
int fireball_ship_explosion_type(ship_info *sip);
// internal function to draw warp grid.
extern void warpin_render(object *obj, matrix *orient, vec3d *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d = 0 );
extern int Warp_glow_bitmap; // Internal
extern int Warp_ball_bitmap; // Internal
extern int Warp_model;
@@ -9,13 +9,46 @@
/*
* $Logfile: /Freespace2/code/Fireball/WarpInEffect.cpp $
* $Revision: 2.30 $
* $Date: 2005-08-25 22:40:02 $
* $Revision: 2.32.2.5 $
* $Date: 2007-11-22 05:02:28 $
* $Author: taylor $
*
* Code for rendering the warp in effects for ships
*
* $Log: not supported by cvs2svn $
* Revision 2.32.2.4 2006/11/16 01:07:23 taylor
* do no culling on the warp effect model_render call properly (doesn't appear to break anything now that it actually set to not cull)
*
* Revision 2.32.2.3 2006/10/27 21:37:11 taylor
* more cleanup of warp_global crap
* scale render/detail box limits with detail level setting
* make sure that we reset culling and zbuffer after each model buffer that gets rendered
*
* Revision 2.32.2.2 2006/10/27 06:42:29 taylor
* rename set_warp_globals() to model_set_warp_globals()
* remove two old/unused MR flags (MR_ALWAYS_REDRAW, used for caching that doesn't work; MR_SHOW_DAMAGE, didn't do anything)
* add MR_FULL_DETAIL to render an object regardless of render/detail box setting
* change "model_current_LOD" to a global "Interp_detail_level" and the static "Interp_detail_level" to "Interp_detail_level_locked", a bit more descriptive
* minor bits of cleanup
* change a couple of vm_vec_scale_add2() calls to just vm_vec_add2() calls in ship.cpp, since that was the final result anyway
*
* Revision 2.32.2.1 2006/07/21 16:08:03 taylor
* little cleanup
*
* Revision 2.32 2006/03/31 10:20:01 wmcoolmon
* Prelim. BSG warpin effect stuff
*
* Revision 2.31 2005/09/21 03:55:32 Goober5000
* add option for warp flash; mess with the cmdlines a bit
* --Goober5000
*
* Revision 2.30 2005/08/25 22:40:02 taylor
* basic cleaning, removing old/useless code, sanity stuff, etc:
* - very minor performance boost from not doing stupid things :)
* - minor change to 3d shockwave sizing to better approximate 2d effect movements
* - for shields, Gobal_tris was only holding half as many as the game can/will use, buffer is now set to full size to avoid possible rendering issues
* - removed extra tcache_set on OGL spec map code, not sure how that slipped in
*
* Revision 2.29 2005/07/25 05:24:17 Goober5000
* cleaned up some command line and mission flag stuff
* --Goober5000
@@ -242,28 +275,22 @@
#include "nebula/neb.h"
#include "globalincs/pstypes.h"
#include "model/model.h"
#include "ship/ship.h"
#include "cmdline/cmdline.h"
extern int Warp_model;
extern int Cmdline_nohtl;
extern int Cmdline_3dwarp;
extern int Warp_glow_bitmap;
extern int Warp_ball_bitmap;
DCF(norm,"normalize a zero length vector")
{
if ( Dc_command ) {
vec3d tmp = vmd_zero_vector;
vm_vec_normalize(&tmp);
}
}
void draw_face( vertex *v1, vertex *v2, vertex *v3 )
{
vec3d norm;
vertex *vertlist[3];
vm_vec_perp(&norm,(vec3d *)&v1->x,(vec3d *)&v2->x,(vec3d *)&v3->x);
if ( vm_vec_dot(&norm,(vec3d *)&v1->x ) >= 0.0 ) {
vm_vec_perp(&norm,(vec3d *)&v1->x, (vec3d *)&v2->x, (vec3d *)&v3->x);
if ( vm_vec_dot(&norm, (vec3d *)&v1->x ) >= 0.0 ) {
vertlist[0] = v3;
vertlist[1] = v2;
vertlist[2] = v1;
@@ -277,146 +304,79 @@ void draw_face( vertex *v1, vertex *v2, vertex *v3 )
}
#define wSTUFF_VERTICES() do { verts[0]->u = 0.5f; verts[0]->v = 0.0f; verts[1]->u = 1.0f; verts[1]->v = 0.0f; verts[2]->u = 1.0f; verts[2]->v = 1.0f; verts[3]->u = 0.5f; verts[3]->v = 1.0f; } while(0);
#define wR_VERTICES() do { g3_rotate_vertex(verts[0], &bottom1); g3_rotate_vertex(verts[1], &bottom2); g3_rotate_vertex(verts[2], &top2); g3_rotate_vertex(verts[3], &top1); } while(0);
#define wP_VERTICES() do { for(idx=0; idx<4; idx++){ g3_project_vertex(verts[idx]); } } while(0);
void warpin_render(object *obj, matrix *orient, vec3d *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d)
{
static flash_ball warp_ball(20, .1f,.25f, &vmd_z_vector, &vmd_zero_vector, 4.0f, 0.5f);
int i;
vec3d center;
vec3d vecs[5];
vertex verts[5];
int saved_gr_zbuffering = gr_zbuffer_get();
// gr_zbuffering = 0;
float Grid_depth = radius/2.5f;
vec3d center;
gr_zbuffer_set(GR_ZBUFF_READ);
vm_vec_scale_add( &center, pos, &orient->vec.fvec, -(max_radius/2.5f)/3.0f );
// Warp_Map = texture_bitmap_num;//sets the warp map, and thus sets the interp flag for this being a warpin effect
vec3d vecs[5];
vertex verts[5];
vecs[4] = center; //this is for the warp glow-Bobboau
verts[4].u = 0.5f; verts[4].v = 0.5f;
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[4], &vecs[4] );
} else {
g3_transfer_vertex( &verts[4], &vecs[4] );
}
if ( Warp_glow_bitmap != -1 ) {
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, (The_mission.flags & MISSION_FLAG_FULLNEB)?(1.0f - neb2_get_fog_intensity(obj)):1.0f );
if (Warp_glow_bitmap >= 0) {
float r = radius;
bool render_it = true;
int render_it;
#define OUT_PERCENT1 0.80f
#define OUT_PERCENT2 0.90f
#define IN_PERCENT1 0.10f
#define IN_PERCENT2 0.20f
if ( life_percent < IN_PERCENT1 ) {
// do nothing
render_it = 1;
} else if ( life_percent < IN_PERCENT2 ) {
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
render_it = 1;
} else if ( life_percent < OUT_PERCENT1 ) {
// do nothing
render_it = 1;
} else if ( life_percent < OUT_PERCENT2 ) {
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
render_it = 1;
} else {
// do nothing
render_it = 1;
if (Cmdline_warp_flash)
{
if ( (life_percent >= IN_PERCENT1) && (life_percent < IN_PERCENT2) ) {
r *= (life_percent - IN_PERCENT1) / (IN_PERCENT2 - IN_PERCENT1);
//render_it = true;
} else if ( (life_percent >= OUT_PERCENT1) && (life_percent < OUT_PERCENT2) ) {
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2 - OUT_PERCENT1);
//render_it = true;
}
}
if (render_it) {
int saved_gr_zbuffering = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_READ);
if (render_it) {
// Add in noise
//float Noise[NOISE_NUM_FRAMES] = {
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
r *= (0.40f + Noise[noise_frame]*0.30f);
r *= (0.40f + Noise[noise_frame] * 0.30f);
// Bobboau's warp thingie, toggled by cmdline
if (Cmdline_warp_flash) {
r += powf((2.0f * life_percent) - 1.0f, 24.0f) * max_radius * 1.5f;
}
vecs[4] = center;
verts[4].u = 0.5f; verts[4].v = 0.5f;
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[4], &vecs[4] );
} else {
g3_transfer_vertex( &verts[4], &vecs[4] );
}
float alpha = (The_mission.flags & MISSION_FLAG_FULLNEB) ? (1.0f - neb2_get_fog_intensity(obj)) : 1.0f;
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, alpha );
//Bobboau's warp thingie; this should be an option somewhere
//r += (float)pow((2.0f*life_percent) - 1.0f,24.0f)*max_radius*2.0f;
g3_draw_bitmap( &verts[4], 0, r, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
gr_zbuffer_set(saved_gr_zbuffering);
}
}
if((Warp_model >= 0) && (warp_3d || Cmdline_3dwarp))
{
float model_Interp_scale_xyz = radius / 20.0f;
if ( (Warp_model >= 0) && (warp_3d || Cmdline_3dwarp) ) {
float scale = radius / 25.0f;
model_set_warp_globals(scale, scale, scale, texture_bitmap_num, (radius/max_radius) );
set_warp_globals(model_Interp_scale_xyz, model_Interp_scale_xyz, model_Interp_scale_xyz, texture_bitmap_num, (radius/max_radius) );
float dist = vm_vec_dist_quick( pos, &Eye_position );
model_set_detail_level((int)(dist / (radius * 10.0f)));
gr_set_cull(0);
model_render( Warp_model, orient, pos, MR_NO_LIGHTING | MR_NORMAL | MR_NO_FOGGING);
gr_set_cull(1);
// Warp_Map = -1;//un sets the warp map
model_render( Warp_model, orient, pos, MR_LOCK_DETAIL | MR_NO_LIGHTING | MR_NORMAL | MR_NO_FOGGING | MR_NO_CULL );
set_warp_globals(1.0f, 1.0f, 1.0f, -1, -1.0f);
model_set_warp_globals();
} else {
float Grid_depth = radius/2.5f;
/*
//this is that half done effect that was pissing people off-Bobboau
gr_set_cull(0);
matrix m;
vec3d ray_dir;
vm_vector_2_matrix(&m, &orient->vec.fvec, NULL, NULL);//this is the beam things that will come outof the point-Bobboau
float angle = ANG_TO_RAD(135.0f);
if(life_percent < 0.2f){
angle = ANG_TO_RAD(135.0f * (life_percent * 5.0f));
}
for(int idx=0; idx<1; idx++){
vm_vec_random_cone(&ray_dir, &orient->vec.fvec, angle, &m);
mprintf(( "ray direction %f %f %f, orentation %f %f %f, angle %f\n",ray_dir.xyz.x, ray_dir.xyz.y, ray_dir.xyz.z, orient->vec.fvec.xyz.x, orient->vec.fvec.xyz.y, orient->vec.fvec.xyz.z, angle));
vec3d p_temp = *pos;
vm_vec_scale_add(&p_temp, pos, &ray_dir, (max_radius * 10 * frand_range(0.75f, 0.9f)));
mprintf(( "end %f %f %f",p_temp.xyz.x, p_temp.xyz.y, p_temp.xyz.z));
vertex h1[4]; // halves of a beam section
vertex *verts[4] = { &h1[0], &h1[1], &h1[2], &h1[3] };
vec3d top1, bottom1, top2, bottom2;
beam_calc_facing_pts(&top1, &bottom1, &ray_dir, pos, 1.0f, 1.0f);
beam_calc_facing_pts(&top2, &bottom2, &ray_dir, &p_temp, 1.0f, 1.0f);
mprintf(( "top1 %f %f %f, botom1 %f %f %f, \n",top1.xyz.x, top1.xyz.y, top1.xyz.z, bottom1.xyz.x, bottom1.xyz.y, bottom1.xyz.z));
mprintf(( "top2 %f %f %f, botom2 %f %f %f, \n",top2.xyz.x, top2.xyz.y, top2.xyz.z, bottom2.xyz.x, bottom2.xyz.y, bottom2.xyz.z));
wR_VERTICES(); // rotate and project the vertices
wP_VERTICES();
wSTUFF_VERTICES(); // stuff the beam with creamy goodness (texture coords)
gr_set_bitmap(Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 0.9999f);
g3_draw_poly( 4, verts, TMAP_FLAG_TILED | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT); // added TMAP_FLAG_TILED flag for beam texture tileing -Bobboau
}
gr_set_cull(1);
*/
}else{
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
vm_vec_scale_add( &vecs[0], &center, &orient->vec.uvec, radius );
@@ -435,40 +395,52 @@ void warpin_render(object *obj, matrix *orient, vec3d *pos, int texture_bitmap_n
vm_vec_scale_add2( &vecs[3], &orient->vec.rvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->vec.fvec, Grid_depth );
// vm_vec_scale_add( &vecs[4], ¢er, &orient->vec.fvec, -Grid_depth );
// vm_vec_scale_add( &vecs[4], ¢er, &orient->vec.fvec, -Grid_depth );
vecs[4] = center;
verts[0].u = 0.01f; verts[0].v = 0.01f;
verts[1].u = 0.99f; verts[1].v = 0.01f;
verts[2].u = 0.99f; verts[2].v = 0.99f;
verts[3].u = 0.01f; verts[3].v = 0.99f;
verts[4].u = 0.5f; verts[4].v = 0.5f;
for (i=0; i<5; i++ ) {
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[i], &vecs[i] );
} else {
g3_transfer_vertex( &verts[i], &vecs[i] );
}
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[0], &vecs[0] );
g3_rotate_vertex( &verts[1], &vecs[1] );
g3_rotate_vertex( &verts[2], &vecs[2] );
g3_rotate_vertex( &verts[3], &vecs[3] );
g3_rotate_vertex( &verts[4], &vecs[4] );
} else {
g3_transfer_vertex( &verts[0], &vecs[0] );
g3_transfer_vertex( &verts[1], &vecs[1] );
g3_transfer_vertex( &verts[2], &vecs[2] );
g3_transfer_vertex( &verts[3], &vecs[3] );
g3_transfer_vertex( &verts[4], &vecs[4] );
}
gr_set_cull(0); // fixes rendering problem in D3D - taylor
int cull = gr_set_cull(0); // fixes rendering problem in D3D - taylor
draw_face( &verts[0], &verts[4], &verts[1] );
draw_face( &verts[1], &verts[4], &verts[2] );
draw_face( &verts[4], &verts[3], &verts[2] );
draw_face( &verts[0], &verts[3], &verts[4] );
gr_set_cull(1);
gr_set_cull(cull);
}
if ( Warp_ball_bitmap > -1 ){
g3_start_instance_matrix(pos,orient, true);
gr_set_bitmap(Warp_ball_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 0.9999f);
float adg = (2.0f*life_percent) - 1.0f;
float pct= (float)(pow(adg,4.0f)-pow(adg,128.0f))*4.0f;
if(pct > 0.00001f)
warp_ball.render(max_radius*pct/2.0f,adg*adg,adg*adg*6.0f);
if (Warp_ball_bitmap > -1 && Cmdline_warp_flash == 1) {
flash_ball warp_ball(20, .1f,.25f, &vmd_z_vector, &vmd_zero_vector, 4.0f, 0.5f);
float adg = (2.0f * life_percent) - 1.0f;
float pct = (powf(adg, 4.0f) - powf(adg, 128.0f)) * 4.0f;
if (pct > 0.00001f) {
g3_start_instance_matrix(pos, orient, true);
gr_set_bitmap(Warp_ball_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 0.9999f);
warp_ball.render(max_radius * pct * 0.5f, adg * adg, adg * adg * 6.0f);
g3_done_instance(true);
}
}
gr_zbuffer_set( saved_gr_zbuffering );
}
+288
View File
@@ -0,0 +1,288 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
// AddVariableDlg.cpp : implementation file
//
#include "stdafx.h"
#include "FRED.h"
#include "AddVariableDlg.h"
#include "parse/sexp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define NO_RESET_FOCUS 0
#define RESET_FOCUS 1
/////////////////////////////////////////////////////////////////////////////
// CAddVariableDlg dialog
CAddVariableDlg::CAddVariableDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAddVariableDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAddVariableDlg)
m_default_value = _T("");
m_variable_name = _T("");
//}}AFX_DATA_INIT
}
void CAddVariableDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddVariableDlg)
DDX_Text(pDX, IDC_ADD_VARIABLE_DEFAULT_VALUE, m_default_value);
DDV_MaxChars(pDX, m_default_value, 31);
DDX_Text(pDX, IDC_ADD_VARIABLE_NAME, m_variable_name);
DDV_MaxChars(pDX, m_variable_name, 31);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAddVariableDlg, CDialog)
//{{AFX_MSG_MAP(CAddVariableDlg)
ON_BN_CLICKED(IDC_TYPE_NUMBER, OnTypeNumber)
ON_BN_CLICKED(IDC_TYPE_STRING, OnTypeString)
ON_BN_CLICKED(IDC_TYPE_CAMPAIGN_PERSISTENT, OnTypeCampaignPersistent)
ON_BN_CLICKED(IDC_TYPE_PLAYER_PERSISTENT, OnTypePlayerPersistent)
ON_BN_CLICKED(IDC_TYPE_NETWORK_VARIABLE, OnTypeNetworkVariable)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAddVariableDlg message handlers
void CAddVariableDlg::OnOK()
{
// validation name
validate_variable_name(RESET_FOCUS);
// validate data
if ( m_name_validated ) {
validate_data(RESET_FOCUS);
}
// both ok, then store results
if ( m_name_validated && m_data_validated ) {
// int sexp_add_variable(char *text, char*, int type);
// char temp_name[32];
// char temp_value[32];
// strcpy(temp_name, m_variable_name);
// strcpy(temp_value, m_default_value);
// SEXP_VARIABLE_NUMBER SEXP_VARIABLE_STRING
// int type;
//
// if (m_type_number) {
// type = SEXP_VARIABLE_NUMBER;
// } else {
// type = SEXP_VARIABLE_STRING;
// }
//
// // Goober5000
// if (m_type_player_persistent) {
// type |= SEXP_VARIABLE_PLAYER_PERSISTENT;
// } else if (m_type_campaign_persistent) {
// type |= SEXP_VARIABLE_CAMPAIGN_PERSISTENT;
// }
//
// m_sexp_var_index = sexp_add_variable(temp_value, temp_name, type);
// this get done for free CDialog::OnOk() UpdateData(TRUE);
m_create = true;
CDialog::OnOK();
}
}
BOOL CAddVariableDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_variable_name = "<Variable Name>";
m_default_value = "<Default Value>";
// Set variable type to number
m_type_number = true;
m_type_campaign_persistent = false;
m_type_player_persistent = false;
m_type_network_variable = false;
set_variable_type();
m_name_validated = false;
m_data_validated = false;
m_create = false;
// Send default name and values into dialog box
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
bool is_sexp_variable_name(const char* temp_name)
{
for (int i=0; i<MAX_SEXP_VARIABLES; i++) {
if (Sexp_variables[i].type & SEXP_VARIABLE_SET) {
if ( !strcmp(Sexp_variables[i].text, temp_name) ) {
return false;
}
}
}
// name not found
return true;
}
// Check variable name (1) changed (2) > 0 length (3) does not already exist
void CAddVariableDlg::validate_variable_name(int set_focus)
{
CString temp_name;
CEdit *edit = (CEdit *) GetDlgItem(IDC_ADD_VARIABLE_NAME);
edit->GetWindowText(temp_name);
// Check if any change and not already in list
if ( stricmp(temp_name, "<Variable Name>") ) {
if ( (strlen(temp_name) > 0) && (get_index_sexp_variable_name(LPCTSTR(temp_name)) == -1) ) { //not already in list and length > 0 {
// Goober5000 - replace spaces with hyphens
if (strchr(temp_name, ' ') != NULL)
{
// display msg
MessageBox("Variable names cannot contain spaces. Replacing with hyphens.");
// replace chars
//Modified to make the code build. - Thunderbird
temp_name.Replace((TCHAR) ' ', (TCHAR) '-');
//temp_name.Replace((TCHAR) ' ', (TCHAR) '-'));
// fix what's displayed
edit->SetFocus();
edit->SetWindowText(temp_name);
edit->SetSel(0, -1);
}
m_name_validated = true;
} else {
// conflicting variable name
if (strlen(temp_name) == 0) {
edit->SetWindowText("<Variable Name>");
}
m_name_validated = false;
if (set_focus == RESET_FOCUS) {
MessageBox("Conflicting variable name");
edit->SetFocus();
edit->SetSel(0, -1);
}
}
} else {
// name unchanged from default
m_name_validated = false;
if (set_focus == RESET_FOCUS) {
MessageBox("Invalid variable name");
edit->SetFocus();
edit->SetSel(0, -1);
}
}
}
void CAddVariableDlg::validate_data(int set_focus)
{
CString temp_data;
CEdit *edit = (CEdit *) GetDlgItem(IDC_ADD_VARIABLE_DEFAULT_VALUE);
edit->GetWindowText(temp_data);
// check for 0 string length
if (strlen(temp_data) == 0) {
m_data_validated = false;
} else {
if (m_type_number) {
// verify valid number
int temp_num = atoi(temp_data);
char buf[TOKEN_LENGTH];
sprintf(buf, "%d", temp_num);
if ( stricmp(buf, temp_data) ) {
m_data_validated = false;
} else {
m_data_validated = true;
}
} else {
m_data_validated = true;
}
}
// Display message and reset focus
if ( (!m_data_validated) && (set_focus == RESET_FOCUS) ) {
MessageBox("Invalid Default Value.");
edit->SetFocus();
edit->SetSel(0, -1);
}
}
// Set type to number
void CAddVariableDlg::OnTypeNumber()
{
m_type_number = true;
set_variable_type();
}
// Set type to string
void CAddVariableDlg::OnTypeString()
{
m_type_number = false;
set_variable_type();
}
void CAddVariableDlg::OnTypePlayerPersistent()
{
m_type_player_persistent = ((CButton *) GetDlgItem(IDC_TYPE_PLAYER_PERSISTENT))->GetCheck() ? true : false;
if (m_type_player_persistent)
m_type_campaign_persistent = false;
set_variable_type();
}
void CAddVariableDlg::OnTypeCampaignPersistent()
{
m_type_campaign_persistent = ((CButton *) GetDlgItem(IDC_TYPE_CAMPAIGN_PERSISTENT))->GetCheck() ? true : false;
if (m_type_campaign_persistent)
m_type_player_persistent = false;
set_variable_type();
}
void CAddVariableDlg::OnTypeNetworkVariable()
{
m_type_network_variable = ((CButton *) GetDlgItem(IDC_TYPE_NETWORK_VARIABLE))->GetCheck() ? true : false;
set_variable_type();
}
// Set type check boxes
void CAddVariableDlg::set_variable_type()
{
CButton *button_string = (CButton *) GetDlgItem(IDC_TYPE_STRING);
CButton *button_number = (CButton *) GetDlgItem(IDC_TYPE_NUMBER);
button_number->SetCheck( m_type_number);
button_string->SetCheck(!m_type_number);
((CButton *) GetDlgItem(IDC_TYPE_CAMPAIGN_PERSISTENT))->SetCheck(m_type_campaign_persistent);
((CButton *) GetDlgItem(IDC_TYPE_PLAYER_PERSISTENT))->SetCheck(m_type_player_persistent);
((CButton *) GetDlgItem(IDC_TYPE_NETWORK_VARIABLE))->SetCheck(m_type_network_variable);
}
+74
View File
@@ -0,0 +1,74 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#if !defined(AFX_ADDVARIABLEDLG_H__0F668CB5_AAEE_11D2_A899_0060088FAE88__INCLUDED_)
#define AFX_ADDVARIABLEDLG_H__0F668CB5_AAEE_11D2_A899_0060088FAE88__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AddVariableDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CAddVariableDlg dialog
class CAddVariableDlg : public CDialog
{
// Construction
public:
CAddVariableDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CAddVariableDlg)
enum { IDD = IDD_ADD_VARIABLE };
CString m_default_value;
CString m_variable_name;
bool m_name_validated;
bool m_data_validated;
bool m_type_number;
bool m_type_campaign_persistent;
bool m_type_player_persistent;
bool m_type_network_variable;
bool m_create;
int m_sexp_var_index;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAddVariableDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAddVariableDlg)
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void validate_variable_name(int set_focus);
afx_msg void validate_data(int set_focus);
afx_msg void OnTypeNumber();
afx_msg void OnTypeString();
afx_msg void OnTypePlayerPersistent();
afx_msg void OnTypeCampaignPersistent();
afx_msg void OnTypeNetworkVariable();
afx_msg void set_variable_type();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ADDVARIABLEDLG_H__0F668CB5_AAEE_11D2_A899_0060088FAE88__INCLUDED_)
Loaded 100 of 1090 files, more files were not shown because too many files have changed in this diff. Show more