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

📄 showlist.cpp

📁 迷宫游戏VC++源代码 界面很不错
💻 CPP
字号:
// ShowList.cpp: implementation of the CShowList class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ShowList.h"
#include "AnimCtrl.h"
//=======================================================================
CShowList::CShowList(){}
CShowList::~CShowList(){}
//====================================================================
void	CShowList::Add(CAnimCtrl* p)
{
	int d=p->GetDepth();
	if(d<0) d=0;
	if(d>9)	d=9;
	m_List[d].push_back(p);
}
void	CShowList::Remove(CAnimCtrl*p)
{
	int d=p->GetDepth();
	if(d<0) d=0;
	if(d>9)	d=9;
	m_List[d].remove(p);
}
void	CShowList::ShowAllAnim(CBmp24*p)
{
	p->MemsetBits(0);
	std::list<CAnimCtrl*>::const_iterator cp;
	for(int i=0;i<10;i++)
	for(cp=m_List[i].begin();cp!=m_List[i].end();cp++)
	{
		(*cp)->Draw(p);//动画控制类的那个显示函数
	}

}
void	CShowList::ClearAllAnim()
{
	for(int i=0;i<10;i++)
	m_List[i].clear();
}

⌨️ 快捷键说明

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