Compare commits

..
1057 Commits
Author SHA1 Message Date
Swifty 3d680e1431 Merge with Trunk Revision 6640. 2010-10-19 22:49:15 +00:00
Swifty 3ef2dc8134 Unversioned files can go to hell. 2010-10-19 07:22:33 +00:00
Swifty dd2c182a60 Merge with Trunk Revision 6635. Prepped for Antipodes 7. 2010-10-19 07:14:36 +00:00
Swifty 7c5756996c Revision of animated cockpit readouts. Removed training_obj_display(). 2010-10-09 10:35:20 +00:00
Swifty e606278ce6 Update changes up to Trunk 6586 2010-10-09 10:09:48 +00:00
Swifty 182ed7f9c7 And while we're on targetbox bugs, Asteroid target status should now render in the proper place in non-GR rez. 2010-09-21 02:48:56 +00:00
Swifty 4870b2fc9e Targetbox cargo of target ship no longer carries over to the next selected non-ship target. 2010-09-21 02:45:50 +00:00
Swifty 586e514874 No more crashing when scanning subsystems. 2010-09-21 02:42:20 +00:00
Swifty 202bd88392 Revision 6473 2010-09-20 20:34:57 +00:00
Swifty 96e4fe4b6e Forgot to include options for Wing Names in Wingman Status. 2010-09-04 10:30:01 +00:00
Swifty 2e8a5a2692 Fixed Training Messages not playing when hud_disabled_except_messages() is on. Fixes War in Heaven's credits sequence. 2010-09-04 02:54:58 +00:00
Swifty 02c7fc1c89 Fixed Wingman Status gauge to properly allow changing of status bitmaps. 2010-09-02 05:30:48 +00:00
Swifty 74ac243ae1 Squished Int3() when using BSG radar. 2010-09-01 04:07:37 +00:00
Swifty 8609816c7c Project file updates. Adding bitarray.h and excluding debug info. 2010-09-01 01:55:46 +00:00
Swifty 15f365b09f I haz 6410 2010-09-01 01:53:27 +00:00
Swifty 9292ebf2c9 Fixed a bunch of stuff reported by swashmebuckle: wingman anis can now change, Integrity Bar Foreground Clip Height fixed, extra target data time inits fixed. 2010-08-31 23:50:15 +00:00
Swifty a04089e8a9 Making FUBAR's life easier; parts of wxFred slipped past WinMerge. 2010-08-28 05:41:09 +00:00
Swifty 6bc3f565dd +Radar: no longer forces standard radar and will defer to orb radar launcher flags. 2010-08-27 11:45:03 +00:00
Swifty b94023a86f omfg, HUD-specific, ship-specific, and gauge-specific fonts. 2010-08-27 11:34:38 +00:00
Swifty edc8b93a64 Up 2 d8 with 6385 2010-08-26 09:08:08 +00:00
Swifty 93381a2061 Go go gadget radar range! 2010-08-26 08:26:29 +00:00
Swifty 7c6c19a162 Targetbox bitmaps should listen now. 2010-08-26 08:17:31 +00:00
Swifty e399f53251 There are 6 wingmen dots, not 7. :| 2010-08-26 08:08:29 +00:00
Swifty e62b09cdfd Fix Weapon List parsing for "Secondary List Entry Background:" and "Secondary List Bottom Background Filename:" 2010-08-26 07:37:12 +00:00
Swifty 4c6ffd1650 Force parser to advance past $Reticle Style. Forgot to put FS1-style defaults for Weapon Energy. 2010-08-16 05:38:05 +00:00
Swifty 93fcc4b8db Various syntax corrections 2010-08-15 04:00:47 +00:00
Swifty d87ad46bd0 Minor change to Damage display syntax for the sake of consistency. 2010-08-15 01:05:49 +00:00
Swifty 3314903dda A shitload of table configuration fields for almost all individual gauges. Documentation pending. :\ 2010-08-14 23:49:35 +00:00
Swifty 045b7fc264 Adding initSlew method to the base HudGauge class. 2010-08-14 23:43:16 +00:00
Swifty c99704efe4 Removing a redundant property from Wingman Status. 2010-08-14 23:39:41 +00:00
Swifty 015b1a6309 Renaming a targetbox property to something that fits better. 2010-08-14 23:36:03 +00:00
Swifty 7871c4f146 Simplify and clarify some Escort display parameters. 2010-08-14 23:31:11 +00:00
Swifty ddc4d51999 hud_disabled_except_messages should work now, even if hud_disabled is on. 2010-08-13 10:44:39 +00:00
Swifty 7e3e0a9388 Tweaked the weapons display to better match retail positions. 2010-08-13 10:40:23 +00:00
Swifty 9f6d4533f8 Squished comm menu bug where menu would not be populated if no target is selected. Sorry this took so long, The_E. 2010-08-13 08:56:57 +00:00
Swifty 090ea8ad50 An additional tweak to the directives gauge. 2010-08-13 08:31:55 +00:00
Swifty fdf05d7e80 Simplifying the directives gauge. 2010-08-13 08:27:14 +00:00
Swifty dbc87e4241 Probably should get rid of these vars as well. 2010-08-13 08:19:57 +00:00
Swifty cbef6291cd Getting rid of Split Missile Triangles. 2010-08-13 08:16:35 +00:00
Swifty 5a2bd299c2 Huh. It turns out the correct behavior for Talking Heads is to play once and not loop. Yay for one line fixes. 2010-08-13 06:46:07 +00:00
Swifty 1daa233fe4 Updating XCode project files. 2010-08-11 23:19:25 +00:00
Swifty b03cbff4d1 No more disappearing or 1 micrometer-sized sub-object target brackets. 2010-08-11 19:36:42 +00:00
Swifty 773bf8b983 Bring this up to speed with r6354. 2010-08-11 19:31:30 +00:00
Swifty 9421ab2fba Warheads no longer show up as black on standard and orb radar. 2010-07-29 12:10:51 +00:00
Swifty 669ea48153 Message sender, remote detonation missile, homing missile, and selection set brackets should have the proper gradients now. 2010-07-29 03:42:58 +00:00
Swifty 4995f11472 I yet again forget to do something. Updating the Lua libraries. 2010-07-29 03:40:59 +00:00
Swifty 6b884151bc Sorry in advance for any conflicts with your project files. Forgot to unselect my project files. >_< 2010-07-25 14:36:24 +00:00
Swifty 4c91519648 Sync with Trunk 6325 2010-07-25 14:18:19 +00:00
Swifty e3c095684b Reported by Backslash. Fixed FS1 Weapon Linking gauge color and head view movements. 2010-07-17 02:13:10 +00:00
Swifty 591904644d This should fix the Int3() that appears when using the Orb Radar. 2010-07-16 02:48:17 +00:00
Swifty c4d8a64a74 Lead sight should work properly now. 2010-07-16 00:20:09 +00:00
Swifty 0b1ea699bb Sync with trunk 6250, including fix for Mantis 1888. 2010-06-22 05:18:14 +00:00
Swifty b88d75efb8 Forgot to add bitarray.h 2010-06-21 19:45:49 +00:00
Swifty 96ca7b1ffe Core files for BSG radar. 2010-06-21 10:00:09 +00:00
Swifty 563b113c68 Experimental Diaspora stuff. 2010-06-21 09:22:05 +00:00
Swifty 112c1c4dfe Sync with trunk 6238. 2010-06-21 08:38:02 +00:00
Swifty 77a63521e4 Fix Supernova gauge. 2010-06-17 09:02:42 +00:00
Swifty 6b3ee7cfb7 The_E: Fix cargo scanning for Target Box gauge. 2010-06-17 08:18:38 +00:00
Swifty 549c76c137 The_E: Include support for growing Wingman Status gauge dots to a different direction. 2010-06-17 08:14:14 +00:00
Swifty c185dab59c Forgot to include parse entrypoint for the Weapon Linking gauge. Fix Training Messages to render at the correct user-defined scale. 2010-06-11 03:42:26 +00:00
Swifty 60f201d1df Initial check in for new HUD code. 2010-06-10 05:29:57 +00:00
Swifty 225c8ece25 Merge with trunk r6199 2010-06-10 04:08:23 +00:00
Goober5000 75d680483a 2010-04-04 19:27:43 +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
226 changed files with 24867 additions and 32472 deletions

No files matched your search

+175
View File
@@ -712,3 +712,178 @@ int main ()
AC_SUBST(THEORA_LIBS)
rm -f conf.theoratest
])
dnl AM_PATH_OPENAL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for OpenAL, and define OPENAL_CFLAGS and OPENAL_LIBS
dnl
AC_DEFUN([AM_PATH_OPENAL],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(openal,[ --with-openal=PFX Prefix where OpenAL is installed (optional)], openal_prefix="$withval", openal_prefix="")
AC_ARG_WITH(openal-libraries,[ --with-openal-libraries=DIR Directory where OpenAL library is installed (optional)], openal_libraries="$withval", openal_libraries="")
AC_ARG_WITH(openal-includes,[ --with-openal-includes=DIR Directory where OpenAL header files are installed (optional)], openal_includes="$withval", openal_includes="")
AC_ARG_ENABLE(openaltest, [ --disable-openaltest Do not try to compile and run a test OpenAL program],, enable_openaltest=yes)
if test "x$openal_libraries" != "x" ; then
OPENAL_LIBS="-L$openal_libraries"
elif test "x$openal_prefix" != "x" ; then
OPENAL_LIBS="-L$openal_prefix/lib"
elif test "x$prefix" != "xNONE"; then
OPENAL_LIBS="-L$libdir"
fi
OPENAL_LIBS="$OPENAL_LIBS -lopenal"
if test "x$openal_includes" != "x" ; then
OPENAL_CFLAGS="-I$openal_includes"
elif test "x$openal_prefix" != "x" ; then
OPENAL_CFLAGS="-I$openal_prefix/include"
elif test "x$prefix" != "xNONE"; then
OPENAL_CFLAGS=""
fi
AC_MSG_CHECKING(for OpenAL)
no_openal=""
if test "x$enable_openaltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OPENAL_CFLAGS"
LIBS="$LIBS $OPENAL_LIBS"
dnl
dnl Now check if the installed OpenAL is sufficiently new.
dnl
rm -f conf.openaltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <AL/al.h>
#include <AL/alc.h>
int main ()
{
#ifdef AL_VERSION_1_1
alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT");
system("touch conf.openaltest");
return 0;
#else
printf("\n*** OpenAL version 1.1 or greater is required.\n");
return 1;
#endif
}
],, no_openal=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_openal" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.openaltest ; then
:
else
echo "*** Could not run OpenAL test program, checking why..."
CFLAGS="$CFLAGS $OPENAL_CFLAGS"
LIBS="$LIBS $OPENAL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <AL/al.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding OpenAL or finding the wrong"
echo "*** version of OpenAL. If it is not finding OpenAL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means OpenAL was incorrectly installed"
echo "*** or that you have moved OpenAL since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OPENAL_CFLAGS=""
OPENAL_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OPENAL_CFLAGS)
AC_SUBST(OPENAL_LIBS)
rm -f conf.openaltest
])
dnl AM_PATH_OPENGL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for OpenGL, and define OPENGL_CFLAGS and OPENGL_LIBS
dnl
AC_DEFUN([AM_PATH_OPENGL],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(opengl,[ --with-opengl=PFX Prefix where OpenGL is installed (optional)], opengl_prefix="$withval", opengl_prefix="")
AC_ARG_WITH(opengl-libraries,[ --with-opengl-libraries=DIR Directory where OpenGL library is installed (optional)], opengl_libraries="$withval", opengl_libraries="")
AC_ARG_WITH(opengl-includes,[ --with-opengl-includes=DIR Directory where OpenGL header files are installed (optional)], opengl_includes="$withval", opengl_includes="")
AC_ARG_ENABLE(opengltest, [ --disable-opengltest Do not try to compile and run a test OpenGL program],, enable_opengltest=yes)
if test "x$opengl_libraries" != "x" ; then
OPENGL_LIBS="-L$opengl_libraries"
elif test "x$opengl_prefix" != "x" ; then
OPENGL_LIBS="-L$opengl_prefix/lib"
elif test "x$prefix" != "xNONE"; then
OPENGL_LIBS="-L$libdir"
fi
OPENGL_LIBS="$OPENGL_LIBS -lGL -lGLU"
if test "x$opengl_includes" != "x" ; then
OPENGL_CFLAGS="-I$opengl_includes"
elif test "x$opengl_prefix" != "x" ; then
OPENGL_CFLAGS="-I$opengl_prefix/include"
elif test "x$prefix" != "xNONE"; then
OPENGL_CFLAGS=""
fi
no_opengl=""
if test "x$enable_opengltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OPENGL_CFLAGS"
LIBS="$LIBS $OPENGL_LIBS"
AC_CHECK_LIB(GL, glPushMatrix,
[AC_CHECK_HEADER(GL/gl.h,
[AC_CHECK_LIB(GLU, gluPerspective,
[AC_CHECK_HEADER(GL/glu.h, ,
dnl NOTE: this is a failure
no_opengl=yes
)]
)]
)]
)
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_opengl" = "x" ; then
ifelse([$1], , :, [$1])
else
OPENGL_CFLAGS=""
OPENGL_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OPENGL_CFLAGS)
AC_SUBST(OPENGL_LIBS)
])
+2 -2
View File
@@ -258,8 +258,6 @@ FS2_SOURCES = \
debugconsole/dbugfile.h \
debugconsole/timerbar.cpp \
debugconsole/timerbar.h \
decals/decals.cpp \
decals/decals.h \
demo/demo.cpp \
demo/demo.h \
exceptionhandler/exceptionhandler.cpp \
@@ -293,6 +291,8 @@ FS2_SOURCES = \
globalincs/crypt.h \
globalincs/def_files.cpp \
globalincs/def_files.h \
globalincs/fsmemory.cpp \
globalincs/fsmemory.h \
globalincs/globals.h \
globalincs/linklist.h \
globalincs/pstypes.h \
+4
View File
@@ -393,6 +393,10 @@ void parse_ai_profiles_tbl(char *filename)
set_flag(profile, "$perform less checks for death screams:", AIPF2_PERFORM_LESS_SCREAM_CHECKS, AIP_FLAG2);
set_flag(profile, "$advanced turret fov edge checks:", AIPF2_ADVANCED_TURRET_FOV_EDGE_CHECKS, AIP_FLAG2);
set_flag(profile, "$require turrets to have target in fov:", AIPF2_REQUIRE_TURRET_TO_HAVE_TARGET_IN_FOV, AIP_FLAG2);
set_flag(profile, "$all ships manage shields:", AIPF2_ALL_SHIPS_MANAGE_SHIELDS, AIP_FLAG2);
// if we've been through once already and are at the same place, force a move
+4 -1
View File
@@ -54,7 +54,10 @@
#define AIPF2_TURRETS_IGNORE_TARGET_RADIUS (1 << 0)
#define AIPF2_NO_SPECIAL_PLAYER_AVOID (1 << 1)
#define AIPF2_PERFORM_LESS_SCREAM_CHECKS (1 << 2)
#define AIPF2_ALL_SHIPS_MANAGE_SHIELDS (1 << 3)
#define AIPF2_ALL_SHIPS_MANAGE_SHIELDS (1 << 3)
#define AIPF2_ADVANCED_TURRET_FOV_EDGE_CHECKS (1 << 4)
#define AIPF2_REQUIRE_TURRET_TO_HAVE_TARGET_IN_FOV (1 << 5)
#define MAX_AI_PROFILES 5
+7 -2
View File
@@ -376,7 +376,12 @@ int ai_big_maybe_follow_subsys_path(int do_dot_check)
float dist;
pm = model_get( Ship_info[Ships[Pl_objp->instance].ship_info_index].model_num );
//Necessary sanity check
polymodel *pm_t;
pm_t = model_get(Ship_info[Ships[Objects[aip->target_objnum].instance].ship_info_index].model_num);
Assertion(aip->targeted_subsys->system_info->path_num <= pm_t->n_paths, "Invalid Path number %d for subsystem %s on ship %s (Model: %s)\n", aip->targeted_subsys->system_info->path_num, aip->targeted_subsys->system_info->name, Ship_info[Ships[Objects[aip->target_objnum].instance].ship_info_index].name, pm_t->filename );
if (aip->targeted_subsys->system_info->path_num > pm_t->n_paths)
return 0;
// If attacking a subsystem, ensure that we have an unobstructed line of sight... if not, then move
// towards path linked to subsystem
subsys_in_sight = 0; // assume Pl_objp doesn't have line of sight to subys
@@ -420,7 +425,7 @@ int ai_big_maybe_follow_subsys_path(int do_dot_check)
aip->path_goal_dist = 5;
subsys_path_num = aip->targeted_subsys->system_info->path_num;
if ( (aip->path_start) == -1 || (aip->mp_index != subsys_path_num) ) {
if ( ((aip->path_start) == -1 || (aip->mp_index != subsys_path_num)) && subsys_path_num <= pm->n_paths ) {
// maybe create a new path
if ( subsys_path_num >= 0 ) {
Assert(aip->target_objnum >= 0);
+17 -11
View File
@@ -2900,7 +2900,7 @@ void ai_find_path(object *pl_objp, int objnum, int path_num, int exit_flag, int
if(pm->n_paths <= path_num)
Error(LOCATION,"ai_find_path tring to find a path (%d) that doesn't exist, on ship %s", path_num, shipp->ship_name);
// Assert(pm->n_paths > path_num);
aip->goal_objnum = objp-Objects;
aip->goal_objnum = objnum;
aip->goal_signature = objp->signature;
if (exit_flag)
create_model_exit_path(pl_objp, objp, path_num);
@@ -6507,8 +6507,14 @@ void do_random_sidethrust(ai_info *aip, ship_info *sip)
//This means that we get the same random values for a little bit.
//Using static_rand(shipnum) as a crude hash function to make sure that the seed is different for each ship and direction
//The *2 ensures that y and x stay separate.
side_vec.x = static_randf_range((((Missiontime + static_rand(aip->shipnum)) >> 16) / strafeHoldDirAmount) , -1.0f, 1.0f);
side_vec.y = static_randf_range((((Missiontime + static_rand(aip->shipnum)) >> 16) / strafeHoldDirAmount) * 2, -1.0f, 1.0f);
if (strafeHoldDirAmount > 0) { //This may look unnecessary, but we're apparently still getting div by zero errors on Macs here.
side_vec.x = static_randf_range((((Missiontime + static_rand(aip->shipnum)) >> 16) / strafeHoldDirAmount) , -1.0f, 1.0f);
side_vec.y = static_randf_range((((Missiontime + static_rand(aip->shipnum)) >> 16) / strafeHoldDirAmount) * 2, -1.0f, 1.0f);
} else {
Warning(LOCATION, "Division by zero in do_random_sidethrust averted. Please tell a coder.\n");
side_vec.x = 1.0f;
side_vec.y = 1.0f;
}
//Scale it up so that the longest dimension is length 1.0. This ensures we are always getting as much use out of sidethrust as possible.
vm_vec_boxscale(&side_vec, 1.0f);
@@ -6573,13 +6579,13 @@ void attack_set_accel(ai_info *aip, ship_info *sip, float dist_to_enemy, float d
if (!( Pl_objp->phys_info.flags & PF_AFTERBURNER_ON )) {
float percent_left;
ship *shipp;
ship_info *sip;
ship_info *sip_local;
shipp = &Ships[Pl_objp->instance];
sip = &Ship_info[shipp->ship_info_index];
sip_local = &Ship_info[shipp->ship_info_index];
if (sip->afterburner_fuel_capacity > 0.0f) {
percent_left = 100.0f * shipp->afterburner_fuel / sip->afterburner_fuel_capacity;
if (sip_local->afterburner_fuel_capacity > 0.0f) {
percent_left = 100.0f * shipp->afterburner_fuel / sip_local->afterburner_fuel_capacity;
if (percent_left > 30.0f + ((Pl_objp-Objects) & 0x0f)) {
afterburners_start(Pl_objp);
if (aip->ai_profile_flags & AIPF_SMART_AFTERBURNER_MANAGEMENT) {
@@ -6589,11 +6595,11 @@ void attack_set_accel(ai_info *aip, ship_info *sip, float dist_to_enemy, float d
float ab_time;
// Max afterburner speed - make sure we don't devide by 0 later
max_ab_vel = sip->afterburner_max_vel.xyz.z > 0.0f ? sip->afterburner_max_vel.xyz.z : sip->max_vel.xyz.z;
max_ab_vel = sip_local->afterburner_max_vel.xyz.z > 0.0f ? sip_local->afterburner_max_vel.xyz.z : sip_local->max_vel.xyz.z;
max_ab_vel = max_ab_vel > 0.0f ? max_ab_vel : 0.0001f;
// Time to exhaust 25% of the remaining fuel
time_to_exhaust_25pct_fuel = shipp->afterburner_fuel * 0.25f / sip->afterburner_burn_rate;
time_to_exhaust_25pct_fuel = shipp->afterburner_fuel * 0.25f / sip_local->afterburner_burn_rate;
// Time to fly 75% of the distance to the target
time_to_fly_75pct_of_distance = dist_to_enemy * 0.75f / max_ab_vel;
@@ -10679,8 +10685,6 @@ void ai_dock()
// model_anim_start_type(shipp, TRIGGER_TYPE_DOCKED, aip->dockee_index, 1);
// model_anim_start_type(shipp, TRIGGER_TYPE_DOCKED, 1);
snd_play_3d( &Snds[SND_DOCK_ATTACH], &Pl_objp->pos, &View_position );
hud_maybe_flash_docking_text(Pl_objp);
hud_maybe_flash_docking_text(goal_objp);
// ai_dock_shake(Pl_objp, goal_objp);
if ((Pl_objp == Player_obj) || (goal_objp == Player_obj))
@@ -13292,6 +13296,8 @@ void ai_warp_out(object *objp)
// flag us as trying to warp so that this function keeps getting called
// (in other words, if we can't warp just yet, we want to warp at the first
// opportunity)
if (aip->mode != AIM_WARP_OUT)
aip->mode = AIM_WARP_OUT;
aip->submode = AIS_WARP_1;
aip->ai_flags |= AIF_TRYING_UNSUCCESSFULLY_TO_WARP;
+156 -9
View File
@@ -100,6 +100,101 @@ int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos
return 0;
}
bool is_object_radius_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos, vec3d *v2e, vec3d *predicted_pos, float distance)
{
float target_dist = distance;
if (distance == 0.0f)
target_dist = vm_vec_dist(predicted_pos,tpos);
if (object_in_turret_fov(objp, ss, tvec, tpos, target_dist + objp->radius)) {
// so the targeted spot in not in fov but the enemy + radius is
// lets align the darn gun and try shooting there
vec3d temp_vec;
float multiplier = 0;
model_subsystem *tp = ss->system_info;
// project v2e_from_turret to turret normal
// substract resultant vector from the temp_vec (v2e_from_turret)
// adjust z component as necessary
// calculate multiplier for the resultant vector
// use multiplier and the z component and compose a new vector
float dot = vm_vec_dot(v2e, tvec);
vm_vec_scale_add(&temp_vec, v2e, tvec, -dot);
if (IS_VEC_NULL_SQ_SAFE(&temp_vec)) {
// return false, target is perfectly aligned over or below the turret
// safe bet is to allow turret to reacquire better target
return false;
}
// normalize the vec, it needs to be done regardless
vm_vec_normalize(&temp_vec);
bool fix_elevation = false;
bool fix_base_rot = false;
if (dot < tp->turret_fov) {
dot = tp->turret_fov;
fix_elevation = true;
}
if (dot > tp->turret_max_fov) {
dot = tp->turret_max_fov;
fix_elevation = true;
}
if (tp->flags & MSS_FLAG_TURRET_ALT_MATH) {
vec3d temp_vec2;
vm_vec_rotate(&temp_vec2, &temp_vec, &ss->world_to_turret_matrix);
// now in turrets frame of reference
// check if math is actually possible
if (!((temp_vec2.xyz.x == 0) && (temp_vec2.xyz.y == 0))) {
float temp_z = temp_vec2.xyz.z;
temp_vec2.xyz.z = 0.0f;
// make sure null vecs wont happen
if (!IS_VEC_NULL_SQ_SAFE(&temp_vec2)) {
vm_vec_normalize(&temp_vec2);
// only do this if it actually is required
if (-temp_vec2.xyz.y < tp->turret_y_fov) {
float check_pos = 1;
fix_base_rot = true;
temp_vec2.xyz.y = -tp->turret_y_fov;
if (temp_vec2.xyz.x < 0)
check_pos = -1;
temp_vec2.xyz.x = check_pos * sqrtf(1 - (temp_vec2.xyz.y*temp_vec2.xyz.y));
// restore z component
float scaler = sqrtf(1 - (temp_z*temp_z));
vm_vec_scale(&temp_vec2,scaler);
temp_vec2.xyz.z = temp_z;
// back to world frame
vm_vec_unrotate(&temp_vec, &temp_vec2, &ss->world_to_turret_matrix);
}
}
}
}
if (fix_elevation || fix_base_rot) {
if (fix_elevation) {
multiplier = sqrtf(1 - (dot*dot));
// keep the temp_vec scaled with the tweaked vector
vm_vec_scale(&temp_vec, multiplier);
}
vm_vec_scale_add(v2e, &temp_vec, tvec, dot);
// and we are done with v2e...
vm_vec_scale_add(predicted_pos, tpos, v2e, target_dist);
// and we are done with predicted position
return true;
} else {
mprintf(("Warning: Function 'is_object_radius_in_turret_fov' was called\nwithout need to fix turret alignments\n"));
return false;
}
}
// outside of the expanded radii, unable to align, return false
return false;
}
// return 1 if bomb_objp is headed towards ship_objp
int bomb_headed_towards_ship(object *bomb_objp, object *ship_objp)
{
@@ -357,9 +452,10 @@ extern int Player_attacking_enabled;
void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo)
{
object *turret_parent_obj = &Objects[eeo->turret_parent_objnum];
ship *shipp;
ship *shipp;
ship_subsys *ss = eeo->turret_subsys;
float dist, dist_comp;
bool turret_has_no_target = false;
// Don't look for bombs when weapon system is not ok
if (objp->type == OBJ_WEAPON && !eeo->weapon_system_ok) {
@@ -476,7 +572,10 @@ void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo)
if ((objp->type == OBJ_WEAPON) && check_weapon) {
if ( Weapons[objp->instance].homing_object == &Objects[eeo->turret_parent_objnum] ) {
if ( dist_comp < eeo->nearest_homing_bomb_dist ) {
if ( (eeo->current_enemy == -1) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
if (!(ss->flags & SSF_FOV_REQUIRED) && (eeo->current_enemy == -1)) {
turret_has_no_target = true;
}
if ( (turret_has_no_target) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
eeo->nearest_homing_bomb_dist = dist_comp;
eeo->nearest_homing_bomb_objnum = OBJ_INDEX(objp);
}
@@ -484,7 +583,10 @@ void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo)
// if not homing, check if bomb is flying towards ship
} else if ( bomb_headed_towards_ship(objp, &Objects[eeo->turret_parent_objnum]) ) {
if ( dist_comp < eeo->nearest_bomb_dist ) {
if ( (eeo->current_enemy == -1) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
if (!(ss->flags & SSF_FOV_REQUIRED) && (eeo->current_enemy == -1)) {
turret_has_no_target = true;
}
if ( (turret_has_no_target) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
eeo->nearest_bomb_dist = dist_comp;
eeo->nearest_bomb_objnum = OBJ_INDEX(objp);
}
@@ -540,7 +642,10 @@ void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo)
// maybe update nearest attacker
if ( dist_comp < eeo->nearest_attacker_dist ) {
if ( (eeo->current_enemy == -1) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
if (!(ss->flags & SSF_FOV_REQUIRED) && (eeo->current_enemy == -1)) {
turret_has_no_target = true;
}
if ( (turret_has_no_target) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
// nprintf(("AI", "Nearest enemy = %s, dist = %7.3f, dot = %6.3f, fov = %6.3f\n", Ships[objp->instance].ship_name, dist, vm_vec_dot(&v2e, tvec), tp->turret_fov));
eeo->nearest_attacker_dist = dist_comp;
eeo->nearest_attacker_objnum = OBJ_INDEX(objp);
@@ -555,7 +660,10 @@ void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo)
dist_comp *= 0.9f + (0.01f * asteroid_time_to_impact(objp));
if (dist_comp < eeo->nearest_dist ) {
if ( (eeo->current_enemy == -1) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
if (!(ss->flags & SSF_FOV_REQUIRED) && (eeo->current_enemy == -1)) {
turret_has_no_target = true;
}
if ( (turret_has_no_target) || object_in_turret_fov(objp, ss, eeo->tvec, eeo->tpos, dist + objp->radius) ) {
eeo->nearest_dist = dist_comp;
eeo->nearest_objnum = OBJ_INDEX(objp);
}
@@ -945,7 +1053,13 @@ int find_turret_enemy(ship_subsys *turret_subsys, int objnum, vec3d *tpos, vec3d
dist = vm_vec_normalized_dir(&v2e, &Objects[aip->target_objnum].pos, tpos);
in_fov = turret_fov_test(turret_subsys, tvec, &v2e);
// MODIFY FOR ATTACKING BIG SHIP
if (turret_subsys->flags & SSF_FOV_EDGE_CHECK) {
if (in_fov == false)
if (object_in_turret_fov(&Objects[aip->target_objnum], turret_subsys, tvec, tpos, dist + Objects[aip->target_objnum].radius))
in_fov = true;
}
// MODIFY FOR ATTACKING BIG SHIP
// dot += (0.5f * Objects[aip->target_objnum].radius / dist);
if (in_fov) {
return aip->target_objnum;
@@ -1106,6 +1220,11 @@ int aifft_rotate_turret(ship *shipp, int parent_objnum, ship_subsys *ss, object
in_fov = turret_fov_test(ss, gvec, &v2e);
if (ss->flags & SSF_FOV_EDGE_CHECK) {
if (in_fov == false)
in_fov = is_object_radius_in_turret_fov(&Objects[ss->turret_enemy_objnum], ss, gvec, &gun_pos, &v2e, predicted_enemy_pos, 0.0f);
}
if (in_fov) {
ret_val = model_rotate_gun(Ship_info[shipp->ship_info_index].model_num,
tp, &Objects[parent_objnum].orient,
@@ -1381,6 +1500,9 @@ void turret_set_next_fire_timestamp(int weapon_num, weapon_info *wip, ship_subsy
wait *= frand_range(0.9f, 1.1f);
}
if(turret->rof_scaler != 1.0f)
wait /= get_adjusted_turret_rof(turret);
(*fs_dest) = timestamp((int)wait);
}
@@ -2206,7 +2328,7 @@ bool turret_std_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mo
{
model_subsystem *tp = ss->system_info;
float dot = vm_vec_dot(v2e, gvec);
if (((dot + size_mod) > tp->turret_fov) && ((dot - size_mod) <= tp->turret_max_fov))
if (((dot + size_mod) >= tp->turret_fov) && ((dot - size_mod) <= tp->turret_max_fov))
return true;
return false;
@@ -2216,7 +2338,7 @@ bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mo
{
model_subsystem *tp = ss->system_info;
float dot = vm_vec_dot(v2e, gvec);
if (((dot + size_mod) > tp->turret_fov) && ((dot - size_mod) <= tp->turret_max_fov)) {
if (((dot + size_mod) >= tp->turret_fov) && ((dot - size_mod) <= tp->turret_max_fov)) {
vec3d of_dst;
vm_vec_rotate( &of_dst, v2e, &ss->world_to_turret_matrix );
if ((of_dst.xyz.x == 0) && (of_dst.xyz.y == 0)) {
@@ -2226,7 +2348,7 @@ bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mo
if (!IS_VEC_NULL_SQ_SAFE(&of_dst)) {
vm_vec_normalize(&of_dst);
// now we have 2d vector with lenght of 1 that points at the targets direction after being rotated to turrets FOR
if ((-of_dst.xyz.y + size_mod) > tp->turret_y_fov)
if ((-of_dst.xyz.y + size_mod) >= tp->turret_y_fov)
return true;
}
}
@@ -2244,3 +2366,28 @@ bool turret_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod)
return in_fov;
}
float get_adjusted_turret_rof(ship_subsys *ss)
{
float tempf = ss->rof_scaler;
// optional reset switch (negative value)
if (tempf < 0) {
ss->rof_scaler = 1.0f;
return 1.0f;
}
if (tempf == 0) {
// special case returning the number of firingpoints
ss->rof_scaler = (float) ss->system_info->turret_num_firing_points;
tempf = ss->rof_scaler;
// safety check to avoid div/0 issues
if (tempf == 0) {
ss->rof_scaler = 1.0f;
return 1.0f;
}
}
return tempf;
}
+15 -1
View File
@@ -112,11 +112,13 @@ MONITOR(NumANIPlayed)
// Setup an anim_play_struct for passing into anim_play(). Will fill in default values, which you
// can then change before calling anim_play().
//
void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y)
void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y, int base_w, int base_h)
{
aps->anim_info = a_info;
aps->x = x;
aps->y = y;
aps->base_w = base_w;
aps->base_h = base_h;
aps->start_at = 0;
aps->stop_at = a_info->total_frames - 1;
aps->screen_id = 0;
@@ -219,6 +221,14 @@ anim_instance *anim_play(anim_play_struct *aps)
instance->xlate_pal = 0;
}
if(aps->base_w < 0 || aps->base_h < 0) {
instance->base_w = gr_screen.max_w_unscaled;
instance->base_h = gr_screen.max_h_unscaled;
} else {
instance->base_w = aps->base_w;
instance->base_h = aps->base_h;
}
// determining the start_at frame is more complicated, since it must be a key-frame.
// Futhermore, need to subtract 1 from key-frame number, since frame number is always
// incremented the first time anim_show_next_frame() is called
@@ -521,6 +531,8 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
// determine x,y to display the bitmap at
if ( instance->world_pos == NULL ) {
gr_set_screen_scale(instance->base_w, instance->base_h);
gr_set_clip(0, 0, instance->base_w, instance->base_h, false);
if ( instance->aa_color == NULL ) {
gr_bitmap(instance->x, instance->y);
}
@@ -528,6 +540,8 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
gr_set_color_fast( (color*)instance->aa_color );
gr_aabitmap(instance->x, instance->y);
}
gr_reset_screen_scale();
gr_reset_clip();
}
else {
g3_rotate_vertex(&image_vertex,instance->world_pos);
+3 -1
View File
@@ -24,6 +24,8 @@ typedef struct {
anim *anim_info;
int x;
int y;
int base_w;
int base_h;
int start_at;
int stop_at;
int screen_id;
@@ -50,7 +52,7 @@ void anim_level_init();
void anim_level_close();
void anim_render_all(int screen_id, float frametime);
void anim_render_one(int screen_id, anim_instance *ani, float frametime);
void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y);
void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y, int max_x = -1, int max_y = -1);
anim_instance *anim_play(anim_play_struct *aps);
void anim_ignore_next_frametime();
int anim_stop_playing(anim_instance* anim_instance);
+1
View File
@@ -71,6 +71,7 @@ typedef struct anim {
typedef struct anim_instance {
anim_instance *next, *prev;
int x,y; // coordinates anim is played at (top left corner of anim)
int base_w, base_h; // coordinate scale this anim is played in.
vec3d *world_pos; // world (x,y,z) position of explosion
float radius; // radius of image, needed for scaling
int frame_num; // current frame, or last frame if between frames (first frame is 0)
+4 -17
View File
@@ -1935,23 +1935,10 @@ void asteroid_show_brackets()
g3_rotate_vertex(&asteroid_vertex,&asteroid_objp->pos);
g3_project_vertex(&asteroid_vertex);
if (!(asteroid_vertex.flags & PF_OVERFLOW)) {
gr_set_color_fast(iff_get_color(IFF_COLOR_SELECTION, 1));
hud_show_brackets(asteroid_objp, &asteroid_vertex);
if ( Cmdline_targetinfo ) {
hud_show_lead_indicator_quick(&asteroid_objp->pos, asteroid_objp);
}
}
// if asteroid is not on screen, draw an offscreen indicator
if ( hud_gauge_active(HUD_OFFSCREEN_INDICATOR) ) {
if (asteroid_vertex.codes != 0) {
float dist;
// dist = vm_vec_dist_quick(&Player_obj->pos, &asteroid_objp->pos);
dist = hud_find_target_distance( asteroid_objp, Player_obj );
gr_set_color_fast(iff_get_color(IFF_COLOR_SELECTION, 1));
hud_draw_offscreen_indicator(&asteroid_vertex, &asteroid_objp->pos, dist);
}
if ( Cmdline_targetinfo ) {
hud_target_add_display_list(asteroid_objp, &asteroid_vertex, &asteroid_objp->pos, 0, NULL, NULL, TARGET_DISPLAY_DIST | TARGET_DISPLAY_LEAD);
} else {
hud_target_add_display_list(asteroid_objp, &asteroid_vertex, &asteroid_objp->pos, 0, NULL, NULL, TARGET_DISPLAY_DIST);
}
}
}
+1 -1
View File
@@ -78,7 +78,7 @@ cf_pathtype Pathtypes[CF_MAX_PATH_TYPES] = {
{ CF_TYPE_SQUAD_IMAGES, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "squads", ".pcx .png .dds", CF_TYPE_PLAYERS },
{ CF_TYPE_SINGLE_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "single", ".pl2 .cs2 .plr .csg .css", CF_TYPE_PLAYERS },
{ CF_TYPE_MULTI_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "multi", ".plr", CF_TYPE_PLAYERS },
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp .ibx .tsb", CF_TYPE_DATA }, //clr=cached color
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp .bx", CF_TYPE_DATA }, //clr=cached color
{ CF_TYPE_MULTI_CACHE, "data" DIR_SEPARATOR_STR "multidata", ".pcx .png .dds .fs2 .txt", CF_TYPE_DATA },
{ CF_TYPE_MISSIONS, "data" DIR_SEPARATOR_STR "missions", ".fs2 .fc2 .ntl .ssv", CF_TYPE_DATA },
{ CF_TYPE_CONFIG, "data" DIR_SEPARATOR_STR "config", ".cfg", CF_TYPE_DATA },
+24 -15
View File
@@ -79,6 +79,8 @@ enum
#define BUILD_CAP_NO_D3D (1<<1)
#define BUILD_CAP_NEW_SND (1<<2)
#define PARSE_COMMAND_LINE_STRING "-parse_cmdline_only"
typedef struct
{
// DO NOT CHANGE THE SIZE OF THIS STRING!
@@ -164,6 +166,7 @@ Flag exe_params[] =
{ "-no_glsl", "Disable GLSL (shader) support", true, 0, EASY_DEFAULT, "Troubleshoot", "", },
{ "-ati_swap", "Fix Color 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", "", },
{ "-disable_glsl_model","Don't use shaders for model rendering", true, 0, EASY_DEFAULT, "Troubleshoot", "", },
{ "-ingame_join", "Allows ingame joining", true, 0, EASY_DEFAULT, "Experimental", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-ingame_join", },
{ "-voicer", "Voice recognition", true, 0, EASY_DEFAULT, "Experimental", "", },
@@ -250,7 +253,6 @@ 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 cell_arg("-cell", NULL); // Cmdline_cell
cmdline_parm decals("-decals", NULL); // Cmdline_decals
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
@@ -270,7 +272,6 @@ float Cmdline_fov = 0.75f;
float Cmdline_ogl_spec = 80.0f;
int Cmdline_ambient_factor = 128;
int Cmdline_cell = 0;
int Cmdline_decals = 0;
int Cmdline_env = 0;
int Cmdline_mipmap = 0;
int Cmdline_missile_lighting = 0;
@@ -364,6 +365,7 @@ 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 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
int Cmdline_d3d_lesstmem = 0;
int Cmdline_load_all_weapons = 0;
@@ -377,6 +379,7 @@ int Cmdline_no_fbo = 0;
int Cmdline_noglsl = 0;
int Cmdline_ati_color_swap = 0;
int Cmdline_no_3d_sound = 0;
int Cmdline_no_glsl_model_rendering = 0;
// Developer/Testing related
cmdline_parm start_mission_arg("-start_mission", NULL); // Cmdline_start_mission
@@ -396,6 +399,7 @@ cmdline_parm window_arg("-window", NULL); // Cmdline_window
cmdline_parm fullscreen_window_arg("-fullscreen_window",NULL);
cmdline_parm res_arg("-res", NULL); // Cmdline_lores
cmdline_parm verify_vps_arg("-verify_vps", NULL); // Cmdline_verify_vps -- spew VP crcs to vp_crcs.txt
cmdline_parm parse_cmdline_only(PARSE_COMMAND_LINE_STRING, NULL);
#ifdef SCP_UNIX
cmdline_parm no_grab("-nograb", NULL); // Cmdline_no_grab
#endif
@@ -604,8 +608,8 @@ void os_validate_parms(char *cmdline)
char *token;
int parm_found;
token = strtok(cmdline, seps);
while(token != NULL) {
token = strtok(cmdline, seps);
while(token != NULL) {
if (token[0] == '-') {
parm_found = 0;
@@ -678,6 +682,12 @@ void os_init_cmdline(char *cmdline)
{
FILE *fp;
bool parse_config = true;
if (strstr(cmdline, PARSE_COMMAND_LINE_STRING) != NULL) {
parse_config = false;
}
// read the cmdline.cfg file from the data folder, and pass the command line arguments to
// the the parse_parms and validate_parms line. Read these first so anything actually on
// the command line will take precedence
@@ -702,7 +712,7 @@ void os_init_cmdline(char *cmdline)
#endif
// if the file exists, get a single line, and deal with it
if ( fp ) {
if ( fp && parse_config ) {
char *buf, *p;
size_t len = filelength( fileno(fp) ) + 2;
@@ -939,9 +949,11 @@ bool SetCmdlineParams()
}
}
// is this a standalone server??
if (standalone_arg.found()) {
Is_standalone = 1;
if (!Fred_running) { //There is no standalone FRED
// is this a standalone server??
if (standalone_arg.found()) {
Is_standalone = 1;
}
}
// object update control
@@ -1252,6 +1264,10 @@ bool SetCmdlineParams()
Cmdline_noglsl = 1;
}
if (no_glsl_models_arg.found() ) {
Cmdline_no_glsl_model_rendering = 1;
}
if ( img2dds_arg.found() )
Cmdline_img2dds = 1;
@@ -1348,13 +1364,6 @@ bool SetCmdlineParams()
Cmdline_env = 1;
}
if ( decals.found() ) {
#ifdef WIN32
MessageBox(NULL, "Decals have been disabled in builds after May 4, 2006. Please remove the \"-decals\" command line from the launcher to prevent this message from appearing the the future.", "", MB_OK | MB_ICONINFORMATION);
#endif
}
if ( ballistic_gauge.found() ) {
Cmdline_ballistic_gauge = 1;
}
+1 -1
View File
@@ -63,7 +63,6 @@ extern float static_point_factor;
extern float static_tube_factor;
extern int Cmdline_ambient_factor;
extern int Cmdline_cell;
extern int Cmdline_decals;
extern int Cmdline_env;
extern int Cmdline_mipmap;
extern int Cmdline_missile_lighting;
@@ -125,6 +124,7 @@ extern int Cmdline_no_fbo;
extern int Cmdline_noglsl;
extern int Cmdline_ati_color_swap;
extern int Cmdline_no_3d_sound;
extern int Cmdline_no_glsl_model_rendering;
// Developer/Testing related
extern char *Cmdline_start_mission;
+6 -11
View File
@@ -167,7 +167,6 @@ void cutscene_mark_viewable(char *filename)
#define PLAY_BUTTON 6
#define EXIT_BUTTON 7
static int Num_files;
static SCP_vector<int> Cutscene_list;
//static int Stats_scroll_offset; // not used - taylor
static int Selected_line = 0; // line that is currently selected for binding
@@ -331,7 +330,7 @@ void cutscenes_screen_play()
char name[MAX_FILENAME_LEN]; // *full_name
int which_cutscene;
Assert( (Selected_line >= 0) && (Selected_line < Num_files) );
Assert( (Selected_line >= 0) && (Selected_line < (int)Cutscene_list.size()) );
which_cutscene = Cutscene_list[Selected_line];
strcpy_s(name, Cutscenes[which_cutscene].filename );
@@ -372,7 +371,7 @@ void cutscenes_screen_scroll_line_down()
{
int h;
if (Selected_line < Num_files - 1) {
if (Selected_line < (int)Cutscene_list.size() - 1) {
Selected_line++;
gamesnd_play_iface(SND_SCROLL);
@@ -409,7 +408,7 @@ void cutscenes_screen_scroll_screen_down()
int h;
h = Cutscene_list_coords[gr_screen.res][3] / gr_get_font_height();
if (Scroll_offset + h < Num_files) {
if (Scroll_offset + h < (int)Cutscene_list.size()) {
Scroll_offset++;
if (Selected_line < Scroll_offset){
Selected_line = Scroll_offset;
@@ -507,12 +506,10 @@ void cutscenes_screen_init()
// if (All_movies_enabled)
// Cutscenes_viewable = 0xffffffff; // Cheat code enables all movies.
Num_files = 0;
Cutscene_list.clear();
for (size_t j = 0; j < Cutscenes.size(); j++ ) {
if ( Cutscenes_viewable & (1<<j) ) {
Cutscene_list.push_back((int)j);
Num_files++;
}
}
}
@@ -570,11 +567,9 @@ void cutscenes_screen_do_frame()
// the "show-all" hotkey
case KEY_CTRLED | KEY_SHIFTED | KEY_S:
{
Num_files = 0;
Cutscene_list.clear();
for (size_t t = 0; t < Cutscenes.size(); t++) {
Cutscene_list.push_back((int)t);
Num_files++;
}
break;
@@ -592,14 +587,14 @@ void cutscenes_screen_do_frame()
if (List_region.button_down()) {
List_region.get_mouse_pos(NULL, &y);
z = Scroll_offset + y / font_height;
if ((z >= 0) && (z < Num_files))
if ((z >= 0) && (z < (int)Cutscene_list.size()))
select_tease_line = z;
}
if (List_region.pressed()) {
List_region.get_mouse_pos(NULL, &y);
z = Scroll_offset + y / font_height;
if ((z >= 0) && (z < Num_files))
if ((z >= 0) && (z < (int)Cutscene_list.size()))
Selected_line = z;
}
@@ -624,7 +619,7 @@ void cutscenes_screen_do_frame()
y = 0;
z = Scroll_offset;
while (y + font_height <= Cutscene_list_coords[gr_screen.res][3]) {
if (z >= Num_files){
if (z >= (int)Cutscene_list.size()){
break;
}
+4 -2
View File
@@ -668,8 +668,10 @@ int mve_video_init(ubyte *data)
GL_state.SetAlphaBlendMode(ALPHA_BLEND_NONE);
GL_state.SetZbufferType(ZBUFFER_TYPE_NONE);
GL_state.Texture.SetWrapS(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapT(GL_CLAMP_TO_EDGE);
glTexParameteri(GL_texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// NOTE: using NULL instead of pixelbuf crashes some drivers, but then so does pixelbuf
glTexImage2D(GL_state.Texture.GetTarget(), 0, GL_RGB5_A1, wp2, hp2, 0, GL_BGRA_EXT, GL_UNSIGNED_SHORT_1_5_5_5_REV, NULL);
+4 -2
View File
@@ -360,8 +360,10 @@ static void OGG_video_init(theora_info *tinfo)
GL_state.SetAlphaBlendMode(ALPHA_BLEND_NONE);
GL_state.SetZbufferType(ZBUFFER_TYPE_NONE);
GL_state.Texture.SetWrapS(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapT(GL_CLAMP_TO_EDGE);
glTexParameteri(GL_texture_target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_texture_target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// NOTE: using NULL instead of pixelbuf crashes some drivers, but then so does pixelbuf
glTexImage2D(GL_state.Texture.GetTarget(), 0, GL_RGB8, wp2, hp2, 0, GL_BGR, GL_UNSIGNED_BYTE, NULL);
+1 -1
View File
@@ -42,7 +42,7 @@ typedef struct debris {
vec3d arc_pts[MAX_DEBRIS_ARCS][2]; // The endpoints of each arc
int arc_timestamp[MAX_DEBRIS_ARCS]; // When this times out, the spark goes away. -1 is not used
int arc_frequency; // Starts at 0, gets bigger
char parent_alt_name;
int parent_alt_name;
float damage_mult;
} debris;
File diff suppressed because it is too large. Load diff
-129
View File
@@ -1,129 +0,0 @@
//header file for making decals-Bobboau
#ifndef _DECAL_H
#define _DECAL_H
#include "object/object.h"
#include "globalincs/pstypes.h"
//#include "ship/ship.h"
#ifdef ENABLE_DECALS
#define MAX_DECAL_POLY 40
#define MAX_DECAL_POLY_POINT 10
#define MAX_DECAL_DEFPOINTS 10000
#define MAX_DECAL_POINT 10
#define MAX_SHIP_DECALS 25
#define MAX_GLOBAL_DECAL_POLYS 11000
#define QUICKFIND_SUBDIVISION 100
#define QUICKFIND_SEGMENT_LENGTH (MAX_GLOBAL_DECAL_POLYS/QUICKFIND_SUBDIVISION)
#define MAX_GLOBAL_DECALS 5000
#define DP_EOF 0
#define DP_DEFPOINTS 1
#define DP_FLATPOLY 2
#define DP_TMAPPOLY 3
#define DP_SORTNORM 4
#define DP_BOUNDBOX 5
#endif // ENABLE_DECALS
struct decal;
struct decal_list;
struct decal_list_controle;
struct decal_poly{
vec3d norm[3];
vertex point[3];
decal_poly *next;
decal* parent;
int idx;
};
struct decal{
int n_poly;
int timestamp; //when this decal was created
int burn_time; //how long it takes for the glow texture to fade
int vertex_buffer_start; //were is the start of this decal's polys in the vertex buffer
decal_poly* poly;
decal_poly* add_poly();
decal_poly* get_last_poly();
void remove_last_poly();
decal_list_controle *parent;
};
struct decal_list{
decal dec;
decal_list *next;
};
struct decal_item{
decal_list dec;
bool used;
};
struct decal_list_controle{
int n_decals;
int buffer;
int texture;
int n_poly;
int burn_texture;
int glow_texture;
bool modifyed;
decal_list *d_list;
decal_list *end;
decal_list *add_new();
void trim();
void clear();
~decal_list_controle();
decal_list_controle();
};
struct decal_system{
decal_list_controle *decals;
int n_decal_textures;
bool decals_modified;
int max_decals;
decal_system():decals(NULL),n_decal_textures(0),decals_modified(false){};
};
//this is used to give all the data to the generation data to the functions that make them
struct decal_point{
vec3d pnt;
matrix orient;
float radius;
};
#ifdef ENABLE_DECALS
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000);//makes the decal
int decal_create_simple(object * obj, decal_point *point, int texture);//makes a simple non-clipped decal
void decal_render_all(object * obj); //renders all decals
int decal_create_sub(void *model_ptr);
void clear_decals(decal_system *system);
void init_decals();
#else // ENABLE_DECALS
inline int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000)
{
return 0;
}
#define decal_create_simple(a, b, c) (0)
#define decal_render_all(a)
#define decal_create_sub(a) (0);
#define clear_decals(a)
#define init_decals()
#endif // ENABLE_DECALS
#endif // _DECAL_H
-1
View File
@@ -14,7 +14,6 @@
#include "ship/ship.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -8,7 +8,6 @@
#include "gamesnd/eventmusic.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -16,7 +16,6 @@
#include "parse/sexp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -15,7 +15,6 @@
#include "mission/missiongrid.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -19,7 +19,6 @@
#include "species_defs/species_defs.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -7,7 +7,6 @@
#include "ship/ship.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -26,7 +26,6 @@
#include "mission/missionparse.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -30,7 +30,6 @@
#include "localization/localize.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -23,7 +23,6 @@
#include "mission/missiongoals.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -19,7 +19,6 @@
#include "mission/missionparse.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -18,7 +18,6 @@
#include "mission/missionparse.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -22,7 +22,6 @@
#include "mission/missionparse.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -17,7 +17,6 @@
#include "localization/localize.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -20,7 +20,6 @@
#include "iff_defs/iff_defs.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -7,7 +7,6 @@
#include "ship/ship.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -20,7 +20,6 @@
#include "localization/localize.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -14,7 +14,6 @@
#include "dialog1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -27,7 +27,6 @@
#include "weapon/weapon.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+11 -9
View File
@@ -22,7 +22,6 @@
#include "localization/localize.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
@@ -82,15 +81,17 @@ void event_editor::DoDataExchange(CDataExchange* pDX)
DDX_CBString(pDX, IDC_WAVE_FILENAME, m_wave_filename);
DDX_LBIndex(pDX, IDC_MESSAGE_LIST, m_cur_msg);
// m_team == -1 maps to 2
if(m_team == -1){
m_team = 2;
m_team = MAX_TVT_TEAMS;
}
DDX_CBIndex(pDX, IDC_EVENT_TEAM, m_team);
// m_message_team == -1 maps to 2
if(m_message_team == -1){
m_message_team = 2;
m_message_team = MAX_TVT_TEAMS;
}
DDX_CBIndex(pDX, IDC_MESSAGE_TEAM, m_message_team);
//}}AFX_DATA_MAP
@@ -570,7 +571,7 @@ void event_editor::update_cur_message()
m_persona = 0;
}
if(m_messages[m_cur_msg].multi_team >= 2){
if(m_messages[m_cur_msg].multi_team >= MAX_TVT_TEAMS){
m_message_team = -1;
m_messages[m_cur_msg].multi_team = -1;
} else {
@@ -715,6 +716,7 @@ void event_editor::reset_event(int num, HTREEITEM after)
m_events[num].chain_delay = -1;
m_events[num].objective_text = NULL;
m_events[num].objective_key_text = NULL;
m_events[num].team = -1;
m_sig[num] = -1;
m_event_tree.item_index = -1;
@@ -1174,7 +1176,7 @@ int event_editor::save_message(int num)
// box list.
m_messages[num].persona_index = m_persona - 1;
if(m_message_team >= 2){
if(m_message_team >= MAX_TVT_TEAMS){
m_messages[num].multi_team = -1;
m_message_team = -1;
} else {
@@ -1409,8 +1411,8 @@ void event_editor::OnSelchangeTeam()
UpdateData(TRUE);
// team == 2, means no team
if(m_team == 2){
// If the team isn't valid mark it as such.
if((m_team >= MAX_TVT_TEAMS) || (m_team < -1) ){
m_team = -1;
}
@@ -1426,8 +1428,8 @@ void event_editor::OnSelchangeMessageTeam()
UpdateData(TRUE);
// team == 2, means no team
if(m_message_team == 2){
// If the team isn't valid mark it as such.
if((m_message_team>= MAX_TVT_TEAMS) || (m_message_team < -1) ) {
m_message_team = -1;
}
+1 -2
View File
@@ -37,7 +37,6 @@
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
@@ -127,7 +126,7 @@ BOOL CFREDApp::InitInstance()
// disable the debug memory stuff
_CrtSetDbgFlag(~(_CRTDBG_ALLOC_MEM_DF) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
// _CrtSetDbgFlag(~(_CRTDBG_ALLOC_MEM_DF) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));
// Standard initialization
// If you are not using these features and wish to reduce the size
+3 -4
View File
@@ -50,7 +50,6 @@
extern int Num_objects;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
@@ -427,7 +426,7 @@ int CFREDDoc::load_mission(char *pathname, int flags)
generate_weaponry_usage_list(i, used_pool);
for (j=0; j<Team_data[i].num_weapon_choices; j++) {
// The amount used in wings is always set by a static loadout entry so skip any that were set by Sexp variables
if ((Team_data[i].weaponry_pool_variable[j] == -1) && (Team_data[i].weaponry_amount_variable[j] == -1) ) {
if ( (!strlen(Team_data[i].weaponry_pool_variable[j])) && (!strlen(Team_data[i].weaponry_amount_variable[j])) ) {
// convert weaponry_pool to be extras available beyond the current ships weapons
Team_data[i].weaponry_count[j] -= used_pool[Team_data[i].weaponry_pool[j]];
if (Team_data[i].weaponry_count[j] < 0) {
@@ -446,8 +445,8 @@ int CFREDDoc::load_mission(char *pathname, int flags)
// add the weapon as a new entry
Team_data[i].weaponry_pool[Team_data[i].num_weapon_choices] = j;
Team_data[i].weaponry_count[Team_data[i].num_weapon_choices] = used_pool[j];
Team_data[i].weaponry_amount_variable[Team_data[i].num_weapon_choices] = -1;
Team_data[i].weaponry_pool_variable[Team_data[i].num_weapon_choices++] = -1;
strcpy_s(Team_data[i].weaponry_amount_variable[Team_data[i].num_weapon_choices], "");
strcpy_s(Team_data[i].weaponry_pool_variable[Team_data[i].num_weapon_choices++], "");
}
}
}
-1
View File
@@ -58,7 +58,6 @@ extern float flFrametime;
extern subsys_to_render Render_subsys;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -65,7 +65,6 @@
#include "gl/glu.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -18,7 +18,6 @@
#include "editor.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -16,7 +16,6 @@
#include "globalincs/linklist.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -18,7 +18,6 @@
#include "weapon/weapon.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -19,7 +19,6 @@
#include "object/objectdock.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -26,7 +26,6 @@
#include "iff_defs/iff_defs.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+4 -4
View File
@@ -999,9 +999,9 @@ void clear_mission()
for ( j = 0; j < MAX_SHIP_CLASSES; j++ ) {
if (Ship_info[j].flags & SIF_DEFAULT_PLAYER_SHIP) {
Team_data[i].ship_list[count] = j;
Team_data[i].ship_list_variables[count] = -1;
strcpy_s(Team_data[i].ship_list_variables[count], "");
Team_data[i].ship_count[count] = 5;
Team_data[i].ship_count_variables[count++] = -1;
strcpy_s(Team_data[i].ship_count_variables[count++], "");
}
}
Team_data[i].num_ship_choices = count;
@@ -1015,8 +1015,8 @@ void clear_mission()
Team_data[i].weaponry_count[count] = 500;
}
Team_data[i].weaponry_pool[count] = j;
Team_data[i].weaponry_pool_variable[count] = -1;
Team_data[i].weaponry_amount_variable[count++] = -1;
strcpy_s(Team_data[i].weaponry_pool_variable[count], "");
strcpy_s(Team_data[i].weaponry_amount_variable[count++], "");
}
}
Team_data[i].num_weapon_choices = count;
-1
View File
@@ -19,7 +19,6 @@
#include "mission/missionmessage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -25,7 +25,6 @@
#define ID_REPLACE_WINGS 15000
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -22,7 +22,6 @@
#include "mission/missionmessage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+18 -13
View File
@@ -1135,6 +1135,7 @@ int CFred_mission_save::save_variables()
int CFred_mission_save::save_players()
{
int i, j;
int var_idx;
int used_pool[MAX_WEAPON_TYPES];
// write out alternate name list
@@ -1179,20 +1180,22 @@ int CFred_mission_save::save_players()
for (j=0; j<Team_data[i].num_ship_choices; j++) {
// Check to see if a variable name should be written for the class rather than a number
if (Team_data[i].ship_list_variables[j] != -1) {
Assert (Team_data[i].ship_list_variables[j] > -1 && Team_data[i].ship_list_variables[j] < MAX_SEXP_VARIABLES);
if (strlen(Team_data[i].ship_list_variables[j])) {
var_idx = get_index_sexp_variable_name(Team_data[i].ship_list_variables[j]);
Assert (var_idx > -1 && var_idx < MAX_SEXP_VARIABLES);
fout("\t@%s\t", Sexp_variables[Team_data[i].ship_list_variables[j]].variable_name);
fout("\t@%s\t", Sexp_variables[var_idx].variable_name);
}
else {
fout("\t\"%s\"\t", Ship_info[Team_data[i].ship_list[j]].name);
}
// Now check if we should write a variable or a number for the amount of ships available
if (Team_data[i].ship_count_variables[j] != -1) {
Assert (Team_data[i].ship_count_variables[j] > -1 && Team_data[i].ship_count_variables[j] < MAX_SEXP_VARIABLES);
if (strlen(Team_data[i].ship_count_variables[j])) {
var_idx = get_index_sexp_variable_name(Team_data[i].ship_count_variables[j]);
Assert (var_idx > -1 && var_idx < MAX_SEXP_VARIABLES);
fout("@%s\n", Sexp_variables[Team_data[i].ship_count_variables[j]].variable_name);
fout("@%s\n", Sexp_variables[var_idx].variable_name);
}
else {
fout("%d\n", Team_data[i].ship_count[j]);
@@ -1211,10 +1214,11 @@ int CFred_mission_save::save_players()
generate_weaponry_usage_list(i, used_pool);
for (j=0; j<Team_data[i].num_weapon_choices; j++) {
// first output the weapon name or a variable that sets it
if (Team_data[i].weaponry_pool_variable[j] != -1) {
Assert (Team_data[i].weaponry_pool_variable[j] > -1 && Team_data[i].weaponry_pool_variable[j] < MAX_SEXP_VARIABLES);
if (strlen(Team_data[i].weaponry_pool_variable[j])) {
var_idx = get_index_sexp_variable_name(Team_data[i].weaponry_pool_variable[j]);
Assert (var_idx > -1 && var_idx < MAX_SEXP_VARIABLES);
fout("\t@%s\t", Sexp_variables[Team_data[i].weaponry_pool_variable[j]].variable_name);
fout("\t@%s\t", Sexp_variables[var_idx].variable_name);
}
else {
fout("\t\"%s\"\t", Weapon_info[Team_data[i].weaponry_pool[j]].name);
@@ -1223,13 +1227,14 @@ int CFred_mission_save::save_players()
// now output the amount of this weapon or a variable that sets it. If this weapon is in the used pool and isn't
// set by a variable we should add the amount of weapons used by the wings to it and zero the entry so we know
// that we have dealt with it
if (Team_data[i].weaponry_amount_variable[j] != -1) {
Assert (Team_data[i].weaponry_amount_variable[j] > -1 && Team_data[i].weaponry_amount_variable[j] < MAX_SEXP_VARIABLES);
if (strlen(Team_data[i].weaponry_amount_variable[j])) {
var_idx = get_index_sexp_variable_name(Team_data[i].weaponry_amount_variable[j]);
Assert (var_idx > -1 && var_idx < MAX_SEXP_VARIABLES);
fout ("@%s\n", Sexp_variables[Team_data[i].weaponry_amount_variable[j]].variable_name);
fout ("@%s\n", Sexp_variables[var_idx].variable_name);
}
else {
if (Team_data[i].weaponry_pool_variable[j] != -1) {
if (strlen(Team_data[i].weaponry_pool_variable[j])) {
fout ("%d\n", Team_data[i].weaponry_count[j]);
}
else {
-1
View File
@@ -16,7 +16,6 @@
#include "parse/sexp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -14,7 +14,6 @@
#include "OperatorArgTypeSelect.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -17,7 +17,6 @@
#include "FREDView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+46 -21
View File
@@ -19,7 +19,6 @@
#include "weapon/weapon.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
@@ -95,22 +94,32 @@ BOOL player_start_editor::OnInitDialog()
for(idx=0; idx<Team_data[i].num_ship_choices; idx++)
{
// do we have a variable for this entry? if we don't....
if (Team_data[i].ship_list_variables[idx] == -1)
if (!strlen(Team_data[i].ship_list_variables[idx]))
{
// This pool is set to hold the number of ships available at an index corresponding to the Ship_info array.
static_ship_pool[i][Team_data[i].ship_list[idx]] = Team_data[i].ship_count[idx];
// This pool is set to hold whether a ship at a Ship_info index has been set by a variable (and the
// variables index in Sexp_variables) if it has).
static_ship_variable_pool[i][Team_data[i].ship_list[idx]] = Team_data[i].ship_count_variables[idx];
if (strlen(Team_data[i].ship_count_variables[idx])) {
static_ship_variable_pool[i][Team_data[i].ship_list[idx]] = get_index_sexp_variable_name(Team_data[i].ship_count_variables[idx]);
}
else {
static_ship_variable_pool[i][Team_data[i].ship_list[idx]] = -1;
}
}
// if we do....
else
{
// This pool is set to hold the number of ships available at an index corresponding to the Sexp_variables array
dynamic_ship_pool[i][Team_data[i].ship_list_variables[idx]] = Team_data[i].ship_count[idx];
dynamic_ship_pool[i][get_index_sexp_variable_name(Team_data[i].ship_list_variables[idx])] = Team_data[i].ship_count[idx];
// This pool is set to hold whether a ship at a Ship_info index has been set by a variable (and the
// variables index in Sexp_variables) if it has).
dynamic_ship_variable_pool[i][Team_data[i].ship_list_variables[idx]] = Team_data[i].ship_count_variables[idx];
if (strlen(Team_data[i].ship_count_variables[idx])) {
dynamic_ship_variable_pool[i][get_index_sexp_variable_name(Team_data[i].ship_list_variables[idx])] = get_index_sexp_variable_name(Team_data[i].ship_count_variables[idx]);
}
else {
dynamic_ship_variable_pool[i][get_index_sexp_variable_name(Team_data[i].ship_list_variables[idx])] = -1;
}
}
}
}
@@ -125,16 +134,26 @@ BOOL player_start_editor::OnInitDialog()
for(idx=0; idx<Team_data[i].num_weapon_choices; idx++)
{
// do we have a variable for this entry?
if (Team_data[i].weaponry_pool_variable[idx] == -1)
if (!strlen(Team_data[i].weaponry_pool_variable[idx]))
{
static_weapon_pool[i][Team_data[i].weaponry_pool[idx]] = Team_data[i].weaponry_count[idx];
static_weapon_variable_pool[i][Team_data[i].weaponry_pool[idx]] = Team_data[i].weaponry_amount_variable[idx];
if (strlen(Team_data[i].weaponry_amount_variable[idx])) {
static_weapon_variable_pool[i][Team_data[i].weaponry_pool[idx]] = get_index_sexp_variable_name(Team_data[i].weaponry_amount_variable[idx]);
}
else {
static_weapon_variable_pool[i][Team_data[i].weaponry_pool[idx]] = -1;
}
}
// if we do....
else
{
dynamic_weapon_pool[i][Team_data[i].weaponry_pool_variable[idx]] = Team_data[i].weaponry_count[idx];
dynamic_weapon_variable_pool[i][Team_data[i].weaponry_pool_variable[idx]] = Team_data[i].weaponry_amount_variable[idx];
dynamic_weapon_pool[i][get_index_sexp_variable_name(Team_data[i].weaponry_pool_variable[idx])] = Team_data[i].weaponry_count[idx];
if (strlen(Team_data[i].weaponry_amount_variable[idx])) {
dynamic_weapon_variable_pool[i][get_index_sexp_variable_name(Team_data[i].weaponry_pool_variable[idx])] = get_index_sexp_variable_name(Team_data[i].weaponry_amount_variable[idx]);
}
else {
dynamic_weapon_variable_pool[i][get_index_sexp_variable_name(Team_data[i].weaponry_pool_variable[idx])] = -1;
}
}
}
}
@@ -760,18 +779,24 @@ void player_start_editor::OnOK()
// Copy the variable to Team_data
Team_data[i].ship_list_variables[num_choices] = idx;
if (idx != -1) {
Assert (idx < MAX_SEXP_VARIABLES);
strcpy_s(Team_data[i].ship_list_variables[num_choices], Sexp_variables[idx].variable_name);
}
else {
strcpy_s(Team_data[i].ship_list_variables[num_choices], "");
}
Team_data[i].ship_list[num_choices] = -1;
// Now we need to set the number of this type available
if (dynamic_ship_variable_pool[i][idx] == -1) {
Team_data[i].ship_count[num_choices] = dynamic_ship_pool[i][idx];
Team_data[i].ship_count_variables[num_choices] = -1;
strcpy_s(Team_data[i].ship_count_variables[num_choices], "");
}
else {
Assert (Sexp_variables[dynamic_ship_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER);
Team_data[i].ship_count_variables[num_choices] = dynamic_ship_variable_pool[i][idx];
strcpy_s(Team_data[i].ship_count_variables[num_choices], Sexp_variables[dynamic_ship_variable_pool[i][idx]].variable_name);
Team_data[i].ship_count[num_choices] = atoi(Sexp_variables[dynamic_ship_variable_pool[i][idx]].text);
}
@@ -785,17 +810,17 @@ void player_start_editor::OnOK()
// if we have ships here
if(static_ship_pool[i][idx] > 0 || static_ship_variable_pool[i][idx] > -1) {
Team_data[i].ship_list[num_choices] = idx;
Team_data[i].ship_list_variables[num_choices] = -1;
strcpy_s(Team_data[i].ship_list_variables[num_choices], "");
// Now set the number of this class available
if (static_ship_variable_pool[i][idx] == -1) {
Team_data[i].ship_count[num_choices] = static_ship_pool[i][idx];
Team_data[i].ship_count_variables[num_choices] = -1;
strcpy_s(Team_data[i].ship_count_variables[num_choices], "");
}
else {
Assert (Sexp_variables[static_ship_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER);
Team_data[i].ship_count_variables[num_choices] = static_ship_variable_pool[i][idx];
strcpy_s(Team_data[i].ship_count_variables[num_choices], Sexp_variables[static_ship_variable_pool[i][idx]].variable_name);
Team_data[i].ship_count[num_choices] = atoi(Sexp_variables[static_ship_variable_pool[i][idx]].text);
}
@@ -830,20 +855,20 @@ void player_start_editor::OnOK()
}
// Copy the variable to Team_data
Team_data[i].weaponry_pool_variable[num_choices] = idx;
strcpy_s(Team_data[i].weaponry_pool_variable[num_choices], Sexp_variables[idx].variable_name);
Team_data[i].weaponry_pool[num_choices] = -1;
// Now we need to set the number of this class available
if (dynamic_weapon_variable_pool[i][idx] == -1)
{
Team_data[i].weaponry_count[num_choices] = dynamic_weapon_pool[i][idx];
Team_data[i].weaponry_amount_variable[num_choices] = -1;
strcpy_s(Team_data[i].weaponry_amount_variable[num_choices], "");
}
else
{
Assert (Sexp_variables[dynamic_weapon_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER);
Team_data[i].weaponry_amount_variable[num_choices] = dynamic_weapon_variable_pool[i][idx];
strcpy_s(Team_data[i].weaponry_amount_variable[num_choices], Sexp_variables[dynamic_weapon_variable_pool[i][idx]].variable_name);
Team_data[i].weaponry_count[num_choices] = atoi(Sexp_variables[dynamic_weapon_variable_pool[i][idx]].text);
}
@@ -859,19 +884,19 @@ void player_start_editor::OnOK()
if(static_weapon_pool[i][idx] > 0 || static_weapon_variable_pool[i][idx] > -1)
{
Team_data[i].weaponry_pool[num_choices] = idx;
Team_data[i].weaponry_pool_variable[num_choices] = -1;
strcpy_s(Team_data[i].weaponry_pool_variable[num_choices], "");
// Now set the number of this class available
if (static_weapon_variable_pool[i][idx] == -1)
{
Team_data[i].weaponry_count[num_choices] = static_weapon_pool[i][idx];
Team_data[i].weaponry_amount_variable[num_choices] = -1;
strcpy_s(Team_data[i].weaponry_amount_variable[num_choices], "");
}
else
{
Assert (Sexp_variables[static_weapon_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER);
Team_data[i].weaponry_amount_variable[num_choices] = static_weapon_variable_pool[i][idx];
strcpy_s(Team_data[i].weaponry_amount_variable[num_choices], Sexp_variables[static_weapon_variable_pool[i][idx]].variable_name);
Team_data[i].weaponry_count[num_choices] = atoi(Sexp_variables[static_weapon_variable_pool[i][idx]].text);
}
-1
View File
@@ -16,7 +16,6 @@
#include "FREDView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -22,7 +22,6 @@
#define ID_WING_DATA 9000
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -13,7 +13,6 @@
#include "model/model.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -6,7 +6,6 @@
#include "SetGlobalShipFlags.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+12 -10
View File
@@ -43,6 +43,7 @@
#include "iff_defs/iff_defs.h"
#include "mission/missionmessage.h"
#include "graphics/gropenglshader.h"
#include "graphics/gropenglpostprocessing.h"
#include "sound/ds.h"
#define TREE_NODE_INCREMENT 100
@@ -56,7 +57,6 @@
// note: stay below 0xe000 so we don't collide with MFC defines..
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
@@ -5235,7 +5235,7 @@ sexp_list_item *sexp_tree::get_listing_opf_sound_environment()
sexp_list_item head;
head.add_data(SEXP_NONE_STRING);
for (int i = 0; i < EFX_presets.size(); i++) {
for (int i = 0; i < (int)EFX_presets.size(); i++) {
// ugh
char *text = const_cast<char*>(EFX_presets[i].name.c_str());
head.add_data(text);
@@ -5732,9 +5732,11 @@ sexp_list_item *sexp_tree::get_listing_opf_post_effect()
{
unsigned int i;
sexp_list_item head;
SCP_vector<opengl::post_effect> &ppe_names = opengl::post_shader::get_effects();
for (i=0; i < ppe_names.size(); i++)
head.add_data(const_cast<char*>(ppe_names[i].name.c_str()));
SCP_vector<SCP_string> ppe_names;
get_post_process_effect_names(ppe_names);
for (i=0; i < ppe_names.size(); i++) {
head.add_data(const_cast<char*>(ppe_names[i].c_str()));
}
return head.next;
}
@@ -5919,20 +5921,20 @@ int sexp_tree::get_loadout_variable_count(int var_index)
for (int i=0; i < MAX_TVT_TEAMS; i++) {
for(idx=0; idx<Team_data[i].num_ship_choices; idx++) {
if (var_index == Team_data[i].ship_list_variables[idx]) {
if (!strcmp(Team_data[i].ship_list_variables[idx], Sexp_variables[var_index].variable_name)) {
count++;
}
if (var_index == Team_data[i].ship_count_variables[idx]) {
count++;
if (!strcmp(Team_data[i].ship_count_variables[idx], Sexp_variables[var_index].variable_name)) {
count++;
}
}
for (idx=0; idx<Team_data[i].num_weapon_choices; idx++) {
if (var_index == Team_data[i].weaponry_pool_variable[idx]) {
if (!strcmp(Team_data[i].weaponry_pool_variable[idx], Sexp_variables[var_index].variable_name)) {
count++;
}
if (var_index == Team_data[i].weaponry_amount_variable[idx]) {
if (!strcmp(Team_data[i].weaponry_amount_variable[idx], Sexp_variables[var_index].variable_name)) {
count++;
}
}
-1
View File
@@ -17,7 +17,6 @@
#include "iff_defs/iff_defs.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -22,7 +22,6 @@
#define ACTIVITY_WING 2
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -14,7 +14,6 @@
#include "ShipClassEditorDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -47,7 +47,6 @@
#define NO_PERSONA_INDEX 999
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -16,7 +16,6 @@
#include "globalincs/linklist.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -28,7 +28,6 @@
#define DATA_MASK 0x0fff
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -18,7 +18,6 @@
#include "FREDDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -9,7 +9,6 @@
#include "FREDDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -8,7 +8,6 @@
#include "bmpman/bmpman.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -10,7 +10,6 @@
#include "cfile/cfile.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -16,7 +16,6 @@
#include "FREDDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -16,7 +16,6 @@
#include "cfile/cfile.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -17,7 +17,6 @@
#include <math.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -27,7 +27,6 @@
#define ID_WAYPOINT_MENU 9000
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -20,7 +20,6 @@
#define BLANK_FIELD -99
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -30,7 +30,6 @@
#define MULTI_WING 999999
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-1
View File
@@ -27,7 +27,6 @@
#define ID_WING_MENU 9000
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
+34 -72
View File
@@ -308,10 +308,6 @@ char Game_current_mission_filename[MAX_FILENAME_LEN];
int game_single_step = 0;
int last_single_step=0;
extern int MSG_WINDOW_X_START; // used to position mission_time and shields output
extern int MSG_WINDOW_Y_START;
extern int MSG_WINDOW_HEIGHT;
int game_zbuffer = 1;
//static int Game_music_paused;
static int Game_paused;
@@ -994,6 +990,7 @@ void game_level_close()
cam_close();
subtitles_close();
trail_level_close();
hud_level_close();
// be sure to not only reset the time but the lock as well
set_time_compression(1.0f, 0.0f);
@@ -1088,7 +1085,6 @@ void game_level_init(int seed)
mission_brief_common_init(); // Free all existing briefing/debriefing text
weapon_level_init();
init_decals();
NavSystem_Init(); // zero out the nav system
@@ -1103,9 +1099,6 @@ void game_level_init(int seed)
// cmeasure_init(); //WMC - cmeasures are now weapons
shield_hit_init(); // Initialize system for showing shield hits
if ( !Is_standalone )
radar_mission_init();
mission_init_goals();
mission_log_init();
messages_init();
@@ -1546,11 +1539,7 @@ int game_start_mission()
mprintf(( "=================== STARTING LEVEL LOAD ==================\n" ));
// clear post processing settings
if(!Is_standalone)
gr_screen.gf_set_default_post_process();
// clear shader manager cache
gr_clear_shaders_cache();
gr_post_process_set_defaults();
get_mission_info(Game_current_mission_filename, &The_mission, false);
@@ -2144,9 +2133,6 @@ void game_init()
bm_set_low_mem(0); // Use all frames of bitmaps
}
if(!Is_standalone)
gr_screen.gf_post_process_init();
//WMC - Initialize my new GUI system
//This may seem scary, but it should take up 0 processing time and very little memory
//as long as it's not being used.
@@ -2184,8 +2170,6 @@ void game_init()
mouse_init();
gamesnd_parse_soundstbl();
select_radar_mode(Cmdline_orb_radar);
gameseq_init();
multi_init();
@@ -3847,7 +3831,7 @@ void game_render_frame( camid cid )
}
gr_zbuffer_clear(TRUE);
gr_screen.gf_post_process_before();
gr_post_process_begin();
clip_frame_view();
@@ -3900,7 +3884,7 @@ void game_render_frame( camid cid )
//This is so we can change the minimum clipping distance without messing everything up.
if(draw_viewer_last && Viewer_obj)
{
gr_screen.gf_save_zbuffer();
gr_post_process_save_zbuffer();
gr_zbuffer_clear(TRUE);
ship_render(Viewer_obj);
}
@@ -3928,13 +3912,13 @@ void game_render_frame( camid cid )
//Draw viewer cockpit
if(Viewer_obj != NULL && Viewer_mode != VM_TOPDOWN)
{
gr_screen.gf_save_zbuffer();
gr_post_process_save_zbuffer();
gr_zbuffer_clear(TRUE);
ship_render_cockpit(Viewer_obj);
}
//================ END OF 3D RENDERING STUFF ====================
gr_screen.gf_post_process_after();
gr_post_process_end();
extern int Multi_display_netinfo;
if(Multi_display_netinfo){
@@ -4272,7 +4256,7 @@ void game_simulation_frame()
// process some stuff every frame (before frame is rendered)
emp_process_local();
hud_update_frame(); // update hud systems
hud_update_frame(flFrametime); // update hud systems
if (!physics_paused) {
// Move particle system
@@ -4403,34 +4387,24 @@ int game_actually_playing()
return 1;
}
// Draw the 2D HUD gauges
void game_render_hud_2d()
void game_render_hud(camid cid)
{
if ( !(Game_detail_flags & DETAIL_FLAG_HUD) ) {
return;
}
HUD_render_2d(flFrametime);
gr_reset_clip();
}
// Draw the 3D-dependant HUD gauges
void game_render_hud_3d(camid cid)
{
if(!cid.isValid())
return;
if(cid.isValid()) {
g3_start_frame(0); // 0 = turn zbuffering off
g3_set_view( cid.getCamera() );
g3_start_frame(0); // 0 = turn zbuffering off
g3_set_view( cid.getCamera() );
hud_render_preprocess(flFrametime);
if ( (Game_detail_flags & DETAIL_FLAG_HUD) && (supernova_active() < 3)/* && !(Game_mode & GM_MULTIPLAYER) || ( (Game_mode & GM_MULTIPLAYER) && !(Net_player->flags & NETINFO_FLAG_OBSERVER) )*/ ) {
HUD_render_3d(flFrametime);
g3_end_frame();
}
// main HUD rendering function
hud_render_all();
// Diminish the palette effect
game_flash_diminish(flFrametime);
g3_end_frame();
}
//100% blackness
@@ -4712,22 +4686,23 @@ void game_frame(int paused)
Scripting_didnt_draw_hud = 0;
Script_system.RemHookVar("Self");
if(Scripting_didnt_draw_hud)
{
hud_show_target_model();
}
if(Scripting_didnt_draw_hud)
{
hud_show_radar();
if(Scripting_didnt_draw_hud) {
game_render_hud(cid);
}
HUD_reset_clip();
if( (Game_detail_flags & DETAIL_FLAG_HUD) && (!(Game_mode & GM_MULTIPLAYER) || ((Game_mode & GM_MULTIPLAYER) && !(Net_player->flags & NETINFO_FLAG_OBSERVER))) ) {
hud_maybe_clear_head_area();
anim_render_all(0, flFrametime);
}
Script_system.SetHookObject("Self", Viewer_obj);
if (!hud_disabled_except_messages() && !(Viewer_mode & (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY)))
{
Script_system.RunBytecode(Script_hudhook);
Script_system.RunCondition(CHA_HUDDRAW, '\0', NULL, Viewer_obj);
}
Script_system.RemHookVar("Self");
// check to see if we should display the death died popup
if(Game_mode & GM_DEAD_BLEW_UP){
if(Game_mode & GM_MULTIPLAYER){
@@ -4757,26 +4732,6 @@ void game_frame(int paused)
game_show_time_left();
// Draw the 2D HUD gauges
if(Scripting_didnt_draw_hud)
{
if(supernova_active() < 3){
game_render_hud_2d();
}
// Draw 3D HUD gauges
game_render_hud_3d(cid);
}
Script_system.SetHookObject("Self", Viewer_obj);
if (!hud_disabled_except_messages() && !(Viewer_mode & (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY)))
{
Script_system.RunBytecode(Script_hudhook);
Script_system.RunCondition(CHA_HUDDRAW, '\0', NULL, Viewer_obj);
}
Script_system.RemHookVar("Self");
gr_reset_clip();
game_render_post_frame();
@@ -6520,6 +6475,12 @@ void game_enter_state( int old_state, int new_state )
}
player_restore_target_and_weapon_link_prefs();
if ( !Is_standalone )
radar_mission_init();
//Set the current hud
set_current_hud();
Game_mode |= GM_IN_MISSION;
#ifndef NDEBUG
@@ -7696,6 +7657,7 @@ void game_shutdown(void)
// load up common multiplayer icons
multi_unload_common_icons();
hud_close();
shockwave_close(); // release any memory used by shockwave system
fireball_close(); // free fireball system
particle_close(); // close out the particle system
-2
View File
@@ -19,7 +19,6 @@ extern void debris_page_in();
extern void particle_page_in();
extern void stars_page_in();
extern void hud_page_in();
extern void (*radar_page_in)();
extern void weapons_page_in();
extern void fireballs_page_in();
extern void shockwave_page_in();
@@ -54,7 +53,6 @@ void level_page_in()
particle_page_in();
debris_page_in();
hud_page_in();
radar_page_in();
training_mission_page_in();
stars_page_in();
shockwave_page_in();
+1 -1
View File
@@ -66,7 +66,7 @@ typedef struct menu_music {
char filename[MAX_FILENAME_LEN]; // name music is stored on disk as
} menu_music;
#define MAX_SPOOLED_MUSIC 30 // max number of briefing/mainhall/credits tracks
#define MAX_SPOOLED_MUSIC 50 // max number of briefing/mainhall/credits tracks
// Goober5000 - spooled music flags
#define SMF_VALID (1 << 0)
+57
View File
@@ -0,0 +1,57 @@
#include "globalincs/pstypes.h"
// throw
void * operator new (size_t size) throw (std::bad_alloc)
{
void *p = vm_malloc_q(size);
if ( !p ) {
throw std::bad_alloc();
}
return p;
}
void operator delete (void *p) throw()
{
vm_free(p);
}
void * operator new [] (size_t size) throw (std::bad_alloc)
{
void *p = vm_malloc_q(size);
if ( !p ) {
throw std::bad_alloc();
}
return p;
}
void operator delete [] (void *p) throw()
{
vm_free(p);
}
// no-throw
void * operator new (size_t size, const std::nothrow_t&) throw()
{
return vm_malloc_q(size);
}
void operator delete (void *p, const std::nothrow_t&) throw()
{
vm_free(p);
}
void * operator new [] (size_t size, const std::nothrow_t&) throw()
{
return vm_malloc_q(size);
}
void operator delete [] (void *p, const std::nothrow_t&) throw()
{
vm_free(p);
}
+25
View File
@@ -0,0 +1,25 @@
#ifndef _FSMEMORY_H
#define _FSMEMORY_H
#include <new>
// throw
extern void * operator new (size_t size) throw (std::bad_alloc);
extern void operator delete (void *p) throw();
extern void * operator new [] (size_t size) throw (std::bad_alloc);
extern void operator delete [] (void *p) throw();
// no-throw
extern void * operator new (size_t size, const std::nothrow_t&) throw();
extern void operator delete (void *p, const std::nothrow_t&) throw();
extern void * operator new [] (size_t size, const std::nothrow_t&) throw();
extern void operator delete [] (void *p, const std::nothrow_t&) throw();
#endif // _FSMEMORY_H
+32 -3
View File
@@ -104,8 +104,15 @@ typedef struct vec3d {
};
inline void operator= (vertex&vert);
inline void set_screen_vert(vertex&vert);
bool operator == (const vec3d &other);
} vec3d;
inline bool vec3d::operator == (const vec3d &other)
{
return ( (a1d[0] == other.a1d[0]) && (a1d[1] == other.a1d[1]) && (a1d[2] == other.a1d[2]) );
}
/*
// A vector referenced as an array
typedef struct vectora {
@@ -147,18 +154,28 @@ typedef struct uv_pair {
typedef struct vertex {
float x, y, z; // world space position
float sx, sy, sw; // screen space position (sw == 1/z)
float u, v, u2, v2, u3, v3, u4, v4; // texture position
vec3d real_pos; // _real_ world position
ubyte spec_a, spec_r, spec_b, spec_g; //specular highlights -Bobboau
float u, v; // texture position
// float u2, v2, u3, v3, u4, v4; // texture position
// vec3d real_pos; // _real_ world position
ubyte r, g, b, a; // color. Use b for darkening;
ubyte spec_r, spec_g, spec_b, spec_a; //specular highlights -Bobboau
ubyte codes; // what sides of view pyramid this point is on/off. 0 = Inside view pyramid.
ubyte flags; // Projection flags. Indicates whether it is projected or not or if projection overflowed.
ubyte pad[2]; // pad structure to be 4 byte aligned.
void operator=(vec3d&vec){
memcpy(&x,&vec, sizeof(vec3d));
}
bool operator == (const vertex &other);
} vertex;
inline bool vertex::operator == (const vertex &other)
{
// NOTE: this is checking position and uv only!
return ( (x == other.x) && (y == other.y) && (z == other.z)
&& (u == other.u) && (v == other.v) );
}
inline void vec3d::operator= (vertex&vert){
memcpy(this,&vert.x,sizeof(vec3d));
}
@@ -244,6 +261,16 @@ extern int Global_error_count;
// Goober5000 - define Verify for use in both release and debug mode
#define Verify(x) do { if (!(x)){ Error(LOCATION, "Verify failure: %s\n", #x); } ASSUME(x); } while(0)
// VerifyEx
#ifndef _MSC_VER // non MS compilers
# define VerifyEx(x, y, ...) do { if (!(x)) { Error(LOCATION, "Verify failure: %s with help text " #y "\n", #x, ##__VA_ARGS__); } ASSUME(x); } while(0)
#else
# if _MSC_VER >= 1400 // VC 2005 or greater
# define VerifyEx(x, y, ...) do { if (!(x)) { Error(LOCATION, "Verify failure: %s with help text " #y "\n", #x, __VA_ARGS__); } ASSUME(x); } while(0)
# else // everything else
# define VerifyEx(x, y) Verify(x)
# endif
#endif
//#define Int3() _asm { int 3 }
@@ -667,6 +694,8 @@ void vm_free_all();
#endif
#include "globalincs/fsmemory.h"
//=========================================================
// Scripting
//=========================================================
+1
View File
@@ -72,6 +72,7 @@ bool Normalmap_override = false;
bool Heightmap_override = false;
bool Glowpoint_override = false;
bool GLSL_override = false;
bool PostProcessing_override = false;
// Values used for noise for thruster animations
float Noise[NOISE_NUM_FRAMES] = {
+1
View File
@@ -138,6 +138,7 @@ extern bool Normalmap_override;
extern bool Heightmap_override;
extern bool Glowpoint_override;
extern bool GLSL_override;
extern bool PostProcessing_override;
// game skill levels
#define NUM_SKILL_LEVELS 5
+154 -62
View File
@@ -85,6 +85,26 @@ float Max_draw_distance = Default_max_draw_distance;
static float Gr_resize_X = 1.0f, Gr_resize_Y = 1.0f;
static float Gr_unsize_X = 1.0f, Gr_unsize_Y = 1.0f;
float Gr_save_resize_X = 1.0f, Gr_save_resize_Y = 1.0f;
float Gr_save_unsize_X = 1.0f, Gr_save_unsize_Y = 1.0f;
void gr_set_screen_scale(int w, int h)
{
Gr_resize_X = (float)gr_screen.max_w / (float)w;
Gr_resize_Y = (float)gr_screen.max_h / (float)h;
Gr_unsize_X = (float)w / (float)gr_screen.max_w;
Gr_unsize_Y = (float)h / (float)gr_screen.max_h;
}
void gr_reset_screen_scale()
{
Gr_resize_X = Gr_save_resize_X;
Gr_resize_Y = Gr_save_resize_Y;
Gr_unsize_X = Gr_save_unsize_X;
Gr_unsize_Y = Gr_save_unsize_Y;
}
/**
* This function is to be called if you wish to scale GR_1024 or GR_640 x and y positions or
@@ -390,11 +410,11 @@ static bool gr_init_sub(int mode, int width, int height, int depth)
mode = GR_OPENGL;
}
Gr_resize_X = (float)width / ((res == GR_1024) ? 1024.0f : 640.0f);
Gr_resize_Y = (float)height / ((res == GR_1024) ? 768.0f : 480.0f);
Gr_save_resize_X = Gr_resize_X = (float)width / ((res == GR_1024) ? 1024.0f : 640.0f);
Gr_save_resize_Y = Gr_resize_Y = (float)height / ((res == GR_1024) ? 768.0f : 480.0f);
Gr_unsize_X = ((res == GR_1024) ? 1024.0f : 640.0f) / (float)width;
Gr_unsize_Y = ((res == GR_1024) ? 768.0f : 480.0f) / (float)height;
Gr_save_unsize_X = Gr_unsize_X = ((res == GR_1024) ? 1024.0f : 640.0f) / (float)width;
Gr_save_unsize_Y = Gr_unsize_Y = ((res == GR_1024) ? 768.0f : 480.0f) / (float)height;
gr_screen.signature = Gr_signature++;
@@ -829,6 +849,7 @@ void gr_bitmap(int _x, int _y, bool allow_scaling)
{
int _w, _h;
float x, y, w, h;
vertex verts[4];
if (gr_screen.mode == GR_STUB) {
return;
@@ -847,8 +868,86 @@ void gr_bitmap(int _x, int _y, bool allow_scaling)
gr_resize_screen_posf(&w, &h);
}
// RT draws all hall interface stuff
g3_draw_2d_poly_bitmap(x, y, w, h, TMAP_FLAG_INTERFACE);
memset(verts, 0, sizeof(verts));
verts[0].sx = x;
verts[0].sy = y;
verts[0].u = 0.0f;
verts[0].v = 0.0f;
verts[1].sx = x + w;
verts[1].sy = y;
verts[1].u = 1.0f;
verts[1].v = 0.0f;
verts[2].sx = x + w;
verts[2].sy = y + h;
verts[2].u = 1.0f;
verts[2].v = 1.0f;
verts[3].sx = x;
verts[3].sy = y + h;
verts[3].u = 0.0f;
verts[3].v = 1.0f;
// turn off zbuffering
int saved_zbuffer_mode = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_NONE);
gr_render(4, verts, TMAP_FLAG_TEXTURED | TMAP_FLAG_INTERFACE);
gr_zbuffer_set(saved_zbuffer_mode);
}
void gr_bitmap_uv(int _x, int _y, int _w, int _h, float _u0, float _v0, float _u1, float _v1, bool allow_scaling)
{
float x, y, w, h;
vertex verts[4];
if (gr_screen.mode == GR_STUB) {
return;
}
x = i2fl(_x);
y = i2fl(_y);
w = i2fl(_w);
h = i2fl(_h);
// I will tidy this up later - RT
if ( allow_scaling && (gr_screen.custom_size || (gr_screen.rendering_to_texture != -1)) ) {
gr_resize_screen_posf(&x, &y);
gr_resize_screen_posf(&w, &h);
}
memset(verts, 0, sizeof(verts));
verts[0].sx = x;
verts[0].sy = y;
verts[0].u = _u0;
verts[0].v = _v0;
verts[1].sx = x + w;
verts[1].sy = y;
verts[1].u = _u1;
verts[1].v = _v0;
verts[2].sx = x + w;
verts[2].sy = y + h;
verts[2].u = _u1;
verts[2].v = _v1;
verts[3].sx = x;
verts[3].sy = y + h;
verts[3].u = _u0;
verts[3].v = _v1;
// turn off zbuffering
int saved_zbuffer_mode = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_NONE);
gr_render(4, verts, TMAP_FLAG_TEXTURED | TMAP_FLAG_INTERFACE);
gr_zbuffer_set(saved_zbuffer_mode);
}
// NEW new bitmap functions -Bobboau
@@ -1076,66 +1175,47 @@ void gr_pline_special(vec3d **pts, int num_pts, int thickness,bool resize)
gr_set_cull(cull);
}
inline bool same_vert(vertex *v1, vertex *v2, vec3d *n1, vec3d *n2)
int poly_list::find_first_vertex(int idx)
{
return (
(v1->x == v2->x) &&
(v1->y == v2->y) &&
(v1->z == v2->z) &&
(v1->u == v2->u) &&
(v1->v == v2->v) &&
(n1->xyz.x == n2->xyz.x) &&
(n1->xyz.y == n2->xyz.y) &&
(n1->xyz.z == n2->xyz.z)
);
}
//finds the first occorence of a vertex within a poly list
int find_first_index(poly_list *plist, int idx)
{
vec3d *p_norm = &plist->norm[0];
vertex *p_vert = &plist->vert[0];
vec3d *norm = &plist->norm[idx];
vertex *vert = &plist->vert[idx];
int i;
vec3d *o_norm = &norm[idx];
vertex *o_vert = &vert[idx];
vec3d *p_norm = &norm[0];
vertex *p_vert = &vert[0];
// we should always equal ourselves, so just use that as the stopping point
for (i = 0; i < idx; i++) {
if ( same_vert(p_vert, vert, p_norm, norm) ) {
for (int i = 0; i < idx; i++) {
if ( (*p_norm == *o_norm) && (*p_vert == *o_vert) ) {
return i;
}
p_norm++;
p_vert++;
++p_norm;
++p_vert;
}
return idx;
}
//given a list (plist) and an indexed list (v) find the index within the indexed list that the vert at position idx within list is at
int find_first_index_vb(poly_list *plist, int idx, poly_list *v)
//given a list (plist) find the index within the indexed list that the vert at position idx within list is at
int poly_list::find_index(poly_list *plist, int idx)
{
vec3d *p_norm = &plist->norm[idx];
vertex *p_vert = &plist->vert[idx];
vec3d *norm = &v->norm[0];
vertex *vert = &v->vert[0];
int i;
vec3d *o_norm = &plist->norm[idx];
vertex *o_vert = &plist->vert[idx];
vec3d *p_norm = &norm[0];
vertex *p_vert = &vert[0];
for (i = 0; i < v->n_verts; i++) {
if ( same_vert(vert, p_vert, norm, p_norm) ) {
for (int i = 0; i < n_verts; i++) {
if ( (*p_norm == *o_norm) && (*p_vert == *o_vert) ) {
return i;
}
vert++;
norm++;
++p_vert;
++p_norm;
}
return -1;
}
void poly_list::allocate(int _verts)
{
if (_verts <= currently_allocated)
@@ -1163,11 +1243,9 @@ void poly_list::allocate(int _verts)
if (Cmdline_normal) {
tsb = (tsb_t*)vm_malloc(sizeof(tsb_t) * _verts);
}
}
n_verts = 0;
n_prim = 0;
currently_allocated = _verts;
}
@@ -1199,6 +1277,9 @@ void poly_list::calculate_tangent()
vec3d tangent, binormal, cross;
float magg, scale;
if ( !Cmdline_normal ) {
return;
}
Assert( !(n_verts % 3) );
@@ -1278,17 +1359,16 @@ void poly_list::calculate_tangent()
}
}
poly_list poly_list_index_buffer_internal_list;
static poly_list buffer_list_internal;
void poly_list::make_index_buffer()
void poly_list::make_index_buffer(SCP_vector<int> &vertex_list)
{
int nverts = 0;
int j, z = 0;
ubyte *nverts_good = NULL;
if (Cmdline_normal) {
calculate_tangent();
}
// calculate tangent space data (must be done early)
calculate_tangent();
// using vm_malloc() here rather than 'new' so we get the extra out-of-memory check
nverts_good = (ubyte *) vm_malloc(n_verts);
@@ -1296,41 +1376,54 @@ void poly_list::make_index_buffer()
Assert( nverts_good != NULL );
memset( nverts_good, 0, n_verts );
vertex_list.reserve(n_verts);
for (j = 0; j < n_verts; j++) {
if ( (find_first_index(this, j)) == j ) {
if (find_first_vertex(j) == j) {
nverts++;
nverts_good[j] = 1;
vertex_list.push_back(j);
}
}
poly_list_index_buffer_internal_list.n_verts = 0;
poly_list_index_buffer_internal_list.allocate(nverts);
// if there is nothig to change then bail
if (n_verts == nverts) {
if (nverts_good != NULL) {
vm_free(nverts_good);
}
return;
}
buffer_list_internal.n_verts = 0;
buffer_list_internal.allocate(nverts);
for (j = 0; j < n_verts; j++) {
if ( !nverts_good[j] ) {
continue;
}
poly_list_index_buffer_internal_list.vert[z] = vert[j];
poly_list_index_buffer_internal_list.norm[z] = norm[j];
buffer_list_internal.vert[z] = vert[j];
buffer_list_internal.norm[z] = norm[j];
if (Cmdline_normal) {
poly_list_index_buffer_internal_list.tsb[z] = tsb[j];
buffer_list_internal.tsb[z] = tsb[j];
}
poly_list_index_buffer_internal_list.n_verts++;
buffer_list_internal.n_verts++;
// Assert( find_first_index(&poly_list_index_buffer_internal_list, z) == z );
// Assert( find_first_index(&buffer_list_internal, z) == z );
z++;
}
Assert(nverts == poly_list_index_buffer_internal_list.n_verts);
Assert(nverts == buffer_list_internal.n_verts);
if (nverts_good != NULL) {
vm_free(nverts_good);
}
(*this) = poly_list_index_buffer_internal_list;
(*this) = buffer_list_internal;
}
poly_list& poly_list::operator = (poly_list &other_list)
@@ -1345,7 +1438,6 @@ poly_list& poly_list::operator = (poly_list &other_list)
}
n_verts = other_list.n_verts;
n_prim = other_list.n_prim;
return *this;
}
+106 -33
View File
@@ -105,21 +105,23 @@ typedef struct tsb_t {
// this should be basicly just like it is in the VB
// a list of triangles and their associated normals
struct poly_list {
poly_list(): n_prim(0), n_verts(0), vert(NULL), norm(NULL), tsb(NULL), currently_allocated(0) {}
poly_list(): n_verts(0), vert(NULL), norm(NULL), tsb(NULL), currently_allocated(0) {}
~poly_list();
poly_list& operator = (poly_list&);
void allocate(int size);
void make_index_buffer();
void make_index_buffer(SCP_vector<int> &vertex_list);
void calculate_tangent();
int n_prim;
int n_verts;
vertex *vert;
vec3d *norm;
tsb_t *tsb;
int find_index(poly_list *plist, int idx);
private:
int currently_allocated;
int find_first_vertex(int idx);
};
@@ -130,20 +132,75 @@ struct colored_vector {
ubyte color[4];
};
bool same_vert(vertex *v1, vertex *v2, vec3d *n1, vec3d *n2);
//finds the first occorence of a vertex within a poly list
int find_first_index(poly_list *plist, int idx);
//given a list (plist) and an indexed list (v) find the index within the indexed list that the vert at position idx within list is at
int find_first_index_vb(poly_list *plist, int idx, poly_list *v);
struct line_list {
int n_line;
vertex *vert;
};
struct buffer_data {
int flags;
int texture; // this is the texture the vertex buffer will use
int n_verts;
size_t index_offset;
uint *index;
void release()
{
if (index) {
delete [] index;
index = NULL;
}
}
buffer_data() :
flags(0), texture(-1), n_verts(0), index_offset(0), index(NULL)
{
}
};
struct vertex_buffer {
int flags;
uint stride;
size_t vertex_offset;
poly_list *model_list;
SCP_vector<buffer_data> tex_buf;
vertex_buffer() :
flags(0), stride(0), vertex_offset(0), model_list(NULL)
{
}
~vertex_buffer()
{
clear();
}
void release()
{
if (model_list) {
delete model_list;
model_list = NULL;
}
for (size_t i = 0; i < tex_buf.size(); i++) {
tex_buf[i].release();
}
}
void clear()
{
release();
tex_buf.clear();
}
};
struct light;
@@ -296,6 +353,9 @@ typedef struct screen {
// Texture maps the current bitmap. See TMAP_FLAG_?? defines for flag values
void (*gf_tmapper)(int nv, vertex *verts[], uint flags );
// Texture maps the current bitmap. See TMAP_FLAG_?? defines for flag values
void (*gf_render)(int nv, vertex *verts, uint flags);
// dumps the current screen to a file
void (*gf_print_screen)(char * filename);
@@ -379,10 +439,13 @@ typedef struct screen {
void (*gf_set_texture_addressing)(int);
int (*gf_make_buffer)(poly_list*, uint flags);
int (*gf_create_buffer)();
bool (*gf_pack_buffer)(const int buffer_id, vertex_buffer *vb);
bool (*gf_config_buffer)(const int buffer_id, vertex_buffer *vb);
void (*gf_destroy_buffer)(int);
void (*gf_set_buffer)(int);
void (*gf_render_buffer)(int, int, ushort*, uint*, int);
void (*gf_render_buffer)(int, const vertex_buffer*, int, int);
int (*gf_make_flat_buffer)(poly_list*);
int (*gf_make_line_buffer)(line_list*);
@@ -409,13 +472,12 @@ typedef struct screen {
void (*gf_set_ambient_light)(int,int,int);
// postprocessing effects
void (*gf_set_post_effect)(SCP_string&, int);
void (*gf_set_default_post_process)();
void (*gf_post_process_set_effect)(const char*, int);
void (*gf_post_process_set_defaults)();
void (*gf_post_process_init)();
void (*gf_post_process_before)();
void (*gf_post_process_after)();
void (*gf_save_zbuffer)();
void (*gf_post_process_begin)();
void (*gf_post_process_end)();
void (*gf_post_process_save_zbuffer)();
void (*gf_lighting)(bool,bool);
void (*gf_center_alpha)(int);
@@ -478,6 +540,8 @@ extern screen gr_screen;
#define GR_ZBUFF_READ (1<<1)
#define GR_ZBUFF_FULL (GR_ZBUFF_WRITE|GR_ZBUFF_READ)
void gr_set_screen_scale(int x, int y);
void gr_reset_screen_scale();
bool gr_unsize_screen_pos(int *x, int *y);
bool gr_resize_screen_pos(int *x, int *y);
bool gr_unsize_screen_posf(float *x, float *y);
@@ -598,6 +662,7 @@ __inline void gr_pixel(int x, int y, bool resize = true)
#define gr_scaler GR_CALL(gr_screen.gf_scaler)
#define gr_aascaler GR_CALL(gr_screen.gf_aascaler)
#define gr_tmapper GR_CALL(gr_screen.gf_tmapper)
#define gr_render GR_CALL(gr_screen.gf_render)
//#define gr_gradient GR_CALL(gr_screen.gf_gradient)
__inline void gr_gradient(int x1, int y1, int x2, int y2, bool resize = true)
@@ -672,11 +737,13 @@ __inline int gr_bm_set_render_target(int n, int face = -1)
#define gr_set_texture_addressing GR_CALL(*gr_screen.gf_set_texture_addressing)
#define gr_make_buffer GR_CALL(*gr_screen.gf_make_buffer)
#define gr_create_buffer GR_CALL(*gr_screen.gf_create_buffer)
#define gr_pack_buffer GR_CALL(*gr_screen.gf_pack_buffer)
#define gr_config_buffer GR_CALL(*gr_screen.gf_config_buffer)
#define gr_destroy_buffer GR_CALL(*gr_screen.gf_destroy_buffer)
__inline void gr_render_buffer(int start, int n_prim, ushort *sbuffer, uint *ibuffer = NULL, int flags = TMAP_FLAG_TEXTURED)
__inline void gr_render_buffer(int start, const vertex_buffer *bufferp, int texi, int flags = TMAP_FLAG_TEXTURED)
{
(*gr_screen.gf_render_buffer)(start, n_prim, sbuffer, ibuffer, flags);
(*gr_screen.gf_render_buffer)(start, bufferp, texi, flags);
}
#define gr_set_buffer GR_CALL(*gr_screen.gf_set_buffer)
@@ -701,7 +768,11 @@ __inline void gr_render_buffer(int start, int n_prim, ushort *sbuffer, uint *ibu
#define gr_reset_lighting GR_CALL(*gr_screen.gf_reset_lighting)
#define gr_set_ambient_light GR_CALL(*gr_screen.gf_set_ambient_light)
#define gr_set_post_effect GR_CALL(*gr_screen.gf_set_post_effect)
#define gr_post_process_set_effect GR_CALL(*gr_screen.gf_post_process_set_effect)
#define gr_post_process_set_defaults GR_CALL(*gr_screen.gf_post_process_set_defaults)
#define gr_post_process_begin GR_CALL(*gr_screen.gf_post_process_begin)
#define gr_post_process_end GR_CALL(*gr_screen.gf_post_process_end)
#define gr_post_process_save_zbuffer GR_CALL(*gr_screen.gf_post_process_save_zbuffer)
#define gr_set_lighting GR_CALL(*gr_screen.gf_lighting)
#define gr_center_alpha GR_CALL(*gr_screen.gf_center_alpha)
@@ -748,6 +819,7 @@ void gr_set_shader(shader *shade);
// new bitmap functions
void gr_bitmap(int x, int y, bool resize = true);
void gr_bitmap_uv(int _x, int _y, int _w, int _h, float _u0, float _v0, float _u1, float _v1, bool resize = true);
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);
@@ -756,16 +828,17 @@ void gr_bitmap_list(bitmap_rect_list* list, int n_bm, bool allow_scaling);
// Moreover, it is _really_ intended for use with 45 degree angles.
void gr_pline_special(vec3d **pts, int num_pts, int thickness,bool resize=true);
#define VERTEX_FLAG_POSITION (1<<0)
#define VERTEX_FLAG_RHW (1<<1) //incompatable with the next normal
#define VERTEX_FLAG_NORMAL (1<<2)
#define VERTEX_FLAG_DIFUSE (1<<3)
#define VERTEX_FLAG_SPECULAR (1<<4)
#define VERTEX_FLAG_UV1 (1<<5) //how many UV coords, only use one of these
#define VERTEX_FLAG_UV2 (1<<6)
#define VERTEX_FLAG_UV3 (1<<7)
#define VERTEX_FLAG_UV4 (1<<8)
#define VERTEX_FLAG_TANGENT (1<<9)
#define VB_FLAG_POSITION (1<<0)
#define VB_FLAG_RHW (1<<1) //incompatable with the next normal
#define VB_FLAG_NORMAL (1<<2)
#define VB_FLAG_DIFUSE (1<<3)
#define VB_FLAG_SPECULAR (1<<4)
#define VB_FLAG_UV1 (1<<5) //how many UV coords, only use one of these
#define VB_FLAG_UV2 (1<<6)
#define VB_FLAG_UV3 (1<<7)
#define VB_FLAG_UV4 (1<<8)
#define VB_FLAG_TANGENT (1<<9)
#define VB_FLAG_LARGE_INDEX (1<<10)
void gr_clear_shaders_cache();
+3 -3
View File
@@ -656,9 +656,9 @@ int gr_create_font(char * typeface)
int i,x,y;
x = y = 0;
for (i=0; i<fnt->num_chars; i++ ) {
ubyte * fp;
ubyte * ubp;
int x1, y1;
fp = &fnt->pixel_data[fnt->char_data[i].offset];
ubp = &fnt->pixel_data[fnt->char_data[i].offset];
if ( x + fnt->char_data[i].byte_width >= fnt->bm_w ) {
x = 0;
y += fnt->h;
@@ -671,7 +671,7 @@ int gr_create_font(char * typeface)
for( y1=0; y1<fnt->h; y1++ ) {
for (x1=0; x1<fnt->char_data[i].byte_width; x1++ ) {
uint c = *fp++;
uint c = *ubp++;
if ( c > 14 ) c = 14;
fnt->bm_data[(x+x1)+(y+y1)*fnt->bm_w] = (unsigned char)(c);
}
+3 -32
View File
@@ -19,11 +19,6 @@ geometry_batcher::~geometry_batcher()
vm_free(vert);
vert = NULL;
}
if (vert_list != NULL) {
vm_free(vert_list);
vert_list = NULL;
}
}
void geometry_batcher::allocate_internal(int n_verts)
@@ -37,18 +32,9 @@ void geometry_batcher::allocate_internal(int n_verts)
vert = NULL;
}
if (vert_list != NULL) {
vm_free(vert_list);
vert_list = NULL;
}
vert = (vertex *) vm_malloc( sizeof(vertex) * n_verts );
vert_list = (vertex **) vm_malloc( sizeof(vertex*) * n_verts );
Verify( (vert != NULL) && (vert_list != NULL) );
for (int i = 0; i < n_verts; i++)
vert_list[i] = &vert[i];
Verify( (vert != NULL) );
memset( vert, 0, sizeof(vertex) * n_verts );
n_allocated = n_verts;
@@ -91,18 +77,9 @@ void geometry_batcher::add_allocate(int quad, int n_tri)
vertex *old_vert = vert;
if (to_alloc > n_allocated) {
if (vert_list != NULL) {
vm_free(vert_list);
vert_list = NULL;
}
vert = (vertex *) vm_malloc( sizeof(vertex) * to_alloc );
vert_list = (vertex **) vm_malloc( sizeof(vertex*) * to_alloc );
Verify( (vert != NULL) && (vert_list != NULL) );
for (int i = 0; i < to_alloc; i++)
vert_list[i] = &vert[i];
Verify( (vert != NULL) );
memset( vert, 0, sizeof(vertex) * to_alloc );
@@ -122,16 +99,10 @@ void geometry_batcher::clone(const geometry_batcher &geo)
if (n_allocated > 0) {
vert = (vertex *) vm_malloc( sizeof(vertex) * n_allocated );
vert_list = (vertex **) vm_malloc( sizeof(vertex*) * n_allocated );
memcpy( vert, geo.vert, sizeof(vertex) * n_allocated );
for (int i = 0; i < n_allocated; i++) {
vert_list[i] = &vert[i];
}
} else {
vert = NULL;
vert_list = NULL;
}
}
@@ -546,7 +517,7 @@ float geometry_batcher::draw_laser(vec3d *p0, float width1, vec3d *p1, float wid
void geometry_batcher::render(int flags)
{
if (n_to_render) {
g3_draw_poly( n_to_render * 3, vert_list, flags | TMAP_FLAG_TRILIST);
gr_render(n_to_render * 3, vert, flags | TMAP_FLAG_TRILIST);
n_to_render = 0;
}
}
+1 -2
View File
@@ -16,7 +16,6 @@ private:
int n_to_render; // the number of primitives to render
int n_allocated; // the number of verts allocated
vertex *vert;
vertex **vert_list; // V's stupid rendering functions need this
// makes sure we have enough space in the memory buffer for the geometry we are about to put into it
// you need to figure out how many verts are going to be required
@@ -25,7 +24,7 @@ private:
void clone(const geometry_batcher &geo);
public:
geometry_batcher(): n_to_render(0), n_allocated(0), vert(NULL), vert_list(NULL) {};
geometry_batcher(): n_to_render(0), n_allocated(0), vert(NULL) {};
~geometry_batcher();
geometry_batcher(const geometry_batcher &geo) { clone(geo); }
+53 -43
View File
@@ -33,6 +33,7 @@
#include "graphics/gropengldraw.h"
#include "graphics/gropenglshader.h"
#include "graphics/gropenglstate.h"
#include "graphics/gropenglpostprocessing.h"
#if defined(_WIN32)
@@ -52,14 +53,10 @@ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
#pragma comment (lib, "glu32")
#endif
// minimum GL version we can reliably support is 1.2
static const int MIN_REQUIRED_GL_VERSION = 12;
#define REQUIRED_GL_MAJOR_VERSION 1
#ifdef __APPLE__ // the Apple GL version is more advanced than the version number lets on
#define REQUIRED_GL_MINOR_VERSION 1
#else
#define REQUIRED_GL_MINOR_VERSION 2
#endif
int GL_version = 0;
bool GL_initted = 0;
@@ -773,7 +770,7 @@ void gr_opengl_zbuffer_clear(int mode)
// I feel dirty...
static void opengl_make_gamma_ramp(float gamma, ushort *ramp)
{
int x, y;
ushort x, y;
ushort base_ramp[256];
Assert( ramp != NULL );
@@ -804,12 +801,12 @@ static void opengl_make_gamma_ramp(float gamma, ushort *ramp)
// for everything else we need to actually figure it up
else {
double g = 1.0 / (double)gamma;
int val;
double val;
Assert( GL_original_gamma_ramp != NULL );
for (x = 0; x < 256; x++) {
val = (int) (pow(x/255.0, g) * 65535.0 + 0.5);
val = (pow(x/255.0, g) * 65535.0 + 0.5);
CLAMP( val, 0, 65535 );
base_ramp[x] = (ushort)val;
@@ -1361,8 +1358,6 @@ void opengl_setup_viewport()
// NOTE: This should only ever be called through os_cleanup(), or when switching video APIs
void gr_opengl_shutdown()
{
gr_opengl_post_process_release();
if (GL_cursor_pbo) {
vglDeleteBuffersARB(1, &GL_cursor_pbo);
GL_cursor_pbo = 0;
@@ -1376,7 +1371,8 @@ void gr_opengl_shutdown()
opengl_tcache_shutdown();
opengl_light_shutdown();
opengl_tnl_shutdown();
opengl::shader_manager::destroy();
opengl_post_process_shutdown();
opengl_shader_shutdown();
GL_initted = false;
@@ -1527,7 +1523,7 @@ int opengl_init_display_device()
Cmdline_no_set_gamma = 1;
} else {
// assume identity ramp by default, to be overwritten by true ramp later
for (int x = 0; x < 256; x++) {
for (ushort x = 0; x < 256; x++) {
GL_original_gamma_ramp[x] = GL_original_gamma_ramp[x + 256] = GL_original_gamma_ramp[x + 512] = (x << 8) | x;
}
}
@@ -1724,6 +1720,7 @@ void opengl_setup_function_pointers()
gr_screen.gf_pixel = gr_opengl_pixel;
gr_screen.gf_scaler = gr_opengl_scaler;
gr_screen.gf_tmapper = gr_opengl_tmapper;
gr_screen.gf_render = gr_opengl_render;
gr_screen.gf_gradient = gr_opengl_gradient;
@@ -1783,7 +1780,9 @@ void opengl_setup_function_pointers()
gr_screen.gf_set_fill_mode = gr_opengl_set_fill_mode;
gr_screen.gf_set_texture_panning = gr_opengl_set_texture_panning;
gr_screen.gf_make_buffer = gr_opengl_make_buffer;
gr_screen.gf_create_buffer = gr_opengl_create_buffer;
gr_screen.gf_config_buffer = gr_opengl_config_buffer;
gr_screen.gf_pack_buffer = gr_opengl_pack_buffer;
gr_screen.gf_destroy_buffer = gr_opengl_destroy_buffer;
gr_screen.gf_render_buffer = gr_opengl_render_buffer;
gr_screen.gf_set_buffer = gr_opengl_set_buffer;
@@ -1799,13 +1798,12 @@ void opengl_setup_function_pointers()
gr_screen.gf_reset_lighting = gr_opengl_reset_lighting;
gr_screen.gf_set_ambient_light = gr_opengl_set_ambient_light;
gr_screen.gf_set_post_effect = gr_opengl_set_post_effect;
gr_screen.gf_set_default_post_process = gr_opengl_set_default_post_process;
gr_screen.gf_post_process_set_effect = gr_opengl_post_process_set_effect;
gr_screen.gf_post_process_set_defaults = gr_opengl_post_process_set_defaults;
gr_screen.gf_post_process_init = gr_opengl_post_process_init;
gr_screen.gf_post_process_before = gr_opengl_post_process_before;
gr_screen.gf_post_process_after = gr_opengl_post_process_after;
gr_screen.gf_save_zbuffer = gr_opengl_save_zbuffer;
gr_screen.gf_post_process_begin = gr_opengl_post_process_begin;
gr_screen.gf_post_process_end = gr_opengl_post_process_end;
gr_screen.gf_post_process_save_zbuffer = gr_opengl_post_process_save_zbuffer;
gr_screen.gf_start_clip_plane = gr_opengl_start_clip_plane;
gr_screen.gf_end_clip_plane = gr_opengl_end_clip_plane;
@@ -1864,8 +1862,10 @@ bool gr_opengl_init()
ver = (char *)glGetString(GL_VERSION);
sscanf(ver, "%d.%d", &major, &minor);
if ( (major < REQUIRED_GL_MAJOR_VERSION) || ((major <= REQUIRED_GL_MAJOR_VERSION) && (minor < REQUIRED_GL_MINOR_VERSION)) ) {
Error(LOCATION, "Current GL Version of %i.%i is less than the required version of %i.%i.\nSwitch video modes or update your drivers.", major, minor, REQUIRED_GL_MAJOR_VERSION, REQUIRED_GL_MINOR_VERSION);
GL_version = (major * 10) + minor;
if (GL_version < MIN_REQUIRED_GL_VERSION) {
Error(LOCATION, "Current GL Version of %d.%d is less than the required version of %d.%d.\nSwitch video modes or update your drivers.", major, minor, (MIN_REQUIRED_GL_VERSION / 10), (MIN_REQUIRED_GL_VERSION % 10));
}
GL_initted = true;
@@ -1873,9 +1873,9 @@ bool gr_opengl_init()
// this MUST be done before any other gr_opengl_* or opengl_* funcion calls!!
opengl_setup_function_pointers();
mprintf(( " OpenGL Vendor : %s\n", glGetString(GL_VENDOR) ));
mprintf(( " OpenGL Renderer : %s\n", glGetString(GL_RENDERER) ));
mprintf(( " OpenGL Version : %s\n", ver ));
mprintf(( " OpenGL Vendor : %s\n", glGetString(GL_VENDOR) ));
mprintf(( " OpenGL Renderer : %s\n", glGetString(GL_RENDERER) ));
mprintf(( " OpenGL Version : %s\n", ver ));
mprintf(( "\n" ));
if (Cmdline_fullscreen_window || Cmdline_window) {
@@ -1893,18 +1893,6 @@ bool gr_opengl_init()
// init state system (must come AFTER light is set up)
GL_state.init();
// ready the texture system
opengl_tcache_init();
extern void opengl_tnl_init();
opengl_tnl_init();
// setup default shaders, and shader related items
opengl::shader_manager::create();
// must be called after extensions are setup
opengl_set_vsync( !Cmdline_no_vsync );
GLint max_texture_units = GL_supported_texture_units;
if (Use_GLSL) {
@@ -1917,9 +1905,22 @@ bool gr_opengl_init()
GL_state.Texture.SetActiveUnit(0);
GL_state.Texture.SetTarget(GL_TEXTURE_2D);
GL_state.Texture.Enable();
GL_state.Texture.SetWrapS(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapT(GL_CLAMP_TO_EDGE);
GL_state.Texture.SetWrapR(GL_CLAMP_TO_EDGE);
// ready the texture system
opengl_tcache_init();
extern void opengl_tnl_init();
opengl_tnl_init();
// setup default shaders, and shader related items
opengl_shader_init();
// post processing effects, after shaders are initialized
opengl_post_process_init();
// must be called after extensions are setup
opengl_set_vsync( !Cmdline_no_vsync );
opengl_setup_viewport();
@@ -1960,13 +1961,22 @@ bool gr_opengl_init()
mprintf(( " Max elements vertices: %i\n", GL_max_elements_vertices ));
mprintf(( " Max elements indices: %i\n", GL_max_elements_indices ));
mprintf(( " Max texture size: %ix%i\n", GL_max_texture_width, GL_max_texture_height ));
if ( Is_Extension_Enabled(OGL_EXT_FRAMEBUFFER_OBJECT) ) {
mprintf(( " Max render buffer size: %ix%i\n", GL_max_renderbuffer_size, GL_max_renderbuffer_size ));
}
mprintf(( " Can use compressed textures: %s\n", Use_compressed_textures ? NOX("YES") : NOX("NO") ));
mprintf(( " Texture compression available: %s\n", Texture_compression_available ? NOX("YES") : NOX("NO") ));
mprintf(( " Post-processing enabled: %s\n", (Cmdline_postprocess) ? "YES" : "NO"));
mprintf(( " Using %s texture filter.\n", (GL_mipmap_filter) ? NOX("trilinear") : NOX("bilinear") ));
if (Use_GLSL) {
mprintf(( " Using GLSL for model rendering.\n" ));
mprintf(( " Shader Version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION_ARB) ));
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
+2
View File
@@ -648,6 +648,8 @@ int opengl_check_for_errors(char *err_at = NULL);
#define GL_CHECK_FOR_ERRORS(s)
#endif
extern int GL_version;
extern int Use_VBOs;
extern int Use_PBOs;
extern int Use_GLSL;
+156 -1
View File
@@ -1103,9 +1103,164 @@ void gr_opengl_tmapper(int nverts, vertex **verts, uint flags)
} else {
opengl_tmapper_internal(nverts, verts, flags);
}
}
void opengl_render_internal(int nverts, vertex *verts, uint flags)
{
int alpha, tmap_type, r, g, b;
float u_scale = 1.0f, v_scale = 1.0f;
GLenum gl_mode = GL_TRIANGLE_FAN;
bool texture_matrix_set = false;
GL_CHECK_FOR_ERRORS("start of render()");
opengl_setup_render_states(r, g, b, alpha, tmap_type, flags);
if (flags & TMAP_FLAG_TRILIST) {
gl_mode = GL_TRIANGLES;
} else if (flags & TMAP_FLAG_TRISTRIP) {
gl_mode = GL_TRIANGLE_STRIP;
} else if (flags & TMAP_FLAG_QUADLIST) {
gl_mode = GL_QUADS;
} else if (flags & TMAP_FLAG_QUADSTRIP) {
gl_mode = GL_QUAD_STRIP;
}
if (flags & TMAP_FLAG_TEXTURED) {
if ( !gr_opengl_tcache_set(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale) ) {
return;
}
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), &verts[0].u);
// adjust texture coords if needed
if ( (u_scale != 1.0f) || (v_scale != 1.0f) ) {
glMatrixMode(GL_TEXTURE);
glPushMatrix();
glScalef(u_scale, v_scale, 1.0f);
// switch back to the default modelview mode
glMatrixMode(GL_MODELVIEW);
texture_matrix_set = true;
}
}
if ( (flags & TMAP_FLAG_RGB) && (flags & TMAP_FLAG_GOURAUD) ) {
glEnableClientState(GL_COLOR_ARRAY);
if (flags & TMAP_FLAG_ALPHA) {
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(vertex), &verts[0].r);
} else {
glColor4ub( (ubyte)r, (ubyte)g, (ubyte)b, (ubyte)alpha );
glColorPointer(3, GL_UNSIGNED_BYTE, sizeof(vertex), &verts[0].r);
}
}
// use what opengl_setup_render_states() gives us since this works much better for nebula and transparency
else {
glColor4ub( (ubyte)r, (ubyte)g, (ubyte)b, (ubyte)alpha );
}
float offset_z = -0.99f;
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslatef((float)gr_screen.offset_x, (float)gr_screen.offset_y, offset_z);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, sizeof(vertex), &verts[0].sx);
gr_opengl_set_2d_matrix();
glDrawArrays(gl_mode, 0, nverts);
gr_opengl_end_2d_matrix();
GL_state.Texture.DisableAll();
if (texture_matrix_set) {
glMatrixMode(GL_TEXTURE);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
}
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
GL_CHECK_FOR_ERRORS("end of render()");
}
void opengl_render_internal3d(int nverts, vertex *verts, uint flags)
{
int alpha, tmap_type, r, g, b;
float u_scale = 1.0f, v_scale = 1.0f;
GLenum gl_mode = GL_TRIANGLE_FAN;
GL_CHECK_FOR_ERRORS("start of render3d()");
opengl_setup_render_states(r, g, b, alpha, tmap_type, flags);
if (flags & TMAP_FLAG_TEXTURED) {
if ( !gr_opengl_tcache_set(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale) ) {
return;
}
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), &verts[0].u);
}
GLboolean cull_face = GL_state.CullFace(GL_FALSE);
GLboolean lighting = GL_state.Lighting(GL_FALSE);
if (flags & TMAP_FLAG_TRILIST) {
gl_mode = GL_TRIANGLES;
} else if (flags & TMAP_FLAG_TRISTRIP) {
gl_mode = GL_TRIANGLE_STRIP;
} else if (flags & TMAP_FLAG_QUADLIST) {
gl_mode = GL_QUADS;
} else if (flags & TMAP_FLAG_QUADSTRIP) {
gl_mode = GL_QUAD_STRIP;
}
if ( (flags & TMAP_FLAG_RGB) && (flags & TMAP_FLAG_GOURAUD) ) {
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(vertex), &verts[0].r);
}
// use what opengl_setup_render_states() gives us since this works much better for nebula and transparency
else {
glColor4ub( (ubyte)r, (ubyte)g, (ubyte)b, (ubyte)alpha );
}
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, sizeof(vertex), &verts[0].x);
glDrawArrays(gl_mode, 0, nverts);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
GL_state.CullFace(cull_face);
GL_state.Lighting(lighting);
GL_CHECK_FOR_ERRORS("end of render3d()");
}
void gr_opengl_render(int nverts, vertex *verts, uint flags)
{
if ( !Cmdline_nohtl && (flags & TMAP_HTL_3D_UNLIT) ) {
opengl_render_internal3d(nverts, verts, flags);
} else {
opengl_render_internal(nverts, verts, flags);
}
}
#define FIND_SCALED_NUM(x, x0, x1, y0, y1) ( ((((x) - (x0)) * ((y1) - (y0))) / ((x1) - (x0))) + (y0) )
void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap = false)
+1 -11
View File
@@ -11,17 +11,6 @@
#ifndef GR_OPENGLDRAW_H
#define GR_OPENGLDRAW_H
typedef struct glvertexc {
float x, y, z;
float u, v;
ubyte r, g, b, a;
} glvertexc;
extern glvertexc *GLVertex_c;
void gr_opengl_aabitmap_ex(int x, int y, int w, int h, int sx, int sy, bool resize, bool mirror);
void gr_opengl_aabitmap(int x, int y, bool resize, bool mirror);
void gr_opengl_string(int sx, int sy, char *s, bool resize = true);
@@ -40,6 +29,7 @@ void gr_opengl_flash_alpha(int r, int g, int b, int a);
void gr_opengl_fade_in(int instantaneous);
void gr_opengl_fade_out(int instantaneous);
void gr_opengl_tmapper(int nverts, vertex **verts, uint flags);
void gr_opengl_render(int nverts, vertex *verts, uint flags);
void gr_opengl_bitmap_ex(int x, int y, int w, int h, int sx, int sy, bool resize);
void opengl_render_timer_bar(int colour, float x, float y, float w, float h);
+34 -17
View File
@@ -98,9 +98,6 @@ ogl_extension GL_Extensions[NUM_OGL_EXTENSIONS] =
"glBindBufferARB", "glDeleteBuffersARB", "glGenBuffersARB", "glBufferDataARB",
"glBufferSubDataARB", "glMapBufferARB", "glUnmapBufferARB" } },
// Mac-only extension that allows use of system copy of texture to avoid an additional API copy
// { false, 0, 1, { "GL_APPLE_client_storage" }, 0, { NULL } },
// make me some mipmaps!
{ false, false, 1, { "GL_SGIS_generate_mipmap" }, 0, { NULL } },
@@ -147,7 +144,7 @@ ogl_extension GL_Extensions[NUM_OGL_EXTENSIONS] =
{ false, false, 1, { "GL_ARB_fragment_shader" }, 0, { NULL } },
// shader version 3.0 detection extensions (if any of these extensions exist then we should have a SM3.0 compatible card, hopefully)
{ false, false, 2, { "GL_ARB_shader_texture_lod", "GL_NV_vertex_program" }, 0, { NULL } }
{ false, false, 3, { "GL_ARB_shader_texture_lod", "GL_NV_vertex_program3", "GL_ATI_shader_texture_lod" }, 0, { NULL } }
};
// ogl_funcion is:
@@ -370,9 +367,30 @@ void opengl_extensions_init()
// }
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_SM30)*/ )
&& Is_Extension_Enabled(OGL_ARB_VERTEX_SHADER) )
{
Use_GLSL = 1;
int ver = 0, major = 0, minor = 0;
const char *glsl_ver = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION_ARB);
sscanf(glsl_ver, "%d.%d", &major, &minor);
ver = (major + 100) + minor;
// SM 4.0 compatible or better
if (ver >= 130) {
Use_GLSL = 4;
}
// SM 3.0 compatible
else if ( Is_Extension_Enabled(OGL_SM30) ) {
Use_GLSL = 3;
}
// SM 2.0 compatible
else if (ver >= 120) {
Use_GLSL = 2;
}
// we require GLSL 1.20 or higher
else {
Use_GLSL = 0;
}
}
// setup the best fog function found
@@ -393,6 +411,7 @@ void opengl_extensions_init()
if ( !Use_GLSL ) {
Cmdline_normal = 0;
Cmdline_height = 0;
Cmdline_postprocess = 0;
}
if (Use_GLSL) {
@@ -400,19 +419,17 @@ void opengl_extensions_init()
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &max_texture_units);
// we need enough texture slots for this stuff to work
if (max_texture_units < 4) {
Int3();
Use_GLSL = 0;
}
if (max_texture_units < 5) {
if (max_texture_units < 6) {
mprintf(( "Not enough texture units for height map support. We need at least 6, we found %d.\n", max_texture_units ));
Cmdline_height = 0;
} else if (max_texture_units < 5) {
mprintf(( "Not enough texture units for height and normal map support. We need at least 5, we found %d.\n", max_texture_units ));
Cmdline_normal = 0;
Cmdline_height = 0;
}
if (max_texture_units < 6) {
Cmdline_height = 0;
} else if (max_texture_units < 4) {
mprintf(( "Not enough texture units found for GLSL support. We need at least 4, we found %d.\n", max_texture_units ));
Use_GLSL = 0;
}
}
}
+7 -8
View File
@@ -47,21 +47,20 @@ extern ogl_function GL_EXT_Special[];
// Extensions
#define OGL_EXT_FOG_COORD 0
#define OGL_ARB_MULTITEXTURE 1
#define OGL_ARB_TEXTURE_ENV_ADD 2
#define OGL_ARB_TEXTURE_COMPRESSION 3
#define OGL_ARB_TEXTURE_ENV_ADD 2
#define OGL_ARB_TEXTURE_COMPRESSION 3
#define OGL_EXT_TEXTURE_COMPRESSION_S3TC 4
#define OGL_EXT_TEXTURE_FILTER_ANISOTROPIC 5
//#define OGL_NV_FOG_DISTANCE 6
//#define OGL_EXT_SECONDARY_COLOR 7
#define OGL_ARB_TEXTURE_ENV_COMBINE 6
#define OGL_ARB_TEXTURE_ENV_COMBINE 6
#define OGL_EXT_COMPILED_VERTEX_ARRAY 7
//#define OGL_ARB_TRANSPOSE_MATRIX 10
#define OGL_EXT_DRAW_RANGE_ELEMENTS 8
#define OGL_ARB_TEXTURE_MIRRORED_REPEAT 9
//#define OGL_ARB_TRANSPOSE_MATRIX 10
#define OGL_EXT_DRAW_RANGE_ELEMENTS 8
#define OGL_ARB_TEXTURE_MIRRORED_REPEAT 9
#define OGL_ARB_TEXTURE_NON_POWER_OF_TWO 10
#define OGL_ARB_VERTEX_BUFFER_OBJECT 11
#define OGL_ARB_PIXEL_BUFFER_OBJECT 12
//#define OGL_APPLE_CLIENT_STORAGE 13
#define OGL_ARB_PIXEL_BUFFER_OBJECT 12
#define OGL_SGIS_GENERATE_MIPMAP 13
#define OGL_EXT_FRAMEBUFFER_OBJECT 14
#define OGL_ARB_TEXTURE_RECTANGLE 15
+1 -1
View File
@@ -424,7 +424,7 @@ void gr_opengl_reset_lighting()
if (Cmdline_nohtl)
return;
memset( opengl_lights, 0, sizeof(opengl_light) * MAX_LIGHTS );
// memset( opengl_lights, 0, sizeof(opengl_light) * MAX_LIGHTS );
for (i = 0; i < GL_max_lights; i++) {
GL_state.Light(i, GL_FALSE);
File diff suppressed because it is too large. Load diff
Loaded 100 of 226 files, more files were not shown because too many files have changed in this diff. Show more