diff --git a/makefile.gfx b/makefile.gfx index 3e27187e7..1b0ca45d6 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -246,6 +246,7 @@ UI_GFX_NONTRANS_IN := $(foreach FILE,$(UI_GFX_NONTRANS),$(UI_GFX_DIR)/$(FILE)) UI_GFX_TRANS := +bambootopleft.bmp +bamboobotleft.bmp +bambootopright.bmp +bamboobotright.bmp \ +bamboohorizontal.bmp +bamboovertical.bmp \ + +slider_marker.bmp \ +butU.bmp +butD.bmp +butL.bmp +butR.bmp \ +butC.bmp +butS.bmp +butX.bmp +butT.bmp \ +mappointer.bmp +speechbubblecorner.bmp \ diff --git a/source/gui/greadout.cpp b/source/gui/greadout.cpp index f3e994f2e..9a30f3d8d 100644 --- a/source/gui/greadout.cpp +++ b/source/gui/greadout.cpp @@ -34,6 +34,10 @@ #include "gfx\prim.h" #endif +#ifndef __GAME_GAME_H__ +#include "game\game.h" +#endif + /* Std Lib ------- */ @@ -190,86 +194,6 @@ void CGUITextReadout::recalc() - - -/*---------------------------------------------------------------------- - Function: - Purpose: - Params: - Returns: - ---------------------------------------------------------------------- */ -void CGUISpatCountReadout::init(CGUIObject *_parent,GUIId _id) -{ - CGUIObjectWithFont::init(_parent,_id); - m_spatsCollected=m_spatsTotal=0; - m_spriteBank=new ("SpatCountReadoutSprites") SpriteBank(); - m_spriteBank->load(SPRITES_SPRITES_SPR); -} - - -/*---------------------------------------------------------------------- - Function: - Purpose: - Params: - Returns: - ---------------------------------------------------------------------- */ -void CGUISpatCountReadout::shutdown() -{ - m_spriteBank->dump(); delete m_spriteBank; - CGUIObjectWithFont::shutdown(); -} - - -/*---------------------------------------------------------------------- - Function: - Purpose: - Params: - Returns: - ---------------------------------------------------------------------- */ -void CGUISpatCountReadout::setSpatCounts(int _collected,int _total) -{ - m_spatsCollected=_collected; - m_spatsTotal=_total; -} - -/*---------------------------------------------------------------------- - Function: - Purpose: - Params: - Returns: - ---------------------------------------------------------------------- */ -void CGUISpatCountReadout::render() -{ - if(!isHidden()) - { - FontBank *fb; - sFrameHdr *fh; - char buf[100]; - int x,y; - - fb=getFontBank(); - fh=m_spriteBank->getFrameHeader(FRM__SPATULA); - - sprintf(buf,"%d/%d",m_spatsCollected,m_spatsTotal); - x=getW()-fb->getStringWidth(buf); - y=(getH()/2)-fb->getCharHeight(); - fb->print(x,y,buf); - - x=getX()+getParentX(); - y=getY()+getParentY()+((getH()-fh->H)/2); - m_spriteBank->printFT4(fh,x,y,0,0,0); - } - CGUIObjectWithFont::render(); -} - - - - - - - - - /*---------------------------------------------------------------------- Function: Purpose: @@ -451,20 +375,24 @@ void CGUIBarReadout::setReadoutRange(int _min,int _max) ---------------------------------------------------------------------- */ void CGUIBarReadout::render() { - POLY_G4 *g4; - int x,y,w,h; - int r,g,b; - int ot; + POLY_G4 *g4; + int x,y,w,h; + int r,g,b; + int ot; + SpriteBank *sb; + sFrameHdr *fh; - x=getX()+getParentX(); - y=getY()+getParentY(); w=getW(); h=getH(); + x=getX()+getParentX(); + y=getY()+getParentY()+(h/2); r=g=b=isSelected()?245:110; ot=getOt(); - DrawLine(x,y+(h/2),x+w,y+(h/2),r,g,b,ot); - DrawLine(x+m_markerOffset,y,x+m_markerOffset,y+h,r,g,b,ot); + sb=CGameScene::getSpriteBank(); + fh=sb->getFrameHeader(FRM__SLIDER_MARKER); + sb->printFT4(fh,x+m_markerOffset-(fh->W/2),y-(fh->H/2),0,0,ot); + DrawLine(x,y,x+w,y,r,g,b,ot); CGUIObject::render(); } diff --git a/source/gui/greadout.h b/source/gui/greadout.h index ff15ee08b..a5b2e23ce 100644 --- a/source/gui/greadout.h +++ b/source/gui/greadout.h @@ -67,24 +67,6 @@ private: }; -class CGUISpatCountReadout : public CGUIObjectWithFont -{ -public: - virtual void init(CGUIObject *_parent,GUIId _id=noId); - virtual void shutdown(); - - virtual void setSpatCounts(int _collected,int _total); - - virtual void render(); - - -private: - int m_spatsCollected,m_spatsTotal; - class SpriteBank *m_spriteBank; - -}; - - class CGUISpriteReadout : public CGUIObjectWithSpriteBank { public: