44 Commits
Author SHA1 Message Date
Goober5000 b82fa2a996 refactor CJumpNode to use SCP_vector
Jump nodes previously used SCP_list; refactor to use SCP_vector.  Also improve resource handling and life cycle management.

Follow-up to #7431.
2026-07-19 22:25:33 -04:00
Goober5000andClaude Opus 4.6 285e971aec Remove redundant m_pos from CJumpNode; add GetRadius() accessor (#7431)
CJumpNode stored a private m_pos field that duplicated the position
already held by its Objects[] entry.  The field was set once during
construction and never updated afterward, so any subsequent movement
(e.g. FRED dragging) would leave m_pos stale while Objects[m_objnum].pos
held the authoritative value.  Every external caller already used
GetSCPObject()->pos instead; GetPosition() had zero call sites.

- Remove the m_pos field and its initialization in both constructors,
  the move constructor, and the move-assignment operator.
- Pass the constructor's position argument directly to obj_create()
  instead of routing through m_pos.
- Repoint GetPosition() at Objects[m_objnum].pos so it always returns
  the live, up-to-date position.
- Add GetRadius() to expose the cached m_radius, and use it in
  jumpnode_get_which_in() instead of the redundant model_get_radius()
  call.

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
2026-07-06 01:49:10 +02:00
Mike Nelson 4084c75678 Qtfred Dockable object list (#7368)
* qtfred dockable objects list

* fix jumpnode rendering

* more ouline panel features

* fix for wings

* remember list expansions

* clean up wing selection and layer handling

* disable top and bottom docking

* give scene outliner some padding

* replace old selection dialog with the scene browser

* fix some minor issues

* right click for wings and waypoint paths

* clang

* clang again

* fix status bar message

* 25 1 checks

* clang

* more clang

* address feedback
2026-04-15 23:07:01 -04:00
Goober5000 067c65773a coverity: possible use of invalid iterator (especially with jump nodes) 2025-05-10 01:15:46 -04:00
Goober5000 cb4fe955ea change GetColor() signature 2023-11-01 11:03:04 -04:00
Goober5000 17ad0e09dd add const where appropriate to the jump node API
See title.
2023-10-21 15:59:24 -04:00
Goober5000 3ae178e125 refinements of jump node features
1. Deprecate the old set-jumpnode-name sexp now that there is a set-jumpnode-display-name
2. Make the display name design consistent with ships and weapons; in particular add a `HasDisplayName()` function and automatically generate the display name for hash-truncated names
3. Keep the display name in sync when the name is changed in the FRED dialog
4. Fix the overriding of hash-truncated names with display names on the HUD
5. Fix the incorrect setting of the alphacolor flag when using FRED
6. Fix array out-of-bounds access when no object is selected

Follow-up to #5401.
2023-06-05 00:41:38 -04:00
mjn-mixael 78b957982b enhance jump node handling 2023-05-12 15:30:41 -05: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 0b4ca71eba Enable modernize-deprecated-headers 2018-04-25 11:12:41 +02:00
asarium 513115ceeb Enable misc-noexcept-move-constructor check 2018-04-13 12:10:24 +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 1ef7688fa1 Strip out unused rendering code. 2016-07-10 19:29:11 -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 5aa3bddf70 change object from a struct to a class, since it contains the objsnd_num field :-/
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9995 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-10 18:28:55 +10: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
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
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
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
taylor 88693b7388 fix various compiler warnings 2008-03-29 06:30:20 +00:00
wmcoolmon a531f565bd Fixx0r FRED 2006-10-20 20:37:42 +00:00
Goober5000 52f136f9ad remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:15:53 +00:00
taylor 7f786136a6 s/vector/vec3d/g, better support for different compilers (Jens Granseuer) 2005-04-05 05:53:25 +00:00
wmcoolmon 38c004708f Fixed extern to compile under Linux 2005-03-29 06:28:52 +00:00
phreak e5ccec4457 global variable "Jump_nodes" needs external linkage for FRED 2005-03-29 03:42:07 +00:00
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
phreak 819bacd7e2 Add a function to check whether any duplicate jumpnode names exist 2005-03-20 21:07:10 +00:00
wmcoolmon 49223230ef Oops, gotta remember to commit main codebase stuff when fixing FRED 2005-03-11 01:28:23 +00:00
wmcoolmon 02e75ddd49 Merge of WMC's codebase. "Features and bugs, making Goober say "Grr!", as release would be stalled now for two months for sure" 2005-03-03 06:05:32 +00:00
Kazan 7d1c8b185d added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this 2004-08-11 05:06:36 +00:00
bobboau 2798d7d62b implemented index buffered background bitmaps,
OGL people you realy should get this implemented
2004-07-01 01:12:33 +00:00
Goober5000 7ef2ab2e39 Uber pass at reducing #includes
--Goober5000
2004-03-05 09:02:13 +00:00
DTP fe4c454d12 Bumped MAX JUMP-nodes to 50. if anybody wants a Jump-node forest 2002-12-17 01:56:36 +00:00
penguin 0c503be8d1 The big include file move 2002-08-01 01:41:11 +00:00
penguin 8f92eebd34 Warpcore CVS sync 2002-06-03 04:10:40 +00:00
penguin 663b3471b9 Volition sources -- warpcore CVS import 2002-06-03 03:26:03 +00:00