This commit is contained in:
parent
05c4b14dc2
commit
773be8ef74
@ -182,7 +182,7 @@ static int HasInit=0;
|
||||
// Cos it uses prim pool, best check its big enough
|
||||
CdReadyCallback(0); // clear it in case XA is being naughty
|
||||
ASSERT(PRIMPOOL_SIZE>FMVWidth*(FMVHeight+1));
|
||||
InitOTagR(BaseOtPtr,MAX_OT_ALL); // Ensure no prims need the Prim Pool
|
||||
InitOTagR(OtPtr,MAX_OT); // Ensure no prims need the Prim Pool
|
||||
|
||||
SYSTEM_DBGMSG("[FMV] Playing fmv %d ( fid:%d )",fmvNumber,s_fmvData[fmvNumber].m_filename);
|
||||
startSector=CFileIO::GetFilePos(s_fmvData[fmvNumber].m_filename);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "system\vid.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
sOT *OtList[2],*BaseOtPtr,*OtPtr;
|
||||
sOT *OtList[2],*OtPtr;
|
||||
u32 DmaStart[2];
|
||||
u8 *PrimBuffer[2],*PrimListStart,*PrimListEnd;
|
||||
u8 *CurrPrim,*EndPrim;
|
||||
@ -20,21 +20,20 @@ void PrimInit()
|
||||
{
|
||||
// Alloc Lists
|
||||
OtList[0]=(sOT*)MemAlloc(OTLIST_SIZE*2, "-Ot-");
|
||||
OtList[1]=OtList[0]+MAX_OT_ALL;
|
||||
OtList[1]=OtList[0]+MAX_OT;
|
||||
PrimBuffer[0]=(u8*)MemAlloc(PRIMPOOL_SIZE*2, "Prim");
|
||||
PrimBuffer[1]=PrimBuffer[0]+(PRIMPOOL_SIZE);
|
||||
|
||||
PrimFlipFlag=0;
|
||||
BaseOtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
OtPtr=BaseOtPtr;
|
||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||
EndPrim=CurrPrim+PRIMPOOL_SIZE;
|
||||
|
||||
PrimListStart=PrimBuffer[0];
|
||||
PrimListEnd=PrimListStart+(PRIMPOOL_SIZE*2);
|
||||
|
||||
InitOTagR(OtList[0],MAX_OT_ALL);
|
||||
InitOTagR(OtList[1],MAX_OT_ALL);
|
||||
InitOTagR(OtList[0],MAX_OT);
|
||||
InitOTagR(OtList[1],MAX_OT);
|
||||
|
||||
}
|
||||
|
||||
@ -50,30 +49,28 @@ void PrimDisplay()
|
||||
|
||||
CAnimTex::AnimateTex();
|
||||
CPakTex::DMAPakTex();
|
||||
UnlinkOTagR(BaseOtPtr, MAX_OT_ALL, &DmaStart[PrimFlipFlag]);
|
||||
UnlinkOTagR(OtPtr, MAX_OT, &DmaStart[PrimFlipFlag]);
|
||||
|
||||
#ifdef USE_NTAGS
|
||||
DrawOTag((u32*)&DmaStart[PrimFlipFlag]);
|
||||
#else
|
||||
DrawOTag(BaseOtPtr+(MAX_OT_ALL-1));
|
||||
DrawOTag(OtPtr+(MAX_OT-1));
|
||||
#endif
|
||||
|
||||
PrimFlipFlag^=1;
|
||||
BaseOtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
OtPtr=BaseOtPtr;
|
||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
||||
ResetOTagR(BaseOtPtr,MAX_OT_ALL);
|
||||
ResetOTagR(OtPtr,MAX_OT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void FlushPrimPool()
|
||||
{
|
||||
BaseOtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
OtPtr=BaseOtPtr;
|
||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
||||
ResetOTagR(BaseOtPtr,MAX_OT_ALL);
|
||||
ResetOTagR(OtPtr,MAX_OT);
|
||||
}
|
||||
|
||||
/*** Clipping ****************************************************************/
|
||||
|
@ -15,9 +15,7 @@
|
||||
#include "gfx\primplus.h"
|
||||
#endif
|
||||
|
||||
//#define MAX_OT_GUI (0)
|
||||
#define MAX_OT (16)
|
||||
#define MAX_OT_ALL (MAX_OT)
|
||||
#define MAX_PRIMS ((1024*2)) // Took off 512 as mid layer now pre-stored as TSPRTs
|
||||
|
||||
//#define USE_NTAGS 1
|
||||
@ -177,8 +175,8 @@ typedef u32 sOT;
|
||||
#define InitOTagR(Ot, Count) ClearOTagR(Ot,Count);
|
||||
#define ResetOTag(Ot, Count) InitOTag(Ot,Count);
|
||||
#define ResetOTagR(Ot, Count) InitOTagR(Ot,Count);
|
||||
#define UnlinkOTag(OtPtr, MAX_OT_ALL, Dma) ;
|
||||
#define UnlinkOTagR(OtPtr, MAX_OT_ALL, Dma) ;
|
||||
#define UnlinkOTag(OtPtr, MAX_OT, Dma) ;
|
||||
#define UnlinkOTagR(OtPtr, MAX_OT, Dma) ;
|
||||
|
||||
|
||||
#endif
|
||||
@ -304,10 +302,10 @@ typedef u32 sOT;
|
||||
/********************************************************************************************************/
|
||||
#define MAX_PRIM_SIZE (sizeof(POLY_FT4))
|
||||
#define PRIMPOOL_SIZE (MAX_PRIMS*MAX_PRIM_SIZE)
|
||||
#define OTLIST_SIZE (MAX_OT_ALL*sizeof(sOT))
|
||||
#define OTLIST_SIZE (MAX_OT*sizeof(sOT))
|
||||
|
||||
/********************************************************************************************************/
|
||||
extern sOT *BaseOtPtr,*OtPtr;
|
||||
extern sOT *OtPtr;
|
||||
extern u8 *CurrPrim,*EndPrim;
|
||||
extern u8 *PrimListStart,*PrimListEnd;
|
||||
//extern int PrimFlipFlag;
|
||||
|
Loading…
Reference in New Issue
Block a user