}
undo = (undo_t *) malloc(sizeof(undo_t));
- if (!undo)
+ if (!undo)
return;
memset(undo, 0, sizeof(undo_t));
undo->brushlist.next = &undo->brushlist;
undo->prev = g_lastundo;
undo->next = NULL;
g_lastundo = undo;
-
+
undo->time = Sys_DoubleTime();
//
if (g_undoId > g_undoMaxSize * 2) g_undoId = 1;
Undo_Start
=============
*/
-void Undo_Start(char *operation)
+void Undo_Start(const char *operation)
{
// spog - disable undo if undo levels = 0
if (g_PrefsDlg.m_nUndoLevels == 0)
#endif
return;
}
-
+
Undo_ClearRedo();
Undo_GeneralStart(operation);
}
#endif
return;
}
-
+
if (!g_lastundo)
{
Sys_Printf("Undo_AddBrushList: no last undo.\n");
#endif
return;
}
-
+
brush_t *pBrush;
if (!g_lastundo)
#endif
return;
}
-
+
if (!g_lastundo)
{
#endif
return;
}
-
+
if (!g_lastundo)
{
#endif
return;
}
-
+
entity_t* pClone;
#endif
return;
}
-
+
if (!g_lastundo)
{
Sys_Printf("Undo_Undo: undo is disabled.\n");
return;
}
-
+
undo_t *undo, *redo;
brush_t *pBrush, *pNextBrush;
entity_t *pEntity, *pNextEntity, *pUndoEntity;
g_undoId--;
if (g_undoId <= 0) g_undoId = 2 * g_undoMaxSize;
//
- g_bScreenUpdates = true;
+ g_bScreenUpdates = true;
UpdateSurfaceDialog();
Sys_UpdateWindows(W_ALL);
}
// free the undo
free(redo);
//
- g_bScreenUpdates = true;
+ g_bScreenUpdates = true;
UpdateSurfaceDialog();
Sys_UpdateWindows(W_ALL);
}