SBSPSS/source/map/map.h

133 lines
2.9 KiB
C
Raw Normal View History

2001-04-24 18:15:04 +02:00
/*=========================================================================
map.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __MAP_MAP_H__
#define __MAP_MAP_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __SYSTEM_GSTATE_H__
#include "system\gstate.h"
#endif
2001-04-25 01:14:50 +02:00
#ifndef _GLOBAL_HEADER_
#include "system\global.h" // Doh.. just for DVECTOR :/
#endif
2001-04-24 18:15:04 +02:00
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CMapScene: public CScene
{
public:
void init();
void shutdown();
void render();
void think(int _frames);
int readyToShutdown();
char *getSceneName() {return"Map";}
private:
2001-04-25 20:15:19 +02:00
enum
{
2001-05-30 16:58:29 +02:00
MAP_PARCHMENT_WIDTH=512,
MAP_PARCHMENT_HEIGHT=256,
MAP_PARCHMENT_START_X=0,
MAP_PARCHMENT_START_Y=0,
2001-04-25 20:15:19 +02:00
MAP_LEVEL_WIDTH=140,
MAP_LEVEL_HEIGHT=60,
2001-05-31 23:17:33 +02:00
MAP_INSTRUCTIONS_YSTART=173,
MAP_INSTRUCTIONS_BUTTON_Y_OFFSET=3,
MAP_INSTRUCTIONS_TEXT_R=128,
MAP_INSTRUCTIONS_TEXT_G=64,
MAP_INSTRUCTIONS_TEXT_B=64,
MAP_INSTRUCTIONS_GAP_BETWEEN_BUTTONS=5,
MAP_INSTRUCTIONS_GAP_BETWEEN_BUTTONS_AND_TEXT=10,
MAP_INSTRUCTIONS_Y_SPACE_BETWEEN_LINES=15,
2001-05-30 16:58:29 +02:00
MAP_NUM_CHAPTERS=5,
MAP_NUM_LEVELS_PER_CHAPTER=5,
2001-04-25 20:15:19 +02:00
};
typedef struct
{
2001-05-30 16:58:29 +02:00
int m_mapFile;
int m_globalLevelNumber;
2001-05-31 23:17:33 +02:00
int m_spatulaOrTokenCounts;
2001-05-30 16:58:29 +02:00
int m_questItemFrame;
int m_kelpWorldLevel;
2001-04-25 20:15:19 +02:00
} sMapLevelData;
2001-05-31 23:17:33 +02:00
void renderPointer();
void renderInstructions();
2001-04-25 20:15:19 +02:00
void generateMapScreenImage();
2001-04-24 21:37:12 +02:00
void copyImageToScreen(int _file,int _x,int _y,int _w,int _h);
2001-04-25 20:15:19 +02:00
DVECTOR getPointerTargetPosition();
2001-05-30 16:58:29 +02:00
int isLevelOpen(unsigned int _chapter,unsigned int _level);
int getSpatulaCollectedCount(unsigned int _chapter,unsigned int _level);
int hasQuestItemBeenCollected(unsigned int _chapter,unsigned int _level);
2001-04-24 21:37:12 +02:00
2001-04-24 18:15:04 +02:00
class FontBank *m_font;
int m_readyToExit;
2001-04-24 21:37:12 +02:00
char *m_screenImage;
2001-04-25 01:14:50 +02:00
int m_currentChapterSelection;
int m_currentLevelSelection;
DVECTOR m_pointerPos;
DVECTOR m_pointerTarget;
int m_pointerSin;
2001-05-31 23:17:33 +02:00
int m_pointerArrivedAtTarget;
2001-04-25 01:14:50 +02:00
2001-05-30 16:58:29 +02:00
static sMapLevelData s_mapLevelData[MAP_NUM_CHAPTERS][MAP_NUM_LEVELS_PER_CHAPTER];
static DVECTOR s_mapLevelPositions[MAP_NUM_LEVELS_PER_CHAPTER];
2001-04-25 20:15:19 +02:00
2001-04-24 18:15:04 +02:00
};
/*----------------------------------------------------------------------
Globals
------- */
extern CMapScene MapScene;
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __MAP_MAP_H__ */
/*===========================================================================
end */