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

📄 type.h

📁 凌阳SPCE3200 系统开发板随机自带源程序。共安排了32个子目录
💻 H
字号:
// SUNPLUS  S+core IDE generated include file.
#ifndef SCOREIDE_TYPE_H_11942_2995__INCLUDED_
#define SCOREIDE_TYPE_H_11942_2995__INCLUDED_

/*#ifndef BYTE
typedef unsigned char		BYTE;
#endif
#ifndef WORD
typedef unsigned short		WORD;
#endif
#ifndef LONG
typedef unsigned int		LONG;
#endif
*/
typedef unsigned int   		UINT32, ULONG;
typedef unsigned short 		UINT16;
typedef unsigned char 		UINT8;

typedef int   				INT32;
typedef short 				INT16;
typedef char				INT8;

//rex@2005/12/21
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif

#ifndef PUCHAR
typedef UCHAR *PUCHAR;
#endif

#ifndef PULONG
typedef ULONG *PULONG;
#endif

//add by xydeng
/////////////////////////////////////////////////////
// 硬件相关类型
/////////////////////////////////////////////////////

// CharNumber
#define TAB1_MAX 512*4
#define TAB2_MAX 2048

// PPU MODE
typedef enum {
    VGA_MODE = 0,
    CIF_MODE
}PPU_MODE;

// SPRITE CONSULT
typedef enum {
    CONSULT_CENTER = 0,
    CONSULT_LEFT_TOP
}SPRITE_CONSULT;

// TEXTURE
typedef enum {
    AS_TEXT1 = 0,
    AS_TEXT2,
}TEXT;

// LAYER
typedef enum {
    LAYER0 = 0,
    LAYER1,
    LAYER2,
    LAYER3
}LAYER;

// TEXTURE PALETTE
typedef enum {
    TEXTPALETTE00 = 0,
    TEXTPALETTE01,
    TEXTPALETTE02,
    TEXTPALETTE03,
    TEXTPALETTE04,
	TEXTPALETTE05,
	TEXTPALETTE06,
	TEXTPALETTE07,
	TEXTPALETTE08,
	TEXTPALETTE09,
    TEXTPALETTE10,
    TEXTPALETTE11,
    TEXTPALETTE12,
    TEXTPALETTE13,
    TEXTPALETTE14,
	TEXTPALETTE15
} TEXTPALETTEINDEX;

// TEXTURE H(orizontal) SIZE
typedef enum {
    TEXTHSIZE8 = 0,
    TEXTHSIZE16,
    TEXTHSIZE32,
    TEXTHSIZE64
}TEXTHSIZE;

// TEXTURE V(ertical) SIZE
typedef enum {
     TEXTVSIZE8 = 0,
     TEXTVSIZE16,
     TEXTVSIZE32,
     TEXTVSIZE64
}TEXTVSIZE;

// TEXTURE FLIP
typedef enum {
    TEXTNOFLIP = 0,
    TEXTHFLIP,
    TEXTVFLIP,
    TEXTBOTHFLIP
}TEXTFLIP;

// TYEXTURE COLOR DEPTH
typedef enum {
    TEXTCOLOR4 = 0,
    TEXTCOLOR16,
    TEXTCOLOR64,
    TEXTCOLOR256,
    TEXTCOLOR555
}TEXTCOLOR;

// TYEXTURE MODE
typedef enum {
    TEXTPART = 0,
    TEXTBITMAP}
TEXTMODE;

typedef enum {
    RomAccessCycle0 = 0,
    RomAccessCycle1,
	RomAccessCycle2,
	RomAccessCycle3
}ACCESSCYCLE;

typedef enum {
    Depth0 = 0,
    Depth1,
    Depth2,
    Depth3
}Depth;

typedef enum {
    Palette0 = 0,
    Palette1,
    Palette2,
    Palette3,
    Palette4,
    Palette5,
    Palette6,
    Palette7,
	Palette8,
	Palette9,
	Palette10,
	Palette11,
	Palette12,
	Palette13,
	Palette14,
	Palette15
}Palette;

typedef enum {
    NoFlip = 0,
    HFlip,
    VFlip,
    BothFlip
}Flip;


//======================================================================================================
//	Define SPRITE struct 
//======================================================================================================

// Max Sprite number 
#define SP_MAX		512

//Setting for sprite attribute
#define		SPBLEND_DISABLE	    0
#define		SPBLEND_ENABLE	    1	
#define		SP_DEPTH0			0
#define		SP_DEPTH1 			1
#define		SP_DEPTH2 			2
#define		SP_DEPTH3 			3
#define		SP_PALETTE0 		0
#define		SP_PALETTE1 		1
#define		SP_PALETTE2 		2
#define		SP_PALETTE3 		3
#define		SP_PALETTE4 		4
#define		SP_PALETTE5 		5
#define		SP_PALETTE6 		6
#define		SP_PALETTE7 		7
#define		SP_PALETTE8 		8
#define		SP_PALETTE9 		9
#define		SP_PALETTE10 		10
#define		SP_PALETTE11 		11
#define		SP_PALETTE12 		12
#define		SP_PALETTE13 		13
#define		SP_PALETTE14 		14
#define		SP_PALETTE15 		15
#define		SP_VSIZE8 			0
#define		SP_VSIZE16 			1
#define		SP_VSIZE32 			2
#define		SP_VSIZE64 			3
#define		SP_HSIZE8 			0
#define		SP_HSIZE16 			1
#define		SP_HSIZE32 			2
#define		SP_HSIZE64 			3
#define		SPVFLIP_DISABLE 	0
#define		SPVFLIP_ENABLE 	    1
#define		SPHFLIP_DISABLE 	0	
#define		SPHFLIP_ENABLE 	    2
#define		SP_COLOR4 			0
#define		SP_COLOR16 		    1
#define		SP_COLOR64 		    2
#define		SP_COLOR256 		3

//modify by Robin.Lau 06-05-09
typedef struct // SPRITE_T
{
	INT16 offx;			// X Offset Position
	INT16 offy;			// Y Offset Position
	union
	{
		struct
		{
			UINT16	Color		:2;
			UINT16	Flip		:2;
			UINT16	HSize		:2;
			UINT16	VSize		:2;
			UINT16	Palette  	:5;
			UINT16	Depth		:2;
			UINT16	Blend    	:1;
		}B;
		UINT16 W;
	}Attribute;
	int *pCell;
} SPRITE_T;
//end add


#endif //SCOREIDE_TYPE_H_11942_2995__INCLUDED_

⌨️ 快捷键说明

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