00001 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 00002 // All rights reserved. 00003 // This component and the accompanying materials are made available 00004 // under the terms of "Eclipse Public License v1.0" 00005 // which accompanies this distribution, and is available 00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00007 // 00008 // Initial Contributors: 00009 // Nokia Corporation - initial contribution. 00010 // 00011 // Contributors: 00012 // 00013 // Description: 00014 // 00015 00016 00017 #ifndef __ANIMMOVER_H__ 00018 #define __ANIMMOVER_H__ 00019 00020 #include <e32std.h> 00021 #include <spriteanimation.h> 00022 #include <basicanimation.h> 00023 #include <math.h> 00024 00025 const TInt KXDeflectionIncrement = 5; 00026 const TInt KXDeflectionTerminalValue = 475; 00027 const TInt KYDeflectionOffset = 125; 00028 const TInt KYDeflectionMultiplier = 12; 00029 00030 const TInt KAnimExBasicInitPosX = 300; 00031 const TInt KAnimExBasicInitPosY = 100; 00032 const TInt KAnimExSpriteInitPosX = 60; 00033 const TInt KAnimExSpriteInitPosY = 70; 00034 00035 00036 // Basic Animation Mover 00037 class CSpriteAnimMover : public CActive 00038 { 00039 public: 00040 CSpriteAnimMover( TInt aPriority, TInt aMicroSeconds, CSpriteAnimation* aSpriteAnim ); 00041 ~CSpriteAnimMover(); 00042 00043 00044 00045 protected: 00046 void DoCancel(); 00047 void RunL(); 00048 00049 private: 00050 RTimer iTimer; 00051 TInt iMicroSeconds; 00052 CSpriteAnimation* iSpriteAnim; // Caller owns. 00053 TInt iX; 00054 TInt iY; 00055 00056 }; 00057 00058 00059 // Sprite Animation Mover 00060 class CBasicAnimMover : public CActive 00061 { 00062 public: 00063 CBasicAnimMover( TInt aPriority, TInt aMicroSeconds, CBasicAnimation* aBasicAnim ); 00064 ~CBasicAnimMover(); 00065 00066 protected: 00067 void DoCancel(); 00068 void RunL(); 00069 00070 private: 00071 RTimer iTimer; 00072 TInt iMicroSeconds; 00073 CBasicAnimation* iBasicAnim; // Caller owns. 00074 TInt iX; 00075 TInt iY; 00076 }; 00077 00078 #endif // __ANIMMOVER_H__
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.