upm_game.h

来自「C++课程大学作业的一次任务」· C头文件 代码 · 共 55 行

H
55
字号
////////////////////////////////
//      UPM_GAME.H
//
// HEADER FILE OF MAIN
// GAME PROCESS FUNCTIONS
//
// PROJECT: Ultra Pac Man
// PROGRAMER: Mal
// LAST UPDATED: Nov. 28th 2001
////////////////////////////////

#include "m_common.h"
#include "m_map.h"
#include "m_entity.h"

#ifndef UPM_GAME
 #define UPM_GAME

//check if sprite EATEN the NORMALDOT,returns M_TRUE if have dots left
//returns M_FALSE if all normal dots in the current map have been finished
extern MonsterNode* pMonsterHead;

bool NormalDotCheck(M_Map* map,M_Sprite* sprite,bool isInit=M_FALSE);
void PrintMap();


struct ItemNode
{
	M_Item* thisItem;
	ItemNode* nextItem;
};


//scans map for M_Item objects, build item link table
bool InitItems(M_Map* map=thisMap);
//check item link table if one item should be actived
bool CheckItems(M_Sprite* sprite, MonsterNode* monsters=pMonsterHead, M_Map* map=thisMap);
//clear item link table
void KillItems();

//create monsters equals the MRP in the map, add them to a link table
bool InitMonsters(M_Map* map=thisMap);
//check monster link table
bool CheckMonsters(M_Map* map=thisMap);
//clear monser link table
void KillMonsters();

//Collision check
bool CheckCollision(M_Sprite* sprite=thisSprite, MonsterNode* monsters=pMonsterHead, M_Map* map=thisMap);
//Extra AI function
bool AI(M_Sprite* sprite=thisSprite,MonsterNode* monsters=pMonsterHead, M_Map* map=thisMap);

#endif

⌨️ 快捷键说明

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