コード例 #1
0
void LandscapeEditorCustomColors::CreateUndoPoint()
{
	if (originalTexture)
	{
		Image* newTexture = StoreState();
		CommandsManager::Instance()->ExecuteAndRelease(new CommandDrawCustomColors(originalTexture, newTexture), workingScene);
		SafeRelease(originalTexture);
		SafeRelease(newTexture);
	}
	unsavedChanges = true;
}
コード例 #2
0
void LandscapeEditorColor::CreateUndoPoint()
{
	if (originalImage)
	{
		Image* newImage = StoreState();
		CommandsManager::Instance()->ExecuteAndRelease(new CommandDrawTilemap(originalImage,
																			  newImage,
																			  savedPath,
																			  workingLandscape));
		SafeRelease(originalImage);
		SafeRelease(newImage);
	}
}
コード例 #3
0
ファイル: hmac.cpp プロジェクト: cdaffara/symbiandump-os2
//	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);
}
コード例 #4
0
void LandscapeEditorColor::StoreOriginalTexture()
{
	DVASSERT(originalImage == NULL);
	originalImage = StoreState();
}
コード例 #5
0
void LandscapeEditorCustomColors::StoreOriginalState()
{
	DVASSERT(originalTexture == NULL);
	originalTexture = StoreState();
}