Compare commits

..
2470 Commits
Author SHA1 Message Date
chief1983 fc5a74a911 FINAL BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-10-23 07:07:43 +00:00
Goober5000 37c469ea84 Backport: Trunk 9271; fix for Mantis #2643 (generated shield quadrants displayed in the wrong spots) 2012-10-16 03:23:01 +00:00
Goober5000 f09e4dd328 Backport: Trunk 9268; add arrival_delay and departure_delay arguments to set-arrival-info and set-departure-info 2012-10-16 02:42:45 +00:00
Zacam 37252782bd RC9 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-10-07 19:46:05 +00:00
Goober5000 544d90710e better preprocessor logic, as suggested by niffiwan 2012-10-03 03:06:55 +00:00
Goober5000 2123a62d21 MSVC6 compatibility 2012-10-01 05:44:44 +00:00
Goober5000 b561c627ce Backport: Trunk 9234; Fixed attempted reinitialization of collision pairs. Need to use OBJ_INDEX(objp), not objp->instance as that refers to the ship index, not the object index. 2012-10-01 03:28:08 +00:00
Goober5000 245e876558 Backport: Trunk 9226; Fix for Mantis 2709: Use the correct dimensions for updating texture images when texture streaming to fix crashes on hardware not capable of handling non power of 2 texture dimensions 2012-10-01 03:26:12 +00:00
Goober5000 89a81a4025 Backport: Trunk 9221; play-sound-from-table should work for both 3d and non-3d sounds 2012-10-01 03:25:00 +00:00
Goober5000 c20285d58e Backport: Trunk 9197; Fixes mantis 2711. AudioStream handles are leaked under certain conditions. / AudioStream handles that were to destroy and fade would not if the stream was already finished or not started. 2012-10-01 03:23:31 +00:00
chief1983 7a57db09ba RC8 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-08-28 16:14:14 +00:00
chief1983 d005f0ec2f Backport: Trunk r9143; make red-alert not dependent on whether the HUD is visible or not (fixes Mantis #2683) 2012-08-28 15:54:41 +00:00
chief1983 7f2ae7551e Revert backport of r8848. 2012-08-27 22:46:00 +00:00
chief1983 af8d267ebe Backport: Trunk r9130; variable tokens can be quite a bit longer than standard tokens due to their unusual format; handle this properly (fixes Mantis #2670) 2012-08-22 20:01:40 +00:00
chief1983 a26d042e7a Backport: Trunk r9127; Adding nameplate textures to the list of texture names that trigger the transparency renderer. 2012-08-22 20:00:27 +00:00
chief1983 377d572863 Backport: The remaining changes in r9113, since most had been committed in 9054, and the rest is also known as mantis_2266_take3_followup.patch from Mantis 2266. 2012-08-22 19:59:21 +00:00
The_E 10845127c2 Backport trunk 9109/9112/9118: More efficient handling of ani ressources, fixes ani stuttering. Also allows EFF files as head anis. 2012-08-22 19:11:24 +00:00
chief1983 c7054d51fc Backport: Trunk r9095; fix for Mantis #2694: homing breaks when free_flight_time is 0; also, correctly set default free_flight_time to retail value of 0.5 second 2012-08-22 18:07:29 +00:00
chief1983 c938af26fa Backport: Trunk r9080/9081; Prevent garbage collection of texture handles which still have a non-zero load count. 2012-08-22 17:04:19 +00:00
The_E aa7ed66c64 Backport of trunk revision 9077: Remove a define from the builtin shader that was causing clipping issues now that AMD has fixed their driver's behaviour 2012-07-31 17:10:22 +00:00
Zacam 960cf37070 RC7 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-07-25 03:41:04 +00:00
Zacam e237557a31 Mantis 2266: Take3 RC Branch Patch for "dense soundscapes cause sounds to intermittently not play." Patch by IssMneur. 2012-07-25 03:08:50 +00:00
Zacam 7d27e1d5e9 Backport: Trunk r9052; Fix 4 for #2590: don't use "j" when its value could be greater than the array size - thanks to Zacam & Goober for finding this 2012-07-25 02:56:54 +00:00
Zacam b69144e56b Revert Backport's of r8910/9026/9031. 2012-07-24 03:50:45 +00:00
Zacam 9b03888d39 Backport: Trunk r9027; [Modified] update SCP credits 2012-07-24 03:31:11 +00:00
Zacam cbca7ab34b Backport: Trunk r9031; Fixed glow points in the Tech Room. 2012-07-24 03:21:22 +00:00
Zacam 4452762786 Backport: Trunk r9026; Corrected glow point directional attenuation. Need to use world coordinates of glow points, not local. 2012-07-24 03:19:54 +00:00
Zacam e006ad7ade Backport: Trunk r8910; Changing glowpoint rendering from being a separate step during model rendering to being a part of the batch renderer. This makes glowpoint rendering much faster. (Required for r9026/r9031 backports) 2012-07-24 03:19:20 +00:00
Zacam 7a8da470b8 Backport: Trunk r9018; prevent ships with mismatched models and tables from causing crashes later on (Mantis #2689) 2012-07-24 03:11:11 +00:00
Zacam 336d4abf37 Backport: Trunk r9015; add four useful sexps: set-arrival-info, set-departure-info, set-debriefing-toggled, set-subspace-drive
also, fix a hole in the oswpt routine (and a few sexps) dealing with wings that weren't present yet
2012-07-24 03:09:43 +00:00
Zacam fc3fbdd1e5 Backport: Trunk r9014; this really ought to be a Warning, not an Error 2012-07-24 03:08:53 +00:00
Zacam d30f89bb01 Backport: Trunk r9010; check to make sure a wing that has a player does not also have an arrival delay (Mantis #2678) 2012-07-24 03:08:07 +00:00
Zacam 0cb744487e Backport: Trunk r9009; Target direction arrow properly disappears when target is placed under reticle. Fixes Mantis 2504. 2012-07-24 03:07:15 +00:00
Zacam 7f7a6decb8 Backport: Trunk 9004; add the mission cutscene save type, per Karajorma and MjnMixael 2012-07-24 03:06:19 +00:00
Zacam 516a8c68ee Backport: Trunk r9003; in the interest of avoiding mysterious and subtle differences in AI behavior, restore retail behavior where:
a) the player's wing forms on him at mission start
b) wings in the Starting_wings list will form on the player if they arrive later in the mission
c) no other wing automatically forms on its leader
2012-07-24 02:23:44 +00:00
Zacam 28b733738c Backport: Trunk r9002; also revert the "nohtl" part of r8977 for FRED (Mantis #2676) because no-HTL models shouldn't use HTL rendering 2012-07-24 02:15:20 +00:00
Zacam 966735a65b Backport: Trunk r9001; revert r8975 because this fix adds unwanted diagonal lines to the jump node model (Mantis #2396) 2012-07-24 02:14:44 +00:00
Zacam a5560a59c9 Backport: Trunk r9000; niffiwan's fix for Mantis #2681 2012-07-24 02:13:07 +00:00
Zacam 7db44e0177 Backport: Trunk 8999; Fix for Mantis 2682: extra glowpoints are rendered for targeted ships 2012-07-24 01:39:59 +00:00
Zacam c98504da11 Backport: Trunk 8995; Fix number 3 for mantis #2590 - move array overflow detection to correct place in loops 2012-07-24 01:37:42 +00:00
chief1983 ad007cfe0c Backport Xcode4 project from trunk, removing the mod_table files from the project. 2012-07-09 18:38:24 +00:00
Goober5000 4dcc6da75f Manual backport due to differing implementation: Trunk r8982; replace variables in recommendations too 2012-07-04 20:08:57 +00:00
Zacam c6b4b79c2f Backstep: Reverting Backport of Trunk r8982 which in trunk operates on the SCP_STringification which was not backported. 2012-07-04 19:59:47 +00:00
Zacam 82d36d5f1f Backport: Trunk r8982; replace variables in recommendations too 2012-07-04 19:53:43 +00:00
Zacam 10ede3185f Backport: Trunk r8979; Linux release compilation back to using -Wall, but with -Wno-write-strings 2012-07-04 19:52:16 +00:00
Zacam b8331e7216 Backport: Trunk r8978; fix a rather important variable initialization
(follow-up to r8967)
2012-07-04 19:51:42 +00:00
Zacam 2fe257afca Backport: Trunk r8977; this is the equivalent of r8975 for FRED (Mantis #2676) 2012-07-04 19:51:14 +00:00
Zacam 6fdc81cd88 Backport: Trunk r8976; attacking a protected target will remove its protected flag, so don't allow this if hit by EMP
(Mantis #2192)
2012-07-04 19:50:42 +00:00
Zacam af09318d24 Backport: Trunk r8975; Zacam's fix for Mantis #2396 2012-07-04 19:50:13 +00:00
Zacam c22a0697f8 Backport: Trunk r8974; fix for Mantis #2179, proper afterburner shutdown 2012-07-04 19:48:33 +00:00
Zacam f1df0c31db Backport: Trunk r8972; fix Mantis #1972: hotkey brackets are drawn around stealth ships 2012-07-04 19:48:02 +00:00
Zacam 6a1b6638fc Backport: Trunk r8971; fix TD2192...
[derp, wrong game]
fix Mantis #2192, EMP brings play-dead fighters back to life
2012-07-04 19:47:18 +00:00
Zacam a5776e277c Backport: Trunk r8968; CommanderDJ's set-player-throttle-speed 2012-07-02 02:51:52 +00:00
Zacam b8cc620079 Backport: Trunk r8967; wings that are initially docked will now arrive in mission correctly 2012-07-02 02:51:11 +00:00
Zacam 1b7c9b2f8d Backport: Trunk r8917; fix for Mantis #2673, following Valathil's detective work 2012-07-02 01:46:24 +00:00
Zacam bc20b94cde Backport: Trunk r8914/8918/8921/8922/8923/8924;
fix the old Volition bug where a docked ship would execute its default behavior even when the preceding comment explicitly said that it should "just sit here" :-/
also guard against a few edge cases related to this (Mantis 945)
this should fix all of the issues with docked fighters and bombers (Mantis 945)
looks like this was never actually implemented!
add more error checking for initially docked ships, per Mantis (Mantis 1658)
make the dock leader code more robust, and make FRED mark dock leaders in wings correctly
follow-up to r8922: this part isn't actually a problem
2012-07-02 01:45:47 +00:00
Zacam aa497aa236 Backport: Trunk r8912; CommanderDJ's fix for Mantis #2628 2012-07-02 01:30:11 +00:00
Zacam 1fba5a9bd4 Backport: Trunk r8909; Fix for Mantis 2671: Skip submodels that have been blown off in ship-ship collisions. 2012-07-02 01:29:39 +00:00
Zacam 69c54645b6 Backport: Trunk r8904; No warnings for release linux builds. 2012-07-02 01:29:03 +00:00
Zacam bb5fc833d4 Backport: Trunk r8903/8906/8911; Fix for Mantis 2670: Truncate tokens to their maximum length and pop up a MessageBox for the user.
Fix for Mantis 2670: Followup: Fix the bug without breaking mission parsing.
fine-tune Valathil's error message
2012-07-02 01:28:34 +00:00
Zacam e505e84f95 Backport: Trunk r8902; synchronize the ship classes that evade shockwaves
(this fixes Mantis #2548)
2012-07-02 01:27:03 +00:00
Zacam ed65937afc Backport: Trunk r8901; restore retail behavior for chaining by reverting r8603 -- this fixes Mantis #2667
also add descriptive comment in header file
2012-07-02 01:26:25 +00:00
Zacam d4cb17531c Backport: Trunk r8900; Fix for mantis #2666: call the new HUD renderBitmap function for the red alert notification background image 2012-07-02 01:25:42 +00:00
Zacam 2af7151592 Backport: Trunk r8899; From CommanderDJ: Fix for Mantis 2657 (Alt-Shift-E does not clear escort list) 2012-07-02 01:25:04 +00:00
Zacam ffd4142864 Backport: Trunk r8894; since the if() block already checks for a specific gauge type, we can safely do the static_cast 2012-07-02 01:24:29 +00:00
Zacam 73a048c92f Backport: Trunk r8892; Fix for Mantis 2665: Include Player Ship's in the search for valid Message Sources 2012-07-02 01:23:42 +00:00
Zacam 35b1cb383f Backport: Trunk r8871; Fix for Mantis 2631: Take the main hall of first mission of the fallback campaign as the current one and save the campaign to the pilot struct. 2012-07-02 01:22:55 +00:00
Zacam 0a2ffe7653 Backport: Trunk r8869; Valathil's fix for Mantis #2652 2012-07-02 01:22:20 +00:00
Zacam f91c78d7a7 Backport: Trunk r8456/8866/8867/8868; Made subsystems contain an objnum reference to their parent ship.
fix some aspects of homing (pun not intended), including hopefully Mantis #2652
remove the vestiges of free_flight_time, which never worked
remove the unnecessary null sets
2012-07-02 01:21:44 +00:00
Zacam cfa67a5390 Backport: Trunk r8865; parentheses are A-1 SUPAR 2012-07-02 01:18:52 +00:00
Zacam 77c1a903ee Backport: Trunk r8848; Mastadon's fix to make auto-target pick the nearest enemy ship instead of the nearest ship attacking the player. 2012-07-02 01:17:58 +00:00
Zacam 442837521f Backport: Trunk r8847; From CommanderDJ: Fix for Mantis 2663 (hud-set-color only works once per mission) 2012-07-02 01:16:29 +00:00
Zacam 8e20c8f780 Backport: Trunk r8845; As requested and tested by VA, bumping MAX_INSTANCE_DEPTH to 10 2012-07-02 01:15:09 +00:00
Zacam 8579209137 Backport: Trunk r8844; Fix Evil Turret Bug of Doom. :) 2012-07-02 01:13:42 +00:00
Zacam 0a73016391 Backport: Trunk r8830; Mantis 2419: add a new ETS gauge that behaves like the retail one 2012-07-02 01:12:29 +00:00
Zacam 97819f8ee5 Backport: Trunk r8813; fix for Mantis #2117 (dock names with trailing spaces cause errors) 2012-07-02 01:11:14 +00:00
Zacam a3454349e6 Backport: Trunk r8812; restrict multi-editing for Mantis #1681 2012-07-02 01:10:30 +00:00
Zacam 2b0d7fdaa8 Backport: Trunk r8807; if a movie fails to play, give back the mouse cursor 2012-07-02 01:07:52 +00:00
Zacam 5b9f250861 Backport: Trunk r8806; restore code that was inadvertently deleted, fixing Mantis #2478 2012-07-02 01:07:16 +00:00
Zacam 5f934f28dd Backport: Trunk r8805; Documentation for head-ani's && messages 2012-07-02 01:06:11 +00:00
Zacam fcde91a42c Backport: Trunk r8804; GCC: remove trivial warning: multi-line comment [-Wcomment] 2012-07-02 01:05:27 +00:00
Zacam 182af9fea9 Backport: Trunk r8803; save a tiny amount of RAM when creating BMP_AABITMAP bitmaps 2012-07-02 01:04:53 +00:00
Zacam 170e04ebd0 Backport: Trunk r8802; Fix for mantis 2655: play messages at least until head ani finishes 2012-07-02 01:04:21 +00:00
Zacam eee6f49bf8 Backport: Trunk r8801; Fix for mantis 2411: allow repeated messages to play head anis 2012-07-02 01:03:41 +00:00
Zacam 795e2fbe67 Backport: Trunk r8795; Niffiwan's fix for 2590 seems to have introduced a bug of it's own. Easy enough to fix it though. 2012-07-02 01:02:07 +00:00
Zacam 8f164bcdc7 Backport: Trunk r8789; From jg18: Allow FSO to actually fetch the max anisotropy value rather than hard capping at 2.0. 2012-07-02 01:01:14 +00:00
Zacam 69c9935ffa Backport: Trunk r8788; Fixes #2624. The sound environment should now track the camera correctly. 2012-07-02 01:00:31 +00:00
Zacam 3e3f0691f1 Backport: Trunk r8784/8785/8786; add capability to specify different nested default colors
make the closing color span brace be $} instead of $c}
if we are ignoring whitespace and we encounter a newline, don't eat it
2012-07-02 00:59:43 +00:00
Zacam fbd217ee3a Backport: Trunk r8782: other people than me deprecate sexps now 2012-07-02 00:57:48 +00:00
Zacam b38d9b0704 Backport: Trunk r8773; supernova-stop sexp, written by CommanderDJ 2012-07-02 00:56:56 +00:00
Zacam 7b2a349ee0 Backport: Trunk r8772/8870; Partial fix for 2410: Fixes Directive gauge ignoring hud-disable-except messages
Fix for last bit of mantis #2410: show training messages when hud-disabled-except-messages
2012-07-02 00:55:58 +00:00
Zacam 00dc14be96 Backport: Trunk r8771; Fix for Mantis 2606: Local SSMs fired in swarm may cause propagating NaN errors 2012-07-02 00:52:53 +00:00
Zacam c4e5640893 Backport: Trunk r8758; From CommanderDJ: Fix for mantis #0002646 2012-07-02 00:52:02 +00:00
Zacam e00f3c8c58 Backport: Trunk r8751; Change this little piece of code to avoid a potentially very baffling null pointer dereference later on 2012-07-02 00:51:02 +00:00
Zacam 54e9a7bbab Backport: Trunk r8740/8741; Use CLAMP utility macro in lighting.cpp 2012-07-02 00:50:01 +00:00
Zacam a403887a90 Backport: Trunk r8696; Fix a bug that caused bombs to be indestructible by the player for much longer than they should be according to the table settings given. 2012-07-02 00:48:19 +00:00
niffiwan 61b584cef6 RC6 BUILD STAGE COMMIT (Take 2): Sets Revision and Version properties to this commit version. 2012-05-03 10:56:58 +00:00
niffiwan 4f92dae237 RC6 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-05-03 10:53:17 +00:00
niffiwan 4a0e043cc3 Update 8592 to not use a SCP_string and to use vsnprintf to avoid a buffer overrun 2012-05-03 10:53:09 +00:00
niffiwan 7e6c86d8aa Backport: Trunk r8695; Fix the bug in closing the event editor that caused it to take minutes with some missions rather than seconds. 2012-05-03 10:53:02 +00:00
niffiwan 61f908268e Revert "Backport: Trunk r8686; Fix Mantis 2642: Cockpits are rendered incorrectly when post-processing is disabled, thanks m_m"
Depends on other non-backported commits

This reverts commit cdb713f15a75169ee1352aad2bae5d84951e53a6.
2012-05-03 10:52:54 +00:00
niffiwan 43ed5dd385 Backport: Trunk r8686; Fix Mantis 2642: Cockpits are rendered incorrectly when post-processing is disabled, thanks m_m 2012-05-02 11:38:59 +00:00
niffiwan 5b01e4d387 Backport: Trunk r8681; These two variables were missed; the sort of overlooked error that is easy with this odd method of copy constructing... 2012-05-02 11:38:53 +00:00
niffiwan 83922f6c0d Backport: Trunk r8670; fix for Mantis #2630
(LUA is not mentioned, but the problem might affect that too)
2012-05-02 11:38:45 +00:00
niffiwan 6328aa6a78 Backport: Trunk r8662; warning C6280: 'tmp_Player' is allocated with 'new', but deleted with 'free' 2012-05-02 11:38:38 +00:00
niffiwan 0f10e80cd9 Backport: Trunk r8652; MSVC Analyze warning fix: Incorrect type passed as parameter in call to function printf() 2012-05-02 11:38:32 +00:00
niffiwan c880ad1634 Backport: Trunk r8649; Fix Mantis 2632: Sounds assigned to objects get dropped when limit hardcoded gets reached. Patch from m_m 2012-05-02 11:38:25 +00:00
niffiwan 00fc4382c0 Backport: Trunk r8642; Fix Doxygen documentation for wl_draw_ship_weapons() 2012-05-02 11:38:18 +00:00
niffiwan 6c30105602 Backport: Trunk r8641; PVS-Studio fix: The 'Player' pointer is used simultaneously as an array and as a pointer to single object. 2012-05-02 11:38:12 +00:00
niffiwan 3042a805d4 Backport: Trunk r8640; PVS-Studio fix: The 'Players' pointer is used simultaneously as an array and as a pointer to single object. Check lines: 1392, 1410. 2012-05-02 11:38:06 +00:00
niffiwan 9adb70e863 Backport: Trunk r8639; PVS-Studio fix: The 'Weapon_info' pointer is used simultaneously as an array and as a pointer to single object. Check lines: 2962, 2975. 2012-05-02 11:38:00 +00:00
niffiwan 5fb5f58dbb Backport: Trunk r8643 + r8644; Fix for Mantis 2635: Invalid memory access when saving a mission due to a weapon bank set to empty. && Same for secondary weapons 2012-05-02 11:37:53 +00:00
niffiwan e4228f9b2b Backport: Trunk r8630; revision 8155 inadvertently made ALL weapons area-effect... so don't add an automatic inner radius (for Mantis #2634) but still be careful about potential divide-by-zero 2012-05-02 11:37:47 +00:00
niffiwan 76f4e460e4 Backport: Trunk r8628; Gliding bugfix: only "decay" glide speed when actually thrusting. 2012-05-02 11:37:41 +00:00
niffiwan 2b3c446f26 Backport: Trunk r8618; Fix a rather unhelpfully vague piece of the SEXP documentation. 2012-05-02 11:37:34 +00:00
niffiwan c54053535f Backport: Trunk r8614 + r8615 + r8619; Allowed hud-set-directive and hud-set-message to set custom gauge text up to MESSAGE_LENGTH instead of NAME_LENGTH. && Added hud-clear-messages. Clears active messages currently displayed. && considering that both the HUD and sexp_replace_variable_names_with_values work with SCP_string, just use SCP_string directly and remove the character limit
also, MESSAGE_LENGTH isn't 32 characters
2012-05-02 11:37:26 +00:00
niffiwan 6ea6b82db1 Backport: Trunk r8610; Fix for Mantis 2629: PVS-Studio warning: The variable j is being used for this loop and for the outer loop. (controlsconfig.cpp 1613) 2012-05-02 11:37:19 +00:00
niffiwan aad3b1c0e8 Backport: Trunk r8603; Well I find it hard to believe that in over eight years three senior SCP coders couldn't find THAT!
Fix Mantis 0082 (Repeat count sexp does not work reliably)
2012-05-02 11:37:13 +00:00
niffiwan 7467cd5537 Backport: Trunk r8602 + r8613; Reorder setting of filename in game init to stop missions crashing in load screen && Update to 8602 - an even simpler fix 2012-05-02 11:37:06 +00:00
niffiwan 5f1a5b3120 Backport: Trunk r8596 + r8597; From Echelon9, fix for mantis #0002621 && fix a derp by Echelon9 (local variable was hiding the member field) 2012-05-02 11:37:00 +00:00
niffiwan d128b00be0 Backport: Trunk r8592; per discussion with mjn.mixael, fix error function so that it doesn't break on messages that are too long 2012-05-02 11:36:54 +00:00
niffiwan 62c4963276 Backport: Trunk r8585; Fix for Mantis #0002604: using m_m's patch, allow swarm/corkscrew bank to keep firing if current bank changes 2012-05-02 11:36:47 +00:00
niffiwan 18d5980178 Backport: Trunk r8579; Fix for Mantis 2619: Adds .png to FRED's list of recognized file formats for loading screens. 2012-05-02 11:36:40 +00:00
niffiwan 62ecc849ac Backport: Trunk r8577; From casual_pilot: Fix for Mantis 2395 (incorrect index values passed to OpenGL) 2012-05-02 11:36:33 +00:00
niffiwan 3f683496d3 Backport: Trunk r8563; Fix for Mantis 2327 - Strange behavior with key-press, patch from Eli2 2012-05-02 11:36:26 +00:00
niffiwan 03d9ffcbdc Backport: Trunk r8562; Fix for Mantis 2616 - Lua forward controls don't get applied to player controls, patch by m_m 2012-05-02 11:36:18 +00:00
niffiwan d9b05259bf Backport: Trunk r8561 + r8565; PVS-Studio fixes: Resolve some warnings about use of pointers before checking for a null pointer && partial revert of 8561: vm_malloc should never return null, so the Assert is necessary, and will immediately flag the error as it happens instead of leaving a mine to be triggered later 2012-05-01 12:27:25 +00:00
niffiwan 680907778e Backport: Trunk r8554; const correctness for fhash 2012-05-01 12:27:18 +00:00
niffiwan 8d9c3833b8 Backport: Trunk r8552; Fix Mantis 2620 - PVS-Studio warning: Consider inspecting the '(strlen(filename) > 6)' expression. A 5 year old bug. 2012-05-01 12:27:12 +00:00
niffiwan 97a9146ebc Backport: Trunk r8551; PVS Studio fix: The conditional expressions of the 'if' operators situated alongside each other are identical (aicode.cpp) 2012-05-01 12:27:05 +00:00
niffiwan fdb68fdc8b Backport: Trunk r8550 + r8553; fix compilation for MSVC6 && this is a fix that doesn't require #including another file 2012-05-01 12:26:58 +00:00
niffiwan 2998e9e54f Backport: Trunk r8459; stdint.h and inttypes.h moved, and let's fix some paths that VC6 botched up for us again. 2012-05-01 12:26:51 +00:00
niffiwan 7a80419d17 Backport: Trunk r8545; change stuff_vector to stuff_vec3d for clarity, since "vector" now refers to a dynamic list and "vec3d" now refers to the three-float struct 2012-05-01 12:26:44 +00:00
niffiwan 5c46b2530a Backport: Trunk r8543; Fix a bug where placing the host in team 2 of a TvT mission would cause the clients to crash out. 2012-05-01 12:26:37 +00:00
niffiwan 7e679a2272 Backport: Trunk r8540; Related to Mantis 2617 - there is no way this is correct, now we have a properly functioning constructor for mc_info 2012-05-01 12:26:30 +00:00
niffiwan 75e0b54f1c Backport: Trunk r8539; Fix Mantis 2617: LLVM warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? 2012-05-01 12:26:24 +00:00
niffiwan 505b701fd7 Backport: Trunk r8536; Fix ignore-keys not blocking joystick or mouse buttons. (Mantis 2611) 2012-05-01 12:26:17 +00:00
niffiwan 1b9de12ad6 Backport: Trunk r8533; Fix for Mantis 2614: Remove that statement, it works fine without exponentiating the offset. 2012-05-01 12:26:11 +00:00
niffiwan 115d5aa3b8 Backport: Trunk r8532; Forgot newlines 2012-05-01 12:26:05 +00:00
niffiwan 5037612651 Backport: Trunk r8531; Deprecating stuff: Good. Printing messages to the log: Good. Using Warning() instead of mprintf(): Bad. 2012-05-01 12:25:58 +00:00
niffiwan 46a91c4128 Backport: Trunk r8523; Fixed a few typos in scripting documentation. 2012-05-01 12:25:51 +00:00
chief1983 f05252fba4 RC5 BUILD STAGE COMMIT (Take 3): Sets Revision and Version properties to this commit version. Also fix a typo I made in fred.rc 2012-02-20 21:21:54 +00:00
Zacam e9688af867 RC5 BUILD STAGE COMMIT (Take 2): Sets Revision and Version properties to this commit version. 2012-02-19 19:20:09 +00:00
Zacam 86b5b2f1f2 Backport: Trunk r8519; Fix for 8515: Need to init Use_GLSL earlier 2012-02-19 19:17:29 +00:00
chief1983 b570391a11 RC5 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-02-17 19:57:53 +00:00
Zacam 0ba13f58e3 Backport: Trunk r8512; Fixes GLSL detection to switch off GLSL support if reported GLSL version is below 1.2 2012-02-16 13:02:46 +00:00
chief1983 11c2bec249 Backport: Trunk 8505; From CommanderDJ, fix for mantis #0002601: create constructor for player struct 2012-02-15 16:11:18 +00:00
Zacam 04287f31e6 According to zookeeper, Trunk r8446 relies also on Trunk r8292 and as such, should not have been backported on its own (which is causing GCC complaints). Reverting the Backport until further discussion. 2012-02-15 09:31:21 +00:00
Zacam c7b811646b Backport: Trunk r8507; Reported by ni1s: GCC complaint about missing .c_str() in the updated dynamic MAX_SHIELD_ICON dynamic change. 2012-02-15 08:00:02 +00:00
Zacam 37885df34e Backport: Trunk r8465; Proper way to fix what was attempted in r8439. (Makes subsystem targeting brackets always get drawn in the right place in the targeting box.) 2012-02-14 01:08:35 +00:00
Zacam 113136af3b Backport: Trunk r8459; Fix for Mantis 2603: Fullscreen_window window not centered. 2012-02-14 01:07:38 +00:00
Zacam 706714f73a Backport: Trunk r8452; From CommanderDJ: Makes MAX_SHIELD_ICONS dynamic 2012-02-14 01:06:35 +00:00
Zacam 32e72658be Backport: Trunk r8450; Mantis #2524 2012-02-14 01:05:44 +00:00
Zacam ad90167396 Backport: Trunk r8447; Fixed the annoying OpenAL error messages in the log. AL_DOPPLER_FACTOR is only valid for alGet. Changed all instances to the correct alDopplerFactor. 2012-02-14 01:04:51 +00:00
Zacam b129927404 Backport: Trunk r8446; Slightly relocated the triggering of $On Turret Fired hooks as well as the setting of a few weapon variables. Makes sure that the variables only get set when a weapon is actually created and that all the weapon variables have been set before the hook is triggered. 2012-02-14 01:04:08 +00:00
Zacam 583c9ac6ee Backport: Trunk r8444; Minor optimization when rendering tris that do not use distortion effects and therefore do not require calling glDrawBuffers. 2012-02-14 01:03:19 +00:00
Zacam 1917578c82 Backport: Trunk r8443; Fixed Mantis 2413. hud-set-color changes to the HUD will no longer reset when pausing or entering options menu. Introduced Color entry fields for hud_gauges.tbl. 2012-02-14 01:02:35 +00:00
Zacam 96d35f010a Backport: Trunk r8442; Fix for mantis #0002597: fix some GCC compiler warnings 2012-02-14 01:01:34 +00:00
Zacam 0313a452fa Backport: Trunk r8441; Removed configOverride from HudGauge class since we don't even use it. 2012-02-14 01:00:50 +00:00
Zacam 5de995b5dd Backport: Trunk r8437 + r8438; Makes the $AliveSnd, $DeadSnd and $RotationSnd entries for subsystems work. NOTE: This will apparently not work correctly for nested subsystems. && Make the OS_SUBSYS_ROTATION sound depend on the SSF_ROTATES flag 2012-02-14 00:59:56 +00:00
Zacam b0452f08f2 Backport: Trunk r8436; Removing superfluous SSM alert message spawning. 2012-02-14 00:58:51 +00:00
Zacam f54f348f19 Backport: Trunk r8432; Make $FlyBySnd actually do something and allow primaries as well. 2012-02-14 00:58:12 +00:00
Zacam 4530f04484 Backport: Trunk r8427; Fix for mantis #0002593: structs containing vectors don't like being memset to zero... 2012-02-14 00:57:17 +00:00
Zacam 14c708be24 Backport: Trunk r8426; Fix for Mantis 2534: Separate Warp IN and OUT when checking if the thrusters are behind the clip plane and don't do any checks for the "Hyperspace" warp type 2012-02-14 00:56:29 +00:00
Zacam 84dee408ad Backport: Trunk r8423 + 8424; Given how often the particle shaders are called, moving them up to the beginning of the shaders array makes sense. && Add a random offset to the thruster distortion to make thruster clusters look better. 2012-02-14 00:55:44 +00:00
Zacam 1601a5b270 Backport: Trunk r8418 + r8419 + r8449; Fix for Mantis 2588: Messages without voice files now show the target brackets for at least "Message Length" * 100ms && 100ms was perhaps a bit too long. The answer is, of course, 42. Wait, what was the question...? && Don't wait for brackets for messages without a target. 2012-02-14 00:53:48 +00:00
Zacam 60ea1c4f7f Backport: Trunk r8417 + r8420; From Swifty: Alternative fix to the font distortion problem by glyph realignment at the font creation phase rather than by manipulating the draw stage. http://www.hard-light.net/forums/index.php?topic=79807.0 && Apologies to Swifty, this line change got truncated from the Font Fix. 2012-02-14 00:52:07 +00:00
Zacam 6eeb7e5c0c Backport: Trunk r8416; Fix for the Fix for Mantis #2374: Had only updated the Effect 2 portion of the missionscreencommon. Don't I feel silly now. Did a little housekeeping while at it. 2012-02-14 00:50:53 +00:00
Zacam f61eed4dbb Backport: Trunk r8414; Fix for Mantis #2374: Adds "+Closeup_pos:" and "+Closeup_zoom:" as entries following "$Tech Model:" for the weapons.tbl. For entries not using a dedicated $Tech Model, simply specify the $Tech Model as the same POF used in $Model to adjust Loadout Screen viewing position and zoom. 2012-02-14 00:49:53 +00:00
Zacam 380f4e31b5 Backport: Trunk r8413; Fix for mantis #0002590: fix array overruns caused by starting wings have > MAX_WING_SLOTS ships 2012-02-14 00:48:41 +00:00
Zacam ab18bfacad Backport: Trunk r8412; more robust saving of dockpoint indexes (again for Mantis #2587) 2012-02-14 00:47:58 +00:00
Zacam 07f58a21a1 Backport: Trunk r8407; Fix for Mantis 2589: Deactivate the Special* buttons while no ship is selected 2012-02-14 00:47:04 +00:00
Zacam 7e6aae12ca Backport: Trunk r8406; Fix for Mantis 2458: Initialize stuff before calling the point_to_vec function so it has the right matrices for calculation, also fixed scripted sphere drawing 2012-02-14 00:46:16 +00:00
Zacam 26afaaf56e Backport: Trunk r8400; undo animations for undockings that happen from exploding or jettisoning cargo 2012-02-14 00:45:15 +00:00
Zacam d81fa6bbe2 Backport: Trunk r8398; fix Mantis #2587 2012-02-13 21:18:36 +00:00
Zacam b6a94ff3fe Backport: Trunk r8397; tweaks 2012-02-13 21:17:48 +00:00
Zacam 9182a31173 Backport: Trunk r8396; Vasudan Admiral's fix for the modelanim code 2012-02-13 21:16:57 +00:00
Zacam bb5da5b6f7 Backport: Trunk r8395; Fix for mantis #0002591: add braces based on code indentation 2012-02-13 21:15:53 +00:00
Zacam ac25e6ddfa Backport: Trunk r8394; remove another four warnings 2012-02-13 21:15:05 +00:00
Zacam ddf0737133 Backport: Trunk r8393; remove warning 2012-02-13 21:14:18 +00:00
Zacam 0b3f745c59 Backport: Trunk r8389 + r8390 + r8391 + r8392; wait until animation finishes before separating during undocking && VA says this might work? && derp fixes 2012-02-13 21:13:35 +00:00
Zacam ad33b70fb6 Backport: Trunk r8388; Fix for Mantis 2521: Don't use the ship list for updating when we're in the middle of creating it. 2012-02-13 21:11:17 +00:00
Zacam 3c97ebbb75 Backport: Trunk r8385; Fix for Mantis 2538: From Eli2, corrects for looping fade issue reported by FelixJim. 2012-02-13 21:10:26 +00:00
Zacam 9f19cd1a41 Backport: Trunk r8383; Fix for mantis #0002370: ignore missing starting wing indexes during mission restart 2012-02-13 21:09:19 +00:00
Zacam 336283eedc Backport: Trunk r8382; two new sexps, signum and trigger-submodel-animation. also, fix a smattering of missing sexp stuff from other people's commits such as argument types, validity checking, putting things in submenus, and using is_sexp_true 2012-02-13 21:08:18 +00:00
Zacam e2d293a2e4 Backport: Trunk r8378 + r8379 + r8381; enhancement for bug 2582: trigger animations on BOTH ships undergoing docking && docking code some more. add code logic to (theoretically) set submodels instantly to initial or final positions && Fix to Trunk r8379, for want of a ; a compile was lost. 2012-02-13 21:07:25 +00:00
Zacam 4da71f5ed8 Backport: Trunk r8377; remove unnecessary warning 2012-02-13 21:05:24 +00:00
chief1983 4821c7b92e RC4 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-01-26 05:47:25 +00:00
chief1983 9e6b964b4b Backport: Trunk 8373; partial fix for Mantis #2582:
--add Vasudan Admiral's fix for setting submodels to their initial positions
--add trigger for moving submodels to their docked positions when an initially-docked ship arrives
2012-01-26 05:27:06 +00:00
chief1983 d15856e2ba Backport: Trunk 8369; From Eli2: Mantis #2538: Fade-in time limitation. Testing in Multiplayer as well, no drastic incompatibility found. (If the host is patched but the client is not, then the timing returns are a little funny, but it doesn't cause for any crashes) 2012-01-25 21:37:25 +00:00
chief1983 827ada1960 Backport: Trunk 8368; Fix for Mantis 2556: Check if the mouse cursor is really there before drawing it. 2012-01-25 21:19:10 +00:00
chief1983 9cfac8dc42 Backport: Trunk 8363; Fix for Mantis 2583: Reinitialize the timer right when changing selection modes. 2012-01-24 00:19:14 +00:00
chief1983 03ad562905 Backport: Trunk r8362; Makes a very strangely coded warning more readable and useful. 2012-01-24 00:18:31 +00:00
chief1983 02d638a05a Backport: Trunk r8361; upgrades to the docking system to incorporate docking animations -- incidentally, fixes Mantis #2581. also, remove DOCK_BACKUP_RETURN_VAL which never did anything even in retail 2012-01-24 00:14:49 +00:00
chief1983 880b7b68eb Backport: Trunk 8344; Fix for Mantis 2580: Use the texture matrix in the vertex shader to support texture panning. 2012-01-23 23:16:58 +00:00
chief1983 160180b230 Backport: Trunk 8329; fix Mantis #2579 2012-01-23 23:16:30 +00:00
chief1983 82d5b218e3 Backport: Trunk 8327 + 8341; Fix for Mantis 1997: 'Filename too long' warning for nonexistant textures. && Followup to 8327: Texture names from pofs are provided without extension, so we have to make sure to account for it. 2012-01-23 23:06:05 +00:00
chief1983 9d6f75e4fe Backport: Trunk 8326; Fixes #2578 - Change the < in these checks against NAME_LENGTH to <=. 2012-01-23 23:04:12 +00:00
chief1983 269574af5c Backport: Trunk 8305; quash a warning 2012-01-23 23:01:18 +00:00
chief1983 9670d16537 Backport: Trunk 8304; Documentation: pedantic rename of this function to describe it better 2012-01-23 23:00:34 +00:00
chief1983 44706c03a1 Backport: Trunk 8301; Documentation: Missionweaponchoice.cpp and related changes. Removed a few redundant functions. 2012-01-23 23:00:04 +00:00
chief1983 5242a38755 Backport: Trunk 8300; don't remove the escort flag from invisible ships that aren't on the escort list (fixes Mantis #2057). also, don't remove dead or dying ships from the escort list, because due to the design of the culling function, they were never removed previously 2012-01-23 22:59:19 +00:00
chief1983 97382b69ca Backport: Trunk 8299 + 8302; the proper way to fix Mantis #2441 is by modifying the team_visibility_update function && follow-up to 8299: we need to check visibility for our own team in case we have a friendly-stealth-invisible ship covered by AWACS, or something\nalso, clarify terminology: in-frustum/not-in-frustum replaces visible/invisible\nand do some minor rewrites for additional clarification 2012-01-23 22:56:02 +00:00
chief1983 3131006fd5 Backport: Trunk 8298 + 8350; From Valathil: Adjusts view point rotation in 3rd Person/chase view. This is especially apparent in Nebula missions where rotating in Chase View is radically different from cockpit view. This fix corrects that, and has additionally been tested in Multiplayer. && Follow up to 8289 + 8310: Make the sprite rotation independent of the camera direction and revert the docking change and make it simpler 2012-01-23 22:53:33 +00:00
chief1983 87f4c064f7 Backport: Trunk 8297; Purely aesthetic. I have no idea what a packlock is. 2012-01-23 22:37:35 +00:00
chief1983 c1ad2ed64f Backport: Trunk 8295; tie scramble-messages and unscramble-messages into the communications subsystem status so that they will affect all aspects of communications in a consistent way (squadmsg menu, dashed text, etc.)also make hud_communications_state() be a pure function, i.e. one without side effectsalso fixes Mantis #2577 2012-01-23 22:36:01 +00:00
chief1983 2b91bfb98a Backport: Trunk 8294; Fix for Mantis 2575: Don't increment array indices without checking for the maximum. 2012-01-23 22:22:33 +00:00
chief1983 0c33d511b0 Backport: Trunk 8293; Small scripting documentation fix: modeltextures -> modeltextures_h. 2012-01-23 22:21:49 +00:00
chief1983 0467fbb289 Backport: Trunk 8291; Fix a few unused variable warnings that popped up after recent commits by Echelon9 2012-01-23 22:20:59 +00:00
chief1983 910046729b Backport: Trunk 8289 + 8310; Fix for Mantis 2522: Moved the calculation of the sprite rotation to get the updated orientation matrix after dock calculation. && Follow up to 8289: Change the rotation back to relative cause of flipping out billboards at certain viewing angles and fix the dock rotation another way. 2012-01-23 18:18:54 +00:00
Zacam 73ef4c52df Backport: Trunk 8274-8286; LLVM Warnings Fixes from Echelon9. 2012-01-23 18:11:25 +00:00
chief1983 4a3b9f9b76 Backport: Trunk 8272; Fix for Mantis 2576: Use the beam direction as the applied force vector 2012-01-23 05:00:22 +00:00
chief1983 b4ce4b3f85 Backport: Trunk 8270; Fix for Mantis 2461: Check to see if the reduced damp timestamp is valid so we don't get ridiculous acceleration values. 2012-01-23 04:59:41 +00:00
chief1983 2cb514ab3f Backport: Trunk 8269; These error messages need to be waay clearer 2012-01-23 04:59:07 +00:00
chief1983 2d8861e2d1 Backport: Trunk 8266; Fix for Mantis 2574: Timestamps do not work that way, also fixed the rapid fire "Out of Energy" sound for fighter beams. 2012-01-23 04:58:29 +00:00
chief1983 78e9e431e4 Backport: Trunk 8265; Fix for Mantis 2553: Fix overdrawing subspace glows by changing them from thrusters to normal bitmaps therefore avoiding a render time problem with the thruster geometry batcher. 2012-01-23 04:57:30 +00:00
chief1983 f5a192c27c Backport: Trunk 8263 + 8271; Fix for Mantis 2573: Special Hitpoint settings get carried over when deleting and adding ships in FRED && update to revision 8263: one should probably reset the special shields if you reset special hitpoints 2012-01-23 04:56:33 +00:00
chief1983 97dd5149cd Backport: Trunk 8262; need to use subsystem_stricmp for subsystems 2012-01-23 04:54:20 +00:00
chief1983 26a0ffe6ee Backport: Trunk 8261; Fix for Mantis 2572: Just dont render 0.0 Laser Length weapons 2012-01-23 04:53:43 +00:00
chief1983 52f3e10c80 Backport: Trunk 8260; Fix for mantis #0002480: when emptying secondary banks use the standard function... 2012-01-23 04:52:47 +00:00
chief1983 37ac788606 Backport: Trunk 8254; Fixes #2571 - Changes a value in each config to match the config name. 2012-01-23 04:47:28 +00:00
Zacam 844b3bab4f RC3 Build Stage Commit: Correction to configure.ac and Revision bump to this commit version. 2012-01-18 04:49:57 +00:00
Zacam 32977365d0 RC3 BUILD STAGE COMMIT: Redux and version update to this commit. 2012-01-16 00:39:03 +00:00
Zacam 78289b4802 Backport: Trunk 8233; Made the failure message for failed model loads include the model filename. 2012-01-16 00:32:07 +00:00
Zacam 4e6b031bb9 backport: Trunk 8232 + 8237; Fix for Mantis 2441: "friendly-stealth-invisible" flag doesn't work 2012-01-16 00:31:26 +00:00
Zacam 41c834157d Backport: Trunk 8231; Fix for Mantis 1768: Cutscene bars do not display properly. 2012-01-16 00:30:17 +00:00
Zacam d4c2e9727e Backport: Trunk 8227; Fix for Mantis #0002443: allow primary weapons to have fire_waits longer than 5 secs 2012-01-16 00:28:22 +00:00
Zacam 315e1d489c Backport: Trunk 8225; yeesh... part of the original iff_defs feature that wasn't updated 2012-01-16 00:27:46 +00:00
Zacam 259c805c63 Backport: Trunk 8224; Clear a whole set of LLVM warnings - some of these would have caused memory fubars, so should marginally improve stability 2012-01-16 00:27:05 +00:00
Zacam a944a2d9e9 Backport: Trunk 8223 + 8235; Ensure we don't leak memory on Mac OS X. Any object created with a CF*Create() function must have CFRelease() called upon it. 2012-01-16 00:22:40 +00:00
Zacam 120a780470 Backport: Trunk 8222; Fix LLVM warnings in weapon folder 2012-01-16 00:21:16 +00:00
Zacam 704f6580db Backport: Trunk 8220; Fix for #2570: Changed the external camera messages to be IFF color and internal messages back to green 2012-01-16 00:20:38 +00:00
Zacam 361e7ae590 Backport: Trunk 8219; Fix for #2549 & #2457 - Fixed rendering of bars and moved earlier in code so we dont overdraw the hud messages 2012-01-16 00:19:56 +00:00
Zacam f556a6694d Backport: Trunk 8218; Fix for Mantis 1803: Lensflares are rendered with no sun in sight 2012-01-16 00:19:20 +00:00
Zacam 5735d59fdd Backport: Trunk 8216; Fix OpenGL errors caused by animated shaders when not rendering to a fbo 2012-01-16 00:18:37 +00:00
Zacam 3989ce21aa Backport: Trunk 8215; Fix "Unable to get shader uniform location" warning for distortion shaders 2012-01-16 00:17:55 +00:00
Zacam bfd30fa3d8 Backport: Trunk 8214; Fix for Mantis 2568: "Fog Near/Far Mult:" being written to mission files even when in retail compatibility mode. 2012-01-16 00:16:32 +00:00
Zacam 55801b8941 Backport: Trunk 8212; Fix for #2567 - LLVM warning: Semantic issue in lua.cpp 2012-01-16 00:15:38 +00:00
Zacam 8bcd195e48 Backport Revert (8180): Reverting the backport of Trunk 8216. 2012-01-16 00:02:11 +00:00
Zacam 832db695ec Okay. This was ridiculous running all these changes separately. This setts svn:eol-type across the board for types that were not previously set to LF as they should have been. 2012-01-13 18:44:18 +00:00
Zacam 0d747ad3b8 RC3 BUILD STAGE COMMIT: Sets Revision and Version properties to this commit version. 2012-01-12 22:25:28 +00:00
Zacam ebb5206315 And to finally clean up the compiler issues caused by TortoiseSVN being a wanker in merging across some of the backports. This returns .14 to being Stable again. 2012-01-12 22:05:56 +00:00
Zacam d5c8494297 Fixes def_files merge of the 8171 Backport commit of Trunk 8109. 2012-01-12 20:47:43 +00:00
Zacam 40071290f2 Backport: Trunk 8056; zookeeper's addition of new scripting hook that runs right before entering mission.
(Required for Backport of Trunk 8102)
2012-01-12 20:11:02 +00:00
Zacam cc6050b711 Backport: Documentation Update. This copies the documentation related changes from Trunk as a unified commit. 2012-01-12 20:01:30 +00:00
Zacam 97e9d9e8d6 Back in Commit 7843 of this branch, a sync to Trunk 7842 took place.
This sync was incompletely done, resulting in the following to be missing:
7815 - Set-docked SEXP
7834/7835 - Update to ad.playMusic to allow control over whether or not to loop the passed sound file.
7841 - From m!m: Allows per-ship customization of ship sounds in ships.tbl. See Wiki for details.
2012-01-12 19:05:14 +00:00
Zacam 838ae6eee2 Backport: Trunk 8164; Fix for #2559 - new frameworks file that strips the metadata files out of the archive. 2012-01-12 03:28:32 +00:00
Zacam ed71fe08df Backport: Trunk 8163; Make sure the FXAA pass only draws to COLOR_ATTACHMENT0 2012-01-12 03:26:39 +00:00
Zacam de5f6671ea Backport: Trunk 8160; Change the define to one that is a little less confusing. 2012-01-12 03:25:23 +00:00
Zacam 933b9422d8 Backport: Trunk 8159; Not that it matters much since it's that's what it's ending up as anyway but since the variable that uses it was switched to unsigned we might as well change this. 2012-01-12 03:24:44 +00:00
Zacam 55edb850a7 Backport: Trunk 8158; Fix for Mantis #2558 : Resolves the issue by updating the libpng provided to version 1.5.7. 2012-01-12 03:23:50 +00:00
Zacam 14d3a1a007 Backport: Trunk 8157; Made WIF2_SMALL_ONLY weapons on turrets not fire on HUGE ships when grouped with other weapons that are not WIF2_SMALL_ONLY 2012-01-12 03:22:41 +00:00
Zacam b7de7ae422 Backport: Trunk 8155; Another Assert->Assertion change. Also changes parsing code to throw warnings when a shockwaves' inner radius is zero. 2012-01-12 03:21:52 +00:00
Zacam c3bc4ba563 Backport: Trunk 8128; Removed an unused #define 2012-01-12 03:16:43 +00:00
Zacam f97c5059f0 Backport: Trunk 8126; Remove a magic number. This number will probably become something defined in mod.tbl eventually but for now at least it's easy to find again. 2012-01-12 03:15:41 +00:00
Zacam 4f62a53354 Backport: Trunk 8125; Training weapons shouldn't cause smoke to come off of ships which haven't really taken any damage. 2012-01-12 03:13:30 +00:00
Zacam 708c0ae8fa Backport: Trunk 8124; Switch from the directive-is-variable SEXP to the more powerful directive-value one. 2012-01-12 03:12:39 +00:00
Zacam 8740115165 Backport: Trunk 8120; Fixed font rendering at high resolutions 2012-01-12 03:11:56 +00:00
Zacam b75151cef1 Backport: Trunk 8116; Fixing an old mistake I made back in September 2010. Note: Assertions are optimized out of release builds, leaving this necessary skip out. 2012-01-12 03:11:14 +00:00
Zacam a998afffe4 Backport: Trunk 8115; Make sure to include the right lua headers on all platforms, as pointed out by rhl. 2012-01-12 03:10:13 +00:00
Zacam eeaf958420 Backport: Trunk 8114; We do need to bind the correct depth buffer for rendering, else things get all confused. 2012-01-12 03:09:35 +00:00
Zacam 2cd28541e7 Backport: Trunk 8111; From m|m: Fix for Mantis 2400 (RTT rendering broken in current builds). Also changes GL_rendering_to_framebuffer to the more aptly named GL_rendering_to_texture. 2012-01-12 03:02:49 +00:00
Zacam 596bae9cfa Backport: Trunk 8110; Adjust alignment when shader debug logs are written. 2012-01-12 02:55:25 +00:00
Zacam 1176523e9d Backport: Trunk 8109; Added hardware accelerated YUV to RGB conversion with shaders to the ogg video renderpath. 2012-01-12 02:54:38 +00:00
Zacam d9a29ac708 Backport: Trunk 8108; Adds an intermediate render target for FXAA to work against, this removes a previous reliance on undocumented behaviour in OpenGL. 2012-01-12 02:46:55 +00:00
Zacam f4fa2e00a2 Backport: Trunk 8107; Allow for FS1 shader effect to be customized in post_process.tbl 2012-01-12 02:46:03 +00:00
Zacam 2167ece1fd Backport: Trunk 8104; Removed the unused "Ghost Save" entry from Object_type_names, because it was causing an off-by-one when using the getBreedName() scripting function. Also added "Beam" to the list since it's a valid object type. 2012-01-12 02:44:33 +00:00
Zacam bca3d084a5 Backport: Trunk 8103; Fix for Mantis 2498: Invalid species reference in ships.tbl is not detected. 2012-01-12 02:43:11 +00:00
Zacam bbc0eec0ba Backport: Trunk 8102; from zookeeper: make hv.Player availiable in "$On Gameplay Start" scripting hook 2012-01-12 02:42:04 +00:00
Zacam a5684ba6cf Backport: Trunk 7981/810; zookeeper: fix $Shots for turret-fired weapons, with fix to from Valathil. 2012-01-05 22:34:15 +00:00
Zacam 2a2c5856c3 Backport: Trunk 8099; Fix for Mantis 2545: Default ship in FRED is not the ship defined by #Default Player Ship 2012-01-05 22:32:33 +00:00
Zacam 3a951225e9 Backport: Trunk 8098; Fix for Mantis 2550: Text in multiplayer is rendered outside the textbox if custom fonts are in use 2012-01-05 22:31:50 +00:00
Zacam 3f7b0b1c8f Backport: Trunk 8097; fix for Mantis #2547 2012-01-05 22:30:36 +00:00
Zacam edb67c1b17 Backport: Trunk 8096; make sexp category stuff accessible, fix Mantis #2551 2012-01-05 22:29:53 +00:00
Zacam 12d27b7913 Backport: Trunk 8059; Hellzed's french keyboard layout stuff 2012-01-05 22:24:19 +00:00
Zacam e6f0fe4ffb Backport: Trunk 7905/7906; From Eli2: Allows adjustment of the keyboard layout on Linux/MacOS (German, '-keyboard_layout qwertz') 2012-01-05 22:23:36 +00:00
Zacam fcf6cec066 Backport: Trunk 8028; zookeeper's initial velocity patch 2012-01-05 22:22:10 +00:00
Zacam c2896f83f6 Backport: Trunk 8013; That's a rather pointless test when we don't have AI smart missiles. 2012-01-05 22:21:17 +00:00
Zacam a2f8be65ae Backport: Trunk 7993; Add $Armor Type support for missiles 2012-01-05 22:20:35 +00:00
Zacam 53c0b4ae35 Backport: Trunk 7992; Clean up Ship Maneuvers, Improve SEXP Help for 2012-01-05 22:19:49 +00:00
Zacam 5ebae3603d Backport: Trunk 7991; Add "only target if can fire" turret flag 2012-01-05 22:19:08 +00:00
Zacam 7853397544 Backport: Trunk 7988; cfile: change Assert to Assertion 2012-01-05 22:18:18 +00:00
Zacam 3241e58eaa Backport: Trunk 7969; Add workaround so that AI landings consistently work 2012-01-05 22:16:32 +00:00
Zacam 4e9f4af398 Backport: Trunk 7960; Originally spotted by zookeeper: "$gun_rotation:" should be set to "!= NULL" like the other entries around it. 2012-01-05 22:15:42 +00:00
Zacam 80462cb097 Backport: Trunk 7929; the ship copy flag needs to be able to recognize ships that appear later in the table 2012-01-05 22:14:56 +00:00
Zacam 1a2588cfba Backport: Trunk 7928; we have some preconditions, so let's enforce them 2012-01-05 22:14:11 +00:00
Zacam d12fee5955 RC2 BUILD STAGE COMMIT (For Reals this time). Updates version information for logging to sync to this commit. 2011-12-13 18:07:25 +00:00
Zacam 4a120433e8 Backport: Trunk r8066+8068; Adds a sexp to switch the thrusters on a given ship or list of ships on and off. (Includes fix to infinite loops) 2011-12-13 16:37:33 +00:00
Zacam 80730a2ffa Backport: Trunk r7986; add is-in-mission sexp 2011-12-13 16:35:55 +00:00
Zacam 4910a0239b Backport: Trunk r8086; Fix to the sexp_ship_effect causing an assert when used against ships that get destroyed before the event triggering it fires off. (From The E) 2011-12-13 16:34:02 +00:00
The_E 36e7ebea4a Backport of trunk 8083: Fix for trunkated command briefings with custom fonts. 2011-12-13 16:15:11 +00:00
Zacam 746f86883d RC2 BUILD STAGE COMMIT (Take 3); Bump OS X build output names to 3.6.14-RC2 (no formulative revision change to logging however, will still identify as 8075) 2011-12-08 23:15:52 +00:00
Zacam beb0aec724 RC2 BUILD STAGE COMMIT (Take 2); Version information bumped to match this commit revision. 2011-12-08 23:10:35 +00:00
Zacam 8cf10625bc Backport: Trunk r8072; Fix stdint's existence breaking OS X compiling. 2011-12-08 23:07:34 +00:00
Zacam e1e5895749 Backport: Trunk r8070; Fix crash when framebuffer shockwaves are enabled but no weapon loads the standard shockwave animation 2011-12-08 23:06:28 +00:00
Zacam e8556981d3 Backport: Trunk r8065; Fix r8054: Const char* to char* conversion was causing GCC compile errors 2011-12-08 23:05:42 +00:00
Zacam b796f523e3 RC2 BUILD STAGE COMMIT; Version information bumped to match this commit revision. 2011-12-03 15:15:41 +00:00
Zacam bf6d547cd5 Backport: Trunk 8054; make weapon parsing more robust for Mantis #2369 2011-12-03 14:45:14 +00:00
Zacam c827121e1a Backport: Trunk 8052/8053; From CommanderDJ: Nebula distance check for set-object-position's regeneration of local nebula. Since "neb2_eye_changed()" contains "Neb2_regen" why not use it instead? 2011-12-03 14:44:29 +00:00
Zacam 130e254c89 Fix to Backport of 7971: when adding more lines to an if, braces are your friend. 2011-11-23 05:13:22 +00:00
Zacam 708e8d3d6c Backport: Trunk 8040; LOL and DERP, whoever coded this didn't even read his own comment 2011-11-23 03:39:48 +00:00
Zacam b3420befc7 Backport: Trunk 7907/7908; Geometry and Distortion map batcher adjustments. 2011-11-22 23:55:02 +00:00
Zacam b347ea17e8 Backport: Trunk 7971; Fix Mantis 2343: Assert on arriving from destroyed ship 2011-11-22 21:36:15 +00:00
Zacam 02fe9d3243 Backport: Trunk 7967; Mantis 2537: Help track down a memory leak problem 2011-11-22 21:35:17 +00:00
Zacam 985da615ba Backport: Trunk 7966; Fix Mantis 2539: Valgrind: Memory leak - parse_ship_values(ship_info*, bool, bool, bool) 2011-11-22 21:34:03 +00:00
Zacam ac406437ae Backport: Trunk 7921; Fix Mantis 2526: Valgrind: Conditional jump or move depends on uninitialized value(s) - init_anim_instance() 2011-11-22 21:33:10 +00:00
Zacam f2eef10a61 Backport: Trunk 7920; Fix Mantis 2525: Valgrind: Conditional jump or move depends on uninitialized value(s) - parse_ship_values() 2011-11-22 21:32:14 +00:00
Zacam af7e811cf1 Backport: Trunk 7962, 7963, 7974, 7976; Fix for Mantis 2533 from Eli2: Integer overflow in mission-time-msecs (with fixes from The E and inclusion of stdint.h and inttypes.h) 2011-11-22 21:28:46 +00:00
Zacam 95e924b6ce Backport: Trunk 7985; fix compilation on MSVC 6 2011-11-22 19:03:23 +00:00
Zacam c91f65e274 Backport: Trunk 7957; Linux: remove -g (debug symbols) flag from release builds & switch optimisations from -Os -to -O2 2011-11-22 18:58:36 +00:00
Zacam 721d529776 Backport: Trunk 7918; From ni1s: -Wreorder warnings clean up for GCC output. 2011-11-22 18:56:21 +00:00
Zacam 458b67e0fc Backport: Trunk 7902; Wrong EOL type on these two. 2011-11-19 21:56:44 +00:00
Zacam 6b9a61dae0 Backport: Trunk 7890; Remove unneeded warnings 2011-11-19 21:55:38 +00:00
Zacam 9f2a038976 Backport: Trunk 7889; From m\!m: access to the Viewer_mode as I need to know if the view is currently in the cockpit or not 2011-11-19 21:54:09 +00:00
Zacam 96486ad64a Backport: Trunk 7887; Change the log message here to better explain what's happening. 2011-11-19 21:53:14 +00:00
Zacam c6155a784c Backport: Trunk 7885; From Eli2: fix for mantis 2517: loop sounds are always at 100% volume locked and afterburner fade out sound not work 2011-11-19 21:52:25 +00:00
Zacam e7b8feef5f Backport: Trunk 7884; Testing Assert() to track down a series of bugs reported by QuantumDelta 2011-11-19 21:51:32 +00:00
Zacam cf684e67c0 Backport: Trunk 7882; found by Valathil; in "int obj_in_view_cone( object * objp )", codes=g3_rotate_vector(&tmp,&pt); works out better than running the check, then discarding it since g3_code_vector calls to run g3_rotate_vector anyway. 2011-11-19 21:50:16 +00:00
Zacam 535a9ec32b Backport: Trunk 7879; Adds Success/Average/Fail music selections to the Debriefing Editor. 2011-11-19 21:48:31 +00:00
Zacam b7fdae636a Backport: Trunk 7847; From Eli2: Patch for Mantis 2489: adjust-audio-volume doesn't affect subspace 2011-11-19 21:47:07 +00:00
The_E 4dfb17ab01 Backport of trunk 7997: Extended patch for Mantis 2391 2011-11-16 18:15:22 +00:00
The_E bdda953b21 Backport of Trunk 7996: Fix for Mantis 2544 2011-11-16 18:14:21 +00:00
The_E 767bb5c862 Backport of trunk 7995: Fix for Mantis 2543 2011-11-16 18:13:25 +00:00
niffiwan aa07330f1e Linux: include version in output binary names 2011-11-05 10:03:38 +00:00
chief1983 66f0dec8f4 Backport of Trunk r7939: From niffiwan: Fix our linking order to work with --as-needed 2011-11-02 21:04:30 +00:00
Zacam 16322a4a88 RC1 BUILD STAGE: Take 2. Corrects modelinterp issue by replacing the "SCP_" vectors with "std::" vectors. Corrects 2008 Speech compilation. Increases internal Revision to 7903. 2011-10-12 19:49:12 +00:00
Zacam 9c78519420 RC1 BUILD STAGE COMMIT: This will set the "Revision" value for output builds to "7899" so that troubleshooting/tracking can accurately asses version information.
Also updates the windows execs to report the version in the file system properties.
2011-10-12 17:35:51 +00:00
Zacam 3806a4ed9f Backport: Trunk r7898; Improve performance of jpeg byte swap operation 2011-10-12 16:11:54 +00:00
Zacam d3b61db4a0 Backport: Trunk r7895; Fix the transparency delay framework to work with submodel_render() 2011-10-11 18:49:38 +00:00
Zacam caaf6526fe Backport: Trunk r7891; Add RGB / BGR byte swap to jpeg reading - libjpeg now doesn't need jmorecfg.h to be updated 2011-10-11 05:47:33 +00:00
Zacam d8633494fb Backport: Trunk r7874; Fix for medal room crash reported by QuantumDelta 2011-10-08 08:12:22 +00:00
Zacam 3345b78f18 Backport: Trunk 7871; Fixes issue with the mn.Asteroids and mn.Debris scripting tables, as these were accidentally 0-indexed instead of the Lua-standard way of starting indices from 1. 2011-10-08 08:10:06 +00:00
Zacam d9b69e290d Backport: Trunk r7861; Remove the empty hudresource.cpp/.h files from /code/hud and all projects. 2011-10-06 06:07:09 +00:00
Zacam d48da6e765 Backport: Trunk r7862; enhance are-waypoints-done-delay to allow ships to complete waypoint paths multiple times
make count check more robust in has-docked-delay and has-undocked-delay; Assert shouldn't be used for mission data entered in FRED
2011-10-06 06:06:05 +00:00
Zacam 8d35cbcfb2 Backport: Trunk r7859; PVS-Studio V581 in revision 7779 was actually a false alarm; overzealous cleanup created a condition where a negative array index could occur, triggering either an assert or a crash (Mantis #2514) 2011-10-06 06:05:15 +00:00
Zacam 6645dae670 Backport: Trunk r7858; Revision: 7858 CommanderDJ's fix for Mantis 2276 set-object-speed SEXPs don't work in multiplayer. 2011-10-06 06:04:20 +00:00
Zacam 35f1394997 Backport: Trunk r7853; Fix: Mantis 2470 - $Flags: ("untargetable") does not work on turret subsystems 2011-10-06 06:03:24 +00:00
Zacam 45b3efd0fc Backport: Trunk r7845; Finish removing debugfile.cpp/h from the rest of the projects. 2011-10-06 06:02:17 +00:00
The_E c599d359cf Sync to trunk 7842 due to bugfixes and and feature additions for the scripting API 2011-10-02 07:47:31 +00:00
Zacam e870a9cb63 Backport: Trunk 9728, restore sound index to gamesnd.h 2011-09-30 05:06:04 +00:00
Zacam b081e42418 Backport: Re-apply fix for Mantis 2477 from niffiwan (Trunk 7825) 2011-09-28 17:25:53 +00:00
Zacam f2ebe497c6 A bunch of audio code hacks to address the concerns in http://www.hard-light.net/forums/index.php?topic=77889.0 until proper fixes of the sound code are completed.
+F -donotenforce = to turn off concurrent playback limit for sounds.
+F -percent_flashtobang = sets the default percentage of nebula flashes get converted to bangs.  Default is 50, max 100, min 0.
+T lightning.tbl +flash_to_bang_percent: = sets the percentage of nebula flashes that get converted to bangs for the storm type.
-- Audio gain of OpenAL is set to 65% of max.
2011-09-27 21:22:35 +00:00
Zacam b8530023db Updates Build output names and XCode embedded version. 2011-09-27 21:04:46 +00:00
chief1983 d076e9ae95 Copy trunk r7811 to 3.6.14 branch. 2011-09-26 18:23:27 +00:00
niffiwan ece4ad88bc Fix for mantis 2501 2011-09-26 11:17:06 +00:00
Zacam 02a23b22b1 From CommanderDJ: Fix for Mantis 2224 "Chat messages may end up unreadable due to unfortunate color choice"
Allows for the specification of colors via a colors.tbl
(Wiki Documentation here: http://www.hard-light.net/wiki/index.php/Colors.tbl )
2011-09-26 05:40:07 +00:00
The_E 9710f64934 Aargh. NOW it's fixed correctly 2011-09-25 20:47:31 +00:00
The_E e8d36eac79 And a final fix here 2011-09-25 20:46:22 +00:00
The_E c052cbe1e2 Fix for subsystem flags resetting erroneously. Thanks to zookeeper for noticing this. 2011-09-25 10:50:08 +00:00
Zacam 206279c5fd Sync Drift: Apparently still some lingering ifdefs for OEM/Multiplayer_Beta and non-AP specific things not having made it to trunk for some reason. 2011-09-25 08:26:45 +00:00
The_E 6b90b35f56 FRom CommanderDJ: Patch for Mantis 2307, set-object-position weirdness when in nebula 2011-09-25 07:50:07 +00:00
IssMneur 1ac6127251 Fixes Mantis 2510 - Rotation periods for submodels of less than 1.0 seconds cause uncontrolled rotation of submodel. 2011-09-25 04:00:06 +00:00
Echelon9 e3195a82d6 Code cleanup: We should be really careful with using these scoring struct elements, as the types were changed from ushort to int at some point. 2011-09-25 02:42:27 +00:00
The_E 0f51dc1925 Redo 7777 without breaking anything else in the process 2011-09-24 19:47:47 +00:00
The_E 531a7c71bb Revert 7791. Something went wrong there. 2011-09-24 18:31:20 +00:00
The_E 4ce7dfe9e4 Revert 7789 2011-09-24 17:42:56 +00:00
The_E a982eb153d Remove more useless encryption stuff. NOTE FOR PROJECT FILE MAINTAINERS: parse/encrypt.(cpp|h) should no longer be part of the project. 2011-09-24 17:37:12 +00:00
The_E b964c63d6e From niffiwan: Fix for Mantis 2477 2011-09-24 15:59:00 +00:00
The_E 24d6ca3bad PVS Studio related: False alarms 2011-09-24 15:46:24 +00:00
The_E 5f0cf81cd2 PVS Studio fix: Rearranged struct to decrease size 2011-09-24 15:46:03 +00:00
The_E 6511cfdddf From eli2: Change the control defines into a more manageable enum 2011-09-24 15:45:13 +00:00
The_E 05f3578109 PVS Studio fix: V547, <variable> >= 0 check on size_t variable 2011-09-24 14:26:04 +00:00
The_E 0e66893f32 Remove unused variable 2011-09-24 14:22:35 +00:00
Echelon9 cd1cc88640 Xcode project file cleanup: Xcode 3 thinks these sections are unnecessary after the encrypt.cpp file was removed recently 2011-09-24 01:35:19 +00:00
Echelon9 7d9ea6b21c Documenation: Code cleanup of keycontrol.cpp 2011-09-24 01:34:25 +00:00
Echelon9 911025d835 A small code cleanup patch from Eli2. Thanks. 2011-09-24 01:19:29 +00:00
Echelon9 8e1c689f32 PVS-Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 2056, 2061 (multiteamselect.cpp) 2011-09-23 20:28:06 +00:00
Echelon9 2866b4fb3b PVS-Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 2039, 2044 (multiteamselect.cpp) 2011-09-23 20:27:25 +00:00
Echelon9 82a36997cb PVS-Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 2172, 2186 (sexp.cpp) 2011-09-23 20:26:32 +00:00
Echelon9 efcdac911e PVS-Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 1977, 1986 (sexp.cpp) 2011-09-23 20:24:43 +00:00
The_E ad0581dd4d Fix for Mantis 2134: set-fov sexp has no effect at mission start. This moves the camera initialization stuff up a few lines to run before game_simulation_frame, thus ensuring the main camera is set up when sexps are evaluated.
Many thanks to CommanderDJ for tracking this down.
2011-09-23 19:09:23 +00:00
Swifty e329d4542f Fixed Mantis 2502. Messages gauge will no longer calculate string sizes using the incorrect font. 2011-09-23 09:14:02 +00:00
Echelon9 586491f150 PVS-Studio fix: V512 A call of the 'memset' function will lead to underflow of the buffer '&stackFrame' (mspdb_callstack.cpp). 2011-09-22 13:42:07 +00:00
Swifty 0ab6ecd58c Further fix for Mantis 2500. Directives should now be using sexp overrides. 2011-09-22 06:28:49 +00:00
Echelon9 2db013e321 Documentation: Code cleanup of grbatch.cpp and work to prepare for 64bit with size_t 2011-09-21 14:37:36 +00:00
Zacam cf5125d6a0 Revert enabling Speech and Voice Recognition, as it doesn't play well with Express versions of MSVC (at least not without a lot of work) 2011-09-21 06:37:56 +00:00
IssMneur 023c267374 - renamed +frequency to +period to reflect what the code actually does (as Valathil pointed out)
- +period: or +index: is no longer required for $substitute: (default is +index: 0)
- removed unnecessary check on +period: (1 is now a valid period)
2011-09-20 02:47:39 +00:00
The_E c428e55ee2 Move this check outside the for loop for better performance 2011-09-19 18:01:56 +00:00
The_E 5c05db7c40 Small fix for the logic here 2011-09-19 15:53:11 +00:00
The_E e689c90703 As requested by zookeeper: Adds "play fire sound for player" subsystem flag 2011-09-18 17:31:41 +00:00
Echelon9 83bc0e33fa From niffiwan: Fix for Mantis 2468 - Change-Ship-Class does not change armor type 2011-09-18 05:24:34 +00:00
Zacam c88660eca9 Also from Eli2: Code cleanup 2011-09-18 01:03:23 +00:00
Zacam 0a4f360908 Project cleanup for the removals of cryptstring, scramble, and crypt.cpp/.h. 2011-09-18 00:35:48 +00:00
Valathil 7a810e1dde From Eli2_: Change cheat codes to not use that useless crypto function anymore 2011-09-17 23:00:58 +00:00
The_E 9f4d15b9d6 Make sure ETS settings carry over when changing ship class, as well as making sure that weapon selection are still valid after the change. 2011-09-17 22:11:34 +00:00
The_E 7751e8c076 Another case where one should use the case-insensitive check found and fixed. 2011-09-17 21:48:46 +00:00
Valathil fe8f7ebaec Reinitialize collision checks when executing the change-ship-class sexp 2011-09-17 21:02:33 +00:00
Valathil 4c4258eb6d Reordered shaders for performance reasons 2011-09-17 20:55:03 +00:00
The_E 704908f74e Since this header and cpp define a single function used in a single place, let's move the function to where it's used, and get rid of these files 2011-09-17 20:25:49 +00:00
The_E d031406000 And another obsolete tool goes away 2011-09-17 20:08:13 +00:00
The_E 75790a647d These are unused as well. 2011-09-17 20:00:29 +00:00
The_E b692311667 These files are referenced nowhere, so away they go 2011-09-17 19:53:27 +00:00
The_E b1fc8971de Little change to fix bug with external post shaders not loading 2011-09-17 19:36:24 +00:00
Valathil df80d5a1c3 Add Ships.tbl flag to disable lighting 2011-09-17 18:00:38 +00:00
Valathil 7074db9287 Don't do a boolean check on Floats could be -0.0 which is boolean true 2011-09-17 14:36:29 +00:00
The_E c4ea493f9e From m!m: Make the player object and mn.* table available in an $On Mission Start hook 2011-09-17 13:03:52 +00:00
The_E 5b53430da5 From m!m: Adds isTurret() and isAfterburnerActive() Scripting functions 2011-09-17 12:59:54 +00:00
The_E 5cb8835238 Highly experimental project files for the highly experimental MSVC 2011. 2011-09-16 21:17:02 +00:00
The_E 8c129cfc3d Reverting 7733. This is clearly not ready for primetime, let alone a release. 2011-09-16 10:01:10 +00:00
The_E 5ec132d6e4 Adding support for the $On Weapon Fired: hook going off when turret weapons are firing 2011-09-15 11:46:33 +00:00
The_E 2997266ce9 Fix for the $On Weapon fired: scripting hook firing on every frame as long as the fire button is pressed 2011-09-15 11:35:32 +00:00
Zacam 1c324758f0 Enable Text-to-Speech (SVN Include) and Voice Recognition. (MSVC 2010) 2011-09-15 03:29:05 +00:00
Zacam cc14debd26 Enable Text-to-Speech (SVN Include) and Voice Recognition. 2011-09-14 22:44:50 +00:00
Zacam 9b9b172e9e EOL inconsistencies corrected to match the rest of the files. 2011-09-14 19:25:15 +00:00
The_E 7d5bce148f strcmp != stricmp. Using stricmp is necessary to avoid breaking old missions. 2011-09-14 18:49:06 +00:00
The_E 49fe727218 Fix for the $On Weapon Fired: scripting hook 2011-09-14 12:21:45 +00:00
Backslash 28c482a2f1 Add radar gauges to Hud_gauge_types list, so that hud-activate-gauge-type sexp can affect radar. Also a bit of code sorting to make it easier to make sure all gauges are accounted for. 2011-09-14 02:53:12 +00:00
chief1983 f07609e6db Update codeblocks project file. 2011-09-13 22:00:26 +00:00
The_E 36aaaf018e Since this is the only place where r1 and r2 are variable, let's safeguard it. 2011-09-13 20:36:41 +00:00
The_E 4c838f2014 Adding an exit path here. 2011-09-13 20:26:23 +00:00
Echelon9 dacd3337c7 Documentation: Code cleanup in hudnavigation and hudobserver 2011-09-12 13:52:07 +00:00
Echelon9 8c272b61ae Documentation: Code cleanup in fvi.cpp 2011-09-12 13:31:38 +00:00
Echelon9 5d2e1444e6 Documentation: Code cleanup in font.cpp and font.h 2011-09-12 12:52:33 +00:00
Echelon9 c17fbdbcfc Documentation: Code cleanup in flak.cpp and flak.h 2011-09-12 12:45:19 +00:00
Echelon9 7f6e6e0b03 Documentation: Remove the old CreditWins from credits.cpp. These were unused for some time 2011-09-12 12:38:36 +00:00
The_E debdb78531 A few fixes for the $Weapon Class scripting hook and associated actions 2011-09-12 12:35:08 +00:00
Echelon9 0ebe034272 Documentation: Big code cleanup of the collide**.cpp files 2011-09-12 12:34:49 +00:00
Echelon9 10f9ecac09 Documentation: Code cleanup of camera.cpp and camera.h, and removal of redundant function 2011-09-12 12:15:27 +00:00
IssMneur dedd73a3f5 Lets try this again without templates that VC6 doesn't like (this time for real).
Use const strings in split_str.
2011-09-12 05:14:58 +00:00
Goober5000 3597538bde revert 7705... it did, in fact, contain templates that VC6 doesn't like 2011-09-12 05:01:57 +00:00
IssMneur 10809783f9 Lets try this again without templates that VC6 doesn't like.
Use const strings in split_str.
2011-09-12 04:03:56 +00:00
Valathil a899b8601f Allow customization of the thruster distortion effect in species_defs.tbl and ships.tbl 2011-09-12 03:59:45 +00:00
Echelon9 eb56cc982d Documentation: Code cleanup of asteroid.cpp and asteroid.h 2011-09-11 13:56:10 +00:00
Echelon9 1f07c6fcb1 Documentation: Code cleanup of alphacolors.cpp 2011-09-11 13:38:17 +00:00
Echelon9 6c4e057035 Documentation: Code cleanup of afterburner.cpp 2011-09-11 13:36:33 +00:00
Zacam f779a5b8a8 Fix for Trunk r7677 causing map corruption on model cache rebuild. 2011-09-10 21:14:55 +00:00
Zacam b781d3220c From Goober5000: Fix for model read for 'submodel_get_two_random_points' failing to find any points in the POF 'defpoints' as reported by Nighteyes. 2011-09-09 15:13:23 +00:00
Zacam 83045f7d4c Some more Parity/drift correction between Antipodes and Trunk: cfile update for better handling. 2011-09-09 14:06:29 +00:00
Zacam f15c81fdd0 Part Three: Synchronization pass of Trunk and Antipodes Differences.
Catching on anything missed in the first two passes.
2011-09-09 10:38:14 +00:00
Zacam a63dbe572c Part Two: Synchronization pass of Trunk and Antipodes Differences.
Removes all extraneous ifdefs (Demo, E3, Multi Beta, etc).
Leaves Debug and Inferno.
2011-09-09 10:23:53 +00:00
Zacam 9678d18bc3 Part One: Synchronization pass of Trunk and Antipodes Differences.
Whitespace/tab mostly.
aicode does have a change of an Int3 to an Assertion.
bmpman has an update to bm_next_handle.
2011-09-09 09:37:45 +00:00
Zacam efaa50fd0c From Valathil: Fixes thrusters with -trans textures 2011-09-08 17:12:25 +00:00
Goober5000 6c2f4f3c30 PVS-Studio fixes:
V506	Pointer to local variable 'Default_video_settings' is stored outside the scope of this variable. Such a pointer will become invalid.	code	2d.cpp	507
V506	Pointer to local variable 'pos' is stored outside the scope of this variable. Such a pointer will become invalid.	code	shipfx.cpp	1075
2011-09-08 06:55:50 +00:00
Goober5000 fd4dc268d4 made show/hide jumpnode work on more than one argument 2011-09-08 06:41:38 +00:00
IssMneur 0717ad3d13 PVS-Studio fix: V512 A call of the 'memcpy' function will lead to overflow of the buffer '& x'. (pstypes.h:131) 2011-09-08 05:39:53 +00:00
IssMneur dd3404b441 PVS-Studio: These are not false positives. Variable args can only be PODs, changing the "class" to a structure makes ade_odata a POD which should stop PVS-Studio from flagging this. 2011-09-08 05:38:21 +00:00
Echelon9 3eb9602696 Documentation: Complete code clean up of the 3d/2d code 2011-09-07 14:33:26 +00:00
Echelon9 f1cd24101f Documentation: Code clean up in 3dlaser.cpp 2011-09-07 14:26:25 +00:00
Echelon9 dd99b7b035 Documentation: Code cleanup of 3ddraw.cpp 2011-09-07 14:22:03 +00:00
Echelon9 687b91d197 Documentation: Code cleanup to 2d.cpp, 2d.h and 3d.h 2011-09-07 14:10:41 +00:00
Echelon9 23d689e087 PVS-Studio fix: V512 A call of the 'memcpy' function will lead to underflow of the buffer 'szcode'. 2011-09-07 12:46:35 +00:00
Echelon9 6de5b02e77 Documentation: Code clean up of psnet2.cpp 2011-09-07 12:28:18 +00:00
Echelon9 dece779168 PVS-Studio fix (courtesy of niffiwan): V512 A call of the 'memcpy' function will lead to underflow of the buffer '& bit_24'. 2011-09-07 12:00:21 +00:00
Echelon9 9086c95131 PVS-Studio fix (courtesy of niffiwan): V512 A call of the 'memcpy' function will lead to underflow of the buffer (psnet2.cpp) 2011-09-07 11:58:47 +00:00
Zacam c946bc4a45 PVS-Studio fix (courtesy of niffiwan): V512 - A call of the 'memcpy' function will lead to overflow of the buffer '& ip_addr.sin_addr'. 2011-09-07 10:00:03 +00:00
Zacam 0dac515506 MSVC Analysis: Local declaration of <variable> hides previous declaration at <line> of <file>: 'Scene_texture_width'/'Scene_texture_height' in gropengldraw lines 56 & 57. 2011-09-07 09:57:37 +00:00
karajorma d7274c3714 Fix Mantis 2497 (SEXP help text not available in the ships editor) 2011-09-07 02:50:05 +00:00
Valathil 388fd3bb81 Delay transparent texture rendering to fix z-buffer ordering issues 2011-09-06 17:17:58 +00:00
Echelon9 f678baabde Documentation: Major code clean up of shield.cpp 2011-09-06 14:39:53 +00:00
Echelon9 6d245f7bc2 PVS-Studio fix: V524 It is odd that the body of 'multi_xfer_reset' function is fully equivalent to the body of 'multi_xfer_close' function (multi_xfer.cpp, line 185).
Remove duplicate, unused function
2011-09-06 12:29:56 +00:00
Goober5000 f3349119b8 end string at hash symbol for jump nodes too 2011-09-06 08:59:29 +00:00
karajorma 7e97177a75 Fix Mantis 2492 (Confusing help messages for the get-x-ammo SEXPs) 2011-09-06 02:29:47 +00:00
Goober5000 d94416f71b remove unreferenced variable 2011-09-05 19:50:26 +00:00
Echelon9 aacaa2d331 Documentation: Major code cleanup of ship.cpp 2011-09-05 14:30:34 +00:00
Echelon9 7d56f961e5 PVS-Studio fix (courtesy of niffiwan): V568It's odd that the argument of sizeof() operator is the '(short) method' expression. 2011-09-05 12:49:37 +00:00
Echelon9 1de8a20958 PVS-Studio fix (courtesy of niffiwan): This is a false positive, BUT IT REALLY SHOULD be rewritten with an STL container 2011-09-05 12:47:12 +00:00
karajorma 1fe4fdeaef Fix the cloaked ship flag not saving. 2011-09-05 00:05:20 +00:00
Valathil 02848eb577 Fixed a little misunderstanding of the collision query framework in the sun occlusion test 2011-09-04 20:01:34 +00:00
The_E 5ea6138708 A bit of cleanup here. Removed unnecessary "if (true)" and changed the sexp code to use the already written armor_type_get_idx function 2011-09-04 19:33:09 +00:00
Valathil 944ea0b367 Implemented Sun occlusion for Cockpit models and shown Ship models 2011-09-04 15:48:05 +00:00
Echelon9 47ce96863f PVS-Studio fix: Mark a false positive reported by niffiwan 2011-09-04 15:30:34 +00:00
The_E e63a8680f9 PVS Studio fix: V535 The variable 'j' is being used for this loop and for the outer loop. 2011-09-04 12:36:33 +00:00
The_E c187041e9f PVS Studio fix: Variable "item_index" was assigned values twice in succession 2011-09-04 12:35:14 +00:00
The_E d283d5800d Another false alarm from PVS Studio 2011-09-04 12:33:00 +00:00
The_E 834e383c26 Marking a bunch of PVS Studio warnings as false alarms. While the warnings are technically correct, none of these are in places where performance matters. 2011-09-04 12:31:33 +00:00
The_E 5bec06b168 PVS Studio fix: V803 Decreased performance. In case 'obji' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. 2011-09-04 12:14:35 +00:00
The_E b92c6402a4 More false alarms from PVS Studio 2011-09-04 12:13:31 +00:00
The_E 124138ae07 PVS Studio related: Mark false alarms as such 2011-09-04 10:14:17 +00:00
The_E 790dba1d3d PVS Studio related: Mark false alarms as such 2011-09-04 09:35:08 +00:00
The_E 383403967c PVS Studio fix: V510, class type argument passed to sprintf 2011-09-04 09:31:30 +00:00
The_E c14d9213d2 Change batch_render_* to use iterators 2011-09-04 08:19:21 +00:00
Swifty 8e2fbd8b9e Thrusters render in the proper position when drawing an auto centered model. 2011-09-04 06:54:09 +00:00
Goober5000 001baa29a2 remove unneeded Assert 2011-09-04 05:43:42 +00:00
Goober5000 bab303963b fix a bug from the waypoint conversion 2011-09-04 00:41:05 +00:00
Goober5000 0e278350d7 d'oh... in most cases, atoi(CTEXT(n)) should be eval_num(n) 2011-09-03 21:46:49 +00:00
Valathil 107f02d8d6 Fix tcache_set() OpenGL Errors by not using vertex attributes when drawing distortion Thrusters 2011-09-03 16:17:19 +00:00
Echelon9 e3c100d5fa Documentation: A few documentation fixes 2011-09-03 09:06:00 +00:00
Echelon9 67658b89c8 Documentation: A few documentation fixes so that Doxygen 1.7.5.1 outputs a clean log 2011-09-03 08:25:53 +00:00
Echelon9 eda7103399 PVS-Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 1281, 1312. 2011-09-03 05:38:28 +00:00
Echelon9 6c55c061c4 Suppress a PVS-Studio false positive 2011-09-03 05:34:08 +00:00
Echelon9 f701d00d0a PVS-Studio fix: V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present (starfield.cpp). 2011-09-03 05:31:12 +00:00
Echelon9 4f2574dddb PVS-Studio fix: V592 The expression was enclosed by parentheses twice: '((cur_sep > 0.9f * desired_sep))'. One pair of parentheses is unnecessary or misprint is present (aicode.cpp).
I think this is the right fix. In addition the code comments did not reflect what was happening, so I've updated these to reflect the if() comparison.
2011-09-03 05:20:27 +00:00
Goober5000 3b5512d60a whoops 2011-09-03 04:30:23 +00:00
Goober5000 725762bf35 The_E made the wrong fix; this is the right one 2011-09-03 02:34:14 +00:00
Goober5000 70a1873c86 a bunch of small PVS-Studio fixes (mostly duplicate assignments) 2011-09-03 02:25:39 +00:00
Goober5000 43cbdb0783 wl_fury_missile_offset_hack was only applicable for FS1 2011-09-03 02:21:20 +00:00
Goober5000 eee761ab79 PVS-Studio fix: V507 Pointer to local array 'name' is stored outside the scope of this array. Such a pointer will become invalid. code missioncampaign.cpp
(This is a Volition bug!  In all other locations, Campaign_file_names and Campaign_names are set using strdup.)
2011-09-03 01:48:06 +00:00
Goober5000 c7ddf2f619 PVS-Studio fix: V506 Pointer to local variable 'terminus' is stored outside the scope of this variable. Such a pointer will become invalid. 2011-09-03 01:45:56 +00:00
Goober5000 2ce8ca62cf PVS-Studio fix: V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. 2011-09-03 01:32:07 +00:00
Goober5000 09bb4ab771 PVS-Studio fix: V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. 2011-09-03 01:15:20 +00:00
Goober5000 ee4e1f2afa PVS-Studio fix: V805 Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) != 0' construct. A more efficient way is to check: str[0] != '\0'.
(and sorry Kazan, you don't get to call your for statement a work of art if you use strlen inefficiently)
2011-09-03 01:05:00 +00:00
Valathil 22c4cf13da Changed Sun glow and lens flare rendering to not be obscured by objects 2011-09-01 19:35:17 +00:00
Valathil a67f2d4f29 Enable alpha channel on render to texture targets and provide scripting functions with alpha capabilities 2011-09-01 16:16:03 +00:00
Echelon9 45f8701e68 Documentation: Code cleanup of missionbriefcommon.cpp 2011-09-01 13:50:37 +00:00
Echelon9 4201582786 Let's have another go at this one... around we go again 2011-09-01 13:08:32 +00:00
karajorma 7df5137ac4 Fix a mismatch. 2011-08-31 14:06:19 +00:00
Echelon9 a20c658026 cppcheck fix: Memory leak in icon table parsing. 2011-08-31 13:53:14 +00:00
Echelon9 3063b2cd85 Undo my rather silly patch, apply niffiwan's patch as a temporary measure (at least). 2011-08-31 13:48:23 +00:00
Echelon9 2abd999dd9 PVS-Studio fix: V522 Dereferencing of the null pointer 'snd' might take place. Check the logical condition (autopilot.cpp) 2011-08-31 13:25:14 +00:00
Echelon9 9be05a4d7f PVS-Studio fix: V523 The 'then' statement is equivalent to the 'else' statement (psnet2.cpp).
This one was particular bad as it code have lead to remotely induced crashes over the network with oversize packets.
2011-08-31 13:12:46 +00:00
Echelon9 dc29308c31 PVS-Studio false positive: V581 The conditional expressions of the 'if' operators situated alongside each other are identical.(hudtarget.cpp) 2011-08-31 13:02:44 +00:00
Echelon9 81f5d8ee99 PVS-Studio false positive: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. Check lines: 185, 189 (dscap.cpp) 2011-08-31 13:00:57 +00:00
Echelon9 bcb60d8bd0 PVS-Studio false positive: V537 Consider reviewing the correctness of 'y' item's usage (3dmath.cpp) 2011-08-31 12:58:58 +00:00
Zacam 64efa9f2fa Clean up the commented out code from niffiwan's PVS-Studio patches. (from niffiwan) 2011-08-31 10:58:33 +00:00
Zacam 10445ba0c3 MSVC Analysis C6244: Local declaration of <variable> hides previous declaration at <line> of <file>. (lock_world_pos; 31; hudlock.cpp) 2011-08-31 09:59:55 +00:00
Zacam def9877ade MSVC Analysis C6246: Local declaration of <variable> hides declaration of same name in outer scope. (wip, swp, objp, j) 2011-08-31 09:37:20 +00:00
Zacam e21235bfb9 Fix for 7590: Shipp can be NULL, which would lead to a crash. This resolves that crash from happening. 2011-08-30 22:59:57 +00:00
The_E 0525e871d0 PVS Studio related: Mark false alarms as such. 2011-08-30 17:46:49 +00:00
The_E 724f1be9d3 Removing the RELEASE_REAL define from ye olde ✌️ days. We really don't need it anymore. 2011-08-30 17:46:03 +00:00
The_E 9e8f902ed3 PVS Studio fix: V581 The conditional expressions of the 'if' operators situated alongside each other are identical. 2011-08-30 17:40:00 +00:00
Swifty fa54551e26 Engine glows no longer render when on the wrong side of a warp-in/out. 2011-08-30 17:39:48 +00:00
The_E 9d9d2d0eb2 PVS Studio fix: V576 Incorrect format. A different number of actual arguments is expected while calling 'Format' function. Expected: 2. Present: 3. 2011-08-30 17:29:56 +00:00
The_E 57fae21a9c PVS Studio fix: V567 Undefined behavior. The 'index' variable is modified while being used twice between sequence points. 2011-08-30 17:28:39 +00:00
The_E 27e0c1b3b2 PVS Studio fix: V547 Expression 'character <= 127' is always true. The value range of signed char type: [-128, 127]. 2011-08-30 17:26:57 +00:00
The_E 0ce71ca239 PVS Studio fix: V541 It is dangerous to print the string 'base' into itself. 2011-08-30 17:24:50 +00:00
The_E b15d864aac PVS Studio fix: V541 It is dangerous to print the string 'ani_name' into itself. 2011-08-30 17:23:01 +00:00
Echelon9 3453cc9c70 PVS-Studio fix: V576 Incorrect format. Consider checking the [third] actual argument of the 'sprintf' function. The SIGNED integer type argument is expected.
Fixes a number of this class of issue with sprintf formats.
2011-08-30 15:39:29 +00:00
Echelon9 a03118b88d PVS-Studio fix: V805 Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) == 0' construct. A more efficient way is to check: str[0] == '\0' (missioncampaign.cpp). 2011-08-30 15:17:28 +00:00
Echelon9 a5bd4b9845 PVS-Studio fix: V523 The 'then' statement is equivalent to the 'else' statement (shipfx.cpp).
Also take opportunity to clean up the BSG warp effect code. That duplice if() else() had been included since the original WMC commit in r5261.
2011-08-30 14:32:10 +00:00
Echelon9 64d2e8b9fb PVS-Studio fix: V803 Decreased performance. In case 'aip->wp_index' is iterator it's more effective to use prefix form of decrement. Replace iterator-- with --iterator. 2011-08-30 14:06:03 +00:00
The_E e3039d3ea4 PVS Studio fix: V570 The 'end_angle.a1d [axis]' variable is assigned to itself. 2011-08-30 13:55:36 +00:00
The_E 2a723f78b0 PVS Studio fix: V547 Expression is always true. Unsigned type value is always >= 0. 2011-08-30 13:48:56 +00:00
The_E c7422150fc PVS Studio fix: V535 The variable 'i' is being used for this loop and for the outer loop. 2011-08-30 13:46:00 +00:00
The_E 003ed628c7 PVS Studio fix: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 279, 287. 2011-08-30 13:40:36 +00:00
The_E 32bc367306 PVS Studio fix: "delete operator applied to non-pointer" 2011-08-30 13:38:33 +00:00
The_E 1aa806a3ab PVS Studio fix: duplicated "!strlen(filename)" check 2011-08-30 13:21:28 +00:00
Echelon9 5a0dc8f6b1 PVS-Studio (courtesy of niffiwan): V523 The 'then' statement is equivalent to the 'else' statement (techmenu.cpp). 2011-08-30 13:12:51 +00:00
Echelon9 8a4482c827 PVS-Studio fix (courtesy of niffiwan): V523 The 'then' statement is equivalent to the 'else' statement (missiontraining.cpp). 2011-08-30 13:06:28 +00:00
karajorma 7ca92457b4 PVS-Studio fix: V512 A call of the 'memset' function will lead to underflow of the buffer 'type'.
Never really would matter but it's a waste of memory declaring an int buffer and then only using 1/4 of it
2011-08-30 11:50:23 +00:00
Goober5000 2ef9fa11b6 add fire-beam-at-coordinates, which is as awesome as it sounds 2011-08-30 07:29:57 +00:00
Goober5000 3f1fcf2e71 having null iterators is apparently a no-no according to the C++ standard, so use a globally defined invalid iterator instead 2011-08-30 07:27:32 +00:00
karajorma af96b121b6 Gliding remains on when the player restarts a mission. 2011-08-30 04:12:55 +00:00
Goober5000 3ce69f150a waypoints and waypoint paths now have dynamic limits 2011-08-30 03:35:42 +00:00
karajorma caff640862 Documentation for the Multiplayer SEXP system. 2011-08-30 00:18:32 +00:00
Echelon9 9a76fcfe78 PVS-Studio fix: V515 The 'delete' operator is applied to non-pointer (hud.cpp). 2011-08-29 16:08:03 +00:00
Echelon9 e58723d589 PVS-Studio fix (Courtesy of niffiwan): V523 The 'then' statement is equivalent to the 'else' statement (barracks.cpp and missionhotkey.cpp). 2011-08-29 13:19:58 +00:00
Echelon9 b55516dfdb Documentation: Code cleanup of sexp.cpp 2011-08-28 15:10:07 +00:00
Echelon9 a5249cf57c Reverting 7545: Due to some odd errors coming through as Asserts in cfile.cpp 2011-08-28 12:48:20 +00:00
Echelon9 81c9c92479 PVS-Studio fix: V516 Consider inspecting an odd expression. Non-null function pointer is compared to null: 'jumpnode_get_by_name == 0' (sexp.cpp).
Ironic that check_sexp_syntax() appeared to have a mistake in it's check functions.
2011-08-28 09:49:02 +00:00
Echelon9 5386b9da7c PVS-Studio fix: V555 The expression '(now - bi->last_down_check) > 0' will work as 'now != bi->last_down_check'.
Due to unsigned int type wrapping the former code would have always returned true.
2011-08-28 09:41:54 +00:00
Echelon9 9c0edf2d64 Documentation: Code cleanup in multi_obj.cpp 2011-08-28 09:36:18 +00:00
Echelon9 66dd978878 PVS-Studio fix: V519 The 'num_users' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2296, 2297 (multi_pxo.cpp) 2011-08-28 09:34:09 +00:00
Echelon9 91f01706fd PVS-Studio fix: V519 The 'player_index' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1389, 1392 (multi_obj.cpp) 2011-08-28 09:32:55 +00:00
Echelon9 9bd9ea619d PVS-Studio fix: V519 The 'list_size' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 597, 604 (gropenglpostprocessing.cpp) 2011-08-28 09:31:21 +00:00
Echelon9 b765ca37b9 PVS-Studio fix: V519 The 'path_index' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 12782, 12809 (aicode.cpp) 2011-08-28 09:30:07 +00:00
Echelon9 cb07f76f6c Documentation: Clean up lua.cpp 2011-08-28 08:54:10 +00:00
Echelon9 80a027a400 PVS-Studio fix: V803 Decreased performance. In case 'tvs' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator.
For further discussion see, http://www.viva64.com/en/b/0093/

The scenarios where it will improve performance are under Debug builds. This improvement will however allow quicker use of other profiling tools that need to run on Debug builds.

Note. Code with size_t does not see the performance improvement comparison to iterators due to absence of array overrun check.
2011-08-28 08:31:25 +00:00
Echelon9 2226ca29d8 Revert r7546 -- will need more work. 2011-08-28 07:39:56 +00:00
Echelon9 34084aebe6 PVS-Studio fix: V501 There are identical sub-expressions '(stricmp (szCmd, "372") == 0)' to the left and to the right of the '||' operator.
and 

V501 There are identical sub-expressions '(stricmp (szCmd, "375") == 0)' to the left and to the right of the '||' operator.
2011-08-28 07:27:53 +00:00
Echelon9 2d01954585 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 80 to 76 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 07:16:42 +00:00
Echelon9 9fa25a9ae4 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 50 to 48 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 07:08:40 +00:00
Echelon9 58b77fb8f9 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 52 to 48 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 07:03:57 +00:00
Echelon9 93622a3748 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 40 to 32 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 07:00:38 +00:00
Echelon9 499c698ba8 PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 24 to 20 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 06:55:00 +00:00
Echelon9 a93f7d50fd PVS-Studio fix: V802 On 32-bit platform, structure size can be reduced from 28 to 24 bytes by rearranging the fields according to their sizes in decreasing order. 2011-08-28 06:50:02 +00:00
Goober5000 7931831cbe add dynamic vector stuffing 2011-08-28 03:31:46 +00:00
Goober5000 13366ad45b add linked lists, woot 2011-08-27 05:27:24 +00:00
Goober5000 9ef2aac09a return special exp values to ints, per discussion with Zacam awhile ago
while we're at it, change kamikaze damage to int since it's treated as such
2011-08-27 05:08:39 +00:00
Goober5000 7f5d1b362f enhance end-mission to possibly dump player to main hall 2011-08-27 04:39:18 +00:00
Goober5000 3b2b76206f add infrastructure and parsing support for mission forks (vs. mission loops)
mission fork interface art and selection logic still needs to be written
2011-08-27 03:57:16 +00:00
Zacam c6beca2629 Fix for Mantis 2467: untargeted heat seekers ignore ship protect
from niffiwan: http://www.hard-light.net/forums/index.php?topic=78001.0
2011-08-26 00:17:45 +00:00
Zacam 2115469681 Alt Name field for ships not being set was interfering with displaying the ship class or name in the loadout screen when selecting a weapon said ship could not carry. This fixes that. From Wanderer, via Karajorma. 2011-08-25 07:33:49 +00:00
Zacam 9bbc485f0c Slight update to optimize the built in main-f.sdr. 2011-08-25 02:42:05 +00:00
karajorma 7952433415 I've already removed this section of code once! Let's see if it stays out this time! 2011-08-25 02:36:10 +00:00
Sushi 04af101eda Add "$Max Turrets per Bomb" and "$Max Turrets per Target" turret attributes. Allow per-turret control over maximum number of targeted bombs and ships (respectively). Works like "$Max Turret Target Ownage" but on a per-turret basis, and with the ability to affect incoming bombs as well. 2011-08-25 01:33:44 +00:00
Echelon9 0b17acff72 Documentation: Cleanup a few comments in pstypes.h 2011-08-24 21:27:07 +00:00
The_E fe0ec8dffa Update for the ad.playMusic() function so that it accepts a volume parameter 2011-08-24 15:20:04 +00:00
Echelon9 d208740bcd PVS-Studio fix: V524 It is odd that the body of 'ds_eax_set_preset' function is fully equivalent to the body of 'ds_eax_set_environment' function (ds.cpp, line 2091). 2011-08-24 15:06:22 +00:00
Echelon9 a47f5b4069 PVS-Studio fix: V525 The code containing the collection of similar blocks. Check items 'Scene_color_texture', 'Scene_color_texture', 'Scene_depth_texture' in lines 2073, 2076, 2079. code gropengldraw.cpp 2011-08-24 14:56:48 +00:00
Echelon9 c2e41e4a95 PVS-Studio fix: V524 It is odd that the body of 'l_Object_getrvec_f' function is fully equivalent to the body of 'l_Object_getfvec_f' function (lua.cpp, line 4735). 2011-08-24 14:52:05 +00:00
Echelon9 dbcce6b112 PVS-Studio fix: V524 It is odd that the body of 'fireball_level_close' function is fully equivalent to the body of 'fireball_close' function (fireballs.cpp, line 970). 2011-08-24 14:48:17 +00:00
Echelon9 a248a37d58 PVS-Studio: Fix V805. Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) > 0' construct 2011-08-24 13:37:01 +00:00
karajorma 56f758967a Fix several SEXPs for multiplayer use. This should fix Mantis issues 2401, 2483 and 2382.
In addition, fix a bug caused by SEXPs that do a callback but don't send any data.
2011-08-24 08:37:11 +00:00
Goober5000 f5ad44950a change the units on rotation acceleration to bring them in line with rotational velocity
this is not a compatibility break because acceleration didn't work until just a few days ago :D
2011-08-24 02:41:07 +00:00
Goober5000 b232661a78 supposedly these two checks were forgotten 2011-08-24 02:23:44 +00:00
The_E 94bb513f0f Another FXAA change to stop it from murdering our pretty pretty starfields. 2011-08-23 19:07:58 +00:00
The_E 34e7c0c927 Removing a preprocessor define from the fxaa fragment shader that we're not using. 2011-08-23 18:41:19 +00:00
Echelon9 745ec904d5 Documentation: Minor tweaking to ai.cpp 2011-08-23 13:50:24 +00:00
Zacam ec58a7388f Formating the shaders entries for soft particles to match the rest of the shaders. 2011-08-22 22:18:06 +00:00
Zacam c8d0e343e2 From jg18: Platform flag exclusion, Soft Particles wiki link.
(reformatting/spacing is mine)
2011-08-22 22:17:34 +00:00
Valathil da6727d9d1 Let's try this again. Adding Framebuffer distortion thrusters and explosions. 2011-08-22 17:57:01 +00:00
The_E 14ac7a3cbf object:checkRayCollision() for scripting, from m!m 2011-08-22 12:57:01 +00:00
karajorma 9aa338ecd8 Add a version of the event-true-delay SEXP which works using milliseconds rather than seconds. 2011-08-22 10:44:41 +00:00
Goober5000 a74ae93a14 wow... it looks like the subsystem acceleration sexp never worked until now... 2011-08-22 08:38:02 +00:00
Goober5000 f492ce292c revert 7508, which MSVC6 doesn't like 2011-08-22 07:58:00 +00:00
IssMneur 80d3b0ed84 - make split_str use const strings were appropriate.
- make brief_color_text_init use const strings where appropriate.
2011-08-21 17:05:04 +00:00
Zacam 583f5c976f Revert 7498: You should also test without optional command lines present, yellow disco screens of death in-mission are bad. 2011-08-21 04:04:45 +00:00
Goober5000 b1ad28efdb add an option to fire-beam to force the beam to fire
combine fighter_beam flag into flags field
2011-08-21 01:11:24 +00:00
Goober5000 6346fc6de6 fix string length 2011-08-21 00:43:31 +00:00
Goober5000 8e27e23acc Zacam's patch for bringing MSVC 2005 up to date 2011-08-21 00:29:11 +00:00
Valathil 89da5f6fdc Added thruster heat distortions and explosion framebuffer effects 2011-08-20 23:31:07 +00:00
Swifty fe605149c4 Soft sphere sprite rendering for particles, explosions, shockwaves, and thrusters. 2011-08-20 22:14:52 +00:00
Sushi 68b036a4af Add "Fog Near Multiplier" and "Fog Far Multiplier" options for missions. Allows the FREDder to tweak distances at which ships fade out in a nebula. 2011-08-20 15:06:18 +00:00
Goober5000 bc1b977c77 rewrite facing and is-facing to be more clear; I think I also fixed a bug in the process 2011-08-20 08:25:39 +00:00
Goober5000 5a28b96872 the key should be in the training category along with the other key sexps 2011-08-20 05:55:14 +00:00
Valathil 9c5e18225e Fixed a crash in the Ship effect SEXP so it doesn't crash the game if you try to cloak a wing with destroyed/departed/vanished ships. 2011-08-19 14:49:04 +00:00
karajorma c56684cf43 Fix Mantis 2397 (Variables do not use more than one column when using replace data or replace variable unlike all other data) 2011-08-19 10:10:53 +00:00
karajorma 4dfa577114 Add options to send objects, shorts and ushorts via the multiplayer SEXP system. 2011-08-19 08:09:50 +00:00
Goober5000 ce48784a5f add some sanity protections against overstuffing arrays 2011-08-19 04:39:12 +00:00
Goober5000 017699d8a3 minor tweaks 2011-08-19 04:32:24 +00:00
The_E bb2c773d7b Fix for Mantis 2484: Default text length for EFF files was far too short. 2011-08-18 20:21:05 +00:00
Echelon9 555a9033de Documentation: General clean-up and function documentation 2011-08-18 16:47:54 +00:00
karajorma 77745bdb75 Doh, missed one! 2011-08-18 07:56:31 +00:00
karajorma 1a577f6473 Fixes and clean up for the multiplayer SEXP packet system.
- Make the system more robust against accidental attempts to write data to the packet without proper initialisation. 
- Improve the error messages and function names to make clear the difference between the packet the game actually sends and the abstracted packets the coder seems to create and send in sexp.cpp
- Add a convenience methods to deal with SEXPs that don't need to write any data.
2011-08-18 07:48:59 +00:00
karajorma df0722f929 Fixes for the multiplayer SEXP packet to prevent errors caused by the coder taking too little data out of the packet before reporting that they are done. 2011-08-18 05:24:27 +00:00
Echelon9 13d8c4e97c Diaspora feature: Control configs override and default table 2011-08-17 14:40:13 +00:00
karajorma dc980ecc21 Halleck's bomb scoring code 2011-08-16 09:45:14 +00:00
Goober5000 a60c3d5a2d compilation fix 2011-08-16 04:55:47 +00:00
IssMneur 9395281267 From jg18: Add some missing wiki urls in the flag file output. 2011-08-14 23:10:08 +00:00
Zacam 608880bae5 Fred2 Open debug log now records build version data, just like fs2_open.log.
Updated the fs2_open.log output to declare "FreeSpace 2 Open version" instead of just "FreeSpace version"
2011-08-14 16:42:47 +00:00
The_E d5c065bf74 When loading FXAA shaders, always use the built-in defaults. 2011-08-14 15:08:28 +00:00
Echelon9 639fd1951a PVS-Studio fix: Expression 'b->type < 0' is always false. Unsigned type value is never < 0. 2011-08-14 14:07:11 +00:00
Goober5000 570aaf88ae change warnings to mprintfs 2011-08-14 08:42:50 +00:00
Zacam 0054d25e0b Shader Update: main-f updated with latest cloaking code. small amount of cleanup done as well. 2011-08-14 02:36:33 +00:00
Echelon9 37097f2d83 PVS-Studio fix: Duplicate comparison check for stricmp('FRED2_Open', scp->data.name). Instead use the second comparison to check for the same naming format as stricmp('FS2Open', scp->data.name) 2011-08-13 08:22:51 +00:00
Echelon9 c45aa93a9a PVS-Studio fix: Calling empty() on an STL vector does not modify the content of the vector in any way. To clear, use clear(). In addition, this commit also fixes the spelling of the containing function and turns on Doxygen documentation. 2011-08-13 08:19:55 +00:00
Echelon9 3a9f72c231 PVS-Studio fix: A call of the 'memset' function will lead to underflow of the buffer 'txt'. In HudGaugeMultiMsg::render() 2011-08-11 15:31:44 +00:00
Echelon9 ddb6039161 PVS-Studio fix: The '&' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' operator. In UI_SLIDER2::draw() 2011-08-11 14:59:16 +00:00
Echelon9 5b60b84cfd PVS-Studio: The '&' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' operator. In process_event_update_packet() 2011-08-11 14:56:43 +00:00
Echelon9 71255d6ba5 PVS-Studio: A call of the 'memset' function will lead to underflow of various buffers in multi code. 2011-08-11 14:53:11 +00:00
Echelon9 f25f912848 PVS-Studio fix: Fix r5260 - A call of the 'memset' function will lead to underflow of the buffer 'Valid_builtin_message_types'. 2011-08-11 14:35:03 +00:00
Echelon9 fe1c83e4eb PVS-Studio fix: Expression 'i >= 0' is always true. Unsigned type value is always >= 0. 2011-08-11 14:18:26 +00:00
Echelon9 2808f6624d PVS-Studio fix: Expression 'idx < 0' is always false. Unsigned type value is never < 0. 2011-08-11 14:15:05 +00:00
Echelon9 682936b8d7 PVS-Studio fix: XYZ co-ordinated were not correctly copied and pasted in parse_ship_values() 2011-08-10 16:11:29 +00:00
Zacam 1c4dacdafc Logging update: Major/Minor/Build update so that "Build" will always be available/log correctly even when "0" (ex: 3.7.0) without also needing "Revision" present. 2011-08-10 14:23:51 +00:00
Echelon9 f2f77ccc5f PVS-Studio fix: This if...then...else block was redundant in HudGaugeSupport::render(), as each 'then' block did the same thing 2011-08-10 14:01:15 +00:00
Echelon9 148c68b9f4 PVS-Studio fix: This if...then...else block was redundant in player_select_init(), as each 'then' block did the same thing 2011-08-10 13:58:25 +00:00
Echelon9 e7f07441f9 PVS-Studio fix: Incorrect logic within ping time colour indicator in multi_join_display_games() was overrepresenting yellow at the expense of red. Also replaced magic number with a definition. 2011-08-10 13:55:33 +00:00
Echelon9 913c4effe7 PVS-Studio fix: No need to set sinfo variable again immediately after first assignment to a different value in send_secondary_fired_packet() 2011-08-10 13:51:31 +00:00
Echelon9 283753bffa PVS-Studio fix: No need to set Current_stage variable again immediately after first assignment to a different hard coded value 2011-08-10 13:49:42 +00:00
Echelon9 139bb5afa9 PVS-studio fix: Ensure that both x and y of Player->current_target are reset correctly in hud_lock_determine_lock_point() 2011-08-10 13:47:06 +00:00
Echelon9 8531488d1b PVS-Studio fix: Remove duplicate if...then conditional within fs2netd_get_pilot_info() 2011-08-10 13:45:14 +00:00
Echelon9 127ac8d051 PVS-Studio fix: Remove duplicate if...then conditional within ai_process() 2011-08-10 13:43:18 +00:00
Echelon9 989916e0a7 PVS-Studio fix: Correct duplicate attempt to set the docker_aip->support_ship_signature in ai_do_objects_undocked_stuff() 2011-08-10 13:40:53 +00:00
IssMneur 973efc2865 From jg18: various polish details and a description clarification, based from descriptions within sandmanjack's launcher 2011-08-09 04:37:59 +00:00
Swifty f6ba2141b4 Shockwaves and death explosions will stay oriented independently of player's bank. 2011-08-07 09:55:18 +00:00
The_E abd7134e0e ALtered according to feedback from Valathil. 2011-08-06 19:11:43 +00:00
IssMneur 1c130bbc8a From Valathil: Fixes a problem with a min-max lifetime smart spawn weapons where it wouldn't fire except at close range 2011-08-06 18:20:34 +00:00
The_E 20346118c6 Another sprite rendering fix from Valathil 2011-08-05 21:39:14 +00:00
Swifty f35b322397 Ship-specific gauges will only get preprocessed once. 2011-08-05 09:06:31 +00:00
The_E 154f90823c Another sprite rendering fix from Valathil 2011-08-04 21:46:21 +00:00
The_E 55427f1690 Patch for sprite orientation from Valathil 2011-08-04 16:25:19 +00:00
Zacam 7cb68f6de2 Resolves MSVC complaint about "'i' : unreferenced local variable" for the size_t in "void game_render_hud(camid cid)" 2011-08-04 13:58:46 +00:00
The_E e6f0e0e956 Ooops, meant to use a pointer there. 2011-08-04 13:34:33 +00:00
The_E 4dd9021e9c Resolve an "uninitialized Variable" warning 2011-08-04 13:33:35 +00:00
The_E aa9bb91dd7 And another one. 2011-08-04 13:17:55 +00:00
The_E 300ee6f9e9 Slight correction to make nvidias GLSL compiler happy 2011-08-04 13:16:32 +00:00
The_E ac8b7c4c10 From m!m: Adds access to collision data to the Lua API. 2011-08-04 11:05:25 +00:00
Swifty 5283c36d34 Let's try this again without breaking the orb radar: Optimized BSG radar and cockpit displays. Fixed cockpit models not switching when changing ships. 2011-08-04 11:01:28 +00:00
The_E 47b1f57435 Adding the function "ship::addShipEffect(string name, int duration)" to the LUA API. 2011-08-04 10:58:28 +00:00
IssMneur bb75f7fc4e Move clear-subtitles to the camera subcategory in FRED. 2011-08-03 04:12:46 +00:00
The_E 4a488dd7f0 Reverting 7411 due to it breaking the standard 3D radar. 2011-08-02 13:02:34 +00:00
Swifty 043d56b3f7 For Diaspora: Optimized BSG radar rendering and cockpit displays. Fixed cockpit models not switching when changing ships. 2011-08-02 10:49:51 +00:00
The_E 43e220aa68 Fix for issue with the weapon select sound not playing when weapon_choice_3d was active 2011-08-01 20:39:31 +00:00
IssMneur 64ff2ba5a5 Complain correctly about pilot name length (actually say that the name is too long rather than just an assert). 2011-08-01 20:10:51 +00:00
The_E ab30a9662d Updating the internal shaders a bit 2011-08-01 18:38:04 +00:00
The_E 91e54218a7 Correcting a little oversight with the $Selection Effect: tbl entries 2011-08-01 18:06:58 +00:00
The_E fd29f15e12 Make external weapon models cloak when the mothership is cloaking. 2011-08-01 11:56:06 +00:00
The_E ebf412d9f4 From Valathil: Allow shader effects to be less wrong if the Post-processing framebuffer is not active 2011-07-31 20:37:42 +00:00
The_E d366751420 Request by MjnMixael: clear-subtitles sexp 2011-07-31 20:35:34 +00:00
The_E 245ed41f71 Moving ai_profiles parsing up a few lines to fix issue with $Default Weapon select effect 2011-07-31 20:21:35 +00:00
Echelon9 e4125bab11 Picked up by MSVC analyser: Lock down these cases of unsafe string operations 2011-07-31 13:41:13 +00:00
Echelon9 7d8ec67a99 Fix Apple support for vglDrawBuffers, part of the new shader code 2011-07-31 08:03:04 +00:00
The_E 43c6cd2539 Updating the sexp description 2011-07-30 23:21:28 +00:00
The_E 4c919f0a59 Fixes issue with post_processing.tbl parsing 2011-07-30 22:45:53 +00:00
The_E 2dc34f3e1f This is the correct version now. 2011-07-30 22:39:49 +00:00
The_E 7f219cad2c Reverting due to bugs 2011-07-30 22:32:09 +00:00
The_E 3a702bdc1a This should have been committed as well 2011-07-30 21:43:30 +00:00
The_E 32c5491d83 Adding support for the new cloaking effect. 2011-07-30 21:13:02 +00:00
The_E c1ed95995d Fixes issue regarding UI sounds and built-in retail ship/weapon effects being of different length. 2011-07-30 19:49:49 +00:00
karajorma 04348d856d Ignore-key SEXP and the changes needed to support it. 2011-07-30 18:54:02 +00:00
The_E 466441a58b Slight fix for issue with SSMs hitting the player ship 2011-07-30 07:31:24 +00:00
The_E 9e423a8bca Fixes issue with Default ship/weapon select ai_profiles entries. 2011-07-29 13:53:35 +00:00
The_E 23f7fcfd07 Woops, built-in shader was incorrect 2011-07-27 14:44:43 +00:00
The_E 8fb2085a9d Adding the realtime ship/weapon select effects by Valathil. 2011-07-26 22:02:12 +00:00
Zacam 9d212a5f07 From Plombo: sets "force_s3tc_enable" for some linux drivers to be able to render DDS textures.
http://www.hard-light.net/forums/index.php?topic=77196.0
2011-07-25 22:10:32 +00:00
The_E 83d1fe8f5f Update to FXAA 3.11 2011-07-23 10:14:36 +00:00
Echelon9 ea27c04867 Documentation: Resolve a Doxygen warning on the unpack_frame() and unpack_frame_from_file() functions 2011-07-23 04:38:16 +00:00
Zacam 96925143c1 Resolves SSE detection issues on #including <xmmintrin.h> for GCC/G++ and MSVC6.
GCC/G++ users (Apple, Linux) should look to adding intrinsics to their compile options. (-msse)
2011-07-23 02:07:19 +00:00
The_E 76dfdc4ba7 Another change to make compilers happy. This time, it's ATi's turn. 2011-07-22 20:54:46 +00:00
Zacam f2cc1239dd If we declare inv2A as a float up top, we no longer need to brace out any instances which resolves cross initialization as well as still allowing MSVC6 to remain operational (per 7372). Minor formating cleanup as well.
Thanks to Goober and Plombo for feedback.
2011-07-22 18:32:22 +00:00
Goober5000 96736a29ea fix compile problems on MSVC6 2011-07-22 05:56:46 +00:00
Goober5000 8dac846455 fix Mantis #2474 2011-07-22 05:55:04 +00:00
Goober5000 6422ac62e0 revert 7368: these are most certainly not graphics options 2011-07-22 05:13:28 +00:00
The_E 646046538c Small change to make nvidias' GLSL compiler happier 2011-07-21 20:44:26 +00:00
The_E 39a1a01a63 Moving the -window and -fullscreen_window cmdline options to the "Graphics" section 2011-07-21 16:29:49 +00:00
The_E bbae282db5 Update FXAA to 3.10. Also changes the fxaa preset selection method to recompile shaders when preset changes, should yield some speed improvements. 2011-07-21 12:18:37 +00:00
Zacam 6e8265278a This is not a repeat of 7340/7344. It is necessary however that we be able to tell users the value found before we reset it to zero, otherwise the warning will only ever return 0 instead of the bogus value. 2011-07-21 06:02:42 +00:00
The_E 7f5c3d343e Valathil's code cleanup patch. 2011-07-20 18:04:43 +00:00
The_E a61116b42b Remove unreferenced variable. 2011-07-20 15:54:28 +00:00
The_E 519819b550 More lighting patches from Valathil 2011-07-20 15:27:59 +00:00
The_E 60c4ca8eb3 Changing this Warning to an mprintf. We really do NOT want to generate warnings with retail data, don't we? 2011-07-19 22:00:27 +00:00
The_E 1d3aa79e6b Split the fxaa shader in two for better compiler compatibility 2011-07-19 21:51:37 +00:00
The_E 084465a613 Updating the built-in fxaa shaders to 3.9 2011-07-19 18:23:32 +00:00
Echelon9 c6d0f6170d For Valathil: Fix distance check in beam.cpp 2011-07-19 13:25:42 +00:00
The_E c57dd1ed07 From m!m: Gives scripting access to debris chunk size data 2011-07-18 17:58:49 +00:00
Sushi bbfc33eb40 Revert 7340 and 7344, since they derped hard. (Kept 7341) 2011-07-18 14:54:41 +00:00
Zacam 1e7caaccda Update:
libpng now at 1.5.2 (with update to pngutils)
zlib now at 1.2.5
(Files are in "LF" instead of "CRLF" this time around.)
MSVC6-2010 and XCode project updates included.
2011-07-17 05:46:14 +00:00
Zacam 1e7c5e65b3 Update to Post_Processing for split controls on Brightness and contrast.
Spacing/formatting clean-up.
2011-07-17 04:39:10 +00:00
Zacam 8cbffd6065 From Valathil: Beams now use Tube lighting. Updates to main shaders accordingly. 2011-07-17 04:36:00 +00:00
Swifty 6488b73b0a Corrected directive gauge to use both X and Y offsets. 2011-07-14 07:08:53 +00:00
The_E 7b2c8f7086 From Valathil: Do light sorting only once per object 2011-07-13 09:03:03 +00:00
Goober5000 a308e6f45f Valathil's fixes for #weak weapon variants
http://www.hard-light.net/forums/index.php?topic=77060.0
2011-07-13 07:33:29 +00:00
Zacam 513d2d7182 Copeh Pasteh does not make for al dente. 2011-07-11 19:09:10 +00:00
Goober5000 2eb4bb3aec deal with string truncation on MSVC6 2011-07-11 02:10:48 +00:00
Goober5000 bff6c5d16d Valathil's method will fail on a string that is less than 60 chars and does not contain a :, so use memset, which is the historical technique 2011-07-11 02:05:27 +00:00
Zacam cc46867722 Additional warning messaging for parsing the ai_profiles.tbl or -aip.tbm. 2011-07-10 17:21:33 +00:00
Zacam 8438530258 From Valathil: ai_profiles tbl/tbm will now parse set_flags and warn on unrecognized declarations when found.
Credits to Spoon and WoD for unveiling this over-sight.
2011-07-10 17:05:57 +00:00
The_E 53428e2b62 Reverting 7334 and 7333, following feedback from valathil 2011-07-09 13:14:49 +00:00
Echelon9 872f8589b7 Fix r7325: Asset() =/= Assertion() 2011-07-07 12:59:38 +00:00
Zacam 1dd78de5ff Directional Lights sorting probably should not have been flipped, the rest seem to be okay though.
(Sun facing sides of ships were going pitch dark when lots of beams were active)
2011-07-06 23:07:09 +00:00
Zacam a312b49bc9 From Valathil: Correction to commit 7292. Light sorting now takes place in the proper order. 2011-07-06 20:55:45 +00:00
The_E 4fdfd96b8f Major change to FXAA. Now doing a prepass to convert the main shaders' RGBA output into RGBL. Also enables minor speedup for OpenGL 4/4.1 capable chips. Default preset changed to 6. 2011-07-06 10:48:56 +00:00
Goober5000 0244c64214 a wee bit more is needed 2011-07-06 05:06:22 +00:00
Goober5000 b175a91843 make things compile 2011-07-06 04:44:25 +00:00
Goober5000 eeeb1a8898 don't assert on a benign conflict 2011-07-06 04:39:40 +00:00
IssMneur 2272fd28e2 From Valathil: Vary the intensity of lighting from warp fireballs (wormhole) based on the radius of the fireball. 2011-07-06 04:22:09 +00:00
The_E 4fa70b61db New FXAA shaders. These have an increased preset range, going from 0 to 9 inclusive. Presets 0 - 4 use the "Console" version of the algorithm, 5 - 9 get the "PC" version 2011-07-05 12:35:18 +00:00
The_E 9db07896e1 Wasn't supposed to change this 2011-07-04 14:59:12 +00:00
The_E 28bbbdab09 Reverting, due to unforeseen consequences 2011-07-04 14:55:07 +00:00
The_E 48610b1de5 Small update to the FXAA shaders. Also adds a function for shader uniform access that was previously missing. 2011-07-04 13:59:02 +00:00
karajorma d6767809b1 Add a separator between paste and add paste in the event editor. 2011-07-04 02:22:26 +00:00
Zacam c284047c36 I should sleep more. 7307 was to add a "{ "glUniform4fARB", 0 }," not another v. 2011-07-03 14:44:16 +00:00
The_E 5674ce0c3e Updating these to current official versions 2011-07-03 08:40:21 +00:00
The_E b6548dfb50 And -oldfire, which does nothing, goes to the grave. 2011-07-02 19:45:46 +00:00
The_E eaf03bb480 And -safeloading bites the dust too. 2011-07-02 19:43:02 +00:00
The_E e23da70624 Removing several deprecated/unused cmdline options. Victims this round are: -cell, -timerbar and -d3d_bad_tsys 2011-07-02 19:33:23 +00:00
Zacam e0ae11af61 Fix for SSM usage causing Assert. If warp lifetime must be 4 seconds or greater, how about we warn them (in parsing) before they try and use it (and thus set it to at least 4.0) instead?
Thanks to bigchunk1 for catching this one and to IssMneur for the assist and review.
2011-07-02 05:07:57 +00:00
Zacam c2452b69fa This is the right way to do it.
Correct version of 7304.
2011-07-02 01:02:26 +00:00
Zacam 54644adfb8 ...but apparently not that way. 2011-07-02 00:14:04 +00:00
Zacam 9f00e84edf OGL_UNIFORM4FV should be (and now is) preceded by OGL_UNIFORM4F. 2011-07-01 23:37:30 +00:00
The_E 5d210146e3 Built-in bloom shader adjusted for higher quality 2011-07-01 19:09:25 +00:00
The_E ff7b3cdaaf Minor typo correction. Thanks to Valathil for finding it. 2011-07-01 19:00:57 +00:00
The_E f768943284 Swifty's collision detection improvements. 2011-07-01 17:00:31 +00:00
The_E f22bef9b5e Another small change to the built-in shaders 2011-07-01 11:33:09 +00:00
The_E c806651d11 From Valathiel: enables light sorting. Reduces light flickering in some cases. 2011-07-01 10:00:55 +00:00
The_E 9d6e0936cd Minor adjustment to the built-in shaders 2011-06-30 10:06:01 +00:00
The_E a46de9340f Fix for Mantis 2395: Introduces troubleshooting flag to switch between using glDrawElements and glDrawRangeElements 2011-06-28 20:20:25 +00:00
The_E aaba640733 Fix for Mantis 1983: Do not process lightning info when in standalone mode 2011-06-28 19:48:20 +00:00
The_E d60e3787d1 Fix for Mantis 2424: Crashes in multiplayer when <Wingname> 1 is not a player ship 2011-06-28 19:24:13 +00:00
The_E 3a451f36b5 When will I get it right.... 2011-06-28 14:13:21 +00:00
The_E a955dfa6dc Aaaargh, messed up AGAIN. 2011-06-28 14:10:23 +00:00
The_E 28e82d9c5b Ooops, fucked this one up a bit. 2011-06-28 14:07:34 +00:00
The_E 28db0bfe1f How did these values start colliding all of a sudden? Must have been my fault, sorry. 2011-06-28 09:38:06 +00:00
The_E 59cbde3d9e Adds sexps to manipulate a ships' collision groups. If two objects are members of the same collision group, they will not collide with each other. 2011-06-28 08:36:54 +00:00
Goober5000 e4266af9cf add string-get-substring, string-set-substring, and string-get-length; needed for Blue Planet 2011-06-28 04:08:59 +00:00
Zacam 524099c68e Some "\n"'s to help with logging during multi. "Scoring:" wasn't using any, so it would run on the next item right at the end. 2011-06-28 01:03:03 +00:00
The_E c57ede0cc1 Adding a piece of sanity checking here, to avoid crashing the release build under certain strange circumstances 2011-06-27 22:16:41 +00:00
The_E a60d32e669 Disable warning that is meaningless ("why are G_predicted_pos and G_fire_pos the same?"), and only serves to confuse people. 2011-06-27 13:52:45 +00:00
The_E fb21bc4272 Patch for Mantis 2050: Renaming the log file may cause crashes 2011-06-27 13:45:19 +00:00
The_E 4b5d6f939a From m!m: Patch for Mantis 2459 (Calling ts.createParticle with an invalid effect handle causes an Int3()) 2011-06-27 12:49:42 +00:00
Sushi e661586a3f Add "wait for animation" turret flag (turret won't fire until associated animation completes) 2011-06-26 18:10:54 +00:00
The_E 590cbf0b2b Patch from m!m to give scripting access to debris metadata 2011-06-25 14:15:44 +00:00
Swifty a7383cba89 Introduced the preprocess() method in HudGauges. Allowed the HUD to peek at the HUD message buffer when HUD is disabled. 2011-06-25 09:30:47 +00:00
The_E f8fef5c56f Patch for Mantis 2326: Standalone server crashes when ship classes are changed in loadout.
I hope.
2011-06-25 08:03:52 +00:00
Zacam d15c9259cd Standalone execution now creates it's own log file (fs2_standalone.log) 2011-06-21 19:23:56 +00:00
The_E 503fa0d19b Fixes issue with padlock view messages not appearing 2011-06-19 12:57:26 +00:00
The_E bafed3f964 Fix compiler warnings re: signed/unsigned mismatch 2011-06-18 21:36:05 +00:00
Sushi 3a7c0f2cee Halleck's glide sound patch (mantis 2452) 2011-06-18 00:44:41 +00:00
The_E 2f01d3f0ce Bumping the max number of files CFile can handle to 2^16 2011-06-16 17:09:30 +00:00
Zacam 1b6bfd2c89 Adds "/MP" as an Additional compiler Option for MSVC 2008. 2011-06-16 15:59:59 +00:00
Sushi 83b4d80566 Added is-in-box SEXP 2011-06-16 02:59:44 +00:00
chief1983 0a06eff122 Update OS X Ogg libraries in the Frameworks archive. 2011-06-15 20:04:07 +00:00
karajorma 65d6013539 Get and set SEXPs for countermeasures. 2011-06-15 12:46:02 +00:00
The_E a5a34af86d Oops, small typo 2011-06-14 16:45:35 +00:00
The_E f187ed531e This will make various text boxes react correctly to changes in font height. 2011-06-14 16:40:20 +00:00
Goober5000 2bdaac8c52 add mjn.mixael's credits image specification feature 2011-06-13 03:42:24 +00:00
The_E 695db665e3 Adds "$disable weapon damage scaling for player:" AI profiles option, which does what it says on the tin. 2011-06-11 19:26:56 +00:00
Sushi 4f8e6da7b9 Halleck's pre-launch sound patch (mantis 2451) 2011-06-10 04:52:35 +00:00
Zacam 0801b6861f Back port from AP: removes a couple of Unreachable NULL returns 2011-06-07 02:30:00 +00:00
Sushi 4b6d7192a1 Merged from Diaspora: Slight bump in contrail limit and max reinforcements 2011-06-04 16:42:43 +00:00
Sushi ed340e193f Merged from Diaspora branch: Make "+Shield_Hit_ani" optional 2011-06-04 16:02:21 +00:00
Sushi 14717f3368 Turn Z-buffering back on for BSG warp effect. 2011-06-03 23:54:30 +00:00
The_E cd9663f015 A small change to make Apple's GLSL compiler happy 2011-06-03 18:02:29 +00:00
chief1983 f7c4aa5221 Fix a typo reported by ElGuillermo. 2011-06-03 16:53:39 +00:00
Zacam 6f4725b0d9 In crawling through XT Branch, noticed this.
"%sÀÄ%s" should be "%s:%s"
2011-06-03 05:18:10 +00:00
Sushi fcbce45a2c Fix nasty pointer bug 2011-06-03 03:02:48 +00:00
The_E 6037493ae9 Another Assert -> Assertion conversion to help in mission debugging. 2011-06-02 09:36:24 +00:00
The_E c71012a829 Patch for Mantis 2421 from m!m: Adds scripting controls for particles. 2011-06-01 19:41:07 +00:00
Goober5000 8d10c0864d extra small enhancement 2011-05-30 21:20:32 +00:00
Goober5000 5fb4a6db18 add ability to set the duration of the ship death roll 2011-05-30 21:06:11 +00:00
The_E 2eab7d90f2 From m!m: Patch for Mantis 2446: Scripts not pausing when game is paused. 2011-05-30 18:47:27 +00:00
Goober5000 c6b4fc32d3 fix sanity check for too-long messages (Mantis #2412) 2011-05-30 06:47:27 +00:00
Goober5000 600936b331 reverting 7211 because it is not a proper fix 2011-05-29 06:56:17 +00:00
The_E 5c628d2abd Adding a code comment here to remind people about necessary bumpings 2011-05-28 14:37:48 +00:00
Zacam e1c107a483 Back in r6952 "HUD_OBJECT_PING," was added to "static int retail_gauges[] = {" but "int num_default_gauges = 43;" was not bumped up, resulting in "HUD_OBJECT_FIXED_MESSAGES" not displaying. 2011-05-27 23:38:14 +00:00
Sushi 2106903cbc Fixing some HUDs showing from other ships when they shouldn't, take 2 2011-05-27 14:36:14 +00:00
The_E 23b121a108 Patch for Mantis 2441 (friendly-stealth-invisible" flag doesn't work) from pyro3d 2011-05-27 09:11:51 +00:00
The_E 649c0fb3c4 Reverting commit 7203. If you wish to exclude certain gauges from rendering depending on camera mode, you need to edit that gauges's constructor function, NOT the canRender() method. 2011-05-26 20:45:12 +00:00
Goober5000 358343b813 break strings into bite-size pieces for ease of compiler digestion 2011-05-26 03:58:00 +00:00
Goober5000 0a8f93d474 fix minor pierce-shields table flag bug (Mantis #2442) 2011-05-26 03:40:07 +00:00
Sushi 6f11196106 Added an Assertion to help track down a sound error 2011-05-24 15:03:09 +00:00
Sushi 368029ec59 Fix some HUD gauges being rendered while viewing other ships externally 2011-05-24 14:40:57 +00:00
Sushi 1d4d3c0b6f Update thruster rendering (consistently render based on acceleration instead of speed, don't render distant/tiny thrusters) 2011-05-21 20:25:14 +00:00
The_E 784da1e0d0 Adding the FSU main shaders, FSU post-processing.tbl, as well as the post-processing and FXAA shaders to def_files. 2011-05-21 17:07:41 +00:00
The_E 3cbf515fe3 Since bloom can now be changed in-game, we always need to compile the shaders. 2011-05-20 15:56:30 +00:00
The_E 6526b86bc5 Patch for bug encountered by Zacam: Ship model instance data was not being reset correctly when changing ship classes. 2011-05-19 21:32:02 +00:00
The_E 444936ec21 This will make the lab more useful, as it is now possible to adjust the bloom intensity on-the-fly by pressing b (for more bloom) or n (for less bloom). 2011-05-19 14:51:51 +00:00
Zacam 99cdc82be6 Stupidest typo ever. "GS_STATE_END_OF_CAMPAIGN" not "_EMD_" 2011-05-19 12:20:22 +00:00
Sushi 63444087e2 Fix BSG warp effect shockwave 2011-05-19 00:50:27 +00:00
The_E ad1297167d Adding a bit of configurability to the FXAA business. This alters the F3 Lab so that the number keys correspond to FXAA presets (with 0 being lowest and fastest, default being 3). Also adds the "-fxaa_preset" commandline argument, which accepts a single int parameter. New Shaders needed to take full advantage of this, see forum thread (http://www.hard-light.net/forums/index.php?topic=76145.0) for details. 2011-05-18 11:37:27 +00:00
The_E 814f9777c5 Adding an error message in case FXAA shader compilation fails. 2011-05-17 16:29:43 +00:00
The_E 41bfa86911 This will enable FXAA support in FSO (Read: Antialiasing as a post-process stage). In order to use it, the shaders found here: http://blueplanet.fsmods.net/E/stuff/FXAA-shaders.7z need to be in data/effects. 2011-05-17 14:57:33 +00:00
The_E c1c9096d82 Converting a few more Asserts to Assertions. Also added a graceful exit path. 2011-05-15 08:38:22 +00:00
Sushi 8c3150455a Fix clipping problems with deathcam and cutscene bars. 2011-05-14 16:58:29 +00:00
Echelon9 365bd811c2 Documentation: First pass of AI code functions 2011-05-12 13:44:20 +00:00
Echelon9 38257bead8 Documentation: 3D clipper functions 2011-05-12 13:43:42 +00:00
Echelon9 e1fa804c1c Documentation: Animation code function documentation 2011-05-12 13:43:00 +00:00
The_E 70d1c6f8b1 Fixes issue where both the 2D and 3D radars were visible at the same time. Code should now respet the commandline flags properly. 2011-05-10 15:26:46 +00:00
The_E c684705e01 This makes the "Form on Wing" AI order accessible to FREDers as an AI goal. 2011-05-08 11:17:34 +00:00
Sushi 4324ca87d6 Updated "alt1" path mode so that it respects the cap-waypoint-speed SEXP. 2011-05-07 11:31:30 +00:00
The_E 033f06ec20 Aargh, this might have been catastrophic 2011-05-01 15:05:01 +00:00
The_E c65a175d2c Fix compile warnings here. 2011-05-01 15:00:53 +00:00
Echelon9 e55068ccf1 ds.cpp: Back this change back out until the wholesale change can be made at once 2011-05-01 14:59:31 +00:00
Echelon9 f55260cc0e Fix Diaspora Mantis 772: Player is able to fire countermeasures when player-use-ai SEXP is used. Also document. 2011-05-01 13:03:39 +00:00
Echelon9 761266b768 Two small comment typo corrections for model.h and ship.cpp 2011-05-01 12:00:26 +00:00
Echelon9 8138efbcf9 Documentation: Commentary for modelanim.cpp|h 2011-05-01 11:59:40 +00:00
Echelon9 aa708f6d26 Fix Valgrind report: Use of uninitialised value &freq in alcGetIntergerv(); requires braces to address GCC crosses initialisation error due to the goto in this function 2011-05-01 11:07:26 +00:00
Echelon9 dab00c94bf Documentation: Help save some trees 2011-05-01 09:06:12 +00:00
Echelon9 4669a7613c As we don't do Unicode properly yet, this character corrupts. In French it still means Hat Back (joystick control) 2011-05-01 08:53:13 +00:00
Echelon9 5565e0ac8b Documentation: hud.cpp and hud.h files 2011-05-01 06:05:48 +00:00
Echelon9 aa1601bb36 Documentation: Fix a few syntax errors reported in Doxygen's log 2011-05-01 03:54:01 +00:00
The_E 744a247f67 Change syntax and help text of the set-jumpnode-model sexp, as it was rather broken before. 2011-04-30 16:23:05 +00:00
Echelon9 9a4d348bc0 Xcode project file: Generate debug builds with a DWARF plus dsym file, so that analysis tools can retrieve source code line numbers 2011-04-30 06:24:08 +00:00
Echelon9 09a360c284 Documentation: sound/ds.cpp 2011-04-30 06:18:03 +00:00
The_E a858e90a6d And now set-jumpnode-name is even multi compatible. 2011-04-29 14:54:38 +00:00
The_E 83bd54130b Added warning to the sexp help for set-jumpnode-name 2011-04-29 14:10:52 +00:00
The_E 6c5013760a set-jumpnode-name, as implemented by CommanderDJ 2011-04-29 14:05:45 +00:00
karajorma 68645bd224 Fix for Mantis 2427 (Directive-Is-Variable SEXP doesn't allow you to change the variable name. 2011-04-28 12:46:01 +00:00
Sushi 2992e88315 Add $Path Metadata and +departure rvec to ships.tbl 2011-04-27 14:22:22 +00:00
The_E b79a54b67a Okay. No more screwing around with this. 2011-04-26 11:13:56 +00:00
The_E a71d012ef6 Ooops, this armor type business isn't ready yet 2011-04-26 11:09:19 +00:00
The_E e821ae2ccd Fix for Mantis 2428: Decal parsing deprecation error 2011-04-26 09:24:54 +00:00
The_E d71a5d5b90 Fixes issue with custom HUD gauges not resetting to their default values between missions. 2011-04-24 17:19:21 +00:00
Wanderer 2eb06e1787 fixes to turret rotation handling (swarm issue) and to secondary turret angle checks 2011-04-23 21:53:19 +00:00
Wanderer 06a3381dd9 fix for mantis 2309's corkscrew issue 2011-04-23 12:18:30 +00:00
The_E 7e50611a02 Guarding against a null vec3D in vm_vec_normalize here. 2011-04-21 16:12:54 +00:00
Wanderer e04d475345 related to mantis 2406 - ai profiles option to make beams deal damage to weapons 2011-04-20 15:40:29 +00:00
Wanderer 94faf22283 Fix for mantis 2406 for weapon vs. weapon collisions (not beam vs. weapon collisions however) 2011-04-20 08:17:24 +00:00
IssMneur e6f43f6f0f Make this a more useful error message. 2011-04-20 04:16:42 +00:00
Sushi 39d6889f86 Add "$ai path mode:" to ai_profiles. This allows an alternate method of path following that works better in some cases, such as with high-damp ships. 2011-04-18 14:08:31 +00:00
karajorma 1bba558d70 Add a SEXP to allow variables to set the counter in a directive. 2011-04-18 05:34:18 +00:00
Echelon9 5d635a262b DOC: Amendment to frand_range() 2011-04-17 00:33:51 +00:00
Echelon9 e12f71c83d DOC: Documentation of floating.cpp 2011-04-17 00:18:59 +00:00
Wanderer 39e8a24663 fix for issue noticed by Zacam in the particle effect changes 2011-04-15 14:34:31 +00:00
The_E f4c90eff0c Woops, this shouldn't have gone in 2011-04-15 12:44:24 +00:00
The_E e5efa336c1 Fix for Mantis 2416 (Messages do not display when in padlock view) 2011-04-15 12:34:11 +00:00
The_E ceb68d44bd Fix for Mantis 2240 (HUD anis and training messages do not display if hud_disable_except_messages is active) 2011-04-15 12:16:17 +00:00
Wanderer bf66734ded adds table controls for various particle effects, and explosions related to ship death event. per ship class base deathroll time. 2011-04-14 18:59:06 +00:00
Zacam 973fab655e Reported by chief1983, adds closing brace to line 2346.
Mac's should be happy now.
2011-04-12 23:35:58 +00:00
The_E 5cbf11ff6b Of course, I did it wrong. However, this works now. 2011-04-12 13:32:27 +00:00
The_E b68ef9b9b0 Requested by Axem: Allow beams to tag targets. 2011-04-11 15:44:33 +00:00
Echelon9 362241cf22 Documentation: hud_sensors_ok() function comment 2011-04-10 13:09:24 +00:00
Echelon9 247ac6373e Second go at patch r7110 2011-04-08 13:00:51 +00:00
Echelon9 0a7e8be8f4 Fix two buffer overflows: missionweaponchoice.cpp(3580): warning C6386: Buffer overrun: accessing 'slot->wep', the writable size is '28' bytes, but '4194244' bytes might be written & missionweaponchoice.cpp(3585): warning C6386: Buffer overrun: accessing 'slot->wep_count', the writable size is '28' bytes, but '4194244' bytes might be written 2011-04-08 12:38:19 +00:00
The_E 9a6f8a8be7 Removing an Assert in favour of more elegant error handling. 2011-04-06 10:25:18 +00:00
The_E 092ea635c3 Fix for issue with the "no ETS" flag where subsystems were not getting recharged properly. 2011-04-05 12:05:32 +00:00
The_E 67175970a4 2011-04-05 09:44:43 +00:00
The_E 72287264e3 FSF's fix for Mantis 2371 (Hotkey selection does not work for additional wings) 2011-04-04 14:48:27 +00:00
The_E 9b580610ca Fix for Mantis 2409 (Directive gauge is rendered despite hud-disable-except-messages) 2011-04-04 13:07:17 +00:00
The_E 406b57e5b0 Fix for Mantis 2391 (Erroneous warning about missing assets due to changd HUD loading mechanisms) 2011-04-04 13:03:29 +00:00
The_E 42ff356ad2 Fix for Mantis 2422 (Target Shield indicator behaves like a duplicate of the player shield indicator) 2011-04-04 12:56:59 +00:00
The_E 0aa44e3b12 Correction: Previous commit broke AWACS behaviour. 2011-03-30 09:42:52 +00:00
The_E e635eb373b Add a sanity check here. 2011-03-29 18:06:04 +00:00
The_E ef2681eb69 Change an Assert to an Assertion for better debugging. 2011-03-29 17:17:15 +00:00
Zacam 223920ded6 7092/7093 were meant for Antipodes, not Trunk. 2011-03-29 13:55:04 +00:00
Zacam 8501ffa53f Reported by rsaxvc (Probably due to MAX_INT being used)
http://www.hard-light.net/forums/index.php?topic=75332.0
2011-03-29 13:50:17 +00:00
Zacam 9c0144dd96 Pull the "demo" dir out of the makefile. 2011-03-29 13:42:57 +00:00
Echelon9 6628e967b3 DOC: Update some documentation in missionbriefcommon.cpp 2011-03-24 12:53:44 +00:00
Wanderer db8b44191d feature commit - damage and impact particle spew controls, control for setting a multiplier for propagating explosion radius. 2011-03-19 22:37:32 +00:00
The_E a1acb0601d And more from m!m, as seen here: http://www.hard-light.net/forums/index.php?topic=44821.msg1487355#msg1487355 2011-03-19 21:49:42 +00:00
The_E 808a3dd1e0 A few tweaks and additions by nuke 2011-03-19 21:37:51 +00:00
The_E 9d8caf5f2a m!m's corrections to subsystem:fireWeapon() as seen here: http://www.hard-light.net/forums/index.php?topic=44821.msg1486751#msg1486751. Slightly adjusted to use model instances. Also tweaked ship_get_global_turret_gun_info() to use model instances. 2011-03-18 21:47:17 +00:00
Sushi 5469769936 Add "$Detail Distance Multiplier" 2011-03-18 14:33:50 +00:00
Goober5000 b9a1eca909 improved version of hud_squadmsg_wing_valid(); fixes Mantis #2415 2011-03-11 07:21:27 +00:00
karajorma a561ecc2a3 Remove a few annoying compilation warnings 2011-03-10 00:26:45 +00:00
Goober5000 af39be3120 add another ship class to the list of FSPort changed names 2011-03-09 04:04:33 +00:00
Goober5000 c6f40a74bb finish patching subsystem comparison 2011-03-03 07:00:42 +00:00
Swifty 225f16f754 Memory leaks involving Polymodel_instances plugged. 2011-03-02 14:08:22 +00:00
Goober5000 e765702121 use subsystem_stricmp where appropriate 2011-02-28 08:27:52 +00:00
Echelon9 444c6b293b Update SVN ignore keyword so we don't get documentation output in SVN 2011-02-26 01:18:16 +00:00
Echelon9 d52f90c076 First version of our Documentation system, using automated Doxygen source code comments 2011-02-26 01:15:51 +00:00
Echelon9 2c8dc2722d Effective STL: Use Container.empty() instead of Container.size() == 0 in if() statements 2011-02-25 14:38:28 +00:00
Goober5000 b0dcbfbc56 change the subsystem warning to an nprintf, since it's a pretty benign notification and sexps don't notify you anyway 2011-02-23 05:09:24 +00:00
Echelon9 d549d06728 DOC: Further instructions on initialisation of the pseudo random number generator 2011-02-22 12:05:31 +00:00
Echelon9 634dcc7e23 Accompanying changes to aicode.cpp following staticrand.cpp 2011-02-21 14:15:34 +00:00
Echelon9 80d622f56f A couple of other small changes to staticrand.cpp|h to address readability 2011-02-21 14:13:23 +00:00
Echelon9 1c687e4b4e Initial testing of something very exciting for the coders... 2011-02-21 12:50:16 +00:00
Goober5000 750df36303 add slash and backslash 2011-02-19 04:51:02 +00:00
karajorma 92be430fdb Add the Num-Valid-Arguments SEXP. 2011-02-15 08:18:58 +00:00
Goober5000 315bd423dc rename subsystem type fields so as to better distinguish them
some consistency checks
add "no aggregate" flag to exclude a subsystem from aggregate hitpoint calculations
2011-02-14 08:33:23 +00:00
The_E 9f9a294e9d More lua stuff from m!m 2011-02-13 19:45:12 +00:00
Sushi 5a9202910f Fix a bug with friendly shield manage/cm usage 2011-02-12 17:02:23 +00:00
Goober5000 dbd13bba38 activate the OF_IMMOBILE flag, and clean up the obj_move_all loop slightly 2011-02-12 05:00:13 +00:00
Goober5000 a5cd0f8de0 gaaaah, fix a whole bunch of bugs with the no-ets flag:
checkbox ui settings were incorrect
checkbox wasn't hooked into the event loop
resource #define's overlapped
FRED never saved the ship flag
ship flag did not have an equivalent parse flag
sexp(s) to modify ship flag did not use the existing ship flag sexp architecture
2011-02-07 09:08:39 +00:00
Goober5000 9b0b26b643 fixed compilation error 2011-02-06 08:18:26 +00:00
The_E 13ade13402 More fixes for Mantis 2372. Should now allow longer descriptions. 2011-02-05 09:18:04 +00:00
The_E fe51ef9df0 Minor whoopsie. This shouldn't have been committed just yet. 2011-02-05 08:59:26 +00:00
The_E ebab2d44ff Adding patch for Mantis 2385. This adds a "+sub_name" option to the animation code, which comes after/replaces "+sub_type" for a few triggers, such as the "weapon fired" trigger. 2011-02-04 17:18:39 +00:00
The_E e36d312d73 Adding a bit of verification here to catch a very strange bug 2011-02-04 17:12:48 +00:00
The_E 0b9429b9ea Adding a few error messages 2011-02-04 17:02:49 +00:00
Echelon9 9ec0215ad8 Remove last references to the redundant Intel_anim_filenames array 2011-02-04 15:31:44 +00:00
Zacam 720ad2127a Nukes Particle Code update (for more particle types)
http://www.hard-light.net/forums/index.php?topic=74165.0
2011-02-04 14:10:59 +00:00
Zacam bed42975da Karajorma's "Clean up" code. (Not for credit, but because I'm trying to reduce the "open" number of "Code Reviews" so that we don't get too backlogged with them)
http://www.hard-light.net/forums/index.php?topic=74066.0
2011-02-03 07:41:16 +00:00
FUBAR-BDHR c0df5578c8 Add node-targeted sexp 2011-02-02 06:26:21 +00:00
Goober5000 f570348ee2 --the behavior of cargo index -1 (which can only happen for capships) and cargo index 0 is substantially the same, so let's standardize on index 0... this prevents crazy stuff happening with bitwise operators on negative numbers :-/
--also, remove the restriction on capship cargo where ships must have the "scannable" flag
--because of the above constraints, "nothing" cannot be a meaningful subsys cargo, but then again, scanning a subsystem with "nothing" didn't do anything in the old code, so this doesn't change anything
2011-01-31 10:04:37 +00:00
Goober5000 c77551181c fix for Mantis #2390
errors in handling the CARGO_NO_DEPLETE flag for ship subsystems
2011-01-31 09:18:21 +00:00
Goober5000 9df7a37f3f fix some errors with sexp numbering that free up 2 Change slots
merge the Nav operators into other categories
add the new Change2 category and set up hacks so that its operators will display in Change's menu
2011-01-30 09:17:15 +00:00
Goober5000 eae11de29b commit the "immobile" flag, requested by Black Wolf, Diaspora, etc. This is just the infrastructure; the flag doesn't actually do anything yet. 2011-01-30 08:19:17 +00:00
Goober5000 e68c34eb90 fix ship flag dlg layout, which got messed up in The E's commit 2011-01-30 08:12:42 +00:00
Goober5000 32c70d3f96 someone made a bug here! 2011-01-30 07:55:05 +00:00
Goober5000 3a9ed93730 fix compilation 2011-01-30 07:07:33 +00:00
Zacam 398523e3cc It would have been NICE if Tortoise had actually _deleted_ the files when it asked if I wanted them removed. Stupid !@$^*&# Tortoise. 2011-01-30 06:09:42 +00:00
Zacam 9254dae233 Resolves LNK4221 under MSVC. multi_oo and psnet are not actually linked/used, so references pointing to them now go to multi_obj and psnet2 respectively. (Same as Antipodes 6881)
http://www.hard-light.net/forums/index.php?topic=73147.0
2011-01-30 05:59:36 +00:00
Zacam 4517320ffd Microsoft Visual Studio 6/2005/2008/2010 project updates to use newer libjpeg code committed on 6980. 2011-01-30 01:40:18 +00:00
Echelon9 fb8910635e Update libjpeg in source to v8c (16-Jan-11) from 6b (27-Mar-98). For more details see http://www.hard-light.net/forums/index.php?topic=74110.0 2011-01-30 01:33:52 +00:00
Goober5000 d03d5b95e7 this should fix the weird crashes in localization 2011-01-29 09:41:13 +00:00
IssMneur a468eeb878 Allow a primary or secondary weapon shot be substituted with any other weapon in any arbitrary pattern.
http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Substitute:
2011-01-27 05:35:13 +00:00
Echelon9 f9fd5807d8 Resolve circa 800 warnings that occur on Xcode due to symbol visibility scoping issue. 2011-01-26 11:30:56 +00:00
Echelon9 4be2c7e94d Small fix: Correct the spelling of a NavPoint function 2011-01-25 14:37:43 +00:00
Echelon9 04fe584c87 Chase down radardradis.h from the same location in Xcode 2011-01-25 13:10:37 +00:00
Echelon9 55c3409cf8 What's radardradis.cpp doing in that spot of the Xcode project file? 2011-01-25 13:05:58 +00:00
Echelon9 b1be9e56e0 We don't need a specific Copy Bundle Resources stage to put the Info.plist file in the Mac .app bundle, as well as setting the INFOPLIST_FILE setting. Using Copy Bundle Resources doesn't use the C preprocessor and then puts the file in the wrong location anyway. 2011-01-25 13:03:00 +00:00
Echelon9 89102e2c31 shipfx_large_blowup_init() function can have the void return type, as the caller never checks. 2011-01-25 12:25:59 +00:00
Zacam df749e6d45 A tiny over-sight. Now incorrect values on "hud_speed_multiplier" will actually report as such. 2011-01-25 07:51:02 +00:00
The_E 4a414205a3 Fix for Mantis 2372 (+Description field in Ships.tbl is being ignored) 2011-01-23 21:20:04 +00:00
The_E 824dd0cae8 Fix for Mantis 2380 (Setting target subsystem through scripting doesn't work) 2011-01-23 17:10:53 +00:00
The_E 34b7cbe0b7 Resolves a few signed/unsigned warnings 2011-01-23 17:06:58 +00:00
The_E 76e7f656d1 Adds "no ets" ships.tbl flag. 2011-01-23 16:03:04 +00:00
Echelon9 7d7ca9eb15 Fix: warning C6246: Local declaration of 'i' hides declaration of the same name in outer scope. 2011-01-23 12:47:08 +00:00
Echelon9 e09dea7a79 Revert this change to size_t; will require the wholesale update of the weapon code indices at the same time 2011-01-23 12:30:06 +00:00
FUBAR-BDHR 9f29b454b5 Fix for FRED not compiling with new nebula lightning from r6958 2011-01-23 06:56:01 +00:00
FUBAR-BDHR 41b1476b23 Fix bug in sexp_ship_set_damage_type() 2011-01-22 06:52:43 +00:00
Echelon9 a8db22bc65 Refactored nebula lightning & removed limits on Lightning.tbl 2011-01-22 05:35:43 +00:00
Sushi b38fa48e7e Add "starts locked" subsystem flag (that turret starts out locked by default and needs to be turret-freed before it will fire) 2011-01-22 00:44:44 +00:00
Goober5000 110cd3bccc add turret-protect-ship and turret-unprotect-ship 2011-01-21 08:55:26 +00:00
Goober5000 ab8808e35a get-object-speed-* are status sexps, not change sexps! 2011-01-21 08:49:54 +00:00
IssMneur efff8a5d83 get-object-speed-{x,y,z} added. 2011-01-21 06:28:37 +00:00
Swifty 6e52dbd299 Resolved some issues involving the Ping Indicator not displaying. 2011-01-19 09:21:22 +00:00
karajorma b742eac806 LuaPineapple's fix for Mantis 2322.
Some comment clean up.
2011-01-19 08:24:26 +00:00
The_E b4db3b3ecf FUBAR's damage type sexps. Tested ad nauseum by BP. 2011-01-18 16:21:36 +00:00
Goober5000 34fd0c53ad make subsystem-vanish consistent with ship-vanish
clarify sexp help and fix name (using deprecation, so that old missions will still work)
2011-01-16 08:20:08 +00:00
Goober5000 42fc6e461c add if-then-else and perform-actions 2011-01-16 08:18:09 +00:00
Echelon9 6c4bed411e Fix Mantis 2379: Last available nebula storm type in Lightning.tbl wouldn't be used in game 2011-01-15 03:54:50 +00:00
Echelon9 400331d4ec Cleanup cmeasure.*: Remove dead code, use size_t as for loop array index not a signed int 2011-01-15 03:05:01 +00:00
Echelon9 822110405a Prevent potential overflow of Escort_ships[] array 2011-01-15 02:33:34 +00:00
Sushi 95a713128c Add "hide from radar" weapon flag to force bombs not to show up on radar 2011-01-12 16:51:38 +00:00
Goober5000 eafc0ca82e fix a return value error
also, cut down on the number of warning messages shown for background bitmap loading
2011-01-12 10:03:45 +00:00
Goober5000 230da289d2 change xor (but not bitwise-xor) to use any number of arguments, not just 2
enhance string-to-int to ignore non-numeric characters (so turret07 becomes 7)
2011-01-12 02:10:22 +00:00
Goober5000 330fee1b3b commit string-concatenate and int-to-string 2011-01-12 01:37:03 +00:00
Swifty 98b65e2dba Eliminated pesky bug involving some gauges not being properly updated with necessary HUD config data. Took a while to figure out. 2011-01-11 07:58:03 +00:00
Goober5000 0cc190e9f1 stupid brain fart
fix Mantis #2375
2011-01-11 01:03:48 +00:00
The_E ebff760cca There is no function with the signature "double pow(int, int)" in math.h 2011-01-10 16:10:54 +00:00
Goober5000 8370567747 remove for-each-of
add a note regarding string-to-int to for-counter
supernova-start takes a positive argument
2011-01-10 11:55:15 +00:00
Goober5000 2f0324048b Added the following sexps:
pow (power function)
xor (logical operator)
set-bit, unset-bit, is-bit-set (for working with individual bits in integers)
bitwise-and, bitwise-or, bitwise-not, bitwise-xor
2011-01-10 11:29:24 +00:00
FUBAR-BDHR 55de86a47d Add the ability to define detail distances for weapons. 2011-01-09 22:35:02 +00:00
FUBAR-BDHR c07f1a1c1d Fix for Mantis 2368. Subsystems with vanish flag still play sound from player ship 2011-01-07 22:01:36 +00:00
Goober5000 ea4cc1e870 the repeated messages get really annoying, so log them and display one message 2011-01-07 10:16:10 +00:00
Goober5000 66c82d58c1 added two awesome sexps, for-each-of and for-counter
as part of the sexp infrastructure, add test_argument_vector_for_condition so that argument sources are not limited to sexp nodes
2011-01-07 09:11:02 +00:00
chief1983 5ffb61b26c Fix for #2365: Assert to Assertion so we can tell the user a little more about the crash. 2011-01-06 05:07:51 +00:00
Swifty 4a9e605e56 Support for PNG/JPG/TGA based EFFs for the HUD and other graphics that previously required ANI/PCX. 2011-01-05 08:54:14 +00:00
Zacam 5b9ceff06a GLSL version Detection fix.
http://www.hard-light.net/forums/index.php?topic=73712.0
2011-01-05 07:12:48 +00:00
FUBAR-BDHR 1529f948f2 Add flag that applies damage to subsystem as if it were the hull. 2011-01-05 00:12:01 +00:00
Goober5000 0ee79b269f resolve a conversion warning pointed out by FUBAR 2011-01-02 00:35:05 +00:00
Goober5000 08e86d0192 re-add Echelon9's commit, with proper logging, and also with parallel fix to bmpman.cpp 2011-01-01 09:17:36 +00:00
Sushi 65f7c760d8 Add "$ai aims from ship center:" and "$allow primary link delay:" AI profiles flags 2010-12-31 20:03:16 +00:00
Goober5000 6d4b0efd39 add sexps for object orientation 2010-12-31 07:41:01 +00:00
Goober5000 4f7f79732e missed one file 2010-12-31 04:28:37 +00:00
Goober5000 d57ab51162 change fl_radian to fl_radians so as to be consistent 2010-12-31 04:02:41 +00:00
chief1983 34d11f1295 Fix the DirectInput commit r6902 breaking compiling on nix 2010-12-29 18:18:44 +00:00
Echelon9 337786ef26 Remove from Xcode project file two non-existant source code files 2010-12-29 07:45:10 +00:00
Zacam 5ae8d90656 Thanks to Goober5000, this is the correct way to be doing this. 2010-12-28 04:49:05 +00:00
Zacam 802d5956f3 Fixes the index so that Player Main Hall changes will actually save properly. Should have caught this back in 6860. 2010-12-27 20:59:16 +00:00
Sushi 9a71e9b080 Add -disable_di_mouse command-line option to force the game to use Windows mouse input instead of DirectInput. For some people, this results in more reliable mouse input. 2010-12-27 16:17:54 +00:00
Zacam 900fd755b1 Fixes reports of Retail data showing "0 ms" for ships Velocity in Ship Selection Screen. When multiplying an INT by a FLOAT, setting the fl2i() on the float is a good idea. 2010-12-27 15:27:48 +00:00
Swifty aa71f4a817 Clear the active display list when this ship is beleeted. 2010-12-27 09:28:17 +00:00
Echelon9 0da3dff1c1 Fix a small typo in Diaspora feature's comment 2010-12-27 08:26:04 +00:00
Echelon9 0557c1e4cd Correct 2 comment typos 2010-12-27 08:18:39 +00:00
Echelon9 9410909ee1 Fix: Mantis 2351 - Animated subsystems not counted as rotating allowing max to be exceeded 2010-12-27 08:00:31 +00:00
Echelon9 db1e2a891e This check can go back in, the real cause was fixed in r6893. Good work Assert() 2010-12-27 07:48:31 +00:00
Swifty 0c67dd9abc Get Lua ray tests to use model_instances for collision detection. Fixes the failed assertion associated with this. 2010-12-27 07:36:49 +00:00
Echelon9 7fa59778c5 Fix a comment typo 2010-12-27 06:47:03 +00:00
Swifty a5be8facf6 Limit the setup of cockpit displays to only the player ship. 2010-12-27 05:52:33 +00:00
Swifty 4d3bf36f48 Fixes the weapons list gauge bug where a blank space would render when no secondaries are loaded. 2010-12-27 05:43:52 +00:00
Zacam fdd529621a Revert 6884. Not a good thing to do apparently. 2010-12-26 19:46:00 +00:00
The_E 38d2da68a3 Fix for Mantis 2350 (Sound assignments get lost/become bogus when changing ship class) 2010-12-25 15:15:28 +00:00
Zacam f98be5dcde Fix: MSVC signed/unsigned mismatch. 2010-12-25 13:15:55 +00:00
FUBAR-BDHR c3550e55dc Fix for mantis 2356: Turret-free-all in an every-time acts as turret-lock-all
Fixed turret-free, beam-free-all, and beam-free as well
Removed generic subsystem argument from those as well as turret-tagged-specific as they do not have code to process it.
2010-12-22 18:39:40 +00:00
The_E 083a84feff Swifty's go-swift stuff. Makes collision detection slightly less insane. 2010-12-22 14:42:21 +00:00
The_E 1f1640d47d 2010-12-20 19:53:52 +00:00
Sushi c7eac88eec Fix oversight from AI.tbl overhaul a while ago 2010-12-20 16:57:13 +00:00
Echelon9 08eeeedff3 A further two spots where the MSVC 2008 compiler doesn't like SAFE_STRINGS changes 2010-12-20 07:50:23 +00:00
Echelon9 cd7da4d94e Mantis 1889: Utilise all three hud target box rendering styles (inclusion of a rendering style with proper lighting) 2010-12-20 07:46:38 +00:00
Echelon9 f3359d1547 MSVC compiler doesn't like some of these SAFE_STRINGS changes, GCC does... 2010-12-20 06:14:08 +00:00
Echelon9 eb129200a1 Fix: Convert a further subset of strcpy() to the SAFE_STRINGS strcpy_s() version 2010-12-20 04:28:01 +00:00
Echelon9 7b9d36e105 Guarding against array out of bounds error, ahead of conversion to STL type 2010-12-20 03:04:54 +00:00
Echelon9 10dd0c57d5 Clean up redundant checks 2010-12-19 02:03:41 +00:00
Echelon9 25b199c25c Two further cases of typo referenced in r6861 fixed 2010-12-19 01:28:38 +00:00
Echelon9 1a98990c3c Remove redundant Invalid_demo_keys[] and associated control_config_valid_action() 2010-12-19 01:24:50 +00:00
Echelon9 78496b1953 Remove redundant #ifdef check 2010-12-19 01:09:38 +00:00
Echelon9 f278ca0e85 Correct typo in comments 2010-12-19 01:06:58 +00:00
Echelon9 b19fc28a7e Fix: Local declaration of 'i' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '786' 2010-12-15 12:51:51 +00:00
Echelon9 91fbebd307 Fix: Local declaration of 'i' hides declaration of the same name in outer scope. 2010-12-15 12:48:24 +00:00
Echelon9 178963e78a Clear out commented #IFDEF INTERPLAYQA section 2010-12-15 12:39:11 +00:00
Echelon9 bacb819e5f Fix: Local declaration of 'retail_gauge_loaded' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '392' 2010-12-15 12:27:14 +00:00
Goober5000 2e7dea0018 set certain flags that used to be in ship_info via ship_set and change_ship_type, which is the correct thing to do, rather than in the middle of parsing, which was a red herring
(fixes Mantis #2169)
2010-12-13 07:33:35 +00:00
Goober5000 c8dd5e1bab bypass weird compiler error 2010-12-13 07:24:38 +00:00
Zacam 81bf3cec47 Reverts commits 6681, 6683 and 6684. Adds C4101 Warning suppression for Release Builds (only) so that "catch" doesn't cause an unreferenced parameter warning. 2010-12-13 05:51:49 +00:00
The_E 0b292a1652 Fix for Mantis 2349 (Invalid number of arguments not detected by FRED). This adds a new function to sexp.cpp (check_operator_argument_count()), which can be used to handle cases like send-message-list.
Also adds a warning to change-iff-color in case the FREDer supplied an invalid rgb argument (Mantis 2256)
2010-12-13 04:10:08 +00:00
Zacam 09fad95070 Antipodes 7 Merge: HUD Overhaul, by Swifty. 2010-12-12 20:34:15 +00:00
Echelon9 b1c2a85faa Fix: Local declaration of 'template_id' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '1062' 2010-12-12 01:09:02 +00:00
Echelon9 06d24df914 Clean up up logic check on packet length overrun 2010-12-12 01:08:10 +00:00
Echelon9 6c50ba90ba Fix: Local declaration of 'wip' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '5444' 2010-12-12 01:07:03 +00:00
Echelon9 ebc0d3b6f4 Fix: Local declaration of 'rship' hides declaration of the same name in outer scope. For additional information, see previous declaration at line '6450' 2010-12-11 13:49:06 +00:00
Echelon9 d0e05d5417 Fix: Buffer overrun: accessing 'struct NavPoint * Navs', the writable size is '352' bytes, but '396' bytes might be written: Lines: 1597, 1600 2010-12-11 12:54:02 +00:00
The_E 214e0daf00 Fix for Mantis 1647 (Message brackets linger around when player turns traitor) 2010-12-11 06:03:45 +00:00
Goober5000 257f92441f use standard font to output the "more" indicator 2010-12-10 08:39:21 +00:00
FUBAR-BDHR 17776c091e Fix for mantis 0002337: lock-rotating-subsystem affects more than it should 2010-12-09 23:30:04 +00:00
The_E e38b68bee5 Partial fix for Mantis 2277. This moves the "Turret Firing" animation trigger so that it only triggers when the turret really is firing. 2010-12-09 23:13:46 +00:00
The_E 5db4e2a6b3 Fix for Mantis 2306 (Destroy subsystem cheat does not work in release builds) 2010-12-09 20:28:16 +00:00
The_E bf578e51ef Genghis' fix for Mantis 2164 (Better feedback and error handling for invalid muzzleflash definitions) 2010-12-09 19:55:46 +00:00
The_E 254cd2f2d2 Aaaand done. Now it's fixed. 2010-12-09 18:54:28 +00:00
The_E dc91321cba Fix for Mantis 2111 (Bank indicator alignment issues in weapon loadout select screen) 2010-12-09 18:07:44 +00:00
The_E 649f1ff6c3 Fix for Mantis 2055 (Allow/break/never/fix-warp sexps don't work on the AI) 2010-12-09 16:24:54 +00:00
The_E 82efd3434b Fixes issue with "external model launcher" flag, where secondary weapons would use the models for primary weapons noticed y Droid803 2010-12-08 20:08:25 +00:00
The_E 109f962350 What in the nine hells is happening here? Did noone ever use set-armor-type to reset an armor type? 2010-12-08 04:25:14 +00:00
The_E 8f1f95c273 Fix for Mantis 2257. This adds the options "+HUD Message:" (Boolean, whether or not firing this SSM generates a notification on the HUD), and "+Custom Message:" (if you want to use something other than "Firing Artillery!") to ssm.tbl. 2010-12-07 16:33:58 +00:00
Goober5000 32dd5f9306 follow-up to 6804... fix secondary as well as primary 2010-12-07 07:57:00 +00:00
FUBAR-BDHR ce8024ce15 Oops on the use of /n instead of \n. Good catch IssMneur 2010-12-07 06:31:53 +00:00
The_E 5dcdc79c4e Fix for Mantis 2336 (Countermeasure type assignment doesn't survive ship class change) 2010-12-06 23:27:46 +00:00
FUBAR-BDHR a79d51b357 Fix backward LOD warning message. 2010-12-06 22:00:14 +00:00
The_E 0b4fb309ae Turning this assert to an Error, after feedback from Goober 2010-12-05 18:07:28 +00:00
The_E 4925eb8412 Turning these Warnings into Assertions, as it's something that really needs to be fixed. 2010-12-03 23:27:58 +00:00
The_E 3f21f1fe5e Converting this Assert() to an Assertion() for better feedback 2010-12-03 22:41:44 +00:00
The_E 60ac096301 Taylor's fix for Mantis 2172 2010-12-03 17:44:23 +00:00
Sushi 1389b67bd4 Fix an additive weapon velocity bug (main symptom: collision detection going wonky sometimes). 2010-12-03 15:37:44 +00:00
The_E 9441cc7eef Okay, I'm disabling this Int3(). It's far too easy to hit, even with perfectly valid data. 2010-12-02 21:06:32 +00:00
Echelon9 b8f3fe13bc Fix 2339: Intermittent crashes in add_sexps 2010-11-29 10:28:47 +00:00
Goober5000 e20b95bba4 add_data_dup when we're working with a temporary string 2010-11-29 08:36:31 +00:00
The_E c52d8a4763 Adding a break here 2010-11-27 08:13:53 +00:00
Goober5000 2afc961a62 bump number of misc anims to 32 2010-11-26 04:03:56 +00:00
Goober5000 4faa94a9e3 add feature to select a random animation from a miscellaneous animation group 2010-11-25 23:51:22 +00:00
The_E 04e252c1ea Thanks to Goober for noticing the right way to do this. 2010-11-25 20:48:07 +00:00
Goober5000 81607f7ddc move the error nprintf to a place where it will trigger before the crash it tests for
fix a loop boundary check
2010-11-25 20:10:13 +00:00
The_E 8726f7e0fb Fix for Mantis 2344 (Post-processing sexps don't show correctly in FRED) 2010-11-25 18:48:00 +00:00
The_E 507631cf86 Moving post processing flag back to graphics section 2010-11-25 15:11:04 +00:00
The_E e978adbbdf Adding a return and Warning in case of a null pointer here 2010-11-24 11:35:21 +00:00
Goober5000 04c5416de9 add error detection for arrays that exceed maximum
num door sounds = num door animations
(how did that ever work before?)
2010-11-24 07:18:05 +00:00
Goober5000 5214560f70 how was that accidentally deleted? 2010-11-24 06:39:22 +00:00
Goober5000 2eda13c3e8 remove #defines that were obsolete since after FS1
fix an nprintf bug
change the method of pausing anims so that more than one anim can play in the same spot
(this means that the first frame of an anim won't be drawn until the anim actually starts playing but I think that's okay; it is really only noticeable for the crane animation in the Bastion main hall when the "new player tips" box appears)
2010-11-24 06:33:53 +00:00
Goober5000 d069b8ede7 ugh; formatting ftw 2010-11-24 04:53:41 +00:00
Goober5000 b3db43f54c slight cleanup 2010-11-24 04:35:10 +00:00
FUBAR-BDHR 31853b77de Fix issue with beams not doing damage due to the traitor beam fix. 2010-11-24 02:22:46 +00:00
Goober5000 0c945c210d revert Echelon9's commit 6754 which needs to be discussed first 2010-11-23 08:27:18 +00:00
The_E f02e83320d Fix two instances where an object instance number was used as an index into Weapon_info[] 2010-11-23 08:20:56 +00:00
Goober5000 2b01993d64 corrected Echelon9's correction of Zacam's ... correction?
Anyway, sexp variables are only ints or strings, not floats. Therefore we need to print them to the file correctly.
2010-11-23 08:11:16 +00:00
Goober5000 10d6e21c9d fix some things that Zacam noticed 2010-11-23 07:30:36 +00:00
chief1983 e7e1a07a4b Finish matching vm_mallocs and vm_frees 2010-11-22 17:21:12 +00:00
Echelon9 4ccc6ba9a0 MAGIC numbers aren't for hiding in code... 2010-11-22 13:01:41 +00:00
Echelon9 e4e5775b63 Fix: Local declaration of 'i' hides declaration of the same name in outer scope. 2010-11-22 12:51:59 +00:00
The_E 66596f519c Fix for commit 6756: -1 is a perfectly valid value for current_secondary_bank at that point. 2010-11-22 06:14:11 +00:00
FUBAR-BDHR e818f7840f Fix for Mantis 2190 - Player beams do not cause traitor. 2010-11-21 06:34:27 +00:00
Echelon9 8bc8deffd6 Fix: Local declaration of 'num_lines' hides declaration of the same name in outer scope. 2010-11-20 18:45:34 +00:00
Echelon9 8ba4f6c3c6 Corrected sprintf format, as 'Changed from 'int' to 'float' by Zacam 10/2010' 2010-11-20 17:27:45 +00:00
Echelon9 184b004e19 Fix: Use of swp->current_secondary_bank when equal to -1 as an array index. Very broken. 2010-11-20 16:25:33 +00:00
Echelon9 f96d7fc1be Fix: Invalid data: accessing 'Text_line_size', the readable size is '80' bytes, but '4194244' bytes might be read; Invalid data: accessing 'Text_lines', the readable size is '80' bytes, but '4194244' bytes might be read 2010-11-20 15:10:14 +00:00
Echelon9 5bf9697227 Fix a range of potential NULL dereferences 2010-11-20 12:22:03 +00:00
Echelon9 9f361b791d Fix a few malloc/vm_malloc changes to properly track memory usage; fix a potential NULL dereference in parse/lua.cpp 2010-11-20 08:25:16 +00:00
IssMneur 318d3f032b Back to how the no configure worked before, because it does work just IssMneur is a dummy. Thank you ni1s for pointing it out :P
Added a clarifying comment to autogen.sh.
2010-11-15 21:13:53 +00:00
IssMneur c898573e58 Modify autogen.sh so that it can be run without running configure. To run autogen.sh without running configure pass --noconfigure as first parameter. 2010-11-15 20:40:25 +00:00
Goober5000 b7acaf9177 remove the mprintf per discussion with taylor 2010-11-14 05:42:47 +00:00
Goober5000 8ba6a7035c add SCP_string variants of sprintf, sexp_replace_variable_names_with_values, replace_one, replace_all, and lcl_replace_stuff
change the death message to use an SCP_string
change the set-death-message sexp to accept actual messages
2010-11-14 02:07:45 +00:00
Goober5000 91fd779f86 add missing files to MSVC 2005 project 2010-11-14 01:53:21 +00:00
Goober5000 a1f6c70318 Bad IssMneur! No biscuit! 2010-11-13 22:49:22 +00:00
IssMneur 9ce801e175 Remove redundant weapon_name_lookup().
Make the parameter to weapon_info_lookup a const char* (like it should be).
2010-11-13 07:27:45 +00:00
FUBAR-BDHR f7f6e0e94b Fix for mantis 2174: ERANGE: String error in multiui.cpp 2010-11-12 23:46:24 +00:00
The_E 52529f597a Reverting that again to help tr5ack this down further 2010-11-11 09:54:18 +00:00
The_E 142649e968 Adding proper FRED-side support for special message source "<none>" 2010-11-11 08:45:25 +00:00
The_E 09f9dca972 Replacing a few asserts with proper error handling (in this case, simply CLAMPing the offending values to valid ranges). 2010-11-11 08:41:34 +00:00
The_E 1b00dda9dd Fix for Mantis 2333 (Random crashes caused by snd_get_duration()) 2010-11-08 23:04:34 +00:00
The_E 60eda39ca7 Adding a few checks here to guard/catch Mantis 2333 2010-11-08 01:36:43 +00:00
The_E 727da9031c Fix for Mantis 2329 (Malloc fail on invalid sound files) 2010-11-06 04:44:17 +00:00
The_E 371307eb1f Woops. This fixes screwed up test for MOI validity 2010-11-05 00:34:29 +00:00
FUBAR-BDHR 367ff95e79 Remove sexp_turret_subsystem_targeting_disable() and sexp_turret_subsystem_targeting_enable() and changes them to use the new generic function. 2010-11-04 05:28:39 +00:00
FUBAR-BDHR 09e6972731 4 new sexps to control Wanderer's subsystem flags from r6581
Fix for Mantis 2330 subsystem targetable/untargetable in multi.
2010-11-04 05:17:52 +00:00
chief1983 7192a2d8fe More compatibility fixes for Solaris 2010-11-02 21:20:09 +00:00
The_E afcf923c43 Remove bogus debug warning from the :V: days 2010-11-01 15:25:27 +00:00
The_E d5b15a0567 Adding check for invalid MOI values 2010-11-01 15:24:07 +00:00
chief1983 4ccadf51fe This should fix a OS X 10.5 crash, possibly others. 2010-10-29 19:09:26 +00:00
The_E c4fe142f3a Woops. How did I screw this up? 2010-10-29 04:14:13 +00:00
The_E 7c58abb9eb Fix for faulty check 2010-10-29 02:44:14 +00:00
The_E 09343bfa46 Adding a warning and proper error handling to the "/" operator in order to catch div-by-zero scenarios. 2010-10-29 02:22:51 +00:00
The_E 5f5cea2c6a Patch for minor snafu, from FUBAR 2010-10-29 01:10:19 +00:00
The_E 7fada6171a 2010-10-26 23:42:14 +00:00
The_E e11fe6515a Changing this sanity check to pop up a warning in FRED, but print to log in FS. 2010-10-26 22:56:58 +00:00
The_E 339ba7cca3 Fixes issue with the wrong mainhall being loaded on startup. Note: If a value gets initialized to -1, don't change it to a ubyte and init it to 0, even if that fixes a conversion warning. In this case, casting explicitly is a valid course of action, and should be taken. Here endeth the lesson on refactoring. 2010-10-26 22:23:56 +00:00
The_E 4e2fb80608 Removing lua.c from the VS2010 project 2010-10-25 15:09:17 +00:00
chief1983 416e725e22 Let's get rid of lua.c for Xcode then too 2010-10-25 14:57:53 +00:00
karajorma f5ff35c3bf Looks like we forgot to update the save functions when we changed the special_explosion to use floats. 2010-10-25 13:53:31 +00:00
Zacam c45f22ff98 ...and then it helps to actually initialize it to something. 2010-10-25 03:59:15 +00:00
Zacam 252f2b4e6c Should have paid more attention on that last one, need to define what 'err' is outside of where it is. 2010-10-25 03:54:48 +00:00
Zacam 3e613ff431 Let see how unreachable all this really was. 2010-10-25 03:48:01 +00:00
Zacam b64d1991e1 Fix for Release Build warning for 'err' 2010-10-25 03:43:02 +00:00
Zacam 984df3b5ec 'lua.c' not needed for liblua. 2010-10-25 03:34:33 +00:00
Zacam 0050b48e80 Clears up the rest of the type conversion warnings listed in MSVC. 2010-10-25 03:26:03 +00:00
Zacam a58a8b21af Warnings Resolutions: 'int' to 'ubyte' conversion warnings.
Some formatting cleanup done on the affected files.
While not necessary, some {} put in by suggestion of output from GCC and to improve readability.
2010-10-25 00:03:29 +00:00
karajorma 284fd79740 Not 100% a bug fix but this will have the effect of making it harder to hit the bug and will warn when it hits it. See http://www.hard-light.net/forums/index.php?topic=72160.0 for more details 2010-10-24 05:28:30 +00:00
Wanderer 724c77afc2 adding blank scripting state to the game 2010-10-23 19:54:39 +00:00
The_E c885611291 Adding special message source "<none>" 2010-10-22 23:17:44 +00:00
Echelon9 a8d31d4ae4 Update project file listing 2010-10-22 22:53:48 +00:00
The_E 89ae5cf458 m!m's function to access the "affected by gravity" flag 2010-10-22 20:43:27 +00:00
The_E 26ac4b804a Fix for Mantis 2171 (documentation out of sync for gr.getVectorFromCoords) 2010-10-22 13:45:33 +00:00
The_E 332f94886b Thank you code analysis. This could have been ugly.... 2010-10-20 20:06:55 +00:00
The_E 0f38bee49b Change an Assert to a more elegant way of handling this. 2010-10-20 19:38:34 +00:00
Sushi c9b6c3a4ee Fix bug where changing AI goals while gliding can cause them to get stuck in glide 2010-10-20 05:21:51 +00:00
chief1983 d731767ea6 Wrong way with this fix, should have gone from trunk to antipodes 2010-10-19 22:16:26 +00:00
chief1983 1d9c341c07 Use appropriate line endings 2010-10-19 22:14:52 +00:00
Zacam 6e46c4668d From FUBAR: Turret ROF Sexp
http://www.hard-light.net/forums/index.php?topic=71884.0
2010-10-18 21:23:16 +00:00
chief1983 b0bd068e4d Pedantically correct a comment 2010-10-18 21:18:10 +00:00
Zacam 2b44f6325b The hell...? Missed one somehow. 2010-10-18 20:55:08 +00:00
The_E 2349ec5695 Warnings done properly. Thanks, chief 2010-10-18 20:17:01 +00:00
The_E 770953a051 This case shouldn't ever be hit, but it's still bad form to Int3() there. 2010-10-18 19:57:12 +00:00
Zacam 59a360a139 Sun OS compatibility: "Sun" is a reserved word, so (*sun) becomes (*sun_ptr), (bool sun) becomes (bool is_a_sun), etc.
Also: void stars_delete_instance_FRED is now void stars_delete_entry_FRED in the CPP to better match the H.
White-space clean-up took place too.
2010-10-18 19:29:38 +00:00
Zacam 75043ff5b1 go_faster from Antipodes 6. Everybody, say "Thank you, taylor!" 2010-10-18 18:32:37 +00:00
chief1983 0cbb97861b FORCE:MULTIPLE for VC6 in advance of Antipodes 6 2010-10-18 18:08:52 +00:00
chief1983 d0e20484ee FORCE:MULTIPLE for VS2005 in advance of Antipodes 6 2010-10-18 18:03:10 +00:00
IssMneur 253a4b4dc9 Reimplement VerifyEx to soothe any concerns about the WinAssert use and remove any potential problems for non-VC. 2010-10-18 06:33:54 +00:00
IssMneur 3292e4eee4 Extended Verify to allow a developer to give a more detailed message. 2010-10-17 22:27:04 +00:00
Goober5000 b8736c0c0b sanity check +Team: values, because older versions of FRED saved crazy values like 1301728 2010-10-17 20:12:09 +00:00
karajorma f5065880dd Fix the camera-shudder SEXP to work in multiplayer. 2010-10-17 09:33:08 +00:00
karajorma ffd9b2cdac Add the -parse_cmdline_only option to prevent the command line being parsed in FRED (and FSO for that matter). 2010-10-16 05:17:46 +00:00
The_E b352e39494 m!m's team:getColor() function for scripting. 2010-10-15 19:45:02 +00:00
IssMneur 85c4032ef7 Added a couple of mprintf lines to help diagnose where exactly Openal fails to load. 2010-10-15 17:20:50 +00:00
IssMneur 1482cac08b Fix a crash that occurs when the player turns off auto-targeting. 2010-10-15 16:39:43 +00:00
chief1983 1f61ee9025 Add the FORCE:MULTIPLE option to the linker for VS2008 and VS2010, in advance of the Antipodes 6 merge 2010-10-13 16:47:12 +00:00
karajorma baf028bdb7 Mantis 2324 (Missiontime-msecs gives the wrong value after SHORT_MAX milliseconds) 2010-10-13 06:18:36 +00:00
karajorma 9bcf6d9521 Change Alt_Type into an int to fix a compiler warning.
Move the multi_sexp_ship_change_callsign function (Multi_ functions should sit directly below the server side function that calls them so that they can be updated at the same time).
2010-10-13 02:16:34 +00:00
Zacam 7d8fae55f0 Output name updated to "fred2_open_3_6_13" in MSVC2005. 2010-10-12 23:40:48 +00:00
Zacam 52b5f2fbb1 Project Synchronization: Trunk vs Antipodes
2005: Set PDB and Map Exports to explicitly FALSE on Release builds.
Removed <File Configuration> lines (save for in the case of phrases.xml) as they are unnecessary bloat.
2008: Set PDB and Map Exports to explicitly FALSE on Release builds.
2010-10-12 22:37:50 +00:00
chief1983 d4bfce509e Pull this fix for VC6 from Antipodes since it's unrelated to go_faster 2010-10-12 16:06:27 +00:00
IssMneur 39e516af3f Add some variable verification to hud_cease_subsystem_targeting. 2010-10-12 04:27:17 +00:00
Zacam 93c819e215 Warning Fix: in "opengl_make_gamma_ramp"
'int' to 'ushort' conversion addressed.
2010-10-08 23:32:54 +00:00
Zacam 53a78a859b Warning Fix: (audiostr.cpp "WaveFile::Read" / ds.cpp "ds_load_buffer")
Sets 'float **pcm' to start as NULL
2010-10-08 23:30:15 +00:00
Zacam 55cb3c209a Warning Fix: in "bool message_filename_is_generic"
signed/unsigned mismatch
2010-10-08 23:24:36 +00:00
Wanderer 57a2f2955c feature commit - diaspora subsystem options 2010-10-08 21:32:48 +00:00
Wanderer caae28adfa feature commit - diaspora turret related patch 2010-10-08 21:05:40 +00:00
The_E 4bb193a519 Patch for Mantis 1963 (Optional argument for set-object-facing and set-object-facing-object doesn't work) 2010-10-08 12:01:11 +00:00
The_E cf04d1b6de Fix for Mantis 1817 & 2323 (Glide does not get reset on mission restart/player respawn) 2010-10-08 10:15:40 +00:00
Zacam f14b184c81 Warning Fix: "sexp_show_subtitle_text"/"sexp_show_subtitle_image"
No more 'float' to 'int'. (not the best way, but it is expedient and doesn't risk breaking things)
2010-10-07 02:21:15 +00:00
Zacam 95a89874e8 Warning Fix: in "void beam_get_binfo"
"miss_factor" is a 'float', not an 'int'.
(some odd 'tab' spacing cleaned up in the function as well)
2010-10-06 20:03:05 +00:00
Zacam 76c4083cbd Warning Fix: for "set_special_explosion"
Corrects conversion of 'float' to 'int', by setting set_special_explosion related entries to 'float'
2010-10-06 19:18:38 +00:00
Zacam 7acab9ba98 Warning Fix: in "object *ship_find_repair_ship"
"min_time_till_available" is a 'float', not an 'int' and so is "howlong" that it is compared to.
2010-10-06 18:45:58 +00:00
karajorma 42fba98066 FUBAR's fix to allow the callsign SEXP to work properly in multiplayer. 2010-10-06 08:53:28 +00:00
Goober5000 2e4143013a fix some old fat-fingering from r1601 (Mantis #2226) 2010-10-06 03:58:21 +00:00
Wanderer 2200196cd5 fix to corkscrew missile emitted particles issue 2010-10-05 08:01:23 +00:00
karajorma 4bf6dc5201 Missed one. 2010-10-05 06:45:51 +00:00
karajorma 4e40f145db Some minor future-proofing/magic number removal. 2010-10-05 06:44:02 +00:00
karajorma 3a578fa70d Fix Mantis 2321 (Weird values for Team when saving events). 2010-10-05 06:08:31 +00:00
Zacam 8c4e0e9614 Double-Trouble: Noted by FUBAR, somebody made a copy-paste mistake 2010-10-04 23:14:27 +00:00
IssMneur 134abc8f09 Make VS2010 copy *every time* that it rebuilds the binaries, not just when a change is made to a file in Freespace2 or Fred2 projects (ie. when it inserts code changes from code.lib into the binary). 2010-10-04 04:27:55 +00:00
The_E b192612b57 More checking to guard against Mantis 2205 2010-10-03 20:35:48 +00:00
Echelon9 f54e6a1c86 Second case of mprintf fubar this week. MSVC thought this was valid? 2010-10-03 09:06:47 +00:00
Wanderer 4b26c34625 Feature commit - option to adjust turret ROF by multiplier or by the number of firepoints. 2010-10-03 07:19:43 +00:00
The_E 4ee64c07f1 Adding a better explanation here. 2010-10-03 03:45:01 +00:00
Echelon9 0968f851bf Correction to r6555 to use mprintf correctly 2010-10-02 07:06:17 +00:00
The_E 4512219c9f Adding the ad.stopMusic() function to scripting 2010-10-01 22:27:37 +00:00
The_E 2d062ff380 Print warning here as well. 2010-10-01 19:14:24 +00:00
The_E fe38a382f9 Adding a deprecation warning to the log 2010-10-01 19:09:17 +00:00
The_E 97634e590a Readding parsing for decals so we don't break stuff unnecessarily. 2010-10-01 18:12:31 +00:00
taylor ecc9c970fd allow duplicate when same file exists as both 2D and 3D in sounds.tbl 2010-10-01 16:42:06 +00:00
taylor a06e48966b easier to follow debug messages for sound loading 2010-10-01 16:42:05 +00:00
taylor f7d8b9ef26 only need half size for mono buffer memory 2010-10-01 16:42:04 +00:00
taylor 3b5f674ba6 remove decal files 2010-10-01 16:42:03 +00:00
The_E 6c059f30c4 Adding a sanity check here. 2010-10-01 07:53:03 +00:00
Sushi 6500943b41 Get rid of compiler warnings 2010-10-01 04:20:40 +00:00
Zacam db96e9fa26 Removed "grammar.h" and added to 'ignore' list. Also added phrases.cfg to 'ignore' list. 2010-10-01 04:10:03 +00:00
The_E e8aa478524 Another compilation warning fix. 2010-10-01 03:06:09 +00:00
The_E 05e68890f4 Fix compilation warning 2010-10-01 01:36:44 +00:00
The_E 044df34584 Adding the "force-glide" sexp by request of Axem 2010-10-01 00:38:58 +00:00
The_E 93b1740848 Fix for Mantis 2289 (Invalid commandline arguments passed to FRED) 2010-09-30 17:22:58 +00:00
Zacam b9b5237123 Purging of the Decal system. Includes Projects updates for codeblocks, MSVC 6-2010 and Xcode. 2010-09-30 05:50:04 +00:00
The_E c6fe7ad5a0 Bumping MAX_SPOOLED_MUSIC to 50. 2010-09-30 00:00:49 +00:00
The_E 4f6fcc566e Removing an Int3() that isn't as impossible to hit as expected. Since we can exit gracefully here, we should. 2010-09-29 19:01:04 +00:00
Wanderer 9a10b6b0b4 Fix for mantis 2304 - 2nd take 2010-09-27 11:55:21 +00:00
Goober5000 2d3f566691 use the warning loop, same as the other half of the if() block 2010-09-27 05:51:28 +00:00
Goober5000 46f48ee3a6 fix redefinition of local variable 'i'
remove unused local variable 'wip'
2010-09-27 05:27:27 +00:00
The_E 6fccf9f790 Ooops. Now this is a proper sanity check. 2010-09-27 04:46:08 +00:00
The_E f5d8a1354d Hopefully fixes an Int3() encountered by FUBAR, where the AI submode of a ship was set incorrectly. 2010-09-27 04:03:06 +00:00
The_E 55d7ca153e Better error checking for adjust-audio-volume, fixes Mantis 2314. Thanks to Echelon9 for noticing this. 2010-09-26 15:54:19 +00:00
Wanderer 2a6727136e Fix for mantis 2303 and related issue in lua.cpp 2010-09-26 11:32:18 +00:00
The_E acf8f56b41 Reverting 6513 due to errors found in the implementation 2010-09-25 21:38:37 +00:00
Wanderer eb660e86c1 Fix to prevent global damage (shockwaves etc) from creating debris shards that spawn in empty space 2010-09-25 20:50:33 +00:00
Wanderer 1015cfe7e9 Fix for mantis 2304 - non standard uvec/fvec turrets did not have proper collision detection 2010-09-25 20:49:05 +00:00
The_E 536203d7e3 Adding the "On Weapon Selected", "On Weapon Deselected", "On Weapon Equipped" and "On Weapon Fired" scripting actions. 2010-09-25 19:43:45 +00:00
The_E 18e539c27b Moving this assert to a better place 2010-09-25 19:08:27 +00:00
The_E 5daf4591b7 Less ugly hacks is good as well. Why compute the object index, when it's passed as a function argument? 2010-09-24 06:31:52 +00:00
The_E 78f7d9f737 Added an Assertion() to further narrow down the cause of the "ai_find_path tries to find path that doesn't exist" bug 2010-09-24 06:29:46 +00:00
The_E fa7d8cb479 Avoiding a possible Int3() due to invalid data being passed; since the documentation for get-object-* doesn't specify that you need to give all 3 "relative coordinate" arguments, this needs to be checked. 2010-09-24 06:28:25 +00:00
Zacam 4465400d13 Add a description to config.h as to what 4290 is. (Thanks Goober for catching that) 2010-09-22 22:59:06 +00:00
Zacam bdcb906c6c Adding 4290 to the pragma warning(disable:) list for easier testing of some code changes. 2010-09-22 21:13:10 +00:00
IssMneur 730ac54217 Fix bug in the new support ship sexp noted by Goober5000. 2010-09-22 03:05:57 +00:00
The_E 4b1dd8e719 Same here. 2010-09-22 00:41:52 +00:00
The_E a9f02aab7b And another variable declaration overwriting a declaration in an outer scope. 2010-09-22 00:38:08 +00:00
The_E a92b28abdf Moving this counter variable to be declared as local for the loops. 2010-09-22 00:32:39 +00:00
The_E f421af5016 Another potential var name collision. Thankfully, this one's part of the decal code, so it's likely it never was a problem. 2010-09-22 00:25:01 +00:00
The_E 667a557e15 Avoiding a name collision between a global and a local variable 2010-09-22 00:15:29 +00:00
The_E 3efcad84a7 Flags are bitfields, so an "&" needs to be used instead of an "&&" 2010-09-22 00:06:20 +00:00
IssMneur 654be5a6e7 Removes the hard restriction (compile time) on the maximum number of "active" support ships per team. Controlled by an optional seventh argument to set-support-ship. Also fixes glitch where only "max concurrent ships" number of support ships would actually respond to support requests. 2010-09-21 05:16:23 +00:00
The_E 3617bb9809 Another Assert()->Assertion(). 2010-09-17 20:59:39 +00:00
IssMneur e852ecf115 I thought I fixed that typo before committing. 2010-09-17 03:59:11 +00:00
IssMneur a29ca275a7 Converted 4 Asserts into Warnings. 2010-09-17 03:54:46 +00:00
The_E d98efc0675 Changing a string literal to the proper XSTR lookup 2010-09-17 00:01:58 +00:00
The_E 467c7d1e39 Fixing typos noticed by FUBAR 2010-09-16 21:41:10 +00:00
The_E 99dff69a3f Another assert->Assertion conversion. 2010-09-15 22:00:51 +00:00
Sushi 26c2725ccd Fix a typo 2010-09-15 05:06:23 +00:00
karajorma d181d77744 Mantis 2159 - Add the last of Ghengis' code with a switch from debug output to a warning. 2010-09-15 00:53:15 +00:00
karajorma d4e8bd4bf3 Fix Mantis 2278 (Adding a variable can mess up team loadout variables) 2010-09-15 00:50:28 +00:00
karajorma eb1889327f More SEXPs fixed for multiplayer. 2010-09-15 00:49:14 +00:00
karajorma e960a14280 Add the has-primary/secondary-weapon SEXPs 2010-09-15 00:47:08 +00:00
The_E e7fa7f021d Averting a potential div by zero 2010-09-14 23:56:26 +00:00
Sushi 8c6895a029 Re-added collision physics, added basic landings support (still needs some work) 2010-09-13 14:27:42 +00:00
The_E e76761a84a ...For real 2010-09-12 19:38:48 +00:00
The_E fe50ee7231 Fix for is-facing (hopefully) 2010-09-12 19:30:10 +00:00
The_E 3e390ecfdc ... right this time. 2010-09-11 16:55:10 +00:00
The_E 14ae54ad3c Adding ship:getEMP() for scripting. 2010-09-11 16:52:36 +00:00
Goober5000 c4a337e391 partial revert on 6444... don't forget, someone recently fixed a five-year-old bug in the countermeasures code :) 2010-09-11 00:08:57 +00:00
The_E 439c2c78cd Adding object:getrvec() and object:getuvec() for completeness' sake 2010-09-10 23:11:28 +00:00
The_E d863626f26 Adding the vector:getNormalized() and object:getfvec() functions 2010-09-10 20:51:55 +00:00
karajorma 8b1460aa30 Fix sexp_show_subtitle_image to work properly in multiplayer. 2010-09-10 10:42:12 +00:00
The_E 840d11d53d ....And another fix for is-facing. 2010-09-08 16:42:58 +00:00
The_E a41728df77 Thanks to Goober for the warning. 2010-09-08 14:58:41 +00:00
The_E 820fa1dc73 Two more Asserts turned into Assertions() for better explaining 2010-09-08 10:56:31 +00:00
The_E 67a5ae2d27 Another int3() -> Assertion() conversion 2010-09-07 15:14:36 +00:00
The_E a31d34a991 Bah, stupid typo (!= is != <!) 2010-09-07 15:11:01 +00:00
The_E a1ef957423 Adding the is-facing sexp, as per Axem's request 2010-09-06 22:11:25 +00:00
The_E c28989e121 2010-09-04 13:56:02 +00:00
Goober5000 e40cef7e4f make the if check simpler, cause part of it was redundant 2010-09-04 06:55:10 +00:00
Goober5000 a129508de7 made the AWACS hack less ugly, by making the filename replacement much more efficient
--this also allows stuff to be added past the #End of messages.tbl
improve message_filename_is_generic to consider #Simulated Speech Overrides specified in messages.tbl
2010-09-04 06:51:50 +00:00
Goober5000 3cab590e03 none.wav is redundant in this check 2010-09-04 06:40:46 +00:00
The_E a5cd35a1b9 Ooops. 2010-09-03 22:51:42 +00:00
The_E 5d625a2473 More cleanup 2010-09-03 22:45:18 +00:00
The_E 5249397161 More dead code be gone. 2010-09-03 22:41:08 +00:00
The_E b7c9f0e8dd Dead code removal 2010-09-03 22:31:25 +00:00
Goober5000 ef46114a12 disable the warning about Assertion since it clutters the build output 2010-09-03 21:44:54 +00:00
chief1983 682a517129 MSVC, why on FSM's green earth does this compile? 2010-09-03 15:04:05 +00:00
Goober5000 8733ab557a don't simply assume that something is a ship! 2010-09-03 02:57:49 +00:00
Goober5000 455b7f9d81 no need to check if other_objp is a capital ship in these if statements, since the first capital+ check would have already returned the function
this also removes the assumption that other_objp is always a ship!  it isn't!
2010-09-03 02:50:54 +00:00
Goober5000 61f66f13d6 yeah, asteroids and debris are pretty much the same thing 2010-09-03 01:26:49 +00:00
Goober5000 8e5dfc2d33 maintain the original hull, shield, and subsystem percentages when changing ship class, since we might be changing it from a briefing loadout (Mantis #2301) 2010-09-03 00:34:38 +00:00
Goober5000 31db1efaff partial revert (just one file) of Sushi's collision physics feature as it causes all kinds of crashes in asteroid fields 2010-09-03 00:16:45 +00:00
Goober5000 39f3d1d663 fix polymodel gettage since heavy_obj could be an asteroid 2010-09-03 00:14:10 +00:00
The_E 25c80ca56f ...and here. 2010-09-03 00:08:31 +00:00
The_E 83bb23a989 ...and here... 2010-09-03 00:07:50 +00:00
The_E 931cd6bf3a Better feedback here, as well 2010-09-03 00:06:52 +00:00
The_E 431b8955e8 Another Assert() redirected to more useful things 2010-09-03 00:06:01 +00:00
The_E bae585b910 ...Aaaaand another Assert()->Assertion() to make modellers happy 2010-09-02 21:48:53 +00:00
The_E e282c07427 And another int3() turned to something more useful 2010-09-02 21:25:54 +00:00
The_E 2bf6c518ac A useless int3() turned into a useful Assertion() 2010-09-02 20:27:33 +00:00
The_E ccd0401a02 More asserts turned to assertions. 2010-09-02 19:57:18 +00:00
The_E 314c4dfdc3 Removing game_load_palette(). It was useless and commented out anyway. 2010-09-02 07:47:09 +00:00
Goober5000 30feeae3d0 fix the passengers tag so that it works more like the cargo tag 2010-09-01 06:43:08 +00:00
Zacam 273be5d221 -timerbar now has the same message as -decals and is a disabled launcher command. Launcher will (or should) no longer list it as an available command and a msgbox will pop-up if in an existing command line anywhere. 2010-09-01 03:17:10 +00:00
The_E 8458f75d76 weapon_info::subtype is not a bitfield 2010-08-31 22:40:30 +00:00
chief1983 5b775e7a88 Fix Assertion on GCC to support 2 arguments, and revert hacked calls to their 2 argument state 2010-08-31 21:09:15 +00:00
Goober5000 5f85e34b3f update project file 2010-08-31 19:55:12 +00:00
Goober5000 972bdcfd15 don't generate debug information on release builds 2010-08-31 18:18:15 +00:00
chief1983 0fbcb2a2b6 Actually fix the Assertion instead of just disabling it. 2010-08-31 17:41:50 +00:00
The_E 2bfd50b5dc Change assert to assertion. Also allowed usage of non-anis or effs as muzzleflashes. 2010-08-31 13:12:45 +00:00
The_E ca37eeaf8e Changing Assert() to Assertion() again. 2010-08-31 12:52:50 +00:00
The_E c0fc384c8a Change Assert() to Assertion() for better feedback to modders 2010-08-31 12:43:04 +00:00
The_E a5c10c3ce9 Several minor touchups. 2010-08-31 12:42:39 +00:00
Goober5000 12e4d3713b add +Tech title for ships.tbl 2010-08-29 06:07:22 +00:00
Goober5000 fa1f780227 fix compile errors 2010-08-29 04:51:15 +00:00
Goober5000 cc46e18d68 handle clearing alt-name too 2010-08-29 04:45:51 +00:00
Goober5000 6bd68fdeaf add a #define 2010-08-29 04:30:21 +00:00
Goober5000 3445ce4cb8 FUBAR's change-callsign patch 2010-08-29 03:46:48 +00:00
The_E 9fbe036484 Ooops, slight typo 2010-08-26 23:42:04 +00:00
The_E 3397d3a21e From FUBAR: Patch to redirect a warning popup to the log when in standalone mode. 2010-08-26 22:56:36 +00:00
The_E ee27823042 Change Assert() to Assertion(), again to better explain why it fails. 2010-08-26 12:17:51 +00:00
The_E 3d3fbb3002 Fixes a crash when "Test Load Ship" was used with a ship that has turrets with rotation sounds defined. 2010-08-25 20:24:34 +00:00
The_E 17b4aeac33 Change Int3() to assertion for better explaining and stuff. 2010-08-22 12:59:01 +00:00
The_E e5416e3506 Remove hardcoded piece of interface code in favour of something generated dynamically. Fixes issue with too many pilot names being displayed in the pilot select screen if a custom font is in use. 2010-08-21 20:19:48 +00:00
Sushi f045a26eed Updated random sidethrust ($Random Sidethrust Percent) to include strafing attacks vs big ships, as well as making it a bit more situational for fighter vs fighter. 2010-08-21 19:55:44 +00:00
The_E a47698230b Adding a bit of sanity checking here... 2010-08-21 16:22:57 +00:00
The_E ffe6397e66 Fix issue reported by droid803 where non-player ships that have an afterburner need shield icons as well, causing debug warnings. Changed the check so that it only triggers on player ships. 2010-08-20 23:13:44 +00:00
The_E a1ecfe158b Adding the adjust-audio-volume sexp. 2010-08-19 19:45:28 +00:00
IssMneur 5dac806c8e Adds support to Voice Acting Manager in FRED for putting the speaker's name into the generated file name.
Also makes the "Generate Filename" function set the modified flag for FRED if any file names get changed.
2010-08-17 23:52:20 +00:00
IssMneur 26ae5efb0f Fixes mantis 2275: Improving remove-background-bitmap and remove-sun-bitmap so that they issue an Error if an invalid index is passed via the sexp. 2010-08-17 05:42:55 +00:00
IssMneur ad9759d2fa Clarify the help text for set-object-speed-x, set-object-speed-y, and set-object-speed-z 2010-08-17 05:37:38 +00:00
The_E 31b88687d0 And of course, I screwed it up a bit. Reading the documentation is A1 SUPAR. 2010-08-16 23:18:10 +00:00
The_E 0ac5a17102 Allow scripting to override turret AI target selection 2010-08-16 22:04:23 +00:00
The_E bde583461f Fix for assertion encountered with the warp-effect sexp. Also updated sexp help to indicate correct usage. 2010-08-11 13:08:51 +00:00
The_E 6032c0b463 Remove requirement for SM3. While this will not allow cards that are only capable of SM2 to use the standard shaders, now shaders can be written for them. 2010-08-10 18:41:12 +00:00
Sushi b64303a19e Support for allowing bombs to be destroyed by weapon blast and/or shockwaves. Weapon flags are "takes blast damage" and "takes shockwave damage" 2010-08-05 14:17:20 +00:00
chief1983 19319a4835 Whoops hangovers and VNC don't go well together, did not mean to commit this at all. 2010-08-04 19:38:29 +00:00
chief1983 f5e236e408 2010-08-04 19:33:54 +00:00
karajorma 47f157a9f7 Fix 4 more SEXPs for multiplayer. 2010-08-04 17:44:40 +00:00
Sushi 679430d654 Added to ships.tbl:
$Collision Physics: 
+Bounce 
+Both Small Bounce
+Friction
+Rotation Factor
2010-08-04 02:08:14 +00:00
taylor 25987a680d various FS2NetD fixes:
- increase sleep time during reconnect
 - better handling of disconnects from connection errors
 - proper disconnect in case of login failure
 - log stats request calls
 - don't try to read stats from packet when there aren't any to read
 - allow proper connection resetting with standalone
 - change auto-reconnect timeout from 30 minutes to 5
 - count server traffic among activity instead of just client traffic
 - reduce uneccessary client->server traffic
2010-08-03 08:22:02 +00:00
taylor e27d61bbae fix debug message 2010-08-03 08:21:59 +00:00
Goober5000 b48eb270f9 don't generate debug/pdb/map info for release builds on VC6 2010-08-02 04:07:28 +00:00
Goober5000 b00b61ccd2 revert using motion debris in asteroid fields 2010-08-02 03:52:16 +00:00
Zacam 342640920a This is the same as 6335, but for FRED. 2008 and 2010. 2010-07-30 16:21:21 +00:00
Zacam 7185348ea9 Removes /DEBUG from the Linker Properties, no longer Generating PDB files for Release builds. This should also resolve the "no disk in drive" issues. MSVC 2008 and 2010. 2010-07-30 16:13:46 +00:00
The_E 063dea2f89 Patch for issue with ai-waypoints not working correctly. The ship's goals were accidentally cleared after a single run through the waypoint path. 2010-07-29 22:30:02 +00:00
Sushi d391e3f093 Changed "big ships manage shields" to "all ships manage shields." No difference in behavior, just named more accurately. 2010-07-29 00:30:57 +00:00
The_E c6589187e4 Fix/Workaround for Mantis 2272 (Int3() in hudtarget.cpp) 2010-07-27 15:28:09 +00:00
The_E dd60442914 Change short to ushort to avoid issues with high-poly models. 2010-07-25 23:30:18 +00:00
Echelon9 b7c1dcff02 Fix for reinforcement menu bug - Mantis 2246 2010-07-25 05:04:14 +00:00
Goober5000 7df3e81080 add feature requested by BWO: group send-message-list messages at beginning of script 2010-07-22 07:51:32 +00:00
chief1983 e691fa8f94 Should allow INT_MAX to be visible on POSIX-compliant systems 2010-07-21 18:50:19 +00:00
chief1983 e9e3333c73 IssMneur's fix for Mantis #2240, allow gaps after the hardcoded retail sound entries. 2010-07-20 21:59:36 +00:00
chief1983 2d43f0b847 Per IssMneur, fix the root directory detection on *nix systems. 2010-07-19 15:50:50 +00:00
The_E d12eec674f Fix for the "is-ai-class" sexp. Previously, the sexp would compare the given AI class against the ship class' tbl default AI class, which produced erroneous results. 2010-07-19 02:12:43 +00:00
The_E dc54a7d11d No wonder it didn't really work. I was looking in the wrong array. 2010-07-18 02:18:40 +00:00
chief1983 3aba1b9f73 Bump to MAX_SHIP_FLAGS and a subtle reminder for posterity 2010-07-17 22:27:14 +00:00
chief1983 251fe9a34a One more autopilot fix for 3.6.12, per IssMneur 2010-07-17 22:18:20 +00:00
The_E 4d5008fcc1 Fix for Mantis 2263 (Objectives list is still displayed despite disable-hud-except-messages being active) 2010-07-17 14:59:32 +00:00
The_E 4f2942e440 Slight cockup on my part here. Pain flashes were not supposed to be gone for everyone. 2010-07-16 18:35:13 +00:00
The_E 3c412bef42 Updated the credits after god knows how long 2010-07-16 16:16:27 +00:00
The_E 7bcd8d162b Reverting the revert (Yay for feedback), as the ships flag solution seems to be what people really want. 2010-07-15 14:55:59 +00:00
chief1983 b60eb681e6 Fix an Assertion usage issue on *nix platforms. 2010-07-14 15:31:17 +00:00
chief1983 cbe541598e IssMneur's autopilot fixes (hooray\!) 2010-07-13 22:45:54 +00:00
The_E c1f1c47fa8 Patch for Mantis 2205 (Division by zero in do_random_sidethrust()) 2010-07-10 15:06:33 +00:00
Sushi 9c766c1315 Added "$big ships manage shields:" AI profile/AI class flag 2010-07-09 13:11:37 +00:00
Zacam 58d378134d Added the following (recursively) to the svn:ignore: .ncb, .suo, .user, desktop.ini, thumbs.db. 2010-07-08 03:51:39 +00:00
Zacam 7ad97943fd From blowfish: Mac Icon update based on: http://www.hard-light.net/forums/index.php?topic=44371.0 2010-07-08 03:35:57 +00:00
The_E 52f424a0b0 While the other code that was commented out might be unnecessary, this fvec still needs to be set up properly 2010-07-07 15:27:37 +00:00
The_E 854ff6cff9 If lock-perspective is active, the perspective should stay locked. 2010-07-07 02:19:06 +00:00
The_E 3b93ad2ba9 Reverting 6279, and making it more intelligently (Thanks Goober for the heads-up) 2010-07-07 00:04:32 +00:00
Goober5000 3cdf9d3f12 fix a bug noticed by The_E: object types are not bitfields 2010-07-05 05:43:08 +00:00
Goober5000 131805bb51 use motion debris in asteroid fields, per Galemp 2010-07-05 05:41:57 +00:00
The_E 7a8973eade Introducing new SIF2 flag ("no pain flash") to turn off the pain flash. I guess all the peeps who want to do capship missions can rejoice now. 2010-07-05 02:28:48 +00:00
Echelon9 8383d11490 Update Lua interpreter to 5.1.4 (patch 2) to fix the following bugs http://www.lua.org/bugs.html#5.1.4 2010-07-03 02:48:03 +00:00
The_E 437b27c460 A few more dialogues added 2010-06-27 21:46:50 +00:00
Goober5000 51f9cbb20a make FRED be intelligent about mission directory (Mantis #2236) 2010-06-27 08:30:45 +00:00
Goober5000 c8ef8d38ef remove unreferenced variables 2010-06-27 07:13:33 +00:00
Goober5000 614f60968c use 2_ animations in the tech room, just as in the command brief (Mantis #2231) 2010-06-27 07:05:01 +00:00
Goober5000 af2ac0a7eb remove a bit of code that should no longer be necessary due to previous upgrades/fixes 2010-06-27 06:04:48 +00:00
Backslash 5263673023 Add a $Max Directives: option to hud_gauges.tbl -- works just like $Max Escort Ships 2010-06-26 19:34:59 +00:00
Wanderer 0718bc2921 fix for potential null vec issue when using limited base rotation turrets 2010-06-24 18:21:31 +00:00
Wanderer 999ec32353 fix for salvo + check hull bug found by fubar 2010-06-24 17:56:19 +00:00
Sushi 6d29c1a462 Removed unpopular circle strafe changes to make circle-strafing AI more aggressive (like in RC2) 2010-06-24 02:33:48 +00:00
Goober5000 7edfdb32ad this is just a bit cleaner 2010-06-23 06:56:45 +00:00
Goober5000 06216fce4f remove not-kamikaze, since it was never implemented, and since its behavior is incorporated into the kamikaze sexp 2010-06-23 06:19:43 +00:00
Goober5000 be6ea31534 fix for Mantis #2056 (sexps may not want to process every ship)
also, account for the fact that Command may not be "#Command"
2010-06-23 03:05:26 +00:00
Goober5000 6966b3a57d fix a silly bug noticed by karajorma
also, slightly compact the knossos check
2010-06-22 02:29:53 +00:00
The_E 1ae587f819 Fix for null vec3d error mentioned in Mantis 1888 by Woolie Wool 2010-06-22 00:51:12 +00:00
Wanderer fd6c3a84f6 allow lua to track if ship is 'dying' during the frame (bugfix for flashy deaths script) 2010-06-21 22:06:49 +00:00
Wanderer 4d1f5f6a1c fix for the ai profile issue (mantis 2228) 2010-06-21 19:25:00 +00:00
chief1983 6284da4654 Fix the Assertion to not break Macs and Linux. 2010-06-21 17:12:23 +00:00
chief1983 eed85feae9 IssMneur's fix for #1888 (finally): Much better autopilot behavior. 2010-06-21 14:59:36 +00:00
Goober5000 f8efafb0f2 minor modification of karajorma's warp effect so that Knossos can be used for both warpin and warpout; Babylon5 still switches appropriately 2010-06-21 07:41:26 +00:00
Goober5000 5141cf6dab fix some problems with set-explosion-option (viz. all options need to be set if a special explosion is being used) 2010-06-21 07:14:54 +00:00
Goober5000 f8e3aee161 add set-explosion-option to edit explosions (needed after karajorma's new special-exp code) 2010-06-21 01:21:40 +00:00
Wanderer e047ba0155 Fix lua ray collision checks against debris pieces 2010-06-20 14:07:30 +00:00
Wanderer c0862e47bc add a null vec check - hit by fubar 2010-06-20 14:06:34 +00:00
The_E 6ead2d8d87 Stopgap fix for Mantis 2224 (Black text is unreadable in the multiplayer chat). Turned black into pink (as that colour wasn't used before). 2010-06-18 18:18:27 +00:00
karajorma 725ce08f38 Remove the -tbp command line. 2010-06-18 05:03:32 +00:00
Zacam d50cb3841c Commit of PNG Data fix as suggested and supplied by Armchair Commander and marvn.
(Read: http://www.hard-light.net/forums/index.php?topic=68405.0)
2010-06-17 19:46:46 +00:00
Goober5000 33f47d53c7 add awesome logical operators
(I wonder why nobody added these until now)
2010-06-16 02:38:24 +00:00
Goober5000 db2e20e59a add mission-time-msecs 2010-06-16 02:10:48 +00:00
The_E 67e89bdd8d Fix for Mantis 2212 (Interface animations start at frame 1, not 0) 2010-06-15 17:24:03 +00:00
The_E c0e55de8f0 Fix for Mantis 2210 (Ship models in ship selection do not always show up properly) 2010-06-15 12:04:50 +00:00
Echelon9 0d2c96ba09 Project file update to include bitarray.h 2010-06-14 14:12:45 +00:00
The_E 02e76c00e9 Project file update to include bitarray.h 2010-06-14 07:36:07 +00:00
Goober5000 7b8c035320 revert portej05's removal of the bitstring code 2010-06-14 06:56:52 +00:00
The_E d41fa67715 Don't increase the total number of loaded menu music files if a tbm with +nocreate is loaded.
This also neatly fixes the somewhat screwed up music selection list in FRED (remember all those empty lines?), albeit not completely.
2010-06-14 01:59:15 +00:00
Goober5000 7cfdf27b78 sync file for proper string length 2010-06-12 21:23:56 +00:00
Goober5000 5cc6f5e4fd sync case 2010-06-12 20:47:22 +00:00
Wanderer 4b66b6e42c related to mantis 2187 - fix to improve autoaim accuracy if additive velocity is enabled 2010-06-12 16:10:31 +00:00
The_E 8edeb00886 Some stuff for wxFRED. Slowly making progress. 2010-06-10 01:29:17 +00:00
Wanderer c01b067c1a better handling of 'dying' weapons for lua scripting.cpp
added lua controls for accessing beams
2010-06-09 16:49:20 +00:00
Goober5000 9940f9a752 add OPF_SOUND_ENVIRONMENT for Taylor's sexps
also, some tweaks for sexp checks and for SEXP_NONE_STRING
2010-06-09 07:38:27 +00:00
Wanderer 9d75c04e99 fix for target priorities and sif2 flags issue 2010-06-09 05:19:54 +00:00
The_E 56c1699aee Project File for wxFRED. 2010-06-09 05:18:45 +00:00
Wanderer a9e043f156 fixes for the external weapons patch (accidentally uploaded outdated patch) 2010-06-07 12:48:53 +00:00
Wanderer 2296b885b5 changes to external weapon model handling 2010-06-07 12:22:54 +00:00
The_E 36f1acb0ae Not quite sure how this one went broken for so long....( FSO specific .libs were not loaded on non-SSE2 configurations, leading to broken builds.) 2010-06-07 11:10:11 +00:00
Wanderer add696869b mantis 1988 - error checking for the targeting priorities 2010-06-07 10:53:34 +00:00
Goober5000 a6066d79a9 ignore generated file 2010-06-07 07:02:18 +00:00
Goober5000 bbeba26c70 adjust coordinates for The E's latest 640x480 art 2010-06-07 06:35:40 +00:00
Goober5000 b59580e84c FUBAR's feature for LOD naming: http://www.hard-light.net/forums/index.php?topic=68901.0 2010-06-07 03:58:47 +00:00
Goober5000 a992f0687c tweak fiction viewer coordinates 2010-06-07 02:13:44 +00:00
The_E 5d5b377ad8 A missing ) is bad for parsing. 2010-06-06 18:12:29 +00:00
taylor a971f3d768 make sure to stop deathroll effect too (Mantis #2215) 2010-06-06 14:50:38 +00:00
taylor 5e943b843c add some missing safety checks for Snds[] (Mantis #2216) 2010-06-06 14:50:36 +00:00
Echelon9 67a5d89d47 Removed defined but unused variables 2010-06-06 08:35:19 +00:00
taylor f80dcd4a87 make sure to always close context and device when searching through valid devices 2010-06-06 03:10:40 +00:00
taylor 96d93607dd fix OS X compile issue 2010-06-06 03:10:38 +00:00
The_E 03d0b66214 Same here. 2010-06-05 02:45:13 +00:00
The_E 719eb41cd8 Remove unused files from the project file 2010-06-05 02:36:41 +00:00
Goober5000 f37ff6da68 minor fix to the -wcs flag removal 2010-06-03 06:28:06 +00:00
karajorma 3005e447d3 Kill the -wcs flag. Should have done this years ago. 2010-06-02 12:01:13 +00:00
The_E 1dbe105933 Fix for Mantis 2214 (toparc2 and toparc3 hud anis [The Enemy Missile threat and Enemy Missile lock indicators] may have a length > 2 now, instead of being fixed at 3 frames) 2010-06-02 11:49:24 +00:00
taylor 04cac71fe9 revert r6151
Per source doppler factor is part of the EFX spec, which means all full 1.1 implementations.
2010-06-01 02:44:15 +00:00
The_E 4bee746897 According to the OpenAL programmer's guide, AL_DOPPLER_FACTOR is not a valid parameter for alSourcef 2010-05-31 10:38:00 +00:00
Wanderer 4b34460f06 Certain fixes for Bobs animation code issues. Please report if this renders any current anims invalid. 2010-05-30 19:28:21 +00:00
Echelon9 af574dacff codec1.cpp and codec1.h included in Xcode project file when no such source files present 2010-05-30 05:14:00 +00:00
The_E e101736d8f Project file update for new sound code. 2010-05-30 02:17:21 +00:00
taylor f06ef36ca6 more sane memory reserve 2010-05-29 15:53:28 +00:00
taylor 1491795451 fix endless loop 2010-05-29 15:53:27 +00:00
taylor 0a17554c4f disable doppler for the time being 2010-05-29 15:53:24 +00:00
taylor b287ecfef9 new sound code
- Mantis #58
 - Mantis #1769
 - many other fixes and improvements
2010-05-29 15:53:18 +00:00
taylor a7bac8679c fix view skew math issue (Mantis #2213) 2010-05-29 14:55:04 +00:00
taylor f72d0a4cd5 bah! remove debug code that slipped in with safety fixes 2010-05-29 10:55:33 +00:00
taylor d3e750edf7 support for newer versions of automake (Mantis #2145) 2010-05-29 10:55:30 +00:00
The_E 7f9df9c09e Fictionviewer interface adjusted for new, official interface art found here: http://blueplanet.fsmods.net/E/FictionViewer.7z 2010-05-28 20:07:05 +00:00
Wanderer 89d7a512af add read access for lua to weapon and ship info index. enable to check 'weapon_armed' status 2010-05-28 19:15:05 +00:00
karajorma 61af589c21 Swap the engage enemies messages over. 2010-05-28 06:09:53 +00:00
Sushi 270734b6f3 Fixed a parsing bug in AI.tbl that scaled Glide Attack Percent, Glide Strafe Percent, Circle Strafe Percent, and Random Sidethrust percent between 0 and 1 instead of 0 and 100 (as is the case for AI profiles.tbl) 2010-05-25 18:09:59 +00:00
Sushi 5704dce248 Fix a bug where additive weapon velocity would sometimes cause primary shots to pass through a target 2010-05-25 16:25:41 +00:00
The_E f993f7ced1 Altered the project file to allow FRED release compilation on VS2010 2010-05-25 01:11:46 +00:00
Goober5000 04436d634f remove message from queue the correct way, thus fixing the training message crash 2010-05-19 04:28:43 +00:00
Sushi e63505510b Added $Random Sidethrust Percent to AI Profiles and AI.tbl. Allows ships with sidethrust capability to sometimes randomly use it in dogfighting situations to make life more miserable for the player. 2010-05-17 19:10:34 +00:00
Goober5000 c5e3600bef reverted fix. It has problems, which is why I'm going over it first. 2010-05-16 22:26:58 +00:00
The_E acdc56272b Committing IssMneur's fix for Mantis 2183. 2010-05-16 15:40:11 +00:00
Goober5000 7a44b33152 better handling of missing models 2010-05-15 22:53:41 +00:00
Goober5000 ec2542fa1e misc silly fixes 2010-05-15 21:48:23 +00:00
Goober5000 1eb544da58 fix subsystem alignment on ship class change (Mantis #1181)
fix a bug with Bobboau's external missiles feature
2010-05-15 21:31:32 +00:00
Sushi 71ba95081c Added $No extra collision avoidance vs player flag. Makes the AI less likely to didder around like an idiot at close range. 2010-05-14 20:43:32 +00:00
Sushi b01b4a1778 Small fix for circle strafe 2010-05-14 18:57:58 +00:00
Sushi e46ba43891 Fix for Mantis 2099 2010-05-12 19:40:09 +00:00
The_E e2c5ff679c Swarm weapons should respect "$Free flight time" as well 2010-05-10 17:17:49 +00:00
The_E 132ba60085 Patch for Mantis 2202 (Children of swarm weapons do not inherit parent target) 2010-05-09 14:53:29 +00:00
Echelon9 fdb7de88da Remove commented out code (still in SVN history if needed) and the overhead of an empty function call every frame 2010-05-09 06:12:06 +00:00
Echelon9 44886e1ba5 Benefit from our use of STL vectors be removing a now unnecessary variable in cutscenes.cpp and making code cleaner and easier to read 2010-05-08 15:09:08 +00:00
Sushi 63b9efeb3a Some fixes/updates for the Circle Strafe behavior. The AI should use it a bit more effectively now. 2010-05-07 17:03:23 +00:00
chief1983 e702ce2267 Quick fix for the WarningEx breakage on *nix 2010-05-05 16:47:12 +00:00
karajorma de0c889d10 Fix compilation under OSX and Linux with WarningEx 2010-05-04 12:34:05 +00:00
The_E e2fbbb5e19 Genghis' fix for Mantis 2162 (Thruster cones have collision detection) 2010-05-03 12:32:42 +00:00
karajorma 27f58de890 Add the (in)validate-all-arguments SEXPs 2010-05-03 12:03:57 +00:00
karajorma c07d555346 Genghis' fix for Mantis 2159 (Certain parsing errors are never reported) 2010-05-02 10:24:48 +00:00
karajorma 2f635ad879 Genghis' fix for Mantis 2157 (Invalid subsystems not properly detected on mission parse). 2010-05-02 06:00:50 +00:00
karajorma 10d6940145 GencGenghis' fix for Mantis 2155 (No error checking for certain ship problems in the lab that FRED does pick up). 2010-05-02 05:54:26 +00:00
karajorma c6b8d515a4 Genghis' fix for Mantis 2151 (No error checking for incorrect engine wash entries). 2010-05-02 05:53:02 +00:00
Sushi 34c61a7caa Reverted commit 5656, due to side effect of changing AI behavior (see mantis 1982) 2010-05-01 20:39:41 +00:00
Goober5000 39d5580651 prevent HUD formatting from destroying subsystem names - Mantis #2195
also made hud_targetbox_truncate_subsys_name return void to lessen the chance of people making the mistake in the future
2010-04-30 06:33:38 +00:00
Goober5000 0d75839a9d fix rounding formula (Mantis #2194) 2010-04-30 04:03:24 +00:00
karajorma 35ac7d6afa Fix Mantis 2194 (FRED incorrectly calculates the wrong number used in wings). 2010-04-30 03:24:30 +00:00
Sushi b48b7f76ac Fix for bug causing AI to not fire secondaries, as well as a fix for other minor AI bugs 2010-04-29 18:56:11 +00:00
karajorma a2afa2b67a Switch to using the Macros for Multiplayer modes whenever possible. 2010-04-27 13:42:59 +00:00
Sushi 0889d77f9f Fix for Dynamic Glide Cap so that the cap ramps max speed in the same way as normal flight when turning afterburners on/off or changing the overclock (what it should have done in the first place). Also removed some old, unused glide code. 2010-04-26 13:38:36 +00:00
Sushi b72514fbaa Fix for 6057 (game sometimes crashes if $Turret Max Aim Update Delay not set) 2010-04-26 13:36:08 +00:00
The_E 475853afa3 Fix for Mantis 2189 (camera FOV may get corrupted by malformed commandline argument) 2010-04-21 21:14:08 +00:00
karajorma 047ae70637 FUBAR's Fix to allow Explosion-Effect to use any explosion in fireball.tbl 2010-04-20 13:05:29 +00:00
Goober5000 2e58278eba make sure Fred knows its base directory before loading the command line... this will allow it to load cmdline_fso.cfg which will allow Fred to recognize mods (Mantis #2185) 2010-04-20 05:37:34 +00:00
Goober5000 26f33cba24 fix parsing of miss factors (Mantis #2185) 2010-04-20 04:37:44 +00:00
chief1983 7846af6c24 No 2-arg asserts on Linux. 2010-04-19 23:32:52 +00:00
Goober5000 aa0c39cb7d add beam miss factor by team, requested by Blue Planet 2010-04-19 05:17:57 +00:00
Goober5000 63909095f5 merge Iss_Mneur's fix for Mantis #2173 (better error message in cmdline.cpp) 2010-04-19 03:51:05 +00:00
Goober5000 e537b1e133 merge Iss_Mneur's fix for Mantis #2178 (Assertion in missiontraining.cpp) 2010-04-19 03:49:09 +00:00
Goober5000 09602a9ffa merge The E's fix for Mantis #2182 (NaN propagation leading to rendering wonkiness) 2010-04-19 03:40:13 +00:00
Sushi f7ebd3c636 Added $Turret Max Aim Update Delay (same as $Max Aim Update Delay, but affecting turrets instead). 2010-04-15 20:03:01 +00:00
chief1983 52fb26169c Add a VS2010 project file, made from VS2010 Ultimate RC1. Added tweaks after conversion from 2008 to make the output file names and target names more dynamic. This should be the basis for getting FRED release builds to compile. The three other executables per config work fine. 2010-04-14 20:07:08 +00:00
karajorma ff7f028e0e Fix the end-mission SEXP to make it possible to test if the player is alive or not. 2010-04-13 11:15:18 +00:00
karajorma 1362e16c4c Remove a hack which wouldn't allow players to skip the penultimate FS2 mission if they failed it 5 times. 2010-04-13 11:14:20 +00:00
karajorma 4178c4b65c Iss Mneur's mission-set-subspace and hud-display-gauge SEXPs 2010-04-13 11:12:28 +00:00
Goober5000 f59fd543c9 fix Mantis #1953 (departure locations and anchors destroyed by ship editor dialog) 2010-04-13 06:51:06 +00:00
Goober5000 0dddfbca74 consolidate and fix the resetting of time compression (Mantis #2180) 2010-04-13 03:54:30 +00:00
Sushi 0c025d96f6 Fixes a bug where paths generated by exit paths aren't garbage collected. This can cause the game to crash in missions where a lot of ships launch from fighterbays. 2010-04-11 18:36:30 +00:00
Goober5000 4b662a3649 prevent an endless loop if someone tries to assign a variable to itself 2010-03-31 20:31:02 +00:00
Goober5000 d6d69d9ac7 IssMneur's patch for Mantis 2161 2010-03-31 05:33:55 +00:00
Goober5000 59c7c56dd4 The E's patch to apply capital+ to secondary weapons 2010-03-31 05:31:23 +00:00
Goober5000 c2a2f0727f patch some holes in the handling of string variables 2010-03-29 09:39:26 +00:00
karajorma a5078ce0aa Fix Mantis 2000 (Skip Mission Dialog appears even when mission is successfully completed). 2010-03-24 10:49:28 +00:00
Echelon9 36f2e4fd73 Fix Mantis 2158: Increase Intelligence limit from species.tbl 2010-03-21 06:22:35 +00:00
Goober5000 0458d83f94 a couple of small but important fixes to the subtitle code, including (finally) the complete fix for Mantis #2152 2010-03-20 06:37:26 +00:00
Echelon9 c66a0b8e05 Fix Mantis 2156: Crash within outwnd_printf2(char*, ...) on non-Windows platforms 2010-03-20 00:20:47 +00:00
Goober5000 725b48d2b9 handle variables in show-subtitle 2010-03-19 07:39:51 +00:00
Goober5000 b7f4d00358 Genghis's fix for too many cargo names (Mantis 2132) 2010-03-19 06:45:05 +00:00
Goober5000 5a3fa6f576 allow specification of fonts via show-subtitle 2010-03-19 06:31:15 +00:00
Goober5000 28d23c56c0 sexp help now scrolls 2010-03-19 05:47:56 +00:00
Goober5000 7181e3d602 a few things here...
--add space for font argument which will be in post-3.6.12 builds
--fix round-off error in coordinate conversion, discovered by genghis
--use is_sexp_true() instead of WMC's comparison
--fix images not appearing in show-subtitle (Mantis #2152)
--fix invalid character in change-soundtrack sexp help
2010-03-19 04:03:49 +00:00
Goober5000 774f34dea4 approximate the beam whack from retail FS2 2010-03-16 06:43:05 +00:00
Goober5000 7fa0a70c9e this is a long-overdue rewrite of WMC's show-subtitle sexps 2010-03-15 01:55:40 +00:00
Goober5000 27f70fe135 move the -post_process flag to the experimental section 2010-03-14 22:38:37 +00:00
Echelon9 1530e3556b Fix Diaspora Mantis 537: Successfully killing a ship hidden from sensors should count towards your kill count 2010-03-12 23:19:42 +00:00
karajorma b6914428ad Fix Mantis 2140 (Set-primary-ammo/weapon result in the ammo being set to 0 in some mods) 2010-03-10 14:49:50 +00:00
taylor d36f675f50 no comment. (nothing nice to say) 2010-03-10 10:05:42 +00:00
karajorma ca90928e08 Refactoring the Special Explosion and Special Hitpoints/Shield code and saving methods. 2010-03-10 08:50:28 +00:00
Wanderer f19a74b5c2 mantis 2122, fix for hud_gauge string comparison problems. 2010-03-09 07:09:40 +00:00
Wanderer e8d72f5a50 mantis 2138, fix game crashing if using ships with secondaries but without primaries, allow ai ships armed only with secondaries to attack & shoot 2010-03-08 14:53:48 +00:00
Wanderer be06149719 mantis 2113, make autoaim independent from lead indicator status 2010-03-08 14:52:24 +00:00
Wanderer d0b3d8fe30 feature commit - alternate lead indicator based on komet's code changes. 2010-03-06 14:23:13 +00:00
Goober5000 46ea3669d5 allow multiple interface patterns (FS2 plus WCS) to be used in fiction viewer 2010-03-06 11:39:11 +00:00
Wanderer 96c365ca86 Fix for mantis 2131:
prevent for time compression caused vector scaling errors
changed time compression related beam assert into nprintf.
2010-03-05 11:48:19 +00:00
Wanderer f93e369d73 Fubars fix for mantis 2141 2010-03-05 05:47:23 +00:00
Wanderer 5983a47bc4 fix for mantis 2125 2010-03-04 20:34:52 +00:00
Wanderer c4df09934c fix for mantis 2105 2010-03-04 19:39:48 +00:00
Wanderer 3b1597f2d9 fix to attach muzzleflashes on ship to weapon firing points - mantis 2135.
also related fixes - fix attached particle rendering, allow all particles to exists at least 1 frame
2010-03-04 10:10:57 +00:00
taylor 56102ad328 use system versions of JPEG, PNG and LUA (per Mantis #1663 discussion) 2010-03-04 05:58:54 +00:00
taylor 8d2b02efb7 add detection of OpenAL and OpenGL (Mantis #1663) 2010-03-04 05:58:53 +00:00
taylor de60dfe106 fix memory issues with arg parsing 2010-03-04 05:58:52 +00:00
taylor 7b293cd972 reduce minimum sound volume value for OpenAL compatibility (Mantis #1854) 2010-03-04 05:58:50 +00:00
taylor 1ad8db2238 cycle back to normal music is hostile ships leave without battle (Mantis #1632) 2010-03-04 05:58:49 +00:00
taylor bce97dae91 updated Ogg/Vorbis/Theora libs 2010-03-04 05:58:45 +00:00
taylor 721e71f860 handle cmdline_fso.cfg files of any size 2010-03-04 05:58:18 +00:00
taylor a8510f8a51 clean up launcher flags
- update easy flag settings (Mantis #2074)
 - remove -res, it requires an option
2010-03-04 05:58:17 +00:00
taylor f818572382 properly close out mission when end-mission sexp is used (Mantis #2144) 2010-03-04 05:58:16 +00:00
karajorma 64d3a85dfa Fix an issue with the multi_sexp system if you ever had to send two full packets in a single frame. 2010-03-03 14:11:59 +00:00
Swifty b9baca78ed Fix frame buffer objects from rendering upside down after calling gr_opengl_set_clip and gr_opengl_set_projection_matrix. 2010-03-03 12:47:08 +00:00
karajorma e12b4c3840 Remove "disarm or disable cause global ai goal effects:" from AI_Profiles as promised and replace it with a new object types table setting. 2010-03-01 15:59:47 +00:00
karajorma b464f2a558 Fix Mantis 2137 (Play-Sound-From-File doesn't loop correctly). 2010-03-01 13:44:25 +00:00
karajorma abd020529d Ironically OF_REFERENCED isn't referenced anywhere in the code. 2010-02-28 14:07:49 +00:00
karajorma d4b6ae7b8d FRED should base the list on the selected object and not simply the first marked one. 2010-02-24 09:13:47 +00:00
Goober5000 5a92218ce6 fix bugs in VC2005 project files, probably caused by VC6 import 2010-02-24 05:11:22 +00:00
karajorma 38a42dd2e4 Change an assertion into a warning and auto-fix the data in release builds. 2010-02-23 01:53:55 +00:00
Zacam e7b0c695ea For 3.6.12 RC: resolves the text "Monitoring" not showing on the HUD Escort monitor box. [Mantis 2133] 2010-02-20 22:24:28 +00:00
chief1983 a77a92b8f0 Get rid of one place we have to update the version. 2010-02-19 20:41:19 +00:00
Zacam bfdf0c5b48 Increase Trunk tagging and version to 3.6.13. 2010-02-19 19:57:22 +00:00
chief1983 5fc6743d4c SVN will ignore .git and .gitignore files now. 2010-02-18 03:55:41 +00:00
Goober5000 b124ff648b reconvert MSVC_2005 project from MSVC_6 2010-02-17 10:27:23 +00:00
Goober5000 5c032efc72 remove MSVC_6_Release which is now redundant, and MSVC_2003 and MSVC_2005 which are old and need fixing 2010-02-17 10:16:33 +00:00
Goober5000 01a242f269 sync with MSVC6_Release 2010-02-17 10:13:54 +00:00
chief1983 e96e973a54 Fix VS 2008 compiling of FRED. 2010-02-16 05:22:14 +00:00
Zacam cebcd67cfc Some *nix compilers (and potentially Mac in the near future) are dying on the build process regarding this comma. 2010-02-15 22:04:45 +00:00
taylor 41adc2f68b fix coop kill limit check when set to none (Mantis #2014)
cleanup coop validation checks a little, particularly if future checks are added
2010-02-15 19:53:33 +00:00
taylor f7126d9c9c Merge branch 'misc' 2010-02-15 19:01:14 +00:00
Goober5000 4efaaf4523 clarify difference between knossos warpin and warpout in the code -- this should fix Mantis #2128
"mabye" -> "maybe"
2010-02-15 11:01:29 +00:00
Goober5000 ba9c45714a add Fiction Viewer dialog
FRED will now save fiction viewer information properly
FRED will now also save "hidden" debriefing information properly
2010-02-15 10:22:20 +00:00
Goober5000 99aa1e74a0 sync png and zlib changes with MSVC6 2010-02-15 10:08:20 +00:00
Zacam 3761e36f4c Well, this is embarrassing. Forgot to apply "is_a_word_separator" in the briefing text coloring fix for Mantis 1992. As a result, it wasn't stopping coloring unless and until a whitespace was being hit, instead of stopping on valid word separators like it should have been. 2010-02-14 00:46:13 +00:00
Echelon9 271044cb70 Mantis 2108 Fix (Mac Inferno build configurations do not correctly set INF_BUILD in Xcode) 2010-02-13 12:07:00 +00:00
karajorma 7d4f9f0fb5 FUBAR's Mantis 2053 fix (Fix a few holes where invalid names could leak through.) 2010-02-13 09:10:40 +00:00
Wanderer 8651bb3a0b fix for potential (and real) null vec issue caused by sexped explosions 2010-02-13 09:01:07 +00:00
chief1983 1a4917ca2b Fixes for Mantis #2071: Color inheritance and child gauge IDs, per KK. 2010-02-12 17:42:31 +00:00
karajorma 9d705df121 Better fix for Mantis 2106 (set-object-position crashing multiplayer) 2010-02-12 11:23:23 +00:00
karajorma ceebf42868 Bump the server version (should have done this when I broke the packet earlier this week). 2010-02-12 11:19:56 +00:00
karajorma a1f100d0a3 Whoever designed a comparison function that reports false when the arguments are the same should be shot! 2010-02-12 07:42:23 +00:00
karajorma 8555140cf6 Deprecate <any support ship class> in favour of something that does exactly what it says on the tin. 2010-02-12 07:14:34 +00:00
karajorma 77dacf4307 Fix Mantis 2094 (Set-Support-ship results in support ships that can't rearm even though present in the mission). Thanks to FUBAR for the spading on this. 2010-02-12 06:42:19 +00:00
Zacam 6dffec5d23 Patch for Mantis #2001: Primary weapon loadouts with text names no longer show # or anything to the right. Works with $Alt Name: as well. 2010-02-11 16:47:19 +00:00
chief1983 14e0a7f257 Patch for Mantis #2071: color inheritance and pan or static option for custom gauges 2010-02-11 16:32:45 +00:00
chief1983 9473a345fc Fix Mantis #2120: is-primary-selected now returns true for any bank when primaries are linked. 2010-02-11 16:31:25 +00:00
Zacam 20d6d6116f Potential Fix for Mantis 2114 as suggested by The_E and tested by myself. Not only set "static int bm_next_handle" to 0, but also conditioned the Asserts (hopefully) a bit better and cleared out commented code blocks.
(Note: It seems I got Notepad++ to convert ushort and uint into "unsigned" short and int. Doesn't break anything and frankly, I hate unnecessary typedefs anyway).
2010-02-11 02:12:15 +00:00
Zacam e226c8e7f4 Resolves "conditional within an assignment" warnings that could cause problems. 2010-02-11 01:42:36 +00:00
Wanderer c2a1ff57c9 Commit of lua debug patch. 2010-02-10 21:50:15 +00:00
Wanderer 3b84da5af0 commit of beam piercing patch (allow beam tooling to occur simultaneously to the effects) 2010-02-10 21:38:01 +00:00
Zacam ab17ff4d40 From The_E: "This adds the optional string "$End Campaign Cutscene:" to the list of possible cutscenes; once end-campaign is called, all of those scenes will be played if their requisite trigger conditions are met, in the order in which they are defined in the mission file". 2010-02-09 20:03:57 +00:00
Zacam 6a6a3ac822 From The_E: Capital+ flag "AI will not use this weapon on fighters or bombers" for use against Capital class Targets ( SIF_BIG_SHIP | SIF_HUGE_SHIP ). 2010-02-09 20:01:54 +00:00
karajorma 47faa1c364 Fix for Mantis 2106 (Set-object-position crashes in multiplayer). 2010-02-06 11:20:32 +00:00
karajorma b2a443a225 Packet breaking fix for Mantis 2011 (Send-Message-List sends all messages at once for clients). 2010-02-06 11:19:31 +00:00
Echelon9 6d4fb01f67 Updated Xcode project file to reflect the non-inclusion of some redundant png source code files that weren't actually needed in Antipodes 5 2010-02-06 06:52:12 +00:00
Zacam 7096cd3d11 From Antipodes #5: PNG File Format support.
Adds PNG to Maps (should only be used for Nameplates), Interface, Effects, HUD (still needs HUD Rewrite to implement), Player/Squad Images, Multi Players, Multi Cache, CB Anims and Intel Anims.
LIBPNG: Version 1.2.42, current and highest usable version (MAX_VERSION), Linux can use any 1.2.2x-1.2.42, but should NOT use 1.4.0 under any platform for ANY reason (will require rewriting pngutils)
ZLIB: Version 1.2.3.
2010-02-06 02:35:41 +00:00
taylor 05f95e05ee fix damage lightning (from Xt tree) 2010-02-06 01:02:24 +00:00
Wanderer 1cc80c2841 fix couple of model handle related bugs in lua.cpp 2010-02-05 23:14:34 +00:00
Wanderer 17decc5654 allow armor entries exists even without any calculations. 2010-02-05 19:04:12 +00:00
Wanderer e3e7bbfd05 fix for mantis 2110 2010-02-04 21:18:19 +00:00
Zacam e8e37e8620 Multi-platform resolution for "signed/unsigned mismatch" warning on aiturret.cpp via ship.h 2010-02-04 05:36:04 +00:00
Zacam 10d94a24e8 Not multi-platform, but it doesn't break other platforms and removes 11 warnings from nebula.cpp. 2010-02-04 05:02:07 +00:00
Zacam 6d273e9495 Multi-platform resolution for "unused variable" warning on shiphit.cpp 2010-02-04 04:44:42 +00:00
Zacam 650c8010bc Multi-platform resolution for "signed/unsigned mismatch" warning on ship.cpp 2010-02-04 04:42:04 +00:00
Zacam 1f9d15d20e Multi-platform resolution for "signed/unsigned mismatch" warning on gropenglstate.cpp 2010-02-04 04:27:43 +00:00
Zacam b40359cd30 Fix for cutscene.cpp "signed/unsigned mismatch" multi-platform warning. 2010-02-04 04:12:45 +00:00
Zacam 40f0b0b279 Proper fix for Mantis 2039. Nebula poof debris ANI usage now based on using any ANI/EFF on nebdeb01-nebdeb04. Doesn't exist on retail but also doesn't conflict or break Retail as these (nor the original "Neb01-64") actually exist, but allows for the same flexible range for the effect as non-nebula has for motion debris. 2010-02-04 04:04:17 +00:00
taylor 4b40d32f3d particle updates from the Xt code base 2010-02-03 02:18:22 +00:00
karajorma a4f587110d FUBAR's special hits fix. 2010-02-01 04:49:09 +00:00
karajorma 32f4c944e6 FUBAR's bump for the number of docks a ship can have in FRED. 2010-02-01 04:35:29 +00:00
karajorma 8f8a8486a1 FUBAR's Corkscrew Limit bump 2010-02-01 04:15:23 +00:00
Zacam 99c4490bb0 Crap. Fixes SparK's Reverse AB. Now with a ship defined with Reverse AB, forward AB still responds as normal. 2010-02-01 03:37:14 +00:00
Zacam 76d4ba4479 From Antipodes #5: Corrections for errors and warnings to SPHelper.h for speech compiling for WSVC (specifically 2008), especially when done on Vista/Win 7. 2010-01-31 01:22:56 +00:00
Zacam 6cc6bd9119 From Antipodes #5: new TBM option '$Alt name:'
For ships and weapon tbms - renaming existing tbl entries in mods
2010-01-31 01:19:58 +00:00
Wanderer 05b47ecfec bah, bah, bah, bah - fix my own stupid bug in lua raycollision function 2010-01-30 11:45:22 +00:00
Zacam 5ddd75b11e SparK's Reverse Afterburner code, for FringeSpace (Tachyon) project Feature Request. 2010-01-30 03:38:53 +00:00
Goober5000 96d93caf1b Zacam's project fixes 2010-01-30 00:50:08 +00:00
Goober5000 7630b1669c change the other DSPs too 2010-01-30 00:12:45 +00:00
Goober5000 0e7bdf926d fix the MSVC6 project files 2010-01-30 00:04:54 +00:00
chief1983 274aa3cf93 Fix a VC6 compiling issue with multiple declarations of i 2010-01-29 22:21:33 +00:00
Wanderer 38c1682975 The_E's fix for preventing lua On HUD Draw hook from being run when HUD is not visible 2010-01-28 20:28:29 +00:00
Wanderer 170266436b adding 'retail' type piercing (no piercing effect, but normal beam tooling effect) 2010-01-28 20:24:39 +00:00
Wanderer 13a3308e23 added improved controls for piercing effects. fixed shield armor type bug. 2010-01-28 16:05:15 +00:00
Wanderer a3ca4f4ef7 lua function for checking the state of a ship when the ship is dying 2010-01-28 08:05:43 +00:00
Wanderer b0e8ce130e Lua additions/bugfixes, fixed drawmodeloor function for drawing models in game, new model loading helper functions (slow). 2010-01-28 07:37:31 +00:00
Sushi d89a92c6e7 Added $Damage Lightning Type and +Lightning Arc Percent (under $Debris) to ships.tbl. Allows damage lightning effect to be changed (current options are default and none) on a per-ship basis. The percentage of debris pieces with lightning arcs can also be controlled via +Lightning Arc Percent. 2010-01-27 18:55:37 +00:00
Goober5000 51ef10452c remove redundant definitions from modelinterp.cpp 2010-01-26 01:47:35 +00:00
Goober5000 4d643bfe6b thanks to Zacam for noticing the edge case; max flags should actually be 31 2010-01-26 01:47:29 +00:00
Wanderer ffaca21fdd fix for certain lua control problems, data was read and copied at 'wrong' time. 2010-01-25 12:01:01 +00:00
Goober5000 ec0a7e930e Mantis #1992 - enhanced briefing token support; credit to Pedro with modifications by Zacam 2010-01-25 03:25:41 +00:00
Goober5000 fba4e77284 bump MAX_SHIP_BAY_PATHS per Mantis #1917 2010-01-24 21:50:57 +00:00
Goober5000 b53a2b9cd3 trackIR change for MSVC6 project file 2010-01-24 21:50:29 +00:00
chief1983 266737ff84 Fix for Mantis #1936: Third time's a a charm. Let's see if this doesn't help things a bit. Per KK. 2010-01-24 18:45:16 +00:00
chief1983 d5829ad173 Fix for Mantis #1936 part 2: Some stuff that was fixed exposed more broken stuff. Now should be fixed too. Per KK. 2010-01-23 21:58:57 +00:00
Wanderer 8279944008 separate beam flash from dinky explosion (was not a good idea). Enable beam width setting to affect all beams. 2010-01-23 19:34:59 +00:00
Wanderer 8549f3c71a fix to lua escort ship indexer 2010-01-23 09:02:32 +00:00
Wanderer 1375bab654 fix for the new effects with shield impacts and with missiles exploding without impacting 2010-01-23 07:58:31 +00:00
Wanderer f514d2b25a some changes to beam pierce effect, blob pierce effect, new settings for them both 2010-01-22 15:50:54 +00:00
Wanderer 27ac3b0c05 fury's request, option for huge beams not to draw impact effects when hitting specified type of ship. 2010-01-19 14:28:50 +00:00
Wanderer afbb428349 more chase view mode fixes 2010-01-19 07:28:17 +00:00
chief1983 ed5cd1d06b Fix for Mantis #1936: Per ship gauges should now work properly. From KK. 2010-01-18 16:06:35 +00:00
Wanderer 1de215abd5 potential fix for mantis 2041 2010-01-18 14:58:45 +00:00
Wanderer f7d04a9311 weapon info flags: targetable weapon, show weapon on radar, show friendly weapon on radar 2010-01-17 13:52:34 +00:00
Echelon9 d30cc69e36 Provide a simpler way to set the CFBundleName key in the Xcode project file. 2010-01-16 18:26:05 +00:00
Echelon9 47869f4f32 Add to Xcode project file LSMinimumSystemVersion key for future work 2010-01-16 17:55:10 +00:00
Echelon9 03c24467ea Simplify the Xcode project file's CFBundleExecutable key to be truly extensible 2010-01-16 16:51:43 +00:00
Wanderer 74225ecac9 enable another bitfield for ai profile flags, add ai profiles fix for turrets targeting too distant enemies in certain cases. 2010-01-16 16:14:21 +00:00
Wanderer 8546cac0c0 fix for issue when ai is selecting big attack points 2010-01-16 16:06:32 +00:00
Wanderer dbf5d60ab2 Lua control for getting the full button control data 2010-01-16 13:10:55 +00:00
Wanderer 834e4321a7 fixes for various lua wings and wing ship indexer bugs. 2010-01-14 18:05:48 +00:00
Echelon9 2db4d1c9c2 Cleanup Xcode project file 2010-01-13 09:12:41 +00:00
portej05 8694bb1a29 trackir static library no longer needed 2010-01-13 06:53:31 +00:00
Sushi 9e9b6ada2d Added "$Expl Visual Rad" to ships.tbl. This controls the visual size of the main fireball for ship explosions. 2010-01-12 18:51:36 +00:00
Wanderer c18119c729 make sure the debug data is only used in debug builds (not initialized in release builds) 2010-01-11 21:15:27 +00:00
Wanderer d41514c78e Enable missing controls lua control info. Force fireprimary lua function to work regardless of stream status of the weapons. 2010-01-11 10:39:40 +00:00
Wanderer 9a8202cfd0 Fix for subsystem existing without table entries. Rewrote old disabled warnings related to this issue. 2010-01-11 10:38:00 +00:00
Wanderer e2cfb8017a lua access & related functions to enable player button controls to be operated via scripting 2010-01-10 20:59:31 +00:00
Echelon9 e12839e11e With the removal of final Direct3D references, there are no remaining uses of the NO_DIRECT3D definition in the code base 2010-01-10 08:08:26 +00:00
Wanderer f168b7aab7 fix for a case when player dies before his weapons hit the target (target hit by ghost) 2010-01-09 20:12:03 +00:00
Echelon9 cfec9106be Complete reversion 2010-01-07 17:30:44 +00:00
Echelon9 9824b21218 Revert r5760 training_message_queue changes 2010-01-07 17:21:44 +00:00
Wanderer 0eca97a967 model:checkRayCollision lua function to allowed certain collision checks be done with lua 2010-01-07 15:23:25 +00:00
chief1983 abfb3b7298 Fix Xcode compiling for reals, tested to currently work. 2010-01-07 04:48:25 +00:00
chief1983 9f4b691a98 Fix for Mantis #1934: Secondaries now work when changing from a ship that had none, and FRED won't complain when you can't equip secondaries to a ship. 2010-01-07 04:16:44 +00:00
taylor 951ec34a36 fix broken trackir compiling on non-Windows
eol fixage
2010-01-07 02:48:31 +00:00
portej05 680edc2da3 Remove trackir directory from VS2008 solutions 2010-01-06 17:03:13 +00:00
Echelon9 3085dd4b1c Complete update to Xcode project file 2010-01-06 12:10:24 +00:00
Goober5000 d5ab81c947 add external_dll files to VC6 project
alphabetize the project modules at the same time
2010-01-06 01:21:35 +00:00
Goober5000 9ead43eccd change ExternalDLL to external_dll for cross-platform friendliness
(yes there aren't any errors currently, but this has been a convention since the beginning of cross-platform compatibility)
vcproj and xcode projects are updated accordingly
2010-01-06 01:18:31 +00:00
Wanderer cd15f39847 lua handled collision groups and lua bitwise ops library 2010-01-05 18:00:01 +00:00
Hery c0b2e1b1ec Fix for bloom using outdated mipmaps 2010-01-05 17:51:57 +00:00
Hery 1f40c55c1a Fix for mantis 2078, two pass bilinear downscaling in order to reduce artifacts 2010-01-05 12:56:33 +00:00
Wanderer 3572226340 Fix for mantis 2063 from warfull 2010-01-05 09:41:35 +00:00
Wanderer 93524920bd fix for mantis 2077 2010-01-04 11:21:56 +00:00
Goober5000 cdb6ceb1f1 location oops 2010-01-03 20:20:49 +00:00
portej05 99be9d044d Fix TrackIR compile errors 2010-01-03 14:27:39 +00:00
Echelon9 65fc924f92 Update Xcode project file for portej05's code 2010-01-03 09:46:14 +00:00
Echelon9 8116b15105 Update Xcode project file to reflect removed .cpp/.h source code files 2010-01-03 08:52:46 +00:00
Goober5000 169e4e8518 hooray for function prototypes 2010-01-03 05:55:17 +00:00
portej05 2cc225ba3f TrackIR DLL loading implementation. You need scptrackir.dll in order to run (on internal beta at present). 2010-01-02 14:12:22 +00:00
Echelon9 c2b601bd5c Rename function to correctly reflect what it does 2010-01-02 13:32:43 +00:00
Echelon9 67b86f7377 Make Training_Message_Queue dynamic with SCP_vector 2010-01-02 13:28:56 +00:00
Echelon9 3c6f77811a 2010 2010-01-02 06:33:49 +00:00
Echelon9 dce9388543 Some how the removal of the OpenAL.Framework to address GCC 4.2 issues got reverted 2010-01-01 20:02:47 +00:00
Goober5000 5f7684a795 Zacam's extra colors for briefings (Mantis #2059) 2010-01-01 08:30:53 +00:00
Goober5000 05b509d813 Zacam's fix for Int3 in mission briefing (Mantis #2059) 2010-01-01 08:27:25 +00:00
Goober5000 ba9353ee54 adjust number of lines according to font, per KeldorKatarn 2010-01-01 07:52:22 +00:00
Goober5000 21c28412e3 fix ui window using the same font as fiction_viewer 2009-12-30 21:04:58 +00:00
Goober5000 407c670e74 fix mission load error message
remove deleted files from project
2009-12-30 21:04:00 +00:00
Echelon9 155907b7d0 Update SDL from 1.2.13 to 1.2.14. The changelog can be found at http://www.libsdl.org/release/changes-1.2.html 2009-12-30 19:14:05 +00:00
portej05 442ea06112 safe_strings requires you to specify the size of the destination buffer in some way. (fix build for all non-VC6 builds) 2009-12-30 18:09:39 +00:00
Goober5000 770095c84c allow up to two additional fonts using fonts.tbl
allow specification of fiction viewer font
2009-12-30 08:02:37 +00:00
Sushi 4edb31de72 Fixed a problem in the glide code where thrust was not proportional to framerate. Also made glide ramping more consistent in behavior with normal speed ramping. 2009-12-29 23:10:26 +00:00
portej05 345f7b4bc3 ifdef trackir pending new trackir interface code 2009-12-28 18:06:36 +00:00
Wanderer 44b04ddb93 table defined support ship shield, hull and subsystem repair rates 2009-12-28 16:10:11 +00:00
Hery bce99b342e shader manager and post-procesing files need svn:eol-style set to LF 2009-12-27 16:35:39 +00:00
portej05 2449c9abb4 Locking for PDB_DEBUGGING (multithreadedness will need it) 2009-12-27 15:14:55 +00:00
Hery bc369d5566 fix problems with nebula background 2009-12-27 13:20:51 +00:00
Hery 6939a6c05b fix problems with lua scripts and post-processing 2009-12-27 13:01:42 +00:00
Hery 41156280df fix for mantis 2081 2009-12-27 12:42:11 +00:00
portej05 7b730af602 Remove NEW_MALLOC code
Add strcpy_s where needed in vm_strdup
2009-12-26 07:59:01 +00:00
Echelon9 22869bd825 Complete the removal of the now redundant Info-debug.plist 2009-12-24 08:06:38 +00:00
Echelon9 b8af21a85b Fix Mantis 2079. This change utilised Xcode's Info.plist Preprocessor Definitions to consolidate the .plist files into one; which is dynamically generated for the chosen Build Configuration (Release, Debug, Inferno_Release, Inferno_Debug) 2009-12-24 08:02:27 +00:00
Goober5000 1b7863f1d3 clean out some old font stuff 2009-12-24 04:52:56 +00:00
chief1983 a386e6ae74 Fix the makefile to work with the new executable filenames 2009-12-23 06:45:43 +00:00
chief1983 45b6069d74 Update Linux makefile with recently added/deleted files from post processing and the vampire list 2009-12-22 21:50:06 +00:00
Echelon9 b3bc073a73 Reduced size of Frameworks.tgz by removing the unused OpenAL.Framework (it is linked from the system version, this one was redundant). Mac developers will have to reextract the Frameworks folder to take effect. Preparation for the pending update of out of date SDL, Ogg, Theora and Vorbis frameworks for OS X. 2009-12-22 15:18:41 +00:00
Echelon9 9d342e4133 Remove the Xcode project's references to Makefiles 2009-12-22 14:31:46 +00:00
Echelon9 86b9f2f1f8 Hopefully last step to resolve OS X issues from Hery 2009-12-21 20:03:54 +00:00
portej05 de4d3ea105 Updated to VC6 release files for code commit removing empty sound code files 2009-12-21 11:42:07 +00:00
portej05 b8c080bb8e Mantis 1900 patch from Hery 2009-12-21 11:28:16 +00:00
Echelon9 0dbed68b2a Cleanup Xcode project file for *.cpp/*.h that have been previously removed 2009-12-21 09:23:45 +00:00
portej05 5b633a3342 Removal of empty files/unused files (sine OpenAL is now used in all builds) 2009-12-21 09:12:56 +00:00
Goober5000 0c1a0951d7 rewrite code to bypass bizarre internal compiler error 2009-12-21 03:19:13 +00:00
Goober5000 dfd4f33c1f VC6 project file updates 2009-12-21 03:18:45 +00:00
Echelon9 8822a79e42 Commit of Hery's update to the new shader code to address GCC/Xcode compilation issues 2009-12-19 18:39:32 +00:00
Sushi fc26bd16da Fix for mantis 2031 2009-12-18 17:22:01 +00:00
Wanderer f69d5881ed Patch from FUBAR - set armor type sexp 2009-12-18 10:11:48 +00:00
Wanderer 80545a8a96 Patch from FUBAR - turret direction preference, turret optimum range & turret target priorities sexps 2009-12-18 09:34:23 +00:00
Wanderer c2a526db7d fix to portej's fix to particle code 2009-12-18 07:43:43 +00:00
portej05 e67a50beca Make particles go a lot faster! (until a better system is implemented) 2009-12-18 04:28:13 +00:00
Wanderer c0d76ee6c9 weapon based targeting priorities for turrets 2009-12-17 11:45:08 +00:00
Wanderer 02414bc9d6 making countermeasures function like retail countermeasures. 2009-12-16 07:29:56 +00:00
Echelon9 94a1b2d275 MIN() is defined as capitalised at pstypes.h:274 2009-12-15 06:16:04 +00:00
portej05 5f636a00f1 Potential fix for mac issues caused by inclusion of postprocessing in trunk 2009-12-15 02:56:15 +00:00
portej05 8ccf735e27 Resolve macro definition warning for MAX_MONITORS (renamed MAX_VARIABLE_MONITORS in FSO) 2009-12-15 02:23:23 +00:00
portej05 016d01c345 Woops - missed the two important files! 2009-12-14 17:17:29 +00:00
portej05 cf3a4975da Antipodes #4 - Post Processing from Hery 2009-12-14 13:57:33 +00:00
Goober5000 6993a136c0 the reason for the return statement no longer exists 2009-12-14 05:28:06 +00:00
Goober5000 cc4fb68ea6 fix warnings Zacam noticed 2009-12-13 07:24:59 +00:00
Wanderer 54ebd3ad25 hery's patch for mantis 1945 2009-12-11 08:38:39 +00:00
Wanderer 11c87b9934 make the +override option use the flags set during the current parse tbm event 2009-12-10 14:54:13 +00:00
Wanderer 22586a2fb4 commit of aardwolf's clearOrders sexp function 2009-12-08 18:32:40 +00:00
Wanderer 6120956cd6 Fix for mantis 1998 2009-12-08 18:25:50 +00:00
Wanderer d9808e04f6 Added proper functions and warnings as requested for mantis 2018. 2009-12-08 09:59:05 +00:00
Wanderer 97c7fb934d added a warning to prevent issues like mantis 1946 2009-12-06 10:32:11 +00:00
Goober5000 a679a8f597 remove ai_get_subsystem_type as it's redundant
clean up all sorts of subsystem stuff in sexp.cpp (in particular, use ship_get_subsys when possible)
weapon / sensor subsystem types should work for "weapon" and "sensor", not "weapons" and "sensors" to be consistent
2009-12-06 10:06:51 +00:00
Goober5000 62575f7e23 add hits-left-subsystem-generic and hits-left-subsystem-specific
deprecate hits-left-subsystem
2009-12-06 08:48:03 +00:00
karajorma 66e3333392 Fix an issue with the client side section of sexp_deal_with_ship_flag. 2009-12-06 07:15:36 +00:00
Goober5000 434059b5a2 commit the revision patch originally inspired by Zacam 2009-12-05 22:53:04 +00:00
Wanderer cbdca14ea4 fix for mantis 1976. 2009-12-05 19:15:31 +00:00
Wanderer 0db2ca515f fix for mantis 2016 2009-12-05 12:01:03 +00:00
Goober5000 0b2c715162 project file fixes 2009-12-05 07:17:18 +00:00
portej05 17391ffc18 Turns out enableWindowsKey/disableWindowsKey isn't defined for all platforms 2009-12-05 00:50:09 +00:00
portej05 2560ae1109 MSPDB fix for VC6 users. 2009-12-04 06:58:22 +00:00
Goober5000 4c16a66ba9 fix for Mantis #2044 2009-12-04 06:19:02 +00:00
portej05 031f448be2 Fix "SymRefreshModuleList" symbol not found error on platforms without dbghelp.dll v6.5+ (we really should distribute that monster) 2009-12-03 10:23:59 +00:00
portej05 54f63a1357 Running as standalone no longer disables windows key (Mantis #2047) 2009-12-03 07:01:48 +00:00
portej05 7445380789 Commit to update PDB_DEBUGGING in preparation for new allocator system 2009-12-02 17:16:33 +00:00
Wanderer b9fc819ce2 fix to make sure turret matrices (and turret normals) are properly setup from the start 2009-12-01 08:58:40 +00:00
Goober5000 c092173f36 fix a bunch of problems where sexps with multiple arguments might not work on all of them
fix problem with beam-free-all and beam-lock-all only working on the first ship in a list
2009-11-28 19:15:53 +00:00
Wanderer b98c4e8b75 fix to prevent formation of badly setup turret rotation matrices. 2009-11-27 10:09:20 +00:00
chief1983 34179e931a Change the filename for Linux Inferno builds. 2009-11-25 06:20:19 +00:00
chief1983 cc3e1fd071 Set the Inferno configs to output a different filename than the regular counterparts. 2009-11-24 20:05:06 +00:00
chief1983 0bf1baac94 The_E's 720p hi-res interface art patch. Use hi-res interface stuff at vertical res of 600 and higher instead of 768 and higher. 2009-11-24 03:19:19 +00:00
portej05 02b5fd1496 Remove bitarray.h and substitute with simpler functions (tested via Zacam, Flaming_Sword and portej05) 2009-11-23 12:12:09 +00:00
portej05 583e03890f Strip missed CVS comment 2009-11-23 06:11:24 +00:00
karajorma af7ba40eb4 Add the ability to specify ships or wings to the num-ships-in-battle SEXP (In collaboration with FUBAR). 2009-11-23 04:57:42 +00:00
portej05 67e79b3177 Fix for Mantis 2042 2009-11-23 04:45:51 +00:00
Goober5000 554de8e375 warning fixage 2009-11-23 03:41:40 +00:00
Goober5000 5c88548cab more warning fixage 2009-11-23 03:24:10 +00:00
Goober5000 aac68877ec spacing
fix build warning
2009-11-23 03:23:11 +00:00
portej05 b9a95040f7 Remove name concatenation issue from cfilesystem (hopefully mantis 2042 solved, but that callstack changes depending on whether dbg_filter.cfg is there) 2009-11-22 15:05:33 +00:00
Goober5000 9a98a31b1b fix Mantis #2043 - variable-array-set needed extra sexp_tree management
also, improve type safety for checking for sexp operators (compare the constants rather than using stricmp on the names)
2009-11-22 11:55:40 +00:00
chief1983 c90151f94a Fix for fix for #1945 and #1768: Previous fixes didn't play nicely together. Per Hery. 2009-11-19 17:31:48 +00:00
chief1983 65a31a1676 Fix for #1768: cutscene bars should now be fully functional again. Something about cubemaps, ask Hery :) 2009-11-19 06:06:52 +00:00
chief1983 1435ef0752 Fix for #1914: Add a Skybox CLAMP flag to FRED that forces clamped textures instead of tiling. 2009-11-19 05:51:26 +00:00
chief1983 2cc02d72e3 Fix for #1945: Finish adding the proper rectangle drawing code. Cutscenes now combine FOV change + rectangles. From Hery. 2009-11-19 05:49:23 +00:00
Goober5000 6008752531 bump MAX_ASTEROIDS (I can't believe nobody else has yet) 2009-11-18 09:33:31 +00:00
Goober5000 aeb5fd2789 add two awesome sexps that allow treating sexp variables as arrays 2009-11-18 09:17:01 +00:00
Goober5000 33203d244a add useful parselo function 2009-11-18 08:59:35 +00:00
Goober5000 6f3a91c53f remove unused variable 2009-11-18 08:17:26 +00:00
Goober5000 769d3a4d89 sexp subcategorization 2009-11-18 06:34:09 +00:00
chief1983 2da096f845 Add back in:
_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0; 
until we can fix the code that is visibly broken by removing those.  Per Zacam.
2009-11-18 05:58:11 +00:00
Goober5000 f33a638c61 Zacam's "oops" patch 2009-11-17 04:41:35 +00:00
Goober5000 12033c664b fix knossos animations rendering backwards for ships warping out in certain orientations
(taylor's hack isn't actually needed; the parent_obj can - and probably should, for consistency - be the warping ship, not the knossos)
2009-11-16 07:04:06 +00:00
Goober5000 9ee90c41b7 remove this extra friendly-stealth-invisible check; it's redundant and incorrect 2009-11-16 07:01:49 +00:00
karajorma e900e56e1a Trim out some warning messages. 2009-11-14 11:57:35 +00:00
karajorma 39550294bd Pedro's Mantis 1982 Fix (Afterburners are used from several places in the code for ships with no afterburners). 2009-11-14 09:51:24 +00:00
karajorma b323aa89b9 FUBAR's percent-ships-arrived SEXP. 2009-11-14 09:13:45 +00:00
portej05 35aaf68496 FRED Learns to write in its own log file! 2009-11-14 04:11:16 +00:00
chief1983 c178b00fc1 VS2008 remembers how to build
Zacam fixed the broken merge from Antipodes of the project file updates.
2009-11-13 23:35:08 +00:00
portej05 7e65e47acc Fix for issues caused by memset and _HAS_ITERATOR_DEBUGGING.
Some ugliness involved (placement new - yuck!), however given that a lot of our structures are allocated with vm_malloc, I haven't got a better way around this at present.
2009-11-13 18:06:27 +00:00
portej05 cbaf0e5cc3 Fix more incorrect uses of memset causing crashes 2009-11-13 13:22:59 +00:00
portej05 5fd345352e Fix mistake with globally defined symbols (_SECURE_SCL=0 and _HAS_ITERATOR_DEBUGGING=0)
Add PDB_DEBUGGING to default 'code' builds
2009-11-13 10:09:10 +00:00
Goober5000 9c85ac2835 fix Mantis #1967 (spurious warning about custom wing names) 2009-11-13 08:26:12 +00:00
Goober5000 28120ca20c allow changing of case for ship, wing, waypoint, and reinforcement names per Mantis #2017 2009-11-13 08:07:48 +00:00
portej05 6011414dcc Remove _HAS_ITERATOR_DEBUGGING=0;
Remove _SECURE_SCL=0;
Remove _CRT_SECURE_NO_DEPRECATE;
Add Zacams icons patch
2009-11-12 16:40:27 +00:00
Goober5000 52a939531a load hi-res cbanis, if we have them (Mantis #2029) 2009-11-11 06:33:26 +00:00
karajorma 18933d071a Change the Galactica warp effect name to a more neutral term. 2009-11-09 02:18:34 +00:00
portej05 03c0f38796 Added SCP_string, SCP_stringstream, SCP_map, SCP_multimap and allocator equality operators to vmallocator.h (Hery) 2009-11-08 10:28:35 +00:00
Sushi 771571be7e AI Profiles entries in AI.tbl are now overrides instead of multipliers. 2009-11-05 22:46:54 +00:00
karajorma 74d1c139ed Doh x2 2009-11-05 06:16:15 +00:00
portej05 3aaf81208b Fix for memory debugging functions.
Totals are now more accurate!
2009-11-04 13:03:02 +00:00
portej05 b37058615f Fix Assert in WMCGUI.cpp (Vector subscript out of range) 2009-11-03 07:28:25 +00:00
portej05 25e3fe0f80 Fix stupid VC6 variable scoping for for loop in memory debugging routines 2009-11-02 08:00:58 +00:00
karajorma 133a331fc8 Switch to a more neutral name (which fits better with the others too) for the BSG warpout effect.
Add FUBAR's fix for a radius issue affecting BSG style jumps.
2009-11-02 06:28:28 +00:00
karajorma 6d4a7ec889 FUBAR's bump for MULTI_PXO_MAX_PAGES (it was causing issues for Diaspora). 2009-11-02 06:25:23 +00:00
karajorma 2e8a49a05b Minor unused variable clean up. 2009-11-02 03:44:57 +00:00
karajorma 9f44258319 Bump MAX_OBJECTS, WEAPONS, SPLIT_PLANES, and SWARM_MISSILES. This stuff has been tested by Diaspora for months now so it should be fine. 2009-11-02 03:37:36 +00:00
Goober5000 32450e2984 remove constructors as the init functions will always be called
make sure init functions init all struct fields
fix keyframes for weird FS1 anims
remove "dodgy frame skipping code" since frames should be skipped in certain circumstances
2009-11-02 03:10:19 +00:00
karajorma 5e968aac93 Might as well improve this message while fixing Respawn Delay. 2009-11-02 02:24:08 +00:00
karajorma 3d98b9aeae Error message is back to front. 2009-11-02 02:23:16 +00:00
karajorma 38682babc3 Fix Max Respawn Delay properly. 2009-11-02 02:21:42 +00:00
Goober5000 b43417882f Zacam's & Flaming_Sword's patch for ANI streaming, audited by Goober5000 2009-11-02 01:45:26 +00:00
Goober5000 47e03f4a32 removed an unused variable
fixed saving of mission fiction
2009-11-01 09:52:04 +00:00
Goober5000 fbcb83b9db fix FRED choking on respawn delay by making it default to 0 instead of -1; this does not appear to break anything 2009-11-01 09:51:36 +00:00
taylor de43cc3488 spew table/mission crcs to CSV 2009-10-21 11:12:36 +00:00
Wanderer e1df65d0e4 2009-10-12 14:46:54 +00:00
Sushi 56ff4f45c6 Fixed bomb-firing delay scale bug (actually applied to all secondaries) 2009-10-10 19:25:04 +00:00
portej05 983d9cb94a Fixup debug_int3 (until a better solution can be found) 2009-10-06 10:53:08 +00:00
karajorma f0b8f077d5 Fix for Mantis 1996 (Missing support ship builtin messages) 2009-10-01 06:45:02 +00:00
Sushi f4bd24d720 Moving the ships.tbl +Use Newtonian Dampening flag out of the $Glide flag's tree. 2009-09-28 23:00:04 +00:00
Sushi b12b60d577 Fixed a bug that caused the AI to use afterburner too much (in the past 50 revisions or so) 2009-09-28 22:18:35 +00:00
Goober5000 94038d3822 pretty sure the parent objects here have to be -1, not 0 2009-09-28 01:55:14 +00:00
Goober5000 076cbcf818 don't create duplicate waypoints 2009-09-28 01:54:06 +00:00
Goober5000 f3fa70b18b major goof from me a while ago; ship_info data isn't supposed to be modified 2009-09-27 20:53:23 +00:00
portej05 7a3b09e132 Fix for error introduced in Antipodes 3 which caused animations not to repeat 2009-09-26 11:22:26 +00:00
portej05 0383415a3b Antipodes 3 from Flaming_Sword 2009-09-26 05:52:17 +00:00
Sushi 6542269c77 Fix decade-old AI class bug... including AI_Profiles.tbl flag ($fix AI class bug) to avoid breaking retail compatibility. 2009-09-24 20:40:56 +00:00
Goober5000 e516f97d49 improved some retarded setup code in aicode.cpp
moved create_waypoints() into waypoints.cpp and called it at mission post-process
2009-09-20 08:30:50 +00:00
Goober5000 d4f1e1132c remove python files from MSVC6 project 2009-09-20 08:28:44 +00:00
Goober5000 664df3af89 remove an entirely redundant check that WMC added that has the unfortunate side-effect of screwing up any disabled ship that warps in 2009-09-20 08:03:01 +00:00
Goober5000 2a1b807bdb fix compilation problems 2009-09-20 00:39:42 +00:00
Wanderer 27e87c6a0f fotg request - lua support for reading turret fovs and turret matrix 2009-09-19 08:03:07 +00:00
Wanderer 06f0b169e4 wanderer's ai control system setup (both sexps and lua) 2009-09-17 21:27:45 +00:00
Sushi 2e833278ea Fix for Linux build bug reported by Shadow95 2009-09-17 17:43:14 +00:00
karajorma f2158a72fa Add the remove-weapons SEXP. Fix add-waypoint-nav to work properly in multiplayer missions. 2009-09-15 13:47:38 +00:00
karajorma c81d8fdeec Add the option to set a maximum delay before a player is automatically respawned in multiplayer games. 2009-09-15 13:43:13 +00:00
portej05 5e92431d02 Removal of ASSUME macro behaviour 2009-09-13 15:46:34 +00:00
portej05 057ef78c09 Fix to make the stubs error function have a const parameter 2009-09-12 14:43:11 +00:00
Wanderer 2ee628829a fixes to various things listed in the prefast log 2009-09-11 15:52:18 +00:00
portej05 1a8acd364b ifdefing out of global exception handler pending removal. 2009-09-10 15:53:07 +00:00
portej05 be79cb4991 _asm int 3; replaced with DebugBreak for MSVC users 2009-09-10 15:49:56 +00:00
portej05 6cf641cb96 If -fps is specified, the framerate should always be shown. 2009-09-10 15:49:13 +00:00
portej05 884de6da24 ASSUME macro for preFAST noise suppression and optimisation hints (through Assert macros) for VS2005+ 2009-09-10 15:44:25 +00:00
portej05 44f8eab341 Change to make safe_strings show asserts in release.
safe_strings is now used regardless of whether the CRT supports it (except if you're using VC6).
2009-09-10 07:44:08 +00:00
Wanderer 976b86d607 fixing a logic error from the previous fix 2009-09-09 15:41:07 +00:00
Wanderer f53e3a9143 commit for glowpoint issue reported by darius 2009-09-09 15:26:28 +00:00
portej05 585981e24b post-frame-shaded subtitles! Pass an argument 13 which is either (true) or (false) in order to make use of this.
Fix for multimonitor focus loss issue associated with the mouse at the initialisation of the mainhall
2009-09-09 11:52:42 +00:00
Wanderer b91c8cd616 add lua functions to get and set individual HUD gauge color 2009-09-09 09:19:33 +00:00
Sushi 01c5a62b1a Fixed an oversight in my last commit 2009-09-09 04:44:23 +00:00
Sushi 890b1bee36 Added $Max Aim Update Delay to AI_Profiles.tbl (and AI.tbl). $Max Aim Update Delay allows AI aim to "lag" somewhat, making it more possible to evade high-velocity weapons. 2009-09-08 23:32:03 +00:00
Wanderer 780f5e9d09 re-enable both interface and game sound playing from audio lib. 2009-09-08 15:33:34 +00:00
Wanderer f675bde3db fix for detonation_radius issue reported by FUBAR_BDHR 2009-09-08 06:57:05 +00:00
Wanderer 5b1ceed359 from prefast log.. add missing casts 2009-09-07 16:15:35 +00:00
portej05 2e08994ede preFAST noise reduction - these will get optimised out in a release build. 2009-09-07 11:40:02 +00:00
portej05 49ce1e23a5 Fullscreen window request from QuantumDelta 2009-09-07 11:39:32 +00:00
portej05 07b1ea4a3a Logic bugs - ((state != blah) || (state != blah2) ) is always true, so that || should be a &&, and !blah.state & flag != !(blah.state & flag) 2009-09-07 11:13:52 +00:00
Wanderer db1a9508b6 reverting code change - seems only to make things worse 2009-09-06 15:16:23 +00:00
Wanderer c9adb19837 fix for mantis 1944 2009-09-06 13:40:01 +00:00
Wanderer 84c2ad3461 FUBAR-BDHR's fix for 'knossos device' string appearing twice as 'knossos device device' in default objecttypes table 2009-09-06 08:25:37 +00:00
Wanderer 0b742d2301 fix to allow missiles not fired directly at the enemy to home on random spots on the target ships hull. 2009-09-06 08:21:57 +00:00
portej05 0de4a7d9ae Fix for WiH crashes - I reckon this might be the cause of a few peoples problems (using bitwise & instead of logical &&) 2009-09-06 07:41:14 +00:00
Wanderer cf2ef994e9 option to prevent missiles from losing lifetime if they miss their targets 2009-09-04 17:08:24 +00:00
Wanderer d21f8d106f fix for occasional turret locking issue 2009-09-04 17:07:47 +00:00
Echelon9 087f141218 Correct grammar 2009-09-04 08:36:46 +00:00
Wanderer f6fbd4aa1d commit of 'turret direction preference' (int - percentage) - meant to allow turrets to prefer targeting the targets close to the previous target. 2009-09-02 18:17:21 +00:00
Wanderer 7678d0b0c8 weapon flag to allow weapons (including player weapons) not to home on subsystems 2009-09-02 18:14:46 +00:00
Wanderer 5e9bf597c5 debris hitpoints (min/max), debris ship collision damage multiplier. 2009-09-02 08:32:43 +00:00
Wanderer 0715c8d504 Change to collision prediction when using additive weapon velocity. Change to allow 'arm_radius' to sue homing position instead of homing object pos as distance measuring point. Allow weapons with arm_radius to count as armed if they collide with intended target. 2009-09-02 08:13:39 +00:00
Wanderer 468fd91442 Optimum range setting for turrets to help with turrets re-targeting objects inside their minimum range 2009-09-02 08:09:18 +00:00
Wanderer 9eb42469a9 fix for debugging CTD in clean_filename function 2009-09-02 05:17:30 +00:00
Echelon9 822828f412 Force GCC 4.0 as the compiler (for those who've updated to Snow Leopard and Xcode 3.2) while we sort out GCC 4.2 deprecation 2009-09-01 08:16:44 +00:00
Wanderer a92e6bfb1d fix for shockwave and 'carry no damage' flag - addition of 'carry shockwave' flag for subsystems 2009-08-31 17:13:58 +00:00
Wanderer 4ce4880c70 improvements to how subsystems and armor interact 2009-08-30 21:16:48 +00:00
portej05 fb3c9dd696 Fix for interface weirdness in the multi ui (Props to Flaming_Sword and The_E) 2009-08-30 12:09:46 +00:00
Wanderer f1e808aa62 fix for a null vec issue which fubar hit. 2009-08-30 07:51:55 +00:00
karajorma 78deb06ea2 Fix Mantis 1987 (Too many calls to good-secondary-time causes an Int3() ) 2009-08-30 04:24:09 +00:00
karajorma cf949cc6ad Fix a typo, remove some unreachable code, add some missing casts. 2009-08-29 09:32:36 +00:00
Sushi 8b8f325e71 Updates to ai.tbl to allow AI behavior to NOT use the index of the AI class in its logic. In other words, added stuff so that you can create AI classes where their order in the file doesn't affect how they perform.
AI now uses the (previously unused) "Patience" attribute to determine how quickly to break out of a "stalemate" situation (higher patience means willing to endure stalemate for longer). Only matters if the stalemate detection stuff is used as well.
2009-08-29 01:20:11 +00:00
Wanderer 24c94fc72c option to always allow hull armor type to be used (fix for mantis 1973) 2009-08-28 13:48:24 +00:00
portej05 5294e3e1ee Hery's shader unification patch (from Antipodes #2) 2009-08-28 13:16:53 +00:00
karajorma 72af11bb6d Allow bombs to use their actual radius when working out collisions rather than doubling it. 2009-08-28 07:59:31 +00:00
Wanderer ccda696429 runsexp debug console functions - runsexp lua scripting functions 2009-08-28 07:53:45 +00:00
karajorma 8a10fb3181 Don't bother with any other AI checks for afterburner use when the ship doesn't even have an afterburner. Might fix Mantis 1982. 2009-08-28 00:04:25 +00:00
Wanderer 9a1bfaf9c1 Fix for mantis 1986 2009-08-27 15:34:51 +00:00
karajorma 1fb668de99 FUBAR's Fix to make debugging message errors a little easier. 2009-08-26 08:39:41 +00:00
karajorma 5180dc1146 Fix Mantis 1984 (Using sexp_deal_with_ship_flag() on anything ship-vanished causes an Int3() ) 2009-08-26 06:03:11 +00:00
karajorma cb5bcc3369 Fix an issue with the location of the Number Used In Wings label. 2009-08-25 14:49:40 +00:00
karajorma 8edf0d43ed Fix Mantis 1974 (Muzzleflashes don't show up in 3.6.11 builds). 2009-08-25 14:48:18 +00:00
taylor 1529b99932 ensure init_scoring_element() initializes properly (Mantis #1827) 2009-08-25 01:09:32 +00:00
taylor 85920f2151 fix resetting of mission stats when reconnect of FS2NetD happens 2009-08-25 01:09:30 +00:00
taylor a1259d02a8 remove libreadline dependency since we don't need it and can't use it anyway (redo of r.4603) 2009-08-25 01:09:28 +00:00
chief1983 867a8a643f portej's safe strings fix for OS X problem 2009-08-24 16:58:46 +00:00
Sushi 9990637240 Fix so that checking subsystems that are allowed cargo is case-insensitive 2009-08-24 16:05:32 +00:00
Sushi 95a8b8c730 Fix for bug reported by Spoon (http://www.hard-light.net/forums/index.php?topic=65285.0) 2009-08-24 14:16:55 +00:00
Wanderer 75a514b5f9 split 'is_vec_null' macro into normal and 'safe to square' macros. 2009-08-23 11:36:44 +00:00
Wanderer b559c0959b fix for code trying assign 'light laser' and 'rockeye missile' to the weaponbanks if ship class didn't have enough weapons defined for it 2009-08-23 09:33:48 +00:00
Wanderer 48cc61733c option to force beam turrets to use same FOV limits as the rest of the turrets 2009-08-22 09:25:34 +00:00
Wanderer b77b9adf39 turret fov check improvements 2009-08-22 09:00:33 +00:00
Wanderer 8124f3d81d commit of set of vm_vec_normalize_safe functions to modelread.cpp 2009-08-22 08:41:53 +00:00
Wanderer 23521c1e3b nuke's scripting and submodel animation changes 2009-08-22 06:32:11 +00:00
Wanderer 064ab52578 lots of fixes to the earlier burst fire mode 2009-08-21 18:20:28 +00:00
Wanderer 09db476623 fix for shield armor issue reported by Qent 2009-08-19 17:19:37 +00:00
karajorma 3d02219bd7 Bump the number of manoeuvring thrusters again. This probably should be made dynamic at some point. 2009-08-19 06:58:46 +00:00
Sushi eb4b7c03e9 Major expansion of AI.tbl. AI.tbl now allows per-AI-class changes to AI settings in AI Profiles. Numerical values (such as $Glide Attack Percent or $Predict Position Delay) are handled as multipliers. YES/NO flags are overridden if set for a specific AI class. All of these multipliers and overrides are optional, and only active if explicitly specified for an AI class. 2009-08-18 04:32:40 +00:00
Wanderer 02718dd5eb fix for low res medals screen (by flaming sword) 2009-08-17 11:41:59 +00:00
portej05 6d7343b17d Another offsets fix from Flaming_Sword (optionsmenumulti.cpp Line 471 20->31)
What appears to be an indexing error (cheers wanderer!)
2009-08-15 16:40:29 +00:00
portej05 6a1d3d3862 Flaming_Swords Interface Fixes "fixed popup dialog button errors" 2009-08-14 15:42:19 +00:00
portej05 06ef9910c4 Windoze->Windows
(Another) Fix (Attempt) for Mantis 1090. Make the IS_VEC_NULL now check small ranges, not just == 0.f
2009-08-14 12:18:58 +00:00
Wanderer ed0821391e lua virtvar to check and control hud draw status 2009-08-14 11:39:30 +00:00
Wanderer 8826c47460 fix for the support ship issue 2009-08-13 17:23:23 +00:00
Echelon9 3810491748 Modified version of blowfish's FSAA implementation for OS X. Enabled in ~/Library/FS2_Open/fs2_open.ini with OGL_AntiAliasSamples 2009-08-13 12:41:47 +00:00
portej05 6c2aea0db5 Quick update to mspdb_callstack.cpp to handle 64bit windows more correctly (I think - nobody has actually managed to compile FSO on 64bit windows successfully yet.)
Offset fix from Flaming_Sword for the music slider in optionsmenu.cpp (281->279 on line 189)
2009-08-13 04:25:50 +00:00
karajorma 560ab1a5b0 That really needs to be more than just an assertion. 2009-08-09 11:49:21 +00:00
Echelon9 35a8b8bb08 Proposed change for a OpenGL GLint fix in Snow Leopard 2009-08-08 06:02:00 +00:00
Sushi 66db559d2c Some fixes/improvements to AI glide stuff, cleaned up some comments and notes 2009-08-05 05:36:45 +00:00
portej05 1a70dbca7a Get rid of confusing magic numbers and boolean logic that is confusing on non-0 or not numbers. 2009-08-03 15:31:36 +00:00
Wanderer 8fc13dc9d7 Fix for the 'carry-no-damage' subsystem flag, feature commit of shield armor types and shield armor type based piercing percentage setting. 2009-08-02 12:56:26 +00:00
Wanderer cc624e61cd fix to allow live debris from static subsystems 2009-08-02 12:20:36 +00:00
portej05 aa25b5a591 Fix for pdb debugging not showing the symbols on subsequent warnings. 2009-08-02 09:22:40 +00:00
portej05 be186cd01d Fix crash when no cutscenes are defined (NULL pointer dereference through vector [] overload) 2009-08-02 06:32:38 +00:00
Wanderer c19d78f82f variable lead prediction missiles & untargeted heat seekers (aka 'primitive sensor' heat seekers) 2009-07-31 17:26:55 +00:00
Wanderer 0dc516368a commit of target highlighting options mostly for radar icons 2009-07-31 17:25:29 +00:00
portej05 0b1bfe8003 ifdef logic correction for safe_strings (VS2008 release build)
Full logic description is included in comments - please check!
2009-07-31 15:02:56 +00:00
Echelon9 2706a10aca Well yes, but the issue is that strcpy_s was out of scope though 2009-07-31 11:07:10 +00:00
portej05 dcafaa6780 Update to asserts that come from safe_strings - now they print out what they're trying to concatenate - still some ways to go on how pretty they are though (strcat_s will not show the current contents of the buffer, so a short filename might appear to cause the assert, but it's being concatenated with a very long directory structure - the buffer size shown is the full buffer size, not the remaining size) 2009-07-31 09:45:50 +00:00
portej05 dac9c92928 safe_strings is actually safe here (copying stack buffer to stack buffer) 2009-07-31 09:30:03 +00:00
Wanderer e7ff18e13d fix for BP assert due arm_radius 2009-07-30 12:40:52 +00:00
portej05 9bafc782f9 Change taylors change for readability in version.cpp (char buffer initialisation)
safe_strings now spits more, but can be turned off using NO_SAFE_STRINGS (spits during build)
2009-07-29 16:03:15 +00:00
taylor 8cd76d8d41 fix strcpy_s() changes where they didn't need to be or just can't be used 2009-07-29 15:13:34 +00:00
portej05 98f337f701 safe_strings - from Antipodes build #1 2009-07-27 16:06:24 +00:00
portej05 fe7ff55ea2 Restrict semantics for VC2005+ and GCC (not actually used anywhere yet) 2009-07-26 10:13:39 +00:00
karajorma 8a811104b5 Add support for ammo low builtin messages when there is no support ship in the mission. 2009-07-25 16:31:51 +00:00
karajorma f848621a1b Ugly hack for the player ordered disarm/disable issue WCS have been experiencing. 2009-07-25 14:58:25 +00:00
Echelon9 414ce88c58 Clarify a code comment re:GCC 2009-07-24 17:26:43 +00:00
portej05 25e3cd89c4 Fix mistake in extended safe_strings for VS2008 macro expansion 2009-07-24 07:54:35 +00:00
Echelon9 11034e3376 Cleanup Xcode project file post DirectX purge 2009-07-22 14:46:35 +00:00
Echelon9 aadd6ca7c1 Fix use of uninitialised variable reported by valgrind 2009-07-22 09:48:01 +00:00
Echelon9 3bf44ae5b1 Reflect the change to 3.6.11 in Xcode 2009-07-22 09:13:25 +00:00
portej05 673ac40dba Fix for Rodos long, single-word hud message issues. Seems that hudmessage.cpp didn't correctly handle all the possible return values from split_str_once 2009-07-22 05:08:49 +00:00
taylor 737496d65c bump buffer to allow for more tables (99 minimum) during validation 2009-07-22 02:21:24 +00:00
chief1983 95ab9dffa9 Add Zacam's changes (slightly modified) to the VC2008 config - adds Inferno configs and cleans out some kruft 2009-07-21 22:52:19 +00:00
Sushi 7c0008c211 Changed ranges for "$Glide Attack Percent," "$Circle Strafe Percent," "$Glide Strafe Percent", and "$Vaporize Percent Chance" to be between 0-100 instead of 0-1. 2009-07-20 19:52:41 +00:00
chief1983 2f1ca39df8 VC6 updates - add safe_strings, remove Python, remove other vestigial non-existent D3D files 2009-07-20 17:56:01 +00:00
chief1983 060cfbc7ae Fix odd VC6 complaint about a string that was too long. Guess that's what all those double quotes are for. 2009-07-20 17:55:06 +00:00
chief1983 c1a599ac0f Likely unnecessary removal of non-existent files from makefile. 2009-07-20 15:56:41 +00:00
chief1983 90d350816c Add safe_strings to linux makefile. 2009-07-20 15:53:07 +00:00
Wanderer 014b7e4300 Commit of thruster effects for ship and weapon flame and for weapon glow effects 2009-07-19 16:07:23 +00:00
portej05 4c350109dd More safe_strings fixes. 2009-07-19 15:54:59 +00:00
portej05 90943b80c2 Update to safe_strings to give information while in debug mode under VS2005+ (uses scp_str*_s instead of str*_s in debug mode) 2009-07-19 11:15:33 +00:00
portej05 013997a0dd Missed another one. 2009-07-19 08:07:48 +00:00
portej05 9fce479b91 Missed a buffer. 2009-07-19 07:57:39 +00:00
portej05 c5ee5f5e33 Bump buffers causing safe_strings asserts 2009-07-19 07:56:04 +00:00
chief1983 a1699f9edd Port from 3.6.10 branch of fix for dropping issues in the mod warning system, r5458. 2009-07-18 21:34:31 +00:00
Echelon9 89f4e8985b Small fix 2009-07-18 18:13:52 +00:00
portej05 7db0e1c4f1 Debug versions of safe_strings now show where the error occurred 2009-07-18 18:02:58 +00:00
portej05 41bf8dd1d4 Added some new strcpy_s calls 2009-07-18 17:15:17 +00:00
karajorma ee761c8dfc GUI and mission saving stuff for Chief's Force-Shields-On Parse flag. 2009-07-17 21:18:22 +00:00
portej05 86fd3cc17d Some VC6 builds apparently borked by SCP_vm_allocator. VC6 now uses std::vector without a custom allocator. 2009-07-17 12:10:36 +00:00
Echelon9 cfb53105be Apply some of portej05's recent changes to the Xcode project file 2009-07-17 08:15:40 +00:00
chief1983 c9ca0cab25 Add the phrases.xml and its file configuration so that grammar.h and phrases.cfg get generated for VC2008 builds.
This is a necessary step for FS2_VOICER builds to be built, even by 2008 Pro.
2009-07-16 19:58:51 +00:00
portej05 3ac9167ac7 Some safe_strings in use!
Note that I couldn't figure out the buffer size for some of them, so they haven't been changed. The buffer size should be passed as a function argument in future.
2009-07-16 15:18:11 +00:00
portej05 23fcd2968e Fix for embarrassing bug in safe_strings. 2009-07-16 12:48:11 +00:00
portej05 51968f1a77 Fix possible compile error on VC6 platform 2009-07-16 10:14:58 +00:00
portej05 e7db3e6bef Fix the broken comment in safe_strings.h
Add safe_strings.h to pstypes.h
2009-07-16 10:00:50 +00:00
portej05 76ddbc8c2a Checkin of files related to safe_strings, and adding to the project tree (VS2008) 2009-07-16 09:50:34 +00:00
karajorma 0bde3e5d8f Fix a couple of typos other people made. One minor, one not so minor. 2009-07-15 21:49:15 +00:00
Sushi f20e481ba2 Added $Vaporize Percent Chance flag to objecttypes.tbl and ships.tbl. This flag (which takes a value between 0 and 1) allows ships to sometimes explode instantly instead of going through a death roll. 2009-07-15 21:23:46 +00:00
Sushi d4cc6c215e Added burst-fire for ballistic primaries (controlled with the $Primary Ammo Burst Multiplier flag in AI_Profiles). 2009-07-15 19:29:49 +00:00
karajorma 2ffc8487c4 Really need to remove the mission stuff from those too. 2009-07-15 15:19:31 +00:00
Echelon9 4e5c2a89d8 Ensure Sushi's latest AI changes work with gcc, as well as Visual Studio 2009-07-13 20:33:43 +00:00
Sushi 9246a2f74d Additional AI code, including stuff taking advantage of glide and sidethrust. Includes: Flag for allowing fighters to dodge vertically as well as horizontally, "stalemate detection" to help AI break out of circle fights and other stalemate situations, "glide attack" where AI fighters will use glide to fly away while shooting back at you, "circle strafe" where AI fighters will use sidethrusters to jink around while shooting, and an (incomplete) version of "glide strafe" that allows fighters/bombers to use glide to attack capital ships. All new stuff is off by default, and can be turned on with AI_Profiles flags. 2009-07-13 20:08:32 +00:00
portej05 915a9270c9 NEW_HUD Removal commit 2009-07-13 15:48:38 +00:00
portej05 29abf1f51c Python Stripping. Can't promise to have gotten the whole lot though. 2009-07-13 14:11:24 +00:00
chief1983 b0b03a7f7d Fix 1959, the shockwave flag. Again. Hopefully this one doesn't have any other repurcussions. 2009-07-13 01:20:36 +00:00
Echelon9 7af7b91b56 Another instance of std::vector, converted to SCP_vector 2009-07-12 09:36:31 +00:00
karajorma c77a70bfda A couple more vectors that slipped the net. 2009-07-11 17:52:33 +00:00
karajorma 1e80a663af Make messages dynamic. 2009-07-11 17:40:46 +00:00
karajorma fcd9f2b8fb Looks like one SCP_Vector was missed. 2009-07-11 14:18:29 +00:00
portej05 6a8d45c93d Replace most instances of std::vector with SCP_vector. Memory is now all run through vm_malloc and vm_free.
Watch it go up AND down in mission.
2009-07-11 07:07:57 +00:00
karajorma a9179e2db4 Add the Get-throttle-speed SEXP. 2009-07-10 17:07:07 +00:00
Echelon9 c91bf775bb Reflect 3.6.11 version string in Xcode 2009-07-09 12:43:36 +00:00
portej05 5d6b9be53c Removal of DirectX from the codebase.
VC6 and VC2008 solutions have been updated.
2009-07-09 11:35:43 +00:00
portej05 ba4d5c7132 Fix VC6 string too long compile error (props to Flaming_Sword) 2009-07-09 11:16:49 +00:00
karajorma 48d8822bd9 Fix Mantis 1957 (Too many subsystems crash FRED). 2009-07-09 10:55:13 +00:00
Wanderer 657eed8106 Non-swarm type burst fire firing mode commit 2009-07-07 17:08:50 +00:00
Wanderer a5f5e912c3 ai profiles flag to allow turrets to ignore hardcoded fov limits 2009-07-06 20:49:51 +00:00
karajorma 81c1002211 Fix the Primary/secondary-fired-since SEXPs 2009-07-06 17:36:44 +00:00
Wanderer 94ddf755da moved ai's missiles fired at player limit to ai_profiles.tbl 2009-07-06 15:40:21 +00:00
karajorma 31d6469fde Can't say for certain this will cause a speed up but it definitely places the faster check first. 2009-07-06 13:28:33 +00:00
karajorma 5efb4abb9f Looks like the previous SEXP code optimisation didn't take into account the fact that the game tramped values as well as operators through that function so it could call eval_num(). Fixing that gets rid of another few million needless calls to stricmp. 2009-07-06 11:27:31 +00:00
karajorma bc633ce96e Allow clients to pass variable changes to the server (when using lua). 2009-07-06 10:04:19 +00:00
karajorma d121b449d3 Change the way the game figures out the current SEXP Operator in-game as the old method was a massive slowdown. 2009-07-06 10:03:03 +00:00
Goober5000 772865c027 documentation per KeldorKatarn's request 2009-07-06 05:57:17 +00:00
portej05 963fcf87b4 Fix bug in vmallocator. 2009-07-05 15:03:05 +00:00
portej05 720391f8f4 Fix potential undefined behaviour bug. 2009-07-05 06:53:29 +00:00
portej05 d14ace67b0 Customised STL allocator (uses vm_malloc and vm_free) - not actually used anywhere in this commit. 2009-07-05 04:21:55 +00:00
portej05 85eab173d2 Removed more memset(this ... ) statements. 2009-07-04 14:48:16 +00:00
portej05 bdd1f5ff9f Missed a few! (CVS Comment blocks) 2009-07-04 13:39:58 +00:00
portej05 e704b86f72 Browse information turned off for VS2008.
Doesn't affect intellisense, only affects View->Object Browser (not commonly used)
2009-07-03 17:49:01 +00:00
chief1983 d973756d7f KeldorKatarn's fix for Fire Down Normals flag. 2009-07-03 17:08:33 +00:00
portej05 ee5e08868d Fix for Mantis 1949 - Aardwolf has tested this patch. 2009-07-03 15:37:31 +00:00
portej05 3e9707bd0b Got rid of the memset(this,0,sizeof(species_info)) in species_info - defined constructors for a bunch of structs that species_info depends on 2009-07-03 14:29:58 +00:00
chief1983 8b7917d084 No primary linking ship flag. Good thing Kara did 5395 or this would be one more that caused problems. 2009-07-02 23:23:55 +00:00
karajorma f24633cba2 New bug uncovers old bug. Neither particularly serious but both were annoying Diaspora debug builds. 2009-07-02 17:32:32 +00:00
portej05 aebae0185a Warning now makes sense when it is displayed. 2009-07-01 14:31:32 +00:00
Echelon9 4808e4557a Addition of get-fov SEXP 2009-07-01 11:09:06 +00:00
Goober5000 b6e4ccfd05 remove the three additional options from possible squad msgs for support ships; but thanks to WMC's feature they can be added for mods
synchronize comments on the comm menu and flags
2009-07-01 03:47:54 +00:00
karajorma 9df31c7d79 Colour in the ship names in FRED since no one uses wireframe mode to see what is marked these days. 2009-06-30 22:01:39 +00:00
karajorma 5992a55a77 Well that shouldn't have always been saved! 2009-06-30 22:00:24 +00:00
portej05 6281b057ee Fix the FRED crashing on startup problem 2009-06-30 20:18:21 +00:00
Echelon9 948ccf959e Cleanup sexp_set_fov() 2009-06-30 10:39:54 +00:00
Goober5000 f1cc46a562 fix for Mantis #1942 (support ship message using wrong persona)
made the message selection more robust and cleaner while I was at it
this also fixes Kara's multiple-builtin-message feature, as I don't think it would have worked properly in the previous revision :D
(it would have bailed after finding the first message match)
2009-06-30 04:24:15 +00:00
Goober5000 f67596bc5e better checking of wingmen persona headz
fix Mantis #1874 (Command messages check for existence of ship)
2009-06-30 03:34:26 +00:00
Sushi fe87aed445 Added "$nocollide_this_only" and "$collide_invisible" submodel flags. The first one is like $no_collisions, but not recursive on submodels. The second one allows weapon impacts on the special "invisible" texture (normally only ship collisions are allowed). These two flags can be combined to implement invisible collision meshes, which can save a lot of FPS for complex models. 2009-06-29 18:55:20 +00:00
karajorma c9631721c5 This should only have caused problems with corrupt missions but given that it does that with the final FS2 mission it should be fixed. 2009-06-27 08:15:40 +00:00
chief1983 7015ffa0b2 Complete the gutting of safe_strings. 2009-06-24 17:27:09 +00:00
portej05 be743859c0 Removal of safe_strings code - not VC6 compatible :P 2009-06-24 16:56:11 +00:00
portej05 0ebf630314 KeldorKatarns Shield Checking Code. 2009-06-24 16:17:46 +00:00
chief1983 7a37841292 Fix a Lua function so the scripted mainhall works with multiplayer 2009-06-22 23:23:07 +00:00
portej05 0c93ba4501 This simple change means that speech works under VC2008.
I suggest getting the PSDK (rather than relying on the files in /speech/), and defining FS2_SPEECH in both code and Freespace2.
Then you're good to go!
2009-06-22 16:09:27 +00:00
portej05 b91be33343 Just->Error in windebug 2009-06-22 06:37:32 +00:00
Echelon9 0cc4ebc9ef Adopt Assertion in safe_strings.h 2009-06-21 19:09:02 +00:00
Echelon9 7f79f08d32 Update Xcode project file for safe_strings.* 2009-06-21 18:52:21 +00:00
Echelon9 4c55c88b22 Cleanup includes 2009-06-21 18:36:34 +00:00
Echelon9 0666011353 Small change to safe_strings.cpp 2009-06-21 18:22:40 +00:00
Echelon9 015f4a5ef6 Updating portej05 str*_s implementation 2009-06-21 18:01:11 +00:00
portej05 5ad2dcf4b5 Add safe_strings to pstypes.h - forgot to do it in the last checkin 2009-06-21 17:27:24 +00:00
portej05 5b4c5f388c Fixed up some indentation in pstypes.h - the assert section is now readable
Added a space after the ! in the stack tracing using DbgHelp
Added the str*_s basic functions. Note the licence in the top. (also, this only updates the VC2008 project)
2009-06-21 17:08:18 +00:00
portej05 cb51bf1eb5 Callstacks now work under VC2008 - define PDB_DEBUGGING to use. (you need the PSDK to make this work)
See the post in SCP for what/why.
2009-06-21 15:39:13 +00:00
chief1983 9103c5f217 Zacam's enhancement for briefing text colors. 2009-06-20 18:28:13 +00:00
karajorma 18f82eab12 KeldorKatarn's Capship screams fix. 2009-06-20 16:50:18 +00:00
karajorma 7d08f2fecb Add the Trigger Count setting to allow events to repeat a certain number of times rather than simply be tested as with Repeat Count. 2009-06-20 11:27:50 +00:00
Echelon9 98f27b88dd Fix for required_string_4() and readability in ship.cpp 2009-06-20 09:59:04 +00:00
portej05 719825f80d The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
I've tested this through compiling and through hand checking. 
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
portej05 af37fc1b1b Fix for mantis 1933. Despite the huge ugly looking changes, there's only really 2 lines of code changed and indentation has been added. 2009-06-20 07:40:04 +00:00
portej05 8b43ed823c Fix for Mantis 1938. Has been tested against plain mediavps and blueplanet by Sushi 2009-06-20 07:38:02 +00:00
portej05 2f307a06fe Fix one of the static analysis errors Wanderer reported (leaking handle in cfilearchiver.cpp write_index) 2009-06-20 07:36:40 +00:00
portej05 da4d3ce2af remove-goals sexp commit. This has received testing, however it hasn't been pushed to the limit.
http://www.hard-light.net/forums/index.php/topic,63249.0.html
2009-06-20 07:24:46 +00:00
portej05 f7a8bf844b Fix the CTD in aicode.cpp when autopilot is engaged, but not in AP_CINEMATIC and wing_leader == NULL. Probably does not fix all the autopilot woes. 2009-06-20 07:21:41 +00:00
karajorma 9abc540362 Plug a memory leak. 2009-06-19 18:43:20 +00:00
Goober5000 dfb8d4cadf clean-up the end-campaign sexp logic and fix the end-of-campaign movie playing
this leaves room for possible future specification of end-of-campaign movies
2009-06-16 04:14:27 +00:00
karajorma 286a7fca3e Commit Sushi's improved glide changes. 2009-06-14 15:57:45 +00:00
Wanderer 77a8ab89e8 move the bomb delay timer to its proper place in internal ai_profiles.tbl 2009-06-14 09:38:49 +00:00
karajorma 5e3ca2f514 A few minor fixes. 2009-06-13 18:08:54 +00:00
Wanderer c817826d45 commit of Nuke's and Aardwolf's lua functions 2009-06-12 11:38:18 +00:00
chief1983 87fa567516 Whoops. 2009-06-11 04:30:13 +00:00
chief1983 5bd74f4ab3 intrinsic no shields flag for ships.
force-shields-on p_obj flag for mission ship object (overrides intrinsic no shields, don't use with no shields).
No FRED checkbox yet for force-shields-on yet.
2009-06-10 20:19:01 +00:00
Wanderer 79adc6dde8 Echelon9's update to bring lua to version 5.1.4 2009-06-10 09:46:20 +00:00
Wanderer 16db9601ac change mouse_force_pos call to mouse_set_pos call in forceMousePosition lua function 2009-06-10 07:54:52 +00:00
karajorma 15fe7f2ffe Commit Echelon9's flag to prevent the addition of noise to thrusters. 2009-06-06 10:46:10 +00:00
Goober5000 7121dd75d5 clarify op_submenu comment (it had been moved from sexp_tree.cpp to sexp.cpp)
reorder weapon, shield, and engine sexps for consistency
2009-06-03 04:11:42 +00:00
Goober5000 1e4447111a fix bug found by RedDwarf which would overflow the array if (e.g.) Alpha wing ever had six ships 2009-06-03 03:59:50 +00:00
Wanderer dbd42fca7c joystick sensitivity change to improve the accuracy of the controls 2009-06-01 20:33:32 +00:00
chief1983 6d999b5b9d Add the new FRED files to the VC6 projects too. 2009-05-30 21:54:52 +00:00
karajorma cd5faf4e8c Fix yet another VC6 only issue. 2009-05-30 21:22:05 +00:00
chief1983 0c8b78505f Add multi_sexp files to Xcode project 2009-05-29 15:47:55 +00:00
chief1983 a482a9a4a5 Add multi_sexp files to the VC6 projects. 2009-05-29 15:28:04 +00:00
chief1983 f0feac6f70 Committing for Karajorma since he's occupied - fixes Assertion code from breaking Linux now 2009-05-28 21:32:46 +00:00
karajorma 96852832cc Fix compilation of Assertion on MSVC 6 and compilation of multi_sexp stuff on Mac OS X 2009-05-28 13:00:26 +00:00
Wanderer 84423fbcf3 fixing vector rotation issue in subsystem targeting 2009-05-25 21:16:00 +00:00
karajorma 8bdc2c1a9f Portej05's second set of preFAST fixes. 2009-05-24 21:38:22 +00:00
Wanderer 875b735417 fix for the release build crash reported by HT 2009-05-24 07:09:16 +00:00
Wanderer de5f86bd79 fixing the number of lua enumerations 2009-05-23 19:22:05 +00:00
Wanderer eb1bd98ee8 merge from wanderer branch - additional options for lua mouse control 2009-05-23 07:29:56 +00:00
Wanderer 2a69aaa23b merge from wanderer branch - lua flight control option 2009-05-23 07:06:11 +00:00
karajorma 24de2cb225 Bobboau's Skybox flags code (via Wanderer then me) 2009-05-21 14:57:33 +00:00
karajorma 77d60f603c A piece of WMC's warp code that somehow missed being committed. 2009-05-21 14:15:41 +00:00
Wanderer 1302964fbf merge from wanderer branch - trail & contrail leading edge fade out option 2009-05-21 08:50:31 +00:00
Wanderer 7f36e6dc8f merge from wanderer branch - emp protection option for weapon, emp resistant option for ships 2009-05-21 08:37:48 +00:00
Goober5000 8fcee4ebe2 add Taylor's fix for Mantis 1768 (cutscene bars) 2009-05-21 08:33:02 +00:00
Goober5000 e79c4fd923 fix ship-to-ship collisions; they should be disabled iff the ship has a no_collide flag, not iff the ship is a navbuoy
(fortunately, in retail, all navbuoys also have no_collide flags)
2009-05-21 08:31:31 +00:00
Wanderer 943969aac1 merge from wanderer branch - fix inconsistencies with subobj_name and name 2009-05-21 08:19:51 +00:00
Wanderer 7cc7000f88 merge from wanderer branch - additions to alt subsys name from r5125 2009-05-21 08:05:46 +00:00
Wanderer 629b7558f7 merge from wanderer branch - alt subsys name for damage popup 2009-05-21 07:31:43 +00:00
Wanderer 2036fb95cc merge from wanderer branch - turret target priorities setup 2009-05-20 20:43:01 +00:00
Wanderer e05276ea1e merge from wanderer branch.
option to allow all hitpointed weapons to be hit.
allow 'safe from weapons' time of bombs be set.
2009-05-20 20:11:15 +00:00
Wanderer fdb2de32e7 fix swarm issue - again 2009-05-20 19:44:18 +00:00
Wanderer b4eb17bd7f merge from wanderer branch - limited rotation turrets, reset idle turrets option 2009-05-20 18:03:14 +00:00
Wanderer 0920dc10ed addition to the rotate sound to toggle it on if rotation is re-enabled via sexps 2009-05-20 14:23:19 +00:00
Wanderer fa24bc0b39 merge from wanderer branch - autoaim/convergence improvements and variants 2009-05-20 14:13:58 +00:00
Wanderer 4cd2a011db merge from wanderer branch - fixed firingpoint and 'fire on target' subsystem flags 2009-05-20 13:24:57 +00:00
Wanderer cb3085e58c merge from wanderer branch - subsys/turret sounds 2009-05-20 12:24:45 +00:00
Wanderer d320ebf724 merge from wanderer branch - no subsystem targeting flag for turrets 2009-05-20 09:46:45 +00:00
chief1983 01cb760ae5 Bump linux version to 3.6.11 2009-05-19 22:13:12 +00:00
chief1983 3c64b07134 Convert these to UNIX again, hope they compile this time... 2009-05-19 22:02:48 +00:00
Wanderer 9c7b1a1292 merge from wanderer branch - alt iff colors 2009-05-19 21:17:48 +00:00
Wanderer d7f721f3b1 merge from wanderer branch - phreak's inherit parent target weapon flag 2009-05-19 19:40:06 +00:00
Wanderer b399e066f7 merge from wanderer branch - smart spawn weapon flag 2009-05-19 19:29:41 +00:00
chief1983 4def2aebce Add SEXP stuff to Linux Makefile.am 2009-05-19 18:17:31 +00:00
Wanderer fc2f05c747 merge from wanderer branch '$Turrets prioritize ship target:' objecttypes flag 2009-05-19 17:20:18 +00:00
Wanderer ea1cc6ca27 quick jury rigging to prevent stream of null vec warnings caused by r5261 2009-05-19 16:53:05 +00:00
Wanderer cabc75bfe5 merge from wanderer branch. 2d and 3d radar images support 2009-05-18 22:08:13 +00:00
karajorma 3b912c0ca3 Fix Mantis 1926 (Piranha submunitions home in on the ship that fired them in dogfight mode) 2009-05-18 22:00:01 +00:00
Wanderer ab316e895f initial merge from wanderer branch - fixes to corkscrew missile effects 2009-05-18 20:36:11 +00:00
karajorma 5c1a6ef841 Fix Mantis 1925 (Loadout lists may contain ships and weapons which are not been flagged as player allowed). 2009-05-17 12:35:52 +00:00
karajorma a4e623db23 Portej05's preFAST warning fixes. 2009-05-17 11:50:48 +00:00
karajorma d599cc1d6b Commit Wanderer's Salvo Fire mode changes. 2009-05-16 19:41:05 +00:00
chief1983 67406e5952 Update Xcode's Info.plist to 3.6.11 2009-05-16 19:09:55 +00:00
karajorma 3ac6b9aa80 WMC's shipFX changes. Some other minor fixes. 2009-05-16 18:01:08 +00:00
karajorma 2f33c72ba7 AddAdd support for multiple builtins of the same type and new builtin message types Praise Self, High Praise and Primaries Low 2009-05-16 17:32:53 +00:00
karajorma 1a1f81f86d Switch network variables over to the SEXP packet except for when called from lua 2009-05-16 16:58:22 +00:00
karajorma 9f9f4dae6c Add the set-ambient-light SEXP 2009-05-16 16:38:49 +00:00
karajorma 5d9af246c5 Allow multi-docking in multiplayer. 2009-05-16 16:29:41 +00:00
karajorma 7c70f212ba More minor fixes. 2009-05-16 16:20:45 +00:00
karajorma f95777ebe3 Add a ship and parse flag to lock all turrets initially. Fix the Lock Primary/Secondary checkboxes to work for multi-selection. Add a checkbox for lock afterburner. Add the weapon fired since SEXPs 2009-05-16 14:06:23 +00:00
karajorma fc12d0a5b7 Break up the status SEXPs into sub-categories. 2009-05-16 13:03:59 +00:00
karajorma 0a4ca2f858 Fix a bug where the order of SEXP arguments was reversed. 2009-05-16 12:56:26 +00:00
karajorma fbf44b51e0 Add SEXPs to set weapon, shield and afterburner energy. 2009-05-16 12:55:11 +00:00
karajorma 321c1cd30e Echelon 9's fix for a potential buffer overrun. 2009-05-16 12:32:46 +00:00
karajorma e63ea3738b Auto-expand branches after pasting, add-pasting or replacing SEXPs. I really don't know why someone didn't get rid of that petty annoyance years ago. 2009-05-15 18:38:24 +00:00
karajorma 0adb576247 Fix an assertion that crops up when you have no selected message but click on delete message. Has the side effect of making the message editor much less annoying too. 2009-05-15 18:36:47 +00:00
karajorma b67289e52a Commit the SEXP packet code.
Add the set-respawns SEXP.
2009-05-15 18:32:46 +00:00
karajorma 1ea70f7122 Move the repair penalty to an AI profile setting. 2009-05-15 17:53:38 +00:00
karajorma 0512409e18 Looks like that icon was needed after all. 2009-05-15 17:34:46 +00:00
karajorma 39adc73583 Add the validate-argument SEXP.
Fix a minor initialisation error with the ship-tag SEXP.
Fix Mantis 1907 (Error in the get-damage-caused description)
2009-05-14 17:12:23 +00:00
karajorma 4bd18224fe Fix Mantis 1859 (FRED crashes if an unknown ship type is detected in the loadout). 2009-05-14 16:52:56 +00:00
karajorma 961c88132b Due to a merge, delete a file which was never in trunk anyway. 2009-05-14 16:38:02 +00:00
karajorma ba4e5132ef Add new sexps to determine the amount of afterburner and weapon energy remaining. 2009-05-14 16:37:11 +00:00
karajorma 251285cacc Add support for cutscenes before the various briefing and debriefing sections (FRED support for this feature will come later, but it will load and save correctly for now). 2009-05-14 16:27:36 +00:00
karajorma a9219ca129 Fix a bug where the log displays incorrect percentages for kills. 2009-05-14 16:26:37 +00:00
karajorma 616b19772e Changes to allow more data to be used from exited_ship. Make ship_exited dynamic too.
Get-Damage-Caused SEXP and a couple of functions for counting the number of variables of a certain type. 
Commit the new team loadout code and FRED changes to support it.
2009-05-14 15:06:52 +00:00
karajorma 4485f12c24 A couple of new parsing functions for dealing with variables in fields that previously only accepted integers or strings. 2009-05-14 14:08:07 +00:00
Wanderer fe352da2a2 tweak to keep all 3d radar dots inside the retail radar bitmap area - Mantis 1908 2009-05-13 22:03:30 +00:00
karajorma 1d8f54cf29 Allow wireframe for the targetbox to be set from hud_gauges.tbl. 2009-05-12 22:05:43 +00:00
karajorma 5ec562973b Allow the boilerplate traitor debrief to be turned off even if the player did turn traitor. 2009-05-12 22:03:39 +00:00
karajorma dc934368ab Fix Mantis 1538 (special hitpoints not updated properly on deletion) 2009-05-12 21:55:49 +00:00
karajorma b33f468e38 Fix Mantis 1913 (Characters after # are visible in the wings and reinforcements comms menu) 2009-05-12 21:53:12 +00:00
karajorma 428e5d67c9 Fix the FictionViewer truncating anything with more than 70 lines. 2009-05-12 21:49:41 +00:00
karajorma 6a5bf64aeb Allow players to filter who they send messages to when using the chatbox 2009-05-12 21:30:17 +00:00
karajorma 5a919c3e49 Fix Mantis 1911 (Add Data doesn't show the <argument> option)
Fix Mantis 1813 (Negative number constants could be added in FRED for SEXPs which expected OPF_POSITIVE, often resulting in crashes).
Fix (part of) Mantis 1677 (cap-subsys-cargo-known-delay doesn't list the correct ships)
Fix Mantis 1909 (Can't paste variables in FRED)
2009-05-11 09:00:40 +00:00
karajorma 2c8d1795e6 Fix a typo in disable-builtin-messages 2009-05-11 08:54:52 +00:00
karajorma be03d7e3f1 Fix Mantis 1884 (Entering the name of an invalid operator in any dialog other than events editor would crash FRED) 2009-05-11 08:54:28 +00:00
karajorma ad31fc80be Fix Mantis 1910 (Assist Percentage resets itself when ships are multi selected) 2009-05-11 08:48:05 +00:00
karajorma 63f00de6e0 Fix an issue with homing capship missiles not tracking correctly in multiplayer. 2009-05-11 08:45:58 +00:00
karajorma c35da651ea Fix Mantis 1753 (Using " or ; in briefings and messages causes them to either vanish or truncate the message)
Fix a bug that prevented lcl_replace_stuff() working properly when a message had two or more replacements of the same type.
2009-05-11 08:41:51 +00:00
karajorma 6ba239d6a0 Allow beams on any player ship to count for kills. Not just fighters and bombers. 2009-05-11 08:41:09 +00:00
Wanderer edd046798a fix for mantis 1902 2009-05-10 19:09:21 +00:00
karajorma 09adeaea8a Fix compile issue with GCC. 2009-05-10 13:03:41 +00:00
karajorma 62b5d676cd Bump version to 3.6.11. Bump debug warning level to 4 2009-05-10 09:52:05 +00:00
karajorma 61d9326eb8 Fix Mantis 1371 (Can target target's target even if it is stealthed or hidden from sensors). 2009-05-10 09:06:00 +00:00
karajorma 5e54017f15 Fix Mantis 1916 (Can't change the dockpoint a ship is initially docked to without undocking it) 2009-05-10 08:58:16 +00:00
karajorma 0cb0206db2 Add the Assertion Macro as an alternative to Assert.
Switch a couple of Asserts to Assertions.
2009-05-10 08:53:57 +00:00
karajorma d4f6ec98b9 Fix Mantis 1883 (spaces at the end of ship and wing names can cause errors) 2009-05-10 08:32:08 +00:00
karajorma 35dbaac407 Fix Mantis 1620 (Replace Number/String don't work in FRED) 2009-05-10 08:26:17 +00:00
Wanderer c695230883 Fix for mantis 1915 and related collision detection issues 2009-05-09 10:45:04 +00:00
karajorma e2f1229d79 Nope. That won't fix the error. Reverting. 2009-05-04 13:43:48 +00:00
karajorma bdb1569898 Maybe fix a crash in the voice recognition code. Maybe fix a lock when going into the option menu while respawning. 2009-05-01 17:48:15 +00:00
chief1983 4f18bbd624 Nobody here but us chickens (really I don't think anyone uses this but FotG) 2009-05-01 16:14:32 +00:00
Goober5000 b78f77f0a0 fix bug in voice messaging 2009-04-30 23:55:42 +00:00
Goober5000 3427549f9b activate voice recognition 2009-04-30 23:45:14 +00:00
chief1983 f711df0fd1 This is why we can't have nice things. 2009-04-18 19:37:20 +00:00
chief1983 5119664e14 Pretty FRED icon (and new 256x256 FS2 icon to boot) courtesy of Axem 2009-04-13 20:50:59 +00:00
Goober5000 6e4021888d add apostrophes to contractions, lol 2009-04-10 07:49:12 +00:00
chief1983 03123b1437 Add Inferno configs to Xcode project 2009-04-08 17:48:46 +00:00
Goober5000 47060c5c9b add warning system for mods with bad data files 2009-04-08 04:58:12 +00:00
chief1983 0c628834c5 Manual inspection to make sure my new VC6 project was essentially the same as the old one, and wouldn't you know, I found a bug in the wxFred project too :) 2009-04-02 21:57:12 +00:00
chief1983 b4a20998e1 Amazing what you can learn from reading SVN logs. Really. Old. SVN logs. 2009-04-02 21:32:15 +00:00
chief1983 b4d35f6afe This MSVC6 project has additional defines to build Inferno builds, and also utilizes the speech SDK by default which was previously committed. I'm committing this so that anyone with VC6 can make a release build with little to no hassle. 2009-04-01 21:05:12 +00:00
chief1983 144a30b20f We include every other SDK just about...why not speech 2009-04-01 20:29:09 +00:00
chief1983 fe5c1f3bad Missing comma revealed with FS2_VOICER 2009-04-01 20:25:49 +00:00
chief1983 763f714864 Grammar fix 2009-03-31 18:32:09 +00:00
Wanderer 26217893fd fix for mantis 1899 2009-03-31 06:11:09 +00:00
Wanderer ce24e12816 fix for mantis 1900 2009-03-26 08:18:46 +00:00
Goober5000 570755309c final tweak to callsign feature 2009-03-26 01:43:26 +00:00
Goober5000 4f22d45411 change warning 2009-03-26 01:42:47 +00:00
karajorma 26db4ff799 Bit of a hack but it should stop the function from going over MAX_PACKET_SET_SIZE 2009-03-25 00:49:21 +00:00
karajorma aa49d10143 Made this change in my branch but it never made it over here. 2009-03-21 23:06:37 +00:00
karajorma d5168e3592 Fix Mantis 1661 (Ships leaving via the fighter bay don't disappear on multiplayer clients). 2009-03-17 20:28:41 +00:00
karajorma d8a1a68c16 Fix multiplayer for Inferno builds. 2009-03-17 20:25:36 +00:00
karajorma 70ecaa5d86 Various fixes needed to allow multiplayer to use over 255 weapons. 2009-03-17 20:20:48 +00:00
karajorma bdf9f7008b Fix Mantis 1486 (Pressing F4 crashes multiplayer) 2009-03-17 20:14:31 +00:00
karajorma 1637424c35 Fix a series of bugs with generic subsystem types and non-standard names in the ship model. 2009-03-17 17:44:28 +00:00
karajorma 26b7f17c41 Fix Mantis 1729 (Pressing glide keys while warping out locks up the game) 2009-03-16 22:22:48 +00:00
karajorma fff260ae8e Fix Mantis 1838 (Latency information obscures the messaging menu) 2009-03-15 17:19:45 +00:00
karajorma 5dcf9f7880 Fix Mantis 1898 (Names with a # are not truncated correctly in the message menu). 2009-03-12 20:25:09 +00:00
karajorma bf6391e4c2 Fix Mantis 1896 (Two support ships crash the game) 2009-03-10 21:24:07 +00:00
karajorma 87774d9ce8 Doh! x2 2009-03-09 11:50:38 +00:00
karajorma b4abe9f24d Doh! 2009-03-09 11:46:44 +00:00
karajorma 3f1880d22c Fix Mantis 1872 (Fiction Viewer crashes/locks up.)
Allow FRED to save fiction if the mission file already has some.
2009-03-07 22:53:07 +00:00
karajorma 9e61bb1df9 On reflection Mantis 1861 is also going to affect creating a new mission as well. Might as well fix that too. 2009-03-06 20:53:26 +00:00
karajorma 26dfa5f47f Fix Mantis 1861 (Texture Replacements don't initialise properly in FRED). 2009-03-06 19:03:51 +00:00
Wanderer e302a90a1e add 'missing' casts 2009-03-06 15:08:16 +00:00
karajorma bec2409fba Fix a warning where ai_do_objects_docked_stuff was being called twice on clients during multiplayer mission load. 2009-03-05 20:43:34 +00:00
karajorma 812e480bb3 That should only be called once per mission. 2009-03-02 20:41:31 +00:00
karajorma d704a450cb Some minor fixes including getting rid of the vestigial Determination setting from everything except the mission file itself. 2009-02-25 15:41:23 +00:00
Wanderer 4ea1424e64 possible fix for the missing thruster glow names.
changed phrasing of unrecognized type subsystem issue to less severe.
forced game to warn only once if exceeding max ship classes.
2009-02-25 14:50:59 +00:00
chief1983 0272c785dd Taylor's fix for the OpenGL error in the debug log
http://www.hard-light.net/forums/index.php/topic,61170.msg1207696/topicseen.html#msg1207696
2009-02-23 17:10:14 +00:00
Wanderer 8e83b3f502 fix for mantis 1862 2009-02-03 13:42:30 +00:00
karajorma 2d495a3c15 Serves me right for saying it was working. 2009-02-03 00:12:18 +00:00
karajorma e57d4ff5f2 Argument SEXPs shouldn't be included when searching the tree for arguments. 2009-02-02 17:17:31 +00:00
Wanderer 6e0200d27e fix for mantis 1875 2009-02-01 13:13:18 +00:00
karajorma 38eff95a7f Fix a bug with in-sequence and invalidate-argument. 2009-01-28 22:41:57 +00:00
karajorma d6f28ceb97 Fix Mantis 1867 (String-equals didn't work with nested arguments) 2009-01-24 22:36:45 +00:00
Goober5000 b8375fa785 being meticulous 2009-01-20 05:49:27 +00:00
phreak d5f2b68044 Cutscene bars fix, try #2 2009-01-20 05:19:35 +00:00
Goober5000 afd60862ab fix for Mantis #1851 2009-01-20 04:18:14 +00:00
Goober5000 deaad91241 possible fix for Mantis #1853 2009-01-20 03:46:49 +00:00
Goober5000 6842f9d910 don't CTD on sexps that are too long (Mantis #1852) 2009-01-20 03:38:09 +00:00
Goober5000 eb862504f4 preserve texture replacement upon name change (Mantis #1695) 2009-01-20 00:35:58 +00:00
Goober5000 ec427000eb hopefully final revision of the callsign code 2009-01-19 20:56:36 +00:00
phreak 87dd770d93 Cutscene bars fix using gr_set_clip instead of gr_rect. 2009-01-19 03:48:45 +00:00
Goober5000 39efcaf386 just for sanity's sake, default to 0% limit for support ships repairing hull 2009-01-18 04:01:09 +00:00
Goober5000 a58ae3d02e revert changes to close out issue #1870 2009-01-18 04:00:15 +00:00
karajorma 2f0c86dd01 Get rid of the ping message when the HUD is turned off 2009-01-15 21:33:32 +00:00
phreak 98e1d6b56f Fix for Mantis #1870 2009-01-15 01:07:35 +00:00
karajorma 6d8ca2c14b Make the player orders error message a little clearer. 2009-01-05 17:51:02 +00:00
karajorma d448ff3632 Mantis 1633 (No orders for player ships) appears to have been due to two different bugs. This should fix the one I missed earlier. 2009-01-04 17:10:51 +00:00
karajorma 978f5f363f Add a 3rd save format to FRED thereby making the current forward compatibility of save game optional. 2009-01-03 14:54:15 +00:00
chief1983 51a6901dae OpenGL tweaks from Taylor's 3610 patch and a big fix for OS X graphics - Thanks Echelon9! 2009-01-03 02:39:11 +00:00
chief1983 da0dbe84b3 Standalone GUI minimize from Taylor's 3610 patch 2009-01-03 02:37:45 +00:00
chief1983 6fc6267fca Fix for movie playback from Taylor's 3610 patch 2009-01-03 02:36:59 +00:00
chief1983 f5f0713345 Fix for fighter beams from Taylor's 3610 patch 2009-01-03 02:36:22 +00:00
karajorma 054d745ece Fix a bug whereby initial orders were being ignored on the standalone. Maybe fix Mantis 1815 (Starting wings play dead on standalone). 2008-12-30 21:33:35 +00:00
phreak 53492408c9 Change FRED version and title bar from 3.6.9 to 3.6.10 2008-12-25 04:13:43 +00:00
Goober5000 506ee1f517 choose the last persona found as the Command persona, not the first, since that's how retail does it 2008-12-22 05:30:21 +00:00
Goober5000 58b171ce76 bah 2008-12-21 21:36:42 +00:00
Goober5000 673f10485b this ought to fix bomber+ according to the way $smart secondary weapon selection was set up 2008-12-21 21:34:37 +00:00
Goober5000 1323b85c9d roll back Wanderer's fix 2008-12-21 21:18:00 +00:00
Wanderer f80572c172 fix mantis 1802
fix possible issue with subsystem fixup
fix - via ai_profiles - AI with bomber+ flag
2008-12-21 19:46:38 +00:00
karajorma 25c6d6340c Use fout_version for +Use Table Score and +Assist Score Percentage 2008-12-21 13:08:12 +00:00
Goober5000 33034e581b we probably only want to use fout_version when we have actually pushed a FSO version
(hopefully this should fix the sprawling version-specific commenting)
2008-12-21 07:45:38 +00:00
karajorma 88f71ef237 Fix a multiplayer bug where names like Alphabet were assumed to be in Alpha wing 2008-12-20 22:10:29 +00:00
Goober5000 69b0a7a250 skybox model should be 3.6, not 3.6.10 2008-12-20 19:53:55 +00:00
phreak cd7ce4e88b Fix crash due to revision 5006 2008-12-20 16:54:24 +00:00
Wanderer c37055ea42 possible fix for Mantis 1802 2008-12-19 22:23:31 +00:00
chief1983 b7a51a86b5 Commit WMC's fix for icon briefing lines that don't get deleted (Mantis 1763). 2008-12-17 07:54:55 +00:00
chief1983 af9eea721c Revert changes done to fix bug 1645 (it'll have to wait) 2008-12-17 07:38:38 +00:00
phreak 6ba6544036 Made the cutscene list dynamic 2008-12-16 22:07:21 +00:00
karajorma 2835c6950b Restore Assist Score Percentage saving. 2008-12-15 22:11:57 +00:00
Wanderer 0562982e02 warn the user of 'div by 0' issue 2008-12-15 20:25:49 +00:00
karajorma 3dd6ce5bb7 That's probably had a rather large knock on effect with the version saving code. 2008-12-15 18:47:43 +00:00
phreak 04f77b4e7c Add code project as a depedency of the Freespace2 project 2008-12-14 21:44:27 +00:00
phreak be97108d6c Fix a bad memset 2008-12-14 21:33:53 +00:00
Goober5000 adbb60d8bc fix algorithms for any-of, every-of, and number-of to align with or and and, respectively 2008-12-14 08:47:27 +00:00
phreak 28a408deee Possible fix for mantis #1843 2008-12-14 08:11:14 +00:00
Goober5000 6208959b49 whoever made this change forgot about operator precedence 2008-12-14 07:20:56 +00:00
phreak ee75c69ab9 Edit workspace file to use relative paths 2008-12-13 17:25:16 +00:00
karajorma 548faf84bc Fix the <argument> option not appearing when there were no other options on the list 2008-12-13 10:09:59 +00:00
karajorma 90ea4099fb Fix a bug where you could supply add-background-bitmap or add-sun-bitmap with a string variable which then couldn't be used. 2008-12-12 17:38:23 +00:00
phreak e1416453a8 This stops the crashing as demonstrated by Mantis #1844, but I don't know why or if it is correct. Could someone please look at this? 2008-12-12 14:38:28 +00:00
chief1983 d18a78ef05 Must have fatfingered some keys when I wasn't paying attention. 2008-12-10 17:48:29 +00:00
chief1983 8406bfada6 Hopefully this will actually let it load the 2d without breaking WCS again 2008-12-09 23:51:13 +00:00
phreak 23742e8261 Turning an Int3() into a Warning() 2008-12-09 13:02:30 +00:00
chief1983 f75be11102 Only PCX and DDS work for Squad Logos.
Slight tweak of the open file dialogs.
2008-12-08 16:45:07 +00:00
phreak 1d453b80f2 Add code::blocks support. To compile you will need to install the following library packages SDL, openal, ogg, vorbis, vorbisfile, theora, lua5.1, jpeg, GL, GLU. Currently, it has two types of outputs: Debug (standard debug build), and Release, which optimizes using -O3 and -march=core2 (because my laptop is a core2). Probably could experiment with additional compiler options to improve speed. 2008-12-06 21:24:14 +00:00
chief1983 b290f5281a Add Ship Choice 3d for TBP flag as well since lack of will crash debug builds, and fixed whitespace on that particular section of code. 2008-12-06 20:23:24 +00:00
chief1983 89a7c1e0f4 Force 3d Shockwave and 3d Weapon Selection command line option when The Babylon Project command line option is on, since their default launcher.ini does not have those and not having these options breaks things in TBP. 2008-12-06 00:44:44 +00:00
karajorma 6f32344d45 Fix the FRED undo function. 2008-12-05 23:06:17 +00:00
chief1983 fb37f654f0 Allow DDS, TGA and JPEG files for squad logos (TGA and JPEG need testing) 2008-12-04 23:15:18 +00:00
chief1983 9c0dbb7acb Add 3d Shockwave to All Features On and Default Off lists 2008-12-04 20:47:45 +00:00
chief1983 5c12c0ef48 Redo that fix again - tolower wins, but don't chdrive on non-Windows platforms
Made a variable more semantically correct
2008-12-04 20:17:51 +00:00
karajorma e55577111e Fix Mantis 1835 2008-12-04 19:32:21 +00:00
chief1983 61891ed5ec Fix the cause of the problem in Mantis #1748 in both chdir functions in case it becomes a problem elsewhere down the line 2008-12-04 17:56:53 +00:00
chief1983 84e6b6eabe Rest of the different fix for 1278 (only my second commit and I already goofed) 2008-12-04 17:40:28 +00:00
chief1983 1f5444b850 Different fix for 1278 - It's a bit more flexible. Use ai_profiles to allow/disallow entering multi with no primaries or secondaries 2008-12-04 17:38:11 +00:00
chief1983 d12f0c7ae9 Fix for disabled 3d shockwave flag when 2d shockwave doesn't exist - fallback to 3d anyway 2008-12-04 17:27:26 +00:00
phreak 3736999bdc Possible fix for mantis #1748 (FRED2 Crashes when squad logo button is pressed). 2008-12-03 05:40:35 +00:00
karajorma 93bb980ff3 Fix gibberish entries in file dialogs. Maybe fix Mantis 1748 2008-12-02 21:42:04 +00:00
karajorma 4862747454 Since the player ship is the default for most of these SEXPs they should not be greyed out just cause it is a player start rather than a ship 2008-12-02 21:14:23 +00:00
karajorma 42b5befef0 Fix Mantis 1733 (String variables required a valid default value when used in SEXPs even if that value would never be used) 2008-12-01 22:34:38 +00:00
karajorma 78cda09d2c Fix Mantis 1822 (Cannot use variables in add-background-bitmap or add-sun-bitmap) 2008-12-01 17:29:24 +00:00
karajorma b06a4a5349 Widen the primary and secondary combos in the weapons editor. 2008-11-30 20:00:02 +00:00
karajorma 21d258925d Typo 2008-11-30 14:56:45 +00:00
karajorma d6399427ff Print an error to the log when too many messages are in the queue rather than breakpointing. 2008-11-30 14:55:58 +00:00
phreak 4bf6b83e93 whoops 2008-11-30 14:13:28 +00:00
karajorma 07d6f2bff9 Fix add-background-bitmap and add-sun-bitmap to display a list of bitmaps from the tables properly. 2008-11-30 13:01:30 +00:00
phreak 1bc83969ac fix the message variable parsing the right way (mantis #1831) 2008-11-27 01:38:28 +00:00
karajorma aa7fc2d713 Fix Mantis 1825 (Int3() when trying to change a ship flag on a ship which self destructed) 2008-11-26 23:19:31 +00:00
phreak 4a4268e77d Fix Mantis #1831 2008-11-25 22:05:39 +00:00
Goober5000 66019a11ca add ai_profiles flag for Mantis #1422 2008-11-24 02:35:20 +00:00
Goober5000 219c7541f8 if a ship or weapon is allowed, allow all its # equivalents (further insurance against the Interceptor#Weak problem) 2008-11-24 02:13:13 +00:00
Goober5000 09d116f667 prevent form-on-wing goals from overriding everything else
this should fix the AI bug that revision 2170 applied to all wings (not just starting wings)
this should also fix the bug where Alpha wing couldn't be issued orders via sexp, even in retail
2008-11-24 00:01:00 +00:00
phreak 8c521c771b Add some preprocessor macros to aid in debugging. Nothing is on by default, but when enabled, the macros will force windowed mode at various resolutions. 2008-11-22 20:56:30 +00:00
karajorma cfa7e2d7c8 Fix Mantis 1823 (Rand SEXP only has 16-bit precision) 2008-11-20 20:03:14 +00:00
phreak 6d13cce780 Apply the time limit check when starting a co-op game to the kill limit as well. 2008-11-19 23:45:43 +00:00
phreak d1f6caaaaa Fixed Mantis #1675 2008-11-19 16:12:05 +00:00
phreak 871b316add Fix Mantis #1278 2008-11-19 15:31:30 +00:00
karajorma 9eb55188d5 Fix Mantis 1824 (Cargo containers disappear when using change-ship-class SEXPs) 2008-11-19 08:00:05 +00:00
phreak 9b7fff7e99 more fixes that deal with mantis 1564 2008-11-18 03:30:13 +00:00
karajorma 53143dee9c Allow AI-goals to be assigned to a ship represented by an <argument> 2008-11-17 17:57:45 +00:00
karajorma a6bae2c557 Fix the Decline error message that crops up in multiplayer sometimes and get rid of the PAIN! entry in the log. 2008-11-14 09:15:19 +00:00
karajorma 55aea5cf13 Fix Mantis 1633 (Initial orders for multiplayer Player Starts that end up AI controlled are ignored). 2008-11-13 21:21:00 +00:00
taylor 643a1aa230 standalone changes:
- add score/kill values to Player Info tab
 - add multi.log out to the Debug tab
 - add minimize-to-tray functionality
 - fix messaging problem with property sheet handled messages
2008-11-11 01:09:01 +00:00
taylor fe03b667cd remove bad checks for loadout info (we are screwed if the info is bad regardless, so making it Assert() is cleaner)
fix bug that screwed up TVT if more than 4 ships on team
2008-11-11 01:03:38 +00:00
taylor 570e4cb1e6 make sure that a positive hull precentage doesn't hit 0 due to rounding error (Mantis #1720) 2008-11-11 00:59:19 +00:00
taylor 2c45dbbb5f give multi clients a short delay on briefing music to reevaluate goals if needed (should fix/reduce Mantis #1465) 2008-11-11 00:58:19 +00:00
phreak 307106f983 Got rid of goto statements 2008-11-11 00:09:30 +00:00
karajorma 68c51f242a Fix Mantis 1812 (Ship-Deaths reported incorrectly for player starts controlled by AI ships) 2008-11-10 19:31:07 +00:00
taylor ad1c5055d4 address some rounding issues with integer based percent values (Mantis #1807) 2008-11-09 05:09:51 +00:00
taylor 3abccfa76c sync up to current FS2NetD code (fixes so many little problems/issues that it's not even funny) 2008-11-09 05:08:19 +00:00
karajorma 42683318f7 Fix Mantis 1044 (Campaign Editor crashes in release builds but not in debug) 2008-11-06 20:42:23 +00:00
phreak f4ba5d0bb2 Apply Spicious' patch from http://www.hard-light.net/forums/index.php/topic,57573.0.html 2008-11-04 05:21:00 +00:00
phreak 8d70f8c15f Mantis #1800, take 2 2008-11-03 00:04:26 +00:00
karajorma 73f924163c Surprised this wasn't committed before. 2008-10-30 20:39:47 +00:00
phreak 83a57be996 Possible fix for mantis #1800. Don't ask me how I came up with the numbers I used, I'm not too sure myself. 2008-10-30 04:04:54 +00:00
taylor 50cc1331ae put a 1/2 sec delay on the next secondary so we don't fire immediately after respawn (Mantis #1118) 2008-10-28 18:18:12 +00:00
taylor 1b5f722967 make disband wing work properly (Mantis #1680) 2008-10-28 18:16:08 +00:00
taylor 33ab6d34ef fix weapons carry check to work properly for multi (Mantis #1624) 2008-10-26 14:42:03 +00:00
phreak d7fd6b4454 Possible fix for mantis #1564 2008-10-26 02:57:36 +00:00
Goober5000 028bfecc70 fix another spawning weapon bug 2008-10-24 22:57:40 +00:00
Goober5000 e6b801595b fix bugs caused by missing parent when weapon-create creates missiles 2008-10-24 22:17:02 +00:00
Goober5000 d3f38e26bc fix a bug in weapon-create argument validation 2008-10-24 21:14:24 +00:00
karajorma d4305fbd85 Set the type correctly for modify-variable (it used to assume all variables were numbers). Fix setting string variable to the value of another string variable (again). Solve a couple of other minor assertions and crashes. 2008-10-24 16:54:59 +00:00
taylor 70059a94d6 make sure that we update our subsystem in-use count when removing subsystems
(fixes bug where it just keeps wanting more memory but doesn't really need it)
2008-10-24 09:05:54 +00:00
taylor 262c3178e9 more if-statement fixing
fix the fix so that it's actually fixed (re: Mantis #1676)
2008-10-24 09:03:46 +00:00
Wanderer 91dd16167b patch to improve turret subsystem targeting 2008-10-23 15:38:57 +00:00
taylor 862d6f43db mode if statement fixage 2008-10-23 13:27:21 +00:00
taylor 966ec358e9 fix bogus ml_printf strings
use ml_string over ml_printf where possible
remove newlines from ml_* calls, since it gets added already
2008-10-23 13:26:35 +00:00
taylor 6ed6ecbfb8 be sure that we sort the mission list properly for a host that isn't the master (for consistency with host-master behavior) 2008-10-23 13:25:19 +00:00
taylor 1062040fbf output warnings, errors and asserts to debug log for Linux/OSX
allow -no_warn to skip asserts like it does on Windows builds (for consistent behavior)
2008-10-23 13:23:45 +00:00
taylor 0f01a1bd4c this assert will happen during normal multi play, nothing ingame related 2008-10-23 13:22:11 +00:00
taylor 0b1ea9a58d restart sounds/music on game browser screen (Mantis #1279) 2008-10-23 13:21:02 +00:00
taylor 19c1520dba final part of the fighter beam fix; freaky as it is, it actually managed to not break anything :D (Mantis #1795) 2008-10-23 13:00:21 +00:00
Wanderer 3032a0f5d9 added 2 missing newlines to debug spew 2008-10-23 10:09:12 +00:00
Wanderer fbe14f5a5e improved readability per taylor's suggestion 2008-10-23 06:47:12 +00:00
taylor c4b763680c fix stupid bug that messed up last flight date (Mantis #1274) 2008-10-23 04:51:02 +00:00
taylor 60fca98974 set player speed after respawn to be initial velocity specified in mission (Mantis #1198) 2008-10-23 04:49:24 +00:00
taylor 15dbb9e8b4 basic fixing for cmeasure handling over the network, not 100% without packet breaking though (Mantis #1098) 2008-10-23 04:47:41 +00:00
taylor 9bce69ef79 ingame join related crash fix (the correct value is put in after mission sync) 2008-10-23 04:44:25 +00:00
taylor fdcaebfad3 pass correct object to primary cycling (fix for multiplayer) 2008-10-23 04:43:19 +00:00
taylor ef0c0e994b fix V's "hack" so that it actually works and doesn't leave unused objects hanging around 2008-10-23 04:41:19 +00:00
taylor 249b8496e3 fix some NaN that gave invalid values in the standalone UI 2008-10-23 04:39:54 +00:00
taylor 7c944ed2a3 fix some weird signature checks from retail code 2008-10-23 04:38:17 +00:00
Wanderer aab688222c allow option to prevent turrets from targeting too distant bombs 2008-10-23 04:30:09 +00:00
Wanderer acc7fa2b16 fix for surface shields selecting wrong hit quadrant 2008-10-22 13:56:19 +00:00
Goober5000 1ccfa433d6 one last fix 2008-10-21 21:37:37 +00:00
Goober5000 a832c11585 hopefully this should be the last on Mantis #1785 (the callsigns) 2008-10-21 06:17:44 +00:00
Goober5000 10340678cb Keldor's fix for callsigns not getting translated 2008-10-21 06:05:30 +00:00
Goober5000 a82b7862d8 fix a warning 2008-10-21 02:20:18 +00:00
Wanderer 2ccbedd071 added +noreplace to ships flags to allow adding flags
added +override to muzzleflash.tbl
added +override to weapon flags
2008-10-20 18:51:51 +00:00
Goober5000 280b979d09 try to keep up with Nature producing bigger idiots :( 2008-10-19 20:25:30 +00:00
Backslash 8a2af2b13b My bad. No need to cap the ammo here. I had used the wrong variable anyway. Fixed. 2008-10-17 10:12:48 +00:00
phreak 400e950190 Fix Mantis #1799: Crash on "Mystery of the Trinity" 2008-10-16 04:09:38 +00:00
taylor 36ac0cb908 make sure that we don't re-save a deleted pilot in the barracks (Mantis #1794)
fix pilot deletion proceedure to not provide useless failure handling (if it fails to delete once, it will fail every time)
2008-10-16 00:41:35 +00:00
taylor ae062bcc0b make debris render properly in wireframe mode in hud targetbox and in ships lab (Mantis #1797) 2008-10-15 22:15:24 +00:00
Backslash 4d0f978e1c Fix 'cycle' behavior when $Shots is more than 1. 2008-10-15 06:31:18 +00:00
taylor 4f7744cf36 fix bug where changing turret_targeting_order[] to have asteroids earlier in the order would skip further checks 2008-10-14 17:09:09 +00:00
taylor acf1aa60ac get rid of some useless/annoying debug messages 2008-10-14 16:58:26 +00:00
taylor e44de24957 fix for fighter beams in multi (Mantis #1795) 2008-10-14 16:57:23 +00:00
taylor 6e42152761 better version of the earlier ab_count fix 2008-10-14 16:42:33 +00:00
taylor 251f52796c when sorting the mission/campaign list be sure that we keep our current selection
when loading the mission/campaign list for the first time make sure that we always select the first element in the list
2008-10-14 16:40:42 +00:00
taylor c5f9ba424c add exports to map file
generate program database for release builds (doesn't make build bigger, .PDB allows finding of source/line given error address)
2008-10-14 16:38:39 +00:00
taylor d23e80bdef fix some bad if statements 2008-10-14 16:35:49 +00:00
taylor ddd6ce2cf6 update to build with current code (Mantis #1796) 2008-10-14 08:30:54 +00:00
taylor f2e2297e9f disable const string warning (that thing was just plain annoying) 2008-10-13 06:38:03 +00:00
taylor 0253d298e9 only load tbls from tables/ (Mantis #1725) 2008-10-13 06:34:48 +00:00
taylor f6d26f915a bunch of out-of-bounds fixage 2008-10-13 05:57:57 +00:00
Goober5000 941faf9ab9 fixed a number of bugs with Electronics missiles that were present ever since 2003 :( 2008-10-12 21:57:40 +00:00
Goober5000 d0af5c2169 move the Electronics tag to its proper place 2008-10-12 19:44:27 +00:00
Goober5000 05769b3ffe fixed "bastion" debug console command to work for all main halls
added "medals" debug console command for testing
2008-10-12 19:44:06 +00:00
phreak 6a3cf80be0 Add additional filename extension filters to fix Mantis #1484 2008-10-11 12:08:09 +00:00
karajorma 55c8720e90 Fix Mantis 1791 (invalidate-argument did not work with multiple matching arguments) 2008-10-09 21:13:26 +00:00
Turey e461625622 Mantis 1584: Enabled F(n) keys during popups. 2008-10-08 03:02:15 +00:00
taylor f598aafeb0 more class_type fixage from r4638 2008-10-07 20:47:03 +00:00
taylor 71e948278b don't call gr_activate() in Assert macro
log asserts properly when using the -no_warn flag
(though asserts aren't really warnings and should not be turned off, it could be argued that many of our asserts don't belong)
2008-10-07 20:31:04 +00:00
taylor ee57fa59ca make sure that we reset the state properly after an ident failure (Mantis #1735) 2008-10-07 16:28:22 +00:00
Wanderer dbe8e071bb fix for ab_count crash issue on mission reload 2008-10-06 18:05:37 +00:00
taylor 27f2f168dc fix fs2netd shutdown/cleanup code to work better (gets rid of various little issues) 2008-10-06 05:52:25 +00:00
taylor beafe688bb don't really need to bother with MAX_SERVERS any longer since it's ultimately dynamic 2008-10-06 05:51:20 +00:00
Goober5000 01c783e27d if ship names are hidden but a callsign is supplied, use the callsign 2008-10-05 21:58:16 +00:00
Goober5000 c7b8cd7021 alt names should now work in FRED (including the voice acting manager) 2008-10-05 21:29:45 +00:00
Wanderer 6ca5bdcffa Added warning to help preventing invalid ship types. 2008-10-05 13:50:44 +00:00
taylor 18b2922455 a fix/workaround for Mantis #1692
bunch of standalone fixage for error reporting and various little signon issues
fix heartbeats for standalone servers
make proper use of +pxo in multi.cfg for standalone so that games can show up in the lobby
client-side fix for getting pilot stats in lobby (Mantis #1652)
2008-10-05 13:31:35 +00:00
taylor de28613166 add separate standalone options for setting FS2NetD login/password (gets around FS2NetD server game listing issue) 2008-10-05 13:24:06 +00:00
taylor 9a3a1b051e no magic numbers 2008-10-05 13:19:13 +00:00
taylor 8650ee98bd start up mainhall music/ambient when in the lobby (Mantis #1761) 2008-10-05 13:16:42 +00:00
taylor a4889e49e9 fix standalone crash when server name/password is too long in multi.cfg 2008-10-05 13:15:10 +00:00
taylor fcb28b51f1 better error handling for when TCP socket is already in use (Mantis #1626)
fix missing protocol XSTR that used the wrong tstring for display
2008-10-05 01:17:45 +00:00
taylor 7938c36df2 you are never guaranteed a valid class_type (fixes Mantis #1742) 2008-10-04 20:48:07 +00:00
Swifty ceea88037c Fix the rest of the Visual Studio project files such that FRED can compile. 2008-10-03 00:04:52 +00:00
phreak d17ea1d102 Update fred to include trackir libs 2008-10-02 17:32:54 +00:00
Swifty db5767b18a Added missing semi-colons. 2008-10-02 06:50:15 +00:00
Swifty 04fc426d90 Statically link TrackIR support; FS2_TrackIR.dll no longer required at run-time. 2008-10-02 05:58:01 +00:00
phreak 4524583f06 Disable the mouse when lost focus in windowed mode. 2008-10-02 00:57:10 +00:00
phreak f445aedaf1 Get rid of some repeated code. 2008-10-01 22:50:13 +00:00
phreak 666cbd4bc5 Get rid of windows system ding sound when pressing ALT and another key while windowed mode is active. 2008-10-01 05:36:40 +00:00
phreak 99446022fc It may be a hack, but this seems to fix that one pixel line seen on the bottom and right side of the screen when faded to a solid color. 2008-10-01 04:04:39 +00:00
Goober5000 d37828e00a fix linked primary behavior to be based on percentage, not absolute value, as expected (Mantis #1778) 2008-10-01 00:44:11 +00:00
Goober5000 818b6a40ac re-bump alt names
fix hidden ship names for voice acting manager
2008-09-30 23:50:14 +00:00
karajorma 3bc9a692af Fix Mantis 1774 (when-argument within when does nothing) 2008-09-30 17:36:12 +00:00
karajorma 9ef6d889d3 Fix compiling on OSX...apparently. 2008-09-30 15:52:53 +00:00
Goober5000 a0344aefae uninitialized pointer bugfix and cleanup to hud_stuff_ship_name / hud_stuff_ship_class
send messages with ship class rather than ship name if ship name is hidden
2008-09-29 04:47:23 +00:00
Goober5000 f0e53971f6 redo the callsign feature to be independent of the alt name
(fixes Mantis #1785)
2008-09-28 23:05:03 +00:00
Goober5000 8340ed5943 add Keldor's fix for Mantis #1779 2008-09-28 20:58:28 +00:00
Goober5000 89d3b62524 make CAR and CDR fail-safe 2008-09-28 19:28:22 +00:00
Goober5000 fdd2daebad don't hide information when displaying ship callsign
clean up hud_render_target_ship_info a bit
2008-09-28 01:53:54 +00:00
Goober5000 d3509e1aba fix for Mantis #1783 (voice acting manager message senders) 2008-09-28 01:16:07 +00:00
Goober5000 52c04fdf18 add KeldorKatarn's fix for AI afterburning too long 2008-09-28 00:26:56 +00:00
phreak 42b5c942f5 Allow .jpg files to be loaded out of VPs when in the "interface" subdirectory. 2008-09-26 04:59:12 +00:00
phreak b2f21047da Add KeldorKatarn's patch for mantis #1776 2008-09-25 03:55:24 +00:00
phreak c3e32613d7 Fix for Mantis #1767: Fix invisible ships upon knossos warpin 2008-09-25 03:45:57 +00:00
phreak 146d3cdd8f Fix for mantis #1773. Check null pointers 2008-09-25 01:58:40 +00:00
phreak 16a3ed9f4b Seperate 3d ship and weapons selection into their own command line options. 2008-09-25 01:15:30 +00:00
phreak b5cc4e46fb Render the lens flare even if the parent sun is off screen as some lens flares are much larger than their parent star and they magically disappear as soon as the center of the star leaves the FOV. 2008-09-18 00:33:59 +00:00
phreak 485a98ac3e Fix radar orb rendering (It was using the incorrect rotation matrix). Also enable alpha blending on the orb axes. 2008-09-18 00:30:54 +00:00
WMCoolmon 4e872096b1 Fixed secondaries using the laser renderer 2008-09-17 00:10:05 +00:00
phreak 0248c6988a Ensure the larger keyframe is chosen when looping the weapon loadout animations. 2008-09-16 04:51:36 +00:00
phreak 3189278d43 Do the same thing for ships that the previous commit did 2008-09-15 23:21:41 +00:00
phreak 9278f421ad Honor the keyframe value in the weapon loadout animations. If less than 2 keyframes are defined (first frame and return frame), then the animation will treat "52" as the keyframe value (retail default).
All 1024x768 weapon loadout animations have 0 and 52 set as the keyframes so they render properly.
2008-09-15 23:05:05 +00:00
phreak 0f13bcee06 Fix for Mantis #1562: Lens flares visible if sun behind asteroids. 2008-09-15 01:51:20 +00:00
phreak f78749be88 Ensure target_engines pointer is initialized. 2008-09-14 21:55:34 +00:00
Goober5000 b784bb6cff revert changes from 4801 (Phreak's fix for >4GB memory reporting)
c.f. http://www.hard-light.net/forums/index.php/topic,56409.0.html
2008-09-14 20:29:03 +00:00
Goober5000 0ae4939981 re-fix WMC's bug to be compatible with expected behavior 2008-09-14 19:29:07 +00:00
phreak 2c34c391d2 Fixed nebula render bug for Mantis #1765 2008-09-14 19:05:30 +00:00
phreak 14c478376b cleanup find_homing_object() 2008-09-14 18:51:38 +00:00
phreak 8bf826793a Change output executables to 3_6_10 2008-09-14 17:05:59 +00:00
karajorma 58fc12fc57 KeldorKatarn's afterburner lock SEXPs 2008-09-13 22:21:38 +00:00
taylor 61ef271683 update with current official SDL framework (should fix Mantis #1727) 2008-09-13 14:41:57 +00:00
taylor 81811ff842 if max shield strength is 0 then disable shields (rest of Mantis #1645) 2008-09-13 14:40:06 +00:00
karajorma 455180fa4a Fix Mantis 1088 (Extra call to ai_do_objects_docked_stuff() )
Remove the banks_fired Assert. WMC is correct. We don't need it anyway.
2008-09-10 11:24:00 +00:00
phreak 25b56bfac6 Add updated freespace2 icons 2008-09-08 23:01:22 +00:00
Swifty 7e047b5c98 WMC's fix for RTT indexing and fix unnecessary slewing for 3D HUD elements. 2008-09-06 07:51:50 +00:00
Wanderer ac4fb52604 Fix for mantis 1736 2008-09-05 21:59:55 +00:00
Swifty 57fbb21c62 Fix for Mantis 1743: Targets don't shudder with the rest of the HUD. 2008-09-05 07:57:40 +00:00
phreak 21aa72ae2f Fix memory detection for systems with > 4GB of RAM. 2008-09-04 20:40:57 +00:00
karajorma 04e4095b36 Arguments within arguments (again). It should work this time round. 2008-09-04 20:38:14 +00:00
phreak 38abe31509 Possible fix for Mantis #1669 2008-09-01 03:09:00 +00:00
karajorma 3b6e62805f Fix Mantis 1545 & 1754 (Order SEXP doesn't work with wings or destroy subsystems properly)
Add the Query-Orders SEXP 
Deprecate the Order SEXP
2008-08-31 21:04:44 +00:00
WMCoolmon 4bff232cad Change set-fov back to a global override 2008-08-30 19:48:20 +00:00
WMCoolmon ddf75fc7e0 Final scripting, camera code updates. 2008-08-30 11:05:48 +00:00
WMCoolmon b4b2f7d54f Fix for mantis 0001211 2008-08-30 11:04:12 +00:00
WMCoolmon e71d060984 Core all-RTT code. 2008-08-30 11:03:03 +00:00
WMCoolmon c9e3d746d4 Added object_get_model; moved object_h to object.h 2008-08-30 11:02:36 +00:00
WMCoolmon 9d4bad1c7f Input updates for scripting 2008-08-30 11:00:11 +00:00
WMCoolmon 74a6636bc6 Attempted HUD shake fixes 2008-08-30 10:59:10 +00:00
WMCoolmon 19ed659d6b Minor idiotproofs 2008-08-30 10:58:44 +00:00
WMCoolmon 48d8f030b3 Better compatibility with avoiding the main hall 2008-08-30 10:57:27 +00:00
WMCoolmon 7ef7959d77 all-texture replacement code 2008-08-30 10:56:28 +00:00
WMCoolmon 6c7ccad82f Attempted HUD shake fixes 2008-08-30 10:56:04 +00:00
WMCoolmon 36e44e7f2b hud_get_draw, custom subsystem names in HUD subsystem damage list 2008-08-30 10:54:44 +00:00
WMCoolmon 6cfab94ef0 New camera code 2008-08-30 10:52:32 +00:00
WMCoolmon 9764ce9ea8 Replace Assert with smooth failure. 2008-08-30 10:52:08 +00:00
WMCoolmon d0808e2bf0 New camera code, cutscene bar fixes 2008-08-30 10:51:21 +00:00
WMCoolmon d2e4d0d6ee Support for all-texture-type texture replacement. 2008-08-30 10:50:49 +00:00
WMCoolmon 699ac0f2bd FRED support for new camera code and texture replacement of all texture types 2008-08-30 10:49:22 +00:00
WMCoolmon 39d623c7c2 ship_wing_point_or_none SEXP type 2008-08-30 10:48:46 +00:00
WMCoolmon 5404b776aa Support for custom warp sounds 2008-08-30 10:47:50 +00:00
WMCoolmon 5a72f40f62 Fix unneeded use of doubles 2008-08-30 10:47:16 +00:00
WMCoolmon 525e45db77 Updated objsnd API 2008-08-30 10:46:23 +00:00
WMCoolmon 3f02f79b3d New camera code, warp code updates, debris attributes, fix large numbers of ships being created at the same time, delta bank. 2008-08-30 10:45:41 +00:00
WMCoolmon 9360d3b580 Prevent "Alt-Alt" from textify_scancode 2008-08-30 10:43:37 +00:00
WMCoolmon f51a8cf3c0 New camera code core commit, delta bank code. 2008-08-30 10:42:27 +00:00
WMCoolmon 743c9eb82d Update to use new camera code. 2008-08-30 10:41:31 +00:00
WMCoolmon 752bff94cc Updated to use new texture map class. 2008-08-30 10:41:01 +00:00
WMCoolmon fd7cbf5750 - Fixed bug involving too many goals being assigned to a ship from wing orders 2008-08-30 10:37:51 +00:00
WMCoolmon 13eb0e77e4 Fix for mantis 0001737 2008-08-30 01:21:54 +00:00
WMCoolmon 896b61f2fe Fix glowpoint option in lab not working (thanks blowfish) 2008-08-30 00:24:10 +00:00
Goober5000 1859ae688e Mantis #1755: stars should not be drawn when there's a skybox 2008-08-26 01:28:30 +00:00
phreak 943ee9b8a2 Add Fred to the list of executables automatically built in debug mode. 2008-08-22 15:05:12 +00:00
karajorma 81a851e33a Revert argument changes till I can figure out why they crashing VC6 builds but not 2005 ones. 2008-08-20 20:45:45 +00:00
phreak 97951efa9d Fix alt-tab and FS2 trying to regain focus. 2008-08-20 04:22:39 +00:00
karajorma 672e34c166 Fix the -argument SEXPs to allow them to cope with conditionals being used within them.
Clean up some code from in-sequence that never worked anyway.
2008-08-19 19:00:54 +00:00
phreak 4ea2ca2b64 Applied blowfish's patch for Mantis #1714. 2008-08-18 23:33:34 +00:00
taylor 61dbdc24b3 fix broken commit from partial Xt merge 2008-08-18 05:56:46 +00:00
phreak 2d79e4eee4 Don't flash the screen red when damaged while invulnerable (either through cheat or sexp). 2008-08-17 22:26:59 +00:00
phreak 1a3e5f28af Fix beam damage when time compression is active. 2008-08-17 21:55:03 +00:00
karajorma 69b61ceaa4 Hmmmmmm. Using a VC2005 keyword as a variable name is just asking for trouble. 2008-08-16 08:13:43 +00:00
Goober5000 ca0df1f2b0 fix a few bugs by rolling back the non-ship-template code from revision 4636
this also fixes the ship spinny thing (which both argv[-1] and Backslash had noticed and fixed previously)
2008-08-16 05:06:38 +00:00
phreak 3f48553935 Add a check to see if the complete escort list is full before adding an additional ship. 2008-08-15 01:37:38 +00:00
karajorma cb6dbe5214 Fix Mantis 1745 (TvT scoring for players kills scales with difficulty) 2008-08-12 20:29:36 +00:00
phreak 52829ea14e Remove check for no-collide-invisible ships when checking to see if a weapon passed it's target. Changed FOV check to allow for missiles with FOV half-angles greater than 90 degrees. 2008-08-11 04:11:46 +00:00
phreak 4e1fdc6c8b Fix for mantis #1744 2008-08-10 21:17:00 +00:00
phreak f419106805 Possible fix for mantis #1728 2008-08-10 21:16:22 +00:00
karajorma bfe417ff2f Add builtin messages for support ships back into TvT missions. 2008-08-10 10:37:20 +00:00
WMCoolmon 3a54776c6b ATTN: Swifty - Mantis #0001707. Update to fix what looks like basic math error on my part. 2008-08-07 01:35:17 +00:00
karajorma 6de7ba0deb Fix Mantis 1605 (Support ships are forever marked as abort on clients after initially called in).
Fix a bug where support messages were sent from the client and the server so they played twice.
2008-08-05 21:25:55 +00:00
WMCoolmon da6fa5a429 Update MSVC2003 project files 2008-08-04 22:54:03 +00:00
karajorma a70c5ffb1d Fix the Run Freespace option in FRED. Still not 100% but it should get a valid name more often than not. 2008-08-04 09:56:40 +00:00
karajorma bcdc1c1589 Fix Mantis 1731 (CTEXT reporting the variable value if a block variable of the same name existed) 2008-08-03 11:39:05 +00:00
karajorma 9a28c24f70 Fix Mantis 1232 (Can't use Zeta in Coop or Beta/Gamma in TvT) 2008-08-02 19:20:58 +00:00
karajorma 4374fcd1ce Fix Mantis 1734 (Block variables appearing in modify_variable menu and SEXP) 2008-08-02 16:53:09 +00:00
karajorma 90e30ee37e Fix a problem with the assertion logging fix I added earlier if the stack trace was too long. Will now log errors too. 2008-07-29 19:25:34 +00:00
WMCoolmon bf23eb17c8 add isPXOEnabled scripting function to Testing library 2008-07-29 04:21:58 +00:00
phreak e10379ad18 Disable UAC for the other project types (debug, and non-sse2 release builds). 2008-07-28 22:14:18 +00:00
phreak d094476101 Remove UAC when building the executables. 2008-07-28 02:51:36 +00:00
karajorma 0a9903f48d Print the stacktrace to the debug log on hitting an assertion. 2008-07-24 20:25:42 +00:00
karajorma a05b1ef11f Allow the player to score from assists and kills in a variety of new ways. 2008-07-24 20:23:52 +00:00
karajorma b3d7dba2a4 Let TvT games use all the skill levels 2008-07-24 20:10:29 +00:00
karajorma a360a8e606 Allow multi_find_player_by_ship_name() to deal with respawning players too 2008-07-24 20:09:21 +00:00
karajorma e44f2c1911 Fix Mantis 1732 (Ship-Guardianing ships destroyed before mission start)
Add change-player/team-score SEXPs
2008-07-24 20:01:30 +00:00
karajorma 5b05ce6028 Update 2005 solution with the shader stuff. 2008-07-24 19:56:27 +00:00
taylor 952c057ff9 add ARB_shader_texture_lod to the stupid SM3.0 test (for OS X mainly) 2008-07-22 15:50:01 +00:00
taylor e1044c578d 2d poofs are supposed to be default (forgot that since I didn't commit the new neb2 code :)) 2008-07-22 12:59:58 +00:00
phreak bba43b5a79 Updated to add new files to the VS2008 project. 2008-07-18 20:26:27 +00:00
taylor f2f6bef1fa damn, forgot these 2008-07-16 07:50:58 +00:00
taylor 9231692e48 basic commit of a few Xt tree changes
- updated OpenGL code (basic shader support, etc.)
 - new ships lab code
 - scripting RTT fixes
 - don't let FRED hog CPU time
2008-07-16 02:49:19 +00:00
karajorma 6e3aa4a33a A bandaid on the gaping wound that is the current score code for ships. Should stop the missions corrupting themselves with ;;FSO 3.6.10;; messages but missions won't open in 3.6.9 now. 2008-07-14 18:25:41 +00:00
taylor 663ff9d0b1 add part of the Xt texture replacement code which fixed texture page-in issues for late arrivals
(rest of the missing thruster fix)
2008-07-14 03:11:11 +00:00
phreak a9c8558507 Updated to a newer version of glext.h from SGI 2008-07-10 11:34:50 +00:00
taylor d5e1312e19 total_time fixage (it should never be allowed to be zero) 2008-07-10 06:15:56 +00:00
taylor 2494bd0291 various thruster fixage from the Xt tree (should fix Mantis #1450) 2008-07-10 05:58:51 +00:00
taylor 6c255cf1c9 fix HB being sent after server disconnect (made games show up for up to 10 minutes after they had ended)
make the chat channel count update more than once, since that didn't appear to work very well
fix compile error with GCC 4.3
2008-07-10 05:10:31 +00:00
Goober5000 16f8087433 the second half of the Mantis #1271 fix 2008-07-10 03:44:45 +00:00
Swifty 14c7b2c4c8 Mantis 1707: fix for FTL warp effect going out of bounds. 2008-07-08 16:17:49 +00:00
Goober5000 9d5d21c39d d'oh -- fix Mantis #1271 2008-07-08 08:03:31 +00:00
karajorma 466d3a2811 Couple of small changes to make the Standalone work again. 2008-07-07 08:46:17 +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
245 changed files with 12662 additions and 9229 deletions

No files matched your search

+20 -17
View File
@@ -191,7 +191,10 @@ AM_LDFLAGS = @D_LDFLAGS@ @FS2_LDFLAGS@
noinst_LIBRARIES = libcode.a
noinst_PROGRAMS = @FS2_BINARY@
EXTRA_PROGRAMS = fs2_open_r fs2_open_d wxFRED2_r wxFRED2_d fs2_open_INF_r fs2_open_INF_d wxFRED2_INF_r wxFRED2_INF_d
EXTRA_PROGRAMS = fs2_open_@PACKAGE_VERSION@ fs2_open_@PACKAGE_VERSION@_NOINF \
fs2_open_@PACKAGE_VERSION@_DEBUG fs2_open_@PACKAGE_VERSION@_NOINF_DEBUG \
wxFRED2_@PACKAGE_VERSION@ wxFRED2_@PACKAGE_VERSION@_NOINF \
wxFRED2_@PACKAGE_VERSION@_DEBUG wxFRED2_@PACKAGE_VERSION@_NOINF_DEBUG
###############################################################################
##
@@ -791,22 +794,22 @@ FS2OPEN_SOURCES = \
freespace2/levelpaging.cpp \
freespace2/levelpaging.h
fs2_open_d_SOURCES = \
fs2_open_@PACKAGE_VERSION@_DEBUG_SOURCES = \
${FS2OPEN_SOURCES}
fs2_open_r_SOURCES = \
fs2_open_@PACKAGE_VERSION@_SOURCES = \
${FS2OPEN_SOURCES}
fs2_open_INF_d_SOURCES = \
fs2_open_@PACKAGE_VERSION@_NOINF_DEBUG_SOURCES = \
${FS2OPEN_SOURCES}
fs2_open_INF_r_SOURCES = \
fs2_open_@PACKAGE_VERSION@_NOINF_SOURCES = \
${FS2OPEN_SOURCES}
fs2_open_d_LDADD = libcode.a
fs2_open_r_LDADD = libcode.a
fs2_open_INF_d_LDADD = libcode.a
fs2_open_INF_r_LDADD = libcode.a
fs2_open_@PACKAGE_VERSION@_DEBUG_LDADD = libcode.a
fs2_open_@PACKAGE_VERSION@_LDADD = libcode.a
fs2_open_@PACKAGE_VERSION@_NOINF_DEBUG_LDADD = libcode.a
fs2_open_@PACKAGE_VERSION@_NOINF_LDADD = libcode.a
##
## End MAIN binary
@@ -826,22 +829,22 @@ wxFRED_SOURCES = \
wxfred2/wxfred_xrc.cpp \
wxfred2/wxfred_xrc.h
wxFRED2_d_SOURCES = \
wxFRED2_@PACKAGE_VERSION@_DEBUG_SOURCES = \
${wxFRED_SOURCES}
wxFRED2_r_SOURCES = \
wxFRED2_@PACKAGE_VERSION@_SOURCES = \
${wxFRED_SOURCES}
wxFRED2_INF_d_SOURCES = \
wxFRED2_@PACKAGE_VERSION@_NOINF_DEBUG_SOURCES = \
${wxFRED_SOURCES}
wxFRED2_INF_r_SOURCES = \
wxFRED2_@PACKAGE_VERSION@_NOINF_SOURCES = \
${wxFRED_SOURCES}
wxFRED2_d_LDADD = libcode.a
wxFRED2_r_LDADD = libcode.a
wxFRED2_INF_d_LDADD = libcode.a
wxFRED2_INF_r_LDADD = libcode.a
wxFRED2_@PACKAGE_VERSION@_DEBUG_LDADD = libcode.a
wxFRED2_@PACKAGE_VERSION@_LDADD = libcode.a
wxFRED2_@PACKAGE_VERSION@_NOINF_DEBUG_LDADD = libcode.a
wxFRED2_@PACKAGE_VERSION@_NOINF_LDADD = libcode.a
##
## End wxFRED2 binary
-20
View File
@@ -347,24 +347,6 @@ void parse_ai_profiles_tbl(char *filename)
if (optional_string("$Turret Max Aim Update Delay:"))
parse_float_list(profile->turret_max_aim_update_delay, NUM_SKILL_LEVELS);
if (optional_string("$Player Autoaim FOV:"))
{
float fov_list[NUM_SKILL_LEVELS];
parse_float_list(fov_list, NUM_SKILL_LEVELS);
for (i = 0; i < NUM_SKILL_LEVELS; i++)
{
//Enforce range
if (fov_list[i] < 0.0f || fov_list[i] >= 360.0f)
{
Warning(LOCATION, "$Player Autoaim FOV should be >= 0 and < 360.0 (read %f). Setting to 0.", fov_list[i]);
fov_list[i] = 0.0f;
}
//Convert units
profile->player_autoaim_fov[i] = fov_list[i] * PI / 180.0f;
}
}
if (optional_string("$Detail Distance Multiplier:"))
parse_float_list(profile->detail_distance_mult, NUM_SKILL_LEVELS);
@@ -480,8 +462,6 @@ void parse_ai_profiles_tbl(char *filename)
Default_ship_select_effect = 0;
}
set_flag(profile, "$no warp camera:", AIPF2_NO_WARP_CAMERA, AIP_FLAG2);
// if we've been through once already and are at the same place, force a move
if ( saved_Mp && (saved_Mp == Mp) )
{
-4
View File
@@ -61,7 +61,6 @@
#define AIPF2_ALLOW_PRIMARY_LINK_DELAY (1 << 7)
#define AIPF2_BEAMS_DAMAGE_WEAPONS (1 << 8)
#define AIPF2_PLAYER_WEAPON_SCALE_FIX (1 << 9)
#define AIPF2_NO_WARP_CAMERA (1 << 10)
// AI Path types
#define AI_PATH_MODE_NORMAL 0
@@ -140,9 +139,6 @@ typedef struct ai_profile_t {
// the chance (x/7) that ship is allowed to fire missiles at player ship.
int chance_to_use_missiles_on_plr[NUM_SKILL_LEVELS];
// Player-specific autoaim FOV override
float player_autoaim_fov[NUM_SKILL_LEVELS];
float detail_distance_mult[MAX_DETAIL_LEVEL + 1]; //MAX_DETAIL_LEVEL really needs to be 4
int ai_path_mode;
+117 -107
View File
@@ -1223,7 +1223,7 @@ objp_orient_copy = objp->orient;
vel_in = vel_in_copy; // HERE //-V587
objp->orient = objp_orient_copy; //-V587
#endif
if (rvec != NULL) {
matrix out_orient, goal_orient;
@@ -1233,7 +1233,7 @@ objp->orient = objp_orient_copy; //-V587
} else {
vm_forward_interpolate(&desired_fvec, &curr_orient, &vel_in, delta_time, delta_bank, &objp->orient, &vel_out, &vel_limit, &acc_limit);
}
#ifndef NDEBUG
if (!((objp->type == OBJ_WEAPON) && (Weapon_info[Weapons[objp->instance].weapon_info_index].subtype == WP_MISSILE))) {
Assertion(!(delta_time < 0.25f && vm_vec_dot(&objp->orient.vec.fvec, &tvec) < 0.1f), "A ship rotated too far. Offending vessel is %s, please investigate.\n", Ships[objp->instance].ship_name);
@@ -2169,9 +2169,9 @@ int find_enemy(int objnum, float range, int max_attackers)
aip->target_signature = -1;
}
}
return get_nearest_objnum(objnum, enemy_team_mask, aip->enemy_wing, range, max_attackers);
} else {
aip->target_objnum = -1;
aip->target_signature = -1;
@@ -3830,7 +3830,7 @@ float ai_path_0()
min_dist_to_goal = MIN_DIST_TO_WAYPOINT_GOAL + Pl_objp->radius;
if ( (vm_vec_dist_quick(&Pl_objp->pos, &gcvp) < min_dist_to_goal) ||
((r >= 0.0f) && (r <= 1.0f)) && (vm_vec_dist_quick(&nearest_point, &gcvp) < (MIN_DIST_TO_WAYPOINT_GOAL + Pl_objp->radius))) {
(((r >= 0.0f) && (r <= 1.0f)) && (vm_vec_dist_quick(&nearest_point, &gcvp) < (MIN_DIST_TO_WAYPOINT_GOAL + Pl_objp->radius)))) {
aip->path_cur += aip->path_dir;
if (((aip->path_cur - aip->path_start) > (num_points+1)) || (aip->path_cur < aip->path_start)) {
Assert(aip->mode != AIM_DOCK); // If docking, should never get this far, getting to last point handled outside ai_path()
@@ -4007,7 +4007,7 @@ float ai_path_1()
}
if ( (vm_vec_dist_quick(&Pl_objp->pos, &gcvp) < min_dist_to_goal) ||
((r >= 0.0f) && (r <= 1.0f)) && (vm_vec_dist_quick(&nearest_point, &gcvp) < (MIN_DIST_TO_WAYPOINT_GOAL + Pl_objp->radius))) {
(((r >= 0.0f) && (r <= 1.0f)) && (vm_vec_dist_quick(&nearest_point, &gcvp) < (MIN_DIST_TO_WAYPOINT_GOAL + Pl_objp->radius)))) {
aip->path_cur += aip->path_dir;
if (((aip->path_cur - aip->path_start) > (num_points+1)) || (aip->path_cur < aip->path_start)) {
Assert(aip->mode != AIM_DOCK); // If docking, should never get this far, getting to last point handled outside ai_path()
@@ -4429,7 +4429,7 @@ void ai_waypoints()
ai_start_waypoints(Pl_objp, aip->wp_list, WPF_REPEAT);
}
}
Assert(!aip->wp_list->get_waypoints().empty()); // What? Is this zero? Probably never got initialized!
bool done, treat_as_ship;
@@ -4784,11 +4784,12 @@ void evade_weapon()
locked_weapon_objp = &Objects[aip->nearest_locked_object];
}
if (aip->danger_weapon_objnum != -1)
if (aip->danger_weapon_objnum != -1) {
if (Objects[aip->danger_weapon_objnum].signature == aip->danger_weapon_signature)
unlocked_weapon_objp = &Objects[aip->danger_weapon_objnum];
else
aip->danger_weapon_objnum = -1; // Signatures don't match, so no longer endangered.
}
if (locked_weapon_objp != NULL) {
if (unlocked_weapon_objp != NULL) {
@@ -7455,9 +7456,9 @@ void update_aspect_lock_information(ai_info *aip, vec3d *vec_to_enemy, float dis
float needed_dot = 0.9f - 0.5f * enemy_radius/(dist_to_enemy + enemy_radius); // Replaced MIN_TRACKABLE_DOT with 0.9f
if (dot_to_enemy > needed_dot &&
(wip->wi_flags & WIF_HOMING_ASPECT ||
wip->wi_flags & WIF_HOMING_JAVELIN &&
(wip->wi_flags & WIF_HOMING_JAVELIN &&
(tshpp == NULL ||
ship_get_closest_subsys_in_sight(tshpp, SUBSYSTEM_ENGINE, &aiobjp->pos)))) {
ship_get_closest_subsys_in_sight(tshpp, SUBSYSTEM_ENGINE, &aiobjp->pos))))) {
aip->aspect_locked_time += flFrametime;
if (aip->aspect_locked_time >= wip->min_lock_time) {
aip->aspect_locked_time = wip->min_lock_time;
@@ -8452,13 +8453,14 @@ void ai_chase()
case SM_AVOID:
if ((dot_to_enemy > -0.2f) && (dist_to_enemy / (dot_to_enemy + 0.3f) < 100.0f)) {
aip->submode_start_time = Missiontime;
} else if (Missiontime - aip->submode_start_time > i2f(1)/2)
} else if (Missiontime - aip->submode_start_time > i2f(1)/2) {
if (might_collide_with_ship(Pl_objp, En_objp, dot_to_enemy, dist_to_enemy, 3.0f)) {
aip->submode_start_time = Missiontime;
} else {
aip->submode = SM_GET_BEHIND;
aip->submode_start_time = Missiontime;
}
}
break;
@@ -9002,7 +9004,6 @@ float dock_orient_and_approach(object *docker_objp, int docker_index, object *do
rdinfo->submodel_r = submodel_radius;
rdinfo->submodel_w = submodel_omega;
float speed_scale = 1.0f;
if (sip0->flags & SIF_SUPPORT) {
speed_scale = 3.0f;
@@ -9117,7 +9118,6 @@ float dock_orient_and_approach(object *docker_objp, int docker_index, object *do
int desired_index;
Assert(aip->path_length >= 2);
desired_index = aip->path_length-2;
fdist = dock_move_towards_point(docker_objp, &docker_objp->pos, &Path_points[aip->path_start + desired_index].pos, speed_scale, 0.0f, rdinfo);
@@ -9682,7 +9682,7 @@ void ai_big_guard()
// how often to choose new desired_z
// 1*(64) sec < 2000, 2*(64) < 2-4000 3*(64) > 4-8000, etc (Missiontime >> 22 is 64 sec intervals)
int time_choose = int(floor(log(length * 0.001f) / log(2.0f)));
float desired_z = min_z + length * static_randf( Pl_objp-Objects ^ (Missiontime >> (22 + time_choose)) );
float desired_z = min_z + length * static_randf( (Pl_objp-Objects) ^ (Missiontime >> (22 + time_choose)) );
// get r from guard_ship
float cur_guard_rad = vm_vec_dist(&Pl_objp->pos, &axis_pt);
@@ -10106,14 +10106,12 @@ void ai_do_objects_repairing_stuff( object *repaired_objp, object *repair_objp,
Int3(); // bogus type of repair info
}
if (repair_objp){
Ai_info[Ships[repair_objp->instance].ai_index].warp_out_timestamp = stamp;
}
// repair_objp might be NULL is we are cleaning up this mode because of the support ship
// getting killed.
if ( repair_objp ) {
Ai_info[Ships[repair_objp->instance].ai_index].warp_out_timestamp = stamp;
aip = &Ai_info[Ships[repair_objp->instance].ai_index];
switch ( how ) {
case REPAIR_INFO_ONWAY:
Assert( repaired_objp != NULL );
@@ -10632,6 +10630,7 @@ void ai_dock()
case AIS_DOCK_4A:
{
if (aigp == NULL) { // Can happen for initially docked ships.
// this now "just sits here" for docked ships
ai_do_default_behavior( &Objects[Ships[aip->shipnum].objnum] ); // do the default behavior
} else {
mission_log_add_entry(LOG_SHIP_DOCKED, shipp->ship_name, goal_shipp->ship_name);
@@ -11002,13 +11001,16 @@ void process_subobjects(int objnum)
// Karajorma - if Player_use_ai is ever fixed to work on multiplayer it should be checked that any player ships
// aren't under AI control here
if ( (!(objp->flags & OF_PLAYER_SHIP) ) && (sip->flags & (SIF_FIGHTER | SIF_BOMBER)) && !(shipp->flags & SF_DYING) ) {
// AL: Only attack forever if not trying to depart to a docking bay. Need to have this in, since
// a ship may get repaired... and it should still try to depart. Since docking bay departures
// are not handled as goals, we don't want to leave the AIM_BAY_DEPART mode.
if ( aip->mode != AIM_BAY_DEPART ) {
ai_attack_object(objp, NULL, NULL); // Regardless of current mode, enter attack mode.
aip->submode = SM_ATTACK_FOREVER; // Never leave attack submode, don't avoid, evade, etc.
aip->submode_start_time = Missiontime;
// Goober5000 - don't do anything if docked
if (!object_is_docked(objp)) {
// AL: Only attack forever if not trying to depart to a docking bay. Need to have this in, since
// a ship may get repaired... and it should still try to depart. Since docking bay departures
// are not handled as goals, we don't want to leave the AIM_BAY_DEPART mode.
if ( aip->mode != AIM_BAY_DEPART ) {
ai_attack_object(objp, NULL, NULL); // Regardless of current mode, enter attack mode.
aip->submode = SM_ATTACK_FOREVER; // Never leave attack submode, don't avoid, evade, etc.
aip->submode_start_time = Missiontime;
}
}
}
}
@@ -11392,10 +11394,7 @@ int formation_is_leader_chaotic(object *objp)
Leader_chaos *= (1.0f - flFrametime*0.2f);
if (Leader_chaos < 0.0f)
Leader_chaos = 0.0f;
else if (Leader_chaos > 1.7f)
Leader_chaos = 1.7f;
CLAMP(Leader_chaos, 0.0f, 1.7f);
Chaos_frame = Framecount;
}
@@ -11782,6 +11781,9 @@ void ai_maybe_launch_cmeasure(object *objp, ai_info *aip)
if (!(sip->flags & (SIF_SMALL_SHIP | SIF_TRANSPORT)))
return;
if (object_is_docked(objp))
return;
if (!shipp->cmeasure_count)
return;
@@ -11931,18 +11933,15 @@ void ai_transfer_shield(object *objp, int quadrant_num)
float transfer_delta;
float max_quadrant_strength;
if(objp->n_shield_segments == 1)
return;
max_quadrant_strength = get_max_shield_quad(objp,quadrant_num);
max_quadrant_strength = get_max_shield_quad(objp);
transfer_amount = 0.0f;
transfer_delta = (SHIELD_BALANCE_RATE/2) * max_quadrant_strength;
if (objp->shield_quadrant[quadrant_num] + (objp->n_shield_segments-1)*transfer_delta > max_quadrant_strength)
transfer_delta = (max_quadrant_strength - objp->shield_quadrant[quadrant_num])/(objp->n_shield_segments-1);
if (objp->shield_quadrant[quadrant_num] + (MAX_SHIELD_SECTIONS-1)*transfer_delta > max_quadrant_strength)
transfer_delta = (max_quadrant_strength - objp->shield_quadrant[quadrant_num])/(MAX_SHIELD_SECTIONS-1);
for (i=0; i<objp->n_shield_segments; i++)
for (i=0; i<MAX_SHIELD_SECTIONS; i++)
if (i != quadrant_num) {
if (objp->shield_quadrant[i] >= transfer_delta) {
objp->shield_quadrant[i] -= transfer_delta;
@@ -11963,25 +11962,21 @@ void ai_balance_shield(object *objp)
float delta;
// if we are already at the max shield strength for all quads then just bail now
if ( (Ships[objp->instance].ship_max_shield_strength == shield_get_strength(objp)) || (Ships[objp->instance].ship_max_shield_strength == 0.0f) )
if ( Ships[objp->instance].ship_max_shield_strength == shield_get_strength(objp) )
return;
if(objp->n_shield_segments == 1)
return;
shield_strength_avg = shield_get_strength(objp)/objp->n_shield_segments;
float shield_multiplier = shield_get_strength(objp) / Ships[objp->instance].ship_max_shield_strength;
shield_strength_avg = shield_get_strength(objp)/MAX_SHIELD_SECTIONS;
delta = SHIELD_BALANCE_RATE * shield_strength_avg;
for (i=0; i<objp->n_shield_segments; i++) {
shield_strength_avg = Ships[objp->instance].ship_max_shield_segment[i] * shield_multiplier;
for (i=0; i<MAX_SHIELD_SECTIONS; i++) {
if (objp->shield_quadrant[i] < shield_strength_avg) {
// only do it the retail way if using smart shields (since that's a bigger thing) - taylor
if (Ai_info[Ships[objp->instance].ai_index].ai_profile_flags & AIPF_SMART_SHIELD_MANAGEMENT)
shield_add_strength(objp, delta);
else
objp->shield_quadrant[i] += delta/objp->n_shield_segments;
objp->shield_quadrant[i] += delta/MAX_SHIELD_SECTIONS;
if (objp->shield_quadrant[i] > shield_strength_avg)
objp->shield_quadrant[i] = shield_strength_avg;
@@ -11991,7 +11986,7 @@ void ai_balance_shield(object *objp)
if (Ai_info[Ships[objp->instance].ai_index].ai_profile_flags & AIPF_SMART_SHIELD_MANAGEMENT)
shield_add_strength(objp, -delta);
else
objp->shield_quadrant[i] -= delta/objp->n_shield_segments;
objp->shield_quadrant[i] -= delta/MAX_SHIELD_SECTIONS;
if (objp->shield_quadrant[i] < shield_strength_avg)
objp->shield_quadrant[i] = shield_strength_avg;
@@ -12029,7 +12024,7 @@ void ai_manage_shield(object *objp, ai_info *aip)
aip->shield_manage_timestamp = timestamp((int) (delay * 1000.0f));
if (sip->flags & SIF_SMALL_SHIP || (aip->ai_profile_flags2 & AIPF2_ALL_SHIPS_MANAGE_SHIELDS)) {
if ((aip->last_hit_time != 0) && (Missiontime - aip->last_hit_time < F1_0*10))
if (Missiontime - aip->last_hit_time < F1_0*10)
ai_transfer_shield(objp, aip->last_hit_quadrant);
else
ai_balance_shield(objp);
@@ -12052,6 +12047,11 @@ void ai_maybe_evade_locked_missile(object *objp, ai_info *aip)
return;
}
// don't evade missiles if you're docked
if (object_is_docked(objp)) {
return;
}
if (aip->ai_flags & (AIF_NO_DYNAMIC | AIF_KAMIKAZE)) { // If not allowed to pursue dynamic objectives, don't evade. Dumb? Maybe change. -- MK, 3/15/98
return;
}
@@ -12150,6 +12150,11 @@ void maybe_evade_dumbfire_weapon(ai_info *aip)
return;
}
// don't evade missiles if you're docked
if (object_is_docked(Pl_objp)) {
return;
}
// Make sure in a mode in which we evade dumbfire weapons.
switch (aip->mode) {
case AIM_CHASE:
@@ -12897,6 +12902,12 @@ int maybe_request_support(object *objp)
if (!is_support_allowed(objp))
return 0;
// Goober5000 - a ship that is currently docked shouldn't request repair.
// This is to prevent support ships being summoned for a ship that is getting
// towed away by other means.
if (object_is_docked(objp))
return 0;
// Compute a desire value.
// Desire of 0 means no reason to request support.
// 1 is slight, 2 more, etc. Maximum is around 20. Anything larger than 3 is pretty strong.
@@ -13071,10 +13082,7 @@ void ai_warp_out(object *objp)
aip->submode_start_time = Missiontime;
break;
case AIS_WARP_2: // Make sure won't collide with any object.
if (timestamp_elapsed(aip->force_warp_time)
|| (!collide_predict_large_ship(objp, objp->radius*2.0f + 100.0f)
|| (Ship_info[shipp->ship_info_index].warpout_type == WT_HYPERSPACE
&& !collide_predict_large_ship(objp, 100000.0f)))) {
if (timestamp_elapsed(aip->force_warp_time) || !collide_predict_large_ship(objp, objp->radius*2.0f + 100.0f)) {
aip->submode = AIS_WARP_3;
aip->submode_start_time = Missiontime;
@@ -13115,12 +13123,9 @@ void ai_warp_out(object *objp)
}
break;
case AIS_WARP_4: {
// Only lets the ship warp after waiting for the warpout engage time
if ( (Missiontime / 100) >= (aip->submode_start_time / 100 + Ship_info[shipp->ship_info_index].warpout_engage_time) ) {
shipfx_warpout_start(objp);
aip->submode = AIS_WARP_5;
aip->submode_start_time = Missiontime;
}
shipfx_warpout_start(objp);
aip->submode = AIS_WARP_5;
aip->submode_start_time = Missiontime;
break;
}
case AIS_WARP_5:
@@ -13182,7 +13187,8 @@ void ai_announce_ship_dying(object *dying_objp)
object *A = &Objects[so->objnum];
Assert(A->type == OBJ_SHIP);
if (Ship_info[Ships[A->instance].ship_info_index].flags & (SIF_SMALL_SHIP | SIF_FREIGHTER | SIF_TRANSPORT)) {
// Goober5000 - the disallow is now handled uniformly in the ai_avoid_shockwave function
/*if (Ship_info[Ships[A->instance].ship_info_index].flags & (SIF_SMALL_SHIP | SIF_FREIGHTER | SIF_TRANSPORT))*/ {
ai_info *aip = &Ai_info[Ships[A->instance].ai_index];
// AL 1-5-98: only avoid shockwave if not docked or repairing
@@ -13381,7 +13387,8 @@ int ai_avoid_shockwave(object *objp, ai_info *aip)
vec3d safe_pos;
// BIG|HUGE do not respond to shockwaves
if (Ship_info[Ships[objp->instance].ship_info_index].flags & (SIF_BIG_SHIP|SIF_HUGE_SHIP)) {
// Goober5000 - let's treat shockwave response the same way whether from weapon or ship
if (!(Ship_info[Ships[objp->instance].ship_info_index].flags & (SIF_AVOID_SHOCKWAVE))) {
// don't come here again
aip->ai_flags &= ~AIF_AVOID_SHOCKWAVE;
return 0;
@@ -14016,7 +14023,7 @@ void init_ai_object(int objnum)
aip->ignore_new_signatures[i] = -1;
}
//Init stuff from AI class and AI profiles
// Init stuff from AI class and AI profiles
init_aip_from_class_and_profile(aip, &Ai_classes[Ship_info[ship_type].ai_class], The_mission.ai_profile);
aip->wp_list = NULL;
@@ -14232,42 +14239,42 @@ void ai_set_default_behavior(object *obj, int classnum)
void ai_do_default_behavior(object *obj)
{
ai_info *aip;
int ship_flags;
Assert(obj != NULL);
Assert(obj->instance != -1);
Assert(Ships[obj->instance].ai_index != -1);
aip = &Ai_info[Ships[obj->instance].ai_index];
ai_info *aip = &Ai_info[Ships[obj->instance].ai_index];
int si_flags = Ship_info[Ships[obj->instance].ship_info_index].flags;
ship_flags = Ship_info[Ships[obj->instance].ship_info_index].flags;
if (!is_instructor(obj) && (ship_flags & (SIF_FIGHTER | SIF_BOMBER)))
{
int enemy_objnum = find_enemy(OBJ_INDEX(obj), 1000.0f, The_mission.ai_profile->max_attackers[Game_skill_level]);
set_target_objnum(aip, enemy_objnum);
aip->mode = AIM_CHASE;
aip->submode = SM_ATTACK;
aip->submode_start_time = Missiontime;
}
else if (ship_flags & (SIF_SUPPORT))
{
aip->mode = AIM_SAFETY;
aip->submode = AISS_1;
aip->submode_start_time = Missiontime;
aip->ai_flags &= ~(AIF_REPAIRING);
}
else if ( ship_flags & SIF_SENTRYGUN )
{
aip->mode = AIM_SENTRYGUN;
}
else
{
aip->mode = AIM_NONE;
}
// default behavior in most cases (especially if we're docked) is to just stay put
aip->mode = AIM_NONE;
aip->submode_start_time = Missiontime;
aip->active_goal = AI_GOAL_NONE;
// if we're not docked, we may modify the behavior a bit
if (!object_is_docked(obj))
{
// fighters automatically chase things
if (!is_instructor(obj) && (si_flags & (SIF_FIGHTER | SIF_BOMBER)))
{
int enemy_objnum = find_enemy(OBJ_INDEX(obj), 1000.0f, The_mission.ai_profile->max_attackers[Game_skill_level]);
set_target_objnum(aip, enemy_objnum);
aip->mode = AIM_CHASE;
aip->submode = SM_ATTACK;
}
// support ships automatically keep a safe distance
else if (si_flags & SIF_SUPPORT)
{
aip->mode = AIM_SAFETY;
aip->submode = AISS_1;
aip->ai_flags &= ~(AIF_REPAIRING);
}
// sentry guns... do their thing
else if (si_flags & SIF_SENTRYGUN)
{
aip->mode = AIM_SENTRYGUN;
}
}
}
#define FRIENDLY_DAMAGE_THRESHOLD 50.0f // Display a message at this threshold. Note, this gets scaled by Skill_level
@@ -14663,23 +14670,24 @@ void ai_ship_hit(object *objp_ship, object *hit_objp, vec3d *hitpos, int shield_
// Hit by a protected ship, don't attack it.
if (objp_hitter->flags & OF_PROTECTED) {
if ((Ship_info[shipp->ship_info_index].flags & (SIF_FIGHTER | SIF_BOMBER)) && (aip->target_objnum == -1)) {
if (aip->mode == AIM_CHASE) {
if (aip->submode != SM_EVADE_WEAPON) {
aip->mode = AIM_CHASE;
aip->submode = SM_EVADE_WEAPON;
if (!object_is_docked(objp_ship)) {
if ((Ship_info[shipp->ship_info_index].flags & (SIF_FIGHTER | SIF_BOMBER)) && (aip->target_objnum == -1)) {
if (aip->mode == AIM_CHASE) {
if (aip->submode != SM_EVADE_WEAPON) {
aip->mode = AIM_CHASE;
aip->submode = SM_EVADE_WEAPON;
aip->submode_start_time = Missiontime;
}
} else if (aip->mode != AIM_EVADE_WEAPON) {
aip->active_goal = AI_ACTIVE_GOAL_DYNAMIC;
aip->previous_mode = aip->mode;
aip->previous_submode = aip->submode;
aip->mode = AIM_EVADE_WEAPON;
aip->submode = -1;
aip->submode_start_time = Missiontime;
aip->mode_time = timestamp(MAX_EVADE_TIME); // Evade for up to five seconds.
}
} else if (aip->mode != AIM_EVADE_WEAPON) {
aip->active_goal = AI_ACTIVE_GOAL_DYNAMIC;
aip->previous_mode = aip->mode;
aip->previous_submode = aip->submode;
aip->mode = AIM_EVADE_WEAPON;
aip->submode = -1;
aip->submode_start_time = Missiontime;
aip->mode_time = timestamp(MAX_EVADE_TIME); // Evade for up to five seconds.
}
}
return;
}
@@ -14758,10 +14766,12 @@ void ai_ship_hit(object *objp_ship, object *hit_objp, vec3d *hitpos, int shield_
// If the hitter object is the ignore object, don't attack it.
ship_info *sip = &Ship_info[shipp->ship_info_index];
if ((is_ignore_object(aip, objp_hitter-Objects)) && (sip->flags & (SIF_BOMBER | SIF_FIGHTER))) {
if (aip->mode == AIM_NONE) {
aip->mode = AIM_CHASE; // This will cause the ship to move, if not attack.
aip->submode = SM_EVADE;
aip->submode_start_time = Missiontime;
if (!object_is_docked(objp_ship)) {
if (aip->mode == AIM_NONE) {
aip->mode = AIM_CHASE; // This will cause the ship to move, if not attack.
aip->submode = SM_EVADE;
aip->submode_start_time = Missiontime;
}
}
return;
}
@@ -15188,7 +15198,7 @@ int ai_return_path_num_from_dockbay(object *dockee_objp, int dockbay_index)
Assert(pm->n_docks > dockbay_index);
Assert(pm->docking_bays[dockbay_index].num_spline_paths > 0);
Assert(pm->docking_bays[dockbay_index].splines != NULL);
if(pm->n_docks <= dockbay_index){
return -1;
}
+22 -41
View File
@@ -131,18 +131,9 @@ char *Ai_goal_text(int goal)
}
// function to maybe add the form on my wing goal for a player's starting wing. Called when a player wing arrives.
// Goober5000 - made more generic
void ai_maybe_add_form_goal( wing *wingp )
{
int j;
char *wing_leader;
// if the wing leader isn't available (ie, dead/departed) then go ahead and bail now
if (wingp->ship_index[wingp->special_ship] < 0)
return;
// Goober5000 - the wing leader is now not necessarily the player
wing_leader = Ships[wingp->ship_index[wingp->special_ship]].ship_name;
// iterate through the ship_index list of this wing and check for orders. We will do
// this for all ships in the wing instead of on a wing only basis in case some ships
@@ -152,20 +143,15 @@ void ai_maybe_add_form_goal( wing *wingp )
Assert( wingp->ship_index[j] != -1 ); // get Allender
// don't process wing leader
if (j == wingp->special_ship)
continue;
aip = &Ai_info[Ships[wingp->ship_index[j]].ai_index];
// don't process Player_ship
if ( aip == Player_ai )
continue;
// it is sufficient enough to check the first goal entry to see if it has a valid goal
if ( aip->goals[0].ai_mode == AI_GOAL_NONE ) {
// need to add a form on my wing goal here
ai_add_ship_goal_player( AIG_TYPE_PLAYER_SHIP, AI_GOAL_FORM_ON_WING, -1, wing_leader, aip );
// need to add a form on my wing goal here. Ships are always forming on the player's wing.
ai_add_ship_goal_player( AIG_TYPE_PLAYER_SHIP, AI_GOAL_FORM_ON_WING, -1, Player_ship->ship_name, aip );
}
}
}
@@ -173,38 +159,28 @@ void ai_maybe_add_form_goal( wing *wingp )
void ai_post_process_mission()
{
object *objp;
/*
// Goober5000 - considering that this is also done in parse_wing_create_ships,
// it's redundant (and possibly premature for some wings) here
int i;
// Check ships in player starting wings. Those ships should follow these rules:
// (1) if they have no orders, they should get a form on my wing order
// (2) if they have an order, they are free to act on it.
//
// So basically, we are checking for (1)
if ( !Fred_running )
{
int i;
if ( !Fred_running ) {
// MK, 5/9/98: Used to iterate through MAX_STARTING_WINGS, but this was too many ships forming on player.
// Goober5000 - MK originally iterated on only the first wing; now we iterate on only the player wing
// because the player wing may not be first
for ( i = 0; i < MAX_STARTING_WINGS; i++ ) {
if ( Starting_wings[i] == Player_ship->wingnum ) {
wing *wingp;
// Goober5000 - make all wings form on their respective leaders
for ( i = 0; i < Num_wings; i++ )
{
ai_maybe_add_form_goal( &Wings[i] );
wingp = &Wings[Starting_wings[i]];
ai_maybe_add_form_goal( wingp );
}
}
// for ( i = 0; i < 1; i++ ) { // MK, 5/9/98: Used to iterate through MAX_STARTING_WINGS, but this was too many ships forming on player.
// if ( Starting_wings[i] != -1 ) {
// wing *wingp;
//
// wingp = &Wings[Starting_wings[i]];
//
// ai_maybe_add_form_goal( wingp );
//
// }
// }
}
*/
// for every valid ship object, call process_mission_orders to be sure that ships start the
// mission following the orders in the mission file right away instead of waiting N seconds
@@ -1470,8 +1446,13 @@ int ai_mission_goal_achievable( int objnum, ai_goal *aigp )
// for this goal to be valid).
Assert ( aigp->ai_submode >= 0 );
ssp = ship_get_indexed_subsys( &Ships[sindex], aigp->ai_submode );
status = mission_log_get_time( LOG_SHIP_SUBSYS_DESTROYED, aigp->target_name, ssp->system_info->subobj_name, NULL );
if (ssp != NULL) {
status = mission_log_get_time( LOG_SHIP_SUBSYS_DESTROYED, aigp->target_name, ssp->system_info->subobj_name, NULL );
} else {
// not supposed to ever happen, but could if there is a mismatch between the table and model subsystems
nprintf(("AI", "Couldn't find subsystem %d for ship %s\n", aigp->ai_submode, Ships[sindex].ship_name));
status = 0;
}
break;
}
+2 -7
View File
@@ -21,7 +21,6 @@
#include "ai/aiinternal.h" //Included last, so less includes are needed
#include "iff_defs/iff_defs.h"
#include "weapon/muzzleflash.h"
#include "parse/scripting.h"
#include <limits.h>
@@ -1718,12 +1717,6 @@ bool turret_fire_weapon(int weapon_num, ship_subsys *turret, int parent_objnum,
objp=&Objects[weapon_objnum];
wp=&Weapons[objp->instance];
parent_ship->last_fired_turret = turret;
turret->last_fired_weapon_info_index = wp->weapon_info_index;
Script_system.SetHookObjects(3, "Ship", &Objects[parent_objnum], "Weapon", objp, "Target", &Objects[turret->turret_enemy_objnum]);
Script_system.RunCondition(CHA_ONTURRETFIRED, 0, NULL, &Objects[parent_objnum]);
//nprintf(("AI", "Turret_time_enemy_in_range = %7.3f\n", ss->turret_time_enemy_in_range));
if (weapon_objnum != -1) {
wp->target_num = turret->turret_enemy_objnum;
@@ -2160,11 +2153,13 @@ void ai_fire_from_turret(ship *shipp, ship_subsys *ss, int parent_objnum)
if (objnum >= 0 && is_target_beam_valid(&ss->weapons, &Objects[objnum])) {
if (ss->turret_enemy_objnum == -1) {
ss->turret_enemy_objnum = objnum;
ss->targeted_subsys = NULL; // Turret has retargeted; reset subsystem - Valathil for Mantis #2652
ss->turret_enemy_sig = Objects[objnum].signature;
// why return?
return;
} else {
ss->turret_enemy_objnum = objnum;
ss->targeted_subsys = NULL; // Turret has retargeted; reset subsystem - Valathil for Mantis #2652
ss->turret_enemy_sig = Objects[objnum].signature;
}
} else {
+2 -2
View File
@@ -472,7 +472,7 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
if ( instance->last_bitmap != -1 ){
bm_release(instance->last_bitmap);
}
bitmap_id = bm_create(16, instance->parent->width, instance->parent->height, instance->frame, bitmap_flags);
bitmap_id = bm_create(bpp, instance->parent->width, instance->parent->height, instance->frame, bitmap_flags);
}
if ( bitmap_id == -1 ) {
@@ -1000,7 +1000,7 @@ void anim_display_info(char *real_filename)
printf("FPS: %d\n", A.fps);
#ifndef NDEBUG
printf("Transparent RGB: (%d,%d,%d)\n", A.xparent_r, A.xparent_g, A.xparent_b);
printf("Transparent RGB: (%u,%u,%u)\n", A.xparent_r, A.xparent_g, A.xparent_b);
#endif
printf("ac version: %d\n", A.version);
+14 -123
View File
@@ -39,8 +39,7 @@
#include "network/multimsgs.h"
#include "network/multi.h"
#include "parse/scripting.h"
#include <algorithm>
#include "globalincs/compatibility.h"
#define ASTEROID_OBJ_USED (1<<0) // flag used in asteroid_obj struct
#define MAX_ASTEROID_OBJS MAX_ASTEROIDS // max number of asteroids tracked in asteroid list
@@ -1192,20 +1191,15 @@ void asc_get_relvec(vec3d *relvec, object *other_obj, vec3d *hitpos)
float asteroid_get_fireball_scale_multiplier(int num)
{
if (Asteroids[num].flags & AF_USED) {
asteroid_info *asip = &Asteroid_info[Asteroids[num].asteroid_type];
if (asip->fireball_radius_multiplier >= 0) {
return asip->fireball_radius_multiplier;
} else {
switch(Asteroids[num].asteroid_type) {
case ASTEROID_TYPE_LARGE:
return 1.5f;
break;
default:
return 1.0f;
break;
}
switch(Asteroids[num].asteroid_type) {
case ASTEROID_TYPE_LARGE:
return 1.5f;
break;
default:
return 1.0f;
break;
}
}
@@ -1222,22 +1216,10 @@ float asteroid_create_explosion(object *objp)
{
int fireball_objnum;
float explosion_life, fireball_scale_multiplier;
asteroid_info *asip = &Asteroid_info[Asteroids[objp->instance].asteroid_type];
int fireball_type = fireball_asteroid_explosion_type(asip);
if (fireball_type < 0) {
fireball_type = FIREBALL_ASTEROID;
}
if (fireball_type >= Num_fireball_types) {
Warning(LOCATION, "Invalid fireball type %i specified for an asteroid, only %i fireball types are defined.", fireball_type, Num_fireball_types);
return 0;
}
fireball_scale_multiplier = asteroid_get_fireball_scale_multiplier(objp->instance);
fireball_objnum = fireball_create( &objp->pos, fireball_type, FIREBALL_LARGE_EXPLOSION, 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 {
@@ -1451,10 +1433,8 @@ int asteroid_count()
void asteroid_maybe_break_up(object *asteroid_obj)
{
asteroid *asp;
asteroid_info *asip;
asp = &Asteroids[asteroid_obj->instance];
asip = &Asteroid_info[asp->asteroid_type];
if ( timestamp_elapsed(asp->final_death_time) ) {
vec3d relvec, vfh, tvec;
@@ -1466,9 +1446,10 @@ void asteroid_maybe_break_up(object *asteroid_obj)
// 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 the second condition isn't true it's just debris, and debris doesn't break up
if ( !MULTIPLAYER_CLIENT && (asp->asteroid_type <= ASTEROID_TYPE_LARGE)) {
if (asip->split_info.empty()) {
if ( !MULTIPLAYER_CLIENT ) {
// if this isn't true it's just debris, and debris doesn't break up
if (asp->asteroid_type <= ASTEROID_TYPE_LARGE)
{
switch (asp->asteroid_type) {
case ASTEROID_TYPE_SMALL:
break;
@@ -1502,61 +1483,6 @@ void asteroid_maybe_break_up(object *asteroid_obj)
default: // this isn't going to happen.. really
break;
}
} else {
SCP_vector<int> roids_to_create;
SCP_vector<asteroid_split_info>::iterator split;
for (split = asip->split_info.begin(); split != asip->split_info.end(); ++split) {
int num_roids = split->min;
int num_roids_var = split->max - split->min;
if (num_roids_var > 0)
num_roids += rand() % num_roids_var;
if (num_roids > 0)
for (int i=0; i<num_roids; i++)
roids_to_create.push_back(split->asteroid_type);
}
random_shuffle(roids_to_create.begin(), roids_to_create.end());
int total_roids = roids_to_create.size();
for (int i = 0; i < total_roids; i++) {
vec3d dir_vec,final_vec;
vec3d parent_vel,hit_rel_vec;
// The roid directions are picked from the so-called
// "golden section spiral" to prevent them from
// clustering and thus clipping
float inc = PI * (3.0f - sqrt(5.0f));
float offset = 2.0f / total_roids;
float y = i * offset - 1 + (offset / 2);
float r = sqrt(1.0f - y*y);
float phi = i * inc;
dir_vec.xyz.x = cos(phi)*r;
dir_vec.xyz.y = sin(phi)*r;
dir_vec.xyz.z = y;
// Randomize the direction a bit
vec3d tempv = dir_vec;
vm_vec_random_cone(&dir_vec, &tempv, (360.0f / total_roids / 2));
// Make the roid inherit half of the parent's velocity
vm_vec_copy_normalize(&parent_vel, &asteroid_obj->phys_info.vel);
vm_vec_scale(&parent_vel, 0.5f);
// Make the hit position affect the direction, but only a little
vm_vec_sub(&hit_rel_vec, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_normalize(&hit_rel_vec);
vm_vec_scale(&hit_rel_vec, 0.25f);
vm_vec_avg3(&final_vec, &parent_vel, &hit_rel_vec, &dir_vec);
vm_vec_normalize(&final_vec);
asteroid_sub_create(asteroid_obj, roids_to_create[i], &final_vec);
}
}
}
asp->final_death_time = timestamp(-1);
@@ -1811,16 +1737,6 @@ void asteroid_parse_section(asteroid_info *asip)
asip->damage_type_idx_sav = damage_type_add(buf);
asip->damage_type_idx = asip->damage_type_idx_sav;
}
if(optional_string("$Explosion Animations:")){
int temp[MAX_FIREBALL_TYPES];
int parsed_ints = stuff_int_list(temp, MAX_FIREBALL_TYPES, RAW_INTEGER_TYPE);
asip->explosion_bitmap_anims.clear();
asip->explosion_bitmap_anims.insert(asip->explosion_bitmap_anims.begin(), temp, temp+parsed_ints);
}
if(optional_string("$Explosion Radius Mult:"))
stuff_float(&asip->fireball_radius_multiplier);
required_string("$Expl inner rad:");
stuff_float(&asip->inner_rad);
@@ -1836,31 +1752,6 @@ void asteroid_parse_section(asteroid_info *asip)
required_string("$Hitpoints:");
stuff_float(&asip->initial_asteroid_strength);
while(optional_string("$Split:")) {
int split_type;
stuff_int(&split_type);
if (split_type>=0 && split_type<NUM_DEBRIS_SIZES) {
asteroid_split_info new_split;
new_split.asteroid_type = split_type;
if(optional_string("+Min:"))
stuff_int(&new_split.min);
else
new_split.min = 0;
if(optional_string("+Max:"))
stuff_int(&new_split.max);
else
new_split.max = 0;
asip->split_info.push_back( new_split );
} else
Warning(LOCATION, "Invalid asteroid reference %i used for $Split in asteroids table, ignoring.", split_type);
}
}
/**
+28 -40
View File
@@ -22,8 +22,8 @@ struct collision_info_struct;
#define MAX_ASTEROIDS 512
#define NUM_DEBRIS_SIZES 3
#define NUM_DEBRIS_POFS 3 // Number of POFs per debris size
#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
@@ -44,39 +44,27 @@ typedef struct asteroid_obj {
extern asteroid_obj Asteroid_obj_list;
// Data structure for determining a type and amount of other asteroids an
// asteroid will split to when destroyed.
typedef struct asteroid_split_info {
int asteroid_type;
int min;
int max;
} asteroid_split_info;
typedef struct asteroid_info {
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
int damage_type_idx_sav; // stored value from table used to reset damage_type_idx
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
SCP_vector< asteroid_split_info > split_info;
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
int damage_type_idx_sav; // stored value from table used to reset damage_type_idx
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[NUM_DEBRIS_POFS];
int model_num[NUM_DEBRIS_POFS];
SCP_vector<int> explosion_bitmap_anims;
float fireball_radius_multiplier; // the model radius is multiplied by this to determine the fireball size
asteroid_info( )
: num_detail_levels( 0 ), max_speed( 0 ), damage_type_idx( 0 ),
damage_type_idx_sav( -1 ), inner_rad( 0 ), outer_rad( 0 ),
damage( 0 ), blast( 0 ), initial_asteroid_strength( 0 ),
fireball_radius_multiplier( -1 )
{
damage( 0 ), blast( 0 ), initial_asteroid_strength( 0 )
{
name[ 0 ] = NULL;
memset( pof_files, 0, sizeof( pof_files ) );
memset( detail_distance, 0, sizeof( detail_distance ) );
@@ -86,20 +74,20 @@ typedef struct asteroid_info {
} asteroid_info;
#define AF_USED (1<<0) // Set means used.
#define AF_USED (1<<0) // Set means used.
typedef struct asteroid {
int flags;
int objnum;
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_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
int final_death_time; // timestamp to swap in new models after explosion starts
int collide_objnum; // set to objnum that asteroid will be impacting soon
int collide_objsig; // object signature corresponding to collide_objnum
vec3d death_hit_pos; // hit pos that caused death
int target_objnum; // Yes, hah! Asteroids can have targets. See asteroid_aim_at_target().
vec3d death_hit_pos; // hit pos that caused death
int target_objnum; // Yes, hah! Asteroids can have targets. See asteroid_aim_at_target().
} asteroid;
@@ -116,15 +104,15 @@ typedef enum {
} field_type_t;
typedef struct asteroid_field {
vec3d min_bound; // Minimum range of field.
vec3d max_bound; // Maximum range of field.
vec3d min_bound; // Minimum range of field.
vec3d max_bound; // Maximum range of field.
int has_inner_bound;
vec3d inner_min_bound;
vec3d inner_max_bound;
vec3d vel; // Average asteroid moves at this velocity.
float speed; // Average speed of field
int num_initial_asteroids; // Number of asteroids at creation.
field_type_t field_type; // active throws and wraps, passive does not
vec3d vel; // Average asteroid moves at this velocity.
float speed; // Average speed of field
int num_initial_asteroids; // Number of asteroids at creation.
field_type_t field_type; // active throws and wraps, passive does not
debris_genre_t debris_genre; // type of debris (ship or asteroid) [generic type]
int field_debris_type[MAX_ACTIVE_DEBRIS_TYPES]; // one of the debris type defines above
} asteroid_field;
@@ -136,7 +124,7 @@ extern asteroid_field Asteroid_field;
extern int Num_asteroids;
extern int Asteroids_enabled;
void asteroid_init();
void asteroid_init();
void asteroid_level_init();
void asteroid_level_close();
void asteroid_create_all();
+2 -2
View File
@@ -54,7 +54,7 @@ int camMovingTime;
//float CameraSpeed;
bool CinematicStarted, CameraMoving;
vec3d cameraPos, cameraTarget;
SCP_map<int,int> autopilot_wings;
std::map<int,int> autopilot_wings;
int AutopilotMinEnemyDistance;
int AutopilotMinAsteroidDistance;
@@ -1255,7 +1255,7 @@ void NavSystem_Init()
void parse_autopilot_table(char *filename)
{
int rval;
SCP_vector<SCP_string> lines;
SCP_vector<std::string> lines;
// open localization
lcl_ext_open();
+1 -1
View File
@@ -59,7 +59,7 @@ extern int CurrentNav;
extern NavPoint Navs[MAX_NAVPOINTS];
extern NavMessage NavMsgs[NP_NUM_MESSAGES];
extern int LockAPConv;
extern SCP_map<int,int> autopilot_wings;
extern std::map<int,int> autopilot_wings;
// Cycles through the NavPoint List
bool Sel_NextNav();
+40 -15
View File
@@ -604,14 +604,6 @@ Done:
return handle;
}
/**
* Same as bm_load above, just with an SCP_string
*/
int bm_load(const SCP_string& filename)
{
return bm_load(const_cast<char*> (filename.c_str()));
}
/**
* Special load function. Basically allows you to load a bitmap which already exists (by filename).
*
@@ -634,6 +626,37 @@ int bm_load_duplicate(char *filename)
return ret;
}
/**
* This function is used to reload a different bitmap into an existing slot.
* This should only be used if you are certain the new picture has the same type, dimensions etc.
*
* @return negative if the given handle doesn't exist, the filename was empty or the slot is still locked
* @return the bitmap_handle on success
*/
int bm_reload(int bitmap_handle, char* filename)
{
if ( !bm_inited )
bm_init();
// if no file was passed then get out now
if ( (filename == NULL) || (strlen(filename) <= 0) )
return -1;
int bitmapnum = bitmap_handle % MAX_BITMAPS;
if ( bm_bitmaps[bitmapnum].type == BM_TYPE_NONE )
return -1;
if ( bm_bitmaps[bitmapnum].ref_count )
{
nprintf(("BmpMan", "Trying to reload a bitmap that is still locked. Filename: %s, ref_count: %d", bm_bitmaps[bitmapnum].filename, bm_bitmaps[bitmapnum].ref_count));
return -1;
}
strncpy(bm_bitmaps[bitmapnum].filename, filename, MAX_FILENAME_LEN);
return bitmap_handle;
}
DCF(bm_frag,"Shows BmpMan fragmentation")
{
if ( Dc_command ) {
@@ -1616,7 +1639,7 @@ MONITOR( SizeBitmapPage )
*
* Only lock a bitmap when you need it! This will convert it into the appropriate format also.
*/
bitmap * bm_lock( int handle, ubyte bpp, ubyte flags )
bitmap * bm_lock( int handle, ubyte bpp, ubyte flags, bool nodebug)
{
bitmap *bmp;
bitmap_entry *be;
@@ -1676,7 +1699,7 @@ bitmap * bm_lock( int handle, ubyte bpp, ubyte flags )
#endif
// read the file data
if ( gr_bm_lock( be->filename, handle, bitmapnum, bpp, flags ) == -1 ) {
if ( gr_bm_lock( be->filename, handle, bitmapnum, bpp, flags, nodebug ) == -1 ) {
// oops, this isn't good - reset and return NULL
bm_unlock( bitmapnum );
bm_unload( bitmapnum );
@@ -1890,7 +1913,7 @@ int bm_release(int handle, int clear_render_targets)
*
* @return 1 on successful release, 0 otherwise
*/
int bm_unload( int handle, int clear_render_targets )
int bm_unload( int handle, int clear_render_targets, bool nodebug )
{
bitmap_entry *be;
bitmap *bmp;
@@ -1912,7 +1935,7 @@ int bm_unload( int handle, int clear_render_targets )
Assert( be->handle == handle ); // INVALID BITMAP HANDLE!
// If it is locked, cannot free it.
if (be->ref_count != 0) {
if (be->ref_count != 0 && !nodebug) {
nprintf(("BmpMan", "Tried to unload %s that has a lock count of %d.. not unloading\n", be->filename, be->ref_count));
return 0;
}
@@ -1924,7 +1947,7 @@ int bm_unload( int handle, int clear_render_targets )
if ( be->load_count > 0 )
be->load_count--;
if ( be->load_count != 0 ) {
if ( be->load_count != 0 && !nodebug) {
nprintf(("BmpMan", "Tried to unload %s that has a load count of %d.. not unloading\n", be->filename, be->load_count + 1));
return 0;
}
@@ -1940,11 +1963,13 @@ int bm_unload( int handle, int clear_render_targets )
return 1;
for (i = 0; i < bm_bitmaps[first].info.ani.num_frames; i++) {
nprintf(("BmpMan", "Unloading %s frame %d. %dx%dx%d\n", be->filename, i, bmp->w, bmp->h, bmp->bpp));
if(!nodebug)
nprintf(("BmpMan", "Unloading %s frame %d. %dx%dx%d\n", be->filename, i, bmp->w, bmp->h, bmp->bpp));
bm_free_data(first+i); // clears flags, bbp, data, etc
}
} else {
nprintf(("BmpMan", "Unloading %s. %dx%dx%d\n", be->filename, bmp->w, bmp->h, bmp->bpp));
if(!nodebug)
nprintf(("BmpMan", "Unloading %s. %dx%dx%d\n", be->filename, bmp->w, bmp->h, bmp->bpp));
bm_free_data(n); // clears flags, bbp, data, etc
}
+6 -3
View File
@@ -89,7 +89,6 @@ extern int bm_texture_ram;
// the bitmap. On success, it returns the bitmap
// number.
int bm_load(char * filename);
int bm_load(const SCP_string& filename);
// special load function. basically allows you to load a bitmap which already exists (by filename).
// this is useful because in some cases we need to have a bitmap which is locked in screen format
@@ -109,7 +108,7 @@ 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, int clear_render_targets = 0 );
int bm_unload( int n, int clear_render_targets = 0, bool nodebug = false);
// 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
@@ -133,7 +132,7 @@ extern int bm_load_either(char *filename, int *nframes = NULL, int *fps = NULL,
// that can be accessed until you call bm_unlock. Only lock
// a bitmap when you need it! This will convert it into the
// appropriate format also.
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags );
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags, bool nodebug = false);
// The signature is a field that gets filled in with
// a unique signature for each bitmap. The signature for each bitmap
@@ -172,6 +171,9 @@ void bm_gfx_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *
// nnew = number of bytes of bitmaps locked this frame that weren't locked last frame
void bm_get_frame_usage(int *ntotal, int *nnew);
// Reload a different image into an existing bmpman slot
int bm_reload(int bitmap_handle, char* filename);
/*
* Example on using bm_create
*
@@ -280,4 +282,5 @@ 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);
int bm_load_and_parse_eff(char *filename, int dir_type, int *nframes, int *nfps, int *key, ubyte *type);
#endif
+2 -2
View File
@@ -522,7 +522,7 @@ subtitle::subtitle(int in_x_pos, int in_y_pos, char* in_text, char* in_imageanim
int split_width = (in_width > 0) ? in_width : 200;
num_text_lines = split_str(in_text, split_width, text_line_lens, text_line_ptrs, MAX_SUBTITLE_LINES);
SCP_string temp_str;
std::string temp_str;
for(int i = 0; i < num_text_lines; i++)
{
temp_str.assign(text_line_ptrs[i], text_line_lens[i]);
@@ -669,7 +669,7 @@ void subtitle::do_frame(float frametime)
int y = text_pos.y;
for(SCP_vector<SCP_string>::iterator line = text_lines.begin(); line != text_lines.end(); ++line)
for(SCP_vector<std::string>::iterator line = text_lines.begin(); line != text_lines.end(); ++line)
{
gr_string(x, y, (char*)line->c_str(), false);
y += font_height;
+1 -1
View File
@@ -116,7 +116,7 @@ class subtitle
private:
void clone(const subtitle &sub);
SCP_vector<SCP_string> text_lines;
SCP_vector<std::string> text_lines;
struct { int x; int y; } text_pos;
float display_time;
+2 -2
View File
@@ -358,7 +358,7 @@ namespace cfile
{
}
cfile_error(const std::string &excuse) : m_excuse(excuse)
cfile_error(const std::string &excuse) : m_excuse(excuse)
{
}
@@ -378,7 +378,7 @@ namespace cfile
class max_read_length : public cfile_error
{
public:
max_read_length(const std::string &excuse) : cfile_error(excuse)
max_read_length(const std::string &excuse) : cfile_error(excuse)
{
}
+1 -1
View File
@@ -97,7 +97,7 @@ typedef struct vp_fileinfo {
~vp_fileinfo() {}
} vp_fileinfo;
SCP_vector<vp_fileinfo> VP_FileInfo;
std::vector<vp_fileinfo> VP_FileInfo;
// just like strlwr() but without actually including it here
void lowercase(char *s)
+13 -17
View File
@@ -116,6 +116,7 @@ Flag exe_params[] =
{ "-spec", "Enable specular", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-spec", },
{ "-glow", "Enable glow maps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-glow", },
{ "-env", "Enable environment maps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-env", },
{ "-mipmap", "Enable mipmapping", true, 0, EASY_DEFAULT_MEM, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-mipmap", },
{ "-nomotiondebris", "Disable motion debris", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-nomotiondebris",},
{ "-noscalevid", "Disable scale-to-window for movies", true, 0, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-noscalevid", },
{ "-missile_lighting", "Apply lighting to missiles" , true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-missile_lighting", },
@@ -124,7 +125,6 @@ Flag exe_params[] =
{ "-post_process", "Enable post processing", true, 0, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-post_process" },
{ "-soft_particles", "Enable soft particles", true, 0, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-soft_particles" },
{ "-fxaa", "Enable FXAA anti-aliasing", true, 0, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-fxaa" },
{ "-flightshaftsoff", "Force Lightshafts off", true, 0, EASY_DEFAULT, "Graphics", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-flightshaftsoff"},
{ "-img2dds", "Compress non-compressed images", true, 0, EASY_DEFAULT, "Game Speed", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-img2dds", },
{ "-no_vsync", "Disable vertical sync", true, 0, EASY_DEFAULT, "Game Speed", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-no_vsync", },
@@ -167,7 +167,6 @@ Flag exe_params[] =
{ "-ati_swap", "Fix colour issues on some ATI cards", true, 0, EASY_DEFAULT, "Troubleshoot", "http://scp.indiegames.us/mantis/view.php?id=1669", },
{ "-no_3d_sound", "Use only 2D/stereo for sound effects", true, 0, EASY_DEFAULT, "Troubleshoot", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-no_3d_sound", },
{ "-disable_glsl_model","Don't use shaders for model rendering", true, 0, EASY_DEFAULT, "Troubleshoot", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-disable_glsl_model", },
{ "-mipmap", "Enable mipmapping", true, 0, EASY_DEFAULT_MEM, "Troubleshoot", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-mipmap", },
#ifndef SCP_UNIX
{ "-disable_di_mouse", "Don't use DirectInput for mouse control", true, 0, EASY_DEFAULT, "Troubleshoot", "", },
#endif
@@ -199,7 +198,6 @@ Flag exe_params[] =
#ifdef SCP_UNIX
{ "-nograb", "Don't grab mouse/keyboard in a window", true, 0, EASY_DEFAULT, "Dev Tool", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-nograb", },
#endif
{ "-reparse_mainhall", "Reparse mainhall.tbl when loading halls", false, 0, EASY_DEFAULT, "Dev Tool", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-reparse_mainhall", },
};
// here are the command line parameters that we will be using for FreeSpace
@@ -258,6 +256,7 @@ cmdline_parm spec_point_arg("-spec_point", NULL);
cmdline_parm spec_tube_arg("-spec_tube", NULL);
cmdline_parm ambient_factor_arg("-ambient_factor", NULL); // Cmdline_ambient_factor
cmdline_parm env("-env", NULL); // Cmdline_env
cmdline_parm mipmap_arg("-mipmap", NULL); // Cmdline_mipmap
cmdline_parm missile_lighting_arg("-missile_lighting", NULL); // Cmdline_missile_lighting
cmdline_parm glow_arg("-glow", NULL); // Cmdline_glow -- use Bobs glow code
cmdline_parm nomotiondebris_arg("-nomotiondebris", NULL); // Cmdline_nomotiondebris -- Removes those ugly floating rocks -C
@@ -273,7 +272,6 @@ cmdline_parm bloom_intensity_arg("-bloom_intensity", NULL);
cmdline_parm fxaa_arg("-fxaa", NULL);
cmdline_parm fxaa_preset_arg("-fxaa_preset", NULL);
cmdline_parm fb_explosions_arg("-fb_explosions", NULL);
cmdline_parm flightshaftsoff_arg("-flightshaftsoff", NULL);
float Cmdline_clip_dist = Default_min_draw_distance;
float Cmdline_fov = 0.75f;
@@ -297,7 +295,6 @@ bool Cmdline_fxaa = false;
int Cmdline_fxaa_preset = 6;
extern int Fxaa_preset_last_frame;
bool Cmdline_fb_explosions = 0;
extern bool ls_force_off;
// Game Speed related
cmdline_parm cache_bitmaps_arg("-cache_bitmaps", NULL); // Cmdline_cache_bitmaps
@@ -374,7 +371,6 @@ cmdline_parm no_set_gamma_arg("-no_set_gamma", NULL); // Cmdline_no_set_gamma
cmdline_parm no_vbo_arg("-novbo", NULL); // Cmdline_novbo
cmdline_parm no_fbo_arg("-disable_fbo", NULL); // Cmdline_no_fbo
cmdline_parm noglsl_arg("-no_glsl", NULL); // Cmdline_noglsl -- disable GLSL support in OpenGL
cmdline_parm mipmap_arg("-mipmap", NULL); // Cmdline_mipmap
cmdline_parm atiswap_arg("-ati_swap", NULL); // Cmdline_atiswap - Fix ATI color swap issue for screenshots.
cmdline_parm no3dsound_arg("-no_3d_sound", NULL); // Cmdline_no_3d_sound - Disable use of full 3D sounds
cmdline_parm no_glsl_models_arg("-disable_glsl_model", NULL); // Cmdline_no_glsl_model_rendering -- switches model rendering to fixed pipeline
@@ -418,7 +414,6 @@ cmdline_parm parse_cmdline_only(PARSE_COMMAND_LINE_STRING, NULL);
#ifdef SCP_UNIX
cmdline_parm no_grab("-nograb", NULL); // Cmdline_no_grab
#endif
cmdline_parm reparse_mainhall_arg("-reparse_mainhall", NULL); //Cmdline_reparse_mainhall
char *Cmdline_start_mission = NULL;
int Cmdline_dis_collisions = 0;
@@ -438,13 +433,18 @@ int Cmdline_verify_vps = 0;
#ifdef SCP_UNIX
int Cmdline_no_grab = 0;
#endif
int Cmdline_reparse_mainhall = 0;
// Other
cmdline_parm get_flags_arg("-get_flags", NULL);
cmdline_parm output_sexp_arg("-output_sexps", NULL); //WMC - outputs all SEXPs to sexps.html
cmdline_parm output_scripting_arg("-output_scripting", NULL); //WMC
float Cmdline_percentflashtobang = -1.0;
int Cmdline_enforce_concurrent_sound_count = 1;
cmdline_parm percent_flashtobang_arg("-percent_flashtobang", NULL);
cmdline_parm do_not_enforce_concurrent_sound("-donotenforce", NULL);
#ifndef NDEBUG
@@ -1416,11 +1416,7 @@ bool SetCmdlineParams()
if ( ogl_spec_arg.found() ) {
Cmdline_ogl_spec = ogl_spec_arg.get_float();
if ( Cmdline_ogl_spec < 0.0f )
Cmdline_ogl_spec = 0.0f;
if ( Cmdline_ogl_spec > 128.0f )
Cmdline_ogl_spec = 128.0f;
CLAMP(Cmdline_ogl_spec, 0.0f, 128.0f);
}
if ( rearm_timer_arg.found() )
@@ -1471,14 +1467,14 @@ bool SetCmdlineParams()
Cmdline_bloom_intensity = bloom_intensity_arg.get_int();
}
if ( flightshaftsoff_arg.found() )
if ( percent_flashtobang_arg.found() )
{
ls_force_off = true;
Cmdline_percentflashtobang = percent_flashtobang_arg.get_float();
}
if( reparse_mainhall_arg.found() )
if ( do_not_enforce_concurrent_sound.found() )
{
Cmdline_reparse_mainhall = 1;
Cmdline_enforce_concurrent_sound_count = 0;
}
return true;
+6 -2
View File
@@ -62,6 +62,7 @@ extern float static_point_factor;
extern float static_tube_factor;
extern int Cmdline_ambient_factor;
extern int Cmdline_env;
extern int Cmdline_mipmap;
extern int Cmdline_missile_lighting;
extern int Cmdline_glow;
extern int Cmdline_nomotiondebris;
@@ -121,7 +122,6 @@ extern int Cmdline_no_set_gamma;
extern int Cmdline_novbo;
extern int Cmdline_no_fbo;
extern int Cmdline_noglsl;
extern int Cmdline_mipmap;
extern int Cmdline_ati_color_swap;
extern int Cmdline_no_3d_sound;
extern int Cmdline_no_glsl_model_rendering;
@@ -145,6 +145,10 @@ extern int Cmdline_verify_vps;
#ifdef SCP_UNIX
extern int Cmdline_no_grab;
#endif
extern int Cmdline_reparse_mainhall;
// Temp, only for evaluating new defaults
extern float Cmdline_percentflashtobang;
extern int Cmdline_enforce_concurrent_sound_count;
//extern char FreeSpace_Directory[]; // allievating a cfilesystem problem caused by fred -- Kazan
#endif
+1 -1
View File
@@ -91,7 +91,7 @@ void cmeasure_maybe_alert_success(object *objp)
if ( objp->parent == OBJ_INDEX(Player_obj) ) {
hud_start_text_flash(XSTR("Evaded", 1430), 800);
snd_play(&Snds[ship_get_sound(Player_obj, SND_MISSILE_EVADED_POPUP)]);
snd_play(&Snds[SND_MISSILE_EVADED_POPUP]);
} else if ( Objects[objp->parent].flags & OF_PLAYER_SHIP ) {
send_countermeasure_success_packet( objp->parent );
}
+23 -7
View File
@@ -1610,8 +1610,8 @@ void control_config_do_frame(float frametime)
for (i=0; i<CCFG_MAX; i++) {
if (Control_config[i].joy_id == j) {
z = i;
for (j=0; j<NUM_BUTTONS; j++){
CC_Buttons[gr_screen.res][j].button.reset();
for (size_t buttonid=0; buttonid<NUM_BUTTONS; buttonid++){
CC_Buttons[gr_screen.res][buttonid].button.reset();
}
break;
}
@@ -2100,7 +2100,7 @@ void control_check_indicate()
Control_check_count = 0;
}
int check_control(int id, int key)
int check_control_used(int id, int key)
{
int z, mask;
static int last_key = 0;
@@ -2152,10 +2152,8 @@ int check_control(int id, int key)
z &= KEY_MASK;
if (keyd_pressed[z] || key_down_count(z)) {
if ( !hud_squadmsg_read_key(z) ) {
control_used(id);
return 1;
}
control_used(id);
return 1;
}
}
@@ -2171,6 +2169,24 @@ int check_control(int id, int key)
return 0;
}
/**
* Wrapper for check_control_used. Allows the game to ignore the key if told to do so by the ignore-key SEXP.
*/
int check_control(int id, int key)
{
if (check_control_used(id, key)) {
if (Ignored_keys[id]) {
if (Ignored_keys[id] > 0) {
Ignored_keys[id]--;
}
return 0;
}
return 1;
}
return 0;
}
// get heading, pitch, bank, throttle abs. and throttle rel. values.
void control_get_axes_readings(int *h, int *p, int *b, int *ta, int *tr)
{
+5 -5
View File
@@ -163,10 +163,10 @@ config_item Control_config[CCFG_MAX + 1] = {
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, true, "Target Previous Hostile Bomb or Bomber" },
// multiplayer messaging keys
{ KEY_1, -1, COMPUTER_TAB, true, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
{ 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_1, -1, COMPUTER_TAB, true, "(Multiplayer) Message All" },
{ KEY_2, -1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly" },
{ KEY_3, -1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile" },
{ KEY_4, -1, COMPUTER_TAB, true, "(Multiplayer) Message Target" },
{ 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" },
@@ -556,7 +556,7 @@ void control_config_common_init()
#include <map>
#include <string>
SCP_map<SCP_string, int> mEnumNameToVal;
std::map<std::string, int> mEnumNameToVal;
void LoadEnumsIntoMap();
void control_config_common_load_overrides()
+2
View File
@@ -127,6 +127,7 @@ bool movie_play(char *name)
} else {
// uh-oh, movie is invalid... Abory, Retry, Fail?
mprintf(("MOVIE ERROR: Found invalid movie! (%s)\n", name));
Mouse_hidden--; // show the mouse cursor!
return false;
}
} else if (rc == MOVIE_MVE) {
@@ -143,6 +144,7 @@ bool movie_play(char *name)
} else {
// uh-oh, movie is invalid... Abory, Retry, Fail?
mprintf(("MOVIE ERROR: Found invalid movie! (%s)\n", name));
Mouse_hidden--; // show the mouse cursor!
return false;
}
}
+1 -19
View File
@@ -20,7 +20,6 @@
#include "cmdline/cmdline.h"
#include "parse/parselo.h"
#include "globalincs/pstypes.h"
#include "asteroid/asteroid.h"
#include <stdlib.h>
@@ -451,7 +450,7 @@ void fireball_render(object * obj)
}
/**
* Delete a fireball.
* Delete a fireball.
* Called by object_delete() code... do not call directly.
*/
void fireball_delete( object * obj )
@@ -1010,23 +1009,6 @@ int fireball_ship_explosion_type(ship_info *sip)
return index;
}
int fireball_asteroid_explosion_type(asteroid_info *aip)
{
Assert( aip != NULL );
if (aip->explosion_bitmap_anims.empty())
return -1;
int index = -1;
int roid_fireballs = (int)aip->explosion_bitmap_anims.size();
if (roid_fireballs > 0) {
index = aip->explosion_bitmap_anims[rand()%roid_fireballs];
}
return index;
}
float fireball_wormhole_intensity( object *obj )
{
int num, objnum;
+18 -22
View File
@@ -16,7 +16,6 @@
struct object;
struct ship_info;
struct asteroid_info;
// values correspond to the fireball render types
#define FIREBALL_MEDIUM_EXPLOSION 0
@@ -24,15 +23,15 @@ struct asteroid_info;
#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 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_MEDIUM 0 // Used for the 4 little explosions before a ship explodes
#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 MAX_FIREBALL_TYPES 32 // The maximum number of fireballs that can be defined
#define NUM_DEFAULT_FIREBALLS 6
#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
@@ -42,12 +41,12 @@ extern int Num_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];
int bitmap_id;
int num_frames;
int fps;
int bitmap_id;
int num_frames;
int fps;
} fireball_lod;
typedef struct fireball_info {
typedef struct fireball_info {
int lod_count;
float exp_color[3];
fireball_lod lod[4];
@@ -60,18 +59,18 @@ typedef struct fireball_info {
#define FBF_WARP_3D (1<<3) // Goober5000
#define FBF_WARP_VIA_SEXP (1<<4) // Goober5000
typedef struct fireball {
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_*
char lod; // current LOD
float time_elapsed; // in seconds
float total_time; // total lifetime of animation in seconds
int warp_open_sound_index; // for warp-effect - Goober5000
int warp_close_sound_index; // for warp-effect - Goober5000
char lod; // current LOD
float time_elapsed; // in seconds
float total_time; // total lifetime of animation in seconds
int warp_open_sound_index; // for warp-effect - Goober5000
int warp_close_sound_index; // for warp-effect - Goober5000
} fireball;
// end move
@@ -105,9 +104,6 @@ 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);
// returns the index of the fireball bitmap for this asteroid. -1 if there is none.
int fireball_asteroid_explosion_type(asteroid_info *aip);
// returns the intensity of a wormhole
float fireball_wormhole_intensity( object *obj );
+4 -7
View File
@@ -916,7 +916,7 @@ void briefing_editor_dlg::OnMakeIcon()
iconp = &Briefing->stages[m_cur_stage].icons[m_cur_icon];
ship = waypoint = -1;
team = 0;
SCP_list<jump_node>::iterator jnp;
jump_node *jnp = NULL;
vm_vec_make(&min, 9e19f, 9e19f, 9e19f);
vm_vec_make(&max, -9e19f, -9e19f, -9e19f);
@@ -947,10 +947,7 @@ void briefing_editor_dlg::OnMakeIcon()
break;
case OBJ_JUMP_NODE:
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == ptr)
break;
}
jnp = ptr->jnp;
break;
default:
@@ -996,7 +993,7 @@ void briefing_editor_dlg::OnMakeIcon()
Assert(wp_list != NULL);
name = wp_list->get_name();
}
else if (jnp != Jump_nodes.end())
else if (jnp != NULL)
name = jnp->get_name_ptr();
else
return;
@@ -1091,7 +1088,7 @@ void briefing_editor_dlg::OnMakeIcon()
}
}
// jumpnodes
else if(jnp != Jump_nodes.end()){
else if(jnp != NULL){
// find the first navbuoy
iconp->ship_class = -1;
for (int i = 0; i < Num_ship_classes; i++)
-2
View File
@@ -21,8 +21,6 @@
#include "cfile/cfile.h"
#include "sound/audiostr.h"
#include "localization/localize.h"
#include "jumpnode/jumpnode.h"
#ifdef _DEBUG
#undef THIS_FILE
+3 -5
View File
@@ -400,15 +400,13 @@ void DumpStats::get_object_stats(CString &buffer)
// Jumpnodes
buffer += "\r\nJUMPNODES\r\n";
SCP_list<jump_node>::iterator jnp;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
for ( jump_node *jnp = (jump_node *)Jump_nodes.get_first(); !Jump_nodes.is_end(jnp); jnp = (jump_node *)jnp->get_next() ) {
temp.Format("\tJumpnode: %s\r\n", jnp->get_name_ptr());
buffer += temp;
}
if (Jump_nodes.size() > 0) {
temp.Format("\ttotal_jumpnodes: %d\r\n", Jump_nodes.size());
if (Jump_nodes.get_num_elements() > 0) {
temp.Format("\ttotal_jumpnodes: %d\r\n", Jump_nodes.get_num_elements());
buffer += temp;
}
+1 -1
View File
@@ -1254,7 +1254,7 @@ void event_editor::OnBrowseAvi()
z = cfile_push_chdir(CF_TYPE_INTERFACE);
CFileDialog dlg(TRUE, "ani", m_avi_filename, OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR,
"Ani Files (*.ani)|*.ani|Avi Files (*.avi)|*.avi|Both (*.ani, *.avi)|*.ani;*.avi||");
"Ani Files (*.ani)|*.ani|Eff Files (*.eff)|*.eff|Avi Files (*.avi)|*.avi|Both (*.ani, *.avi)|*.ani;*.avi||");
if (dlg.DoModal() == IDOK) {
m_avi_filename = dlg.GetFileName();
-3
View File
@@ -703,6 +703,3 @@ int CFREDApp::ExitInstance()
// Empty functions to make fred link with the sexp_mission_set_subspace
void game_start_subspace_ambient_sound() {}
void game_stop_subspace_ambient_sound() {}
// Variables to make fred.ccp more like freespace2.cpp so fred will link
float Sun_spot = 0.0f;
+11 -16
View File
@@ -18,13 +18,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -624,7 +622,7 @@ CAPTION "About FRED2"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,10,17,20,20,SS_REALSIZEIMAGE
LTEXT "FRED2_OPEN - FreeSpace Editor, Version 3.6.13 OpenGL",IDC_STATIC,39,8,184,10,SS_NOPREFIX
LTEXT "FRED2_OPEN - FreeSpace Editor, Version 3.6.14 OpenGL",IDC_STATIC,39,8,184,10,SS_NOPREFIX
LTEXT "Copyright © 1999 Volition, Inc. All Rights Reserved",IDC_STATIC,39,17,164,8
DEFPUSHBUTTON "OK",IDOK,229,7,48,14,WS_GROUP
LTEXT """Fred2 is the omega of all giant unwieldy pieces of code. Its big, its horrifying, and it just doesn't care. View it at your own risk."" - Dave Baranec",IDC_STATIC,39,62,238,20
@@ -1441,7 +1439,7 @@ BEGIN
EDITTEXT IDC_HULL,57,24,40,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Spin1",IDC_HULL_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,98,24,11,14
CONTROL "Has Shield System",IDC_HAS_SHIELDS,"Button",BS_3STATE | WS_TABSTOP,7,43,75,10
CONTROL "Ship Locked",IDC_SHIP_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,78,56,10
CONTROL "Locked",IDC_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,78,40,10
EDITTEXT IDC_SHIELDS,57,55,40,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Spin3",IDC_SHIELDS_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,56,9,14
COMBOBOX IDC_DOCKEE,103,142,80,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@@ -1466,7 +1464,6 @@ BEGIN
CONTROL "Turrets Locked",IDC_TURRETS_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,101,81,8
CONTROL "Afterburner Locked",IDC_AFTERBURNER_LOCKED,"Button",BS_3STATE | WS_TABSTOP,93,101,83,10
CONTROL "Force Shields On",IDC_FORCE_SHIELDS,"Button",BS_3STATE | WS_TABSTOP,86,43,84,8
CONTROL "Weapon Locked",IDC_WEAPONS_LOCKED,"Button",BS_3STATE | WS_TABSTOP,93,79,69,10
END
IDD_ASTEROID_EDITOR DIALOG 0, 0, 376, 210
@@ -2074,8 +2071,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,13,0
PRODUCTVERSION 3,6,13,0
FILEVERSION 3,6,14,9276
PRODUCTVERSION 3,6,14,9276
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -2092,12 +2089,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Volition Inc."
VALUE "FileDescription", "Fred 2 Open"
VALUE "FileVersion", "3.6.13.0000"
VALUE "FileVersion", "3.6.14.9276"
VALUE "InternalName", "Fred 2 Open"
VALUE "LegalCopyright", "Copyright © 1998"
VALUE "OriginalFilename", "fred2.exe"
VALUE "ProductName", "Fred 2 Open"
VALUE "ProductVersion", "3.6.13"
VALUE "ProductVersion", "3.6.14"
END
END
BLOCK "VarFileInfo"
@@ -2668,7 +2665,7 @@ IDC_CURSOR2 CURSOR "res\\cursor2.cur"
STRINGTABLE
BEGIN
IDR_MAINFRAME "FRED2_OPEN 3.6.13 - FreeSpace2 Mission Editor\nUntitled\nFRED2\nFreeSpace2 Missions (*.fs2)\n.fs2\nFreeSpace2Mission\nFreeSpace2 Mission"
IDR_MAINFRAME "FRED2_OPEN 3.6.14 RC6 - FreeSpace2 Mission Editor\nUntitled\nFRED2\nFreeSpace2 Missions (*.fs2)\n.fs2\nFreeSpace2Mission\nFreeSpace2 Mission"
END
STRINGTABLE
@@ -2956,18 +2953,16 @@ BEGIN
ID_FORMAT_FS1_RETAIL "Save missions compatible with FS1 retail"
END
#endif // English (U.S.) resources
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
// English (United Kingdom) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -3013,7 +3008,7 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
#endif // English (U.K.) resources
#endif // English (United Kingdom) resources
/////////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -905,7 +905,7 @@ void render_one_model_htl(object *objp)
if (Fred_outline) {
model_set_outline_color(Fred_outline >> 16, (Fred_outline >> 8) & 0xff, Fred_outline & 0xff);
j |= MR_SHOW_OUTLINE;
j |= MR_SHOW_OUTLINE_HTL;
}
g3_done_instance(0);
+1 -6
View File
@@ -1394,7 +1394,6 @@ void CFREDView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
CMenu menu;
int objnum;
CPoint local = point;
SCP_list<jump_node>::iterator jnp;
if (button_down) {
cancel_drag();
@@ -1421,11 +1420,7 @@ void CFREDView::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
else if (Objects[objnum].type == OBJ_JUMP_NODE) {
id = ID_EDITORS_WAYPOINT;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == &Objects[objnum])
break;
}
str.Format("Edit %s", jnp->get_name_ptr());
str.Format("Edit %s", Objects[objnum].jnp->get_name_ptr());
} else if (Objects[objnum].type == OBJ_WAYPOINT) {
int idx;
+84 -108
View File
@@ -43,8 +43,7 @@ initial_status::initial_status(CWnd* pParent /*=NULL*/)
m_hull = 0;
m_has_shields = FALSE;
m_force_shields = FALSE;
m_ship_locked = FALSE;
m_weapons_locked = FALSE;
m_locked = FALSE;
m_primaries_locked = FALSE;
m_secondaries_locked = FALSE;
m_turrets_locked = FALSE;
@@ -84,8 +83,7 @@ void initial_status::DoDataExchange(CDataExchange* pDX)
DDV_MinMaxInt(pDX, m_damage, 0, 100);
DDX_Check(pDX, IDC_HAS_SHIELDS, m_has_shields);
DDX_Check(pDX, IDC_FORCE_SHIELDS, m_force_shields);
DDX_Check(pDX, IDC_SHIP_LOCKED, m_ship_locked);
DDX_Check(pDX, IDC_WEAPONS_LOCKED, m_weapons_locked);
DDX_Check(pDX, IDC_LOCKED, m_locked);
DDX_Check(pDX, IDC_PRIMARIES_LOCKED, m_primaries_locked);
DDX_Check(pDX, IDC_SECONDARIES_LOCKED, m_secondaries_locked);
DDX_Check(pDX, IDC_TURRETS_LOCKED, m_turrets_locked);
@@ -126,8 +124,7 @@ BEGIN_MESSAGE_MAP(initial_status, CDialog)
ON_CBN_SELCHANGE(IDC_DOCKEE_POINT, OnSelchangeDockeePoint)
ON_BN_CLICKED(IDC_HAS_SHIELDS, OnHasShields)
ON_BN_CLICKED(IDC_FORCE_SHIELDS, OnForceShields)
ON_BN_CLICKED(IDC_SHIP_LOCKED, OnShipLocked)
ON_BN_CLICKED(IDC_WEAPONS_LOCKED, OnWeaponsLocked)
ON_BN_CLICKED(IDC_LOCKED, OnLocked)
ON_BN_CLICKED(IDC_PRIMARIES_LOCKED, OnPrimariesLocked)
ON_BN_CLICKED(IDC_SECONDARIES_LOCKED, OnSecondariesLocked)
ON_BN_CLICKED(IDC_TURRETS_LOCKED, OnTurretsLocked)
@@ -188,15 +185,10 @@ BOOL initial_status::OnInitDialog()
else
m_force_shields = 0;
if (Ships[m_ship].flags2 & SF2_SHIP_LOCKED)
m_ship_locked = 1;
if (Ships[m_ship].flags & SF_LOCKED)
m_locked = 1;
else
m_ship_locked = 0;
if (Ships[m_ship].flags2 & SF2_WEAPONS_LOCKED)
m_weapons_locked = 1;
else
m_weapons_locked = 0;
m_locked = 0;
// Lock primaries
if (Ships[m_ship].flags2 & SF2_PRIMARIES_LOCKED) {
@@ -260,23 +252,13 @@ BOOL initial_status::OnInitDialog()
if (m_force_shields)
m_force_shields = 2;
}
if (Ships[get_ship_from_obj(objp)].flags2 & SF2_SHIP_LOCKED) {
if (!m_ship_locked)
m_ship_locked = 2;
if (Ships[get_ship_from_obj(objp)].flags & SF_LOCKED) {
if (!m_locked)
m_locked = 2;
} else {
if (m_ship_locked)
m_ship_locked = 2;
}
if (Ships[get_ship_from_obj(objp)].flags2 & SF2_WEAPONS_LOCKED) {
if (!m_weapons_locked)
m_weapons_locked = 2;
} else {
if (m_weapons_locked)
m_weapons_locked = 2;
if (m_locked)
m_locked = 2;
}
if (Ships[get_ship_from_obj(objp)].flags2 & SF2_PRIMARIES_LOCKED){
@@ -421,15 +403,10 @@ void initial_status::OnOK()
Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_FORCE_SHIELDS_ON;
}
if (m_ship_locked == 1)
Ships[get_ship_from_obj(objp)].flags2 |= SF2_SHIP_LOCKED;
else if (!m_ship_locked)
Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_SHIP_LOCKED;
if (m_weapons_locked == 1)
Ships[get_ship_from_obj(objp)].flags2 |= SF2_WEAPONS_LOCKED;
else if (!m_weapons_locked)
Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_WEAPONS_LOCKED;
if (m_locked == 1)
Ships[get_ship_from_obj(objp)].flags |= SF_LOCKED;
else if (!m_locked)
Ships[get_ship_from_obj(objp)].flags &= ~SF_LOCKED;
if (m_primaries_locked == 1) {
Ships[get_ship_from_obj(objp)].flags2 |= SF2_PRIMARIES_LOCKED;
@@ -477,15 +454,10 @@ void initial_status::OnOK()
else if (!m_force_shields)
Ships[m_ship].flags2 &= ~SF2_FORCE_SHIELDS_ON;
if (m_ship_locked == 1)
Ships[m_ship].flags2 |= SF2_SHIP_LOCKED;
else if (!m_ship_locked)
Ships[m_ship].flags2 &= ~SF2_SHIP_LOCKED;
if (m_weapons_locked == 1)
Ships[m_ship].flags2 |= SF2_WEAPONS_LOCKED;
else if (!m_weapons_locked)
Ships[m_ship].flags2 &= ~SF2_WEAPONS_LOCKED;
if (m_locked == 1)
Ships[m_ship].flags |= SF_LOCKED;
else if (!m_locked)
Ships[m_ship].flags &= ~SF_LOCKED;
if (m_primaries_locked == 1)
Ships[m_ship].flags2 |= SF2_PRIMARIES_LOCKED;
@@ -562,24 +534,14 @@ void initial_status::OnForceShields()
((CButton *) GetDlgItem(IDC_FORCE_SHIELDS))->SetCheck(m_force_shields);
}
void initial_status::OnShipLocked()
void initial_status::OnLocked()
{
if (m_ship_locked == 1)
m_ship_locked = 0;
if (m_locked == 1)
m_locked = 0;
else
m_ship_locked = 1;
m_locked = 1;
((CButton *) GetDlgItem(IDC_SHIP_LOCKED))->SetCheck(m_ship_locked);
}
void initial_status::OnWeaponsLocked()
{
if (m_weapons_locked == 1)
m_weapons_locked = 0;
else
m_weapons_locked = 1;
((CButton *) GetDlgItem(IDC_WEAPONS_LOCKED))->SetCheck(m_weapons_locked);
((CButton *) GetDlgItem(IDC_LOCKED))->SetCheck(m_locked);
}
void initial_status::OnSelchangeSubsys()
@@ -979,7 +941,7 @@ void initial_status::undock(object *objp1, object *objp2)
ship_num = get_ship_from_obj(OBJ_INDEX(objp1));
other_ship_num = get_ship_from_obj(OBJ_INDEX(objp2));
if (ship_class_compare(Ships[ship_num].ship_info_index, Ships[other_ship_num].ship_info_index) > 0)
if (ship_class_compare(Ships[ship_num].ship_info_index, Ships[other_ship_num].ship_info_index) <= 0)
vm_vec_scale_add2(&objp2->pos, &v, objp2->radius * 2.0f);
else
vm_vec_scale_add2(&objp1->pos, &v, objp1->radius * -2.0f);
@@ -1011,51 +973,6 @@ void initial_status::undock(object *objp1, object *objp2)
// ----- the following are not contained in the class because of apparent scope issues -----
// NOTE - in both retail and SCP, the dock "leader" is defined as the only guy in his
// group with a non-false arrival cue
void initial_status_mark_dock_leader_helper(object *objp, dock_function_info *infop)
{
ship *shipp = &Ships[objp->instance];
// all ships except the leader should have a locked false arrival cue
if (shipp->arrival_cue != Locked_sexp_false)
{
object *existing_leader;
// increment number of leaders found
infop->maintained_variables.int_value++;
// see if we already found a leader
existing_leader = infop->maintained_variables.objp_value;
if (existing_leader != NULL)
{
ship *leader_shipp = &Ships[existing_leader->instance];
// keep existing leader if he has a higher priority than us
if (ship_class_compare(shipp->ship_info_index, leader_shipp->ship_info_index) < 0)
{
// set my arrival cue to false
reset_arrival_to_false(SHIP_INDEX(shipp), true);
return;
}
// otherwise, unmark the existing leader and set his arrival cue to false
leader_shipp->flags &= ~SF_DOCK_LEADER;
reset_arrival_to_false(SHIP_INDEX(leader_shipp), true);
}
// mark and save me as the leader
shipp->flags |= SF_DOCK_LEADER;
infop->maintained_variables.objp_value = objp;
}
}
// self-explanatory, really
void initial_status_unmark_dock_handled_flag(object *objp, dock_function_info *infop)
{
objp->flags &= ~OF_DOCKED_ALREADY_HANDLED;
}
bool set_cue_to_false(int *cue)
{
// if the cue is not false, make it false. Be sure to set all ship editor dialog functions
@@ -1063,11 +980,13 @@ bool set_cue_to_false(int *cue)
if (*cue != Locked_sexp_false)
{
Ship_editor_dialog.update_data(1);
Wing_editor_dialog.update_data(1);
free_sexp2(*cue);
*cue = Locked_sexp_false;
Ship_editor_dialog.initialize_data(1);
Wing_editor_dialog.initialize_data(1);
return true;
}
@@ -1105,6 +1024,63 @@ void reset_arrival_to_false(int shipnum, bool reset_wing)
}
}
// NOTE - in both retail and SCP, the dock "leader" is defined as the only guy in his
// group with a non-false arrival cue
void initial_status_mark_dock_leader_helper(object *objp, dock_function_info *infop)
{
ship *shipp = &Ships[objp->instance];
int cue_to_check;
// if this guy is part of a wing, he uses his wing's arrival cue
if (shipp->wingnum >= 0)
{
cue_to_check = Wings[shipp->wingnum].arrival_cue;
}
// check the ship's arrival cue
else
{
cue_to_check = shipp->arrival_cue;
}
// all ships except the leader should have a locked false arrival cue
if (cue_to_check != Locked_sexp_false)
{
object *existing_leader;
// increment number of leaders found
infop->maintained_variables.int_value++;
// see if we already found a leader
existing_leader = infop->maintained_variables.objp_value;
if (existing_leader != NULL)
{
ship *leader_shipp = &Ships[existing_leader->instance];
// keep existing leader if he has a higher priority than us
if (ship_class_compare(shipp->ship_info_index, leader_shipp->ship_info_index) >= 0)
{
// set my arrival cue to false
reset_arrival_to_false(SHIP_INDEX(shipp), true);
return;
}
// otherwise, unmark the existing leader and set his arrival cue to false
leader_shipp->flags &= ~SF_DOCK_LEADER;
reset_arrival_to_false(SHIP_INDEX(leader_shipp), true);
}
// mark and save me as the leader
shipp->flags |= SF_DOCK_LEADER;
infop->maintained_variables.objp_value = objp;
}
}
// self-explanatory, really
void initial_status_unmark_dock_handled_flag(object *objp, dock_function_info *infop)
{
objp->flags &= ~OF_DOCKED_ALREADY_HANDLED;
}
void initial_status::OnPrimariesLocked()
{
if (m_primaries_locked == 1)
+2 -4
View File
@@ -51,8 +51,7 @@ public:
int m_velocity;
int m_hull;
BOOL m_has_shields;
int m_ship_locked;
int m_weapons_locked;
int m_locked;
CString m_cargo_name;
int m_primaries_locked;
int m_secondaries_locked;
@@ -81,8 +80,7 @@ protected:
afx_msg void OnSelchangeDockeePoint();
afx_msg void OnHasShields();
afx_msg void OnForceShields();
afx_msg void OnShipLocked();
afx_msg void OnWeaponsLocked();
afx_msg void OnLocked();
afx_msg void OnPrimariesLocked();
afx_msg void OnSecondariesLocked();
afx_msg void OnTurretsLocked();
+2 -10
View File
@@ -750,9 +750,7 @@ int create_object(vec3d *pos, int waypoint_instance)
obj = create_player(Player_starts, pos, NULL, Default_player_model);
} else if (cur_model_index == Id_select_type_jump_node) {
jump_node* jnp = new jump_node(pos);
obj = jnp->get_objnum();
Jump_nodes.push_back(*jnp);
obj = (new jump_node(pos))->get_objnum();
} else if(Ship_info[cur_model_index].flags & SIF_NO_FRED){
obj = -1;
} else { // creating a ship
@@ -1258,7 +1256,6 @@ int common_object_delete(int obj)
char msg[255], *name;
int i, z, r, type;
object *objp;
SCP_list<jump_node>::iterator jnp;
type = Objects[obj].type;
if (type == OBJ_START) {
@@ -1379,12 +1376,7 @@ int common_object_delete(int obj)
return 0;
} else if (type == OBJ_JUMP_NODE) {
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == &Objects[obj])
break;
}
Jump_nodes.erase(jnp);
delete Objects[obj].jnp;
}
unmark_object(obj);
-2
View File
@@ -16,8 +16,6 @@
#include "globalincs/pstypes.h"
#include "ship/ship.h"
#include "ai/aigoals.h"
#include "jumpnode/jumpnode.h"
#define SHIP_FILTER_PLAYERS (1<<0) // set: add players to list as well
#define SHIP_FILTER_FLYABLE (1<<1) // set: filter out non-flyable ships
+2 -1
View File
@@ -630,11 +630,12 @@ void CMissionNotesDlg::OnSquadLogo()
}
}
char *Load_screen_ext = "Image Files (*.dds, *.pcx, *.jpg, *.jpeg, *.tga)|*.dds;*.pcx;*.jpg;*.jpeg;*.tga|"
char *Load_screen_ext = "Image Files (*.dds, *.pcx, *.jpg, *.jpeg, *.tga, *.png)|*.dds;*.pcx;*.jpg;*.jpeg;*.tga;*.png|"
"DDS Files (*.dds)|*.dds|"
"PCX Files (*.pcx)|*.pcx|"
"JPG Files (*.jpg; *.jpeg)|*.jpg;*.jpeg|"
"TGA Files (*.tga)|*.tga|"
"PNG Files (*.png)|*.png|"
"All Files (*.*)|*.*|"
"|";
+21 -14
View File
@@ -710,7 +710,10 @@ int CFred_mission_save::save_cutscenes()
break;
case MOVIE_PRE_DEBRIEF:
strcpy_s(type, "$Debriefing Cutscene:");
break;
break;
case MOVIE_END_CAMPAIGN:
strcpy_s(type, "$Campaign End Cutscene:");
break;
default:
Int3();
continue;
@@ -1579,6 +1582,8 @@ int CFred_mission_save::save_objects()
fout(" \"no-arrival-warp\"");
if (shipp->flags & SF_NO_DEPARTURE_WARP)
fout(" \"no-departure-warp\"");
if (shipp->flags & SF_LOCKED)
fout(" \"locked\"");
if (Objects[shipp->objnum].flags & OF_INVULNERABLE)
fout(" \"invulnerable\"");
if (shipp->flags & SF_HIDDEN_FROM_SENSORS)
@@ -1611,9 +1616,6 @@ int CFred_mission_save::save_objects()
fout(" \"friendly-stealth-invisible\"");
if (shipp->flags2 & SF2_DONT_COLLIDE_INVIS)
fout(" \"don't-collide-invisible\"");
//for compatibility reasons ship locked or weapons locked are saved as both locked in retail mode
if ((Format_fs2_open == FSO_FORMAT_RETAIL) && ((shipp->flags2 & SF2_SHIP_LOCKED) || (shipp->flags2 & SF2_WEAPONS_LOCKED)))
fout(" \"locked\"");
fout(" )");
// flags2 added by Goober5000 --------------------------------
@@ -1665,10 +1667,6 @@ int CFred_mission_save::save_objects()
fout(" \"no-ets\"");
if (shipp->flags2 & SF2_CLOAKED)
fout(" \"cloaked\"");
if (shipp->flags2 & SF2_SHIP_LOCKED)
fout(" \"ship-locked\"");
if (shipp->flags2 & SF2_WEAPONS_LOCKED)
fout(" \"weapons-locked\"");
fout(" )");
}
// -----------------------------------------------------------
@@ -2074,8 +2072,13 @@ int CFred_mission_save::save_common_object_data(object *objp, ship *shipp)
fout("\n+Primary Banks:");
fout(" ( ");
for (j=0; j<wp->num_primary_banks; j++)
fout("\"%s\" ", Weapon_info[wp->primary_bank_weapons[j]].name);
for (j=0; j<wp->num_primary_banks; j++) {
if (wp->primary_bank_weapons[j] != -1) { // Just in case someone has set a weapon bank to empty
fout("\"%s\" ", Weapon_info[wp->primary_bank_weapons[j]].name);
} else {
fout("\"\" ");
}
}
fout(")");
}
@@ -2093,8 +2096,13 @@ int CFred_mission_save::save_common_object_data(object *objp, ship *shipp)
fout("\n+Secondary Banks:");
fout(" ( ");
for (j=0; j<wp->num_secondary_banks; j++)
fout("\"%s\" ", Weapon_info[wp->secondary_bank_weapons[j]].name);
for (j=0; j<wp->num_secondary_banks; j++) {
if (wp->secondary_bank_weapons[j] != -1) {
fout("\"%s\" ", Weapon_info[wp->secondary_bank_weapons[j]].name);
} else {
fout("\"\" ");
}
}
fout(")");
}
@@ -2522,8 +2530,7 @@ int CFred_mission_save::save_waypoints()
parse_comments(2);
fout("\t\t;! %d lists total\n", Waypoint_lists.size());
SCP_list<jump_node>::iterator jnp;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp)
for ( jump_node *jnp = (jump_node *)Jump_nodes.get_first(); !Jump_nodes.is_end(jnp); jnp = (jump_node *)jnp->get_next() )
{
required_string_fred("$Jump Node:", "$Jump Node Name:");
parse_comments(2);
+1 -2
View File
@@ -915,10 +915,9 @@
#define IDC_EXACT_PLAYERS 1455
#define IDC_HEADING 1456
#define IDC_NO_ARRIVAL_MESSAGE 1457
#define IDC_LOCKED 1458
#define IDC_NO_MUSIC 1459
#define ID_UPDATE 1460
#define IDC_SHIP_LOCKED 1461
#define IDC_WEAPONS_LOCKED 1462
#define IDC_INITIAL_LIST 1464
#define IDC_FULL_WAR 1465
#define IDC_NEW_MSG 1466
+1 -3
View File
@@ -5687,8 +5687,7 @@ sexp_list_item *sexp_tree::get_listing_opf_jump_nodes()
{
sexp_list_item head;
SCP_list<jump_node>::iterator jnp;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
for ( jump_node *jnp = (jump_node *)Jump_nodes.get_first(); !Jump_nodes.is_end(jnp); jnp = (jump_node *)jnp->get_next() ) {
head.add_data( jnp->get_name_ptr());
}
@@ -5793,7 +5792,6 @@ sexp_list_item *sexp_tree::get_listing_opf_post_effect()
for (i=0; i < ppe_names.size(); i++) {
head.add_data_dup(const_cast<char*>(ppe_names[i].c_str()));
}
head.add_data_dup("lightshafts");
return head.next;
}
+12
View File
@@ -2277,6 +2277,12 @@ void CShipEditorDlg::OnRestrictArrival()
CComboBox *box;
restrict_paths dlg;
if (multi_edit)
{
MessageBox("Please select only one ship.", "Too many ships selected");
return;
}
// grab stuff from GUI
UpdateData(TRUE);
@@ -2315,6 +2321,12 @@ void CShipEditorDlg::OnRestrictDeparture()
CComboBox *box;
restrict_paths dlg;
if (multi_edit)
{
MessageBox("Please select only one ship.", "Too many ships selected");
return;
}
// grab stuff from GUI
UpdateData(TRUE);
+11 -21
View File
@@ -73,7 +73,6 @@ void waypoint_path_dlg::OnInitMenu(CMenu* pMenu)
{
int i;
SCP_list<waypoint_list>::iterator ii;
SCP_list<jump_node>::iterator jnp;
CMenu *m;
m = pMenu->GetSubMenu(0);
@@ -84,7 +83,7 @@ void waypoint_path_dlg::OnInitMenu(CMenu* pMenu)
}
i = 0;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
for ( jump_node *jnp = (jump_node *)Jump_nodes.get_first(); !Jump_nodes.is_end(jnp); jnp = (jump_node *)jnp->get_next() ) {
m->AppendMenu(MF_ENABLED | MF_STRING, ID_JUMP_NODE_MENU + i, jnp->get_name_ptr());
if (jnp->get_objnum() == cur_object_index) {
m->CheckMenuItem(ID_JUMP_NODE_MENU + i, MF_BYCOMMAND | MF_CHECKED);
@@ -123,7 +122,6 @@ void waypoint_path_dlg::OnClose()
void waypoint_path_dlg::initialize_data(int full_update)
{
int enable = TRUE;
SCP_list<jump_node>::iterator jnp;
if (!GetSafeHwnd())
return;
@@ -137,12 +135,7 @@ void waypoint_path_dlg::initialize_data(int full_update)
m_name = _T(cur_waypoint_list->get_name());
} else if (Objects[cur_object_index].type == OBJ_JUMP_NODE) {
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == &Objects[cur_object_index])
break;
}
m_name = _T(jnp->get_name_ptr());
m_name = _T(Objects[cur_object_index].jnp->get_name_ptr());
} else {
m_name = _T("");
@@ -160,7 +153,6 @@ int waypoint_path_dlg::update_data(int redraw)
char *str, old_name[255];
int i, z;
object *ptr;
SCP_list<jump_node>::iterator jnp;
if (!GetSafeHwnd())
return 0;
@@ -310,10 +302,7 @@ int waypoint_path_dlg::update_data(int redraw)
}
} else if (Objects[cur_object_index].type == OBJ_JUMP_NODE) {
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == &Objects[cur_object_index])
break;
}
jump_node *jnp = Objects[cur_object_index].jnp;
for (i=0; i<MAX_WINGS; i++)
{
@@ -420,8 +409,10 @@ int waypoint_path_dlg::update_data(int redraw)
UpdateData(FALSE);
}
jump_node* found = jumpnode_get_by_name(m_name);
if(found != NULL && &(*jnp) != found)
strcpy_s(old_name, jnp->get_name_ptr());
string_copy(jnp->get_name_ptr(), m_name, NAME_LENGTH, 1);
if(jumpnode_check_for_duplicates())
{
if (bypass_errors)
return 1;
@@ -430,16 +421,15 @@ int waypoint_path_dlg::update_data(int redraw)
z = MessageBox("This jump node name is already being used by another jump node\n"
"Press OK to restore old name", "Error", MB_ICONEXCLAMATION | MB_OKCANCEL);
strcpy(jnp->get_name_ptr(), old_name);
if (z == IDCANCEL)
return -1;
m_name = _T(jnp->get_name_ptr());
m_name = _T(old_name);
UpdateData(FALSE);
}
strcpy_s(old_name, jnp->get_name_ptr());
jnp->set_name(const_cast<char *>((const char *) m_name));
str = (char *) (LPCTSTR) m_name;
if (strcmp(old_name, str)) {
update_sexp_references(old_name, str);
@@ -476,7 +466,7 @@ BOOL waypoint_path_dlg::OnCommand(WPARAM wParam, LPARAM lParam)
}
}
if ((id >= ID_JUMP_NODE_MENU) && (id < ID_JUMP_NODE_MENU + (int) Jump_nodes.size())) {
if ((id >= ID_JUMP_NODE_MENU) && (id < ID_JUMP_NODE_MENU + Jump_nodes.get_num_elements())) {
if (!update_data()) {
point = id - ID_JUMP_NODE_MENU;
unmark_all();
+1 -1
View File
@@ -229,7 +229,7 @@ int create_wing()
leader = cur_object_index;
ptr = GET_FIRST(&obj_used_list);
while (ptr != END_OF_LIST(&obj_used_list)) {
if ((ptr->type == OBJ_SHIP) && (ptr->flags & OF_MARKED)) {
if (( (ptr->type == OBJ_SHIP) || (ptr->type == OBJ_START) ) && (ptr->flags & OF_MARKED)) {
count++;
i = -1;
switch (ptr->type) {
+35 -30
View File
@@ -675,8 +675,6 @@ DCF(sn_glare, "")
float Supernova_last_glare = 0.0f;
bool stars_sun_has_glare(int index);
extern bool ls_on;
extern bool ls_force_off;
void game_sunspot_process(float frametime)
{
int n_lights, idx;
@@ -749,21 +747,23 @@ void game_sunspot_process(float frametime)
n_lights = light_get_global_count();
// check
for(idx=0; idx<n_lights; idx++) {
if ( (ls_on && !ls_force_off) || !shipfx_eye_in_shadow( &Eye_position, Viewer_obj, idx ) ) {
for(idx=0; idx<n_lights; idx++){
if ( !shipfx_eye_in_shadow( &Eye_position, Viewer_obj, idx ) ) {
vec3d light_dir;
light_get_global_dir(&light_dir, idx);
//only do sunglare stuff if this sun has one
if (stars_sun_has_glare(idx)) {
if (stars_sun_has_glare(idx))
{
float dot = vm_vec_dot( &light_dir, &Eye_matrix.vec.fvec )*0.5f+0.5f;
Sun_spot_goal += (float)pow(dot,85.0f);
}
// draw the glow for this sun
stars_draw_sun_glow(idx);
}
if (!shipfx_eye_in_shadow( &Eye_position, Viewer_obj, idx ) ) {
// draw the glow for this sun
stars_draw_sun_glow(idx);
}
}
Sun_drew = 0;
@@ -848,7 +848,7 @@ void game_flash_diminish(float frametime)
g = fl2i( Game_flash_green*128.0f );
b = fl2i( Game_flash_blue*128.0f );
if ( Sun_spot > 0.0f && (!ls_on || ls_force_off)) {
if ( Sun_spot > 0.0f ) {
r += fl2i(Sun_spot*128.0f);
g += fl2i(Sun_spot*128.0f);
b += fl2i(Sun_spot*128.0f);
@@ -1061,7 +1061,7 @@ void game_level_init(int seed)
Game_no_clear = 0;
// campaign wasn't ended
Campaign_ended_in_mission = 0;
Campaign_ending_via_supernova = 0;
Env_cubemap_drawn = false;
@@ -1244,8 +1244,7 @@ void game_loading_callback_init()
if (Game_loading_background < 0)
Game_loading_background = bm_load(Game_loading_bground_fname[gr_screen.res]);
strcpy_s(Game_loading_ani.filename, Game_loading_ani_fname[gr_screen.res]);
generic_anim_init(&Game_loading_ani, Game_loading_ani.filename);
generic_anim_init(&Game_loading_ani, Game_loading_ani_fname[gr_screen.res]);
generic_anim_load(&Game_loading_ani);
Assertion( Game_loading_ani.num_frames > 0, "Load Screen animation %s not found, or corrupted. Needs to be an animation with at least 1 frame.", Game_loading_ani.filename );
@@ -2025,11 +2024,6 @@ void game_init()
old_alpha_colors_init();
}
if(!Cmdline_reparse_mainhall)
{
main_hall_read_table();
}
if (Cmdline_env) {
ENVMAP = Default_env_map = bm_load("cubemap");
}
@@ -3583,7 +3577,7 @@ DCF_BOOL( subspace, Game_subspace_effect )
void clip_frame_view();
// Does everything needed to render a frame
extern SCP_vector<object*> effect_ships;
extern std::vector<object*> effect_ships;
void game_render_frame( camid cid )
{
@@ -3683,7 +3677,7 @@ void game_render_frame( camid cid )
neb2_render_player();
// render all ships with shader effects on them
SCP_vector<object*>::iterator obji = effect_ships.begin();
std::vector<object*>::iterator obji = effect_ships.begin();
for(;obji != effect_ships.end();++obji)
ship_render(*obji);
effect_ships.clear();
@@ -3692,6 +3686,7 @@ void game_render_frame( camid cid )
if(draw_viewer_last && Viewer_obj)
{
gr_post_process_save_zbuffer();
gr_zbuffer_clear(TRUE);
ship_render(Viewer_obj);
}
@@ -3709,9 +3704,10 @@ void game_render_frame( camid cid )
}
//Draw viewer cockpit
if(Viewer_obj != NULL && Viewer_mode != VM_TOPDOWN && Ship_info[Ships[Viewer_obj->instance].ship_info_index].cockpit_model_num > 0)
if(Viewer_obj != NULL && Viewer_mode != VM_TOPDOWN)
{
gr_post_process_save_zbuffer();
gr_zbuffer_clear(TRUE);
ship_render_cockpit(Viewer_obj);
}
@@ -4078,7 +4074,7 @@ void game_simulation_frame()
obj_snd_do_frame(); // update the object-linked persistant sounds
game_maybe_update_sound_environment();
snd_update_listener(&View_position, &Player_obj->phys_info.vel, &Player_obj->orient);
snd_update_listener(&Eye_position, &Player_obj->phys_info.vel, &Eye_matrix);
// AL: debug code used for testing ambient subspace sound (ie when enabling subspace through debug console)
#ifndef NDEBUG
@@ -4506,6 +4502,10 @@ void game_frame(int paused)
}
}
// Goober5000 - check if we should red-alert
// (this is approximately where the red_alert_check_status() function tree began in the pre-HUD-overhaul code)
red_alert_maybe_move_to_next_mission();
DEBUG_GET_TIME( render3_time2 )
DEBUG_GET_TIME( render2_time1 )
@@ -5171,7 +5171,14 @@ void game_process_event( int current_state, int event )
break;
case GS_EVENT_DEBRIEF:
gameseq_set_state(GS_STATE_DEBRIEF);
// did we end the campaign in the main freespace 2 single player campaign?
// (specifically, did we successfully jump out when the supernova was in progress
// and the campaign was ending?)
if (Campaign_ending_via_supernova && (Game_mode & GM_CAMPAIGN_MODE)/* && !stricmp(Campaign.filename, "freespace2")*/) {
gameseq_post_event(GS_EVENT_END_CAMPAIGN);
} else {
gameseq_set_state(GS_STATE_DEBRIEF);
}
break;
case GS_EVENT_SHIP_SELECTION:
@@ -5408,12 +5415,10 @@ void game_process_event( int current_state, int event )
mprintf(( "Hit target speed. Starting warp effect and moving to stage 2!\n" ));
shipfx_warpout_start( Player_obj );
Player->control_mode = PCM_WARPOUT_STAGE2;
if (!(The_mission.ai_profile->flags2 & AIPF2_NO_WARP_CAMERA)) {
Player->saved_viewer_mode = Viewer_mode;
Viewer_mode |= VM_WARP_CHASE;
Warp_camera = warp_camera(Player_obj);
}
Player->saved_viewer_mode = Viewer_mode;
Viewer_mode |= VM_WARP_CHASE;
Warp_camera = warp_camera(Player_obj);
}
break;
@@ -7326,7 +7331,7 @@ void game_shutdown(void)
// load up common multiplayer icons
multi_unload_common_icons();
hud_close();
hud_close();
fireball_close(); // free fireball system
particle_close(); // close out the particle system
weapon_close(); // free any memory that was allocated for the weapons
+452 -452
View File
@@ -1,452 +1,452 @@
//Microsoft Developer Studio generated resource script.
//
#include "freespaceresource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"freespaceresource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include <windows.h>\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
DEBUG_MENU DIALOG DISCARDABLE 0, 0, 185, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug Menu"
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_LIST_DEBUG,7,7,171,121,LBS_OWNERDRAWFIXED |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Ok",IDOK,7,137,171,14
END
FIND_DIALOG DIALOG DISCARDABLE 0, 0, 119, 47
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find Text"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_TEXT,7,7,105,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "Find",IDOK,7,26,50,14
PUSHBUTTON "Cancel",IDCANCEL,62,26,50,14
END
IDD_CONNECT DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Server"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "# Connections :",IDC_CON_COUNT,7,54,148,10
LISTBOX IDC_CONPING,7,79,148,167,WS_VSCROLL | WS_TABSTOP
LTEXT "Address and Ping",IDC_STATIC,7,66,143,10
PUSHBUTTON "Reset All",IDC_RESET_MULTI,162,174,46,72
PUSHBUTTON "Kick",IDC_KICK_BUTTON,161,80,47,19
CONTROL "",IDC_STATIC,"Static",SS_GRAYRECT,7,48,201,1
EDITTEXT IDC_STD_NAME,64,14,144,14,ES_AUTOHSCROLL
LTEXT "Server Name",IDC_STATIC,7,17,42,8
EDITTEXT IDC_STD_HOST_PASSWD,64,32,144,14,ES_AUTOHSCROLL
LTEXT "Host Password",IDC_STATIC,7,33,48,8
PUSHBUTTON "Refresh Missions",IDC_PXO_REFRESH,161,116,47,36,
BS_MULTILINE
END
IDD_MULTI DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Multi-Player"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Frame Cap :",10,7,28,43,8
LTEXT "",IDC_FRAMECAP_STATIC,53,29,46,10,SS_SUNKEN
LTEXT "Realized FPS :",IDC_STATIC_A,119,30,49,12
LTEXT "",IDC_STANDALONE_FPS,172,29,34,11,SS_SUNKEN
LTEXT "Mission Time :",IDC_STATIC_A2,13,91,49,12
LTEXT "",IDC_STANDALONE_MTIME,71,90,125,11,SS_SUNKEN
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_SUNKEN,7,43,199,
1
LTEXT "Mission Name :",IDC_STATIC,13,80,52,11
LTEXT "",IDC_MISSION_NAME,71,78,125,11,SS_SUNKEN
LTEXT "Mission Goals",IDC_STATIC,7,140,74,8
LTEXT "Netgame Information",IDC_STATIC,133,140,66,8
LTEXT "Max Players",IDC_STATIC,117,158,42,8
LTEXT "Max Observers",IDC_STATIC,117,184,48,8
LTEXT "Security",IDC_STATIC,117,210,26,8
LTEXT "Respawns",IDC_STATIC,117,236,34,8
LTEXT "",IDC_NG_MAXPLAYERS,178,158,28,8
LTEXT "",IDC_NG_MAXOBSERVERS,178,184,28,8
LTEXT "",IDC_NG_SECURITY,178,210,28,8
LTEXT "",IDC_NG_RESPAWNS,178,236,28,8
END
IDD_PLAYER_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Player Info"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_LIST,77,6,112,169,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Ship Type",IDC_STATIC,7,24,38,10
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,55,201,1
LTEXT "",IDC_PSHIP_TYPE,53,24,49,10,SS_SUNKEN
LTEXT "Mission Stats",IDC_STATIC,133,59,44,10
LTEXT "Primary Shots",IDC_STATIC,7,118,45,9
LTEXT "Primary Hits",IDC_STATIC,7,129,40,9
LTEXT "Primary BH Hits",IDC_STATIC,7,140,50,9
LTEXT "Primary Hit %",IDC_STATIC,7,151,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,7,162,55,9
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,106,24,1,222
LTEXT "All Time Stats",IDC_STATIC,33,59,44,10
LTEXT "Primary Shots",IDC_STATIC,109,118,45,9
LTEXT "Primary Hits",IDC_STATIC,109,129,40,9
LTEXT "Primary BH Hits",IDC_STATIC,109,140,50,9
LTEXT "Primary Hit %",IDC_STATIC,109,151,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,109,162,55,9
LTEXT "Secondary Shots",IDC_STATIC,7,173,56,9
LTEXT "Secondary Hits",IDC_STATIC,7,184,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,7,195,63,9
LTEXT "Secondary Hit %",IDC_STATIC,7,206,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,7,217,65,9
LTEXT "Secondary Shots",IDC_STATIC,109,173,56,9
LTEXT "Secondary Hits",IDC_STATIC,109,184,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,109,195,63,9
LTEXT "Secondary Hit %",IDC_STATIC,109,206,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,109,217,65,9
LTEXT "",IDC_PSHOTS,75,118,28,8,SS_SUNKEN
LTEXT "",IDC_PHITS,75,129,28,8,SS_SUNKEN
LTEXT "",IDC_PBHHITS,75,140,28,8,SS_SUNKEN
LTEXT "",IDC_PPCT,75,151,28,8,SS_SUNKEN
LTEXT "",IDC_PBHPCT,75,162,28,8,SS_SUNKEN
LTEXT "",IDC_SSHOTS,75,173,28,8,SS_SUNKEN
LTEXT "",IDC_SECHITS,75,184,28,8,SS_SUNKEN
LTEXT "",IDC_SBHHITS,75,195,28,8,SS_SUNKEN
LTEXT "",IDC_SPCT,75,206,28,8,SS_SUNKEN
LTEXT "",IDC_SBHPCT,75,217,28,8,SS_SUNKEN
LTEXT "",IDC_MPSHOTS,180,118,28,8,SS_SUNKEN
LTEXT "",IDC_MPHITS,180,129,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHHITS,180,140,28,8,SS_SUNKEN
LTEXT "",IDC_MPPCT,180,151,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHPCT,180,162,28,9,SS_SUNKEN
LTEXT "",IDC_MSSHOTS,180,173,28,8,SS_SUNKEN
LTEXT "",IDC_MSECHITS,180,184,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHHITS,180,195,28,8,SS_SUNKEN
LTEXT "",IDC_MSPCT,180,206,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHPCT,180,217,28,8,SS_SUNKEN
CONTROL "",IDC_PINFO_PING,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,235,201,1
LTEXT "Player",IDC_STATIC,44,6,20,8
LTEXT "",IDC_PING_TIME,53,38,49,10,SS_SUNKEN
LTEXT "Avg Ping",IDC_STATIC,7,38,32,9
LTEXT "Assists",IDC_STATIC,7,107,54,10
LTEXT "Assists",IDC_STATIC,109,107,54,10
LTEXT "",IDC_ASSISTS,75,107,28,8,SS_SUNKEN
LTEXT "",IDC_MASSISTS,180,107,28,8,SS_SUNKEN
LTEXT "Score",IDC_STATIC,7,73,20,8
LTEXT "Score",IDC_STATIC,109,73,20,8
LTEXT "Kills",IDC_STATIC,7,84,13,8
LTEXT "Kills",IDC_STATIC,109,84,13,8
LTEXT "Friendly Kills",IDC_STATIC,109,96,39,8
LTEXT "Friendly Kills",IDC_STATIC,7,96,39,8
LTEXT "",IDC_SCORE,75,74,28,8,SS_SUNKEN
LTEXT "",IDC_KILL_COUNT,75,85,28,8,SS_SUNKEN
LTEXT "",IDC_KILL_COUNT_BH,75,96,28,8,SS_SUNKEN
LTEXT "",IDC_MSCORE,180,74,28,8,SS_SUNKEN
LTEXT "",IDC_MKILL_COUNT,180,85,28,8,SS_SUNKEN
LTEXT "",IDC_MKILL_COUNT_BH,180,96,28,8,SS_SUNKEN
END
IDD_GODSTUFF DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "God Stuff"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_GOD_LIST,39,7,101,211,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_GODSTUFF_FPS,177,7,31,8,SS_SUNKEN
LTEXT "FPS",IDC_STATIC,154,7,16,8
LTEXT "Player ",IDC_STATIC,7,7,20,12
EDITTEXT IDC_GODSTUFF_BROADCAST,7,47,201,12,ES_MULTILINE
LTEXT "Server Message",IDC_STATIC,7,39,54,8
PUSHBUTTON "Send",IDC_GODSTUFF_SENDMESS,7,59,70,13
LISTBOX IDC_GOD_CHAT,7,84,201,162,LBS_NOINTEGRALHEIGHT |
LBS_NOSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
END
IDD_DEBUG_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Standalone State :",IDC_STATIC,7,7,61,11
LTEXT "",IDC_STANDALONE_STATE,71,7,125,11,SS_SUNKEN
LTEXT "Multi log:",IDC_STATIC,8,26,29,8
LISTBOX IDC_MULTILOG,7,37,201,209,NOT LBS_NOTIFY |
LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP
END
IDD_GEN DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "",IDC_FIELD1,27,11,136,8
CTEXT "",IDC_FIELD2,28,30,130,8
CTEXT "",IDC_FIELD3,27,49,138,8
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
"DEBUG_MENU", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 178
TOPMARGIN, 7
BOTTOMMARGIN, 152
END
"FIND_DIALOG", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 112
TOPMARGIN, 7
BOTTOMMARGIN, 40
END
IDD_CONNECT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_MULTI, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 206
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_PLAYER_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 6
BOTTOMMARGIN, 246
END
IDD_GODSTUFF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_DEBUG_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_GEN, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 5
BOTTOMMARGIN, 88
END
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,13,0000
PRODUCTVERSION 3,6,13,0000
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Volition Inc."
VALUE "FileDescription", "FreeSpace 2 Open"
VALUE "FileVersion", "3.6.13.0000"
VALUE "InternalName", "FreeSpace 2 Open"
VALUE "LegalCopyright", "Copyright © 1998"
VALUE "OriginalFilename", "fs2.exe"
VALUE "ProductName", "FreeSpace 2 Open"
VALUE "ProductVersion", "3.6.13"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_GOAL_INC BITMAP DISCARDABLE "goal_inc.bmp"
IDB_GOAL_COMP BITMAP DISCARDABLE "goal_com.bmp"
IDB_GOAL_ORD BITMAP DISCARDABLE "goal_ord.bmp"
IDB_GOAL_NONE BITMAP DISCARDABLE "goal_none.bmp"
IDB_GOAL_FAIL BITMAP DISCARDABLE "goal_fail.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
/* VS2008 can support stuff that these builds can't */
#ifndef _VC08
/* Non-VS2008 builds get one of two icons */
#ifdef _DEBUG
IDI_APP_ICON ICON DISCARDABLE "dbg_icon.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "app_icon.ico"
#endif
#else
/* VS2008 builds get cool icons */
#ifdef _DEBUG
#ifdef _SSE2
IDI_APP_ICON ICON DISCARDABLE "V_sse-d.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "V_debug.ico"
#endif
#else
#ifdef _SSE2
IDI_APP_ICON ICON DISCARDABLE "V_sse.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "V_app.ico"
#endif
#endif
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// SRGRAMMAR
//
#ifdef FS2_VOICER
IDR_CMD_CFG SRGRAMMAR DISCARDABLE "..\..\code\sound\phrases.cfg"
#endif
//Microsoft Developer Studio generated resource script.
//
#include "freespaceresource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"freespaceresource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include <windows.h>\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
DEBUG_MENU DIALOG DISCARDABLE 0, 0, 185, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug Menu"
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_LIST_DEBUG,7,7,171,121,LBS_OWNERDRAWFIXED |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Ok",IDOK,7,137,171,14
END
FIND_DIALOG DIALOG DISCARDABLE 0, 0, 119, 47
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find Text"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_TEXT,7,7,105,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "Find",IDOK,7,26,50,14
PUSHBUTTON "Cancel",IDCANCEL,62,26,50,14
END
IDD_CONNECT DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Server"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "# Connections :",IDC_CON_COUNT,7,54,148,10
LISTBOX IDC_CONPING,7,79,148,167,WS_VSCROLL | WS_TABSTOP
LTEXT "Address and Ping",IDC_STATIC,7,66,143,10
PUSHBUTTON "Reset All",IDC_RESET_MULTI,162,174,46,72
PUSHBUTTON "Kick",IDC_KICK_BUTTON,161,80,47,19
CONTROL "",IDC_STATIC,"Static",SS_GRAYRECT,7,48,201,1
EDITTEXT IDC_STD_NAME,64,14,144,14,ES_AUTOHSCROLL
LTEXT "Server Name",IDC_STATIC,7,17,42,8
EDITTEXT IDC_STD_HOST_PASSWD,64,32,144,14,ES_AUTOHSCROLL
LTEXT "Host Password",IDC_STATIC,7,33,48,8
PUSHBUTTON "Refresh Missions",IDC_PXO_REFRESH,161,116,47,36,
BS_MULTILINE
END
IDD_MULTI DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Multi-Player"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Frame Cap :",10,7,28,43,8
LTEXT "",IDC_FRAMECAP_STATIC,53,29,46,10,SS_SUNKEN
LTEXT "Realized FPS :",IDC_STATIC_A,119,30,49,12
LTEXT "",IDC_STANDALONE_FPS,172,29,34,11,SS_SUNKEN
LTEXT "Mission Time :",IDC_STATIC_A2,13,91,49,12
LTEXT "",IDC_STANDALONE_MTIME,71,90,125,11,SS_SUNKEN
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_SUNKEN,7,43,199,
1
LTEXT "Mission Name :",IDC_STATIC,13,80,52,11
LTEXT "",IDC_MISSION_NAME,71,78,125,11,SS_SUNKEN
LTEXT "Mission Goals",IDC_STATIC,7,140,74,8
LTEXT "Netgame Information",IDC_STATIC,133,140,66,8
LTEXT "Max Players",IDC_STATIC,117,158,42,8
LTEXT "Max Observers",IDC_STATIC,117,184,48,8
LTEXT "Security",IDC_STATIC,117,210,26,8
LTEXT "Respawns",IDC_STATIC,117,236,34,8
LTEXT "",IDC_NG_MAXPLAYERS,178,158,28,8
LTEXT "",IDC_NG_MAXOBSERVERS,178,184,28,8
LTEXT "",IDC_NG_SECURITY,178,210,28,8
LTEXT "",IDC_NG_RESPAWNS,178,236,28,8
END
IDD_PLAYER_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Player Info"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_LIST,77,6,112,169,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Ship Type",IDC_STATIC,7,24,38,10
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,55,201,1
LTEXT "",IDC_PSHIP_TYPE,53,24,49,10,SS_SUNKEN
LTEXT "Mission Stats",IDC_STATIC,133,59,44,10
LTEXT "Primary Shots",IDC_STATIC,7,118,45,9
LTEXT "Primary Hits",IDC_STATIC,7,129,40,9
LTEXT "Primary BH Hits",IDC_STATIC,7,140,50,9
LTEXT "Primary Hit %",IDC_STATIC,7,151,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,7,162,55,9
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,106,24,1,222
LTEXT "All Time Stats",IDC_STATIC,33,59,44,10
LTEXT "Primary Shots",IDC_STATIC,109,118,45,9
LTEXT "Primary Hits",IDC_STATIC,109,129,40,9
LTEXT "Primary BH Hits",IDC_STATIC,109,140,50,9
LTEXT "Primary Hit %",IDC_STATIC,109,151,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,109,162,55,9
LTEXT "Secondary Shots",IDC_STATIC,7,173,56,9
LTEXT "Secondary Hits",IDC_STATIC,7,184,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,7,195,63,9
LTEXT "Secondary Hit %",IDC_STATIC,7,206,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,7,217,65,9
LTEXT "Secondary Shots",IDC_STATIC,109,173,56,9
LTEXT "Secondary Hits",IDC_STATIC,109,184,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,109,195,63,9
LTEXT "Secondary Hit %",IDC_STATIC,109,206,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,109,217,65,9
LTEXT "",IDC_PSHOTS,75,118,28,8,SS_SUNKEN
LTEXT "",IDC_PHITS,75,129,28,8,SS_SUNKEN
LTEXT "",IDC_PBHHITS,75,140,28,8,SS_SUNKEN
LTEXT "",IDC_PPCT,75,151,28,8,SS_SUNKEN
LTEXT "",IDC_PBHPCT,75,162,28,8,SS_SUNKEN
LTEXT "",IDC_SSHOTS,75,173,28,8,SS_SUNKEN
LTEXT "",IDC_SECHITS,75,184,28,8,SS_SUNKEN
LTEXT "",IDC_SBHHITS,75,195,28,8,SS_SUNKEN
LTEXT "",IDC_SPCT,75,206,28,8,SS_SUNKEN
LTEXT "",IDC_SBHPCT,75,217,28,8,SS_SUNKEN
LTEXT "",IDC_MPSHOTS,180,118,28,8,SS_SUNKEN
LTEXT "",IDC_MPHITS,180,129,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHHITS,180,140,28,8,SS_SUNKEN
LTEXT "",IDC_MPPCT,180,151,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHPCT,180,162,28,9,SS_SUNKEN
LTEXT "",IDC_MSSHOTS,180,173,28,8,SS_SUNKEN
LTEXT "",IDC_MSECHITS,180,184,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHHITS,180,195,28,8,SS_SUNKEN
LTEXT "",IDC_MSPCT,180,206,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHPCT,180,217,28,8,SS_SUNKEN
CONTROL "",IDC_PINFO_PING,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,235,201,1
LTEXT "Player",IDC_STATIC,44,6,20,8
LTEXT "",IDC_PING_TIME,53,38,49,10,SS_SUNKEN
LTEXT "Avg Ping",IDC_STATIC,7,38,32,9
LTEXT "Assists",IDC_STATIC,7,107,54,10
LTEXT "Assists",IDC_STATIC,109,107,54,10
LTEXT "",IDC_ASSISTS,75,107,28,8,SS_SUNKEN
LTEXT "",IDC_MASSISTS,180,107,28,8,SS_SUNKEN
LTEXT "Score",IDC_STATIC,7,73,20,8
LTEXT "Score",IDC_STATIC,109,73,20,8
LTEXT "Kills",IDC_STATIC,7,84,13,8
LTEXT "Kills",IDC_STATIC,109,84,13,8
LTEXT "Friendly Kills",IDC_STATIC,109,96,39,8
LTEXT "Friendly Kills",IDC_STATIC,7,96,39,8
LTEXT "",IDC_SCORE,75,74,28,8,SS_SUNKEN
LTEXT "",IDC_KILL_COUNT,75,85,28,8,SS_SUNKEN
LTEXT "",IDC_KILL_COUNT_BH,75,96,28,8,SS_SUNKEN
LTEXT "",IDC_MSCORE,180,74,28,8,SS_SUNKEN
LTEXT "",IDC_MKILL_COUNT,180,85,28,8,SS_SUNKEN
LTEXT "",IDC_MKILL_COUNT_BH,180,96,28,8,SS_SUNKEN
END
IDD_GODSTUFF DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "God Stuff"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_GOD_LIST,39,7,101,211,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_GODSTUFF_FPS,177,7,31,8,SS_SUNKEN
LTEXT "FPS",IDC_STATIC,154,7,16,8
LTEXT "Player ",IDC_STATIC,7,7,20,12
EDITTEXT IDC_GODSTUFF_BROADCAST,7,47,201,12,ES_MULTILINE
LTEXT "Server Message",IDC_STATIC,7,39,54,8
PUSHBUTTON "Send",IDC_GODSTUFF_SENDMESS,7,59,70,13
LISTBOX IDC_GOD_CHAT,7,84,201,162,LBS_NOINTEGRALHEIGHT |
LBS_NOSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
END
IDD_DEBUG_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Standalone State :",IDC_STATIC,7,7,61,11
LTEXT "",IDC_STANDALONE_STATE,71,7,125,11,SS_SUNKEN
LTEXT "Multi log:",IDC_STATIC,8,26,29,8
LISTBOX IDC_MULTILOG,7,37,201,209,NOT LBS_NOTIFY |
LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP
END
IDD_GEN DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "",IDC_FIELD1,27,11,136,8
CTEXT "",IDC_FIELD2,28,30,130,8
CTEXT "",IDC_FIELD3,27,49,138,8
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
"DEBUG_MENU", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 178
TOPMARGIN, 7
BOTTOMMARGIN, 152
END
"FIND_DIALOG", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 112
TOPMARGIN, 7
BOTTOMMARGIN, 40
END
IDD_CONNECT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_MULTI, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 206
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_PLAYER_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 6
BOTTOMMARGIN, 246
END
IDD_GODSTUFF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_DEBUG_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_GEN, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 5
BOTTOMMARGIN, 88
END
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,14,9276
PRODUCTVERSION 3,6,14,9276
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Volition Inc."
VALUE "FileDescription", "FreeSpace 2 Open"
VALUE "FileVersion", "3.6.14.9276"
VALUE "InternalName", "FreeSpace 2 Open"
VALUE "LegalCopyright", "Copyright © 1998"
VALUE "OriginalFilename", "fs2.exe"
VALUE "ProductName", "FreeSpace 2 Open"
VALUE "ProductVersion", "3.6.14"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_GOAL_INC BITMAP DISCARDABLE "goal_inc.bmp"
IDB_GOAL_COMP BITMAP DISCARDABLE "goal_com.bmp"
IDB_GOAL_ORD BITMAP DISCARDABLE "goal_ord.bmp"
IDB_GOAL_NONE BITMAP DISCARDABLE "goal_none.bmp"
IDB_GOAL_FAIL BITMAP DISCARDABLE "goal_fail.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
/* VS2008 can support stuff that these builds can't */
#ifndef _VC08
/* Non-VS2008 builds get one of two icons */
#ifdef _DEBUG
IDI_APP_ICON ICON DISCARDABLE "dbg_icon.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "app_icon.ico"
#endif
#else
/* VS2008 builds get cool icons */
#ifdef _DEBUG
#ifdef _SSE2
IDI_APP_ICON ICON DISCARDABLE "V_sse-d.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "V_debug.ico"
#endif
#else
#ifdef _SSE2
IDI_APP_ICON ICON DISCARDABLE "V_sse.ico"
#else
IDI_APP_ICON ICON DISCARDABLE "V_app.ico"
#endif
#endif
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// SRGRAMMAR
//
#ifdef FS2_VOICER
IDR_CMD_CFG SRGRAMMAR DISCARDABLE "..\..\code\sound\phrases.cfg"
#endif
+2 -2
View File
@@ -71,7 +71,7 @@ static int Last_activity = -1;
static int Login_retry_time = -1;
static SCP_vector<file_record> FS2NetD_file_list;
static SCP_vector<SCP_string> FS2NetD_ban_list;
static SCP_vector<std::string> FS2NetD_ban_list;
SCP_vector<crc_valid_status> Table_valid_status;
@@ -1183,7 +1183,7 @@ void fs2netd_update_ban_list()
CFILE *banlist_cfg = cfopen("banlist.cfg", "wt", CFILE_NORMAL, CF_TYPE_DATA);
if (banlist_cfg != NULL) {
for (SCP_vector<SCP_string>::iterator bl = FS2NetD_ban_list.begin(); bl != FS2NetD_ban_list.end(); ++bl) {
for (SCP_vector<std::string>::iterator bl = FS2NetD_ban_list.begin(); bl != FS2NetD_ban_list.end(); ++bl) {
cfputs( const_cast<char*>(bl->c_str()), banlist_cfg );
}
+1 -1
View File
@@ -313,7 +313,7 @@ int FS2NetD_GetPlayerData(const char *player_name, player *pl, bool can_create,
return -1;
}
int FS2NetD_GetBanList(SCP_vector<SCP_string> &mask_list, bool do_send)
int FS2NetD_GetBanList(SCP_vector<std::string> &mask_list, bool do_send)
{
int buffer_size, buffer_offset;
bool my_packet = false;
+1 -1
View File
@@ -31,7 +31,7 @@ int FS2NetD_CheckSingleMission(const char *m_name, uint crc32, bool do_send);
int FS2NetD_SendPlayerData(const char *player_name, player *pl, bool do_send);
int FS2NetD_GetPlayerData(const char *player_name, player *pl, bool can_create, bool do_send);
int FS2NetD_GetBanList(SCP_vector<SCP_string> &mask_list, bool do_send);
int FS2NetD_GetBanList(SCP_vector<std::string> &mask_list, bool do_send);
int FS2NetD_GetMissionsList(SCP_vector<file_record> &m_list, bool do_send);
-13
View File
@@ -433,16 +433,3 @@ int gameseq_get_state_idx(char *s)
return -1;
}
// If the given state exists in the stack then return the index, -1 if not
int gameseq_get_state_idx(int state)
{
for(int i = 0; i <= gs_current_stack; i++)
{
if (gs[i].current_state == state) {
return i;
}
}
return -1;
}
-3
View File
@@ -193,7 +193,4 @@ bool GameState_Stack_Valid();
int gameseq_get_event_idx(char *s);
int gameseq_get_state_idx(char *s);
//zookeeper
int gameseq_get_state_idx(int state);
#endif /* __GAMESEQUENCE_H__ */
+1 -6
View File
@@ -1778,7 +1778,7 @@ int event_music_get_soundtrack_index(char *name)
return -1;
}
int event_music_get_spooled_music_index(const char *name)
int event_music_get_spooled_music_index(char *name)
{
// find the correct index for the event music
for ( int i = 0; i < Num_music_files; i++ ) {
@@ -1790,11 +1790,6 @@ int event_music_get_spooled_music_index(const char *name)
return -1;
}
int event_music_get_spooled_music_index(const SCP_string& name)
{
return event_music_get_spooled_music_index(name.c_str());
}
// set a score based on name
void event_music_set_score(int score_index, char *name)
{
+1 -2
View File
@@ -123,8 +123,7 @@ void event_sexp_change_soundtrack(char *name);
void event_music_set_soundtrack(char *name);
void event_music_set_score(int score_index, char *name);
int event_music_get_soundtrack_index(char *name);
int event_music_get_spooled_music_index(const char *name);
int event_music_get_spooled_music_index(const SCP_string& name);
int event_music_get_spooled_music_index(char *name);
void event_music_reset_choices();
int event_music_player_respawn();
int event_music_player_respawn_as_observer();
+179 -188
View File
@@ -16,9 +16,16 @@
#include "sound/ds.h"
#include <limits.h>
SCP_vector<game_snd> Snds;
SCP_vector<game_snd> Snds_iface;
SCP_vector<int> Snds_iface_handle;
SCP_vector<game_snd> Snds;
SCP_vector<game_snd> Snds_iface;
SCP_vector<int> Snds_iface_handle;
#define GAME_SND 0
#define IFACE_SND 1
void gamesnd_add_sound_slot(int type, int num);
void gamesnd_play_iface(int n)
{
@@ -52,30 +59,6 @@ int gamesnd_get_by_name(char* name)
return -1;
}
int gamesnd_get_by_iface_name(char* name)
{
Assert( Snds_iface.size() <= INT_MAX );
Assert( Snds_iface.size() == Snds_iface_handle.size() );
int i = 0;
for(SCP_vector<game_snd>::iterator snd = Snds_iface.begin(); snd != Snds_iface.end(); ++snd)
{
char *p = strrchr( snd->filename, '.' );
if(p == NULL)
{
if(!stricmp(snd->filename, name))
{
return i;
}
}
else if(!strnicmp(snd->filename, name, p-snd->filename))
{
return i;
}
i++;
}
return -1;
}
int gamesnd_get_by_tbl_index(int index)
{
//if we get passed -1, don't bother trying to look it up.
@@ -95,13 +78,10 @@ int gamesnd_get_by_tbl_index(int index)
int gamesnd_get_by_iface_tbl_index(int index)
{
//if we get passed -1, don't bother trying to look it up.
if (index == -1)
return -1;
Assert( Snds_iface.size() <= INT_MAX );
Assert( Snds_iface.size() == Snds_iface_handle.size() );
int i = 0;
for(SCP_vector<game_snd>::iterator snd = Snds_iface.begin(); snd != Snds_iface.end(); ++snd) {
for(SCP_vector<game_snd>::iterator snd = Snds.begin(); snd != Snds.end(); ++snd) {
if ( snd->sig == index )
{
return i;
@@ -111,139 +91,44 @@ int gamesnd_get_by_iface_tbl_index(int index)
return -1;
}
/**
* Helper function for parse_sound and parse_sound_list. Do not use directly.
*
* @param tag Tag
* @param idx_dest Sound index destination
* @param object_name Object name being parsed
* @param buf Buffer holding string to be parsed
* @param flags See the parse_sound_flags enum
*
*/
void parse_sound_core(char* tag, int *idx_dest, char* object_name, char* buf, parse_sound_flags flags)
//Takes a tag, a sound index destination, and the object name being parsed
//tag and object_name are mostly so that we can debug stuff
//This also means you shouldn't use optional_string or required_string,
//just make sure the destination sound index can handle -1 if things
//don't work out.
void parse_sound(char* tag, int *idx_dest, char* object_name)
{
char buf[MAX_FILENAME_LEN];
int idx;
if(flags & PARSE_SOUND_INTERFACE_SOUND)
idx = gamesnd_get_by_iface_name(buf);
else
idx = gamesnd_get_by_name(buf);
if(idx != -1)
{
(*idx_dest) = idx;
}
else
{
if(flags & PARSE_SOUND_INTERFACE_SOUND)
idx = gamesnd_get_by_iface_tbl_index(atoi(buf));
else
idx = gamesnd_get_by_tbl_index(atoi(buf));
if (idx != -1)
(*idx_dest) = idx;
}
int size_to_check = 0;
if(flags & PARSE_SOUND_INTERFACE_SOUND)
{
size_to_check = Snds_iface.size();
Assert( Snds_iface.size() == Snds_iface_handle.size() );
}
else
{
size_to_check = Snds.size();
}
Assert( size_to_check <= INT_MAX );
//Ensure sound is in range
if((*idx_dest) < -1 || (*idx_dest) >= (int)size_to_check)
{
(*idx_dest) = -1;
Warning(LOCATION, "%s sound index out of range on '%s'. Must be between 0 and %d. Forcing to -1 (Nonexistent sound).\n", tag, object_name, size_to_check);
}
}
/**
* Parse a sound. When using this function for a table entry,
* required_string and optional_string aren't needed, as this function deals with
* that as its tag parameter, just make sure that the destination sound index can
* handle -1 if things don't work out.
*
* @param tag Tag
* @param idx_dest Sound index destination
* @param object_name Object name being parsed
* @param flags See the parse_sound_flags enum
*
*/
void parse_sound(char* tag, int *idx_dest, char* object_name, parse_sound_flags flags)
{
if(optional_string(tag))
{
char buf[MAX_FILENAME_LEN];
stuff_string(buf, F_NAME, MAX_FILENAME_LEN);
parse_sound_core(tag, idx_dest, object_name, buf, flags);
}
}
/**
* CommanderDJ - Parse a list of sounds. When using this function for a table entry,
* required_string and optional_string aren't needed, as this function deals with
* that as its tag parameter, just make sure that the destination sound index(es) can
* handle -1 if things don't work out.
*
* @param destination Vector where sound indexes are to be stored
* @param tag Tag
* @param object_name Name of object being parsed
* @param flags See the parse_sound_flags enum
*
*/
void parse_sound_list(char* tag, SCP_vector<int>& destination, char* object_name, parse_sound_flags flags)
{
if(optional_string(tag))
{
int check=0;
//if we're using the old format, parse the first entry separately
if(!(flags & PARSE_SOUND_SCP_SOUND_LIST))
idx = gamesnd_get_by_name(buf);
if(idx != -1)
(*idx_dest) = idx;
else
{
stuff_int(&check);
idx = gamesnd_get_by_tbl_index(atoi(buf));
if (idx != -1)
(*idx_dest) = idx;
}
//now read the rest of the entries on the line
for(int i=0;!check_for_eoln();i++)
Assert( Snds.size() <= INT_MAX );
//Ensure sound is in range
if((*idx_dest) < -1 || (*idx_dest) >= (int)Snds.size())
{
char buf[MAX_FILENAME_LEN];
stuff_string_white(buf, MAX_FILENAME_LEN);
//we do this conditionally to avoid adding needless entries when reparsing
if(destination.size() <= (unsigned)i)
{
destination.push_back(-1);
}
parse_sound_core(tag, &destination.at(i), object_name, buf, flags);
}
//if we're using the old format, double check the size)
if(!(flags & PARSE_SOUND_SCP_SOUND_LIST) && (destination.size() != (unsigned)check))
{
mprintf(("%s in '%s' has %i entries. This does not match entered size of %i.", tag, object_name, destination.size(), check));
(*idx_dest) = -1;
Warning(LOCATION, "%s sound index out of range on '%s'. Must be between 0 and %d. Forcing to -1 (Nonexistant sound).\n", tag, object_name, Snds.size());
}
}
}
/**
* Load in sounds that we expect will get played
*
* The method currently used is to load all those sounds that have the hardware flag
* set. This works well since we don't want to try and load hardware sounds in on the
* fly (too slow).
*/
// load in sounds that we expect will get played
//
// The method currently used is to load all those sounds that have the hardware flag
// set. This works well since we don't want to try and load hardware sounds in on the
// fly (too slow).
void gamesnd_preload_common_sounds()
{
if ( !Sound_enabled )
@@ -260,9 +145,11 @@ void gamesnd_preload_common_sounds()
}
}
/**
* Load the ingame sounds into memory
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_load_gameplay_sounds()
//
// Load the ingame sounds into memory
//
void gamesnd_load_gameplay_sounds()
{
if ( !Sound_enabled )
@@ -279,9 +166,11 @@ void gamesnd_load_gameplay_sounds()
}
}
/**
* Unload the ingame sounds from memory
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_unload_gameplay_sounds()
//
// Unload the ingame sounds from memory
//
void gamesnd_unload_gameplay_sounds()
{
Assert( Snds.size() <= INT_MAX );
@@ -293,9 +182,11 @@ void gamesnd_unload_gameplay_sounds()
}
}
/**
* Load the interface sounds into memory
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_load_interface_sounds()
//
// Load the interface sounds into memory
//
void gamesnd_load_interface_sounds()
{
if ( !Sound_enabled )
@@ -309,9 +200,11 @@ void gamesnd_load_interface_sounds()
}
}
/**
* Unload the interface sounds from memory
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_unload_interface_sounds()
//
// Unload the interface sounds from memory
//
void gamesnd_unload_interface_sounds()
{
Assert( Snds_iface.size() < INT_MAX );
@@ -324,9 +217,11 @@ void gamesnd_unload_interface_sounds()
}
}
/**
* Parse a sound effect line
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_parse_line()
//
// Parse a sound effect line
//
void gamesnd_parse_line(game_snd *gs, char *tag)
{
int is_3d;
@@ -354,18 +249,23 @@ void gamesnd_parse_line(game_snd *gs, char *tag)
advance_to_eoln(NULL);
}
/**
* Parse the sounds.tbl file, and load the specified sounds.
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_parse_soundstbl() will parse the sounds.tbl file, and load the specified sounds.
//
//
void gamesnd_parse_soundstbl()
{
int rval;
size_t i;
int num_game_sounds = 0;
int num_iface_sounds = 0;
int i;
char cstrtemp[NAME_LENGTH+3];
char *missing_species_names = NULL;
ubyte *missing_species = NULL;
int sanity_check = 0;
gamesnd_init_sounds();
// open localization
lcl_ext_open();
@@ -381,20 +281,22 @@ void gamesnd_parse_soundstbl()
// Parse the gameplay sounds section
required_string("#Game Sounds Start");
while (required_string_either("#Game Sounds End","$Name:")) {
game_snd tempSound;
gamesnd_parse_line( &tempSound, "$Name:" );
Snds.push_back(game_snd(tempSound));
Assert( Snds.size() < INT_MAX );
Assert( num_game_sounds < (int)Snds.size() );
gamesnd_parse_line( &Snds[num_game_sounds], "$Name:" );
num_game_sounds++;
gamesnd_add_sound_slot( GAME_SND, num_game_sounds );
}
required_string("#Game Sounds End");
// Parse the interface sounds section
required_string("#Interface Sounds Start");
while (required_string_either("#Interface Sounds End","$Name:")) {
game_snd tempSound;
gamesnd_parse_line( &tempSound, "$Name:");
Snds_iface.push_back(game_snd(tempSound));
Snds_iface_handle.push_back(-1);
Assert( Snds_iface_handle.size() < INT_MAX );
Assert( num_iface_sounds < (int)Snds_iface.size() );
gamesnd_parse_line(&Snds_iface[num_iface_sounds], "$Name:");
num_iface_sounds++;
gamesnd_add_sound_slot( IFACE_SND, num_iface_sounds );
}
required_string("#Interface Sounds End");
@@ -409,7 +311,7 @@ void gamesnd_parse_soundstbl()
while ( !check_for_string("#Flyby Sounds End") && (sanity_check <= (int)Species_info.size()) )
{
for (i = 0; i < Species_info.size(); i++) {
for (i = 0; i < (int)Species_info.size(); i++) {
species_info *species = &Species_info[i];
sprintf(cstrtemp, "$%s:", species->species_name);
@@ -426,7 +328,7 @@ void gamesnd_parse_soundstbl()
}
// if we are missing any species then report it
for (i = 0; i < Species_info.size(); i++) {
for (i = 0; i < (int)Species_info.size(); i++) {
if ( missing_species[i] ) {
strcat(missing_species_names, Species_info[i].species_name);
strcat(missing_species_names, "\n");
@@ -586,9 +488,56 @@ void gamesnd_parse_soundstbl()
lcl_ext_close();
}
/**
* Close out gamesnd, ONLY CALL FROM game_shutdown()!!!!
*/
// -------------------------------------------------------------------------------------------------
// gamesnd_init_struct()
//
void gamesnd_init_struct(game_snd *gs)
{
gs->sig = -1;
gs->filename[0] = 0;
gs->id = -1;
gs->id_sig = -1;
// gs->is_3d = 0;
// gs->use_ds3d = 0;
gs->flags = 0;
}
// -------------------------------------------------------------------------------------------------
// gamesnd_init_sounds() will initialize the Snds[] and Snds_iface[] arrays
//
void gamesnd_init_sounds()
{
int i = 0;
Snds.clear();
Snds.resize(MIN_GAME_SOUNDS);
Assert( Snds.size() > 0 );
Assert( Snds.size() <= INT_MAX );
// init the gameplay sounds
for (SCP_vector<game_snd>::iterator gs = Snds.begin(); gs != Snds.end(); ++gs) {
gamesnd_init_struct(&(*gs));
}
Snds_iface.clear();
Snds_iface.resize(MIN_INTERFACE_SOUNDS);
Snds_iface_handle.resize(MIN_INTERFACE_SOUNDS);
Assert( Snds_iface.size() > 0 );
Assert( Snds_iface.size() < INT_MAX );
// init the interface sounds
for (SCP_vector<game_snd>::iterator si = Snds_iface.begin(); si != Snds_iface.end(); ++si) {
gamesnd_init_struct(&(*si));
Snds_iface_handle[i] = -1;
i++;
}
}
// close out gamesnd, ONLY CALL FROM game_shutdown()!!!!
void gamesnd_close()
{
Snds.clear();
@@ -596,18 +545,60 @@ void gamesnd_close()
Snds_iface_handle.clear();
}
/**
* Callback function for the UI code to call when the mouse first goes over a button.
*/
// callback function for the UI code to call when the mouse first goes over a button.
void common_play_highlight_sound()
{
gamesnd_play_iface(SND_USER_OVER);
}
/**
* Callback function for the UI code to call when an error beep needed.
*/
void gamesnd_play_error_beep()
{
gamesnd_play_iface(SND_GENERAL_FAIL);
}
void gamesnd_add_sound_slot(int type, int num)
{
const int increase_by = 5;
int i;
switch (type) {
case GAME_SND:
{
Assert( Snds.size() <= INT_MAX );
Assert( num < ((int)Snds.size() + increase_by) );
if (num >= (int)Snds.size()) {
Snds.resize(Snds.size() + increase_by);
// default all new entries
for (i = ((int)Snds.size() - increase_by); i < (int)Snds.size(); i++) {
gamesnd_init_struct(&Snds[i]);
}
}
}
break;
case IFACE_SND:
{
Assert( Snds_iface.size() < INT_MAX );
Assert( num < ((int)Snds_iface.size() + increase_by) );
if (num >= (int)Snds_iface.size()) {
Snds_iface.resize(Snds_iface.size() + increase_by);
Snds_iface_handle.resize(Snds_iface.size());
Assert( Snds_iface.size() < INT_MAX );
// default all new entries
for (i = ((int)Snds_iface_handle.size() - increase_by); i < (int)Snds_iface_handle.size(); i++) {
gamesnd_init_struct(&Snds_iface[i]);
Snds_iface_handle[i] = -1;
}
}
}
break;
default:
Int3();
}
}
+2 -14
View File
@@ -17,34 +17,22 @@
void gamesnd_parse_soundstbl(); // Loads in general game sounds from sounds.tbl
void gamesnd_init_sounds(); // Initializes the Snds and Snds_iface STL vectors
void gamesnd_close(); // close out gamesnd... only call from game_shutdown()!
void gamesnd_load_gameplay_sounds();
void gamesnd_unload_gameplay_sounds();
void gamesnd_load_interface_sounds();
void gamesnd_unload_interface_sounds();
void gamesnd_preload_common_sounds();
void gamesnd_load_gameplay_sounds();
void gamesnd_unload_gameplay_sounds();
void gamesnd_play_iface(int n);
void gamesnd_play_error_beep();
int gamesnd_get_by_name(char* name);
int gamesnd_get_by_iface_name(char* name);
int gamesnd_get_by_tbl_index(int index);
int gamesnd_get_by_iface_tbl_index(int index);
//flags for parse_sound and parse_sound_list
enum parse_sound_flags
{
PARSE_SOUND_GENERAL_SOUND = 0, //!< search for sound in the general table in sound.tbl
PARSE_SOUND_INTERFACE_SOUND = (1 << 0), //!< Search for sound in the interface part of sounds.tbl
PARSE_SOUND_SCP_SOUND_LIST = (1 << 1), //!< Parse the list of sounds SCP style (just indexes and/or files names, no count first)
PARSE_SOUND_MAX
};
//This should handle NO_SOUND just fine since it doesn't directly access lowlevel code
//Does all parsing for a sound
void parse_sound(char* tag, int* idx_dest, char* object_name, parse_sound_flags = PARSE_SOUND_GENERAL_SOUND);
void parse_sound_list(char* tag, SCP_vector<int>& destination, char* object_name, parse_sound_flags = PARSE_SOUND_GENERAL_SOUND);
void parse_sound(char* tag, int *idx_dest, char* object_name);
// this is a callback, so it needs to be a real function
void common_play_highlight_sound();
-29
View File
@@ -1,29 +0,0 @@
#include "globalincs/compatibility.h"
#include "stdlib.h"
int rand_function(int limit)
{
return (rand() % limit);
}
// adapted from http://www.cplusplus.com/reference/algorithm/random_shuffle/
void random_shuffle(int *first, int *last)
{
random_shuffle(first, last, rand_function);
}
// adapted from http://www.cplusplus.com/reference/algorithm/random_shuffle/
template <class RandomNumberGenerator>
void random_shuffle(int *first, int *last, RandomNumberGenerator& custom_rand)
{
int i, n, temp;
n = (last-first);
for (i=n-1; i>0; --i)
{
int pos = custom_rand(i+1);
temp = first[i];
first[i] = first[pos];
first[pos] = temp;
}
}
-9
View File
@@ -1,9 +0,0 @@
#ifndef __COMPATIBILITY_H__
#define __COMPATIBILITY_H__
void random_shuffle(int *first, int *last);
template <class RandomNumberGenerator>
void random_shuffle(int *first, int *last, RandomNumberGenerator& custom_rand);
#endif
+36 -58
View File
@@ -39,7 +39,6 @@ extern char* Default_post_vertex_shader;
extern char* Default_fxaa_prepass_shader;
extern char* Default_particle_vertex_shader;
extern char* Default_particle_fragment_shader;
extern char* Default_lightshaft_fragment_shader;
extern char* Default_video_vertex_shader;
extern char* Default_video_fragment_shader;
//**********
@@ -67,7 +66,6 @@ def_file Default_files[] =
{ "fxaapre-f.sdr", Default_fxaa_prepass_shader},
{ "soft-v.sdr", Default_particle_vertex_shader},
{ "soft-f.sdr", Default_particle_fragment_shader},
{ "ls-f.sdr", Default_lightshaft_fragment_shader},
{ "video-v.sdr", Default_video_vertex_shader},
{ "video-f.sdr", Default_video_fragment_shader}
};
@@ -888,14 +886,8 @@ $Max Aim Update Delay: 0, 0, 0, 0, 0 \n\
;; aim. Applies for turrets vs small ships \n\
$Turret Max Aim Update Delay: 0, 0, 0, 0, 0 \n\
\n\
;; Size of the player autoaim cone for each difficulty level \n\
;; Only affects the player. If the ship has autoaim, the wider FOV value\n\
;; will be used. Uses convergence. \n\
$Player Autoaim FOV: 0, 0, 0, 0, 0 \n\
\n\
;; The multiplier that affects at what range LOD switching will occur. \n\
;; NOTE THAT THIS IS NOT BY DIFFICULTY LEVEL (it's by model detail level\n\
;; in the Options menu) \n\
;; The maximum amount of delay allowed before turret AI will update its \n\
;; aim. Applies for turrets vs small ships \n\
$Detail Distance Multiplier: 0.125, 0.25, 1.0, 4.0, 8.0 \n\
\n\
;; General AI-related flags. These were previously all lumped together \n\
@@ -1231,10 +1223,7 @@ char* Default_main_vertex_shader =
" #ifdef FLAG_FOG\n"
" fogDist = clamp((gl_Position.z - gl_Fog.start) * 0.75 * gl_Fog.scale, 0.0, 1.0);\n"
" #endif\n"
" #ifdef __GLSL_CG_DATA_TYPES\n"
" // Check necessary for ATI specific behavior\n"
" gl_ClipVertex = (gl_ModelViewMatrix * gl_Vertex);\n"
" #endif\n"
"}";
char *Default_main_fragment_shader =
@@ -1278,12 +1267,12 @@ char *Default_main_fragment_shader =
"#endif\n"
"#define SPEC_INTENSITY_POINT 5.3 // Point light\n"
"#define SPEC_INTENSITY_DIRECTIONAL 3.0 // Directional light\n"
"#define SPECULAR_FACTOR 1.75\n"
"#define SPECULAR_FACTOR 1.75\n"
"#define SPECULAR_ALPHA 0.1\n"
"#define SPEC_FACTOR_NO_SPEC_MAP 0.6\n"
"#define SPEC_FACTOR_NO_SPEC_MAP 0.6\n"
"#define ENV_ALPHA_FACTOR 0.3\n"
"#define GLOW_MAP_INTENSITY 1.5\n"
"#define AMBIENT_LIGHT_BOOST 1.0\n"
"#define AMBIENT_LIGHT_BOOST 1.0\n"
"void main()\n"
"{\n"
" vec3 eyeDir = vec3(normalize(-position).xyz); // Camera is at (0,0,0) in ModelView space\n"
@@ -2166,9 +2155,16 @@ char* Default_fxaa_prepass_shader =
char* Default_particle_vertex_shader =
"attribute float radius_in;\n"
"varying float radius;\n"
"#ifdef FLAG_DISTORTION\n"
"attribute float offset_in;\n"
"varying float offset_out;\n"
"#endif\n"
"void main()\n"
"{\n"
" radius = radius_in;\n"
" #ifdef FLAG_DISTORTION\n"
" offset_out = offset_in;\n"
" #endif\n"
" gl_TexCoord[0] = gl_MultiTexCoord0;\n"
" gl_Position = ftransform();\n"
" gl_FrontColor = gl_Color;\n"
@@ -2190,69 +2186,51 @@ char* Default_particle_fragment_shader =
"#ifdef FLAG_DISTORTION\n"
"uniform sampler2D distMap;\n"
"uniform sampler2D frameBuffer;\n"
"varying float offset_out;\n"
"#endif\n"
"void main()\n"
"{\n"
" #ifndef FLAG_DISTORTION\n"
" vec2 offset = vec2(radius * abs(0.5 - gl_TexCoord[0].x) * 2.0, radius * abs(0.5 - gl_TexCoord[0].y) * 2.0);\n"
" #ifndef FLAG_DISTORTION\n"
" vec2 offset = vec2(\n"
" radius * abs(0.5 - gl_TexCoord[0].x) * 2.0,\n"
" radius * abs(0.5 - gl_TexCoord[0].y) * 2.0\n"
" );\n"
" float offset_len = length(offset);\n"
" if (offset_len > radius) {\n"
" if (offset_len > radius)\n"
" {\n"
" gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n"
" return;\n"
" }\n"
" vec2 depthCoord = vec2(gl_FragCoord.x / window_width, gl_FragCoord.y / window_height );\n"
" vec2 depthCoord = vec2(\n"
" gl_FragCoord.x / window_width,\n"
" gl_FragCoord.y / window_height\n"
" );\n"
" vec4 sceneDepth = texture2D(depthMap, depthCoord);\n"
" float sceneDepthLinear = ( 2.0 * farZ * nearZ ) / ( farZ + nearZ - sceneDepth.x * (farZ-nearZ) );\n"
" float fragDepthLinear = ( 2.0 * farZ * nearZ ) / ( farZ + nearZ - gl_FragCoord.z * (farZ-nearZ) );\n"
" // assume UV of 0.5, 0.5 is the centroid of this sphere volume\n"
" float depthOffset = sqrt(pow(radius, 2.0) - pow(offset_len, 2.0));\n"
" float depthOffset = sqrt(\n"
" pow(radius, 2.0) -\n"
" pow(offset_len, 2.0)\n"
" );\n"
" float frontDepth = fragDepthLinear - depthOffset;\n"
" float backDepth = fragDepthLinear + depthOffset;\n"
" float ds = min(sceneDepthLinear, backDepth) - max(nearZ, frontDepth);\n"
" vec4 fragmentColor = texture2D(baseMap, gl_TexCoord[0].xy)*gl_Color.a;\n"
" fragmentColor = fragmentColor * ( ds / (depthOffset*2.0) );\n"
" gl_FragColor = fragmentColor;\n"
" #else\n"
" vec2 depthCoord = vec2(gl_FragCoord.x / window_width, gl_FragCoord.y / window_height);\n"
" #else\n"
" vec2 depthCoord = vec2(\n"
" gl_FragCoord.x / window_width,\n"
" gl_FragCoord.y / window_height\n"
" );\n"
" vec4 fragmentColor = texture2D(baseMap, gl_TexCoord[0].xy)*gl_Color.a;\n"
" vec2 distortion = texture2D(distMap, gl_TexCoord[0].xy).rg;\n"
" vec2 distortion = texture2D(distMap, gl_TexCoord[0].xy+vec2(0.0, offset_out)).rg;\n"
" float alpha = clamp(dot(fragmentColor.rgb,vec3(0.3333))*10.0,0.0,1.0);\n"
" distortion = ((distortion - 0.5) * 0.01) * alpha;\n"
" gl_FragColor = texture2D(frameBuffer,depthCoord+distortion);\n"
" gl_FragColor.a = alpha;\n"
" #endif\n"
"}";
char* Default_lightshaft_fragment_shader =
"uniform sampler2D scene;\n"
"uniform sampler2D cockpit;\n"
"uniform vec2 sun_pos;\n"
"uniform float density;\n"
"uniform float weight;\n"
"uniform float falloff;\n"
"uniform float intensity;\n"
"uniform float cp_intensity;\n"
"void main()\n"
"{\n"
" vec2 step = vec2( gl_TexCoord[0].st - sun_pos.xy );\n"
" vec2 pos = gl_TexCoord[0].st;\n"
" step *= 1.0 / float(SAMPLE_NUM) * density;\n"
" float decay = 1.0;\n"
" vec4 sum = vec4(0.0);\n"
" vec4 mask = texture2D(cockpit, gl_TexCoord[0].st);\n"
" if (mask.r < 1.0) {\n"
" gl_FragColor = vec4(cp_intensity);\n"
" return;\n"
" }\n"
" for(int i=0; i < SAMPLE_NUM ; i++) {\n"
" pos.st -= step;\n"
" vec4 sample = texture2D(scene, pos);\n"
" if (sample.r == 1.0)\n"
" sum += decay * weight;\n"
" decay *= falloff;\n"
" }\n"
" gl_FragColor = sum * intensity;\n"
" gl_FragColor.a = 1.0;\n"
" #endif\n"
"}";
char *Default_video_vertex_shader =
@@ -2264,7 +2242,7 @@ char *Default_video_vertex_shader =
" gl_FrontSecondaryColor = vec4(0.0, 0.0, 0.0, 1.0);\n"
"}";
char * Default_video_fragment_shader =
char * Default_video_fragment_shader =
"uniform sampler2D ytex;\n"
"uniform sampler2D utex;\n"
"uniform sampler2D vtex;\n"
+57 -2
View File
@@ -55,7 +55,7 @@ do { \
(b)->prev->next = (a); \
} while (0)
// Removes an element from the list
// Removes an element from listit's in
#define list_remove( head, elem ) \
do { \
(elem)->prev->next = (elem)->next; \
@@ -64,7 +64,17 @@ do { \
(elem)->prev = NULL; \
} while(0)
// Moves elem to be after head
//Moves elem to be after destelem
/*
#define list_move_append(destelem, elem) \
do { \
(elem)->prev->next = (elem)->next; \
(elem)->next->prev = (elem)->prev; \
(elem)->prev = (destelem); \
(elem)->next = (destelem)->next; \
(destelem)->next->prev = (elem); \
(destelem)->next = (elem); \
} while (0)*/
#define list_move_append(head, elem) \
do { \
(elem)->prev->next = (elem)->next; \
@@ -83,4 +93,49 @@ do { \
#define NOT_EMPTY(head) ((head)->next != (head))
#define EMPTY(head) ((head)->next == (head))
template <class StoreType> class linked_list
{
protected:
StoreType *m_next;
StoreType *m_prev;
int n_elem;
public:
linked_list()
{
m_next=(StoreType*)this;
m_prev=(StoreType*)this;
n_elem=0;
}
~linked_list(){n_elem=0;}
//Getting
StoreType *get_first(){return m_next;}
//Setting
void append(StoreType *ptr)
{
ptr->m_prev=m_prev;
ptr->m_next=(StoreType*)this;
m_prev->m_next=ptr; m_prev=ptr;
n_elem++;
}
void remove(StoreType *ptr)
{
ptr->m_prev->m_next=ptr->m_next;
ptr->m_next->m_prev=ptr->m_prev;
ptr->m_next = 0; //These should both be 0
ptr->m_prev = 0; //But stupid MSVC doesn't like a NULL here
n_elem--;
}
StoreType *get_next(){return m_next;}
//Querying
bool is_end(StoreType *ptr){return (ptr==this);}
int get_num_elements() { return n_elem;}
};
#endif
+1 -1
View File
@@ -40,7 +40,7 @@
#define FS_VERSION_MAJOR 3 // major version
#define FS_VERSION_MINOR 6 // increase by 1 for minor revs
#define FS_VERSION_BUILD 13 // bugfix release
#define FS_VERSION_REVIS 0000 // SVN revision
#define FS_VERSION_REVIS 9276 // SVN revision
#define VERSION_LOC_FNAME "version.nfo"
#define MOTD_LOC_FNAME "motd.txt"
+8 -8
View File
@@ -157,9 +157,9 @@ public:
UNREFERENCED_PARAMETER( error );
}
SCP_string DumpToString( )
std::string DumpToString( )
{
SCP_string callstack;
std::string callstack;
for ( size_t i = 0; i < m_stackFrames.size( ); i++ )
{
callstack += m_stackFrames[ i ].module + "! " + m_stackFrames[ i ].symbol + "\n";
@@ -170,8 +170,8 @@ public:
private:
struct StackEntry
{
SCP_string module;
SCP_string symbol;
std::string module;
std::string symbol;
};
SCP_vector< StackEntry > m_stackFrames;
@@ -870,7 +870,7 @@ void _cdecl WinAssert(char * text, char * filename, int linenum )
SCP_DumpStack( dynamic_cast< SCP_IDumpHandler* >( &callStack ) );
/* Format the string */
SCP_string assertString( AssertText1 );
std::string assertString( AssertText1 );
assertString += "\n";
assertString += callStack.DumpToString( );
@@ -935,7 +935,7 @@ void _cdecl WinAssert(char * text, char * filename, int linenum, const char * fo
SCP_DumpStack( dynamic_cast< SCP_IDumpHandler* >( &callStack ) );
/* Format the string */
SCP_string assertString( AssertText1 );
std::string assertString( AssertText1 );
assertString += "\n";
assertString += callStack.DumpToString( );
@@ -1111,7 +1111,7 @@ void _cdecl Error( const char * filename, int line, const char * format, ... )
SCP_DumpStack( dynamic_cast< SCP_IDumpHandler* >( &callStack ) );
/* Format the string */
SCP_string assertString( AssertText1 );
std::string assertString( AssertText1 );
assertString += "\n";
assertString += callStack.DumpToString( );
@@ -1227,7 +1227,7 @@ void _cdecl Warning( char *filename, int line, const char *format, ... )
SCP_DumpStack( dynamic_cast< SCP_IDumpHandler* >( &callStack ) );
/* Format the string */
SCP_string assertString( AssertText1 );
std::string assertString( AssertText1 );
assertString += "\n";
assertString += callStack.DumpToString( );
+35 -6
View File
@@ -109,7 +109,12 @@ struct buffer_data {
size_t index_offset;
uint *index;
const uint *get_index() const
{
return index;
}
uint i_first, i_last;
void release()
{
@@ -119,10 +124,26 @@ struct buffer_data {
}
}
buffer_data() :
flags(0), texture(-1), n_verts(0), index_offset(0), index(NULL)
void assign(int i, uint j)
{
const_cast<uint *>(index)[i] = j;
if (i_first > i_last)
i_first = i_last = j;
else if (i_first > j)
i_first = j;
else if (i_last < j)
i_last = j;
}
buffer_data(int n_vrts) :
flags(0), texture(-1), n_verts(n_vrts), index_offset(0),
i_first(1), i_last(0)
{
index = new(std::nothrow) uint[n_verts];
}
private:
uint *index;
};
struct vertex_buffer {
@@ -152,8 +173,8 @@ struct vertex_buffer {
model_list = NULL;
}
for (SCP_vector<buffer_data>::iterator tbi = tex_buf.begin(); tbi != tex_buf.end(); ++tbi) {
tbi->release();
for (size_t i = 0; i < tex_buf.size(); i++) {
tex_buf[i].release();
}
}
@@ -362,7 +383,7 @@ typedef struct screen {
int (*gf_bm_load)(ubyte type, int n, char *filename, CFILE *img_cfp, int *w, int *h, int *bpp, ubyte *c_type, int *mm_lvl, int *size);
void (*gf_bm_init)(int n);
void (*gf_bm_page_in_start)();
int (*gf_bm_lock)(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags);
int (*gf_bm_lock)(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags, bool nodebug);
int (*gf_bm_make_render_target)(int n, int *width, int *height, ubyte *bpp, int *mm_lvl, int flags );
int (*gf_bm_set_render_target)(int n, int face);
@@ -434,6 +455,8 @@ typedef struct screen {
void (*gf_line_htl)(vec3d *start, vec3d* end);
void (*gf_sphere_htl)(float rad);
void (*gf_update_texture)(int bitmap_handle, int bpp, ubyte* data, int width, int height);
} screen;
// handy macro
@@ -706,6 +729,8 @@ __inline void gr_render_buffer(int start, const vertex_buffer *bufferp, int texi
#define gr_line_htl GR_CALL(*gr_screen.gf_line_htl)
#define gr_sphere_htl GR_CALL(*gr_screen.gf_sphere_htl)
#define gr_update_texture GR_CALL(*gr_screen.gf_update_texture)
// color functions
void gr_get_color( int *r, int *g, int b );
void gr_init_color(color *c, int r, int g, int b);
@@ -723,6 +748,10 @@ void gr_bitmap_uv(int _x, int _y, int _w, int _h, float _u0, float _v0, float _u
void gr_bitmap_list(bitmap_2d_list* list, int n_bm, bool allow_scaling);
void gr_bitmap_list(bitmap_rect_list* list, int n_bm, bool allow_scaling);
// texture update functions
ubyte* gr_opengl_get_texture_update_pointer(int bitmap_handle);
void gr_opengl_update_texture(int bitmap_handle, int bpp, ubyte* data, int width, int height);
// special function for drawing polylines. this function is specifically intended for
// polylines where each section is no more than 90 degrees away from a previous section.
// Moreover, it is _really_ intended for use with 45 degree angles.
+74 -24
View File
@@ -99,13 +99,7 @@ void generic_anim_init(generic_anim *ga, char *filename)
ga->height = 0;
ga->width = 0;
ga->bitmap_id = -1;
}
/**
* CommanderDJ - same as generic_anim_init, just with an SCP_string
*/
void generic_anim_init(generic_anim *ga, const SCP_string& filename)
{
generic_anim_init(ga, const_cast<char*> (filename.c_str()));
ga->colored = false;
}
// Goober5000
@@ -181,6 +175,8 @@ int generic_anim_stream(generic_anim *ga)
//TODO: add streaming EFF
if(ga->type == BM_TYPE_ANI) {
bpp = ANI_BPP_CHECK;
if(ga->colored)
bpp = 8;
ga->ani.animation = anim_load(ga->filename, CF_TYPE_ANY, 0);
ga->ani.instance = init_anim_instance(ga->ani.animation, bpp);
@@ -194,7 +190,7 @@ int generic_anim_stream(generic_anim *ga)
ga->height = ga->ani.animation->height;
ga->width = ga->ani.animation->width;
ga->buffer = ga->ani.instance->frame;
ga->bitmap_id = bm_create(bpp, ga->width, ga->height, ga->buffer, 0);
ga->bitmap_id = bm_create(bpp, ga->width, ga->height, ga->buffer, (bpp==8)?BMP_AABITMAP:0);
ga->ani.instance->last_bitmap = -1;
ga->ani.instance->file_offset = ga->ani.animation->file_offset;
@@ -203,8 +199,24 @@ int generic_anim_stream(generic_anim *ga)
ga->previous_frame = -1;
}
else {
//placeholder until we get eff streaming working
return generic_anim_load(ga);
bpp = 32;
if(ga->colored)
bpp = 8;
bm_load_and_parse_eff(ga->filename, CF_TYPE_ANY, &ga->num_frames, &anim_fps, &ga->keyframe, 0);
char *p = strrchr( ga->filename, '.' );
if ( p )
*p = 0;
char frame_name[32];
snprintf(frame_name, 32, "%s_0000", ga->filename);
ga->bitmap_id = bm_load(frame_name);
if(ga->bitmap_id < 0) {
mprintf(("Cannot find first frame for eff streaming. eff Filename: %s", ga->filename));
return -1;
}
snprintf(frame_name, 32, "%s_0001", ga->filename);
ga->eff.next_frame = bm_load(frame_name);
bm_get_info(ga->bitmap_id, &ga->width, &ga->height);
ga->previous_frame = 0;
}
// keyframe info
@@ -231,9 +243,6 @@ int generic_anim_stream(generic_anim *ga)
}
}
}
else {
// EFF not handled yet; code shouldn't get here anyway per above block
}
ga->streaming = 1;
@@ -266,6 +275,12 @@ void generic_anim_unload(generic_anim *ga)
anim_free(ga->ani.animation);
free_anim_instance(ga->ani.instance);
}
if(ga->type == BM_TYPE_EFF) {
if(ga->eff.next_frame >= 0)
bm_release(ga->eff.next_frame);
if(ga->bitmap_id >= 0)
bm_release(ga->bitmap_id);
}
}
else {
//trying to release the first frame will release ALL frames
@@ -279,11 +294,43 @@ void generic_anim_unload(generic_anim *ga)
}
//for timer debug, #define TIMER
void generic_render_eff_stream(generic_anim *ga)
{
if(ga->current_frame == ga->previous_frame)
return;
ubyte bpp = 32;
if(ga->colored)
bpp = 8;
#ifdef TIMER
int start_time = timer_get_fixed_seconds();
#endif
#ifdef TIMER
mprintf(("=========================\n"));
mprintf(("frame: %d\n", ga->current_frame));
#endif
char frame_name[32];
snprintf(frame_name, 32, "%s_%.4d", ga->filename, ga->current_frame);
if(bm_reload(ga->eff.next_frame, frame_name) == ga->eff.next_frame)
{
bitmap* next_frame_bmp = bm_lock(ga->eff.next_frame, bpp, (bpp==8)?BMP_AABITMAP:BMP_TEX_NONCOMP, true);
if(next_frame_bmp->data)
gr_update_texture(ga->bitmap_id, bpp, (ubyte*)next_frame_bmp->data, ga->width, ga->height);
bm_unlock(ga->eff.next_frame);
bm_unload(ga->eff.next_frame, 0, true);
}
#ifdef TIMER
mprintf(("end: %d\n", timer_get_fixed_seconds() - start_time));
mprintf(("=========================\n"));
#endif
}
void generic_render_ani_stream(generic_anim *ga)
{
int i;
int bpp = ANI_BPP_CHECK;
if(ga->colored)
bpp = 8;
#ifdef TIMER
int start_time = timer_get_fixed_seconds();
#endif
@@ -307,10 +354,10 @@ void generic_render_ani_stream(generic_anim *ga)
ga->ani.instance->data = ga->ani.animation->data + ga->ani.animation->keys[ga->current_frame].offset;
}
if(ga->ani.animation->flags & ANF_STREAMED) {
ga->ani.instance->file_offset = unpack_frame_from_file(ga->ani.instance, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, 0, bpp);
ga->ani.instance->file_offset = unpack_frame_from_file(ga->ani.instance, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, (bpp==8)?1:0, bpp);
}
else {
ga->ani.instance->data = unpack_frame(ga->ani.instance, ga->ani.instance->data, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, 0, bpp);
ga->ani.instance->data = unpack_frame(ga->ani.instance, ga->ani.instance->data, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, (bpp==8)?1:0, bpp);
}
}
else {
@@ -338,20 +385,18 @@ void generic_render_ani_stream(generic_anim *ga)
#endif
for(i = ga->previous_frame + 1; i <= ga->current_frame; i++) {
if(ga->ani.animation->flags & ANF_STREAMED) {
ga->ani.instance->file_offset = unpack_frame_from_file(ga->ani.instance, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, 0, bpp);
ga->ani.instance->file_offset = unpack_frame_from_file(ga->ani.instance, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, (bpp==8)?1:0, bpp);
}
else {
ga->ani.instance->data = unpack_frame(ga->ani.instance, ga->ani.instance->data, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, 0, bpp);
ga->ani.instance->data = unpack_frame(ga->ani.instance, ga->ani.instance->data, ga->buffer, ga->width * ga->height, (ga->ani.instance->xlate_pal) ? ga->ani.animation->palette_translation : NULL, (bpp==8)?1:0, bpp);
}
}
}
// always go back to screen format
BM_SELECT_SCREEN_FORMAT();
//we need to use this because performance is worse if we flush the gfx card buffer
if ( ga->ani.instance->last_bitmap != -1 ){
bm_release(ga->ani.instance->last_bitmap);
}
ga->bitmap_id = bm_create(bpp, ga->width, ga->height, ga->buffer, 0);
gr_update_texture(ga->bitmap_id, bpp, ga->buffer, ga->width, ga->height);
//in case we want to check that the frame is actually changing
//mprintf(("frame crc = %08X\n", cf_add_chksum_long(0, ga->buffer, ga->width * ga->height * (bpp >> 3))));
@@ -398,7 +443,7 @@ void generic_anim_render(generic_anim *ga, float frametime, int x, int y)
if(ga->direction & GENERIC_ANIM_DIRECTION_NOLOOP) {
ga->anim_time = ga->total_time - 0.001f; //stop on last frame when playing - if it's equal we jump to the first frame
}
else if(!ga->done_playing){
if(!ga->done_playing){
//we've played this at least once
ga->done_playing = 1;
}
@@ -422,6 +467,8 @@ void generic_anim_render(generic_anim *ga, float frametime, int x, int y)
//TODO: add EFF streaming
if(ga->type == BM_TYPE_ANI) {
generic_render_ani_stream(ga);
} else {
generic_render_eff_stream(ga);
}
gr_set_bitmap(ga->bitmap_id);
}
@@ -429,6 +476,9 @@ void generic_anim_render(generic_anim *ga, float frametime, int x, int y)
gr_set_bitmap(ga->first_frame + ga->current_frame);
}
ga->previous_frame = ga->current_frame;
gr_bitmap(x, y);
if(ga->colored)
gr_aabitmap(x,y);
else
gr_bitmap(x,y);
}
}
+2 -3
View File
@@ -33,9 +33,8 @@ typedef struct generic_anim {
anim_instance *instance;
unsigned char bg_type; //to store background type to avoid messed up colours
} ani;
//reserved for eff streaming
struct {
//
int next_frame;
} eff;
};
ubyte type;
@@ -44,6 +43,7 @@ typedef struct generic_anim {
int height;
int width;
int bitmap_id;
bool colored;
} generic_anim;
// Goober5000
@@ -54,7 +54,6 @@ typedef struct generic_bitmap {
int generic_anim_init_and_stream(generic_anim *anim, char *anim_filename, ubyte bg_type, bool attempt_hi_res);
void generic_anim_init(generic_anim *ga, char *filename = NULL);
void generic_anim_init(generic_anim *ga, const SCP_string& filename);
void generic_bitmap_init(generic_bitmap *gb, char *filename = NULL);
int generic_anim_load(generic_anim *ga);
int generic_anim_stream(generic_anim *ga);
+11 -3
View File
@@ -5118,9 +5118,17 @@ typedef unsigned long long int uint64_t;
#elif defined(_WIN32) && defined(__GNUC__)
#include <stdint.h>
#elif defined(_WIN32)
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
// per stdint.h
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed int int32_t;
#else
typedef signed __int32 int32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
/* Fallback if nothing above works */
#include <inttypes.h>
+8 -4
View File
@@ -357,7 +357,7 @@ void geometry_batcher::draw_quad(vertex* verts)
}
void geometry_batcher::draw_beam(vec3d *start, vec3d *end, float width, float intensity)
void geometry_batcher::draw_beam(vec3d *start, vec3d *end, float width, float intensity, float offset)
{
vec3d p[4];
vertex *P = &vert[n_to_render * 3];
@@ -413,7 +413,11 @@ void geometry_batcher::draw_beam(vec3d *start, vec3d *end, float width, float in
for(int i = 0; i < 6; i++){
P[i].r = P[i].g = P[i].b = P[i].a = _color;
R[i] = width;
if(offset > 0.0f) {
R[i] = offset;
} else {
R[i] = width;
}
}
n_to_render += 2;
@@ -745,7 +749,7 @@ int distortion_add_bitmap_rotated(int texture, int tmap_flags, vertex *pnt, floa
return 0;
}
int distortion_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, float width, float intensity)
int distortion_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, float width, float intensity, float offset)
{
if (texture < 0) {
Int3();
@@ -764,7 +768,7 @@ int distortion_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, f
item->add_allocate(1);
item->draw_beam(start,end,width,intensity);
item->draw_beam(start,end,width,intensity,offset);
return 0;
}
+2 -2
View File
@@ -53,7 +53,7 @@ public:
void draw_quad(vertex *verts);
// draw a beam
void draw_beam(vec3d *start, vec3d *end, float width, float intensity = 1.0f);
void draw_beam(vec3d *start, vec3d *end, float width, float intensity = 1.0f, float offset = 0.0f);
//draw a laser
float draw_laser(vec3d *p0, float width1, vec3d *p1, float width2, int r, int g, int b);
@@ -74,7 +74,7 @@ int batch_add_bitmap(int texture, int tmap_flags, vertex *pnt, int orient, float
int batch_add_bitmap_rotated(int texture, int tmap_flags, vertex *pnt, float angle, float rad, float alpha = 1.0f, float depth = 0.0f);
int batch_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, float width, float intensity = 1.0f);
int distortion_add_bitmap_rotated(int texture, int tmap_flags, vertex *pnt, float angle, float rad, float alpha = 1.0f, float depth = 0.0f);
int distortion_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, float width, float intensity = 1.0f);
int distortion_add_beam(int texture, int tmap_flags, vec3d *start, vec3d *end, float width, float intensity = 1.0f, float offset = 0.0f);
void batch_render_all();
void batch_render_geometry_map_bitmaps();
void batch_render_lasers();
+4 -4
View File
@@ -1834,6 +1834,8 @@ void opengl_setup_function_pointers()
gr_screen.gf_line_htl = gr_opengl_line_htl;
gr_screen.gf_sphere_htl = gr_opengl_sphere_htl;
gr_screen.gf_update_texture = gr_opengl_update_texture;
// NOTE: All function pointers here should have a Cmdline_nohtl check at the top
// if they shouldn't be run in non-HTL mode, Don't keep separate entries.
// *****************************************************************************
@@ -1974,13 +1976,11 @@ bool gr_opengl_init()
mprintf(( " Using %s texture filter.\n", (GL_mipmap_filter) ? NOX("trilinear") : NOX("bilinear") ));
if (Use_GLSL) {
if (Use_GLSL > 1) {
mprintf(( " Using GLSL for model rendering.\n" ));
}
mprintf(( " OpenGL Shader Version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION_ARB) ));
}
// This stops fred crashing if no textures are set
gr_screen.current_bitmap = -1;
+3 -3
View File
@@ -418,7 +418,7 @@ extern bool opengl_texture_slot_valid(int n, int handle);
/**
* Lock an image files data into memory
*/
int gr_opengl_bm_lock( char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags )
int gr_opengl_bm_lock( char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags, bool nodebug)
{
ubyte c_type = BM_TYPE_NONE;
ubyte true_bpp;
@@ -438,13 +438,13 @@ int gr_opengl_bm_lock( char *filename, int handle, int bitmapnum, ubyte bpp, uby
if ( (bmp->data == 0) && !opengl_texture_slot_valid(bitmapnum, handle) ) {
Assert(be->ref_count == 1);
if (be->type != BM_TYPE_USER) {
if (be->type != BM_TYPE_USER && !nodebug) {
if (bmp->data == 0)
nprintf (("BmpMan", "Loading %s for the first time.\n", be->filename));
}
if ( !Bm_paging ) {
if (be->type != BM_TYPE_USER)
if (be->type != BM_TYPE_USER && !nodebug)
nprintf(("Paging", "Loading %s (%dx%dx%d)\n", be->filename, bmp->w, bmp->h, true_bpp));
}
+1 -1
View File
@@ -43,7 +43,7 @@ void gr_opengl_bm_init(int n);
void gr_opengl_bm_page_in_start();
// Lock an image files data into memory
int gr_opengl_bm_lock(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags);
int gr_opengl_bm_lock(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags, bool nodebug);
void gr_opengl_bm_save_render_target(int slot);
int gr_opengl_bm_make_render_target(int n, int *width, int *height, ubyte *bpp, int *mm_lvl, int flags);
+14 -26
View File
@@ -39,7 +39,6 @@ GLuint Scene_color_texture;
GLuint Scene_luminance_texture;
GLuint Scene_effect_texture;
GLuint Scene_depth_texture;
GLuint Cockpit_depth_texture;
GLuint Distortion_framebuffer;
GLuint Distortion_texture[2];
@@ -1336,6 +1335,13 @@ void gr_opengl_render_effect(int nverts, vertex *verts, float *radius_list, uint
vglEnableVertexAttribArrayARB(attrib_index);
}
if(flags & TMAP_FLAG_DISTORTION_THRUSTER)
{
attrib_index = opengl_shader_get_attribute("offset_in");
vglVertexAttribPointerARB(attrib_index, 1, GL_FLOAT, GL_FALSE, 0, radius_list);
vglEnableVertexAttribArrayARB(attrib_index);
}
GL_state.Texture.SetActiveUnit(1);
GL_state.Texture.SetTarget(GL_TEXTURE_2D);
GL_state.Texture.Enable(Scene_depth_texture);
@@ -1399,8 +1405,10 @@ void gr_opengl_render_effect(int nverts, vertex *verts, float *radius_list, uint
GL_state.Lighting(lighting);
gr_zbuffer_set(zbuff);
GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT };
vglDrawBuffers(2, buffers);
if( (flags & TMAP_FLAG_DISTORTION) || (flags & TMAP_FLAG_DISTORTION_THRUSTER) ) {
GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT };
vglDrawBuffers(2, buffers);
}
GL_CHECK_FOR_ERRORS("end of render3d()");
}
@@ -2066,25 +2074,6 @@ void opengl_setup_scene_textures()
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, Scene_texture_width, Scene_texture_height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_2D, Scene_effect_texture, 0);
// setup cockpit depth texture
glGenTextures(1, &Cockpit_depth_texture);
GL_state.Texture.SetActiveUnit(0);
GL_state.Texture.SetTarget(GL_TEXTURE_2D);
GL_state.Texture.Enable(Cockpit_depth_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32, Scene_texture_width, Scene_texture_height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);
vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, Cockpit_depth_texture, 0);
gr_zbuffer_set(GR_ZBUFF_FULL);
glClear(GL_DEPTH_BUFFER_BIT);
// setup main depth texture
glGenTextures(1, &Scene_depth_texture);
@@ -2303,13 +2292,13 @@ void gr_opengl_scene_texture_end()
glBegin(GL_QUADS);
glTexCoord2f(Scene_texture_u_scale, 0.0f);
glVertex2f(0.0f, (float)gr_screen.max_h);
glTexCoord2f(0.0f, 0.0f);
glVertex2f((float)gr_screen.max_w, (float)gr_screen.max_h);
glTexCoord2f(0.0f, Scene_texture_v_scale);
glVertex2f((float)gr_screen.max_w, 0.0f);
glTexCoord2f(Scene_texture_u_scale, Scene_texture_v_scale);
glVertex2f(0.0f, 0.0f);
glEnd();
@@ -2343,7 +2332,6 @@ void gr_opengl_scene_texture_end()
}
// Reset the UV scale values
Scene_texture_u_scale = 1.0f;
Scene_texture_v_scale = 1.0f;
+24 -20
View File
@@ -20,6 +20,7 @@
#include "graphics/gropengltexture.h"
#include "cmdline/cmdline.h"
#include "ddsutils/ddsutils.h"
#include "popup/popup.h"
#include "osapi/outwnd.h"
@@ -130,10 +131,10 @@ ogl_extension GL_Extensions[NUM_OGL_EXTENSIONS] =
{ false, false, 1, { "GL_ARB_shading_language_100" }, 0, { NULL } },
// shader objects and program object management
{ false, false, 1, { "GL_ARB_shader_objects" }, 18, { "glDeleteObjectARB", "glCreateShaderObjectARB", "glShaderSourceARB",
{ false, false, 1, { "GL_ARB_shader_objects" }, 17, { "glDeleteObjectARB", "glCreateShaderObjectARB", "glShaderSourceARB",
"glCompileShaderARB", "glGetObjectParameterivARB", "glGetInfoLogARB", "glCreateProgramObjectARB",
"glAttachObjectARB", "glLinkProgramARB", "glUseProgramObjectARB", "glValidateProgramARB", "glGetUniformLocationARB",
"glGetUniformivARB", "glUniform1fARB", "glUniform2fARB", "glUniform3fARB", "glUniform1iARB", "glUniformMatrix4fvARB" } },
"glGetUniformivARB", "glUniform1fARB", "glUniform3fARB", "glUniform1iARB", "glUniformMatrix4fvARB" } },
// programmable vertex level processing
// some of functions are provided by GL_ARB_vertex_program
@@ -369,9 +370,22 @@ void opengl_extensions_init()
Use_PBOs = 1;
}
// setup the best fog function found
if ( !Fred_running ) {
if ( Is_Extension_Enabled(OGL_EXT_FOG_COORD) ) {
OGL_fogmode = 2;
} else {
OGL_fogmode = 1;
}
}
// if we can't do cubemaps then turn off Cmdline_env
if ( !(Is_Extension_Enabled(OGL_ARB_TEXTURE_CUBE_MAP) && Is_Extension_Enabled(OGL_ARB_TEXTURE_ENV_COMBINE)) ) {
Cmdline_env = 0;
}
if ( !Cmdline_noglsl && Is_Extension_Enabled(OGL_ARB_SHADER_OBJECTS) && Is_Extension_Enabled(OGL_ARB_FRAGMENT_SHADER)
&& Is_Extension_Enabled(OGL_ARB_VERTEX_SHADER) )
{
&& Is_Extension_Enabled(OGL_ARB_VERTEX_SHADER) ) {
int ver = 0, major = 0, minor = 0;
const char *glsl_ver = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION_ARB);
@@ -387,29 +401,19 @@ void opengl_extensions_init()
Use_GLSL = 3;
}
// SM 2.0 compatible
else if (ver >= 110) {
else if (ver >= 120) {
Use_GLSL = 2;
}
// we require GLSL 1.10 or higher
// we require GLSL 1.20 or higher
else if (ver < 110) {
Use_GLSL = 0;
mprintf((" OpenGL Shading Language version %s is not sufficient to use GLSL mode in FSO. Defaulting to fixed-function renderer.\n", glGetString(GL_SHADING_LANGUAGE_VERSION_ARB) ));
#ifdef NDEBUG
popup(0, 1, POPUP_OK, "GLSL support not available on this GPU. Disabling shader support and defaulting to fixed-function rendering.\n");
#endif
}
}
// setup the best fog function found
if ( !Fred_running ) {
if ( Is_Extension_Enabled(OGL_EXT_FOG_COORD) ) {
OGL_fogmode = 2;
} else {
OGL_fogmode = 1;
}
}
// if we can't do cubemaps then turn off Cmdline_env
if ( !(Is_Extension_Enabled(OGL_ARB_TEXTURE_CUBE_MAP) && Is_Extension_Enabled(OGL_ARB_TEXTURE_ENV_COMBINE)) ) {
Cmdline_env = 0;
}
// can't have this stuff without GLSL support
if ( !Use_GLSL ) {
Cmdline_normal = 0;
-1
View File
@@ -228,7 +228,6 @@ typedef void (* glDrawRangeElementsProcPtr) (GLenum mode, GLuint start, GLuint e
#define PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARBProcPtr
#define PFNGLGETUNIFORMIVARBPROC glGetUniformivARBProcPtr
#define PFNGLUNIFORM1FARBPROC glUniform1fARBProcPtr
#define PFNGLUNIFORM2FARBPROC glUniform2fARBProcPtr
#define PFNGLUNIFORM3FARBPROC glUniform3fARBProcPtr
#define PFNGLUNIFORM4FARBPROC glUnifrom4fARBProcPtr
#define PFNGLUNIFORM3FVARBPROC glUniform3fvARBProcPtr
+6 -129
View File
@@ -12,8 +12,6 @@
#include "cmdline/cmdline.h"
#include "globalincs/def_files.h"
#include "ship/ship.h"
#include "freespace2/freespace.h"
#include "lighting/lighting.h"
extern bool PostProcessing_override;
@@ -24,29 +22,18 @@ size_t fxaa_shader_id;
//In case we don't find the shaders at all, this override is needed
bool fxaa_unavailable = false;
int Fxaa_preset_last_frame;
bool zbuffer_saved = false;
// lightshaft parameters
bool ls_on = false;
bool ls_force_off = false;
float ls_density = 0.5f;
float ls_weight = 0.02f;
float ls_falloff = 1.0f;
float ls_intensity = 0.5f;
float ls_cpintensity = 0.5f * 50 * 0.02f;
int ls_samplenum = 50;
#define SDR_POST_FLAG_MAIN (1<<0)
#define SDR_POST_FLAG_BRIGHT (1<<1)
#define SDR_POST_FLAG_BLUR (1<<2)
#define SDR_POST_FLAG_PASS1 (1<<3)
#define SDR_POST_FLAG_PASS2 (1<<4)
#define SDR_POST_FLAG_LIGHTSHAFT (1<<5)
static SCP_vector<opengl_shader_t> GL_post_shader;
// NOTE: The order of this list *must* be preserved! Additional shaders can be
// added, but the first 7 are used with magic numbers so their position
// added, but the first 5 are used with magic numbers so their position
// is assumed to never change.
static opengl_shader_file_t GL_post_shader_files[] = {
// NOTE: the main post-processing shader has any number of uniforms, but
@@ -67,10 +54,7 @@ static opengl_shader_file_t GL_post_shader_files[] = {
3, { "tex0", "rt_w", "rt_h"} },
{ "post-v.sdr", "fxaapre-f.sdr", NULL,
1, { "tex"} },
{ "post-v.sdr", "ls-f.sdr", SDR_POST_FLAG_LIGHTSHAFT,
8, { "scene", "cockpit", "sun_pos", "weight", "intensity", "falloff", "density", "cp_intensity" } }
1, { "tex"} }
};
static const unsigned int Num_post_shader_files = sizeof(GL_post_shader_files) / sizeof(opengl_shader_file_t);
@@ -359,11 +343,6 @@ void opengl_post_pass_fxaa() {
opengl_shader_set_current();
}
extern GLuint shadow_map[2];
extern GLuint Scene_depth_texture;
extern GLuint Cockpit_depth_texture;
extern bool stars_sun_has_glare(int index);
extern float Sun_spot;
void gr_opengl_post_process_end()
{
// state switch just the once (for bloom pass and final render-to-screen)
@@ -379,75 +358,9 @@ void gr_opengl_post_process_end()
if (Cmdline_fxaa && !fxaa_unavailable && !GL_rendering_to_texture) {
opengl_post_pass_fxaa();
}
opengl_shader_set_current( &GL_post_shader[6] );
float x,y;
// should we even be here?
if (!Game_subspace_effect && ls_on && !ls_force_off)
{
int n_lights = light_get_global_count();
for(int idx=0; idx<n_lights; idx++)
{
vec3d light_dir;
vec3d local_light_dir;
light_get_global_dir(&light_dir, idx);
vm_vec_rotate(&local_light_dir, &light_dir, &Eye_matrix);
if (!stars_sun_has_glare(idx))
continue;
float dot;
if((dot=vm_vec_dot( &light_dir, &Eye_matrix.vec.fvec )) > 0.7f)
{
x = asin(vm_vec_dot( &light_dir, &Eye_matrix.vec.rvec ))/PI*1.5f+0.5f; //cant get the coordinates right but this works for the limited glare fov
y = asin(vm_vec_dot( &light_dir, &Eye_matrix.vec.uvec ))/PI*1.5f*gr_screen.clip_aspect+0.5f;
vglUniform2fARB( opengl_shader_get_uniform("sun_pos"), x, y);
vglUniform1iARB( opengl_shader_get_uniform("scene"), 0);
vglUniform1iARB( opengl_shader_get_uniform("cockpit"), 1);
vglUniform1fARB( opengl_shader_get_uniform("density"), ls_density);
vglUniform1fARB( opengl_shader_get_uniform("falloff"), ls_falloff);
vglUniform1fARB( opengl_shader_get_uniform("weight"), ls_weight);
vglUniform1fARB( opengl_shader_get_uniform("intensity"), Sun_spot * ls_intensity);
vglUniform1fARB( opengl_shader_get_uniform("cp_intensity"), Sun_spot * ls_cpintensity);
GL_state.Texture.SetActiveUnit(0);
GL_state.Texture.SetTarget(GL_TEXTURE_2D);
GL_state.Texture.Enable(Scene_depth_texture);
GL_state.Texture.SetActiveUnit(1);
GL_state.Texture.SetTarget(GL_TEXTURE_2D);
GL_state.Texture.Enable(Cockpit_depth_texture);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
GL_state.Blend(GL_TRUE);
GL_state.SetAlphaBlendMode(ALPHA_BLEND_ADDITIVE);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex2f(-1.0f, -1.0f);
glTexCoord2f(Scene_texture_u_scale, 0.0f);
glVertex2f(1.0f, -1.0f);
glTexCoord2f(Scene_texture_u_scale, Scene_texture_v_scale);
glVertex2f(1.0f, 1.0f);
glTexCoord2f(0.0f, Scene_texture_v_scale);
glVertex2f(-1.0f, 1.0f);
glEnd();
GL_state.Blend(GL_FALSE);
break;
}
}
}
if(zbuffer_saved)
{
zbuffer_saved = false;
gr_zbuffer_set(GR_ZBUFF_FULL);
glClear(GL_DEPTH_BUFFER_BIT);
gr_zbuffer_set(GR_ZBUFF_NONE);
vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, Scene_depth_texture, 0);
}
// Bind the correct framebuffer. opengl_get_rtt_framebuffer returns 0 if not doing RTT
vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, opengl_get_rtt_framebuffer());
vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, opengl_get_rtt_framebuffer());
// do bloom, hopefully ;)
bool bloomed = opengl_post_pass_bloom();
@@ -512,6 +425,7 @@ void gr_opengl_post_process_end()
glVertex2f(-1.0f, 1.0f);
glEnd();
vglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
// Done!
GL_state.Texture.SetActiveUnit(1);
@@ -636,13 +550,6 @@ void gr_opengl_post_process_set_effect(const char *name, int value)
int sflags = 0;
bool need_change = true;
if(!stricmp("lightshafts",name))
{
ls_intensity = value / 100.0f;
ls_on = !!value;
return;
}
for (idx = 0; idx < Post_effects.size(); idx++) {
const char *eff_name = Post_effects[idx].name.c_str();
@@ -717,15 +624,11 @@ void gr_opengl_post_process_set_defaults()
Post_active_shader_index = 0;
}
extern GLuint Cockpit_depth_texture;
void gr_opengl_post_process_save_zbuffer()
{
if ( !Post_initialized ) {
return;
}
vglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, Cockpit_depth_texture, 0);
gr_zbuffer_clear(TRUE);
zbuffer_saved = true;
}
@@ -796,7 +699,7 @@ static bool opengl_post_init_table()
Ship_effects.push_back(se1);
if (optional_string("#Ship Effects")) {
while ( !required_string_3("$Name:", "#Light Shafts", "#End") ) {
while ( required_string_either("#End", "$Name:") ) {
ship_effect se;
char tbuf[NAME_LENGTH] = { 0 };
@@ -817,26 +720,6 @@ static bool opengl_post_init_table()
}
}
if (optional_string("#Light Shafts")) {
required_string("$AlwaysOn:");
stuff_boolean(&ls_on);
required_string("$Density:");
stuff_float(&ls_density);
required_string("$Falloff:");
stuff_float(&ls_falloff);
required_string("$Weight:");
stuff_float(&ls_weight);
required_string("$Intensity:");
stuff_float(&ls_intensity);
required_string("$Sample Number:");
stuff_int(&ls_samplenum);
ls_cpintensity = ls_weight;
for(int i = 1; i < ls_samplenum; i++)
ls_cpintensity += ls_weight * pow(ls_falloff, i);
ls_cpintensity *= ls_intensity;
}
required_string("#End");
return true;
@@ -844,7 +727,7 @@ static bool opengl_post_init_table()
static char *opengl_post_load_shader(char *filename, int flags, int flags2)
{
SCP_string sflags;
std::string sflags;
if (Use_GLSL >= 4) {
sflags += "#define SHADER_MODEL 4\n";
@@ -867,12 +750,6 @@ static char *opengl_post_load_shader(char *filename, int flags, int flags2)
} else if (flags & SDR_POST_FLAG_PASS2) {
sflags += "#define PASS_1\n";
}
if (flags & SDR_POST_FLAG_LIGHTSHAFT) {
char temp[42];
sprintf(temp, "#define SAMPLE_NUM %d\n", ls_samplenum);
sflags += temp;
}
switch (Cmdline_fxaa_preset) {
case 0:
+16 -7
View File
@@ -51,6 +51,12 @@ struct opengl_shader_file_t {
static opengl_shader_file_t GL_shader_file[] = {
{ "null-v.sdr", "null-f.sdr", (0), 0, { NULL }, 0, { NULL } },
{ "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD),
6, {"baseMap", "depthMap", "window_width", "window_height", "nearZ", "farZ"}, 1, { "radius_in" } },
{ "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD | SDR_FLAG_DISTORTION),
5, {"baseMap", "window_width", "window_height", "distMap", "frameBuffer"}, 1, { "offset_in" } },
// with diffuse Textures
{ "lne-v.sdr", "lbgsne-f.sdr", (SDR_FLAG_LIGHT | SDR_FLAG_DIFFUSE_MAP | SDR_FLAG_GLOW_MAP | SDR_FLAG_SPEC_MAP | SDR_FLAG_NORMAL_MAP | SDR_FLAG_ENV_MAP),
8, { "sBasemap", "sGlowmap", "sSpecmap", "sNormalmap", "sEnvmap", "envMatrix", "alpha_spec", "n_lights" }, 0, { NULL } },
@@ -247,7 +253,7 @@ static opengl_shader_file_t GL_shader_file[] = {
13, { "sBasemap", "sGlowmap", "sSpecmap", "sNormalmap", "sEnvmap", "envMatrix", "alpha_spec", "n_lights", "anim_timer", "effect_num", "sFramebuffer", "vpwidth", "vpheight" }, 0, { NULL } },
{ "lfnea-v.sdr", "lfbsnea-f.sdr", (SDR_FLAG_LIGHT | SDR_FLAG_FOG | SDR_FLAG_DIFFUSE_MAP | SDR_FLAG_SPEC_MAP | SDR_FLAG_NORMAL_MAP | SDR_FLAG_ENV_MAP | SDR_FLAG_ANIMATED),
12, { "sBasemap", "sSpecmap", "sNormalmap", "sEnvmap", "envMatrix", "alpha_spec", "n_lights", "anim_timer", "effect_num", "sFramebuffer", "vpwidth", "vpheight" }, 0, { NULL } },
12, { "sBasemap", "sSpecmap", "sNormalmap", "sEnvmap", "envMatrix", "alpha_spec", "n_lights", "anim_timer", "effect_num", "sFramebuffer", "vpwidth", "vpheight" }, 0, { NULL } }
/* No Heightmapping for now - Valathil
{ "lne-v.sdr", "lgsnhe-f.sdr", (SDR_FLAG_LIGHT | SDR_FLAG_GLOW_MAP | SDR_FLAG_SPEC_MAP | SDR_FLAG_NORMAL_MAP | SDR_FLAG_HEIGHT_MAP | SDR_FLAG_ENV_MAP),
@@ -304,11 +310,6 @@ static opengl_shader_file_t GL_shader_file[] = {
{ "ln-v.sdr", "lsnh-f.sdr", (SDR_FLAG_LIGHT | SDR_FLAG_SPEC_MAP | SDR_FLAG_NORMAL_MAP | SDR_FLAG_HEIGHT_MAP),
4, { "sSpecmap", "sNormalmap", "sHeightmap", "n_lights" }, 0, { NULL } }*/
{ "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD),
6, {"baseMap", "depthMap", "window_width", "window_height", "nearZ", "farZ"}, 1, { "radius_in" } },
{ "soft-v.sdr", "soft-f.sdr", (SDR_FLAG_SOFT_QUAD | SDR_FLAG_DISTORTION),
5, {"baseMap", "window_width", "window_height", "distMap", "frameBuffer"}, 0, { NULL } }
};
static const int Num_shader_files = sizeof(GL_shader_file) / sizeof(opengl_shader_file_t);
@@ -391,7 +392,9 @@ void opengl_shader_shutdown()
static char *opengl_load_shader(char *filename, int flags, bool unified)
{
SCP_string sflags;
std::string sflags;
//sflags += "#version 120\n";
if (Use_GLSL >= 4) {
sflags += "#define SHADER_MODEL 4\n";
@@ -447,6 +450,8 @@ static char *opengl_load_shader(char *filename, int flags, bool unified)
}
}
const char *shader_flags = sflags.c_str();
int flags_len = strlen(shader_flags);
@@ -470,9 +475,11 @@ static char *opengl_load_shader(char *filename, int flags, bool unified)
strcpy(shader, shader_flags);
strcat(shader, def_shader);
//memset(shader + flags_len, 0, len + 1);
return shader;
}
}
void opengl_shader_init()
@@ -504,6 +511,8 @@ void opengl_shader_init()
bool main_vert = cf_exists_full("main-v.sdr", CF_TYPE_EFFECTS) != 0;
bool main_frag = cf_exists_full("main-f.sdr", CF_TYPE_EFFECTS) != 0;
GL_shader.reserve(Num_shader_files+1);
for (idx = 0; idx < Num_shader_files; idx++) {
bool in_error = false;
opengl_shader_t new_shader;
+1 -1
View File
@@ -58,7 +58,7 @@ struct opengl_shader_file_t {
};
typedef struct opengl_shader_uniform_t {
SCP_string text_id;
std::string text_id;
GLint location;
opengl_shader_uniform_t() : location(-1) {}
+66 -2
View File
@@ -40,7 +40,7 @@ GLint GL_supported_texture_units = 2;
int GL_should_preload = 0;
ubyte GL_xlat[256];
GLfloat GL_anisotropy = 1.0f;
GLfloat GL_max_anisotropy = 2.0f;
GLfloat GL_max_anisotropy = -1.0f;
int GL_mipmap_filter = 0;
GLenum GL_texture_target = GL_TEXTURE_2D;
GLenum GL_texture_face = GL_TEXTURE_2D;
@@ -96,7 +96,7 @@ GLfloat opengl_get_max_anisotropy()
return 0.0f;
}
if ( !GL_max_anisotropy ) {
if ( GL_max_anisotropy < 0.0f ) {
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &GL_max_anisotropy);
}
@@ -1388,6 +1388,70 @@ int opengl_export_image( int slot, int width, int height, int alpha, int num_mip
return m_offset;
}
void gr_opengl_update_texture(int bitmap_handle, int bpp, ubyte* data, int width, int height)
{
GLenum texFormat, glFormat;
int n = bm_get_cache_slot (bitmap_handle, 1);
tcache_slot_opengl *t = &Textures[n];
if(!t->texture_id)
return;
int byte_mult = (bpp >> 3);
int true_byte_mult = (t->bpp >> 3);
ubyte* texmem = NULL;
// GL_BGRA_EXT is *much* faster with some hardware/drivers
if (true_byte_mult == 4) {
texFormat = GL_UNSIGNED_INT_8_8_8_8_REV;
glFormat = GL_BGRA;
} else if (true_byte_mult == 3) {
texFormat = GL_UNSIGNED_BYTE;
glFormat = GL_BGR;
} else {
texFormat = GL_UNSIGNED_SHORT_1_5_5_5_REV;
glFormat = GL_BGRA;
}
if (byte_mult == 1) {
texFormat = GL_UNSIGNED_BYTE;
glFormat = GL_ALPHA;
texmem = (ubyte *) vm_malloc (width*height*byte_mult);
ubyte* texmemp = texmem;
Assert( texmem != NULL );
int luminance = 0;
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if ( (i < height) && (j < width) ) {
if ( true_byte_mult > 1 ) {
luminance = 0;
if ( true_byte_mult > 3 ) {
for (int k = 0; k < 3; k++) {
luminance += data[(i*width+j)*true_byte_mult+k];
}
*texmemp++ = (ubyte)((luminance / 3) * (data[(i*width+j)*true_byte_mult+3]/255.0f));
} else {
for (int k = 0; k < true_byte_mult; k++) {
luminance += data[(i*width+j)*true_byte_mult+k];
}
*texmemp++ = (ubyte)(luminance / true_byte_mult);
}
} else {
*texmemp++ = GL_xlat[data[i*width+j]];
}
} else {
*texmemp++ = 0;
}
}
}
}
glBindTexture(GL_TEXTURE_2D, t->texture_id);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, glFormat, texFormat, (texmem)?texmem:data);
if (texmem != NULL)
vm_free(texmem);
}
// -----------------------------------------------------------------------------
// GL_EXT_framebuffer_object stuff (ie, render-to-texture)
//
+7 -2
View File
@@ -194,6 +194,11 @@ int gr_opengl_create_buffer()
opengl_vertex_buffer vbuffer;
// allocate additional blocks if we need them to prevent memory fragmentation, 15 at a time
if ( GL_vertex_buffers.size() >= GL_vertex_buffers.capacity() ) {
GL_vertex_buffers.reserve( GL_vertex_buffers.size() + 15 );
}
GL_vertex_buffers.push_back( vbuffer );
GL_vertex_buffers_in_use++;
@@ -357,7 +362,7 @@ bool gr_opengl_pack_buffer(const int buffer_id, vertex_buffer *vb)
for (j = 0; j < vb->tex_buf.size(); j++) {
n_verts = vb->tex_buf[j].n_verts;
uint offset = vb->tex_buf[j].index_offset;
uint *index = vb->tex_buf[j].index;
const uint *index = vb->tex_buf[j].get_index();
// bump to our spot in the buffer
GLubyte *ibuf = m_vbp->index_list + offset;
@@ -494,7 +499,7 @@ static void opengl_init_arrays(opengl_vertex_buffer *vbp, const vertex_buffer *b
if (Cmdline_drawelements) \
glDrawElements(GL_TRIANGLES, count, element_type, ibuffer + (datap->index_offset + start)); \
else \
vglDrawRangeElements(GL_TRIANGLES, start, end, count, element_type, ibuffer + (datap->index_offset + start));
vglDrawRangeElements(GL_TRIANGLES, datap->i_first, datap->i_last, count, element_type, ibuffer + (datap->index_offset + start));
int GL_last_shader_flags = -1;
int GL_last_shader_index = -1;
+6 -1
View File
@@ -434,6 +434,10 @@ void gr_stub_draw_line_list(colored_vector *lines, int num)
{
}
void gr_stub_update_texture(int bitmap_handle, int bpp, ubyte* data, int width, int height)
{
}
// bitmap functions
int gr_stub_bm_load(ubyte type, int n, char *filename, CFILE *img_cfp, int *w, int *h, int *bpp, ubyte *c_type, int *mm_lvl, int *size)
{
@@ -524,7 +528,7 @@ int gr_stub_bm_load(ubyte type, int n, char *filename, CFILE *img_cfp, int *w, i
return 0;
}
int gr_stub_bm_lock(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags)
int gr_stub_bm_lock(char *filename, int handle, int bitmapnum, ubyte bpp, ubyte flags, bool nodebug)
{
ubyte c_type = BM_TYPE_NONE;
ubyte true_bpp;
@@ -811,5 +815,6 @@ bool gr_stub_init()
gr_screen.gf_line_htl = gr_stub_draw_htl_line;
gr_screen.gf_sphere_htl = gr_stub_draw_htl_sphere;
gr_screen.gf_update_texture = gr_stub_update_texture;
return true;
}
+68 -40
View File
@@ -290,7 +290,7 @@ static int Damage_flash_bright;
static int Damage_flash_timer;
HudGauge::HudGauge():
base_w(0), base_h(0), gauge_config(-1), font_num(FONT1), config_override(true), reticle_follow(false),
base_w(0), base_h(0), gauge_config(-1), font_num(FONT1), reticle_follow(false), lock_color(false), sexp_lock_color(false),
active(false), off_by_default(false), sexp_override(false), pop_up(false), disabled_views(0), custom_gauge(false),
texture_target(-1), canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
{
@@ -307,15 +307,15 @@ texture_target(-1), canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
texture_target_fname[0] = '\0';
custom_name[0] = '\0';
custom_text[0] = '\0';
custom_text = "";
custom_frame.first_frame = -1;
custom_frame.num_frames = 0;
custom_frame_offset = 0;
}
HudGauge::HudGauge(int _gauge_object, int _gauge_config, bool _allow_override, bool _slew, bool _message, int _disabled_views, int r, int g, int b):
base_w(0), base_h(0), gauge_config(_gauge_config), gauge_object(_gauge_object), font_num(FONT1), config_override(_allow_override),
reticle_follow(_slew), active(false), off_by_default(false), sexp_override(false), pop_up(false), message_gauge(_message),
HudGauge::HudGauge(int _gauge_object, int _gauge_config, bool _slew, bool _message, int _disabled_views, int r, int g, int b):
base_w(0), base_h(0), gauge_config(_gauge_config), gauge_object(_gauge_object), font_num(FONT1),
reticle_follow(_slew), lock_color(false), sexp_lock_color(false), active(false), off_by_default(false), sexp_override(false), pop_up(false), message_gauge(_message),
disabled_views(_disabled_views), custom_gauge(false), textoffset_x(0), textoffset_y(0), texture_target(-1),
canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
{
@@ -341,8 +341,8 @@ canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
texture_target_fname[0] = '\0';
custom_name[0] = '\0';
custom_text[0] = '\0';
default_text[0] = '\0';
custom_text = "";
default_text = "";
custom_frame.first_frame = -1;
custom_frame.num_frames = 0;
custom_frame_offset = 0;
@@ -350,8 +350,8 @@ canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
// constructor for custom gauges
HudGauge::HudGauge(int _gauge_config, bool _slew, int r, int g, int b, char* _custom_name, char* _custom_text, char* frame_fname, int txtoffset_x, int txtoffset_y):
base_w(0), base_h(0), gauge_config(_gauge_config), gauge_object(HUD_OBJECT_CUSTOM), font_num(FONT1), config_override(true),
reticle_follow(_slew), active(false), off_by_default(false), sexp_override(false), pop_up(false), message_gauge(false),
base_w(0), base_h(0), gauge_config(_gauge_config), gauge_object(HUD_OBJECT_CUSTOM), font_num(FONT1),
reticle_follow(_slew), lock_color(false), sexp_lock_color(false), active(false), off_by_default(false), sexp_override(false), pop_up(false), message_gauge(false),
disabled_views(VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), custom_gauge(true), textoffset_x(txtoffset_x),
textoffset_y(txtoffset_y), texture_target(-1), canvas_w(-1), canvas_h(-1), target_w(-1), target_h(-1)
{
@@ -379,11 +379,11 @@ disabled_views(VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), cus
}
if(_custom_text) {
strcpy_s(custom_text, _custom_text);
strcpy_s(default_text, _custom_text);
custom_text = _custom_text;
default_text = _custom_text;
} else {
custom_text[0] = '\0';
default_text[0] = '\0';
custom_text = "";
default_text = "";
}
custom_frame.first_frame = -1;
@@ -431,9 +431,9 @@ char* HudGauge::getCustomGaugeName()
return custom_name;
}
char* HudGauge::getCustomGaugeText()
const char* HudGauge::getCustomGaugeText()
{
return custom_text;
return custom_text.c_str();
}
void HudGauge::updateCustomGaugeCoords(int _x, int _y)
@@ -455,18 +455,22 @@ void HudGauge::updateCustomGaugeFrame(int frame_offset)
custom_frame_offset = frame_offset;
}
void HudGauge::updateCustomGaugeText(char* txt)
void HudGauge::updateCustomGaugeText(const char* txt)
{
if(!custom_gauge) {
return;
}
strcpy_s(custom_text, txt);
custom_text = txt;
}
bool HudGauge::configOverride()
void HudGauge::updateCustomGaugeText(SCP_string& txt)
{
return config_override;
if(!custom_gauge) {
return;
}
custom_text = txt;
}
void HudGauge::setFont()
@@ -549,8 +553,21 @@ int HudGauge::getObjectType()
return gauge_object;
}
void HudGauge::lockConfigColor(bool lock)
{
lock_color = lock;
}
void HudGauge::sexpLockConfigColor(bool lock)
{
sexp_lock_color = lock;
}
void HudGauge::updateColor(int r, int g, int b, int a)
{
if(sexp_lock_color || lock_color)
return;
gr_init_alphacolor(&gauge_color, r, g, b, a);
}
@@ -661,11 +678,14 @@ void HudGauge::render(float frametime)
setGaugeColor();
if(custom_text) {
if(custom_text[0] != '\0') {
hud_num_make_mono(custom_text);
renderString(position[0] + textoffset_x, position[1] + textoffset_y, custom_text);
}
if( !custom_text.empty() ) {
char *text = new char[custom_text.size()+1];
strcpy(text, custom_text.c_str());
hud_num_make_mono(text);
renderString(position[0] + textoffset_x, position[1] + textoffset_y, text);
delete[] text;
}
if(custom_frame.first_frame > -1) {
@@ -1016,7 +1036,9 @@ void HudGauge::pageIn()
void HudGauge::initialize()
{
//Reset text to default
strcpy_s(custom_text, default_text);
custom_text = default_text;
sexp_lock_color = false;
}
bool HudGauge::canRender()
@@ -1392,7 +1414,7 @@ void hud_update_frame(float frametime)
// to deal with the message. hud_sqaudmsg_do_frame will return 0 if the key
// wasn't used in messaging mode, otherwise 1. In the event the key was used,
// return immediately out of this function.
if ( Players->flags & PLAYER_FLAGS_MSG_MODE ) {
if ( Players[Player_num].flags & PLAYER_FLAGS_MSG_MODE ) {
hud_squadmsg_do_frame();
}
@@ -1592,7 +1614,7 @@ void hud_render_preprocess(float frametime)
}
HudGaugeMissionTime::HudGaugeMissionTime():
HudGauge(HUD_OBJECT_MISSION_TIME, HUD_MISSION_TIME, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_MISSION_TIME, HUD_MISSION_TIME, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -1820,7 +1842,7 @@ void update_throttle_sound()
}
else {
if ( Player_engine_snd_loop == -1 ){
Player_engine_snd_loop = snd_play_looping( &Snds[ship_get_sound(Player_obj, SND_ENGINE)], 0.0f , -1, -1, percent_throttle * ENGINE_MAX_VOL, FALSE);
Player_engine_snd_loop = snd_play_looping( &Snds[Ship_info[Ships[Player_obj->instance].ship_info_index].engine_snd_cockpit], 0.0f , -1, -1, percent_throttle * ENGINE_MAX_VOL );
} else {
// The sound may have been trashed at the low-level if sound channel overflow.
// TODO: implement system where certain sounds cannot be interrupted (priority?)
@@ -1859,7 +1881,7 @@ void hud_damage_popup_init()
}
HudGaugeDamage::HudGaugeDamage():
HudGauge(HUD_OBJECT_DAMAGE, HUD_DAMAGE_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_DAMAGE, HUD_DAMAGE_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -1925,6 +1947,8 @@ void HudGaugeDamage::initialize()
Damage_flash_timer = timestamp(1);
next_flash = timestamp(1);
flash_status = false;
HudGauge::initialize();
}
void HudGaugeDamage::pageIn()
@@ -2264,7 +2288,7 @@ void hud_start_text_flash(char *txt, int t, int interval)
}
HudGaugeTextWarnings::HudGaugeTextWarnings():
HudGauge(HUD_OBJECT_TEXT_WARNINGS, HUD_TEXT_FLASH, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_TEXT_WARNINGS, HUD_TEXT_FLASH, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -2273,6 +2297,8 @@ void HudGaugeTextWarnings::initialize()
{
next_flash = timestamp(0);
flash_flags = false;
HudGauge::initialize();
}
int HudGaugeTextWarnings::maybeTextFlash()
@@ -2318,7 +2344,7 @@ void HudGaugeTextWarnings::render(float frametime)
}
HudGaugeKills::HudGaugeKills():
HudGauge(HUD_OBJECT_KILLS, HUD_KILLS_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_KILLS, HUD_KILLS_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -2378,7 +2404,7 @@ void HudGaugeKills::render(float frametime)
}
HudGaugeLag::HudGaugeLag():
HudGauge(HUD_OBJECT_LAG, HUD_LAG_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_LAG, HUD_LAG_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -2682,7 +2708,7 @@ void hud_support_view_update()
}
HudGaugeSupport::HudGaugeSupport():
HudGauge(HUD_OBJECT_SUPPORT, HUD_SUPPORT_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_SUPPORT, HUD_SUPPORT_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -3196,7 +3222,7 @@ void hud_add_objective_messsage(int type, int status)
}
HudGaugeObjectiveNotify::HudGaugeObjectiveNotify():
HudGauge(HUD_OBJECT_OBJ_NOTIFY, HUD_OBJECTIVES_NOTIFY_GAUGE, true, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_OBJ_NOTIFY, HUD_OBJECTIVES_NOTIFY_GAUGE, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -3244,6 +3270,8 @@ void HudGaugeObjectiveNotify::initialize()
flash_timer[0] = timestamp(1);
flash_timer[1] = timestamp(1);
flash_flag = false;
HudGauge::initialize();
}
void HudGaugeObjectiveNotify::pageIn()
@@ -3329,7 +3357,7 @@ void HudGaugeObjectiveNotify::renderRedAlert()
{
int w, h;
if ( !red_alert_check_status() ) {
if ( !red_alert_in_progress() ) {
return;
}
@@ -3348,7 +3376,7 @@ void HudGaugeObjectiveNotify::renderRedAlert()
// Blit the background
gr_set_color_fast(&Color_red); // Color box red, because it's an emergency
GR_AABITMAP(Objective_display_gauge.first_frame, position[0], position[1]);
renderBitmap(Objective_display_gauge.first_frame, position[0], position[1]);
startFlashNotify();
if(maybeFlashNotify()) {
@@ -3698,7 +3726,7 @@ HudGauge* hud_get_gauge(char* name)
}
HudGaugeMultiMsg::HudGaugeMultiMsg():
HudGauge(HUD_OBJECT_MULTI_MSG, HUD_MESSAGE_LINES, true, false, true, 0, 255, 255, 255)
HudGauge(HUD_OBJECT_MULTI_MSG, HUD_MESSAGE_LINES, false, true, 0, 255, 255, 255)
{
}
@@ -3725,7 +3753,7 @@ void HudGaugeMultiMsg::render(float frametime)
}
HudGaugeVoiceStatus::HudGaugeVoiceStatus():
HudGauge(HUD_OBJECT_VOICE_STATUS, HUD_MESSAGE_LINES, true, false, true, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY, 255, 255, 255)
HudGauge(HUD_OBJECT_VOICE_STATUS, HUD_MESSAGE_LINES, false, true, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY, 255, 255, 255)
{
}
@@ -3764,7 +3792,7 @@ void HudGaugeVoiceStatus::render(float frametime)
}
HudGaugePing::HudGaugePing():
HudGauge(HUD_OBJECT_PING, HUD_LAG_GAUGE, true, false, false, 0, 255, 255, 255)
HudGauge(HUD_OBJECT_PING, HUD_LAG_GAUGE, false, false, 0, 255, 255, 255)
{
}
@@ -3801,7 +3829,7 @@ void HudGaugePing::render(float frametime)
}
HudGaugeSupernova::HudGaugeSupernova():
HudGauge(HUD_OBJECT_SUPERNOVA, HUD_DIRECTIVES_VIEW, true, false, false, 0, 255, 255, 255)
HudGauge(HUD_OBJECT_SUPERNOVA, HUD_DIRECTIVES_VIEW, false, false, 0, 255, 255, 255)
{
}
+13 -8
View File
@@ -13,6 +13,7 @@
#include "hud/hudgauges.h"
#include "graphics/2d.h"
#include "hud/hudparse.h"
#include "globalincs/vmallocator.h"
struct object;
struct cockpit_display;
@@ -214,7 +215,8 @@ protected:
int font_num;
bool config_override;
bool lock_color;
bool sexp_lock_color;
bool reticle_follow;
bool active;
bool off_by_default;
@@ -234,8 +236,9 @@ protected:
int custom_frame_offset;
int textoffset_x, textoffset_y;
char custom_name[NAME_LENGTH];
char custom_text[NAME_LENGTH];
char default_text[NAME_LENGTH];
SCP_string custom_text;
SCP_string default_text;
// Render to texture stuff
char texture_target_fname[MAX_FILENAME_LEN];
@@ -246,7 +249,7 @@ protected:
public:
// constructors
HudGauge();
HudGauge(int _gauge_object, int _gauge_config, bool _allow_override, bool _slew, bool _message, int _disabled_views, int r, int g, int b);
HudGauge(int _gauge_object, int _gauge_config, bool _slew, bool _message, int _disabled_views, int r, int g, int b);
// constructor for custom gauges
HudGauge(int _gauge_config, bool _slew, int r, int g, int b, char* _custom_name, char* _custom_text, char* frame_fname, int txtoffset_x, int txtoffset_y);
@@ -262,8 +265,9 @@ public:
bool isOffbyDefault();
bool isActive();
bool configOverride();
void updateColor(int r, int g, int b, int a);
void updateColor(int r, int g, int b, int a = 255);
void lockConfigColor(bool lock);
void sexpLockConfigColor(bool lock);
void updateActive(bool show);
void updatePopUp(bool pop_up_flag);
void updateSexpOverride(bool sexp);
@@ -280,8 +284,9 @@ public:
char* getCustomGaugeName();
void updateCustomGaugeCoords(int _x, int _y);
void updateCustomGaugeFrame(int frame_offset);
void updateCustomGaugeText(char* txt);
char* getCustomGaugeText();
void updateCustomGaugeText(const char* txt);
void updateCustomGaugeText(SCP_string& txt);
const char* getCustomGaugeText();
void startPopUp(int time=4000);
int popUpActive();
+8 -22
View File
@@ -514,7 +514,6 @@ void draw_bounding_brackets(int x1, int y1, int x2, int y2, int w_correction, in
char* tinfo_class = NULL;
char temp_name[NAME_LENGTH*2+3];
char temp_class[NAME_LENGTH];
SCP_list<jump_node>::iterator jnp;
switch(t_objp->type)
{
@@ -561,12 +560,7 @@ void draw_bounding_brackets(int x1, int y1, int x2, int y2, int w_correction, in
}
break;
case OBJ_JUMP_NODE:
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == t_objp)
break;
}
strcpy_s(temp_name, jnp->get_name_ptr());
strcpy_s(temp_name, t_objp->jnp->get_name_ptr());
end_string_at_first_hash_symbol(temp_name);
tinfo_name = temp_name;
break;
@@ -590,7 +584,7 @@ void draw_bounding_brackets(int x1, int y1, int x2, int y2, int w_correction, in
}
HudGaugeBrackets::HudGaugeBrackets():
HudGauge(HUD_OBJECT_BRACKETS, HUD_OFFSCREEN_INDICATOR, true, false, true, VM_DEAD_VIEW, 255, 255, 255)
HudGauge(HUD_OBJECT_BRACKETS, HUD_OFFSCREEN_INDICATOR, false, true, VM_DEAD_VIEW, 255, 255, 255)
{
}
@@ -648,7 +642,6 @@ void HudGaugeBrackets::renderObjectBrackets(object *targetp, color *clr, int w_c
int x1,x2,y1,y2;
int draw_box = true;
int bound_rc;
SCP_list<jump_node>::iterator jnp;
if ( Player->target_is_dying <= 0 ) {
int modelnum;
@@ -671,6 +664,7 @@ void HudGaugeBrackets::renderObjectBrackets(object *targetp, color *clr, int w_c
break;
case OBJ_WEAPON:
//Assert(Weapon_info[Weapons[targetp->instance].weapon_info_index].subtype == WP_MISSILE);
modelnum = Weapon_info[Weapons[targetp->instance].weapon_info_index].model_num;
if (modelnum != -1)
bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 );
@@ -694,12 +688,7 @@ void HudGaugeBrackets::renderObjectBrackets(object *targetp, color *clr, int w_c
break;
case OBJ_JUMP_NODE:
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == targetp)
break;
}
modelnum = jnp->get_modelnum();
modelnum = targetp->jnp->get_modelnum();
bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 );
break;
@@ -872,7 +861,6 @@ void HudGaugeBrackets::renderBoundingBrackets(int x1, int y1, int x2, int y2, in
char* tinfo_class = NULL;
char temp_name[NAME_LENGTH*2+3];
char temp_class[NAME_LENGTH];
SCP_list<jump_node>::iterator jnp;
switch(t_objp->type) {
case OBJ_SHIP:
@@ -913,12 +901,7 @@ void HudGaugeBrackets::renderBoundingBrackets(int x1, int y1, int x2, int y2, in
}
break;
case OBJ_JUMP_NODE:
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == t_objp)
break;
}
strcpy_s(temp_name, jnp->get_name_ptr());
strcpy_s(temp_name, t_objp->jnp->get_name_ptr());
end_string_at_first_hash_symbol(temp_name);
tinfo_name = temp_name;
break;
@@ -930,6 +913,9 @@ void HudGaugeBrackets::renderBoundingBrackets(int x1, int y1, int x2, int y2, in
if(tinfo_class && (flags & TARGET_DISPLAY_CLASS)) {
gr_string(x2+3, y1+9, tinfo_class);
}
/* if(tinfo_callsign) {
gr_string(x2+3, y1+18, tinfo_callsign);
} */
}
// we're done, so bring the scale back to normal
+5 -2
View File
@@ -140,7 +140,7 @@ char *Escort_gauge_filenames[GR_NUM_RESOLUTIONS][MAX_ESCORT_SHIPS] =
static int Last_target_index; // index into Escort_gauges for last targeted via 'Next Escort Target' key
HudGaugeEscort::HudGaugeEscort():
HudGauge(HUD_OBJECT_ESCORT, HUD_ESCORT_VIEW, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_ESCORT, HUD_ESCORT_VIEW, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -465,12 +465,15 @@ void hud_escort_init()
// ----------------------------------------------------------------------
// hud_escort_clear_all()
//
void hud_escort_clear_all()
void hud_escort_clear_all(bool clear_flags)
{
int i;
Num_escort_ships = 0;
for ( i = 0; i < Max_escort_ships; i++ ) {
if(clear_flags && (Escort_ships[i].objnum >= 0) && (Objects[Escort_ships[i].objnum].type == OBJ_SHIP) && (Objects[Escort_ships[i].objnum].instance >= 0)){
Ships[Objects[Escort_ships[i].objnum].instance].flags &= ~SF_ESCORT;
}
Escort_ships[i].obj_signature = -99;
Escort_ships[i].np_id = -1;
shield_info_reset(&Escort_ships[i].hit_info);
+1 -1
View File
@@ -26,7 +26,7 @@ void hud_escort_init();
void hud_setup_escort_list(int level = 1);
void hud_escort_view_toggle();
void hud_add_remove_ship_escort(int objnum, int supress_feedback = 0);
void hud_escort_clear_all();
void hud_escort_clear_all(bool clear_flags = false);
void hud_escort_ship_hit(object *objp, int quadrant);
void hud_escort_target_next();
void hud_escort_cull_list();
+117 -32
View File
@@ -129,24 +129,9 @@ void update_ets(object* objp, float fl_frametime)
shield_add_strength(objp, shield_delta);
int i;
float total_shield_strength = shield_get_strength(objp);
float max_shield_recharge = ship_p->ship_max_shield_strength * ship_p->max_shield_recharge_pct;
float shield_balance = 1.0f;
if ((max_shield_recharge > 0) && (total_shield_strength > max_shield_recharge))
shield_balance = total_shield_strength/max_shield_recharge;
// prevent any of the segments from going over the limits
for (i=0; i<objp->n_shield_segments; i++){
if ((total_shield_strength > 0.0f) && (ship_p->ship_max_shield_segment[i] > 0.0f)) {
objp->shield_quadrant[i] /= shield_balance;
if ( (_ss = shield_get_quad(objp,i)) > ship_p->ship_max_shield_segment[i] ){
objp->shield_quadrant[i] *= ship_p->ship_max_shield_segment[i] / _ss;
}
} else {
objp->shield_quadrant[i] = 0.0f;
if ( (_ss = shield_get_strength(objp)) > ship_p->ship_max_shield_strength ){
for (int i=0; i<MAX_SHIELD_SECTIONS; i++){
objp->shield_quadrant[i] *= ship_p->ship_max_shield_strength / _ss;
}
}
@@ -672,13 +657,13 @@ void transfer_energy_to_weapons(object* obj)
}
HudGaugeEts::HudGaugeEts():
HudGauge(HUD_OBJECT_ETS_ENGINES, HUD_ETS_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255),
HudGauge(HUD_OBJECT_ETS_ENGINES, HUD_ETS_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255),
System_type(0)
{
}
HudGaugeEts::HudGaugeEts(int _gauge_object, int _system_type):
HudGauge(_gauge_object, HUD_ETS_GAUGE, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255),
HudGauge(_gauge_object, HUD_ETS_GAUGE, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255),
System_type(_system_type)
{
}
@@ -728,13 +713,13 @@ void HudGaugeEts::pageIn()
bm_page_in_aabitmap( Ets_bar.first_frame, Ets_bar.num_frames );
}
/**
* Draw one ETS bar to screen
*/
void HudGaugeEts::blitGauge(int index)
{
int y_start, y_end, clip_h, w, h, x, y;
// draw the letters for the gauges first, before any clipping occurs
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
clip_h = fl2i( (1 - Energy_levels[index]) * ETS_bar_h );
bm_get_info(Ets_bar.first_frame,&w,&h);
@@ -787,6 +772,97 @@ void HudGaugeEts::blitGauge(int index)
}
}
/**
* Default ctor for retail ETS gauge
* 2nd arg (0) is not used
*/
HudGaugeEtsRetail::HudGaugeEtsRetail():
HudGaugeEts(HUD_OBJECT_ETS_RETAIL, 0)
{
}
/**
* Render the ETS retail gauge to the screen (weapon+shield+engine)
*/
void HudGaugeEtsRetail::render(float frametime)
{
int i;
int initial_position;
ship* ship_p = &Ships[Player_obj->instance];
if ( Ets_bar.first_frame < 0 ) {
return;
}
// if at least two gauges are not shown, don't show any
i = 0;
if (!ship_has_energy_weapons(ship_p)) i++;
if (Player_obj->flags & OF_NO_SHIELDS) i++;
if (!ship_has_engine_power(ship_p)) i++;
if (i >= 2) return;
setGaugeColor();
// draw the letters for the gauges first, before any clipping occurs
// skip letter for any missing gauges (max one, see check above)
initial_position = 0;
if (ship_has_energy_weapons(ship_p)) {
Letter = Letters[0];
position[0] = Gauge_positions[initial_position++];
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
}
if (!(Player_obj->flags & OF_NO_SHIELDS)) {
Letter = Letters[1];
position[0] = Gauge_positions[initial_position++];
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
}
if (ship_has_engine_power(ship_p)) {
Letter = Letters[2];
position[0] = Gauge_positions[initial_position++];
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
}
// draw gauges, skipping any gauge that is missing
initial_position = 0;
if (ship_has_energy_weapons(ship_p)) {
Letter = Letters[0];
position[0] = Gauge_positions[initial_position++];
blitGauge(ship_p->weapon_recharge_index);
}
if (!(Player_obj->flags & OF_NO_SHIELDS)) {
Letter = Letters[1];
position[0] = Gauge_positions[initial_position++];
blitGauge(ship_p->shield_recharge_index);
}
if (ship_has_engine_power(ship_p)) {
Letter = Letters[2];
position[0] = Gauge_positions[initial_position++];
blitGauge(ship_p->engine_recharge_index);
}
}
/**
* Set ETS letters for retail ETS gauge
* Allows for different languages to be used in the hud
*/
void HudGaugeEtsRetail::initLetters(char *_letters)
{
int i;
for ( i = 0; i < num_retail_ets_gauges; ++i)
Letters[i] = _letters[i];
}
/**
* Set the three possible positions for ETS bars
*/
void HudGaugeEtsRetail::initGaugePositions(int *_gauge_positions)
{
int i;
for ( i = 0; i < num_retail_ets_gauges; ++i)
Gauge_positions[i] = _gauge_positions[i];
}
HudGaugeEtsWeapons::HudGaugeEtsWeapons():
HudGaugeEts(HUD_OBJECT_ETS_WEAPONS, (int)WEAPONS)
{
@@ -809,7 +885,7 @@ void HudGaugeEtsWeapons::render(float frametime)
if (!ship_has_engine_power(ship_p)) i++;
if (i >= 2) return;
// now actually check if this
// no weapon energy, no weapon gauge
if (!ship_has_energy_weapons(ship_p))
{
return;
@@ -817,6 +893,9 @@ void HudGaugeEtsWeapons::render(float frametime)
setGaugeColor();
// draw the letters for the gauge first, before any clipping occurs
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
// draw the gauges for the weapon system
blitGauge(ship_p->weapon_recharge_index);
}
@@ -843,14 +922,17 @@ void HudGaugeEtsShields::render(float frametime)
if (!ship_has_engine_power(ship_p)) i++;
if (i >= 2) return;
setGaugeColor();
// draw the letters for the gauges first, before any clipping occurs
// no shields, no shields gauge
if (Player_obj->flags & OF_NO_SHIELDS) {
return;
}
// draw the gauges for the weapon system
setGaugeColor();
// draw the letters for the gauge first, before any clipping occurs
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
// draw the gauge for the shield system
blitGauge(ship_p->shield_recharge_index);
}
@@ -876,13 +958,16 @@ void HudGaugeEtsEngines::render(float frametime)
if (!ship_has_engine_power(ship_p)) i++;
if (i >= 2) return;
setGaugeColor();
// draw the letters for the gauges first, before any clipping occurs
// no engines, no engine gauge
if (!ship_has_engine_power(ship_p)) {
return;
}
// draw the gauges for the weapon system
setGaugeColor();
// draw the letters for the gauge first, before any clipping occurs
renderPrintf(position[0] + Letter_offsets[0], position[1] + Letter_offsets[1], NOX("%c"), Letter);
// draw the gauge for the engine system
blitGauge(ship_p->engine_recharge_index);
}
+14
View File
@@ -18,6 +18,8 @@ struct object;
#define ETS_RECHARGE_RATE 4.0f // Recharge this percent of total shields/second
const int num_retail_ets_gauges = 3;
extern float Energy_levels[];
extern int Weapon_energy_cheat;
@@ -81,4 +83,16 @@ public:
void render(float frametime);
};
class HudGaugeEtsRetail: public HudGaugeEts
{
protected:
char Letters[num_retail_ets_gauges];
int Gauge_positions[num_retail_ets_gauges];
public:
HudGaugeEtsRetail();
void render(float frametime);
void initLetters(char *_letters);
void initGaugePositions(int *_gauge_positions);
};
#endif
+7 -5
View File
@@ -145,7 +145,7 @@ void hud_draw_diamond(int x, int y, int width, int height)
}
HudGaugeLock::HudGaugeLock():
HudGauge(HUD_OBJECT_LOCK, HUD_LEAD_INDICATOR, true, false, false, VM_DEAD_VIEW, 255, 255, 255)
HudGauge(HUD_OBJECT_LOCK, HUD_LEAD_INDICATOR, false, false, VM_DEAD_VIEW, 255, 255, 255)
{
}
@@ -196,6 +196,8 @@ void HudGaugeLock::initialize()
Lock_gauge_draw_stamp = -1;
Lock_gauge_draw = 0;
Rotate_time_id = 1;
HudGauge::initialize();
}
// hud_show_lock_indicator() will display the lock indicator for homing missiles.
@@ -627,7 +629,7 @@ void hud_do_lock_indicator(float frametime)
if ( Missile_track_loop > -1 ) {
snd_stop(Missile_track_loop);
Missile_track_loop = -1;
Missile_lock_loop = snd_play(&Snds[ship_get_sound(Player_obj, SND_MISSILE_LOCK)]);
Missile_lock_loop = snd_play(&Snds[SND_MISSILE_LOCK]);
}
}
else {
@@ -847,7 +849,7 @@ void hud_calculate_lock_position(float frametime)
}
if ( Missile_track_loop == -1 ) {
Missile_track_loop = snd_play_looping( &Snds[ship_get_sound(Player_obj, SND_MISSILE_TRACKING)], 0.0f , -1, -1);
Missile_track_loop = snd_play_looping( &Snds[SND_MISSILE_TRACKING], 0.0f , -1, -1);
}
if (!Players[Player_num].lock_time_to_target) {
@@ -1059,7 +1061,7 @@ void hud_lock_get_new_lock_pos(object *target_objp)
}
ss = GET_NEXT( ss );
}
} else if ((target_shipp) && wip->wi_flags & WIF_HOMING_JAVELIN) {
} else if ( (target_shipp) && (wip->wi_flags & WIF_HOMING_JAVELIN)) {
Player->locking_subsys = ship_get_closest_subsys_in_sight(target_shipp, SUBSYSTEM_ENGINE, &Player_obj->pos);
if (Player->locking_subsys != NULL) {
get_subsystem_world_pos(target_objp, Player->locking_subsys, &lock_world_pos);
@@ -1103,7 +1105,7 @@ void hud_lock_determine_lock_point(vec3d *lock_world_pos_out)
Player->locking_on_center=0;
Player->locking_subsys=Player_ai->targeted_subsys;
Player->locking_subsys_parent=Player_ai->target_objnum;
} else if ( wip->wi_flags & WIF_HOMING_JAVELIN && target_objp->type == OBJ_SHIP) {
} else if ( (wip->wi_flags & WIF_HOMING_JAVELIN) && (target_objp->type == OBJ_SHIP)) {
if (!Player->locking_subsys ||
Player->locking_subsys->system_info->type != SUBSYSTEM_ENGINE) {
Player->locking_subsys = ship_get_closest_subsys_in_sight(&Ships[target_objp->instance], SUBSYSTEM_ENGINE, &Player_obj->pos);
+39 -19
View File
@@ -248,7 +248,7 @@ void hud_clear_msg_buffer()
}
HudGaugeMessages::HudGaugeMessages():
HudGauge(HUD_OBJECT_MESSAGES, HUD_MESSAGE_LINES, true, false, true, (VM_WARP_CHASE), 255, 255, 255)
HudGauge(HUD_OBJECT_MESSAGES, HUD_MESSAGE_LINES, false, true, (VM_WARP_CHASE), 255, 255, 255)
{
}
@@ -288,11 +288,13 @@ void HudGaugeMessages::initialize()
Window_height = Max_lines * Line_h;
active_messages.clear();
pending_messages = SCP_queue<HUD_message_data>(); // there's no clear() method for queues :\
pending_messages = SCP_queue<HUD_message_data>(); // there's no clear() method for queues :/
Scroll_needed = false;
Scroll_in_progress = false;
Scroll_time_id = 1;
HudGauge::initialize();
}
void HudGaugeMessages::pageIn()
@@ -413,6 +415,11 @@ void HudGaugeMessages::scrollMessages()
}
}
void HudGaugeMessages::clearMessages()
{
active_messages.clear();
}
void HudGaugeMessages::preprocess()
{
setFont();
@@ -420,10 +427,10 @@ void HudGaugeMessages::preprocess()
scrollMessages();
}
// ---------------------------------------------------------------------------------------
// HudGaugeMessages::render() will display the active HUD messages on the HUD. It will scroll
// the messages up when a new message arrives.
//
/**
* HudGaugeMessages::render() will display the active HUD messages on the HUD. It will scroll
* the messages up when a new message arrives.
*/
void HudGaugeMessages::render(float frametime)
{
hud_set_default_color();
@@ -1162,7 +1169,7 @@ void hud_scrollback_exit()
}
HudGaugeTalkingHead::HudGaugeTalkingHead():
HudGauge(HUD_OBJECT_TALKING_HEAD, HUD_TALKING_HEAD, true, false, true, (VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
HudGauge(HUD_OBJECT_TALKING_HEAD, HUD_TALKING_HEAD, false, true, (VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
{
}
@@ -1170,6 +1177,8 @@ void HudGaugeTalkingHead::initialize()
{
head_anim = NULL;
msg_id = -1;
HudGauge::initialize();
}
void HudGaugeTalkingHead::initHeaderOffsets(int x, int y)
@@ -1198,6 +1207,9 @@ void HudGaugeTalkingHead::initBitmaps(char *fname)
}
}
/**
* Create a new head animation object
*/
anim_instance* HudGaugeTalkingHead::createAnim(int anim_start_frame, anim* anim_data)
{
anim_play_struct aps;
@@ -1213,6 +1225,11 @@ anim_instance* HudGaugeTalkingHead::createAnim(int anim_start_frame, anim* anim_
return anim_play(&aps);
}
/**
* Renders everything for a head animation except the actual head animation
* ANI (see anim_render_all), i.e. the background, border & title
* Also checks for when new head ani's need to start playing
*/
void HudGaugeTalkingHead::render(float frametime)
{
if ( Head_frame.first_frame == -1 ){
@@ -1220,7 +1237,7 @@ void HudGaugeTalkingHead::render(float frametime)
}
if(msg_id != -1 && head_anim != NULL) {
if(anim_playing(head_anim)) {
if(!head_anim->done_playing) {
// draw frame
// hud_set_default_color();
setGaugeColor();
@@ -1230,12 +1247,20 @@ void HudGaugeTalkingHead::render(float frametime)
gr_clear();
resetClip();
renderBitmap(Head_frame.first_frame, position[0], position[1]);
renderBitmap(Head_frame.first_frame, position[0], position[1]); // head ani border
gr_set_screen_scale(base_w, base_h);
setGaugeColor();
generic_anim_render(head_anim,frametime, position[0] + Anim_offsets[0] + fl2i(HUD_offset_x), position[1] + Anim_offsets[1] + fl2i(HUD_offset_y));
// draw title
renderString(position[0] + Header_offsets[0], position[1] + Header_offsets[1], XSTR("message", 217));
} else {
anim_stop_playing(head_anim);
for (int j = 0; j < Num_messages_playing; ++j) {
if (Playing_messages[j].id == msg_id) {
Playing_messages[j].play_anim = false;
break; // only one head ani plays at a time
}
}
msg_id = -1; // allow repeated messages to display a new head ani
head_anim = NULL; // Nothing to see here anymore, move along
}
}
@@ -1243,13 +1268,8 @@ void HudGaugeTalkingHead::render(float frametime)
for (int i = 0; i < Num_messages_playing; i++ ) {
if(Playing_messages[i].play_anim && Playing_messages[i].id != msg_id ) {
msg_id = Playing_messages[i].id;
if(head_anim) {
if(anim_playing(head_anim)) {
anim_stop_playing(head_anim);
}
}
if (Playing_messages[i].anim_data)
head_anim = createAnim(Playing_messages[i].start_frame, Playing_messages[i].anim_data);
head_anim = Playing_messages[i].anim_data;
else
head_anim = NULL;
@@ -1294,7 +1314,7 @@ bool HudGaugeTalkingHead::canRender()
}
HudGaugeFixedMessages::HudGaugeFixedMessages():
HudGauge(HUD_OBJECT_FIXED_MESSAGES, HUD_MESSAGE_LINES, true, false, true, (VM_WARP_CHASE), 255, 255, 255)
HudGauge(HUD_OBJECT_FIXED_MESSAGES, HUD_MESSAGE_LINES, false, true, (VM_WARP_CHASE), 255, 255, 255)
{
}
@@ -1313,4 +1333,4 @@ void HudGaugeFixedMessages::render(float frametime) {
void HudGaugeFixedMessages::pageIn()
{
}
}
+4 -1
View File
@@ -14,6 +14,7 @@
#include "hud/hud.h"
#include "anim/packunpack.h"
#include "graphics/generic.h"
#define MAX_HUD_LINE_LEN 256 // maximum number of characters for a HUD message
@@ -106,6 +107,7 @@ public:
void initStepSize(int h);
void initTotalLife(int ms);
void clearMessages();
void processMessageBuffer();
void addPending(char *text, int source, int x = 0);
void scrollMessages();
@@ -123,7 +125,8 @@ class HudGaugeTalkingHead: public HudGauge // HUD_TALKING_HEAD
int Anim_offsets[2];
int Anim_size[2];
anim_instance *head_anim;
generic_anim *head_anim;
int msg_id;
public:
HudGaugeTalkingHead();
+1029 -182
View File
File diff suppressed because it is too large. Load diff
+57 -52
View File
@@ -7,6 +7,7 @@
#include "globalincs/globals.h"
#include "ai/ai.h"
#include "graphics/2d.h"
//Variables
extern int Num_custom_gauges;
@@ -26,159 +27,163 @@ void hud_positions_init();
void set_current_hud();
void init_hud();
void load_missing_retail_gauges();
void check_color(int *color);
#define NUM_HUD_OBJECT_ENTRIES 54
#define NUM_HUD_OBJECT_ENTRIES 54 // not used anywhere?
int parse_gauge_type();
void load_gauge(int gauge, int base_w = -1, int base_h = -1, int font = -1, int ship_idx = -1);
void load_gauge(int gauge, int base_w = -1, int base_h = -1, int font = -1, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_CUSTOM 0
void load_gauge_custom(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_custom(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_MESSAGES 1
void load_gauge_messages(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_messages(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TRAINING_MESSAGES 2
void load_gauge_training_messages(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_training_messages(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_SUPPORT 3
void load_gauge_support(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_support(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_DAMAGE 4
void load_gauge_damage(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_damage(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_WINGMAN_STATUS 5
void load_gauge_wingman_status(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_wingman_status(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_AUTO_SPEED 6
void load_gauge_auto_speed(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_auto_speed(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_AUTO_TARGET 7
void load_gauge_auto_target(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_auto_target(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_CMEASURES 8
void load_gauge_countermeasures(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_countermeasures(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TALKING_HEAD 9
void load_gauge_talking_head(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_talking_head(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_DIRECTIVES 10
void load_gauge_directives(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_directives(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_WEAPONS 11
void load_gauge_weapons(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_weapons(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_OBJ_NOTIFY 12
void load_gauge_objective_notify(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_objective_notify(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_SQUAD_MSG 13
void load_gauge_squad_message(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_squad_message(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_LAG 14
void load_gauge_lag(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_lag(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_MINI_SHIELD 15
void load_gauge_mini_shields(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_mini_shields(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_PLAYER_SHIELD 16
void load_gauge_player_shields(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_player_shields(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TARGET_SHIELD 17
void load_gauge_target_shields(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_target_shields(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ESCORT 18
void load_gauge_escort_view(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_escort_view(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_MISSION_TIME 19
void load_gauge_mission_time(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_mission_time(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ETS_WEAPONS 20
void load_gauge_ets_weapons(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_ets_weapons(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ETS_SHIELDS 21
void load_gauge_ets_shields(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_ets_shields(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ETS_ENGINES 22
void load_gauge_ets_engines(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_ets_engines(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TARGET_MONITOR 23
void load_gauge_target_monitor(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_target_monitor(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_EXTRA_TARGET_DATA 24
void load_gauge_extra_target_data(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_extra_target_data(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_RADAR_STD 25
void load_gauge_radar_std(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_radar_std(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_RADAR_ORB 26
void load_gauge_radar_orb(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_radar_orb(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_RADAR_BSG 27
void load_gauge_radar_dradis(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_radar_dradis(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_AFTERBURNER 28
void load_gauge_afterburner(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_afterburner(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_WEAPON_ENERGY 29
void load_gauge_weapon_energy(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_weapon_energy(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TEXT_WARNINGS 30
void load_gauge_text_warnings(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_text_warnings(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_CENTER_RETICLE 31
void load_gauge_center_reticle(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_center_reticle(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_THROTTLE 32
void load_gauge_throttle(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_throttle(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_THREAT 33
void load_gauge_threat_indicator(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_threat_indicator(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_LEAD 34
void load_gauge_lead(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_lead(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_LEAD_SIGHT 35
void load_gauge_lead_sight(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_lead_sight(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_LOCK 36
void load_gauge_lock(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_lock(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_WEAPON_LINKING 37
void load_gauge_weapon_linking(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_weapon_linking(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_MULTI_MSG 38
void load_gauge_multi_msg(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_multi_msg(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_VOICE_STATUS 39
void load_gauge_voice_status(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_voice_status(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_PING 40
void load_gauge_ping(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_ping(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_SUPERNOVA 41
void load_gauge_supernova(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_supernova(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_OFFSCREEN 42
void load_gauge_offscreen(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_offscreen(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_BRACKETS 43
void load_gauge_brackets(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_brackets(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ORIENTATION_TEE 44
void load_gauge_orientation_tee(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_orientation_tee(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_HOSTILE_TRI 45
void load_gauge_hostile_tri(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_hostile_tri(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_TARGET_TRI 46
void load_gauge_target_tri(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_target_tri(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_MISSILE_TRI 47
void load_gauge_missile_tri(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_missile_tri(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_KILLS 48
void load_gauge_kills(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_kills(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_FIXED_MESSAGES 49
void load_gauge_fixed_messages(int base_w, int base_h, int font, int ship_idx = -1);
void load_gauge_fixed_messages(int base_w, int base_h, int font, int ship_idx = -1, color *use_clr = NULL);
#define HUD_OBJECT_ETS_RETAIL 50
void load_gauge_ets_retail(int base_w, int base_h, int hud_font, int ship_idx = -1, color *use_clr = NULL);
#endif // _HUDPARSE_H
+9 -5
View File
@@ -244,7 +244,7 @@ static int Zero_speed_coords[GR_NUM_RESOLUTIONS][2] = {
};
HudGaugeReticle::HudGaugeReticle():
HudGauge(HUD_OBJECT_CENTER_RETICLE, HUD_CENTER_RETICLE, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_TOPDOWN | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_CENTER_RETICLE, HUD_CENTER_RETICLE, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_TOPDOWN | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -337,7 +337,7 @@ void HudGaugeReticle::pageIn()
}
HudGaugeThrottle::HudGaugeThrottle():
HudGauge(HUD_OBJECT_THROTTLE, HUD_THROTTLE_GAUGE, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_THROTTLE, HUD_THROTTLE_GAUGE, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -570,7 +570,7 @@ void HudGaugeThrottle::renderThrottleBackground(int y_end)
}
HudGaugeThreatIndicator::HudGaugeThreatIndicator():
HudGauge(HUD_OBJECT_THREAT, HUD_THREAT_GAUGE, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_THREAT, HUD_THREAT_GAUGE, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -611,6 +611,8 @@ void HudGaugeThreatIndicator::initialize()
lock_warn_timer = timestamp(1);
lock_warn_frame = 0;
HudGauge::initialize();
}
void HudGaugeThreatIndicator::pageIn()
@@ -684,7 +686,7 @@ void HudGaugeThreatIndicator::renderLockThreat()
}
HudGaugeWeaponLinking::HudGaugeWeaponLinking():
HudGauge(HUD_OBJECT_WEAPON_LINKING, HUD_THREAT_GAUGE, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_WEAPON_LINKING, HUD_THREAT_GAUGE, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -771,6 +773,8 @@ void HudGaugeWeaponLinking::render(float frametime)
int gauge_index=0, frame_offset=0;
ship_weapon *swp;
setGaugeColor();
renderBitmap(arc.first_frame+1, position[0], position[1]);
swp = &Player_ship->weapons;
@@ -914,7 +918,7 @@ void hud_update_reticle( player *pp )
Threat_lock_frame = 1;
}
if ( (Threat_lock_frame == 2) && (Player->threat_flags & THREAT_ATTEMPT_LOCK ) ) {
snd_play( &Snds[ship_get_sound(Player_obj, SND_THREAT_FLASH)]);
snd_play( &Snds[SND_THREAT_FLASH]);
}
}
}
+53 -104
View File
@@ -37,12 +37,12 @@
#define SHIELD_HIT_DURATION_SHORT 300 // time a shield quadrant flashes after being hit
#define SHIELD_FLASH_INTERVAL_FAST 200 // time between shield quadrant flashes
// now read in from hud.tbl
#define MAX_SHIELD_ICONS 80 //DTP bumped from 40 to 80
int Hud_shield_filename_count = 0;
char Hud_shield_filenames[MAX_SHIELD_ICONS][MAX_FILENAME_LEN];
// CommanderDJ - now dynamic
// #define MAX_SHIELD_ICONS 80
hud_frames Shield_gauges[MAX_SHIELD_ICONS];
SCP_vector<SCP_string> Hud_shield_filenames;
SCP_vector<hud_frames> Shield_gauges;
static int Hud_shield_inited = 0;
/*static int Player_shield_coords[GR_NUM_RESOLUTIONS][2] =
@@ -122,14 +122,16 @@ ubyte Quadrant_xlate[MAX_SHIELD_SECTIONS] = {1,0,2,3};
// called at the start of each level from HUD_init. Use Hud_shield_init so we only init Shield_gauges[] once.
void hud_shield_level_init()
{
int i;
unsigned int i;
hud_frames temp;
hud_shield_hit_reset(1); // reset for the player
if ( !Hud_shield_inited ) {
for ( i = 0; i < MAX_SHIELD_ICONS; i++ ) {
Shield_gauges[i].first_frame = -1;
Shield_gauges[i].num_frames = 0;
for ( i = 0; i < Hud_shield_filenames.size(); i++ ) {
Shield_gauges.push_back(temp);
Shield_gauges.at(i).first_frame = -1;
Shield_gauges.at(i).num_frames = 0;
}
Hud_shield_inited = 1;
@@ -183,13 +185,13 @@ void hud_ship_icon_page_in(ship_info *sip)
}
// load in shield frames if not already loaded
Assert(sip->shield_icon_index < Hud_shield_filename_count);
sgp = &Shield_gauges[sip->shield_icon_index];
Assert(sip->shield_icon_index < (ubyte)Hud_shield_filenames.size());
sgp = &Shield_gauges.at(sip->shield_icon_index);
if ( sgp->first_frame == -1 ) {
sgp->first_frame = bm_load_animation(Hud_shield_filenames[sip->shield_icon_index], &sgp->num_frames);
sgp->first_frame = bm_load_animation(const_cast<char*>(Hud_shield_filenames.at(sip->shield_icon_index).c_str()), &sgp->num_frames);
if ( sgp->first_frame == -1 ) {
Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames[sip->shield_icon_index]);
Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames.at(sip->shield_icon_index).c_str());
return;
}
}
@@ -228,17 +230,10 @@ void hud_shield_equalize(object *objp, player *pl)
if (objp->flags & OF_NO_SHIELDS)
return;
if (objp->n_shield_segments == 1)
return;
// are all quadrants equal?
all_equal = 1;
for (idx = 0; idx < objp->n_shield_segments - 1; idx++) {
if ((Ships[objp->instance].ship_max_shield_segment[idx] == 0) || (Ships[objp->instance].ship_max_shield_segment[idx + 1] == 0)) {
all_equal = 0;
break;
}
if ((objp->shield_quadrant[idx]/Ships[objp->instance].ship_max_shield_segment[idx]) != (objp->shield_quadrant[idx + 1]/Ships[objp->instance].ship_max_shield_segment[idx + 1])) {
for (idx = 0; idx < MAX_SHIELD_SECTIONS - 1; idx++) {
if (objp->shield_quadrant[idx] != objp->shield_quadrant[idx + 1]) {
all_equal = 0;
break;
}
@@ -259,10 +254,7 @@ void hud_shield_equalize(object *objp, player *pl)
pl->shield_penalty_stamp = timestamp(1000);
}
float shield_str_pct = strength / Ships[objp->instance].ship_max_shield_strength;
for (idx = 0; idx < objp->n_shield_segments; idx++) {
shield_set_quad(objp,idx, shield_str_pct * Ships[objp->instance].ship_max_shield_segment[idx]);
}
shield_set_strength(objp, strength);
// beep
if (objp == Player_obj) {
@@ -291,18 +283,6 @@ void hud_augment_shield_quadrant(object *objp, int direction)
float max_quadrant_val;
int i;
switch (objp->n_shield_segments) {
case 1:
return;
case 2:
if (direction == 0)
direction = 4;
direction--;
if (direction > 1)
return;
break;
}
Assert(direction >= 0 && direction < MAX_SHIELD_SECTIONS);
Assert(objp->type == OBJ_SHIP);
@@ -322,7 +302,7 @@ void hud_augment_shield_quadrant(object *objp, int direction)
}
energy_avail = 0.0f;
for ( i = 0; i < objp->n_shield_segments; i++ ) {
for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
if ( i == direction )
continue;
energy_avail += objp->shield_quadrant[i];
@@ -332,7 +312,7 @@ void hud_augment_shield_quadrant(object *objp, int direction)
if ( percent_to_take > 1.0f )
percent_to_take = 1.0f;
for ( i = 0; i < objp->n_shield_segments; i++ ) {
for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
if ( i == direction )
continue;
delta = percent_to_take * objp->shield_quadrant[i];
@@ -351,19 +331,16 @@ void hud_shield_assign_info(ship_info *sip, char *filename)
{
ubyte i;
for ( i = 0; i < Hud_shield_filename_count; i++ ) {
if ( !stricmp(filename, Hud_shield_filenames[i]) ) {
for ( i = 0; i < (ubyte)Hud_shield_filenames.size(); i++ ) {
if ( !stricmp(filename, Hud_shield_filenames.at(i).c_str()) ) {
sip->shield_icon_index = i;
return;
}
}
//No HUD icon found. Add one!
Assert(Hud_shield_filename_count < MAX_SHIELD_ICONS);
if(Hud_shield_filename_count < MAX_SHIELD_ICONS){
sip->shield_icon_index = (unsigned char) Hud_shield_filename_count;
strcpy_s(Hud_shield_filenames[Hud_shield_filename_count++], filename);
}
sip->shield_icon_index = (unsigned char) Hud_shield_filenames.size();
Hud_shield_filenames.push_back((SCP_string)filename);
}
void hud_show_mini_ship_integrity(object *objp, int x_force, int y_force)
@@ -576,12 +553,12 @@ void hud_shield_quadrant_hit(object *objp, int quadrant)
}
HudGaugeShield::HudGaugeShield():
HudGauge(HUD_OBJECT_PLAYER_SHIELD, HUD_PLAYER_SHIELD_ICON, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_PLAYER_SHIELD, HUD_PLAYER_SHIELD_ICON, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
HudGaugeShield::HudGaugeShield(int _gauge_object, int _gauge_config):
HudGauge(_gauge_object, _gauge_config, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(_gauge_object, _gauge_config, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -617,16 +594,15 @@ void HudGaugeShield::showShields(object *objp, int mode)
setGaugeColor();
// load in shield frames if not already loaded
if(sip->shield_icon_index != 255)
{
sgp = &Shield_gauges[sip->shield_icon_index];
if (sip->shield_icon_index != 255) {
sgp = &Shield_gauges.at(sip->shield_icon_index);
if ( sgp->first_frame == -1 && sip->shield_icon_index < Hud_shield_filename_count) {
sgp->first_frame = bm_load_animation(Hud_shield_filenames[sip->shield_icon_index], &sgp->num_frames);
if ( sgp->first_frame == -1 ) {
if(!shield_ani_warning_displayed_already){
if ( (sgp->first_frame == -1) && (sip->shield_icon_index < Hud_shield_filenames.size()) ) {
sgp->first_frame = bm_load_animation(const_cast<char*>(Hud_shield_filenames.at(sip->shield_icon_index).c_str()), &sgp->num_frames);
if (sgp->first_frame == -1) {
if (!shield_ani_warning_displayed_already) {
shield_ani_warning_displayed_already = true;
Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames[sip->shield_icon_index]);
Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames.at(sip->shield_icon_index).c_str());
}
return;
}
@@ -717,25 +693,22 @@ void HudGaugeShield::showShields(object *objp, int mode)
// draw the four quadrants
//
// Draw shield quadrants at one of NUM_SHIELD_LEVELS
max_shield = get_max_shield_quad(objp);
int j, x_val, y_val, mid_val;
for ( i = 0; i < objp->n_shield_segments; i++ ) {
for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
if ( objp->flags & OF_NO_SHIELDS ) {
break;
}
int segment = (objp->n_shield_segments == 1) ? i : Quadrant_xlate[i];
if ( objp->shield_quadrant[segment] < 0.1f ) {
if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) {
continue;
}
max_shield = get_max_shield_quad(objp,segment);
range = MAX(HUD_COLOR_ALPHA_MAX, HUD_color_alpha + 4);
hud_color_index = fl2i( (objp->shield_quadrant[segment] / max_shield) * range);
hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range);
Assert(hud_color_index >= 0 && hud_color_index <= range);
if ( hud_color_index < 0 ) {
@@ -795,7 +768,7 @@ void HudGaugeShield::showShields(object *objp, int mode)
renderGradientLine(sx + j, y_val, sx + j, sy);
break;
//Left
case 1:
case 3:
sx += 1;
x_val = sx + 10;
y_val = sy + 15;
@@ -828,7 +801,7 @@ void HudGaugeShield::showShields(object *objp, int mode)
sx += 2;
break;
//Right
case 2:
case 1:
x_val = sx + 109; //-3 for border
y_val = sy + 15;
for(j = 0; j < 6; j++)
@@ -859,7 +832,7 @@ void HudGaugeShield::showShields(object *objp, int mode)
renderGradientLine(mid_val, y_val + j, x_val, y_val + j);
break;
//Bottom
case 3:
case 2:
y_val = sy + 80; //-3 for border
for(j = 0; j < 6; j++)
renderGradientLine(sx + j,
@@ -881,6 +854,10 @@ void HudGaugeShield::showShields(object *objp, int mode)
y_val += 3;
for(j = 0; j < 112; j++)
renderGradientLine(sx + j, mid_val, sx + j, y_val);
//Whoops?
default:
Warning(LOCATION, "Invalid shield quadrant %d specified!", i);
}
}
}
@@ -945,7 +922,7 @@ void HudGaugeShieldTarget::render(float frametime)
}
HudGaugeShieldMini::HudGaugeShieldMini(): // HUD_TARGET_MINI_ICON
HudGauge(HUD_OBJECT_MINI_SHIELD, HUD_TARGET_MINI_ICON, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_MINI_SHIELD, HUD_TARGET_MINI_ICON, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -1020,9 +997,7 @@ void HudGaugeShieldMini::showMiniShields(object *objp)
// draw the four quadrants
// Draw shield quadrants at one of NUM_SHIELD_LEVELS
bool single_segment_flash = false;
int segment;
max_shield = get_max_shield_quad(objp);
for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
@@ -1030,44 +1005,18 @@ void HudGaugeShieldMini::showMiniShields(object *objp)
break;
}
if (objp->n_shield_segments == 1) {
if ( objp->shield_quadrant[0] < 0.1f ) {
break;
}
} else if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) {
if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) {
continue;
}
segment = i;
if (objp->n_shield_segments == 2) {
if (i == 1)
segment = 0;
if (i == 0)
segment = 2;
}
frame_offset = segment;
max_shield = get_max_shield_quad(objp,Quadrant_xlate[i]);
if (objp->n_shield_segments == 1) {
if ( maybeFlashShield(SHIELD_HIT_TARGET, i) ) {
single_segment_flash = true;
}
if (single_segment_flash) {
frame_offset = i+MAX_SHIELD_SECTIONS;
}
} else if ( maybeFlashShield(SHIELD_HIT_TARGET, i) ) {
frame_offset = segment+MAX_SHIELD_SECTIONS;
if ( maybeFlashShield(SHIELD_HIT_TARGET, i) ) {
frame_offset = i+MAX_SHIELD_SECTIONS;
} else {
frame_offset = i;
}
range = HUD_color_alpha;
if (objp->n_shield_segments == 1)
hud_color_index = fl2i( (objp->shield_quadrant[0] / max_shield) * range + 0.5);
else
hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range + 0.5);
hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range + 0.5);
Assert(hud_color_index >= 0 && hud_color_index <= range);
if ( hud_color_index < 0 ) {
+2
View File
@@ -30,6 +30,8 @@ typedef struct shield_hit_info
extern ubyte Quadrant_xlate[4];
extern SCP_vector<SCP_string> Hud_shield_filenames;
struct player;
struct object;
struct ship_info;
+4 -2
View File
@@ -1611,7 +1611,7 @@ void hud_squadmsg_type_select( )
// check to see if the player is a traitor. If so, then he will not
// be able to do anything from this menu
if ( Player_ship->team == Iff_traitor ) {
if ((Player_ship != NULL) && (Player_ship->team == Iff_traitor)) {
for (i = 0; i < MAX_MENU_ITEMS; i++ )
MsgItems[i].active = 0;
goto do_main_menu;
@@ -2498,7 +2498,7 @@ int hud_query_order_issued(char *to, char *order_name, char *target_name, int ti
}
HudGaugeSquadMessage::HudGaugeSquadMessage():
HudGauge(HUD_OBJECT_SQUAD_MSG, HUD_MESSAGE_BOX, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_SQUAD_MSG, HUD_MESSAGE_BOX, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -2507,6 +2507,8 @@ void HudGaugeSquadMessage::initialize()
flash_timer[0] = timestamp(1);
flash_timer[1] = timestamp(1);
flash_flag = false;
HudGauge::initialize();
}
void HudGaugeSquadMessage::initHeaderOffsets(int x, int y)
+44 -64
View File
@@ -45,7 +45,6 @@
#include "network/multi.h"
#include "graphics/font.h"
#include "network/multiutil.h"
#include "model/model.h"
// If any of these bits in the ship->flags are set, ignore this ship when targetting
int TARGET_SHIP_IGNORE_FLAGS = (SF_EXPLODED|SF_DEPART_WARP|SF_DYING|SF_ARRIVING_STAGE_1|SF_HIDDEN_FROM_SENSORS);
@@ -629,16 +628,10 @@ void hud_reticle_list_update(object *objp, float measure, int dot_flag)
{
reticle_list *rl, *new_rl;
int i;
SCP_list<jump_node>::iterator jnp;
if (objp->type == OBJ_JUMP_NODE) {
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if( jnp->get_obj() != objp )
continue;
if( jnp->is_hidden() )
return;
}
if ( objp->jnp->is_hidden() )
return;
}
for ( rl = GET_FIRST(&Reticle_cur_list); rl != END_OF_LIST(&Reticle_cur_list); rl = GET_NEXT(rl) ) {
@@ -1167,8 +1160,7 @@ void hud_target_common(int team_mask, int next_flag)
{
object *A, *start, *start2;
ship *shipp;
int is_ship, target_found = FALSE;
SCP_list<jump_node>::iterator jnp;
int is_ship, target_found = FALSE;
if (Player_ai->target_objnum == -1)
start = &obj_used_list;
@@ -1206,12 +1198,7 @@ void hud_target_common(int team_mask, int next_flag)
}
if (A->type == OBJ_JUMP_NODE) {
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if( jnp->get_obj() == A )
break;
}
if( jnp->is_hidden() )
if ( A->jnp->is_hidden() )
continue;
}
@@ -2292,26 +2279,16 @@ void hud_target_targets_target()
int object_targetable_in_reticle(object *target_objp)
{
int obj_type;
SCP_list<jump_node>::iterator jnp;
if (target_objp == Player_obj ) {
return 0;
}
obj_type = target_objp->type;
if ( (obj_type == OBJ_SHIP) || (obj_type == OBJ_DEBRIS) || (obj_type == OBJ_WEAPON) || (obj_type == OBJ_ASTEROID) )
if ( (obj_type == OBJ_SHIP) || (obj_type == OBJ_DEBRIS) || (obj_type == OBJ_WEAPON) || (obj_type == OBJ_ASTEROID)
|| ((obj_type == OBJ_JUMP_NODE) && !target_objp->jnp->is_hidden()) )
{
return 1;
} else if ( obj_type == OBJ_JUMP_NODE )
{
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == target_objp)
break;
}
if (!jnp->is_hidden())
return 1;
}
return 0;
@@ -2338,7 +2315,6 @@ void hud_target_in_reticle_new()
object *A;
mc_info mc;
float dist;
SCP_list<jump_node>::iterator jnp;
hud_reticle_clear_list(&Reticle_cur_list);
Reticle_save_timestamp = timestamp(RESET_TARGET_IN_RETICLE);
@@ -2393,12 +2369,7 @@ void hud_target_in_reticle_new()
}
break;
case OBJ_JUMP_NODE:
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() == A)
break;
}
mc.model_num = jnp->get_modelnum();
mc.model_num = A->jnp->get_modelnum();
break;
default:
Int3(); // Illegal object type.
@@ -2743,13 +2714,13 @@ void hud_tri_empty(float x1,float y1,float x2,float y2,float x3,float y3)
}
HudGaugeReticleTriangle::HudGaugeReticleTriangle():
HudGauge(HUD_OBJECT_HOSTILE_TRI, HUD_HOSTILE_TRIANGLE, true, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_HOSTILE_TRI, HUD_HOSTILE_TRIANGLE, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
HudGaugeReticleTriangle::HudGaugeReticleTriangle(int _gauge_object, int _gauge_config):
HudGauge(_gauge_object, _gauge_config, true, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(_gauge_object, _gauge_config, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -2861,17 +2832,15 @@ void HudGaugeReticleTriangle::renderTriangle(vec3d *hostile_pos, int aspect_flag
g3_project_vertex(&hostile_vertex);
if (hostile_vertex.codes == 0) { // on screen
float projected_x, projected_y;
int projected_x, projected_y;
if (!(hostile_vertex.flags & PF_OVERFLOW)) { // make sure point projected
float mag_squared;
int mag_squared;
projected_x = hostile_vertex.screen.xyw.x;
projected_y = hostile_vertex.screen.xyw.y;
projected_x = fl2i(hostile_vertex.screen.xyw.x);
projected_y = fl2i(hostile_vertex.screen.xyw.y);
gr_set_screen_scale(base_w, base_h);
gr_unsize_screen_posf( &projected_x, &projected_x );
gr_reset_screen_scale();
unsize(&projected_x, &projected_y);
mag_squared = (projected_x - position[0]) * (projected_x - position[0]) +
(projected_y - position[1]) * (projected_y - position[1]);
@@ -2891,9 +2860,7 @@ void HudGaugeReticleTriangle::renderTriangle(vec3d *hostile_pos, int aspect_flag
gr_resize_screen_pos(&HUD_nose_scaled_x, &HUD_nose_scaled_y);
gr_set_screen_scale(base_w, base_h);
gr_unsize_screen_posf( &hostile_vertex.world.xyz.x, &hostile_vertex.world.xyz.y );
gr_reset_screen_scale();
unsize( &hostile_vertex.world.xyz.x, &hostile_vertex.world.xyz.y );
ang = atan2_safe(hostile_vertex.world.xyz.y,hostile_vertex.world.xyz.x);
sin_ang=(float)sin(ang);
@@ -2999,9 +2966,9 @@ void hud_process_homing_missiles()
}
if ( closest_is_aspect ) {
Homing_beep.snd_handle = snd_play(&Snds[ship_get_sound(Player_obj, SND_PROXIMITY_ASPECT_WARNING)]);
Homing_beep.snd_handle = snd_play(&Snds[SND_PROXIMITY_ASPECT_WARNING]);
} else {
Homing_beep.snd_handle = snd_play(&Snds[ship_get_sound(Player_obj, SND_PROXIMITY_WARNING)]);
Homing_beep.snd_handle = snd_play(&Snds[SND_PROXIMITY_WARNING]);
}
}
}
@@ -3042,7 +3009,7 @@ void HudGaugeMissileTriangles::render(float frametime)
}
HudGaugeOrientationTee::HudGaugeOrientationTee():
HudGauge(HUD_OBJECT_ORIENTATION_TEE, HUD_ORIENTATION_TEE, true, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_ORIENTATION_TEE, HUD_ORIENTATION_TEE, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -3271,6 +3238,13 @@ void hud_show_selection_set()
continue;
}
// Goober5000 - don't draw indicators for non-visible ships, per Mantis #1972
// (the only way we could get here is if the hotkey set contained a mix of visible
// and invisible ships)
if (awacs_get_level(targetp, Player_ship, 1) < 1) {
continue;
}
// find the current target vertex
//
g3_rotate_vertex(&target_point,&targetp->pos);
@@ -3641,7 +3615,7 @@ void polish_predicted_target_pos(weapon_info *wip, object *targetp, vec3d *enemy
}
HudGaugeLeadIndicator::HudGaugeLeadIndicator():
HudGauge(HUD_OBJECT_LEAD, HUD_LEAD_INDICATOR, true, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_LEAD, HUD_LEAD_INDICATOR, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -3967,7 +3941,7 @@ void HudGaugeLeadIndicator::renderLeadQuick(vec3d *target_world_pos, object *tar
}
HudGaugeLeadSight::HudGaugeLeadSight():
HudGauge(HUD_OBJECT_LEAD_SIGHT, HUD_LEAD_INDICATOR, true, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_LEAD_SIGHT, HUD_LEAD_INDICATOR, true, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -4234,11 +4208,17 @@ void hud_restore_subsystem_target(ship* shipp)
}
// --------------------------------------------------------------------------------
// get_subsystem_world_pos() returns the world position for a given subsystem on a ship
// get_subsystem_world_pos() returns the world position for a given subobject on a ship
//
vec3d* get_subsystem_world_pos(object* parent_obj, ship_subsys* subsys, vec3d* world_pos)
{
get_subsystem_pos(world_pos, parent_obj, subsys);
if (subsys == NULL) {
*world_pos = parent_obj->pos;
return world_pos;
}
vm_vec_unrotate(world_pos, &subsys->system_info->pnt, &parent_obj->orient);
vm_vec_add2(world_pos, &parent_obj->pos);
return world_pos;
}
@@ -4261,7 +4241,7 @@ void hud_target_change_check()
if (Player_ai->last_target != Player_ai->target_objnum) {
if ( Player_ai->target_objnum != -1){
snd_play( &Snds[ship_get_sound(Player_obj, SND_TARGET_ACQUIRE)], 0.0f );
snd_play( &Snds[SND_TARGET_ACQUIRE], 0.0f );
}
// if we have a hotkey set active, see if new target is in set. If not in
@@ -4603,7 +4583,7 @@ void hud_target_next_list(int hostile, int next_flag)
}
HudGaugeAutoTarget::HudGaugeAutoTarget():
HudGauge(HUD_OBJECT_AUTO_TARGET, HUD_AUTO_TARGET, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_AUTO_TARGET, HUD_AUTO_TARGET, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -4661,7 +4641,7 @@ void HudGaugeAutoTarget::pageIn()
}
HudGaugeAutoSpeed::HudGaugeAutoSpeed():
HudGauge(HUD_OBJECT_AUTO_SPEED, HUD_AUTO_SPEED, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_AUTO_SPEED, HUD_AUTO_SPEED, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -5212,7 +5192,7 @@ void hud_stuff_ship_class(char *ship_class_text, ship *shipp)
}
HudGaugeCmeasures::HudGaugeCmeasures():
HudGauge(HUD_OBJECT_CMEASURES, HUD_CMEASURE_GAUGE, true, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_CMEASURES, HUD_CMEASURE_GAUGE, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -5269,7 +5249,7 @@ void HudGaugeCmeasures::render(float frametime)
}
HudGaugeAfterburner::HudGaugeAfterburner():
HudGauge(HUD_OBJECT_AFTERBURNER, HUD_AFTERBURNER_ENERGY, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_AFTERBURNER, HUD_AFTERBURNER_ENERGY, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -5330,7 +5310,7 @@ void HudGaugeAfterburner::pageIn()
}
HudGaugeWeaponEnergy::HudGaugeWeaponEnergy():
HudGauge(HUD_OBJECT_WEAPON_ENERGY, HUD_WEAPONS_ENERGY, true, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_WEAPON_ENERGY, HUD_WEAPONS_ENERGY, true, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
@@ -5519,7 +5499,7 @@ void HudGaugeWeaponEnergy::render(float frametime)
}
HudGaugeWeapons::HudGaugeWeapons():
HudGauge(HUD_OBJECT_WEAPONS, HUD_WEAPONS_GAUGE, true, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_WEAPONS, HUD_WEAPONS_GAUGE, false, false, VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP, 255, 255, 255)
{
}
@@ -5964,7 +5944,7 @@ void hud_target_clear_display_list()
}
HudGaugeOffscreen::HudGaugeOffscreen():
HudGauge(HUD_OBJECT_OFFSCREEN, HUD_OFFSCREEN_INDICATOR, true, false, true, VM_DEAD_VIEW | VM_OTHER_SHIP, 255, 255, 255)
HudGauge(HUD_OBJECT_OFFSCREEN, HUD_OFFSCREEN_INDICATOR, false, true, VM_DEAD_VIEW | VM_OTHER_SHIP, 255, 255, 255)
{
}
+106 -173
View File
@@ -34,7 +34,6 @@
#include "species_defs/species_defs.h"
#include "iff_defs/iff_defs.h"
#include "network/multi.h"
#include "graphics/gropenglshader.h"
#ifndef NDEBUG
#include "hud/hudets.h"
@@ -103,7 +102,6 @@ int Cargo_scan_coords[GR_NUM_RESOLUTIONS][4] = {
int Targetbox_flash_timers[NUM_TBOX_FLASH_TIMERS];
int Targetbox_wire = 0;
int Targetbox_shader_effect = -1;
bool Lock_targetbox_mode = false;
// Different target states. This drives the text display right below the hull integrity on the targetbox.
@@ -178,7 +176,7 @@ void hud_targetbox_truncate_subsys_name(char *outstr)
}
HudGaugeTargetBox::HudGaugeTargetBox():
HudGauge(HUD_OBJECT_TARGET_MONITOR, HUD_TARGET_MONITOR, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
HudGauge(HUD_OBJECT_TARGET_MONITOR, HUD_TARGET_MONITOR, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
{
}
@@ -281,6 +279,8 @@ void HudGaugeTargetBox::initialize()
for(int i = 0; i < NUM_TBOX_FLASH_TIMERS; i++) {
initFlashTimer(i);
}
HudGauge::initialize();
}
void HudGaugeTargetBox::initFlashTimer(int index)
@@ -483,50 +483,38 @@ void HudGaugeTargetBox::renderTargetShip(object *target_objp)
renderTargetSetup(&camera_eye, &camera_orient, target_sip->closeup_zoom);
ship_model_start( target_objp );
switch (Targetbox_wire) {
case 0:
flags |= MR_NO_LIGHTING;
if (Targetbox_wire!=0)
{
int is_bright = 1;
break;
case 1:
if (ship_is_tagged(target_objp))
model_set_outline_color_fast(iff_get_color(IFF_COLOR_TAGGED, true));
else
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_shipp->team, Player_ship->team, true, target_objp));
if (ship_is_tagged(target_objp))
model_set_outline_color_fast(iff_get_color(IFF_COLOR_TAGGED, is_bright));
else
{
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_shipp->team, Player_ship->team, is_bright, target_objp));
}
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
flags |= MR_NO_POLYS | MR_NO_LIGHTING;
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
break;
case 2:
break;
case 3:
if (ship_is_tagged(target_objp))
model_set_outline_color_fast(iff_get_color(IFF_COLOR_TAGGED, true));
else
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_shipp->team, Player_ship->team, true, target_objp));
flags |= MR_NO_LIGHTING | MR_NO_TEXTURING;
break;
if (Targetbox_wire==1)
flags |=MR_NO_POLYS;
}
if (target_sip->hud_target_lod >= 0) {
model_set_detail_level(target_sip->hud_target_lod);
}
if(Targetbox_shader_effect > -1) {
flags |= MR_ANIMATED_SHADER;
opengl_shader_set_animated_effect(Targetbox_shader_effect);
}
if(Targetbox_wire != 2) flags |= MR_NO_LIGHTING;
if (!Glowpoint_override)
Glowpoint_override = true;
// maybe render a special hud-target-only model
if(target_sip->model_num_hud >= 0){
model_render( target_sip->model_num_hud, &target_objp->orient, &obj_pos, flags | MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING);
} else {
model_render( target_sip->model_num, &target_objp->orient, &obj_pos, flags | MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING, -1, -1, target_shipp->ship_replacement_textures);
}
Glowpoint_override = false;
ship_model_stop( target_objp );
sx = 0;
@@ -602,37 +590,19 @@ void HudGaugeTargetBox::renderTargetDebris(object *target_objp)
// the objects position
vm_vec_copy_scale(&obj_pos,&orient_vec,factor);
if (Targetbox_wire!=0)
{
model_set_outline_color(255,255,255);
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
if (Targetbox_wire==1)
flags |=MR_NO_POLYS;
}
renderTargetSetup(&camera_eye, &camera_orient, 0.5f);
model_clear_instance(debrisp->model_num);
switch (Targetbox_wire) {
case 0:
flags |= MR_NO_LIGHTING;
break;
case 1:
model_set_outline_color(255,255,255);
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
flags |= MR_NO_POLYS | MR_NO_LIGHTING;
break;
case 2:
break;
case 3:
model_set_outline_color(255,255,255);
flags |= MR_NO_LIGHTING | MR_NO_TEXTURING;
break;
}
if(Targetbox_shader_effect > -1) {
flags |= MR_ANIMATED_SHADER;
opengl_shader_set_animated_effect(Targetbox_shader_effect);
}
if(Targetbox_wire != 2) flags |= MR_NO_LIGHTING;
// This calls the colour that doesn't get reset
submodel_render( debrisp->model_num, debrisp->submodel_num, &target_objp->orient, &obj_pos, flags | MR_LOCK_DETAIL | MR_NO_FOGGING );
renderTargetClose();
@@ -707,6 +677,19 @@ void HudGaugeTargetBox::renderTargetWeapon(object *target_objp)
hud_target_lod = homing_sip->hud_target_lod;
}
if (Targetbox_wire!=0)
{
int is_bright = 0;
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_team, Player_ship->team, is_bright, target_objp));
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
if (Targetbox_wire==1)
flags |=MR_NO_POLYS;
}
// take the forward orientation to be the vector from the player to the current target
vm_vec_sub(&orient_vec, &viewed_obj->pos, &viewer_obj->pos);
vm_vec_normalize(&orient_vec);
@@ -727,38 +710,12 @@ void HudGaugeTargetBox::renderTargetWeapon(object *target_objp)
renderTargetSetup(&camera_eye, &camera_orient, View_zoom/3);
model_clear_instance(viewed_model_num);
switch (Targetbox_wire) {
case 0:
flags |= MR_NO_LIGHTING;
break;
case 1:
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_team, Player_ship->team, 0, target_objp));
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
flags |= MR_NO_POLYS | MR_NO_LIGHTING;
break;
case 2:
break;
case 3:
model_set_outline_color_fast(iff_get_color_by_team_and_object(target_team, Player_ship->team, 0, target_objp));
flags |= MR_NO_LIGHTING | MR_NO_TEXTURING;
break;
}
if (hud_target_lod >= 0) {
model_set_detail_level(hud_target_lod);
}
if(Targetbox_shader_effect > -1) {
flags |= MR_ANIMATED_SHADER;
opengl_shader_set_animated_effect(Targetbox_shader_effect);
}
if(Targetbox_wire != 2) flags |= MR_NO_LIGHTING;
model_render( viewed_model_num, &viewed_obj->orient, &obj_pos, flags | MR_LOCK_DETAIL | MR_AUTOCENTER | MR_IS_MISSILE | MR_NO_FOGGING, -1, -1, replacement_textures);
renderTargetClose();
}
@@ -833,40 +790,21 @@ void HudGaugeTargetBox::renderTargetAsteroid(object *target_objp)
renderTargetSetup(&camera_eye, &camera_orient, 0.5f);
model_clear_instance(Asteroid_info[asteroidp->asteroid_type].model_num[pof]);
switch (Targetbox_wire) {
case 0:
flags |= MR_NO_LIGHTING;
if (Targetbox_wire!=0)
{
if (time_to_impact>=0)
model_set_outline_color(255,255,255);
else
model_set_outline_color(64,64,0);
break;
case 1:
if (time_to_impact>=0)
model_set_outline_color(255,255,255);
else
model_set_outline_color(64,64,0);
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
flags = (Cmdline_nohtl) ? MR_SHOW_OUTLINE : MR_SHOW_OUTLINE_HTL;
flags |= MR_NO_POLYS | MR_NO_LIGHTING;
break;
case 2:
break;
case 3:
if (time_to_impact>=0)
model_set_outline_color(255,255,255);
else
model_set_outline_color(64,64,0);
flags |= MR_NO_LIGHTING | MR_NO_TEXTURING;
break;
}
if(Targetbox_shader_effect > -1) {
flags |= MR_ANIMATED_SHADER;
opengl_shader_set_animated_effect(Targetbox_shader_effect);
if (Targetbox_wire==1)
flags |=MR_NO_POLYS;
}
if(Targetbox_wire != 2) flags |= MR_NO_LIGHTING;
model_render(Asteroid_info[asteroidp->asteroid_type].model_num[pof], &target_objp->orient, &obj_pos, flags | MR_LOCK_DETAIL | MR_NO_FOGGING );
renderTargetClose();
}
@@ -909,60 +847,54 @@ void HudGaugeTargetBox::renderTargetJumpNode(object *target_objp)
vec3d orient_vec, up_vector;
float factor, dist;
int hx, hy, w, h;
SCP_list<jump_node>::iterator jnp;
for (jnp = Jump_nodes.begin(); jnp != Jump_nodes.end(); ++jnp) {
if(jnp->get_obj() != target_objp)
continue;
if ( jnp->is_hidden() ) {
set_target_objnum( Player_ai, -1 );
return;
}
if ( Detail.targetview_model ) {
// take the forward orientation to be the vector from the player to the current target
vm_vec_sub(&orient_vec, &target_objp->pos, &Player_obj->pos);
vm_vec_normalize(&orient_vec);
factor = target_objp->radius*4.0f;
// use the player's up vector, and construct the viewers orientation matrix
up_vector = Player_obj->orient.vec.uvec;
vm_vector_2_matrix(&camera_orient,&orient_vec,&up_vector,NULL);
// normalize the vector from the player to the current target, and scale by a factor to calculate
// the objects position
vm_vec_copy_scale(&obj_pos,&orient_vec,factor);
renderTargetSetup(&camera_eye, &camera_orient, 0.5f);
jnp->render( &obj_pos );
renderTargetClose();
}
renderTargetForeground();
renderTargetIntegrity(1);
setGaugeColor();
strcpy_s(outstr, jnp->get_name_ptr());
end_string_at_first_hash_symbol(outstr);
renderString(position[0] + Name_offsets[0], position[1] + Name_offsets[1], EG_TBOX_NAME, outstr);
dist = vm_vec_dist_quick(&target_objp->pos, &Player_obj->pos);
if ( Hud_unit_multiplier > 0.0f ) { // use a different displayed distance scale
dist = dist * Hud_unit_multiplier;
}
// account for hud shaking
hx = fl2i(HUD_offset_x);
hy = fl2i(HUD_offset_y);
sprintf(outstr,XSTR( "d: %.0f", 340), dist);
hud_num_make_mono(outstr);
gr_get_string_size(&w,&h,outstr);
renderPrintf(position[0] + Dist_offsets[0]+hx, position[1] + Dist_offsets[1]+hy, EG_TBOX_DIST, outstr);
if ( target_objp->jnp->is_hidden() ) {
set_target_objnum( Player_ai, -1 );
return;
}
if ( Detail.targetview_model ) {
// take the forward orientation to be the vector from the player to the current target
vm_vec_sub(&orient_vec, &target_objp->pos, &Player_obj->pos);
vm_vec_normalize(&orient_vec);
factor = target_objp->radius*4.0f;
// use the player's up vector, and construct the viewers orientation matrix
up_vector = Player_obj->orient.vec.uvec;
vm_vector_2_matrix(&camera_orient,&orient_vec,&up_vector,NULL);
// normalize the vector from the player to the current target, and scale by a factor to calculate
// the objects position
vm_vec_copy_scale(&obj_pos,&orient_vec,factor);
renderTargetSetup(&camera_eye, &camera_orient, 0.5f);
target_objp->jnp->render( &obj_pos );
renderTargetClose();
}
renderTargetForeground();
renderTargetIntegrity(1);
setGaugeColor();
strcpy_s(outstr, target_objp->jnp->get_name_ptr());
end_string_at_first_hash_symbol(outstr);
renderString(position[0] + Name_offsets[0], position[1] + Name_offsets[1], EG_TBOX_NAME, outstr);
dist = vm_vec_dist_quick(&target_objp->pos, &Player_obj->pos);
if ( Hud_unit_multiplier > 0.0f ) { // use a different displayed distance scale
dist = dist * Hud_unit_multiplier;
}
// account for hud shaking
hx = fl2i(HUD_offset_x);
hy = fl2i(HUD_offset_y);
sprintf(outstr,XSTR( "d: %.0f", 340), dist);
hud_num_make_mono(outstr);
gr_get_string_size(&w,&h,outstr);
renderPrintf(position[0] + Dist_offsets[0]+hx, position[1] + Dist_offsets[1]+hy, EG_TBOX_DIST, outstr);
}
/**
@@ -1056,7 +988,7 @@ void hud_get_target_strength(object *objp, float *shields, float *integrity)
}
HudGaugeExtraTargetData::HudGaugeExtraTargetData():
HudGauge(HUD_OBJECT_EXTRA_TARGET_DATA, HUD_TARGET_MONITOR_EXTRA_DATA, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
HudGauge(HUD_OBJECT_EXTRA_TARGET_DATA, HUD_TARGET_MONITOR_EXTRA_DATA, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY), 255, 255, 255)
{
initDockFlashTimer();
}
@@ -1064,6 +996,8 @@ HudGauge(HUD_OBJECT_EXTRA_TARGET_DATA, HUD_TARGET_MONITOR_EXTRA_DATA, true, fals
void HudGaugeExtraTargetData::initialize()
{
initDockFlashTimer();
HudGauge::initialize();
}
void HudGaugeExtraTargetData::initBracketOffsets(int x, int y)
@@ -1459,8 +1393,7 @@ int hud_targetbox_subsystem_in_view(object *target_objp, int *sx, int *sy)
subsys = Player_ai->targeted_subsys;
if (subsys != NULL ) {
vm_vec_unrotate(&subobj_pos, &subsys->system_info->pnt, &target_objp->orient);
vm_vec_add2(&subobj_pos, &target_objp->pos);
get_subsystem_pos(&subobj_pos, target_objp, subsys);
// is it subsystem in view
if ( Player->subsys_in_view == -1 ) {
-1
View File
@@ -37,7 +37,6 @@ extern int Target_window_coords[GR_NUM_RESOLUTIONS][4];
//used to track if the player has wireframe hud target box turned on
extern int Targetbox_wire;
extern int Targetbox_shader_effect;
extern bool Lock_targetbox_mode;
class HudGaugeTargetBox: public HudGauge // HUD_TARGET_MONITOR
+3 -1
View File
@@ -205,13 +205,15 @@ void hud_wingman_status_update()
}
HudGaugeWingmanStatus::HudGaugeWingmanStatus():
HudGauge(HUD_OBJECT_WINGMAN_STATUS, HUD_WINGMEN_STATUS, true, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
HudGauge(HUD_OBJECT_WINGMAN_STATUS, HUD_WINGMEN_STATUS, false, false, (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY | VM_OTHER_SHIP), 255, 255, 255)
{
}
void HudGaugeWingmanStatus::initialize()
{
initFlash();
HudGauge::initialize();
}
void HudGaugeWingmanStatus::initHeaderOffsets(int x, int y)
{
+1 -1
View File
@@ -536,7 +536,7 @@ int iff_lookup(char *iff_name)
{
// bogus
Assert(iff_name);
if(iff_name == NULL)
return -1;
Loaded 100 of 245 files, more files were not shown because too many files have changed in this diff. Show more