亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ski.cpp

?? s60源碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/**
 *
 * @brief Definition of Skiing Classes
 *
 * Copyright (c) EMCC Software Ltd 2003
 * @version 1.0
 */

#include "ski.h"
#include <e32math.h>    //Maths
#include <AknUtils.h>   //CompletePathWithAppPath utility method

#include <images.mbg>
#include <eikenv.h>
#include "doublebufferedarea.h"
#include "skiconstants.h"

_LIT (KMultiBitmapFilename,"\\System\\Apps\\Skiing\\images.mbm");

//
//TMapPrimitive
//

/*
* C++ constructor
* @param aPosn the position of the map primitive
* @param aType the type of the map primitive
*/
TMapPrimitive::TMapPrimitive(const TPoint& aPosn, TMapPrimitive::TMapObjectType aType) :
 iPosn(aPosn),
 iType(aType)
    {
    }
/*
* Position accessor
* @return the primitive position
*/
const TPoint& TMapPrimitive::Posn() const
    {
    return iPosn;
    }

/*
* Type accessor
* @return the primitive type
*/
TMapPrimitive::TMapObjectType TMapPrimitive::Type() const
    {
    return iType;
    }
/*
* Type mutator
* @param aType the primitive type
*/
void TMapPrimitive::SetType(TMapObjectType aType)
    {
    iType = aType;
    }

//
// MMapPrimitiveToRectConverter
//

/*
* Implementation to spawn a rectangle from a point on the map.  The point is at the
* bottom centre of the spawned rectangle
* @param aPosn the position of the bottom centre of the spawned rectangle
* @param aSize the size of the rectangle generated
* @return a rectangle of the required dimensions
*/
TRect MMapPrimitiveToRectConverter::CreateRect(TPoint aPosn, TSize aSize) const
    {
    TRect rect(aPosn, aSize);
    // map position is bottom centre of object
    rect.Move(-aSize.iWidth / 2, -aSize.iHeight);
    return rect;
    }

//
//CSkiMap
//

/**
* Symbian OS 2 phase constructor.
*/
CSkiMap* CSkiMap::NewL()
    {
    CSkiMap* self = NewLC();
    CleanupStack::Pop(self);
    return self;
    }

/**
* Symbian OS 2 phase constructor.  The constructed object is left on the cleanup stack
*/
CSkiMap* CSkiMap::NewLC()
    {
    CSkiMap* self = new (ELeave) CSkiMap;
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

/**
* Symbian OS 2 phase constructor.  The constructed object is left on the cleanup stack
* @param aArray a pre-constructed array of map primitives that this map will hold
*/
CSkiMap* CSkiMap::NewLC(CMapPrimitiveArray* aArray)
    {
    CSkiMap* self = new (ELeave) CSkiMap(aArray);
    CleanupStack::PushL(self);
//    self->ConstructL();
    return self;
    }

/*
* Standard c++ constructor
*/
CSkiMap::CSkiMap()
    {
    }

/*
* Standard c++ constructor
* @param aArray a pre-constructed array of map primitives that this map will hold
*/
CSkiMap::CSkiMap(CMapPrimitiveArray* aArray) :
 iArray(aArray)
    {
    _LIT(KSkiPanic, "Ski Application Panic");
    __ASSERT_ALWAYS(aArray != NULL, User::Panic(KSkiPanic, KErrArgument));
    }

/*
* destructor
*/
CSkiMap::~CSkiMap()
    {
    delete iArray;
    }

/*
* Accessor to the map primitives in the map
*/
CMapPrimitiveArray& CSkiMap::PrimitiveArray()
    {
    return *iArray;
    }

/*
* Accessor to the map primitives in the map
*/
const CMapPrimitiveArray& CSkiMap::PrimitiveArray() const
    {
    return *iArray;
    }

/*
* Finds all the objects in the map that are within a particular area.
* @param aArea the area in the map to be queried for map objects
* @param aRectRep a reference to an object that can convert the position of a map primitive into a rectangle
* @return a map containing any map objects in the area specified
*/
CSkiMap* CSkiMap::IntersectsLC(const TRect& aArea, const MMapPrimitiveToRectConverter& aRectRep)
    {
    CMapPrimitiveArray* array = new (ELeave) CMapPrimitiveArray(KSkiArrayGranularity);
    CleanupStack::PushL(array);

    const TInt count = iArray->Count();

    for (TInt ii = 0; ii < count; ii++)
        {
        TMapPrimitive primitive = iArray->At(ii);
        TRect rect = aRectRep.RectangleL(primitive);
        TSize size = rect.Size();

        // No object on the map will have a rectangle
        // equivalent of zero-size - implementations of
        // RectangleL return an empty rectangle if there's
        // no stored TRect for that type
        if ((size.iWidth > 0 || size.iHeight > 0) && rect.Intersects(aArea))
        	{
            array->AppendL(primitive);
			}
        }

    CSkiMap* retval = NewLC(array);
    CleanupStack::Pop(2, array);
    CleanupStack::PushL(retval);
    return retval;
    }

/*
* Finds all the objects in the map of the specified type
* @param aType A bitmask of the types required from the map (defined in TMapPrimitive::TMapObjectType)
* @return an array of the required objects on the cleanup stack, empty if none were found
*/
CMapPrimitiveArray* CSkiMap::TypeLC(TInt aType)
    {
    CMapPrimitiveArray* array = new (ELeave) CMapPrimitiveArray(KSkiArrayGranularity);
    CleanupStack::PushL(array);

    const TInt count = iArray->Count();

    for (TInt ii = 0; ii < count; ii++)
        {
        TMapPrimitive primitive = iArray->At(ii);

        if ((primitive.Type() & aType) != 0)
        	{
            array->AppendL(primitive);
			}
        }

    return array;
    }

/*
* Standard 2nd phase construction
*/
void CSkiMap::ConstructL()
    {
    iArray = new (ELeave) CMapPrimitiveArray(KSkiArrayGranularity);
    }

/*
* Accessor to the map limits
* @return the map extents
*/
TSize CSkiMap::MapLimits() const
    {
    return iLimits;
    }

/*
* Set the size of the map
* @param aSize sets the extents of the map
*/
void CSkiMap::SetMapLimits(TSize aSize)
    {
    iLimits = aSize;
    }

//
//TSkiScreenAttribs::
//

/*
* Accessor to the screen bounds
* @return the screen bounds
*/
const TRect& TSkiScreenAttribs::Rect() const
    {
    return iRect;
    }
/*
* Accessor to the screen bounds
* @return the screen bounds
*/
TRect& TSkiScreenAttribs::Rect()
    {
    return iRect;
    }
/*
* Accessor to the screen offset ie. the position of the top left corner of the
* screen on the game map
* @return the screen offset
*/
TPoint TSkiScreenAttribs::Offset() const
    {
    return iRect.iTl;
    }

/*
* Mutator of the screen offset ie. the position of the top left corner of the
* screen on the game map
* @param the new screen offset
*/
void TSkiScreenAttribs::SetOffset(TPoint aOffset)
    {
    TPoint moveBy = aOffset - iRect.iTl;
    iRect.Move(moveBy);
    }

/*
* Standard c+ constructor
* @param aRect The size of the screen
*/
TSkiScreenAttribs::TSkiScreenAttribs(const TRect& aRect) :
 iRect(aRect)
    {
    }

/*
* Standard c+ constructor
*/
TSkiScreenAttribs::TSkiScreenAttribs()
     {
     }

//
//CSkiSprite::
//

/**
* Symbian OS 2 phase constructor.
* @param aBitmap The bitmap
* @param aMask
* @param aType an integer to identify the sprite
*/
CSkiSprite* CSkiSprite::NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aType)
    {
    CSkiSprite* self = NewLC(aBitmap, aMask, aType);
    CleanupStack::Pop(self);
    return self;
    }
/**
* Symbian OS 2 phase constructor.  The constructed object is left on the cleanup stack
* @param aMask
* @param aType an integer to identify the sprite
*/
CSkiSprite* CSkiSprite::NewLC(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aType)
    {
    CSkiSprite* self = new (ELeave) CSkiSprite(aBitmap, aMask, aType);
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }
/**
* C++ constructor
*/
CSkiSprite::CSkiSprite(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aType) :
 iBitmap(aBitmap),
 iMask(aMask),
 iType(aType)
    {
    }

/**
 * Accessor to sprite type information
 * @return an integer equivalent to an enumerated value that identifies the type
 */
TInt CSkiSprite::Type() const
    {
    return iType;
    }

/**
* Destructor
*/
CSkiSprite::~CSkiSprite()
    {
    delete iBitmap;
    delete iMask;
    }

/**
* Bitmap accessor
* @return a reference to the bitmap
*/
const CFbsBitmap& CSkiSprite::Bitmap() const
    {
    return *iBitmap;
    }

/**
* Bitmap accessor
* @return a reference to the bitmap
*/
CFbsBitmap& CSkiSprite::Bitmap()
    {
    return *iBitmap;
    }

/**
* Bitmap mask accessor
* @return a reference to the bitmap mask
*/
CFbsBitmap* CSkiSprite::Mask()
    {
    return iMask;
    }

/**
* Bitmap mask accessor
* @return a reference to the bitmap mask
*/
const CFbsBitmap* CSkiSprite::Mask() const
    {
    return iMask;
    }

/**
* Standard Symbian OS 2nd phase construction
*/
void CSkiSprite::ConstructL()
    {
    User::LeaveIfNull(iBitmap);
    }

//
//CGameGallery::
//

/**
* Symbian OS 2 phase constructor.
*/
CGameGallery* CGameGallery::NewL()
    {
    CGameGallery* self = NewLC();
    CleanupStack::Pop(self);
    return self;
    }

/**
* Symbian OS 2 phase constructor.  The constructed object is left on the cleanup stack
*/
CGameGallery* CGameGallery::NewLC()
    {
    CGameGallery* self = new (ELeave) CGameGallery;
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

/**
* Destructor
*/
CGameGallery::~CGameGallery()
    {
    iArray->ResetAndDestroy();
    delete iArray;
    }

/**
* Contructor
*/
CGameGallery::CGameGallery()
    {
    }

/**
* Standard Symbian OS 2nd phase construction
*/
void CGameGallery::ConstructL()
    {
    iArray = new (ELeave) CSkiSpriteArray(KSkiArrayGranularity);
    }

/**
* Accessor to a sprite of a particular type held in the gallery
* @param aType an integer to identify the sprite type required
* @return The requested sprite
* @exception Can leave with KErrNotFound
*/
const CSkiSprite& CGameGallery::SpriteL(TInt aType) const
    {
    const TInt count = iArray->Count();

    for (TInt ii = 0; ii < count; ii++)
        {
        CSkiSprite* scenery = iArray->At(ii);

        if (scenery->Type() == aType)
        	{
            return *scenery;
			}
        }

    User::Leave(KErrNotFound);

    // to keep compiler happy
    return *(iArray->At(0));
    }

/**
* Accessor to a sprite of a particular type held in the gallery
* @param aType an integer to identify the sprite type required
* @return The requested sprite
* @exception Can leave with KErrNotFound
*/
CSkiSprite& CGameGallery::SpriteL(TInt aType)
    {
    const TInt count = iArray->Count();

    for (TInt ii = 0; ii < count; ii++)
        {
        CSkiSprite* scenery = iArray->At(ii);

        if (scenery->Type() == aType)
        	{
            return *scenery;
			}
        }

    User::Leave(KErrNotFound);

    // to keep compiler happy
    return *(iArray->At(0));
    }

/**
* Constructs a sprite from the parameters and adds it to the gallery
* @param aBitmap The bitmap for the sprite
* @param aMask The mask for the sprite
* @param aTpe The sprite type
*/
void CGameGallery::AddBitmapL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aType) const
    {
    const TInt count = iArray->Count();

    for (TInt ii = 0; ii < count; ii++)
        {
        CSkiSprite* scenery = iArray->At(ii);

        if (scenery->Type() == aType)
        	{
            User::Leave(KErrAlreadyExists);
			}
        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费在线视频| 在线一区二区三区| 日本不卡免费在线视频| 亚洲成人激情综合网| 午夜精品一区二区三区三上悠亚| 亚洲女爱视频在线| 玉足女爽爽91| 丝袜美腿亚洲色图| 激情偷乱视频一区二区三区| 国产一区二区三区在线观看免费| 国产精品自拍三区| 成人性色生活片| eeuss鲁一区二区三区| 91激情五月电影| 欧美日韩一级二级三级| 欧美mv日韩mv国产网站| 国产亚洲综合色| 亚洲精品视频观看| 蜜桃视频一区二区三区| 国产电影精品久久禁18| 91原创在线视频| 制服.丝袜.亚洲.另类.中文| 精品第一国产综合精品aⅴ| 国产亲近乱来精品视频| 亚洲精品中文在线影院| 蜜桃视频在线观看一区| 99精品国产91久久久久久| 欧美性极品少妇| 欧美精品一区二区三区蜜臀| 国产精品久久99| 男男视频亚洲欧美| av资源站一区| 日韩欧美三级在线| 亚洲少妇最新在线视频| 久久精品久久99精品久久| 97国产一区二区| 欧美岛国在线观看| 亚洲永久免费视频| 国产麻豆9l精品三级站| 欧美日韩成人综合| 国产精品高清亚洲| 国产在线精品视频| 欧美精品丝袜久久久中文字幕| 欧美国产精品久久| 另类综合日韩欧美亚洲| 91国偷自产一区二区使用方法| 欧美mv日韩mv| 日本不卡视频一二三区| 色婷婷av一区二区三区软件 | 精品电影一区二区| 一区二区三区在线观看网站| 国产一区高清在线| 日韩一区二区在线观看视频播放| 亚洲精品午夜久久久| 国产69精品久久777的优势| 日韩欧美国产午夜精品| 亚洲午夜免费福利视频| 一本久久综合亚洲鲁鲁五月天| 久久免费看少妇高潮| 麻豆精品久久精品色综合| 欧美美女网站色| 亚洲风情在线资源站| 99精品视频在线观看免费| 国产欧美一区二区精品久导航| 蜜臀久久99精品久久久画质超高清| 欧美主播一区二区三区| 一区二区三区日韩在线观看| 91在线观看高清| 亚洲欧美电影院| 95精品视频在线| 亚洲欧美电影一区二区| 色综合天天视频在线观看| 亚洲欧洲性图库| 亚洲国产va精品久久久不卡综合| 国产精品1024| 久久久精品免费免费| 国产suv精品一区二区883| 精品成人佐山爱一区二区| 国产一区二区不卡| 久久久国产综合精品女国产盗摄| 久久福利资源站| 精品免费一区二区三区| 国产成人精品免费一区二区| 国产日韩欧美精品电影三级在线| 丁香另类激情小说| 亚洲视频在线观看三级| 91福利社在线观看| 日韩国产精品大片| 国产日韩欧美高清| 日本韩国一区二区| 人妖欧美一区二区| 国产午夜精品久久久久久久| 不卡视频在线看| 亚洲综合一区在线| 日韩三区在线观看| 成人激情视频网站| 亚洲成人黄色影院| 久久免费美女视频| 欧日韩精品视频| 精品午夜一区二区三区在线观看| 中文字幕久久午夜不卡| 在线免费观看日本一区| 久草这里只有精品视频| 亚洲男人的天堂一区二区| 日韩一区二区免费视频| 国产一区二区三区视频在线播放| 日韩毛片一二三区| 日韩欧美色综合网站| 99国产精品久久久| 人妖欧美一区二区| 亚洲乱码中文字幕| 精品福利一区二区三区| 欧美优质美女网站| 国产高清在线精品| 三级精品在线观看| 亚洲欧美在线高清| 久久精品人人做人人综合| 欧美性一区二区| 成人av网址在线| 琪琪久久久久日韩精品| 亚洲欧美日韩中文播放| 26uuu欧美日本| 欧美一区二区在线观看| 色拍拍在线精品视频8848| 国产麻豆精品在线观看| 青青草国产成人av片免费| 亚洲婷婷综合色高清在线| 久久久不卡网国产精品二区| 7777精品伊人久久久大香线蕉完整版| 成人黄色一级视频| 久久国产日韩欧美精品| 视频一区二区国产| 亚洲国产中文字幕| 一区二区在线观看免费| 国产精品久久毛片a| 久久久久久久电影| 精品国产一区二区在线观看| 在线视频国产一区| 91免费精品国自产拍在线不卡| 国产一区二区剧情av在线| 另类欧美日韩国产在线| 青青草国产精品97视觉盛宴| 亚洲午夜久久久| 亚洲国产一区在线观看| 一区二区三区在线看| 亚洲激情av在线| 一区二区三区丝袜| 亚洲综合免费观看高清完整版 | 国产夫妻精品视频| 精品影视av免费| 久久99久久99精品免视看婷婷| 免费在线看成人av| 琪琪一区二区三区| 久久精品国产**网站演员| 麻豆精品在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 久久电影国产免费久久电影 | av在线不卡电影| 99久精品国产| 欧日韩精品视频| 欧美一级欧美一级在线播放| 日韩亚洲欧美一区| 精品国产人成亚洲区| 久久久亚洲精品石原莉奈| 国产片一区二区| 成人免费在线视频| 亚洲成人中文在线| 精东粉嫩av免费一区二区三区| 九九精品视频在线看| 国产成人综合在线| 91久久国产最好的精华液| 欧美伦理影视网| 久久亚洲捆绑美女| 中文字幕视频一区| 午夜亚洲国产au精品一区二区| 欧美a一区二区| 久草精品在线观看| 91麻豆6部合集magnet| 91福利小视频| 久久久久久久久伊人| 国产精品美女久久久久久2018 | 色94色欧美sute亚洲线路二| 欧美日韩精品是欧美日韩精品| 日韩精品一区二区在线观看| 国产欧美一区在线| 视频一区国产视频| av成人免费在线观看| 欧美一区二区在线视频| 国产精品伦一区| 日本在线观看不卡视频| 波多野结衣91| 欧美刺激脚交jootjob| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 蜜桃视频一区二区| 亚洲v日本v欧美v久久精品| 亚洲高清在线视频| 国产麻豆欧美日韩一区| 欧美日韩国产综合一区二区 | 亚洲欧美另类久久久精品2019| 青青青爽久久午夜综合久久午夜|