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

📄 sfxmgr.h

📁 Blood 2全套源码
💻 H
字号:
// ----------------------------------------------------------------------- //
//
// MODULE  : SFXMgr.h
//
// PURPOSE : Special FX Mgr	- Definition
//
// CREATED : 10/24/97
//
// ----------------------------------------------------------------------- //

#ifndef __SFX_MGR_H__
#define __SFX_MGR_H__

#include "cpp_client_de.h"
#include "SpecialFXList.h"
#include "SFXMsgIds.h"


#define DYN_ARRAY_SIZE		9

#define STATIC_LIST_SIZE	50
#define	CAMERA_LIST_SIZE	20

#define BULLET_LIST_INDEX	1


class CSFXMgr
{
	public :

		CSFXMgr()  { m_pClientDE = DNULL; }
		~CSFXMgr() {}

		DBOOL	Init(CClientDE* pClientDE);

		void	RemoveSpecialFX(HLOCALOBJ hObj);
		void	UpdateSpecialFX();
		void	HandleSFXMsg(HLOCALOBJ hObj, HMESSAGEREAD hMessage, DBYTE nId);
		CSpecialFX* FindStaticSpecialFX(HLOCALOBJ hObj);
		CSpecialFX* FindDynamicSpecialFX(HLOCALOBJ hObj);
		CSpecialFXList* GetCameraFXList() { return &m_cameraSFXList; }
		CSpecialFXList* GetBulletHoleFXList() { return &m_dynSFXLists[BULLET_LIST_INDEX]; }

		void	RemoveAll();

		CSpecialFX*	CreateSFX(DBYTE nId, SFXCREATESTRUCT *psfxCreateStruct, DBOOL bStatic=DFALSE, CSpecialFX* pParentFX=DNULL);

	private :

		void	AddDynamicSpecialFX(CSpecialFX* pSFX, DBYTE nId, CSpecialFX* pParent = DNULL);
		void 	UpdateDynamicSpecialFX();
		void	RemoveDynamicSpecialFX(HOBJECT hObj);
		void	RemoveAllDynamicSpecialFX();

		int				GetDynArrayIndex(DBYTE nFXId);
		unsigned int	GetDynArrayMaxNum(DBYTE nArrayIndex);

		CClientDE*		m_pClientDE;

		CSpecialFXList  m_dynSFXLists[DYN_ARRAY_SIZE]; // Lists of dynamic special fx
		CSpecialFXList	m_staticSFXList;				// List of static special fx
		CSpecialFXList	m_cameraSFXList;				// List of camera special fx
		CSpecialFXList	m_termSFXList;					// slow terminating FX
};

#endif // __SFX_MGR_H__

⌨️ 快捷键说明

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