diff --git a/source/gfx/actor.cpp b/source/gfx/actor.cpp index 05368a536..e99743a07 100644 --- a/source/gfx/actor.cpp +++ b/source/gfx/actor.cpp @@ -299,22 +299,24 @@ RECT R={CACHE_X,CACHE_Y,TPAGE_W*CACHE_W,TPAGE_H*CACHE_H}; void CActorCache::LoadPalette(sActorPool *Actor) { if (!Actor->ActorGfx->Clut) - { // Cheap bodge at mo + { RECT R; - int X=CurrentPalette%(((CACHE_W*TPAGE_W)/CACHE_PALW)); - int Y=CurrentPalette/(((CACHE_W*TPAGE_W)/CACHE_PALW)-1); + int PalNo; if (Actor->Filename==ACTORS_SPONGEBOB_SBK) { - R.x=512; - R.y=511; + PalNo=0; } else { - R.x=CACHE_PALX+(CurrentPalette*CACHE_PALW); - R.y=CACHE_PALY-Y; + PalNo=CurrentPalette+1; } + 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.h=CACHE_PALH; DrawSync(0); @@ -754,7 +756,7 @@ void CModelGfx::SetModel(int Type) /*****************************************************************************/ int PXOfs=-16; int PYOfs=-8; -VECTOR _Flip={0,0,0}; + void CModelGfx::Render(DVECTOR &Pos,SVECTOR *Angle,VECTOR *Scale) { #define BLOCK_MULT 16 @@ -770,17 +772,12 @@ int TriCount=Model->TriCount; sTri *TList=&ModelTriList[Model->TriStart]; MATRIX Mtx; - Scale=&_Flip; if (Scale) SetIdentNoTrans(&Mtx,Scale); else SetIdentNoTrans(&Mtx); - if (Angle) - { - if (Angle) RotMatrix(Angle,&Mtx); -// if (Scale) ScaleMatrix(&Mtx,Scale); - } + if (Angle) RotMatrix(Angle,&Mtx); MapXY.vx=Pos.vx>>4; MapXY.vy=Pos.vy>>4; diff --git a/source/gfx/actor.h b/source/gfx/actor.h index 3d22d2f85..0c4146b1a 100644 --- a/source/gfx/actor.h +++ b/source/gfx/actor.h @@ -58,7 +58,7 @@ public: enum { TPAGE_W =256, - TPAGE_H =256-4, + TPAGE_H =256-2, // (allow for 2 lines of palettes) CACHE_X =512, CACHE_Y =256, @@ -71,8 +71,8 @@ public: CACHE_H =1, */ - CACHE_PALX =CACHE_X+64, - CACHE_PALY =511, + CACHE_PALX =CACHE_X, + CACHE_PALY =510, CACHE_PALW =64, CACHE_PALH =1, diff --git a/source/player/player.cpp b/source/player/player.cpp index 073231463..0dfe92250 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -1408,7 +1408,11 @@ void CPlayer::inSoakUpState() Params: 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.. +#endif void CPlayer::takeDamage(DAMAGE_TYPE _damage) { if(m_invincibleFrameCount==0&& // Don't take damage if still recovering from the last hit diff --git a/source/player/pmfly.cpp b/source/player/pmfly.cpp index ffc678f35..541708d64 100644 --- a/source/player/pmfly.cpp +++ b/source/player/pmfly.cpp @@ -60,8 +60,10 @@ void CPlayerModeFly::enter() Params: Returns: ---------------------------------------------------------------------- */ -#ifdef __USER_paul__ +#if defined(__USER_paul__) int playerflyspeed=5; +#elif defined(__USER_daveo__) +int playerflyspeed=10; #else static const int playerflyspeed=5; #endif