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

📄 gameplay.h

📁 凌阳32位单片机开发的小游戏
💻 H
字号:
/******************************************************************************
 *
 *     The information contained herein is the exclusive property of
 *   Sunplus Technology Co. And shall not be distributed, reproduced,
 *   or disclosed in whole in part without prior written permission.
 *
 *         (C) COPYRIGHT 2005   SUNPLUS TECHNOLOGY CO.
 *                        ALL RIGHTS RESERVED
 *
 * The entire notice above must be reproduced on all authorized copies.
 *
 *****************************************************************************/

/******************************************************************************
 *  Filename:   	GamePlay.h
 *  Author:     	Robin.xjliu  (eMail: xjliu@sunplus.com)
 *  Tel:        	00885-028-87848688-5884
 *  Date:       	2005-11-15
 *  Description:	the header of GamePlay.c
 *  Reference:
 *  Version history:
 *-----------------------------------------------------------------------------
 *	Version   YYYY-MM-DD-INDEX   Modified By         Description
 *	1.0.0     2005-11-15           xjliu               Create
 *
 *****************************************************************************/
#ifndef _GAME_PLAY_H
#define _GAME_PLAY_H

#include "GameMain.h"
#include "Game_LCD.h"
#include "../EngineLib/Include/E_Event.h"
#include "../SysLib_Extend/Include/Csi.h"

/**
 * play state define
 */
#define PLAY_INIT		0
#define PLAY_LOOP		1
#define PLAY_RELIVE		2
#define PLAY_MENU		3
#define PLAY_COMPLETE	4
#define PLAY_END		5

#define PLAY_MAX_VEL	28
#define PLAY_MAX_ACC	36

#define TO_LEFT		0x00
#define TO_RIGHT	0x01
#define TO_UP		0x00
#define TO_DOWN		0x01

#define LEVEL1		0x01
#define LEVEL2		0x02
#define LEVEL3		0x03

#define BLOCK_X			200
#define BLOCK_Y			150
#define ACTOR0_WIDTH	80
#define ACTOR0_HEIGHT	96

#define ST_HIDE			0x00
#define ST_LEFTMOVE		0x01
#define ST_RIGHTMOVE	0x02
#define ST_L2R			0x03
#define ST_R2L			0x04
#define ST_LEFTEAT		0x05
#define ST_RIGHTEAT		0x06
#define ST_LEFTDURP		0x07
#define ST_RIGHTDURP	0x08
#define ST_LEFTCRAZY	0x09
#define ST_RIGHTCRAZY	0x0A
#define ST_LEFTELECT	0x0B
#define ST_RIGHTELECT	0x0C
#define ST_DEATH		0x0D

#define SCORE_RATE		5

/**
 * player info define
 */
/*typedef union
{
	U16 W;
	struct
	{
		U16 Vx			:6;	//step index
		U16 Vy			:6;	//step index
		U16 Ax			:1;	//direction X: 0 - left; 1 - right;
		U16 Ay			:1;	//direction Y: 0 - up; 1 - down;
		U16 Reserved	:2;
	}B;
}PLAYER_INFO;*/

extern MOTION *pPlayer;
extern bool	g_bMoveFlag_X;
extern bool	g_bMoveFlag_Y;
extern U8	g_nPlayerVx;
extern U8	g_nPlayerVy;
extern U8	g_nPlayerAx;
extern U8	g_nPlayerAy;
extern U8	g_nScreenStep_X;
extern U8	g_nScreenStep_Y;
extern U8	g_nPlayerLevel;
extern U8	g_nPlayerState;
extern U8	g_nOldPlayerState;
extern U8	g_nText3Mode;

extern const U16 PlayStep[];
//extern const U8 aActorState[];
extern const S8 pScanline[];

GAMESTATE BW_Play(void);
void Play_ProcessInput(void);

#endif	//_GAME_PLAY_H


⌨️ 快捷键说明

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