This commit is contained in:
parent
90742214eb
commit
6abd565b82
5 changed files with 42 additions and 21 deletions
|
@ -38,7 +38,7 @@ TEMP_FILE := $(TEMP_BUILD_DIR)/build.tmp
|
|||
#----------------------------------------------------------------------------
|
||||
#--- Levels -----------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------
|
||||
LEVELS_OPTS := -t:8,2,1 -s:16
|
||||
LEVELS_OPTS := -t:8,2,1 -s:256
|
||||
LEVELS_IN_DIR := $(GRAF_DIR)/levels
|
||||
LEVELS_OUT_DIR := $(DATA_OUT)/levels
|
||||
|
||||
|
|
|
@ -10,11 +10,23 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
sOT *OtList[2],*OtPtr;
|
||||
u32 *PrimDrawList;
|
||||
u32 DmaStart[2];
|
||||
u8 *PrimBuffer[2],*PrimListStart,*PrimListEnd;
|
||||
u8 *CurrPrim,*EndPrim;
|
||||
int PrimFlipFlag;
|
||||
|
||||
/*****************************************************************************/
|
||||
void PrimDrawCallBack()
|
||||
{
|
||||
if (PrimDrawList)
|
||||
{
|
||||
DrawOTag(PrimDrawList);
|
||||
}
|
||||
|
||||
PrimDrawList=0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void PrimInit()
|
||||
{
|
||||
|
@ -34,31 +46,31 @@ void PrimInit()
|
|||
|
||||
InitOTagR(OtList[0],MAX_OT);
|
||||
InitOTagR(OtList[1],MAX_OT);
|
||||
|
||||
PrimDrawList=0;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
void PrimDisplay()
|
||||
{
|
||||
CAnimTex::AnimateTex();
|
||||
// CAnimTex::AnimateTex();
|
||||
UnlinkOTagR(OtPtr, MAX_OT, &DmaStart[PrimFlipFlag]);
|
||||
|
||||
#ifdef USE_NTAGS
|
||||
DrawOTag((u32*)&DmaStart[PrimFlipFlag]);
|
||||
// DrawOTag((u32*)&DmaStart[PrimFlipFlag]);
|
||||
PrimDrawList=&DmaStart[PrimFlipFlag];
|
||||
#else
|
||||
DrawOTag(OtPtr+(MAX_OT-1));
|
||||
// DrawOTag(OtPtr+(MAX_OT-1));
|
||||
#endif
|
||||
|
||||
PrimFlipFlag^=1;
|
||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
||||
|
||||
ResetOTagR(OtPtr,MAX_OT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*** Clipping ****************************************************************/
|
||||
void PrimClip(RECT *R, u32 Depth)
|
||||
{
|
||||
|
|
|
@ -306,6 +306,8 @@ extern u8 *PrimListStart,*PrimListEnd;
|
|||
void PrimInit();
|
||||
|
||||
void PrimDisplay();
|
||||
void PrimDrawCallBack();
|
||||
|
||||
void PrimClip(RECT *r, u32 Depth);
|
||||
void PrimFullScreen(int Depth);
|
||||
inline u8 *GetPrimPtr() {return(CurrPrim);}
|
||||
|
|
|
@ -134,30 +134,34 @@ void MainLoop()
|
|||
|
||||
frames=GameState::getFramesSinceLast();
|
||||
|
||||
// System Think
|
||||
FontBank::think(frames);
|
||||
|
||||
GameState::think();
|
||||
GameState::render();
|
||||
|
||||
CBubicleFactory::think(frames);
|
||||
CBubicleFactory::render();
|
||||
|
||||
CFader::think(frames);
|
||||
CFader::render();
|
||||
|
||||
CSoundMediator::think(frames);
|
||||
|
||||
|
||||
// Think States
|
||||
GameState::think();
|
||||
CBubicleFactory::think(frames);
|
||||
CFader::think(frames);
|
||||
|
||||
#ifdef __USER_paul__
|
||||
s_paulScene.think(frames);
|
||||
s_paulScene.render();
|
||||
#endif
|
||||
|
||||
while(DrawSync(1));
|
||||
|
||||
// Render States
|
||||
GameState::render();
|
||||
CBubicleFactory::render();
|
||||
CFader::render();
|
||||
|
||||
#ifdef __USER_paul__
|
||||
s_paulScene.render();
|
||||
#endif
|
||||
|
||||
PrimDisplay();
|
||||
VidSwapDraw();
|
||||
VSync(0);
|
||||
|
||||
VidSwapDraw();
|
||||
PrimDisplay();
|
||||
PadUpdate();
|
||||
|
||||
DbgPollHost();
|
||||
|
|
|
@ -143,6 +143,9 @@ static void VidVSyncCallback()
|
|||
FrameCounter++;
|
||||
TickCount++;
|
||||
if (DrawLoadIcon) LoadingIcon();
|
||||
|
||||
PrimDrawCallBack();
|
||||
|
||||
if (VbFunc)
|
||||
{
|
||||
VbFunc();
|
||||
|
|
Loading…
Add table
Reference in a new issue