// **************************************************************************
// **************************************************************************
// **************************************************************************
// **                                                                      **
// ** SHELLGFX.H                                                    MODULE **
// **                                                                      **
// ** Main shell code.                                                     **
// **                                                                      **
// ** Last modified : 03 Mar 1997 by John Brandwood                        **
// **                                                                      **
// **************************************************************************
// **************************************************************************
// **************************************************************************

#ifndef __SHELLGFX_h
#define __SHELLGFX_h

#ifndef __LFPTYPES_h
 #include "lfptypes.h"
#endif

//
// GLOBAL DATA STRUCTURES AND DEFINITIONS
//

#define	FNTBTN_PU           0x00
#define	FNTBTN_PD           0x01
#define	FNTBTN_PL           0x02
#define	FNTBTN_PR           0x03
#define	FNTBTN_TL           0x04
#define	FNTBTN_TR           0x05
#define	FNTBTN_Z            0x06
#define	FNTBTN_S            0x07
#define	FNTBTN_A            0x08
#define	FNTBTN_B            0x09
#define	FNTBTN_CU           0x0A
#define	FNTBTN_CD           0x0B
#define	FNTBTN_CL           0x0C
#define	FNTBTN_CR           0x0D

#define	STRBTN_PU           "\x80"
#define	STRBTN_PD           "\x81"
#define	STRBTN_PL           "\x82"
#define	STRBTN_PR           "\x83"
#define	STRBTN_TL           "\x84"
#define	STRBTN_TR           "\x85"
#define	STRBTN_Z            "\x86"
#define	STRBTN_S            "\x87"
#define	STRBTN_A            "\x88"
#define	STRBTN_B            "\x89"
#define	STRBTN_CU           "\x8A"
#define	STRBTN_CD           "\x8B"
#define	STRBTN_CL           "\x8C"
#define	STRBTN_CR           "\x8D"

#define	CC_MODULATEIDECALA_PRIM    0

#define	RGB_BOXTL           0
#define	RGB_BOXTR           1
#define	RGB_BOXBL           2
#define	RGB_BOXBR           3
#define	RGB_BOXEDGE         4
#define	RGB_BOXBUTTON       5
#define	RGB_BOXHILITE       6

//
// GLOBAL VARIABLES
//

#define	SetWindow(x,y)      { si___gWindowX = (x); si___gWindowY = (y); }

extern	int                 si___gWindowX;
extern	int                 si___gWindowY;
extern	int                 si___gWindowW;
extern	int                 si___gWindowH;

//
// GLOBAL FUNCTION PROTOTYPES
//

extern	Gfx *               ResetRenderStatus       (Gfx *);

extern	Gfx *               SetPipeSync             (Gfx *);
extern	Gfx *               SetPalette              (Gfx *, UI);
extern	Gfx *               SetBlendAlpha           (Gfx *, UI);
extern	Gfx *               SetAlphaCompare         (Gfx *, UI);
extern	Gfx *               SetRenderMode           (Gfx *, UI, UI);
extern	Gfx *               SetCombineMode          (Gfx *, UI, UI);
extern	Gfx *               SetTextureEnable        (Gfx *, UI);
extern	Gfx *               SetTexturePersp         (Gfx *, UI);
extern	Gfx *               SetTextureFilter        (Gfx *, UI);

//

extern	void                NextVtxList             (void);

extern	Gfx *               RenderPhoto             (
								Gfx *               gp,
								UW *                puw__Img,
								int                 x,
								int                 y);

#define NO_BORDER	0	// parameter of RenderPhotoWShadow
#define NEED_BORDER	1	
extern	Gfx *               RenderPhotoWShadow     (
								Gfx *               gp,
								UW *                puw__Img,
								int                 x,
								int                 y,
								int					needborder);


extern	Gfx *               RenderSprite            (
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y);

extern	Gfx *               RenderSpriteVarWidth   (
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y,
								int                 factor,
								int					max
								);


global	Gfx *               RenderSpriteVarHeight   (	// locks Y @ bottom
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y,
								int                 factor,
								int					max
								);

extern	Gfx *               RenderSprBit            (
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y,
								int                 tx,
								int                 ty,
								int                 tw,
								int                 th);

extern	Gfx *               RenderTSprBit           (
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y,
								int                 a,
								int                 tx,
								int                 ty,
								int                 tw,
								int                 th);

extern	Gfx *               RenderTSPR              (
								Gfx *               gp,
								SprTexture_T *      pcl__Spr,
								UI                  ui___Pal,
								int                 x,
								int                 y,
								int                 a);

extern	Gfx *               RenderTBOX              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								int                 r,
								int                 g,
								int                 b,
								int                 a);

extern	Gfx *               RenderFDWN              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								int                 r,
								int                 g,
								int                 b,
								int                 a);

extern	Gfx *               RenderFRGT              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								int                 r,
								int                 g,
								int                 b,
								int                 a);

extern	Gfx *               RenderFLFT              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								int                 r,
								int                 g,
								int                 b,
								int                 a);

extern	Gfx *               RenderLSHD              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);

extern	Gfx *               RenderTSHD              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);

extern	Gfx *               RenderTSHDa             (  //variable intensity
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);


extern	Gfx *               RenderCSHD              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);

extern	Gfx *               RenderESHD              (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);

extern	Gfx *               RenderMessageBox        (
								Gfx *               gp,
								int                 t,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								int                 s,
								UB *                c);

extern	Gfx *               RenderShadedBox         (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								UB *                c);

extern	Gfx *               RenderBevelBox          (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								UB *                c);

extern	Gfx *               RenderVolumeBar         (
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h,
								UB *                c,
								int                 volume);


global	Gfx *               RenderSquareShadows ( // 3 separate shadows
								Gfx *               gp,
								int                 x,
								int                 y,
								int                 w,
								int                 h);

extern	void                InitFontBtn             (void);

extern	Gfx *               DrawFontBtn             (
								Gfx *               gp);




//extern int RCColorR, RCColorG, RCColorB;

//
// STATIC FUNCTION PROTOTYPES
//


void SetRCColors(int r, int g, int b, int a);

global	Gfx * RenderCorner (	Gfx *               gp,
								SprTexture_T *      pcl__Spr,
//								UI                  ui___Pal,
								int                 x,
								int                 y);


//
// End of __SHELLGFX_h
//

#endif



// **************************************************************************
// **************************************************************************
// **************************************************************************
//	END OF SHELLGFX.H
// **************************************************************************
// **************************************************************************
// **************************************************************************

