bbitmap.h
来自「用VC++及DirectX实现的SuperMario小游戏」· C头文件 代码 · 共 39 行
H
39 行
/*
Author: Bear
This source is free to anybody.
If you have any problem with this or some advice to me, please:
mailto: heyang22118952.student@sina.com
or yang45249.student@sina.com
or you can contact me through my QQ: 261570581
Welcome to discuss game programming techniques with me :)
And I like to play games!
*/
#pragma once
#include "BHeader.h"
#define BITMAP_ID 0x4d42
class BDLL_API BBitmap
{
public:
BBitmap(void);
~BBitmap(void);
UCHAR* GetBuffer(void);
int GetWidth(void);
int GetHeight(void);
bool Load(char* fileName);
void UnLoad(void);
int GetBitCount(void);
LPPALETTEENTRY GetPalette(void);
private:
BITMAPFILEHEADER bmFileHeader; // this contains the bitmapfile header
BITMAPINFOHEADER bmInfoHeader; // this is all the info including the palette
PALETTEENTRY palette[256]; // we will store the palette here
UCHAR *buffer; // this is a pointer to the data
void Flip(void);
bool loaded;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?