2000-11-20 16:31:03 +01:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
fader.h
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2000 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __GFX_FADER_H__
|
|
|
|
#define __GFX_FADER_H__
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
|
|
|
class CFader
|
|
|
|
{
|
|
|
|
public:
|
2001-01-11 21:25:27 +01:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
BUBBLE_FADE,
|
|
|
|
BLACK_FADE,
|
|
|
|
} FADE_STYLE;
|
|
|
|
|
2000-11-20 16:31:03 +01:00
|
|
|
static void render();
|
|
|
|
static void think(int _frames);
|
|
|
|
|
2001-01-11 21:25:27 +01:00
|
|
|
static void setFadingOut(FADE_STYLE _style=BUBBLE_FADE);
|
|
|
|
static void setFadingIn(FADE_STYLE _style=BUBBLE_FADE);
|
|
|
|
|
2000-11-20 16:31:03 +01:00
|
|
|
static int isFading();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
enum
|
|
|
|
{
|
2001-01-11 21:25:27 +01:00
|
|
|
// Bubble style
|
2000-11-20 16:31:03 +01:00
|
|
|
FADE_BORDER_SIZE=80,
|
|
|
|
FADE_SMOOTH_BORDER_SIZE=60,
|
2001-03-01 22:07:38 +01:00
|
|
|
BUBBLES_PER_FRAME=15,
|
2001-01-11 21:25:27 +01:00
|
|
|
|
|
|
|
// Both styles
|
2000-11-20 16:31:03 +01:00
|
|
|
FADE_SPEED=3,
|
|
|
|
};
|
|
|
|
|
2001-01-11 21:25:27 +01:00
|
|
|
typedef enum
|
2000-11-20 16:31:03 +01:00
|
|
|
{
|
|
|
|
FADED_IN,
|
|
|
|
FADING_IN,
|
|
|
|
FADING_OUT,
|
|
|
|
FADED_OUT,
|
|
|
|
} FADE_MODE;
|
|
|
|
|
|
|
|
static FADE_MODE s_fadeMode;
|
2001-01-11 21:25:27 +01:00
|
|
|
static FADE_STYLE s_fadeStyle;
|
|
|
|
static int s_fadeValue;
|
2000-11-20 16:31:03 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Globals
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Functions
|
|
|
|
--------- */
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#endif /* __GFX_FADER_H__ */
|
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|