showlist.cpp
来自「迷宫游戏VC++源代码 界面很不错」· C++ 代码 · 共 41 行
CPP
41 行
// 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 + =
减小字号Ctrl + -
显示快捷键?