Qt fred/enable#3
Open
TheForce172 wants to merge 79 commits into
Open
Conversation
String processing enhancement prerequisites for the upcoming `split_str_once` PR. 1. Add overloads of some string processing functions with a length parameter, to allow processing of substrings of C-strings 2. Add overloads of gr_printf that work with string lengths 3. Add constructors to `HUD_message_data` and `line_node` 4. Rename "size" to "len" in `vm_strndup` for clarity 5. Fill in some string attribute annotations 6. Make the rest of the HUD render functions `const` 7. Removed unneeded circular #includes in code/globalincs/memory/
Convert `debriefing_editor_dlg` from a modal stack-allocated dialog to a modeless heap-allocated dialog, matching the pattern of the briefing editor. Update FRED infrastructure accordingly. Add `focus_sexp(int node)` to `debriefing_editor_dlg`, mirroring the existing method in `briefing_editor_dlg`. Fix both `focus_sexp()` implementations to search all team debriefings/briefings instead of only the currently selected team, so nodes in non-zero teams are found correctly in TVT missions. Fix `debriefing set_modified()` calls to only set the flag if the debriefing data actually changes, rather than every time the editor was opened.
Clean up the syntax checker, using clearer variable names for each check, and most importantly unique variable names. Fixes several bugs where syntax checking failed because the same variable was overwritten with incompatible type information. Also fixes a bug in `check_operator_argument_count` where the count check never ran due to a mixup of `op_index` and `op_const`.
Fix a bug that Claude caught: conversion from Latin-1 would fall through, truncate, and emit a spurious warning.
…cking improve SEXP syntax checking
fix coerce_to_utf8
…eliminary_cleanup preliminary cleanup for split_str_once refactor
Per Claude: The key things the new comments add that the old ones were missing: 1. Palette RGB colors are completely ignored — only the index value is used as alpha. This is the non-obvious invariant that @notimaginative described. 2. Exact mapping table — makes the * 18 / * 17 math immediately readable, and clarifies the ANI vs PCX difference (> 15 clamps to opaque in ANI but transparent in PCX). 3. The broken-palette consequence — explicitly states that a reversed palette causes a white square, linking to scp-fs2open#4148 so future readers understand the context.
Submodel `collision_tree_index` should be reset to -1 when removed, not 0.
Three out-of-bounds/UB fixes for issue scp-fs2open#6793: - asteroid_create_all: skip field_debris_type[idx] == -1 entries when building the DG_DEBRIS odds table and loading models; iterate only over valid table slots during spawn. Matches the guard already present in asteroid_frame. - missionparse: bounds-check subtype before indexing colors[] in the obsolete +Field Debris Type: parsing path. - verify_asteroid_list: guard the asteroid_list[0] fallback access against an empty list. - asteroid_init: emit an mprintf when no asteroids are defined instead of returning silently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
small followup to 7327
fix asteroid field undefined behavior
* Gate correct insignias behind flag / version * Move flag to graphics settings
* Build using /MD flag if building QTFred and on windows Fixes Multiple QTFred heap crashes due to mismatched runtime types. * Actually Change Right value
add documentation for issue 4148
* help dialog and documentation * compile help in headless mode * scene browser help file * attempt to get CI working for linux * debug attempt * Fix split method to use QString::SkipEmptyParts * Revert "debug attempt" This reverts commit cb046e1. * clang * update help * correct name * Inject sexps.html into help and add find in page controls * update help based on recent commits * better tutorial asset loading * no const * update help again
* Refactor of logic based on feedback * resolve requested changes
Each time `model_load` is called with a `ship_info` pointer, which causes it to load subsystems, the model number MUST be assigned to the ship_info.
* Make showing 2D radar icons a toggle-able option * better options
Per Claude: > The `IF` opens with `(MSVC_USE_RUNTIME_DLL OR FSO_BUILD_QTFRED)` but the `ELSE` and `ENDIF` only reference `(MSVC_USE_RUNTIME_DLL)`. CMake requires the argument in `ELSE`/`ENDIF` to match the `IF` exactly (or be omitted).
* Add particle during animation * cleanup
fix cmake warning
fix a few bugs in model loading
…cp-fs2open#7308) * use std::move() for local variables that are copied but not reused Addresses ~140 Coverity "Variable copied when it could be moved" defects across 74 files. Every std::move() targets a local variable whose value is consumed by push_back, emplace, assignment, lambda capture, or a function call and is never read again afterward. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * clang: use std::make_shared * clang: use std::make_unique * address feedback --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ship editor stylization pass * proper enable/disable fixes
Fix a few items flagged by Coverity and Claude: - properly check for an unassigned ship node, rather than just Asserting, since this could be affected by mission data - properly check for null containers for the same reason - rename `ai_goal_find_empty_slot` to `ai_goal_allocate_slot` and edit comments to reflect its not-quite-side-effect-free role
Fix scp-fs2open#4089, part 1: - give the `my_replacement` and `i_replace` fields clearer names - for submodels with the `Is_damaged` flag (representing -destroyed variants or debris), initialize them to blown-off (the true fix for scp-fs2open#3078, fixing a regression introduced in the model instance refactor) - roll back the de-parenting of live debris from scp-fs2open#3089 (726ce95), because it was a wrong fix to the initialization bug and introduced its own subtle bug when positioning live debris - roll back the `Can_move` flag skipping from scp-fs2open#4138 (063d7af), because it was another wrong fix to the initialization bug - add some clarifying comments
Fix scp-fs2open#4089, part 2: - properly link special-point subsystems with -destroyed submodels, if such a relationship exists and a game_settings.tbl flag is set - add some helper functions for -destroyed variants of submodels (and now subsystems)
* ship goals stylization pass * clang * static access
* add imgui speech options * adapt existing windows sapi speech implementation * adapt existing mac speech integration * add speech linux stubs * add speech support in linux * Add array checks * Use dlopen for speech-dispatcher * corrrect lib name * missing includes and static cast * do not change mac file type * fix clang tidy warnings 1 * set tts rate * set localization ids * fix clang tidy warnings 2 * correct symbol name * Remove voice cache and fix win enumerate_voices overriding voice selection * fix mac rate Done by notimaginative * requested changes * re-add voice cache for linux * Open connection for linux get flags * fix missing } * change voice option combobox to std::pair * delete duplicated voice id sanitizer on windows set voice * Use pairs for speech_enumerate_voices() and adapt linux speech * use reference * actually free vector memory * Clear voice cache when ingame options closes * Use extern to call fsspeech_options_cleanup() * update localization ids * Fixing some linux and window speech oversights * Apply volume and rate after a voice change, correct voice, volume and rate apply order
…and_claude a bit of cleanup
* make jump node multi select and direct edit * clang * update qtfred help docs * fixes
* ship initial status stylization pass * suppress false positive
If you set AA level to None, save, then close the game, then re-enter the game and switch the AA mode to an MSAA mode, then the screen will just be black until the game is restarted. This does not happen when switching from None to FXAA because FXAA works because its post-pass uses `Scene_luminance_texture` and `Scene_ldr_texture`, which are always created as part of standard scene setup. There are two ways to fix this, either require AA mode to require a game restart (though that may complicate the lab) or allow resource allocation for SMAA always. Honestly I like the idea of keeping the lower-end machines optimized and not allocating for SMAA but simply running it always but for this PR have just allowed it always run. Happy to discuss whichever option folks think is best!
1. more robust handling of missing fireball graphics 2. fix handling of error dialogs on Linux so that the engine doesn't silently continue on an error! Fixes scp-fs2open#6793.
fix the Shivan Comm Node
* Release Build Safety * Move to using standard models. * Avoid using .indexes() to fix heap coruption * More work on selection function * major cleanup and refactor * enable drag and drop * multi edit support * cleanup * fix build issue on linux * revert non-weapons dialog changes * clang * clang * update help doc * better model/dialog code split * further cleanup * static * keep primary and secondary banks aligned --------- Co-authored-by: The Force <2040992+TheForce172@users.noreply.github.com>
two fixes for issue 6793
Follow-up to scp-fs2open#7251, which added `set-guard-range` This PR exposes that value to scripting, so scripters do not have to use the more expensive `runSEXP` to use it. The value is initialized as -1 (`max_guard_radius = -1.0f;` line 7913 in ship.cpp), hence the default value for the script is -1.
* Pick model surface particle by sampling random vertex * Parse and keep buffers * Add local position scaling * Fix warning * Fix warning 2 * Fix warning 3 * Fix warning 4 * Add scale parameter * Incorporate feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test