⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmaplinetype.h

📁 symbian 的一个 二维飞行游戏 源码 及相关技术文章
💻 H
字号:
// Copyright 2002 Kenneth Guy,
// 
// TMapLineType.h

#ifndef _TMAPLINETYPE_H_
#define _TMAPLINETYPE_H_

/** \file TMapLineType.h

    TMapLineType header file.
 */

/** Defines type of lines of map data.

    Each line of map data consists of 8 TInt16s. The type of each line
    is given by the first.

    If the type is EMapLineBackground then the
    next four TInt16s are the background sprite numbers to be plotted.
    
    If the type is EMapLineObject the a new bad guy is added to the
    array of bad guys (if there is a slot free). The type and 7 TInt16s
    are passed to TBadGuy::Init() which adds the appropriate bad guy.

    If the type is EMapLineEndOfMap then the map stops scrolling and
    no more bad guys are added.

    CMap::ProcessMapLine() processes the map data.
*/
    
enum TMapLineType {
  EMapLineTypeMask                      =0x000f,
  EMapLineBackground                    =0x0001,
  EMapLineEndOfMap                      =0x0002,
  EMapLineObject                        =0x0004,

  EMapLineObjectTypeMask                =0x00f0,
  EMapLineObjectBadGuy                  =0x0010,
  EMapLineObjectCollectable             =0x0020,


  EMapLineObjectMovementMask            =0xff00,

  EMapLineObjectMovementSimple          =0x1000,
  EMapLineObjectMovementBounceTop       =0x0100,
  EMapLineObjectMovementBounceBottom    =0x0200,
  EMapLineObjectMovementBounceLeft      =0x0400,
  EMapLineObjectMovementBounceRight     =0x0800,

  EMapLineObjectMovementHoming          =0x2000,
  EMapLineObjectMovementHomingX         =0x0100,
  EMapLineObjectMovementHomingY         =0x0200,

  EMapLineObjectMovementPath            =0x4000,
  EMapLineObjectMovementMapRelative     =0x8000
};

// short cuts

/** short cut for a X,Y homing bad guy */
#define KHomingBadGuy  (EMapLineObject | EMapLineObjectBadGuy |EMapLineObjectMovementHoming | EMapLineObjectMovementHomingX | EMapLineObjectMovementHomingY)

/** short cut for a bad guy that bounces of all sides */
#define KBouncingBadGuy  (EMapLineObject | EMapLineObjectBadGuy | EMapLineObjectMovementSimple |EMapLineObjectMovementBounceTop |EMapLineObjectMovementBounceBottom |EMapLineObjectMovementBounceLeft |EMapLineObjectMovementBounceRight)


/** short cut for a bad guy that bounces of top and bottom */
#define KBounceTopBottomBadGuy  (EMapLineObject | EMapLineObjectBadGuy | EMapLineObjectMovementSimple |EMapLineObjectMovementBounceTop |EMapLineObjectMovementBounceBottom )


/** short cut for a collectable that bounces of top and bottom */
#define KCollectable  (EMapLineObject | EMapLineObjectCollectable | EMapLineObjectMovementSimple |EMapLineObjectMovementBounceTop |EMapLineObjectMovementBounceBottom)

/** short cut for a simple moving bad guy */
#define KBadGuy  (EMapLineObject | EMapLineObjectBadGuy | EMapLineObjectMovementSimple)


/** short cut for a path following bad guy */
#define KPathBadGuy  (EMapLineObject | EMapLineObjectBadGuy | EMapLineObjectMovementPath)

/** short cut for a path following collectable */
#define KPathCollectable  (EMapLineObject | EMapLineObjectCollectable | EMapLineObjectMovementPath)

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -