This commit is contained in:
parent
d73b78de7e
commit
09f0f53ff4
7 changed files with 35 additions and 21 deletions
|
@ -183,7 +183,7 @@ static int HasInit=0;
|
||||||
// Cos it uses prim pool, best check its big enough
|
// Cos it uses prim pool, best check its big enough
|
||||||
CdReadyCallback(0); // clear it in case XA is being naughty
|
CdReadyCallback(0); // clear it in case XA is being naughty
|
||||||
ASSERT(PRIMPOOL_SIZE>FMVWidth*(FMVHeight+1));
|
ASSERT(PRIMPOOL_SIZE>FMVWidth*(FMVHeight+1));
|
||||||
InitOTagR(OtPtr,MAX_OT); // Ensure no prims need the Prim Pool
|
InitOTagR(BaseOtPtr,MAX_OT_ALL); // Ensure no prims need the Prim Pool
|
||||||
|
|
||||||
SYSTEM_DBGMSG("[FMV] Playing fmv %d ( fid:%d )",fmvNumber,s_fmvData[fmvNumber].m_filename);
|
SYSTEM_DBGMSG("[FMV] Playing fmv %d ( fid:%d )",fmvNumber,s_fmvData[fmvNumber].m_filename);
|
||||||
startSector=CFileIO::GetFilePos(s_fmvData[fmvNumber].m_filename);
|
startSector=CFileIO::GetFilePos(s_fmvData[fmvNumber].m_filename);
|
||||||
|
|
|
@ -221,6 +221,7 @@ void FontBank::setJustification( Justification _justification )
|
||||||
void FontBank::setOt( u16 _ot )
|
void FontBank::setOt( u16 _ot )
|
||||||
{
|
{
|
||||||
m_ot = _ot;
|
m_ot = _ot;
|
||||||
|
m_ot=0; // Sorry!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
OTPOS__ACTOR_POS=10,
|
OTPOS__DEBUG_INFO=0,
|
||||||
OTPOS__PICKUP_POS=10,
|
OTPOS__INGAME_UI=0,
|
||||||
OTPOS__INGAME_UI=3,
|
OTPOS__ACTOR_POS=6,
|
||||||
OTPOS__DEBUG_INFO=1,
|
OTPOS__PICKUP_POS=OTPOS__ACTOR_POS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "system\vid.h"
|
#include "system\vid.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
sOT *OtList[2],*OtPtr;
|
sOT *OtList[2],*BaseOtPtr,*GUIOtPtr,*OtPtr;
|
||||||
u32 DmaStart[2];
|
u32 DmaStart[2];
|
||||||
u8 *PrimBuffer[2],*PrimListStart,*PrimListEnd;
|
u8 *PrimBuffer[2],*PrimListStart,*PrimListEnd;
|
||||||
u8 *CurrPrim,*EndPrim;
|
u8 *CurrPrim,*EndPrim;
|
||||||
|
@ -19,21 +19,23 @@ int PrimFlipFlag;
|
||||||
void PrimInit()
|
void PrimInit()
|
||||||
{
|
{
|
||||||
// Alloc Lists
|
// Alloc Lists
|
||||||
OtList[0]=(sOT*)MemAlloc(MAX_OT*2*sizeof(sOT), "-Ot-");
|
OtList[0]=(sOT*)MemAlloc(OTLIST_SIZE*2, "-Ot-");
|
||||||
OtList[1]=OtList[0]+MAX_OT;
|
OtList[1]=OtList[0]+MAX_OT_ALL;
|
||||||
PrimBuffer[0]=(u8*)MemAlloc(PRIMPOOL_SIZE*2, "Prim");
|
PrimBuffer[0]=(u8*)MemAlloc(PRIMPOOL_SIZE*2, "Prim");
|
||||||
PrimBuffer[1]=PrimBuffer[0]+(PRIMPOOL_SIZE);
|
PrimBuffer[1]=PrimBuffer[0]+(PRIMPOOL_SIZE);
|
||||||
|
|
||||||
PrimFlipFlag=0;
|
PrimFlipFlag=0;
|
||||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
BaseOtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||||
|
GUIOtPtr=BaseOtPtr;
|
||||||
|
OtPtr=GUIOtPtr+MAX_OT_GUI;
|
||||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||||
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
||||||
|
|
||||||
PrimListStart=PrimBuffer[0];
|
PrimListStart=PrimBuffer[0];
|
||||||
PrimListEnd=PrimListStart+(PRIMPOOL_SIZE*2);
|
PrimListEnd=PrimListStart+(PRIMPOOL_SIZE*2);
|
||||||
|
|
||||||
InitOTagR(OtList[0],MAX_OT);
|
InitOTagR(OtList[0],MAX_OT_ALL);
|
||||||
InitOTagR(OtList[1],MAX_OT);
|
InitOTagR(OtList[1],MAX_OT_ALL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,19 +44,21 @@ void PrimInit()
|
||||||
void PrimDisplay()
|
void PrimDisplay()
|
||||||
{
|
{
|
||||||
CAnimTex::AnimateTex();
|
CAnimTex::AnimateTex();
|
||||||
UnlinkOTagR(OtPtr, MAX_OT, &DmaStart[PrimFlipFlag]);
|
UnlinkOTagR(BaseOtPtr, MAX_OT_ALL, &DmaStart[PrimFlipFlag]);
|
||||||
|
|
||||||
#ifdef USE_NTAGS
|
#ifdef USE_NTAGS
|
||||||
DrawOTag((u32*)&DmaStart[PrimFlipFlag]);
|
DrawOTag((u32*)&DmaStart[PrimFlipFlag]);
|
||||||
#else
|
#else
|
||||||
DrawOTag(OtPtr+(MAX_OT-1));
|
DrawOTag(BaseOtPtr+(MAX_OT_ALL-1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PrimFlipFlag^=1;
|
PrimFlipFlag^=1;
|
||||||
OtPtr=(sOT*)OtList[PrimFlipFlag];
|
BaseOtPtr=(sOT*)OtList[PrimFlipFlag];
|
||||||
|
GUIOtPtr=BaseOtPtr;
|
||||||
|
OtPtr=GUIOtPtr+MAX_OT_GUI;
|
||||||
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
CurrPrim=(u8*)PrimBuffer[PrimFlipFlag];
|
||||||
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
EndPrim=CurrPrim+(PRIMPOOL_SIZE);
|
||||||
ResetOTagR(OtPtr,MAX_OT);
|
ResetOTagR(BaseOtPtr,MAX_OT_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** Clipping ****************************************************************/
|
/*** Clipping ****************************************************************/
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
#include "gfx\primplus.h"
|
#include "gfx\primplus.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MAX_OT_GUI (0)
|
||||||
#define MAX_OT (16)
|
#define MAX_OT (16)
|
||||||
|
#define MAX_OT_ALL (MAX_OT+MAX_OT_GUI)
|
||||||
#define MAX_PRIMS ((1024*2)+256)
|
#define MAX_PRIMS ((1024*2)+256)
|
||||||
|
|
||||||
//#define USE_NTAGS 1
|
//#define USE_NTAGS 1
|
||||||
|
@ -175,8 +177,8 @@ typedef u32 sOT;
|
||||||
#define InitOTagR(Ot, Count) ClearOTagR(Ot,Count);
|
#define InitOTagR(Ot, Count) ClearOTagR(Ot,Count);
|
||||||
#define ResetOTag(Ot, Count) InitOTag(Ot,Count);
|
#define ResetOTag(Ot, Count) InitOTag(Ot,Count);
|
||||||
#define ResetOTagR(Ot, Count) InitOTagR(Ot,Count);
|
#define ResetOTagR(Ot, Count) InitOTagR(Ot,Count);
|
||||||
#define UnlinkOTag(OtPtr, MAX_OT, Dma) ;
|
#define UnlinkOTag(OtPtr, MAX_OT_ALL, Dma) ;
|
||||||
#define UnlinkOTagR(OtPtr, MAX_OT, Dma) ;
|
#define UnlinkOTagR(OtPtr, MAX_OT_ALL, Dma) ;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -302,10 +304,10 @@ typedef u32 sOT;
|
||||||
/********************************************************************************************************/
|
/********************************************************************************************************/
|
||||||
#define MAX_PRIM_SIZE (sizeof(POLY_FT4))
|
#define MAX_PRIM_SIZE (sizeof(POLY_FT4))
|
||||||
#define PRIMPOOL_SIZE (MAX_PRIMS*MAX_PRIM_SIZE)
|
#define PRIMPOOL_SIZE (MAX_PRIMS*MAX_PRIM_SIZE)
|
||||||
#define OTLIST_SIZE (MAX_OT*sizeof(sOT))
|
#define OTLIST_SIZE (MAX_OT_ALL*sizeof(sOT))
|
||||||
|
|
||||||
/********************************************************************************************************/
|
/********************************************************************************************************/
|
||||||
extern sOT *OtPtr;
|
extern sOT *BaseOtPtr,*GUIOtPtr,*OtPtr;
|
||||||
extern u8 *CurrPrim,*EndPrim;
|
extern u8 *CurrPrim,*EndPrim;
|
||||||
extern u8 *PrimListStart,*PrimListEnd;
|
extern u8 *PrimListStart,*PrimListEnd;
|
||||||
//extern int PrimFlipFlag;
|
//extern int PrimFlipFlag;
|
||||||
|
@ -326,12 +328,18 @@ LINE_G2 *DrawGLine(int _x0,int _y0,int _x1,int _y1,int _r1,int _g1,int _b1,int
|
||||||
/********************************************************************************************************/
|
/********************************************************************************************************/
|
||||||
/*** Inlines ********************************************************************************************/
|
/*** Inlines ********************************************************************************************/
|
||||||
/********************************************************************************************************/
|
/********************************************************************************************************/
|
||||||
|
inline void AddGUIPrimToList(void *Prim,u32 Depth)
|
||||||
|
{
|
||||||
|
ASSERT(Depth<MAX_OT_GUI);
|
||||||
|
addPrim(GUIOtPtr+Depth,(u32*)Prim);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------------------------*/
|
||||||
inline void AddPrimToList(void *Prim,u32 Depth)
|
inline void AddPrimToList(void *Prim,u32 Depth)
|
||||||
{
|
{
|
||||||
ASSERT(Depth<MAX_OT);
|
ASSERT(Depth<MAX_OT);
|
||||||
addPrim(OtPtr+Depth,(u32*)Prim);
|
addPrim(OtPtr+Depth,(u32*)Prim);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------------------------*/
|
||||||
inline void GetFrameUV(sFrameHdr *Fr, u8 *U,u8 *V) {*U=Fr->U;*V=Fr->V;}
|
inline void GetFrameUV(sFrameHdr *Fr, u8 *U,u8 *V) {*U=Fr->U;*V=Fr->V;}
|
||||||
inline void GetFrameUVWH(sFrameHdr *Fr,u8 *U,u8 *V,u8 *W,u8 *H) {*U=Fr->U; *V=Fr->V; *W=Fr->W; *H=Fr->H; }
|
inline void GetFrameUVWH(sFrameHdr *Fr,u8 *U,u8 *V,u8 *W,u8 *H) {*U=Fr->U; *V=Fr->V; *W=Fr->W; *H=Fr->H; }
|
||||||
|
|
|
@ -434,6 +434,7 @@ void initGUIStuff()
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot)
|
void drawBambooBorder(int _x,int _y,int _w,int _h,int _ot)
|
||||||
{
|
{
|
||||||
|
_ot=0; // Sorry again
|
||||||
sFrameHdr *vbam,*hbam,*corner;
|
sFrameHdr *vbam,*hbam,*corner;
|
||||||
int totalSize,numSprites,step;
|
int totalSize,numSprites,step;
|
||||||
int x1,y1,x2,y2;
|
int x1,y1,x2,y2;
|
||||||
|
|
|
@ -166,9 +166,9 @@ void MainLoop()
|
||||||
while(DrawSync(1));
|
while(DrawSync(1));
|
||||||
|
|
||||||
// Render States
|
// Render States
|
||||||
|
CFader::render();
|
||||||
GameState::render();
|
GameState::render();
|
||||||
CBubicleFactory::render();
|
CBubicleFactory::render();
|
||||||
CFader::render();
|
|
||||||
|
|
||||||
#ifdef __USER_paul__
|
#ifdef __USER_paul__
|
||||||
s_paulScene.render();
|
s_paulScene.render();
|
||||||
|
|
Loading…
Add table
Reference in a new issue