This commit is contained in:
parent
733f0ad88e
commit
1182875927
7 changed files with 36 additions and 34 deletions
BIN
Graphics/sfx/+healthbubble.bmp
Normal file
BIN
Graphics/sfx/+healthbubble.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
|
@ -103,27 +103,30 @@ int ColorCount=0;
|
||||||
printf("RGB remapped to %i colors\n",ColorCount);
|
printf("RGB remapped to %i colors\n",ColorCount);
|
||||||
// Build Out RGB Table
|
// Build Out RGB Table
|
||||||
OutRGBTable.SetSize(ColorCount,16);
|
OutRGBTable.SetSize(ColorCount,16);
|
||||||
int RInc=(ShadeRGB.R-128)/16;
|
float RInc=(ShadeRGB.R-128)/16.0f;
|
||||||
int GInc=(ShadeRGB.G-128)/16;
|
float GInc=(ShadeRGB.G-128)/16.0f;
|
||||||
int BInc=(ShadeRGB.B-128)/16;
|
float BInc=(ShadeRGB.B-128)/16.0f;
|
||||||
|
|
||||||
for (int c=0;c<ColorCount;c++)
|
for (int c=0;c<ColorCount;c++)
|
||||||
{
|
{
|
||||||
int R=DestPal[(c*3)+0];
|
int BaseR=DestPal[(c*3)+0];
|
||||||
int G=DestPal[(c*3)+1];
|
int BaseG=DestPal[(c*3)+1];
|
||||||
int B=DestPal[(c*3)+2];
|
int BaseB=DestPal[(c*3)+2];
|
||||||
for (int s=0; s<16; s++)
|
for (int s=0; s<16; s++)
|
||||||
{
|
{
|
||||||
sRGBCol RGB;
|
sRGBCol RGB;
|
||||||
RGB.R=R; RGB.G=G; RGB.B=B;
|
int R,G,B;
|
||||||
OutRGBTable.Set(c,s,RGB);
|
|
||||||
|
|
||||||
R+=RInc;
|
R=BaseR+(RInc*s);
|
||||||
G+=GInc;
|
G=BaseG+(RInc*s);
|
||||||
B+=BInc;
|
B=BaseB+(RInc*s);
|
||||||
if (R<0) R=0; else if (R>255) R=255;
|
if (R<0) R=0; else if (R>255) R=255;
|
||||||
if (G<0) G=0; else if (G>255) G=255;
|
if (G<0) G=0; else if (G>255) G=255;
|
||||||
if (B<0) B=0; else if (B>255) B=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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ SFX_GFX := +smoke.bmp \
|
||||||
+drip.bmp +bubblepop.bmp \
|
+drip.bmp +bubblepop.bmp \
|
||||||
+Gush000.bmp +Gush001.bmp +Gush002.bmp +Gush003.bmp +GushBase.bmp \
|
+Gush000.bmp +Gush001.bmp +Gush002.bmp +Gush003.bmp +GushBase.bmp \
|
||||||
+cog01.bmp +elecvalve.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))
|
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_DIR := $(GRAF_DIR)/ingamefx
|
||||||
INGAMEFX_GFX_TRANS := +watermeter +waterhilight +netblob \
|
INGAMEFX_GFX_TRANS := +watermeter +waterhilight +netblob \
|
||||||
+spike +sharkmine +snakebile +checkpoint
|
+spike +sharkmine +snakebile
|
||||||
INGAMEFX_GFX_TRANS_NONROT_NONCLIP := +bubble_1 +bubble_2 +bubble_3 \
|
INGAMEFX_GFX_TRANS_NONROT_NONCLIP := +bubble_1 +bubble_2 +bubble_3 \
|
||||||
+water +aim_arrow
|
+water +aim_arrow
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,13 @@
|
||||||
|
|
||||||
#include "FX\FXBubble.h"
|
#include "FX\FXBubble.h"
|
||||||
|
|
||||||
const int NRGX=32;
|
const int NRGX=96;
|
||||||
const int NRGY=188;
|
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();
|
CFX::init();
|
||||||
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
||||||
|
|
||||||
GfxW=SprBank->getFrameWidth(FRM__BUBBLE_1);
|
|
||||||
GfxHalfW=GfxW/2;
|
|
||||||
CurrentHealth=0;
|
CurrentHealth=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,24 +40,17 @@ SpriteBank *SprBank=CGameScene::getSpriteBank();
|
||||||
void CFXNRGBar::SetMax(int Max)
|
void CFXNRGBar::SetMax(int Max)
|
||||||
{
|
{
|
||||||
MaxHealth=Max;
|
MaxHealth=Max;
|
||||||
Scale=((NRGW*4096)/32)/MaxHealth;
|
|
||||||
XInc=NRGW/MaxHealth;
|
|
||||||
CurrentHealth=Max;
|
CurrentHealth=Max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** Think *******************************************************************/
|
/*** Think *******************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
//int NRGMax=16;
|
|
||||||
//int NRGH=NRGMax;
|
|
||||||
void CFXNRGBar::think(int _frames)
|
void CFXNRGBar::think(int _frames)
|
||||||
{
|
{
|
||||||
CNpcEnemy *P=(CNpcEnemy*)ParentThing;
|
CNpcEnemy *P=(CNpcEnemy*)ParentThing;
|
||||||
int Health=P->getHealth();
|
int Health=P->getHealth();
|
||||||
|
|
||||||
// SetMax(NRGMax);
|
|
||||||
// Health=NRGH;
|
|
||||||
|
|
||||||
if (CurrentHealth<Health) CurrentHealth=Health;
|
if (CurrentHealth<Health) CurrentHealth=Health;
|
||||||
if (CurrentHealth>Health)
|
if (CurrentHealth>Health)
|
||||||
{
|
{
|
||||||
|
@ -63,7 +58,7 @@ int Health=P->getHealth();
|
||||||
for (int b=0; b<4; b++)
|
for (int b=0; b<4; b++)
|
||||||
{
|
{
|
||||||
DVECTOR Pos;
|
DVECTOR Pos;
|
||||||
Pos.vx=NRGX+(CurrentHealth*XInc);
|
Pos.vx=NRGX+(CurrentHealth*NRGXInc);
|
||||||
Pos.vy=NRGY;
|
Pos.vy=NRGY;
|
||||||
|
|
||||||
CFXBubble *FX=(CFXBubble*)CFX::Create(CFX::FX_TYPE_BUBBLE_WATER,Pos);
|
CFXBubble *FX=(CFXBubble*)CFX::Create(CFX::FX_TYPE_BUBBLE_WATER,Pos);
|
||||||
|
@ -77,18 +72,25 @@ int Health=P->getHealth();
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** Render ******************************************************************/
|
/*** Render ******************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
int asd=0;
|
||||||
void CFXNRGBar::render()
|
void CFXNRGBar::render()
|
||||||
{
|
{
|
||||||
// CFX::render();
|
// CFX::render();
|
||||||
|
|
||||||
int x=NRGX;
|
|
||||||
|
|
||||||
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
SpriteBank *SprBank=CGameScene::getSpriteBank();
|
||||||
POLY_FT4 *Ft4;
|
POLY_FT4 *Ft4;
|
||||||
|
int RGB=NRGBaseRGB;
|
||||||
|
int x=NRGX;
|
||||||
|
|
||||||
for (int i=0; i<CurrentHealth; i++)
|
for (int i=0; i<CurrentHealth; i++)
|
||||||
{
|
{
|
||||||
Ft4=SprBank->printRotatedScaledSprite(FRM__BUBBLE_1,x,NRGY,Scale,Scale,0,0);
|
Ft4=SprBank->printFT4(FRM__HEALTHBUBBLE,x,NRGY,0,0,0);
|
||||||
x+=XInc;
|
setRGB0(Ft4,RGB,NRGBaseRGB-RGB,0);
|
||||||
|
setSemiTrans(Ft4,1);
|
||||||
|
Ft4->tpage|=asd<<5;
|
||||||
|
|
||||||
|
RGB-=NRGRGBInc;
|
||||||
|
x+=NRGXInc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,8 @@ public:
|
||||||
bool alwaysThink() {return(true);}
|
bool alwaysThink() {return(true);}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int GfxW,GfxHalfW;
|
|
||||||
|
|
||||||
int MaxHealth;
|
int MaxHealth;
|
||||||
int CurrentHealth;
|
int CurrentHealth;
|
||||||
int Scale;
|
|
||||||
int XInc;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,7 +35,8 @@ void CNpcCheckpointHazard::init()
|
||||||
CNpcHazard::init();
|
CNpcHazard::init();
|
||||||
|
|
||||||
m_triggered = false;
|
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_timer = 0;
|
||||||
m_flick = false;
|
m_flick = false;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue