This commit is contained in:
Daveo 2001-08-03 19:23:11 +00:00
parent 733f0ad88e
commit 1182875927
7 changed files with 36 additions and 34 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

View File

@ -103,27 +103,30 @@ int ColorCount=0;
printf("RGB remapped to %i colors\n",ColorCount);
// Build Out RGB Table
OutRGBTable.SetSize(ColorCount,16);
int RInc=(ShadeRGB.R-128)/16;
int GInc=(ShadeRGB.G-128)/16;
int BInc=(ShadeRGB.B-128)/16;
float RInc=(ShadeRGB.R-128)/16.0f;
float GInc=(ShadeRGB.G-128)/16.0f;
float BInc=(ShadeRGB.B-128)/16.0f;
for (int c=0;c<ColorCount;c++)
{
int R=DestPal[(c*3)+0];
int G=DestPal[(c*3)+1];
int B=DestPal[(c*3)+2];
int BaseR=DestPal[(c*3)+0];
int BaseG=DestPal[(c*3)+1];
int BaseB=DestPal[(c*3)+2];
for (int s=0; s<16; s++)
{
sRGBCol RGB;
RGB.R=R; RGB.G=G; RGB.B=B;
OutRGBTable.Set(c,s,RGB);
int R,G,B;
R+=RInc;
G+=GInc;
B+=BInc;
R=BaseR+(RInc*s);
G=BaseG+(RInc*s);
B=BaseB+(RInc*s);
if (R<0) R=0; else if (R>255) R=255;
if (G<0) G=0; else if (G>255) G=255;
if (B<0) B=0; else if (B>255) B=255;
RGB.R=R; RGB.G=G; RGB.B=B;
OutRGBTable.Set(c,s,RGB);
}
}
}

View File

@ -173,7 +173,7 @@ SFX_GFX := +smoke.bmp \
+drip.bmp +bubblepop.bmp \
+Gush000.bmp +Gush001.bmp +Gush002.bmp +Gush003.bmp +GushBase.bmp \
+cog01.bmp +elecvalve.bmp\
+leg.bmp +thwack.bmp +lightning1.bmp +lightning2.bmp
+leg.bmp +thwack.bmp +lightning1.bmp +lightning2.bmp +Healthbubble.bmp
SFX_GFX_IN := $(foreach FILE,$(SFX_GFX),$(SFX_GFX_DIR)/$(FILE))
@ -206,7 +206,7 @@ PICKUP_GFX_IN := $(foreach FILE,$(PICKUP_GFX),$(PICKUP_GFX_DIR)/$(FILE).bmp)
INGAMEFX_GFX_DIR := $(GRAF_DIR)/ingamefx
INGAMEFX_GFX_TRANS := +watermeter +waterhilight +netblob \
+spike +sharkmine +snakebile +checkpoint
+spike +sharkmine +snakebile
INGAMEFX_GFX_TRANS_NONROT_NONCLIP := +bubble_1 +bubble_2 +bubble_3 \
+water +aim_arrow

View File

@ -17,9 +17,13 @@
#include "FX\FXBubble.h"
const int NRGX=32;
const int NRGX=96;
const int NRGY=188;
const int NRGW=INGAME_SCREENW-64;
const int NRGXInc=32;
const int NRGMaxHealth=10;
const int NRGW=INGAME_SCREENW-(NRGMaxHealth*NRGXInc);
const int NRGBaseRGB=240;
const int NRGRGBInc=NRGBaseRGB/NRGMaxHealth;
/*****************************************************************************/
/*****************************************************************************/
@ -29,8 +33,6 @@ void CFXNRGBar::init(DVECTOR const &_Pos)
CFX::init();
SpriteBank *SprBank=CGameScene::getSpriteBank();
GfxW=SprBank->getFrameWidth(FRM__BUBBLE_1);
GfxHalfW=GfxW/2;
CurrentHealth=0;
}
@ -38,24 +40,17 @@ SpriteBank *SprBank=CGameScene::getSpriteBank();
void CFXNRGBar::SetMax(int Max)
{
MaxHealth=Max;
Scale=((NRGW*4096)/32)/MaxHealth;
XInc=NRGW/MaxHealth;
CurrentHealth=Max;
}
/*****************************************************************************/
/*** Think *******************************************************************/
/*****************************************************************************/
//int NRGMax=16;
//int NRGH=NRGMax;
void CFXNRGBar::think(int _frames)
{
CNpcEnemy *P=(CNpcEnemy*)ParentThing;
int Health=P->getHealth();
// SetMax(NRGMax);
// Health=NRGH;
if (CurrentHealth<Health) CurrentHealth=Health;
if (CurrentHealth>Health)
{
@ -63,7 +58,7 @@ int Health=P->getHealth();
for (int b=0; b<4; b++)
{
DVECTOR Pos;
Pos.vx=NRGX+(CurrentHealth*XInc);
Pos.vx=NRGX+(CurrentHealth*NRGXInc);
Pos.vy=NRGY;
CFXBubble *FX=(CFXBubble*)CFX::Create(CFX::FX_TYPE_BUBBLE_WATER,Pos);
@ -77,18 +72,25 @@ int Health=P->getHealth();
/*****************************************************************************/
/*** Render ******************************************************************/
/*****************************************************************************/
int asd=0;
void CFXNRGBar::render()
{
// CFX::render();
int x=NRGX;
SpriteBank *SprBank=CGameScene::getSpriteBank();
POLY_FT4 *Ft4;
int RGB=NRGBaseRGB;
int x=NRGX;
for (int i=0; i<CurrentHealth; i++)
{
Ft4=SprBank->printRotatedScaledSprite(FRM__BUBBLE_1,x,NRGY,Scale,Scale,0,0);
x+=XInc;
Ft4=SprBank->printFT4(FRM__HEALTHBUBBLE,x,NRGY,0,0,0);
setRGB0(Ft4,RGB,NRGBaseRGB-RGB,0);
setSemiTrans(Ft4,1);
Ft4->tpage|=asd<<5;
RGB-=NRGRGBInc;
x+=NRGXInc;
}
}

View File

@ -20,12 +20,8 @@ public:
bool alwaysThink() {return(true);}
protected:
int GfxW,GfxHalfW;
int MaxHealth;
int CurrentHealth;
int Scale;
int XInc;
};
#endif

View File

@ -35,7 +35,8 @@ void CNpcCheckpointHazard::init()
CNpcHazard::init();
m_triggered = false;
m_spriteFrame = FRM__CHECKPOINT;
// m_spriteFrame = FRM__CHECKPOINT;
m_spriteFrame = 0; // Change by dave cos the checkpoint gfx aint there no more
m_timer = 0;
m_flick = false;
}

Binary file not shown.