This commit is contained in:
parent
699a6d41a8
commit
528a65b43c
6 changed files with 30 additions and 13 deletions
|
@ -86,6 +86,10 @@ FX
|
||||||
#include "save\save.h"
|
#include "save\save.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VID_HEADER_
|
||||||
|
#include "system\vid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
|
@ -1260,6 +1264,7 @@ void CFmaScene::init()
|
||||||
|
|
||||||
m_stillProcessingCommand=false;
|
m_stillProcessingCommand=false;
|
||||||
m_doOtherProcessing=false;
|
m_doOtherProcessing=false;
|
||||||
|
StopLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,9 @@
|
||||||
#include "fma\fma.h"
|
#include "fma\fma.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VID_HEADER_
|
||||||
|
#include "system\vid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -150,6 +153,8 @@ CFrontEndScene::FrontEndMode CFrontEndScene::s_startMode=MODE__NICK_LOGO;
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CFrontEndScene::init()
|
void CFrontEndScene::init()
|
||||||
{
|
{
|
||||||
|
CLevel::DisplayLoadingScreen();
|
||||||
|
|
||||||
for(int i=0;i<MODE__NONE;i++)
|
for(int i=0;i<MODE__NONE;i++)
|
||||||
{
|
{
|
||||||
s_modeCodes[i]->init();
|
s_modeCodes[i]->init();
|
||||||
|
@ -166,6 +171,7 @@ void CFrontEndScene::init()
|
||||||
m_font=new ("frontendfont") FontBank();
|
m_font=new ("frontendfont") FontBank();
|
||||||
m_font->initialise(&standardFont);
|
m_font->initialise(&standardFont);
|
||||||
m_font->setJustification(FontBank::JUST_CENTRE);
|
m_font->setJustification(FontBank::JUST_CENTRE);
|
||||||
|
StopLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,6 @@ void CLevel::init(int LevelNo)
|
||||||
// Load it
|
// Load it
|
||||||
sLvlTab *lvlTab=&LvlTable[LevelNo];
|
sLvlTab *lvlTab=&LvlTable[LevelNo];
|
||||||
|
|
||||||
// DisplayLoadingScreen(lvlTab);
|
|
||||||
|
|
||||||
CSoundMediator::setSong((CSoundMediator::SONGID)lvlTab->songId);
|
CSoundMediator::setSong((CSoundMediator::SONGID)lvlTab->songId);
|
||||||
|
|
||||||
|
@ -319,6 +318,7 @@ int i;
|
||||||
MemFree(s_image);
|
MemFree(s_image);
|
||||||
VSync(20);
|
VSync(20);
|
||||||
font.dump();
|
font.dump();
|
||||||
|
StartLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -275,6 +275,7 @@ void CMapScene::init()
|
||||||
|
|
||||||
CSoundMediator::setSong(CSoundMediator::SONG_MAPSCREEN);
|
CSoundMediator::setSong(CSoundMediator::SONG_MAPSCREEN);
|
||||||
m_musicStarted=false;
|
m_musicStarted=false;
|
||||||
|
StopLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,14 @@ static const CVECTOR s_defClearCol = {0, 0, 0};
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
POLY_FT4 LoadPoly;
|
POLY_FT4 LoadPoly;
|
||||||
static int LoadX=430;
|
static int LoadX=430;
|
||||||
static int LoadY=161;
|
static int LoadY=192;
|
||||||
|
static int LoadBackY;
|
||||||
static int LoadHalfWidth;
|
static int LoadHalfWidth;
|
||||||
static int LoadIconSide;
|
static int LoadIconSide;
|
||||||
static int DrawLoadIcon=0;
|
static int DrawLoadIcon=0;
|
||||||
static RECT LoadBackRect;
|
static RECT LoadBackRect;
|
||||||
static int LoadBackY;
|
|
||||||
static int LoadTime=0;
|
static int LoadTime=0;
|
||||||
|
static const int LoadBackInc=8;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Altered to keep aspect ratio
|
// Altered to keep aspect ratio
|
||||||
|
@ -50,6 +50,7 @@ s8 LoadTab[]=
|
||||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,17,18,18,19,19,19,20,20,20,20,20,21
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,17,18,18,19,19,19,20,20,20,20,20,21
|
||||||
};
|
};
|
||||||
const int LoadTabSize=sizeof(LoadTab)/sizeof(s8);
|
const int LoadTabSize=sizeof(LoadTab)/sizeof(s8);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void LoadingIcon()
|
void LoadingIcon()
|
||||||
{
|
{
|
||||||
|
@ -65,14 +66,12 @@ POLY_FT4 *PolyPtr=&LoadPoly;
|
||||||
rgb=128-(LoadTab[(LoadTime+LoadTabSize/2)%LoadTabSize]*3);
|
rgb=128-(LoadTab[(LoadTime+LoadTabSize/2)%LoadTabSize]*3);
|
||||||
setRGB0(PolyPtr,rgb,rgb,rgb);
|
setRGB0(PolyPtr,rgb,rgb,rgb);
|
||||||
|
|
||||||
MoveImage(&LoadBackRect,LoadX,LoadY+LoadBackY);
|
MoveImage(&LoadBackRect,LoadX-LoadBackInc,LoadBackY);
|
||||||
|
|
||||||
PutDrawEnv(&Screen[FrameFlipFlag^1].Draw);
|
PutDrawEnv(&Screen[FrameFlipFlag^1].Draw);
|
||||||
DrawPrim(PolyPtr);
|
DrawPrim(PolyPtr);
|
||||||
|
|
||||||
LoadTime++;
|
LoadTime++;
|
||||||
if (LoadTime>=LoadTabSize) LoadTime=0;
|
if (LoadTime>=LoadTabSize) LoadTime=0;
|
||||||
// if(LoadTime==LoadTabSize/2) LoadIconSide^=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -86,21 +85,26 @@ sFrameHdr *fh=(sFrameHdr*)_fh;
|
||||||
LoadPoly.clut=fh->Clut;
|
LoadPoly.clut=fh->Clut;
|
||||||
|
|
||||||
LoadHalfWidth=fh->W/2;
|
LoadHalfWidth=fh->W/2;
|
||||||
setRECT(&LoadBackRect,LoadX,LoadY+(LoadBackY^256),fh->W+4,fh->H+4);
|
LoadBackRect.w=fh->W+(LoadBackInc*2);
|
||||||
|
LoadBackRect.h=fh->H;
|
||||||
|
|
||||||
}
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void StartLoad(int _loadX,int _loadY)
|
void StartLoad(int _loadX,int _loadY)
|
||||||
{
|
{
|
||||||
LoadX=_loadX;
|
SYSTEM_DBGMSG("Start Load");
|
||||||
LoadY=_loadY;
|
|
||||||
|
if (_loadX!=-1) LoadX=_loadX;
|
||||||
|
if (_loadY!=-1) LoadY=_loadY;
|
||||||
|
|
||||||
Screen[0].Draw.isbg=Screen[1].Draw.isbg=0;
|
Screen[0].Draw.isbg=Screen[1].Draw.isbg=0;
|
||||||
|
|
||||||
PutDrawEnv(&Screen[FrameFlipFlag^1].Draw);
|
PutDrawEnv(&Screen[FrameFlipFlag^1].Draw);
|
||||||
PutDispEnv(&Screen[FrameFlipFlag].Disp);
|
PutDispEnv(&Screen[FrameFlipFlag].Disp);
|
||||||
|
|
||||||
LoadBackY=Screen[FrameFlipFlag^1].Disp.disp.y;
|
LoadBackRect.x=LoadX-LoadBackInc;
|
||||||
|
LoadBackRect.y=LoadY+((FrameFlipFlag)*256);;
|
||||||
|
LoadBackY=LoadY+((FrameFlipFlag^1)*256);
|
||||||
|
|
||||||
LoadTime=0;
|
LoadTime=0;
|
||||||
DrawLoadIcon=1;
|
DrawLoadIcon=1;
|
||||||
|
@ -110,7 +114,6 @@ void StartLoad(int _loadX,int _loadY)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void StopLoad()
|
void StopLoad()
|
||||||
{
|
{
|
||||||
|
|
||||||
while(LoadTime)
|
while(LoadTime)
|
||||||
{
|
{
|
||||||
VSync(0);
|
VSync(0);
|
||||||
|
@ -119,6 +122,8 @@ void StopLoad()
|
||||||
Screen[0].Draw.isbg=Screen[1].Draw.isbg=1;
|
Screen[0].Draw.isbg=Screen[1].Draw.isbg=1;
|
||||||
|
|
||||||
DrawLoadIcon=0;
|
DrawLoadIcon=0;
|
||||||
|
SYSTEM_DBGMSG("Stop Load");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -59,7 +59,7 @@ void VidRemoveVSyncFunc(VbFuncType v);
|
||||||
void VRamViewer();
|
void VRamViewer();
|
||||||
|
|
||||||
void SetUpLoadIcon(void *fh);
|
void SetUpLoadIcon(void *fh);
|
||||||
void StartLoad(int _loadX=430,int _loadY=202);
|
void StartLoad(int _loadX=-1,int _loadY=-1);
|
||||||
void StopLoad();
|
void StopLoad();
|
||||||
|
|
||||||
void SetScreenImage(u8 *Ptr);
|
void SetScreenImage(u8 *Ptr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue