diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-18 23:11:29 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-18 23:11:29 -0400 |
commit | 8c5f06c37f3c267ecd8f867cd49765c366b5f47c (patch) | |
tree | f8ec31daa1e050c0f5205d32cebe68ce5df65f6f /undo.cpp | |
parent | 9062e0aae9f2f576b7a237c28028aa6b09feee5e (diff) |
many additions
Diffstat (limited to 'undo.cpp')
-rw-r--r-- | undo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -103,6 +103,13 @@ void Action_Change_Commit(memory *Memory, void *DataAddress, void *OriginalData, *(action_change_type *)Data = ActionChange; } +// Helper functions for common types of data changes. +void Action_Change_Commit_SwapBool(memory *Memory, bool32 *Bool) +{ + bool32 OppositeBool = *Bool ^ 1; + Action_Change_Commit(Memory, Bool, Bool, &OppositeBool, action_change_i32); +} + // This is only called when we're certain the action is going to be taken. void Action_Entry_Commit(memory *Memory, action_entry_type Type, char *Name) { |