diff --git a/Graphics/sfx/+healthbubble.bmp b/Graphics/sfx/+healthbubble.bmp new file mode 100644 index 000000000..22af80354 Binary files /dev/null and b/Graphics/sfx/+healthbubble.bmp differ diff --git a/Utils/MkLevel/Layers/MkLevelLayerRGB.cpp b/Utils/MkLevel/Layers/MkLevelLayerRGB.cpp index aeb4acce4..ac3c51d63 100644 --- a/Utils/MkLevel/Layers/MkLevelLayerRGB.cpp +++ b/Utils/MkLevel/Layers/MkLevelLayerRGB.cpp @@ -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;c255) 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); + } } } diff --git a/makefile.gfx b/makefile.gfx index dccba96e2..90f9f7d55 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -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 diff --git a/source/fx/fxnrgbar.cpp b/source/fx/fxnrgbar.cpp index 51bebf60b..335c03e5d 100644 --- a/source/fx/fxnrgbar.cpp +++ b/source/fx/fxnrgbar.cpp @@ -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 (CurrentHealthHealth) { @@ -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; iprintRotatedScaledSprite(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; } } diff --git a/source/fx/fxnrgbar.h b/source/fx/fxnrgbar.h index ade4e772f..08d74f245 100644 --- a/source/fx/fxnrgbar.h +++ b/source/fx/fxnrgbar.h @@ -20,12 +20,8 @@ public: bool alwaysThink() {return(true);} protected: - int GfxW,GfxHalfW; - int MaxHealth; int CurrentHealth; - int Scale; - int XInc; }; #endif diff --git a/source/hazard/hcheck.cpp b/source/hazard/hcheck.cpp index a8cd46fcb..7bc7b052c 100644 --- a/source/hazard/hcheck.cpp +++ b/source/hazard/hcheck.cpp @@ -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; } diff --git a/tools/Data/bin/MkLevel.exe b/tools/Data/bin/MkLevel.exe index f5b2b0d25..2d3717064 100644 Binary files a/tools/Data/bin/MkLevel.exe and b/tools/Data/bin/MkLevel.exe differ