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

📄 swegame.h

📁 用VC++及DirectX实现的SuperMario小游戏
💻 H
字号:
/*
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 "../SuperMarioDemo.h"
#include "../SMap.h"
#include "../SSprite.h"
#include "../SSpriteManager.h"
#include "../SSpriteFactory.h"

#define SURFACE_NONE 0
#define SURFACE_MAP 1
#define SURFACE_SPRITE 2

class SWEGame : public BGame
{
public:
	SWEGame(void);
	virtual ~SWEGame(void);
	virtual int Initialize(HINSTANCE hInstance, HWND hwndMain, bool windowMode, int screenWidth, int screenHeight, int screenBpp);
	virtual int ShutDown(void);
protected:
	virtual bool ProcessInput(void);
	virtual bool RunGameLogic(void);
	virtual bool DrawScreen(void);
private:
	BBitmap bitmap;
	BPolygon* m_pPoly;
	BDirectDrawSurface* selectedSurface;
	int selectedSurfaceType;
	int selectedIndex;
	char printBuffer[255];

	SMap mapLevel1;	//Encapsulate map of the world.
	SSpriteFactory spriteFactory;	//use this to create sprites
	SSpriteManager spriteManager;	//use this to manage sprites
	int mouseX, mouseY;
};

⌨️ 快捷键说明

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