BIN
Graphics/UI/map/c1_boss.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/c1_fair.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/c1_l1.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/c1_l2.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/c1_l3.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/c1_l4.tga
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Graphics/UI/map/map_background.tga
Normal file
After Width: | Height: | Size: 277 KiB |
|
@ -45,6 +45,13 @@ loadingscreens/pineapple.gfx
|
||||||
loadingscreens/pizza.gfx
|
loadingscreens/pizza.gfx
|
||||||
loadingscreens/teenage.gfx
|
loadingscreens/teenage.gfx
|
||||||
memcard/memhead.bin
|
memcard/memhead.bin
|
||||||
|
ui/map/map_background.gfx
|
||||||
|
ui/map/c1_l1.gfx
|
||||||
|
ui/map/c1_l2.gfx
|
||||||
|
ui/map/c1_l3.gfx
|
||||||
|
ui/map/c1_l4.gfx
|
||||||
|
ui/map/c1_boss.gfx
|
||||||
|
ui/map/c1_fair.gfx
|
||||||
|
|
||||||
levels/CHAPTER01_LEVEL01.Lvl
|
levels/CHAPTER01_LEVEL01.Lvl
|
||||||
levels/CHAPTER01_LEVEL01.Tex
|
levels/CHAPTER01_LEVEL01.Tex
|
||||||
|
|
|
@ -151,6 +151,8 @@ level_src := level \
|
||||||
|
|
||||||
locale_src := textdbase
|
locale_src := textdbase
|
||||||
|
|
||||||
|
map_src := map
|
||||||
|
|
||||||
mem_src := memory
|
mem_src := memory
|
||||||
|
|
||||||
memcard_src := md5 \
|
memcard_src := md5 \
|
||||||
|
|
23
makefile.gfx
|
@ -370,6 +370,29 @@ GRAF_DIRS_TO_MAKE += $(BACKDROPS_OUT_DIR)
|
||||||
GFX_DATA_OUT += $(BACKDROPS_OUT)
|
GFX_DATA_OUT += $(BACKDROPS_OUT)
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Map screens
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
MAPSCREENS_IN_DIR := $(GRAF_DIR)/ui/map
|
||||||
|
MAPSCREENS_IN := map_background \
|
||||||
|
c1_l1 c1_l2 c1_l3 c1_l4 c1_boss c1_fair
|
||||||
|
|
||||||
|
MAPSCREENS_OUT_DIR := $(DATA_OUT)/ui/map
|
||||||
|
MAPSCREENS_OUT := $(foreach SCREEN,$(MAPSCREENS_IN),$(MAPSCREENS_OUT_DIR)/$(SCREEN).gfx)
|
||||||
|
|
||||||
|
MAPSCREENS : $(MAPSCREENS_OUT)
|
||||||
|
|
||||||
|
cleanmapscreens:
|
||||||
|
@$(RM) -f $(MAPSCREENS_OUT)
|
||||||
|
@$(ECHO) Map screens Cleaned
|
||||||
|
|
||||||
|
$(MAPSCREENS_OUT_DIR)/%.gfx : $(MAPSCREENS_IN_DIR)/%.tga
|
||||||
|
@$(TGA2GFX) $< $@
|
||||||
|
|
||||||
|
GRAF_DIRS_TO_MAKE += $(MAPSCREENS_OUT_DIR)
|
||||||
|
GFX_DATA_OUT += $(MAPSCREENS_OUT)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Loading screens
|
# Loading screens
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Includes
|
Includes
|
||||||
-------- */
|
-------- */
|
||||||
|
|
||||||
#include "backend\map.h"
|
#include "map\map.h"
|
||||||
|
|
||||||
#ifndef __GFX_FONT_H__
|
#ifndef __GFX_FONT_H__
|
||||||
#include "gfx\font.h"
|
#include "gfx\font.h"
|
||||||
|
@ -38,6 +38,14 @@
|
||||||
#include "gfx\fader.h"
|
#include "gfx\fader.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VID_HEADER_
|
||||||
|
#include "system\vid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _FILEIO_HEADER_
|
||||||
|
#include "fileio\fileio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -75,15 +83,62 @@ CMapScene MapScene;
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MAP_PARCHMENT_WIDTH=496,
|
||||||
|
MAP_PARCHMENT_HEIGHT=190,
|
||||||
|
MAP_PARCHMENT_START_X=(512-MAP_PARCHMENT_WIDTH)/2,
|
||||||
|
MAP_PARCHMENT_START_Y=20,
|
||||||
|
|
||||||
|
MAP_LEVEL_WIDTH=140,
|
||||||
|
MAP_LEVEL_HEIGHT=60,
|
||||||
|
};
|
||||||
|
int MAP_LEVEL_TOP_BORDER=20;
|
||||||
|
int MAP_LEVEL_Y_SPACING=10;
|
||||||
|
int MAP_LEVEL_X_SPACING=4;
|
||||||
|
|
||||||
|
|
||||||
|
int s_levelMaps[6]=
|
||||||
|
{
|
||||||
|
MAP_C1_L1_GFX,
|
||||||
|
MAP_C1_L2_GFX,
|
||||||
|
MAP_C1_L3_GFX,
|
||||||
|
MAP_C1_L4_GFX,
|
||||||
|
MAP_C1_BOSS_GFX,
|
||||||
|
MAP_C1_FAIR_GFX,
|
||||||
|
};
|
||||||
|
|
||||||
void CMapScene::init()
|
void CMapScene::init()
|
||||||
{
|
{
|
||||||
m_font=new ("game over font") FontBank();
|
m_font=new ("map screen font") FontBank();
|
||||||
m_font->initialise(&standardFont);
|
m_font->initialise(&standardFont);
|
||||||
m_font->setJustification(FontBank::JUST_CENTRE);
|
m_font->setJustification(FontBank::JUST_CENTRE);
|
||||||
m_font->setOt(10);
|
m_font->setOt(5);
|
||||||
|
|
||||||
m_readyToExit=false;
|
m_readyToExit=false;
|
||||||
CFader::setFadingIn(CFader::BLACK_FADE);
|
// CFader::setFadingIn(CFader::BLACK_FADE);
|
||||||
|
|
||||||
|
// Generate the map background image
|
||||||
|
int i,x,y,xpos,ypos;
|
||||||
|
m_screenImage=MemAlloc(512*256*2,"MapScreen");
|
||||||
|
memset(m_screenImage,0,512*256*2);
|
||||||
|
copyImageToScreen(MAP_MAP_BACKGROUND_GFX,MAP_PARCHMENT_START_X,MAP_PARCHMENT_START_Y,MAP_PARCHMENT_WIDTH,MAP_PARCHMENT_HEIGHT);
|
||||||
|
i=0;
|
||||||
|
ypos=MAP_PARCHMENT_START_Y+MAP_LEVEL_TOP_BORDER;
|
||||||
|
for(y=0;y<2;y++)
|
||||||
|
{
|
||||||
|
xpos=256-((MAP_LEVEL_WIDTH*3)/2)-MAP_LEVEL_X_SPACING;
|
||||||
|
for(x=0;x<3;x++)
|
||||||
|
{
|
||||||
|
if(isLevelOpen
|
||||||
|
copyImageToScreen(s_levelMaps[i],xpos,ypos,MAP_LEVEL_WIDTH,MAP_LEVEL_HEIGHT);
|
||||||
|
i++;
|
||||||
|
xpos+=MAP_LEVEL_WIDTH+MAP_LEVEL_X_SPACING;
|
||||||
|
}
|
||||||
|
ypos+=MAP_LEVEL_HEIGHT+MAP_LEVEL_Y_SPACING;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetScreenImage((u8*)m_screenImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,6 +150,8 @@ void CMapScene::init()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::shutdown()
|
void CMapScene::shutdown()
|
||||||
{
|
{
|
||||||
|
ClearScreenImage();
|
||||||
|
MemFree(m_screenImage);
|
||||||
m_font->dump(); delete m_font;
|
m_font->dump(); delete m_font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,13 +164,6 @@ void CMapScene::shutdown()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CMapScene::render()
|
void CMapScene::render()
|
||||||
{
|
{
|
||||||
POLY_F4 *f4;
|
|
||||||
|
|
||||||
f4=GetPrimF4();
|
|
||||||
setXYWH(f4,0,0,512,256);
|
|
||||||
setRGB0(f4,0,0,0);
|
|
||||||
AddPrimToList(f4,20);
|
|
||||||
|
|
||||||
m_font->setColour(255,255,255);
|
m_font->setColour(255,255,255);
|
||||||
m_font->print(256,100,"MAP SCREEN!!!");
|
m_font->print(256,100,"MAP SCREEN!!!");
|
||||||
}
|
}
|
||||||
|
@ -132,7 +182,7 @@ void CMapScene::think(int _frames)
|
||||||
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
||||||
{
|
{
|
||||||
m_readyToExit=true;
|
m_readyToExit=true;
|
||||||
CFader::setFadingOut(CFader::BLACK_FADE);
|
// CFader::setFadingOut(CFader::BLACK_FADE);
|
||||||
GameState::setNextScene(&FrontEndScene);
|
GameState::setNextScene(&FrontEndScene);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,5 +201,31 @@ int CMapScene::readyToShutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CMapScene::copyImageToScreen(int _file,int _x,int _y,int _w,int _h)
|
||||||
|
{
|
||||||
|
u8 *image;
|
||||||
|
u16 *src,*dst;
|
||||||
|
int x,y;
|
||||||
|
|
||||||
|
image=CFileIO::loadFile((FileEquate)_file);ASSERT(image);
|
||||||
|
src=(u16*)image;
|
||||||
|
dst=(u16*)m_screenImage+(_x+(_y*512));
|
||||||
|
for(y=0;y<_h;y++)
|
||||||
|
{
|
||||||
|
for(x=0;x<_w;x++)
|
||||||
|
{
|
||||||
|
*dst++=*src++;
|
||||||
|
}
|
||||||
|
dst+=512-_w;
|
||||||
|
}
|
||||||
|
MemFree(image);
|
||||||
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
end */
|
end */
|
|
@ -46,9 +46,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void copyImageToScreen(int _file,int _x,int _y,int _w,int _h);
|
||||||
|
|
||||||
|
|
||||||
class FontBank *m_font;
|
class FontBank *m_font;
|
||||||
int m_readyToExit;
|
int m_readyToExit;
|
||||||
|
|
||||||
|
char *m_screenImage;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,10 @@
|
||||||
#include "backend\complete.h"
|
#include "backend\complete.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MAP_MAP_H__
|
||||||
|
#include "map\map.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -84,6 +88,7 @@ CScene *CSceneSelector::s_sceneList[]=
|
||||||
&FrontEndScene,
|
&FrontEndScene,
|
||||||
&GameOverScene,
|
&GameOverScene,
|
||||||
&GameCompletedScene,
|
&GameCompletedScene,
|
||||||
|
&MapScene,
|
||||||
};
|
};
|
||||||
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
||||||
|
|
||||||
|
|
|
@ -1512,6 +1512,18 @@ SOURCE=..\..\..\source\hazard\hsaw.cpp
|
||||||
SOURCE=..\..\..\source\hazard\hsaw.h
|
SOURCE=..\..\..\source\hazard\hsaw.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
|
# Begin Group "map"
|
||||||
|
|
||||||
|
# PROP Default_Filter ""
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\map\map.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\map\map.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "makefiles"
|
# Begin Group "makefiles"
|
||||||
|
|
||||||
|
|