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

📄 gamemp4.c

📁 SPG290 SD卡源程序 是一个基于game开发的嵌入式的平台 ,是sunplus公司推出的32bit平台, 该程序是在SPG290上读写SD卡的程序
💻 C
字号:
/******************************************************************************
 *
 *     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:   	GameMP4.c
 *  Author:     	Robin.xjliu  (eMail: xjliu@sunplus.com)
 *  Tel:        	00885-028-87848688-5884
 *  Date:       	2005-11-22
 *  Description:	play a mp4
 *  Reference:
 *  Version history:
 *-----------------------------------------------------------------------------
 *	Version   YYYY-MM-DD-INDEX   Modified By         Description
 *	1.0.0     2005-11-22           xjliu               Create
 *
 *****************************************************************************/
#include "Include/GameMP4.h"
//#include "../GameData/MotionData.h"

U8 nMp4State;

#define	MP4INIT	0
#define	MP4CIF	1
#define	MP4VGA	2
#define	MP4END	3

#define CIFMODE	0
#define VGAMODE	1

//add by xjliu for load bin data from SD Card
const LOAD_INFO LoadVGAInfo[] =
{
 	{".\\Index_Text1.bin"		, TEXT1_PNT_ADDR	, O_RDONLY, 0x4000  },//O_CREAT
	{".\\Index_Text2.bin"		, TEXT2_PNT_ADDR	, O_RDONLY, 0x4000  },
	{".\\Index_Text3.bin"		, TEXT3_PNT_ADDR	, O_RDONLY, 0x4000  },
 	{".\\Pixel_Text1.bin"		, TEXT1_PGT_ADDR	, O_RDONLY, 0x100000},
	{".\\Pixel_Text2.bin"		, TEXT2_PGT_ADDR	, O_RDONLY, 0x100000},
	{".\\Pixel_Text3.bin"		, TEXT3_PGT_ADDR	, O_RDONLY, 0x100000},
	{".\\Palette.bin"	 		, BG_PAL_ADDR   	, O_RDONLY, 0x4000  },
	{".\\TextHeader.bin" 		, TEXT_HEADER_ADDR	, O_RDONLY, 0x8000  },
};

/**
 * BW_Play - game play main loop
 */
GAMESTATE BW_PlayMP4(void)
{
	U8 mode;
//	U8 layer;

	nMp4State = MP4INIT;
	mode = VGAMODE;
   
	while(1)
	{ 
		//Check State 
		switch(nMp4State)
		{
		case MP4INIT:
			Sys_Load_SDCard(&LoadVGAInfo, ASZ(LoadVGAInfo));//VGA
			nMp4State = MP4VGA;
			InitSystem();
			break;
		case MP4CIF:
			WaitBlanking();
			break;
		case MP4VGA:
			WaitBlanking();
			break;
		case MP4END:
			//FadeOut();
			nMp4State = MP4INIT;
			WaitBlanking();
			break;
		}
	}
	return BW_INIT;//reload data
}

⌨️ 快捷键说明

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