Commit Graph
61 Commits
Author SHA1 Message Date
Goober5000 c3dd6eb113 update polymodel_instance to reference object
See title.  All references to `model_create_instance` have been updated to supply an object number or -1.
2021-12-22 18:29:00 -05:00
Goober5000 ae63f02829 rename intrinsic rotation to intrinsic motion 2021-10-13 19:39:16 -04:00
Goober5000 575c050da4 reorganize submodel rotation
This moves submodel rotation out of the AI pipeline and into object movement.  With the exception of turret rotation (which remains in the AI code) this now allows all types of submodel rotation to happen in the same place.  Many associated functions have also been cleaned up.

In addition to making the code cleaner and clearer, this will make it much easier for intrinsic rotations and new animations to be applied to non-ship objects, such as weapons.
2021-10-10 02:29:34 -04:00
Goober5000 5bc1d9da30 constify_ctext 2020-06-26 14:47:39 -04:00
asarium 016c07dc3a Add feature to execute Lua coroutines at specific points
This adds a mechanism for running generic operations at specific points
of the frame execution. This can be used by any part of the code an not
just Lua since it simply executes std::functions. It also adds an
"execution context" concept that specifies in which situation an
operation should be executed.

This is then used by the Lua Coroutines code for resuming coroutines at
specific points instead of always when the awaited promise resolves.
2020-06-06 21:29:48 +02:00
FSCyborg 2238c0af63 Move Default Values to Class Define
Part of modernizing the code base, Travis, at least, prefers defaults to be in the class definition instead of having multiple constructor functions have the same default values.
2019-11-12 16:58:41 -05:00
FSCyborg e62b64bac8 Fix Dumb_Rotate Regression
Allows jump nodes to use instrinsic/dumb rotation again by exposing the jump node class to the model instancing code and adding a check for it in modelread.
2019-11-11 11:22:13 -05:00
asarium bd3632d1bf Enable remaining misc- checks and fix detected issues 2018-04-25 11:57:55 +02:00
asarium 513115ceeb Enable misc-noexcept-move-constructor check 2018-04-13 12:10:24 +02:00
Fabian Woltermann ed45baa843 Improve the JumpNode::SetName assertion to be readable by non-coders 2018-01-21 23:38:58 +01:00
asarium 686bf15879 Ensure that init_render is called before rendering the scene
This was previously not enforced and some code did not call this
function at the correct time which caused crashes since data was not
initialized correctly. This adds a check to ensure that the function was
called and fixes the code that uses the model_draw_list.
2017-09-24 15:53:14 +02:00
Samuel Cho 347dca5e60 Renamed draw_list to a more descriptive model_draw_list. Removed unlit maps since those aren't needed anymore. Changed transforms in model_draw_list to use the transform_stack instead of using duplicate code. Removed some unused graphics code. Fixed scaling when using batched transforms. 2017-01-02 20:15:37 -08:00
SamuelCho ba826df963 Removed a bunch of unused rendering code. 2016-08-28 18:47:34 -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
SamuelCho 1ef7688fa1 Strip out unused rendering code. 2016-07-10 19:29:11 -07: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 859405b62e Merge pull request #149 from SamuelCho/mantis3163
Refactored how color setting is done for model rendering. Fixes Mantis 3163
2015-05-30 19:24:15 -07:00
SamuelCho 0c9996c32b Rectified jump nodes not rendering in FRED. Fixes Mantis 3162. 2015-05-29 23:37:50 -07:00
SamuelCho 2ba39e6b6d Refactored how color setting is done for model rendering. Fixes Mantis 3163. 2015-05-29 21:54:33 -07:00
asarium cc9109843a Fix for Coverity 1093690: Resource leak
This introduces a move constructor for CJumpNode to handle freeing resources.
2015-05-16 11:20:20 +02:00
Swifty c620372357 Soft shadows, deferred lighting, and various major graphics optimizations. 2015-05-02 14:35:37 -07:00
Goober5000 497d11c7af revert r8975 because this fix adds unwanted diagonal lines to the jump node model (Mantis #2396) 2012-07-07 21:00:37 +00:00
Goober5000 eac17f338e Zacam's fix for Mantis #2396 2012-07-03 05:01:33 +00:00
Echelon9 c0df634874 Documentation: Complete documentation of CJumpNode 2012-04-07 23:31:23 +00:00
Echelon9 a0e59defd6 CJumpNode class code convention; convert to UpperCamelCase for class and function name; ensure all private variables adopt m_ prefix 2012-04-07 11:07:30 +00:00
Goober5000 b146b10403 MOAR const-correctness! 2012-03-08 08:12:56 +00:00
Valathil 9d1659aba9 Fix for Mantis 2523: Actually add the jump node to the vector after creating it and fix some new renaming code checks to work when you're trying to rename a node to the same name it had before. 2012-01-30 14:47:43 +00:00
The_E 858426d06a Fixes issue where the jumpnode destructor would try to use obj_delete() on already deleted objects. Also changes obj_delete() to no longer assert when called on an already deleted object; will print a message to the log now. 2012-01-29 16:37:52 +00:00
Echelon9 7b5b59e913 Fix for Mantis #2523: FRED Waypoints/Jumpnode Refuses Rename Leading To Unescapeable Loop 2012-01-22 12:00:08 +00:00
Echelon9 a8c5c80a39 Fix for Mantis #2540 - confirmed by Goober to resolve the constructor warnings 2012-01-22 09:19:57 +00:00
IssMneur 5f7fc07507 Fixes a crash when a jumpnode targeted by the player is hidden. See MANTIS#2541 2011-11-19 23:17:51 +00:00
Echelon9 5bf63e8c8d Third part of fixing jump_nodes refactor, remove the union approach to linking Jump_nodes into Objects[]. First go at clearing the FRED errors. 2011-11-19 04:07:30 +00:00
Echelon9 f1060979fd Second part of fixing jump_nodes refactor, using cleaner attribute variables 2011-11-19 03:05:44 +00:00
Echelon9 27900ec1a9 Refactor of the jump_node code to use the STL's std::list, rather than Volition's in-house written linked_list. 2011-10-03 12:15:55 +00:00
The_E 6c5013760a set-jumpnode-name, as implemented by CommanderDJ 2011-04-29 14:05:45 +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
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
wmcoolmon a531f565bd Fixx0r FRED 2006-10-20 20:37:42 +00:00
taylor 4999f3dc4b show poly flag setting was reversed 2006-01-18 15:59:33 +00:00
phreak 098e3a9b93 Argument checking when setting jumpnode color. 2006-01-10 00:11:03 +00:00
randomtiger 7bf193c5e4 Added voice recognition functionality for Visual C6 project only.
Currently still a work in progress.
2006-01-03 17:07:11 +00:00
wmcoolmon de875a5b47 Removed unneccessary casts 2005-11-05 05:08:58 +00:00
taylor 4dea0537cf FRED2 does special stuff for jumpnode handling so don't try and delete the obj ourselves when FRED is running 2005-06-29 18:53:07 +00:00
taylor d12a2fb8b4 add a _fast version of bm_unload() to be used in modelinterp and future graphics API code
clean up some modelinterp code to not use memcpy() everywhere so it's more platform compatible and matches old code (Jens Granseuer)
NaN check to catch shards-of-death and prevent hitting an Assert() (Jens Granseuer)
fix jumpnode code to catch model errors and close a memory leak
make the call to bm_unload_all() after model_free_all() since we will get bmpman screwups otherwise
don't show hardware sound RAM when using OpenAL build, it will always be 0
print top-right memory figures in debug builds slighly further over when 1024+ res
2005-06-19 02:28:56 +00:00
wmcoolmon 9af4132f51 Better missing model handling Pt. 2 2005-06-01 22:54:23 +00:00
wmcoolmon 3e47590d0c Better missing model handling 2005-06-01 22:52:56 +00:00
taylor 7f786136a6 s/vector/vec3d/g, better support for different compilers (Jens Granseuer) 2005-04-05 05:53:25 +00:00
wmcoolmon b911af11ea Removed some warnings under Linux/GCC 2005-03-29 07:03:16 +00:00
wmcoolmon 2c2a6334db Big, massive, codebase commit. I have not removed the old ai files as the ones I uploaded aren't up-to-date (But should work with the rest of the codebase) 2005-03-25 06:57:38 +00:00