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

📄 cfireroutine.h

📁 用vc编写出类似于JAVA应用中的水纹、火焰以及熔浆效果
💻 H
字号:
// CFireRoutine.h: interface for the CFireRoutine class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CFIREROUTINE_H__413FF819_B711_4B5A_8EC1_580A70862BE4__INCLUDED_)
#define AFX_CFIREROUTINE_H__413FF819_B711_4B5A_8EC1_580A70862BE4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <Windows.h>

class CFireRoutine  
{
public:
	CFireRoutine();
	virtual ~CFireRoutine();

	// Functs (public)

	void		InitFire();
	void		ClrHotSpots();
	void		InitPallette();
	void		SetHotSpots();
	void		MakeLines();
	void		Render(DWORD* pVideoMemory,
		                 int iwidth, 
						 int iheight);


	unsigned char	Average(int x, int y);

	// props
	int			m_iFlameHeight;
	int			m_iWidth;
	int			m_iHeight;
	int			m_iFireSource;//The y position for the lit spots
	int			m_iFireChance;
	int			m_iAvgFlameWidth;
	int			m_iAlpha;

	COLORREF	m_FireColors[4];

	BYTE*	m_pFireBits;
	DWORD   m_pPalletteBuffer[256];
	long*	m_pYIndexes;


};

#endif // !defined(AFX_CFIREROUTINE_H__413FF819_B711_4B5A_8EC1_580A70862BE4__INCLUDED_)

⌨️ 快捷键说明

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