diff options
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) { |