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