void LandscapeEditorCustomColors::CreateUndoPoint() { if (originalTexture) { Image* newTexture = StoreState(); CommandsManager::Instance()->ExecuteAndRelease(new CommandDrawCustomColors(originalTexture, newTexture), workingScene); SafeRelease(originalTexture); SafeRelease(newTexture); } unsavedChanges = true; }
void LandscapeEditorColor::CreateUndoPoint() { if (originalImage) { Image* newImage = StoreState(); CommandsManager::Instance()->ExecuteAndRelease(new CommandDrawTilemap(originalImage, newImage, savedPath, workingLandscape)); SafeRelease(originalImage); SafeRelease(newImage); } }
// JCS, There may be a more efficient method but I can't find it // because using the DoFinal/DoUpdate functions directly calls // Store/Restore at inappropriate times and scribbles over stored // data // This is the only way I've found to both generate a hash value // and get this in the correctly updated state EXPORT_C TPtrC8 CHMAC::Hash(const TDesC8& aMessage) { TPtrC8 ptr(KNullDesC8()); TPtrC8 finalPtr(KNullDesC8()); StoreState(); if (iDigest) { ptr.Set(iDigest->Final(aMessage)); iDigest->Update(iOuterPad); finalPtr.Set(iDigest->Final(ptr)); } RestoreState(); iDigest->Update(aMessage); return (finalPtr); }
void LandscapeEditorColor::StoreOriginalTexture() { DVASSERT(originalImage == NULL); originalImage = StoreState(); }
void LandscapeEditorCustomColors::StoreOriginalState() { DVASSERT(originalTexture == NULL); originalTexture = StoreState(); }