This commit is contained in:
Daveo 2001-05-09 17:30:40 +00:00
parent 331861d7da
commit 66630be642
4 changed files with 21 additions and 18 deletions

View file

@ -299,22 +299,24 @@ RECT R={CACHE_X,CACHE_Y,TPAGE_W*CACHE_W,TPAGE_H*CACHE_H};
void CActorCache::LoadPalette(sActorPool *Actor) void CActorCache::LoadPalette(sActorPool *Actor)
{ {
if (!Actor->ActorGfx->Clut) if (!Actor->ActorGfx->Clut)
{ // Cheap bodge at mo {
RECT R; RECT R;
int X=CurrentPalette%(((CACHE_W*TPAGE_W)/CACHE_PALW)); int PalNo;
int Y=CurrentPalette/(((CACHE_W*TPAGE_W)/CACHE_PALW)-1);
if (Actor->Filename==ACTORS_SPONGEBOB_SBK) if (Actor->Filename==ACTORS_SPONGEBOB_SBK)
{ {
R.x=512; PalNo=0;
R.y=511;
} }
else else
{ {
R.x=CACHE_PALX+(CurrentPalette*CACHE_PALW); PalNo=CurrentPalette+1;
R.y=CACHE_PALY-Y;
} }
int X=PalNo%CACHE_W;
int Y=PalNo/CACHE_W;
R.x=CACHE_PALX+(X*CACHE_PALW);
R.y=CACHE_PALY-Y;
R.w=CACHE_PALW; R.w=CACHE_PALW;
R.h=CACHE_PALH; R.h=CACHE_PALH;
DrawSync(0); DrawSync(0);
@ -754,7 +756,7 @@ void CModelGfx::SetModel(int Type)
/*****************************************************************************/ /*****************************************************************************/
int PXOfs=-16; int PXOfs=-16;
int PYOfs=-8; int PYOfs=-8;
VECTOR _Flip={0,0,0};
void CModelGfx::Render(DVECTOR &Pos,SVECTOR *Angle,VECTOR *Scale) void CModelGfx::Render(DVECTOR &Pos,SVECTOR *Angle,VECTOR *Scale)
{ {
#define BLOCK_MULT 16 #define BLOCK_MULT 16
@ -770,17 +772,12 @@ int TriCount=Model->TriCount;
sTri *TList=&ModelTriList[Model->TriStart]; sTri *TList=&ModelTriList[Model->TriStart];
MATRIX Mtx; MATRIX Mtx;
Scale=&_Flip;
if (Scale) if (Scale)
SetIdentNoTrans(&Mtx,Scale); SetIdentNoTrans(&Mtx,Scale);
else else
SetIdentNoTrans(&Mtx); SetIdentNoTrans(&Mtx);
if (Angle) if (Angle) RotMatrix(Angle,&Mtx);
{
if (Angle) RotMatrix(Angle,&Mtx);
// if (Scale) ScaleMatrix(&Mtx,Scale);
}
MapXY.vx=Pos.vx>>4; MapXY.vx=Pos.vx>>4;
MapXY.vy=Pos.vy>>4; MapXY.vy=Pos.vy>>4;

View file

@ -58,7 +58,7 @@ public:
enum enum
{ {
TPAGE_W =256, TPAGE_W =256,
TPAGE_H =256-4, TPAGE_H =256-2, // (allow for 2 lines of palettes)
CACHE_X =512, CACHE_X =512,
CACHE_Y =256, CACHE_Y =256,
@ -71,8 +71,8 @@ public:
CACHE_H =1, CACHE_H =1,
*/ */
CACHE_PALX =CACHE_X+64, CACHE_PALX =CACHE_X,
CACHE_PALY =511, CACHE_PALY =510,
CACHE_PALW =64, CACHE_PALW =64,
CACHE_PALH =1, CACHE_PALH =1,

View file

@ -1408,7 +1408,11 @@ void CPlayer::inSoakUpState()
Params: Params:
Returns: Returns:
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
#if defined(__USER_daveo__)
int invincibleSponge=true; // NB: This is for debugging purposes only so don't try and use it for a permenant cheat mode..
#else
int invincibleSponge=false; // NB: This is for debugging purposes only so don't try and use it for a permenant cheat mode.. int invincibleSponge=false; // NB: This is for debugging purposes only so don't try and use it for a permenant cheat mode..
#endif
void CPlayer::takeDamage(DAMAGE_TYPE _damage) void CPlayer::takeDamage(DAMAGE_TYPE _damage)
{ {
if(m_invincibleFrameCount==0&& // Don't take damage if still recovering from the last hit if(m_invincibleFrameCount==0&& // Don't take damage if still recovering from the last hit

View file

@ -60,8 +60,10 @@ void CPlayerModeFly::enter()
Params: Params:
Returns: Returns:
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
#ifdef __USER_paul__ #if defined(__USER_paul__)
int playerflyspeed=5; int playerflyspeed=5;
#elif defined(__USER_daveo__)
int playerflyspeed=10;
#else #else
static const int playerflyspeed=5; static const int playerflyspeed=5;
#endif #endif