furnace/src/engine
alederer c5310d1855
Instrument editor undo (minus FixedQueue change) (#2094)
* add undo to instrument editor (check for diffs on the current DivInstrument in insEdit, record them in a stack)

* style fixes

* accidentally left some logs in

* typo in style fix

* cheat to avoid warning -Werror=class-memaccess on linux

* warn instead of assert on case where MemPatch application would exceed size of target buffer (which should never happen, if you're applying the patch to the same type it was generated from)

* instrument editor undo: don't check delta if no user input has come in that could potentially have dirtied the editor

* don't run a delta against cached instrument if not insEditOpen

* revert fixedQueue to before my 'fix' (if i touch it again i'll add unit tests)

* explicitly cast to (DivInstrumentPOD*) when memsetting DivInstrumentPOD in DivInstrument constructor, rather than relying on implicit memory layout

* use delete[] instead of free (whoops)

* MemPatch/DivInstrumentUndoStep -- remove clear() function (ambiguous whether it should free data, it only existed to set data to null after the swap, so just do that directly now). Also set data to null after delete.

* DivInstrument -- fix dangling undo-step pointers being created on duplicate (potentially leading to use-after-free), fix undo-step objects being shamelessly leaked

---------

Co-authored-by: Adam Lederer <adam@adamlederer.com>
2024-08-23 15:17:19 -05:00
..
effect update copyright year 2024-01-16 21:26:57 -05:00
export ZSM export: move to ROM export framework 2024-08-18 17:21:17 -05:00
fileOps fixes 2024-08-18 02:30:30 -05:00
platform SN: fix arp macro with easy period 2024-08-23 02:25:53 -05:00
blip_buf.c add setting to disable DC offset correction 2023-10-29 15:25:23 -05:00
blip_buf.h add setting to disable DC offset correction 2023-10-29 15:25:23 -05:00
blip_buf.txt add setting to disable DC offset correction 2023-10-29 15:25:23 -05:00
brrUtils.c SNES: add an option to not encode BRR with unstable filters 2024-06-22 16:40:06 +07:00
brrUtils.h SNES: add an option to not encode BRR with unstable filters 2024-06-22 16:40:06 +07:00
bsr.h fix bsr() 2024-01-25 19:04:34 -05:00
chipUtils.h prepare for issues #1554 and #1684 2024-01-31 15:07:48 -05:00
cmdStream.cpp trace window, kinda 2024-03-10 20:57:50 -05:00
cmdStream.h more work on the command stream debugger 2024-03-09 17:36:44 -05:00
cmdStreamOps.cpp fix compilation 2024-03-09 23:33:23 -05:00
config.cpp fool-proof getBool() 2024-02-25 16:57:18 -05:00
config.h update copyright year 2024-01-16 21:26:57 -05:00
configEngine.cpp import/export config and factory reset 2024-05-18 16:01:47 -05:00
dataErrors.h update copyright year 2024-01-16 21:26:57 -05:00
defines.h prepare for issues #1554 and #1684 2024-01-31 15:07:48 -05:00
dispatch.h FDS: prepare for auto mod 2024-08-02 02:21:44 -05:00
dispatchContainer.cpp AtomicSSG AY core 2024-04-29 15:21:58 -05:00
effect.h update copyright year 2024-01-16 21:26:57 -05:00
effectContainer.cpp update copyright year 2024-01-16 21:26:57 -05:00
engine.cpp account for fadeout length, optimize some progress bar calc 2024-08-22 03:17:35 -05:00
engine.h VGM export: don't generate garbage stop sample com 2024-08-22 23:17:22 -05:00
export.cpp ZSM export: move to ROM export framework 2024-08-18 17:21:17 -05:00
export.h port TIunA to export framework, part 1 2024-08-13 16:50:13 -05:00
exportDef.cpp port TIunA to export framework, part 1 2024-08-13 16:50:13 -05:00
fileOpsIns.cpp more cat and mouse 2024-04-14 02:22:07 -05:00
fileOpsSample.cpp 0.5 leftover 2024-08-18 18:20:01 -05:00
filter.cpp update copyright year 2024-01-16 21:26:57 -05:00
filter.h update copyright year 2024-01-16 21:26:57 -05:00
instrument.cpp Instrument editor undo (minus FixedQueue change) (#2094) 2024-08-23 15:17:19 -05:00
instrument.h Instrument editor undo (minus FixedQueue change) (#2094) 2024-08-23 15:17:19 -05:00
macroInt.cpp macroInt: also apply fix to LFO 2024-07-04 16:36:35 -05:00
macroInt.h Merge branch 'macro-retrigger-effect-tildearow-version' 2024-01-17 14:48:47 -05:00
orders.h update copyright year 2024-01-16 21:26:57 -05:00
pattern.cpp update copyright year 2024-01-16 21:26:57 -05:00
pattern.h update copyright year 2024-01-16 21:26:57 -05:00
pitchTable.cpp update copyright year 2024-01-16 21:26:57 -05:00
playback.cpp fix panbrello depth 2024-08-16 23:59:20 -05:00
safeReader.cpp S3M import: fix crash on Android 2024-06-28 16:13:27 -05:00
safeReader.h S3M import: fix crash on Android 2024-06-28 16:13:27 -05:00
safeWriter.cpp a better command stream debugger 2024-03-08 17:53:37 -05:00
safeWriter.h a better command stream debugger 2024-03-08 17:53:37 -05:00
sample.cpp SNES: add an option to not encode BRR with unstable filters 2024-06-22 16:40:06 +07:00
sample.h SNES: add an option to not encode BRR with unstable filters 2024-06-22 16:40:06 +07:00
sfWrapper.cpp CRAP 2024-08-19 12:54:09 -05:00
sfWrapper.h update copyright year 2024-01-16 21:26:57 -05:00
song.cpp account for fadeout length, optimize some progress bar calc 2024-08-22 03:17:35 -05:00
song.h account for fadeout length, optimize some progress bar calc 2024-08-22 03:17:35 -05:00
sysDef.cpp AY Timer bug fixes and some QOL improvements (#2073) 2024-08-15 15:55:29 -05:00
vgmOps.cpp VGM export: don't generate garbage stop sample com 2024-08-22 23:17:22 -05:00
waveSynth.cpp update copyright year 2024-01-16 21:26:57 -05:00
waveSynth.h update copyright year 2024-01-16 21:26:57 -05:00
wavetable.cpp update copyright year 2024-01-16 21:26:57 -05:00
wavetable.h update copyright year 2024-01-16 21:26:57 -05:00
wavOps.cpp account for fadeout length, optimize some progress bar calc 2024-08-22 03:17:35 -05:00
winStuff.cpp update copyright year 2024-01-16 21:26:57 -05:00
winStuff.h update copyright year 2024-01-16 21:26:57 -05:00
workPool.cpp fix possible crash when changing colors 2024-04-21 12:47:25 -05:00
workPool.h update copyright year 2024-01-16 21:26:57 -05:00