This commit is contained in:
Daveo 2001-07-09 22:13:44 +00:00
parent 33ce5c2f03
commit 6cb69637f8
4 changed files with 44 additions and 3 deletions

View File

@ -103,6 +103,15 @@
#include "gfx\actor.h"
int RenderZ=378;//256; Increased to make depth less, and SB more visible
// Horrible evil bodge 4 Petro, via Gary :o(
#define USE_GLOBAL_RGB
#ifdef USE_GLOBAL_RGB
u8 GlobalRGB[4]={127,127,127,127};
int GlobalRGBSel=0;
char *GlobalRGBName[4]={"Sprites","Action","Mid","Other"};
int GlobalRGBX=200;
int GlobalRGBY=28;
#endif
/*****************************************************************************/
@ -333,7 +342,24 @@ void CGameScene::render_showing_lives()
void CGameScene::render_playing()
{
// CamMtx.t[2]=ZPos; // Temp
#ifdef USE_GLOBAL_RGB
s_genericFont->setTrans(0);
s_genericFont->setSMode(0);
for (int i=0; i<3; i++)
{
char Buf[32];
if (i==GlobalRGBSel)
s_genericFont->setColour(255,255,255);
else
s_genericFont->setColour(64,64,64);
sprintf(Buf,"%s: %i",GlobalRGBName[i],GlobalRGB[i]);
s_genericFont->print(GlobalRGBX,GlobalRGBY+(i*16),Buf);
}
#endif
if(m_levelHasTimer)
{
int timerValue;
@ -509,6 +535,16 @@ void CGameScene::think_showing_lives(int _frames)
/*****************************************************************************/
void CGameScene::think_playing(int _frames)
{
#ifdef USE_GLOBAL_RGB
if (PadGetDown(1) & PAD_UP) GlobalRGBSel--;
if (PadGetDown(1) & PAD_DOWN) GlobalRGBSel++;
GlobalRGBSel&=3;
if(PadGetHeld(1)&PAD_LEFT ) GlobalRGB[GlobalRGBSel]--;
if(PadGetHeld(1)&PAD_RIGHT ) GlobalRGB[GlobalRGBSel]++;
GlobalRGB[GlobalRGBSel]&=255;
#endif
if(s_readyToExit)
{
return;

View File

@ -605,7 +605,8 @@ sSpriteAnim *ThisAnim=SpriteBank->AnimList+Anim;
Ft4=GetPrimFT4();
SetUpFT4(Ft4,ThisNode,Pos.vx,Pos.vy,XFlip,YFlip);
setRGB0(Ft4,128,128,128);
extern u8 GlobalRGB[];
setRGB0(Ft4,GlobalRGB[0],GlobalRGB[0],GlobalRGB[0]);
Ft4->tpage=ThisNode->TPage;
Ft4->clut=PoolEntry->ActorGfx->Clut;
addPrim(OtPtr+OtPos,Ft4);

View File

@ -41,7 +41,7 @@ TSPRT *PrimPtr=PrimBank;
for (int i=0; i<Count; i++)
{
setTSprt(PrimPtr);
setTSetShadeTex(PrimPtr,1);
setTSetShadeTex(PrimPtr,0);
PrimPtr->w=TILE2D_WIDTH;
PrimPtr->h=TILE2D_HEIGHT;
PrimPtr++;
@ -125,6 +125,8 @@ TSPRT *PrimPtr=PrimBank;
PrimPtr->y0=TileY;
setTSprtTPage(PrimPtr,Tile->TPage);
*(u32*)&PrimPtr->u0=*(u32*)&Tile->u0; // copy uv AND clut
extern u8 GlobalRGB[];
setRGB0(PrimPtr,GlobalRGB[2],GlobalRGB[2],GlobalRGB[2]);
addPrim(ThisOT,PrimPtr);
PrimPtr++;
}

View File

@ -159,7 +159,7 @@ VECTOR BlkPos;
setlen(TPrimPtr, GPU_PolyFT3Tag);
TPrimPtr->code=TList->PolyCode;
gte_rtpt_b();
setShadeTex(TPrimPtr,1);
// setShadeTex(TPrimPtr,1);
T0=*(u32*)&TList->uv0; // Get UV0 & TPage
T1=*(u32*)&TList->uv1; // Get UV1 & Clut
@ -167,6 +167,8 @@ VECTOR BlkPos;
*(u32*)&TPrimPtr->u0=T0; // Set UV0
*(u32*)&TPrimPtr->u1=T1; // Set UV1
*(u16*)&TPrimPtr->u2=T2; // Set UV2
extern u8 GlobalRGB[];
setRGB0(TPrimPtr,GlobalRGB[1],GlobalRGB[1],GlobalRGB[1]);
ThisOT=OtPtr+TList->OTOfs;
TList++;