2001-01-10 22:43:17 +01:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
gameslot.h
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
2001-01-10 23:03:20 +01:00
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
2001-01-10 22:43:17 +01:00
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __GAME_GAMESLOT_H__
|
|
|
|
#define __GAME_GAMESLOT_H__
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
|
|
|
class CGameSlotManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
INITIAL_LIVES=4,
|
|
|
|
INITIAL_CONTINUES=3,
|
|
|
|
|
|
|
|
NUM_GAME_SLOTS=4,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-01-11 16:51:31 +01:00
|
|
|
int m_isInUse;
|
2001-01-10 22:43:17 +01:00
|
|
|
int m_lives;
|
|
|
|
int m_continues;
|
|
|
|
int m_maxLevelCompleted;
|
|
|
|
} GameSlot;
|
|
|
|
|
|
|
|
|
|
|
|
static void init();
|
|
|
|
|
|
|
|
static void setActiveSlot(unsigned int _slot);
|
|
|
|
static GameSlot getSlotData();
|
|
|
|
static void setSlotData(GameSlot *_data);
|
|
|
|
|
|
|
|
static void eraseGameSlot(unsigned int _slot);
|
|
|
|
static void copyGameSlot(unsigned int _src,unsigned int _dest);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
static GameSlot s_gameSlots[NUM_GAME_SLOTS];
|
|
|
|
static GameSlot *s_currentGameSlot;
|
|
|
|
|
|
|
|
// These allow the CSaveLoadDatabase total access to the game slots
|
|
|
|
static void setSlotData(int _slot,GameSlot *_data);
|
|
|
|
static GameSlot getSlotData(int _slot);
|
|
|
|
friend class CSaveLoadDatabase;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Globals
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Functions
|
|
|
|
--------- */
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#endif /* __GAME_GAMESLOT_H__ */
|
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|