Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 64 KiB |
|
@ -2,6 +2,7 @@
|
|||
}
|
||||
sprites/sprites.spr
|
||||
shop/shop.spr
|
||||
party/party.spr
|
||||
|
||||
scripts/ch1l1_01.dat
|
||||
scripts/ch1l1_02.dat
|
||||
|
@ -58,6 +59,7 @@ backdrop/start3.gfx
|
|||
backdrop/start4.gfx
|
||||
backdrop/gameover.gfx
|
||||
backdrop/shop.gfx
|
||||
backdrop/partybackdrop.gfx
|
||||
loadingscreens/culture.gfx
|
||||
loadingscreens/karate.gfx
|
||||
loadingscreens/monitor.gfx
|
||||
|
|
|
@ -49,7 +49,8 @@ CD_FILESYS_LIB := CMXBoot
|
|||
#----------------------------------------------------------------------------
|
||||
|
||||
backend_src := gameover \
|
||||
complete
|
||||
complete \
|
||||
party
|
||||
|
||||
enemy_src := npc \
|
||||
npcdata \
|
||||
|
|
34
makefile.gfx
|
@ -309,7 +309,6 @@ SHOP_GFX_TRANS_IN := $(foreach FILE,$(SHOP_GFX_TRANS),$(SHOP_GFX_DIR)/$(FILE).b
|
|||
SHOP_GFX_TEX_OUT := $(SHOP_GFX_OUT_DIR)/shop.spr
|
||||
|
||||
SHOP_GFX_HDR_OUT := $(INC_DIR)/shop.h
|
||||
SHOP_GFX_REP_FILE :=
|
||||
|
||||
cleanshop:
|
||||
@$(RM) -f $(SHOP_GFX_TEX_OUT)
|
||||
|
@ -324,6 +323,37 @@ GRAF_DIRS_TO_MAKE += $(SHOP_GFX_OUT_DIR)
|
|||
GFX_DATA_OUT += $(SHOP_GFX_TEX_OUT)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Party pieces
|
||||
#----------------------------------------------------------------------------
|
||||
PARTY_GFX_DIR := $(GRAF_DIR)/party
|
||||
PARTY_GFX_OUT_DIR := $(DATA_OUT)/party
|
||||
|
||||
PARTY_GFX_TRANS := balloon1 balloon2 banner1 banner2 banner3 banner4 \
|
||||
bigcake jelly lefttable presents1 presents2 \
|
||||
sandwiches smallcakes table2 \
|
||||
toychest
|
||||
# leave this as last item - some of the code needs it :(
|
||||
PARTY_GFX_TRANS_IN := $(foreach FILE,$(PARTY_GFX_TRANS),$(PARTY_GFX_DIR)/$(FILE).bmp)
|
||||
|
||||
PARTY_GFX_TEX_OUT := $(PARTY_GFX_OUT_DIR)/party.spr
|
||||
|
||||
PARTY_GFX_HDR_OUT := $(INC_DIR)/party.h
|
||||
PARTY_GFX_REP_FILE := $(PARTY_GFX_OUT_DIR)/rep.txt
|
||||
|
||||
cleanparty:
|
||||
@$(RM) -f $(PARTY_GFX_TEX_OUT)
|
||||
@$(ECHO) Party Cleaned
|
||||
|
||||
party: $(PARTY_GFX_TEX_IN)
|
||||
$(PARTY_GFX_TEX_OUT) : $(PARTY_GFX_TEX_IN)
|
||||
@parkgrab -c- -z+ -r+ -q+ $(PARTY_GFX_TRANS_IN) -b+ -t:8,4,1 -l:$(REPORT_DIR)/party.lbm -o:$(PARTY_GFX_TEX_OUT) -k:$(PARTY_GFX_REP_FILE)
|
||||
@$(MV) -f $(PARTY_GFX_OUT_DIR)/party.h $(PARTY_GFX_HDR_OUT)
|
||||
|
||||
GRAF_DIRS_TO_MAKE += $(PARTY_GFX_OUT_DIR)
|
||||
GFX_DATA_OUT += $(PARTY_GFX_TEX_OUT)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------
|
||||
SPRITES_OUT_DIR := $(DATA_OUT)/sprites
|
||||
|
@ -411,7 +441,7 @@ GFX_DATA_OUT += $(TRANS_OUT_DAT)
|
|||
# Big TGA backdrops
|
||||
#----------------------------------------------------------------------------
|
||||
BACKDROPS_IN_DIR := $(GRAF_DIR)/backdrop
|
||||
BACKDROPS_IN := credits start1 start2 start3 start4 gameover shop
|
||||
BACKDROPS_IN := credits start1 start2 start3 start4 gameover shop partybackdrop
|
||||
|
||||
BACKDROPS_OUT_DIR := $(DATA_OUT)/backdrop
|
||||
BACKDROPS_OUT := $(foreach SCREEN,$(BACKDROPS_IN),$(BACKDROPS_OUT_DIR)/$(SCREEN).gfx)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*=========================================================================
|
||||
|
||||
gameover.cpp
|
||||
party.cpp
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
|
@ -16,11 +16,7 @@
|
|||
Includes
|
||||
-------- */
|
||||
|
||||
#include "backend\gameover.h"
|
||||
|
||||
#ifndef __GFX_FONT_H__
|
||||
#include "gfx\font.h"
|
||||
#endif
|
||||
#include "backend\party.h"
|
||||
|
||||
#ifndef __PAD_PADS_H__
|
||||
#include "pad\pads.h"
|
||||
|
@ -46,12 +42,20 @@
|
|||
#include "system\vid.h"
|
||||
#endif
|
||||
|
||||
#ifndef __MATHTABLE_HEADER__
|
||||
#include "utils\mathtab.h"
|
||||
#ifndef __SHOP_SHOP_H__
|
||||
#include "shop\shop.h"
|
||||
#endif
|
||||
|
||||
#ifndef __LOCALE_TEXTDBASE_H__
|
||||
#include "locale\textdbase.h"
|
||||
#ifndef __GFX_SPRBANK_H__
|
||||
#include "gfx\sprbank.h"
|
||||
#endif
|
||||
|
||||
#ifndef __ACTOR_HEADER__
|
||||
#include "gfx\actor.h"
|
||||
#endif
|
||||
|
||||
#ifndef __FRONTEND_FRONTEND_H__
|
||||
#include "frontend\frontend.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -65,6 +69,10 @@
|
|||
#include <trans.h>
|
||||
#endif
|
||||
|
||||
#ifndef __SPR_PARTY_H__
|
||||
#include <party.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
|
@ -82,7 +90,10 @@
|
|||
Vars
|
||||
---- */
|
||||
|
||||
CGameOverScene GameOverScene;
|
||||
CPartyScene PartyScene;
|
||||
|
||||
CActorGfx *m_actorSpongebob;
|
||||
CActorGfx *m_actorPatrick;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -91,24 +102,28 @@ CGameOverScene GameOverScene;
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::init()
|
||||
void CPartyScene::init()
|
||||
{
|
||||
m_image=CFileIO::loadFile(BACKDROP_GAMEOVER_GFX);
|
||||
m_image=CFileIO::loadFile(BACKDROP_PARTYBACKDROP_GFX);
|
||||
ASSERT(m_image);
|
||||
SetScreenImage((u8*)m_image);
|
||||
|
||||
m_font=new ("game over font") ScalableFontBank();
|
||||
m_font->initialise(&standardFont);
|
||||
m_font->setJustification(ScalableFontBank::JUST_CENTRE);
|
||||
m_font->setOt(5);
|
||||
// m_font=new ("game over font") ScalableFontBank();
|
||||
// m_font->initialise(&standardFont);
|
||||
// m_font->setJustification(ScalableFontBank::JUST_CENTRE);
|
||||
// m_font->setOt(5);
|
||||
|
||||
m_sprites=new ("Party sprites") SpriteBank();
|
||||
m_sprites->load(PARTY_PARTY_SPR);
|
||||
|
||||
m_readyToExit=false;
|
||||
CFader::setFadingIn(CFader::BLACK_FADE);
|
||||
|
||||
initContinue();
|
||||
initGameOver();
|
||||
|
||||
m_state=STATE__CONTINUE;
|
||||
CActorPool::Reset();
|
||||
m_actorSpongebob=CActorPool::GetActor(ACTORS_SPONGEBOB_SBK);
|
||||
m_actorSpongebob->SetOtPos(5);
|
||||
m_actorPatrick=CActorPool::GetActor(ACTORS_PATRICK_SBK);
|
||||
m_actorPatrick->SetOtPos(5);
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,9 +133,14 @@ void CGameOverScene::init()
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::shutdown()
|
||||
void CPartyScene::shutdown()
|
||||
{
|
||||
m_font->dump(); delete m_font;
|
||||
delete m_actorPatrick;
|
||||
delete m_actorSpongebob;
|
||||
CActorPool::Reset();
|
||||
|
||||
m_sprites->dump(); delete m_sprites;
|
||||
// m_font->dump(); delete m_font;
|
||||
|
||||
MemFree(m_image);
|
||||
}
|
||||
|
@ -132,26 +152,100 @@ void CGameOverScene::shutdown()
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::render()
|
||||
typedef struct
|
||||
{
|
||||
switch(m_state)
|
||||
CShopScene::SHOPITEM_ID m_itemId;
|
||||
int m_fh;
|
||||
u8 m_xOffsetBroken,m_yOffsetBroken;
|
||||
u8 m_ot;
|
||||
}PARTY_IMAGE;
|
||||
static PARTY_IMAGE images[]=
|
||||
{
|
||||
{ CShopScene::SHOPITEM_BLOWER, FRM_BALLOON1, 0,0, 2 },
|
||||
{ CShopScene::SHOPITEM_BLOWER, FRM_BALLOON2, 1,0, 2 },
|
||||
|
||||
{ CShopScene::SHOPITEM_PARTYHAT, FRM_BANNER1, 0,0, 1 },
|
||||
{ CShopScene::SHOPITEM_PARTYHAT, FRM_BANNER2, 0,0, 1 },
|
||||
{ CShopScene::SHOPITEM_PARTYHAT, FRM_BANNER3, 1,0, 1 },
|
||||
{ CShopScene::SHOPITEM_PARTYHAT, FRM_BANNER4, 1,0, 1 },
|
||||
|
||||
{ CShopScene::SHOPITEM_CAKE, FRM_BIGCAKE, 1,1, 4 },
|
||||
{ CShopScene::SHOPITEM_CAKE, FRM_TABLE2, 1,1, 5 },
|
||||
|
||||
{ CShopScene::SHOPITEM_JELLY2, FRM_JELLY, 1,1, 3 },
|
||||
{ CShopScene::SHOPITEM_JELLY2, FRM_TABLE2, 1,1, 5 },
|
||||
|
||||
{ CShopScene::SHOPITEM_PREZZIE, FRM_PRESENTS1, 0,1, 4 },
|
||||
{ CShopScene::SHOPITEM_PREZZIE, FRM_PRESENTS2, 2,1, 5 },
|
||||
|
||||
{ CShopScene::SHOPITEM_SARNIE, FRM_SANDWICHES, 0,1, 5 },
|
||||
{ CShopScene::SHOPITEM_SARNIE, FRM_LEFTTABLE, 0,1, 5 },
|
||||
|
||||
{ CShopScene::SHOPITEM_CUPCAKE, FRM_SMALLCAKES, 1,1, 4 },
|
||||
{ CShopScene::SHOPITEM_CUPCAKE, FRM_TABLE2, 1,1, 5 },
|
||||
|
||||
{ CShopScene::SHOPITEM_TEDDY, FRM_TOYCHEST, 1,0, 6 },
|
||||
};
|
||||
static const int numimages=sizeof(images)/sizeof(PARTY_IMAGE);
|
||||
|
||||
static int itemsHeld[CShopScene::NUM_SHOP_ITEM_IDS]=
|
||||
{
|
||||
true, // SHOPITEM_BLOWER
|
||||
true, // SHOPITEM_CAKE
|
||||
true, // SHOPITEM_CUPCAKE
|
||||
true, // SHOPITEM_JELLY2
|
||||
true, // SHOPITEM_PARTYHAT
|
||||
true, // SHOPITEM_PREZZIE
|
||||
true, // SHOPITEM_SARNIE
|
||||
true, // SHOPITEM_TEDDY
|
||||
};
|
||||
DVECTOR sbpos={100,100};
|
||||
DVECTOR patpos={100,100};
|
||||
void CPartyScene::render()
|
||||
{
|
||||
int i;
|
||||
int drawn[FRM_TOYCHEST+1];
|
||||
PARTY_IMAGE *pimage;
|
||||
|
||||
for(i=0;i<FRM_TOYCHEST+1;i++)
|
||||
{
|
||||
case STATE__CONTINUE:
|
||||
renderContinue();
|
||||
break;
|
||||
case STATE__CONTINUE_TIMED_OUT:
|
||||
renderContinue();
|
||||
renderGameOver();
|
||||
break;
|
||||
case STATE__GAME_OVER:
|
||||
renderGameOver();
|
||||
break;
|
||||
case STATE__EXITING_TO_GAME:
|
||||
renderContinue();
|
||||
break;
|
||||
case STATE__EXITING_TO_FRONT_END:
|
||||
renderGameOver();
|
||||
break;
|
||||
drawn[i]=false;
|
||||
}
|
||||
|
||||
pimage=images;
|
||||
for(i=0;i<numimages;i++)
|
||||
{
|
||||
ASSERT(pimage->m_fh<=FRM_TOYCHEST);
|
||||
if(itemsHeld[pimage->m_itemId]&&!drawn[pimage->m_fh])
|
||||
{
|
||||
m_sprites->printFT4(pimage->m_fh,pimage->m_xOffsetBroken*256,pimage->m_yOffsetBroken*256,0,0,pimage->m_ot);
|
||||
drawn[pimage->m_fh]=true;
|
||||
}
|
||||
pimage++;
|
||||
}
|
||||
|
||||
// Actors
|
||||
// m_actorSpongebob->Render(sbpos,0,0,0,0);
|
||||
// m_actorPatrick->Render(patpos,0,0,0,0);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPartyScene::think(int _frames)
|
||||
{
|
||||
if(!CFader::isFading())
|
||||
{
|
||||
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
|
||||
{
|
||||
m_readyToExit=true;
|
||||
CFader::setFadingOut();
|
||||
GameState::setNextScene(&FrontEndScene);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,229 +256,11 @@ void CGameOverScene::render()
|
|||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::think(int _frames)
|
||||
{
|
||||
switch(m_state)
|
||||
{
|
||||
case STATE__CONTINUE:
|
||||
thinkContinue(_frames);
|
||||
break;
|
||||
case STATE__CONTINUE_TIMED_OUT:
|
||||
thinkContinue(_frames);
|
||||
thinkGameOver(_frames);
|
||||
break;
|
||||
case STATE__GAME_OVER:
|
||||
thinkGameOver(_frames);
|
||||
break;
|
||||
case STATE__EXITING_TO_GAME:
|
||||
thinkContinue(_frames);
|
||||
break;
|
||||
case STATE__EXITING_TO_FRONT_END:
|
||||
break;
|
||||
}
|
||||
PAUL_DBGMSG("%d",m_state);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
int CGameOverScene::readyToShutdown()
|
||||
int CPartyScene::readyToShutdown()
|
||||
{
|
||||
return m_readyToExit&&!CFader::isFading();
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::initContinue()
|
||||
{
|
||||
m_continueFontSin=0;
|
||||
m_continueFontOffset=100<<2;
|
||||
m_continueTimer=10*COUNTDOWN_TIME_SECOND_LENGTH;
|
||||
}
|
||||
void CGameOverScene::thinkContinue(int _frames)
|
||||
{
|
||||
int move;
|
||||
|
||||
// Slide the text onscreen
|
||||
if(m_state==STATE__CONTINUE)
|
||||
{
|
||||
if(!CFader::isFading())
|
||||
{
|
||||
if(m_continueFontOffset)
|
||||
{
|
||||
move=m_continueFontOffset/10;
|
||||
if(move==0)
|
||||
{
|
||||
move=1;
|
||||
}
|
||||
m_continueFontOffset-=move;
|
||||
if(m_continueFontOffset<0)
|
||||
{
|
||||
m_continueFontOffset=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Countdown ( wait for text to stop first )
|
||||
if(m_continueTimer)
|
||||
{
|
||||
int pad=PadGetDown(0);
|
||||
if(pad&PAD_CROSS)
|
||||
{
|
||||
m_continueTimer-=m_continueTimer%COUNTDOWN_TIME_SECOND_LENGTH;
|
||||
}
|
||||
else if(pad&PAD_START)
|
||||
{
|
||||
m_readyToExit=true;
|
||||
CFader::setFadingOut(CFader::BLACK_FADE);
|
||||
GameState::setNextScene(&GameScene);
|
||||
m_state=STATE__EXITING_TO_GAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_continueTimer-=_frames;
|
||||
}
|
||||
|
||||
if(m_continueTimer<=0)
|
||||
{
|
||||
m_continueTimer=0;
|
||||
m_state=STATE__CONTINUE_TIMED_OUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(m_state==STATE__CONTINUE_TIMED_OUT||STATE__EXITING_TO_GAME)
|
||||
{
|
||||
// Slide text back off the screen
|
||||
m_continueFontOffset=(100<<2)-m_continueFontOffset;
|
||||
move=m_continueFontOffset/10;
|
||||
if(move==0)
|
||||
{
|
||||
move=1;
|
||||
}
|
||||
m_continueFontOffset-=move;
|
||||
if(m_continueFontOffset<0)
|
||||
{
|
||||
if(m_state==STATE__CONTINUE_TIMED_OUT)
|
||||
{
|
||||
m_state=STATE__GAME_OVER;
|
||||
}
|
||||
}
|
||||
m_continueFontOffset=(100<<2)-m_continueFontOffset;
|
||||
}
|
||||
|
||||
// Change the text size
|
||||
m_continueFontSin=(m_continueFontSin+(_frames*CONTINUE_STROBE_SPEED))&4095;
|
||||
}
|
||||
void CGameOverScene::renderContinue()
|
||||
{
|
||||
int yOfs;
|
||||
char buf[100];
|
||||
|
||||
m_font->setColour(242/2,245/2,15/2);
|
||||
yOfs=m_continueFontOffset>>2;
|
||||
|
||||
sprintf(buf,TranslationDatabase::getString(STR__BACKEND__CONTINUE));
|
||||
m_font->setScale(((msin(m_continueFontSin)*CONTINUE_FONT_SCALE)>>12)+CONTINUE_FONT_BASE_SIZE);
|
||||
m_font->print(256,50-m_font->getStringHeight(buf)-yOfs,buf);
|
||||
|
||||
sprintf(buf,"%d",m_continueTimer/COUNTDOWN_TIME_SECOND_LENGTH);
|
||||
m_font->setScale(CONTINUE_FONT_SCALE+CONTINUE_FONT_BASE_SIZE);
|
||||
m_font->print(256,80-m_font->getStringHeight(buf)-yOfs,buf);
|
||||
|
||||
if(!CFader::isFading())
|
||||
{
|
||||
if(m_continueFontSin>512&m_state==STATE__CONTINUE)
|
||||
{
|
||||
sprintf(buf,TranslationDatabase::getString(STR__BACKEND__PRESS_START));
|
||||
m_font->setColour(255,0,0);
|
||||
m_font->print(256,200-m_font->getStringHeight(buf),buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGameOverScene::initGameOver()
|
||||
{
|
||||
m_gameOverTimer=0;
|
||||
m_finishedGrowingText=false;
|
||||
}
|
||||
void CGameOverScene::thinkGameOver(int _frames)
|
||||
{
|
||||
if(!m_finishedGrowingText)
|
||||
{
|
||||
m_gameOverTimer+=_frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!CFader::isFading()&&!m_readyToExit&&
|
||||
PadGetDown(0)&(PAD_START|PAD_CROSS))
|
||||
{
|
||||
m_readyToExit=true;
|
||||
CFader::setFadingOut(CFader::BLACK_FADE);
|
||||
GameState::setNextScene(&FrontEndScene);
|
||||
m_state=STATE__EXITING_TO_FRONT_END;
|
||||
}
|
||||
}
|
||||
}
|
||||
void CGameOverScene::renderGameOver()
|
||||
{
|
||||
char buf[100],*bufPtr;
|
||||
char letter[]=" \0";
|
||||
int i,len,step,x;
|
||||
|
||||
m_font->setColour(80/2,143/2,248/2);
|
||||
|
||||
sprintf(buf,TranslationDatabase::getString(STR__BACKEND__GAME_OVER));
|
||||
|
||||
bufPtr=buf;
|
||||
len=strlen(buf);
|
||||
step=(400<<2)/len;
|
||||
x=(256<<2)-(((len-1)*step)/2);
|
||||
|
||||
for(i=0;i<strlen(buf);i++)
|
||||
{
|
||||
int sin,scale;
|
||||
|
||||
sin=(m_gameOverTimer*GAMEOVER_FONT_GROWSPEED)-(i*GAMEOVER_FONT_GROWSPACING);
|
||||
if(sin>0)
|
||||
{
|
||||
if(sin>GAMEOVER_FONT_MAXSIN)
|
||||
{
|
||||
sin=GAMEOVER_FONT_MAXSIN;
|
||||
if(i==strlen(buf)-1)
|
||||
{
|
||||
m_finishedGrowingText=true;
|
||||
}
|
||||
}
|
||||
scale=(msin(sin)*GAMEOVER_FONT_SCALE)>>12;
|
||||
if(scale>50)
|
||||
{
|
||||
m_font->setScale(scale);
|
||||
letter[0]=*bufPtr;
|
||||
m_font->print(x>>2,100,letter);
|
||||
}
|
||||
}
|
||||
bufPtr++;
|
||||
x+=step;
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
|
@ -1,6 +1,6 @@
|
|||
/*=========================================================================
|
||||
|
||||
gameover.h
|
||||
party.h
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
|
@ -11,8 +11,8 @@
|
|||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __BACKEND_GAMEOVER_H__
|
||||
#define __BACKEND_GAMEOVER_H__
|
||||
#ifndef __BACKEND_PARTY_H__
|
||||
#define __BACKEND_PARTY_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
|
@ -34,7 +34,7 @@
|
|||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CGameOverScene: public CScene
|
||||
class CPartyScene: public CScene
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
|
@ -42,52 +42,11 @@ public:
|
|||
void render();
|
||||
void think(int _frames);
|
||||
int readyToShutdown();
|
||||
char *getSceneName() {return"GameOver/Continue";}
|
||||
char *getSceneName() {return"Party";}
|
||||
|
||||
|
||||
private:
|
||||
typedef enum
|
||||
{
|
||||
STATE__CONTINUE,
|
||||
STATE__CONTINUE_TIMED_OUT,
|
||||
STATE__GAME_OVER,
|
||||
STATE__EXITING_TO_GAME,
|
||||
STATE__EXITING_TO_FRONT_END,
|
||||
} GAMEOVER_STATE;
|
||||
|
||||
|
||||
// Continue
|
||||
enum
|
||||
{
|
||||
CONTINUE_STROBE_SPEED=75,
|
||||
CONTINUE_FONT_SCALE=100,
|
||||
CONTINUE_FONT_BASE_SIZE=400,
|
||||
COUNTDOWN_TIME_SECOND_LENGTH=100, // Each 'second' on the countdown lasts this long
|
||||
};
|
||||
void initContinue();
|
||||
void thinkContinue(int _frames);
|
||||
void renderContinue();
|
||||
int m_continueFontOffset;
|
||||
int m_continueFontSin;
|
||||
int m_continueTimer;
|
||||
|
||||
// Game over
|
||||
enum
|
||||
{
|
||||
GAMEOVER_FONT_SCALE=511,
|
||||
GAMEOVER_FONT_GROWSPEED=150,
|
||||
GAMEOVER_FONT_GROWSPACING=900,
|
||||
GAMEOVER_FONT_MAXSIN=1500,
|
||||
};
|
||||
void initGameOver();
|
||||
void thinkGameOver(int _frames);
|
||||
void renderGameOver();
|
||||
int m_gameOverTimer;
|
||||
int m_finishedGrowingText;
|
||||
|
||||
|
||||
GAMEOVER_STATE m_state;
|
||||
class ScalableFontBank *m_font;
|
||||
class SpriteBank *m_sprites;
|
||||
int m_readyToExit;
|
||||
unsigned char *m_image;
|
||||
|
||||
|
@ -98,7 +57,7 @@ private:
|
|||
Globals
|
||||
------- */
|
||||
|
||||
extern CGameOverScene GameOverScene;
|
||||
extern CPartyScene PartyScene;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -107,7 +66,7 @@ extern CGameOverScene GameOverScene;
|
|||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif /* __BACKEND_GAMEOVER_H__ */
|
||||
#endif /* __BACKEND_PARTY_H__ */
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
|
|
@ -63,6 +63,10 @@
|
|||
#include "map\map.h"
|
||||
#endif
|
||||
|
||||
#ifndef __BACKEND_PARTY_H__
|
||||
#include "backend\party.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
@ -99,6 +103,7 @@ CScene *CSceneSelector::s_sceneList[]=
|
|||
&FmaScene,
|
||||
&MapScene,
|
||||
&ShopScene,
|
||||
&PartyScene,
|
||||
};
|
||||
int CSceneSelector::s_sceneCount=sizeof(s_sceneList)/sizeof(CScene*);
|
||||
|
||||
|
|
|
@ -623,6 +623,20 @@ void CPlayerModeBase::jump()
|
|||
moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
|
||||
setMoveVelocity(&moveVel);
|
||||
}
|
||||
int spr=2;
|
||||
void CPlayerModeBase::spring()
|
||||
{
|
||||
DVECTOR moveVel;
|
||||
moveVel=*m_player->getMoveVelocity();
|
||||
// moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
|
||||
moveVel.vy-=spr;
|
||||
if(moveVel.vy<-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT)
|
||||
{
|
||||
moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
|
||||
}
|
||||
setMoveVelocity(&moveVel);
|
||||
PAUL_DBGMSG("%d",moveVel.vy);
|
||||
}
|
||||
void CPlayerModeBase::jumpback()
|
||||
{
|
||||
DVECTOR moveVel;
|
||||
|
|
|
@ -69,8 +69,8 @@ enum
|
|||
DEFAULT_PLAYER_MAX_SAFE_FALL_FRAMES=30,
|
||||
DEFAULT_PLAYER_MAX_RUN_VELOCITY=6,
|
||||
DEFAULT_PLAYER_RUN_SPEEDUP=2<<2,
|
||||
DEFAULT_PLAYER_RUN_REVERSESLOWDOWN=4<<2,
|
||||
DEFAULT_PLAYER_RUN_SLOWDOWN=3<<2,
|
||||
DEFAULT_PLAYER_RUN_REVERSESLOWDOWN=3<<2,
|
||||
DEFAULT_PLAYER_RUN_SLOWDOWN=2<<2,
|
||||
DEFAULT_PLAYER_PLAYER_GRAVITY=2<<2,
|
||||
DEFAULT_PLAYER_TERMINAL_VELOCITY=8,
|
||||
DEFAULT_BUTT_FALL_VELOCITY=14,
|
||||
|
@ -167,6 +167,7 @@ public:
|
|||
void moveRight();
|
||||
int slowdown();
|
||||
void jump();
|
||||
void spring();
|
||||
void jumpback();
|
||||
void fall();
|
||||
void buttFall();
|
||||
|
|
|
@ -103,6 +103,14 @@ SOURCE=..\..\..\source\backend\gameover.cpp
|
|||
|
||||
SOURCE=..\..\..\source\backend\gameover.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\party.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\source\backend\party.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "enemy"
|
||||
|
||||
|
@ -2652,6 +2660,10 @@ SOURCE=..\..\..\out\USA\include\BigLump.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\out\USA\include\party.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\out\USA\include\shop.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|