Commit Graph
108 Commits
Author SHA1 Message Date
Baezon 62465a24f5 swap wingnum and index, moar MAX_SHIPS_PER_WING 2020-09-04 23:29:56 -04:00
Baezon c225cf7b90 autopilot argument 2020-09-04 23:09:59 -04:00
Baezon d3eacb1a0f v1 2020-09-04 21:35:40 -04:00
Goober5000 70ee8461ab add const-correctness to the autopilot API
This was suggested by the sexp overhaul but is useful on its own too.  Some of the `const` changes cascade a bit.
2020-06-02 23:06:48 -04:00
Goober5000 6354e5d2ce add non-sexp.cpp (and minimal sexp.cpp changes) from overhaul wip 2020-06-01 21:14:10 -04:00
Goober5000 c9df8a13f1 add functions to remove the clutter of static casts for ship and weapon info vectors 2020-03-14 13:02:12 -04:00
CasparKielwein 65dcfe0a7c remove unused functions in autopilot 2018-12-22 20:10:56 +01:00
asarium 15dc45cc0a Remove -old_collision command line option
The new system has been tested pretty thoroughly so I think it is time
to remove this option.
2018-10-21 18:36:59 +02:00
asarium e28ebc2a6c Enable and fix misc-suspicious-string-compare check 2018-04-25 11:13:19 +02:00
asarium 9a8bfc0217 More const correctness 2017-01-02 13:17:59 +01:00
Fabian Woltermann 99a59efdbf AI Goal flags converted 2016-08-31 15:30:49 +02:00
Fabian Woltermann add8662737 Converts AI Info flags 2016-08-22 16:39:42 +02:00
Fabian Woltermann 98f72f9378 Finishes converting the remaining ship-related flags (#843) 2016-08-17 05:49:40 -07:00
Fabian Woltermann 770fce8de5 Bitset flags -- take 2 (#775)
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00
asarium 1bcd5400d3 Move build system to CMake 2016-07-22 12:07:19 +02:00
MageKing17 e5b7d48989 Add a couple more static_cast<int>()s to get rid of warnings. 2015-08-19 14:52:15 -07:00
MageKing17 64c9b272e7 Merge branch 'master' of ssh://github.com/scp-fs2open/fs2open.github.com into ship_info
Conflicts:
	code/pilotfile/pilotfile.cpp
2015-08-19 11:53:25 -07:00
Echelon9 0d35f901b3 Simplify duplicative autopilot/ includes, which are in autopilot/autopilot.h 2015-06-22 20:24:30 +10:00
Echelon9 c5493bb480 Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes. 2015-06-22 20:24:30 +10:00
MageKing17 e8bed8f892 Merge branch 'master' of ssh://github.com/scp-fs2open/fs2open.github.com into ship_info
Conflicts:
	code/ship/ship.cpp
2015-05-01 13:09:32 -07:00
MageKing17 bc0c7cf4c5 Vectorization of Ship_info.
Converts Ship_info from a ship_info[] to an SCP_vector<ship_info>. ship_info now has proper constructors, assignment operators, and a destructor. Num_ship_classes removed; various references to Num_ship_classes and/or MAX_SHIP_CLASSES (which remains for various other structures which need it) changed to Ship_info.size() instead.

This doesn't make the ship class limit dynamic, but it is a preparatory step to get there.
2015-04-27 00:01:22 -07:00
asarium 9aed627ce7 Replace longjmp with exceptions
Also added a EditorConfig file
2015-04-24 15:03:59 +02:00
Goober5000 2fe0ec8ef0 Yarn's patch for Mantis #3049 (character remapping in tstrings.tbl)
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10894 387891d4-d844-0410-90c0-e4c51a9137d3
2014-07-14 19:02:31 +10:00
Goober5000 6a8bc0a5ed make support ship deployment more robust, and prevent an edge case where too many support ships could be in the mission at one time
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10000 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-10 18:28:55 +10:00
Goober5000 73ebcda173 additional memory management improvements
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9917 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-16 19:46:01 +10:00
niffiwan 02afed1d78 Coverity: more out-of-bounds fixes
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9897 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-07 20:02:31 +10:00
niffiwan 62d06cfcd9 Coverity multiple CID: fix potential not null terminated strings
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9842 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-29 22:12:22 +10:00
The_E d02ef204a2 Fix a bug caused by an oversight during refactoring. It should be noted that this wouldn't have happened if this code was using normal scoping in for loops (for (int i = 0.....)) instead of having the loop counter be declared in the outer scope.
git-svn-id: svn://svn.icculus.org/fs2open/trunk@9522 387891d4-d844-0410-90c0-e4c51a9137d3
2013-03-18 20:24:45 +10:00
Goober5000 a916633b46 onlyjob's spelling fixes, per Mantis #2777 2013-01-13 09:50:08 +00:00
The_E 9ac4d2d0b0 Patch for Mantis 2733: Updates the description for add-nav-waypoint. Also makes it work as intended. 2012-12-12 13:57:34 +00:00
karajorma c94d97073c Talon1024's Nav select/deselect SEXPs. 2012-10-04 02:28:23 +00:00
Echelon9 42a4aef344 Fix LLVM warning: Declaration shadows a field of 'NavPoint' 2012-09-06 17:01:51 +00:00
Swifty c6c12fc251 go_even_faster: Improved collision detection performance by rewriting broadphase and narrowphase testing. 2012-08-11 21:14:53 +00:00
Echelon9 6d4f266e52 Use SCP_* types to access STL types wherever possible. This allows more complete memory monitoring 2011-10-03 09:06:56 +00:00
Echelon9 2abd999dd9 PVS-Studio fix: V522 Dereferencing of the null pointer 'snd' might take place. Check the logical condition (autopilot.cpp) 2011-08-31 13:25:14 +00:00
Goober5000 3ce69f150a waypoints and waypoint paths now have dynamic limits 2011-08-30 03:35:42 +00:00
Echelon9 80a027a400 PVS-Studio fix: V803 Decreased performance. In case 'tvs' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator.
For further discussion see, http://www.viva64.com/en/b/0093/

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

Note. Code with size_t does not see the performance improvement comparison to iterators due to absence of array overrun check.
2011-08-28 08:31:25 +00:00
Echelon9 a248a37d58 PVS-Studio: Fix V805. Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) > 0' construct 2011-08-24 13:37:01 +00:00
The_E 7f5c3d343e Valathil's code cleanup patch. 2011-07-20 18:04:43 +00:00
Echelon9 4be2c7e94d Small fix: Correct the spelling of a NavPoint function 2011-01-25 14:37:43 +00:00
Echelon9 d0e05d5417 Fix: Buffer overrun: accessing 'struct NavPoint * Navs', the writable size is '352' bytes, but '396' bytes might be written: Lines: 1597, 1600 2010-12-11 12:54:02 +00:00
The_E a1ecfe158b Adding the adjust-audio-volume sexp. 2010-08-19 19:45:28 +00:00
chief1983 251fe9a34a One more autopilot fix for 3.6.12, per IssMneur 2010-07-17 22:18:20 +00:00
chief1983 cbe541598e IssMneur's autopilot fixes (hooray\!) 2010-07-13 22:45:54 +00:00
chief1983 eed85feae9 IssMneur's fix for #1888 (finally): Much better autopilot behavior. 2010-06-21 14:59:36 +00:00
Echelon9 cfec9106be Complete reversion 2010-01-07 17:30:44 +00:00
Echelon9 c2b601bd5c Rename function to correctly reflect what it does 2010-01-02 13:32:43 +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
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
karajorma a4e623db23 Portej05's preFAST warning fixes. 2009-05-17 11:50:48 +00:00