loadimagefile.cpp

来自「游戏编程精华02-含有几十个游戏编程例子」· C++ 代码 · 共 28 行

CPP
28
字号
#include "priv_precompiled.h"

/*
Copyright 2001 Bruce Dawson, Cygnus Software
For more information, visit http://www.cygnus-software.com/papers/
or e-mail: comments@cygnus-software.com

This code may be redistributed as long as this notice is kept intact.
*/

#include "csbitmap.h"

bool LoadImageFile(const char* FileName, CSBitmap* DestBitmap)
{
	// Yes, I know this is really crude. I should at least check the
	// extensions or something. Oh well...
	if (LoadBMPFile(FileName, DestBitmap))
		return true;

	//if (LoadTargaFile(FileName, DestBitmap))
	//	return true;

	if (LoadPCXFile(FileName, DestBitmap))
		return true;

	return false;
}

⌨️ 快捷键说明

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