diff --git a/makefile.gfx b/makefile.gfx index 68441adfe..53e58fb7d 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -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 diff --git a/source/gfx/prim.cpp b/source/gfx/prim.cpp index f7119dcc0..051a4e9e3 100644 --- a/source/gfx/prim.cpp +++ b/source/gfx/prim.cpp @@ -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) { diff --git a/source/gfx/prim.h b/source/gfx/prim.h index ce349107a..3012d8e47 100644 --- a/source/gfx/prim.h +++ b/source/gfx/prim.h @@ -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);} diff --git a/source/system/main.cpp b/source/system/main.cpp index ff9491636..ff528133c 100644 --- a/source/system/main.cpp +++ b/source/system/main.cpp @@ -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(); diff --git a/source/system/vid.cpp b/source/system/vid.cpp index 1be72392c..b081bfee0 100644 --- a/source/system/vid.cpp +++ b/source/system/vid.cpp @@ -143,6 +143,9 @@ static void VidVSyncCallback() FrameCounter++; TickCount++; if (DrawLoadIcon) LoadingIcon(); + + PrimDrawCallBack(); + if (VbFunc) { VbFunc();