gamesettings.h

来自「VIGASOCO (VIdeo GAmes SOurce COde) Windo」· C头文件 代码 · 共 50 行

H
50
字号
// GameSettings.h
//
//	Class that has the current settings (DIPSW dependant) and processes coins
//
/////////////////////////////////////////////////////////////////////////////

#ifndef _GAME_SETTINGS_H_
#define _GAME_SETTINGS_H_


enum CoinsPerCredit {
	COINS = 0,
	CREDITS = 1
};

class GameSettings
{
protected:
	// for new credit check
	int accumulatedCoins;
	int coinsInserted;
	int lastServices, lastCoins1, lastCoins2;

// fields
public:
	int credits;

	// settings
	int coinsPerCredit[2];
	int lives;
	int bonusLife;
	bool alternateGhostNames;
	int *difficulty;

// methods:
protected:
	void checkForCredit();

public:
	void getSettings();
	void checkForCoinInserted();
	void checkForNewCredit();

	// initialization and cleanup
	GameSettings();
	~GameSettings();
	void resetState();
};

#endif	// _GAME_SETTINGS_H_

⌨️ 快捷键说明

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