ddnet/src/game/editor
Robert Müller ab3c6c4353 Improve envelope evaluation and validation
Call `EnvelopeEval` functions directly instead of passing them and their arguments to `CRenderTools::RenderTilemap` and `CRenderTools::RenderTileRectangle`.

Only evaluate color envelopes for tiles layers once instead of separately for the opaque and transparent passes.

Only evaluate relevant number of envelope channels instead of always evaluating all channels.

Avoid unnecessary calculations by only evaluating position envelopes for quads which are not fully transparent.

Fully ignore layer color and envelope color for entities layers, as these cannot be specified in the editor and should not be changeable.

Remove duplicate and insufficient checks for invalid envelope index before calling `EnvelopeEval`. Instead, set the correct default for all channels before calling `EnvelopeEval` and only change the result on success. Now, white color will consistently be assumed for invalid color envelopes, zero positions and rotations for invalid position envelopes, and full volume for invalid sound envelopes.

Validate number of envelope channels to prevent crashes. When loading maps containing envelopes with invalid number of channels (not equal to 1, 3 or 4), the number of channels of these envelopes is reset to 4 and an error message is displayed, so the mapper can examine all channels' data and transfer it to another envelope if necessary. Closes #7985.
2024-02-23 19:24:34 +01:00
..
mapitems Improve envelope evaluation and validation 2024-02-23 19:24:34 +01:00
auto_map.cpp Only include layer_tiles.h in auto_map.cpp 2023-12-27 12:29:25 +01:00
auto_map.h let CAutoMapper inherit CEditorComponent 2023-09-01 18:57:13 +02:00
component.cpp add editor object class 2023-10-07 00:46:47 +02:00
component.h add editor object class 2023-10-07 00:46:47 +02:00
editor.cpp Improve envelope evaluation and validation 2024-02-23 19:24:34 +01:00
editor.h Improve envelope evaluation and validation 2024-02-23 19:24:34 +01:00
editor_action.h Add editor undo/redo feature 2023-12-04 22:44:20 +01:00
editor_actions.cpp Added dialog to fix invalid map settings on load 2024-01-23 20:13:57 +01:00
editor_actions.h Editor: made "Clean up game tiles" undoable 2024-01-23 19:03:53 +01:00
editor_history.cpp Call FlagModified only when property can affect automapper (fixes #7959) 2024-02-10 12:15:28 +01:00
editor_history.h Call FlagModified only when property can affect automapper (fixes #7959) 2024-02-10 12:15:28 +01:00
editor_object.cpp Use CEditorComponent methods instead of only CMapView 2023-12-23 14:45:36 +01:00
editor_object.h Cleanup editor object comments 2024-02-08 15:59:26 +08:00
editor_props.cpp Replace DoButton_ButtonDec/Inc with DoButton_FontIcon/Ex 2024-02-18 12:32:51 +01:00
editor_server_settings.cpp Various fixes to map settings handling 2024-01-23 20:15:30 +01:00
editor_server_settings.h Various fixes to map settings handling 2024-01-23 20:15:30 +01:00
editor_trackers.cpp Fix multiple editor undo/redo issues 2024-01-14 19:45:20 +01:00
editor_trackers.h Fix multiple editor undo/redo issues 2024-01-14 19:45:20 +01:00
editor_ui.h Replace DoButton_Menu with DoButton_Ex 2024-02-18 15:56:19 +01:00
explanations.cpp Fix missing editor explanation for kill tile in front layer 2024-01-04 17:42:53 +01:00
layer_selector.cpp Move select layer to editor component 2024-02-17 12:06:04 +08:00
layer_selector.h Move select layer to editor component 2024-02-17 12:06:04 +08:00
map_grid.cpp Added plus/minus buttons to numeric value selectors in editor 2024-02-05 19:15:52 +01:00
map_grid.h Improve editor toolbar anim and grid buttons, add dropdowns 2023-12-28 17:43:09 +01:00
map_view.cpp Fix readability-make-member-function-const 2023-12-14 23:38:03 +01:00
map_view.h Fix readability-make-member-function-const 2023-12-14 23:38:03 +01:00
mapitems.h Add editor undo/redo feature 2023-12-04 22:44:20 +01:00
popups.cpp Improve envelope evaluation and validation 2024-02-23 19:24:34 +01:00
proof_mode.cpp Add community server filter and icons, remove DDNet and KoG tabs 2023-11-04 15:32:27 +01:00
proof_mode.h Add CProofMode and CMapGrid component 2023-08-25 20:40:27 +02:00
smooth_value.cpp format 2023-08-14 08:53:59 +02:00
smooth_value.h Add CEditorComponent to moduralize editor 2023-08-14 08:36:02 +02:00
tileart.cpp Add editor undo/redo feature 2023-12-04 22:44:20 +01:00