Go to the source code of this file.
◆ PAINT_UNDO_SLOT
| #define PAINT_UNDO_SLOT 0 |
A saved edit to one decal slot.
◆ PAINT_UNDO_ALL
A saved edit to every decal slot.
◆ PAINT_UNDO_PALETTE
| #define PAINT_UNDO_PALETTE 2 |
◆ InitPaintUndo()
Initialise paint history in the remaining interface memory.
- Parameters
-
| memory | Writable history storage. |
| capacity | Number of available bytes in memory. |
| model | Vehicle model containing the decal textures. |
| palette | Decal palette to restore with colour edits. |
◆ RecordPaintUndoSlot()
| void RecordPaintUndoSlot |
( |
s32 | slot | ) |
|
Record the current pixels of one slot before an edit.
- Parameters
-
| slot | Index of the slot to record. |
◆ RecordPaintUndoAll()
| void RecordPaintUndoAll |
( |
void | | ) |
|
Record every slot before an edit that changes the whole car.
◆ RecordPaintUndoPalette()
| void RecordPaintUndoPalette |
( |
void | | ) |
|
Record the palette before its colour editor changes it.
◆ CancelPaintUndoPalette()
| void CancelPaintUndoPalette |
( |
void | | ) |
|
Discard the latest entry when a palette edit is cancelled.
◆ UndoPaintChange()
| s32 UndoPaintChange |
( |
void | | ) |
|
Restore the previous edit.
- Returns
- The restored entry type, or -1 when history is empty.
◆ RedoPaintChange()
| s32 RedoPaintChange |
( |
void | | ) |
|
Reapply the next edit.
- Returns
- The reapplied entry type, or -1 when redo history is empty.
◆ MarkPaintUndoSaved()
| void MarkPaintUndoSaved |
( |
void | | ) |
|
Record the current history position as saved.
◆ ResetPaintUndo()
| void ResetPaintUndo |
( |
void | | ) |
|
Clear history after loading another decal file.
◆ PaintUndoIsDirty()
| s32 PaintUndoIsDirty |
( |
void | | ) |
|
Return whether current decals differ from the saved history position.
- Returns
- Nonzero if there are unsaved edits.
◆ PaintUndoCanUndo()
| s32 PaintUndoCanUndo |
( |
void | | ) |
|
Return whether an earlier edit can be restored.
- Returns
- Nonzero if undo history is available.