This commit is contained in:
parent
7a35e6eebd
commit
41e16d27a1
11 changed files with 69 additions and 33 deletions
|
@ -302,6 +302,7 @@ thing_src := thing
|
||||||
|
|
||||||
triggers_src := trigger \
|
triggers_src := trigger \
|
||||||
tcamlock \
|
tcamlock \
|
||||||
|
tlevexit \
|
||||||
tlook \
|
tlook \
|
||||||
trestart \
|
trestart \
|
||||||
tteleprt \
|
tteleprt \
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
#include "game\game.h"
|
#include "game\game.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAMESLOT_H__
|
||||||
|
#include "game\gameslot.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __FRONTEND_FRONTEND_H__
|
#ifndef __FRONTEND_FRONTEND_H__
|
||||||
#include "frontend\frontend.h"
|
#include "frontend\frontend.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -125,6 +129,7 @@ void CPartyScene::init()
|
||||||
m_actorPatrick=CActorPool::GetActor(ACTORS_PATRICK_SBK);
|
m_actorPatrick=CActorPool::GetActor(ACTORS_PATRICK_SBK);
|
||||||
m_actorPatrick->SetOtPos(5);
|
m_actorPatrick->SetOtPos(5);
|
||||||
CActorPool::SetUpCache();
|
CActorPool::SetUpCache();
|
||||||
|
CActorPool::CleanUpCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,37 +194,28 @@ static PARTY_IMAGE images[]=
|
||||||
};
|
};
|
||||||
static const int numimages=sizeof(images)/sizeof(PARTY_IMAGE);
|
static const int numimages=sizeof(images)/sizeof(PARTY_IMAGE);
|
||||||
|
|
||||||
static int itemsHeld[CShopScene::NUM_SHOP_ITEM_IDS]=
|
DVECTOR sbpos={220,195};
|
||||||
{
|
int sbanim=5,sbfrm=0;
|
||||||
true, // SHOPITEM_BLOWER
|
DVECTOR patpos={300,200};
|
||||||
true, // SHOPITEM_CAKE
|
|
||||||
true, // SHOPITEM_CUPCAKE
|
|
||||||
true, // SHOPITEM_JELLY2
|
|
||||||
true, // SHOPITEM_PARTYHAT
|
|
||||||
true, // SHOPITEM_PREZZIE
|
|
||||||
true, // SHOPITEM_SARNIE
|
|
||||||
true, // SHOPITEM_TEDDY
|
|
||||||
};
|
|
||||||
DVECTOR sbpos={200,195};
|
|
||||||
int sbanim=1,sbfrm=0;
|
|
||||||
DVECTOR patpos={250,195};
|
|
||||||
int patanim=0,patfrm=0;
|
int patanim=0,patfrm=0;
|
||||||
void CPartyScene::render()
|
void CPartyScene::render()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int drawn[FRM_TOYCHEST+1];
|
int drawn[FRM_TOYCHEST+1];
|
||||||
PARTY_IMAGE *pimage;
|
PARTY_IMAGE *pimage;
|
||||||
|
CGameSlotManager::GameSlot *gameSlot;
|
||||||
|
|
||||||
for(i=0;i<FRM_TOYCHEST+1;i++)
|
for(i=0;i<FRM_TOYCHEST+1;i++)
|
||||||
{
|
{
|
||||||
drawn[i]=false;
|
drawn[i]=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gameSlot=CGameSlotManager::getSlotData();
|
||||||
pimage=images;
|
pimage=images;
|
||||||
for(i=0;i<numimages;i++)
|
for(i=0;i<numimages;i++)
|
||||||
{
|
{
|
||||||
ASSERT(pimage->m_fh<=FRM_TOYCHEST);
|
ASSERT(pimage->m_fh<=FRM_TOYCHEST);
|
||||||
if(itemsHeld[pimage->m_itemId]&&!drawn[pimage->m_fh])
|
if(gameSlot->isPartyItemHeld(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);
|
m_sprites->printFT4(pimage->m_fh,pimage->m_xOffsetBroken*256,pimage->m_yOffsetBroken*256,0,0,pimage->m_ot);
|
||||||
drawn[pimage->m_fh]=true;
|
drawn[pimage->m_fh]=true;
|
||||||
|
@ -228,8 +224,9 @@ void CPartyScene::render()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actors
|
// Actors
|
||||||
// m_actorSpongebob->Render(sbpos,sbanim,sbfrm,0,0);
|
m_actorSpongebob->Render(sbpos,sbanim,sbfrm,0,0);
|
||||||
// m_actorPatrick->Render(patpos,patanim,patfrm,0,0);
|
sbanim|=1;
|
||||||
|
m_actorPatrick->Render(patpos,patanim,patfrm,0,0);
|
||||||
|
|
||||||
|
|
||||||
CActorPool::CleanUpCache();
|
CActorPool::CleanUpCache();
|
||||||
|
|
|
@ -79,6 +79,10 @@
|
||||||
#include "map\map.h"
|
#include "map\map.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __SHOP_SHOP_H__
|
||||||
|
#include "shop\shop.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __FMA_FMA_H__
|
#ifndef __FMA_FMA_H__
|
||||||
#include "fma\fma.h"
|
#include "fma\fma.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -258,6 +262,14 @@ void CGameScene::think(int _frames)
|
||||||
{
|
{
|
||||||
GameState::setNextScene(&FmaScene);
|
GameState::setNextScene(&FmaScene);
|
||||||
}
|
}
|
||||||
|
else if(getLevelNumber()==5)
|
||||||
|
{
|
||||||
|
if(getChapterNumber()==5)
|
||||||
|
{
|
||||||
|
ShopScene.setGotoPartyScreen();
|
||||||
|
}
|
||||||
|
GameState::setNextScene(&ShopScene);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameState::setNextScene(&MapScene);
|
GameState::setNextScene(&MapScene);
|
||||||
|
|
|
@ -83,7 +83,7 @@ CAnimTex *ThisTex=new ("CAnimTex::AddAnimTex") CAnimTex;
|
||||||
ThisTex->TexData=(u32*)MemAlloc(Size*sizeof(u16), "AnTx");
|
ThisTex->TexData=(u32*)MemAlloc(Size*sizeof(u16), "AnTx");
|
||||||
DrawSync(0);
|
DrawSync(0);
|
||||||
StoreImage(&ThisTex->Rect,(u32*)ThisTex->TexData);
|
StoreImage(&ThisTex->Rect,(u32*)ThisTex->TexData);
|
||||||
|
PAUL_DBGMSG("1 added");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -103,6 +103,7 @@ CAnimTex *PrevTex, *ThisTex, *NextTex;
|
||||||
if (PrevTex) PrevTex->NextTex=NextTex;
|
if (PrevTex) PrevTex->NextTex=NextTex;
|
||||||
if (ThisTex==AnimTexList) AnimTexList=NextTex;
|
if (ThisTex==AnimTexList) AnimTexList=NextTex;
|
||||||
delete ThisTex;
|
delete ThisTex;
|
||||||
|
PAUL_DBGMSG("1 removed");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -288,6 +288,7 @@ int ReadLeft;
|
||||||
Cache->TPageName=Filename;
|
Cache->TPageName=Filename;
|
||||||
Cache->XOfs=0;
|
Cache->XOfs=0;
|
||||||
Cache->YOfs=0;
|
Cache->YOfs=0;
|
||||||
|
Cache->AnimTexCount=0;
|
||||||
s_TPCache[TPage].Info[1].RefCount=-1;
|
s_TPCache[TPage].Info[1].RefCount=-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,8 +407,7 @@ void CLevel::initThings(int _respawningLevel)
|
||||||
TriggerList=(sThingTrigger*)MakePtr(Hdr,sizeof(sThingHdr));
|
TriggerList=(sThingTrigger*)MakePtr(Hdr,sizeof(sThingHdr));
|
||||||
for(int i=0;i<TriggerCount;i++)
|
for(int i=0;i<TriggerCount;i++)
|
||||||
{
|
{
|
||||||
if (TriggerList[i].Type!=CTrigger::TRIGGER_CAMLOCK&&
|
if (TriggerList[i].Type!=CTrigger::TRIGGER_CAMLOCK)
|
||||||
TriggerList[i].Type!=CTrigger::TRIGGER_EXIT)
|
|
||||||
{
|
{
|
||||||
CTrigger::Create(&TriggerList[i]);
|
CTrigger::Create(&TriggerList[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,10 @@
|
||||||
#include "map\map.h"
|
#include "map\map.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __BACKEND_PARTY_H__
|
||||||
|
#include "backend\party.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -127,6 +131,8 @@ xmPlayingId s_playId;
|
||||||
|
|
||||||
CShopScene ShopScene;
|
CShopScene ShopScene;
|
||||||
|
|
||||||
|
static int s_gotoPartyScreen=false;
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
|
@ -355,8 +361,16 @@ void CShopScene::think(int _frames)
|
||||||
{
|
{
|
||||||
m_readyToExit=true;
|
m_readyToExit=true;
|
||||||
CFader::setFadingOut();
|
CFader::setFadingOut();
|
||||||
|
if(s_gotoPartyScreen)
|
||||||
|
{
|
||||||
|
s_gotoPartyScreen=false;
|
||||||
|
GameState::setNextScene(&PartyScene);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
GameState::setNextScene(&MapScene);
|
GameState::setNextScene(&MapScene);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_guiFrame->think(_frames);
|
m_guiFrame->think(_frames);
|
||||||
}
|
}
|
||||||
|
@ -423,6 +437,19 @@ int CShopScene::readyToShutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose: Makes the game go to the party scene rather than the map
|
||||||
|
scene after the shop has been exited
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CShopScene::setGotoPartyScreen()
|
||||||
|
{
|
||||||
|
s_gotoPartyScreen=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose: Ugh... I *really* hope this works ok with all languages, otherwise
|
Purpose: Ugh... I *really* hope this works ok with all languages, otherwise
|
||||||
|
|
|
@ -44,6 +44,8 @@ public:
|
||||||
int readyToShutdown();
|
int readyToShutdown();
|
||||||
char *getSceneName() {return"Shop";}
|
char *getSceneName() {return"Shop";}
|
||||||
|
|
||||||
|
static void setGotoPartyScreen();
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SHOPITEM_BLOWER,
|
SHOPITEM_BLOWER,
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
NO LONGER USED BUT LEFT IN VSS INCASE ANYONE CHANGES THEIR MIND... (PKG)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|
||||||
tlevexit.cpp
|
tlevexit.cpp
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
NO LONGER USED BUT LEFT IN VSS INCASE ANYONE CHANGES THEIR MIND... (PKG)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|
||||||
tlevexit.h
|
tlevexit.h
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
#include "triggers\trigger.h"
|
#include "triggers\trigger.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TLEVEXIT_H__
|
||||||
|
#include "triggers\tlevexit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __TRIGGERS_TRESTART_H__
|
#ifndef __TRIGGERS_TRESTART_H__
|
||||||
#include "triggers\trestart.h"
|
#include "triggers\trestart.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -143,7 +147,7 @@ CTrigger *trigger;
|
||||||
{
|
{
|
||||||
// Exit trigger
|
// Exit trigger
|
||||||
case TRIGGER_EXIT:
|
case TRIGGER_EXIT:
|
||||||
ASSERT("EXIT TRIGGERS HAVE BEEN REMOVED - HOW DID YOU GET HERE ANYWAY!?");
|
trigger=(CTrigger*)new ("LevelExitTrigger") CLevelExitTrigger();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Level respawn trigger
|
// Level respawn trigger
|
||||||
|
|
Loading…
Add table
Reference in a new issue