SBSPSS/source/gfx/fader.h

90 lines
1.7 KiB
C
Raw Normal View History

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
{
BLACK_FADE,
2001-04-02 17:48:02 +02:00
WHITE_FADE,
2001-01-11 21:25:27 +01:00
} FADE_STYLE;
2000-11-20 16:31:03 +01:00
static void render();
static void think(int _frames);
2001-06-21 00:57:27 +02:00
static void setFadingOut(FADE_STYLE _style=BLACK_FADE);
static void setFadingIn(FADE_STYLE _style=BLACK_FADE);
2001-01-11 21:25:27 +01:00
2000-11-20 16:31:03 +01:00
static int isFading();
private:
enum
{
2001-06-21 00:57:27 +02:00
FRAMES_TO_WAIT=5, // Waits before fading in/out and after fading out
FADE_SPEED=10,
2000-11-20 16:31:03 +01:00
};
2001-01-11 21:25:27 +01:00
typedef enum
2000-11-20 16:31:03 +01:00
{
2001-06-21 00:57:27 +02:00
PAUSE_BEFORE_FADING_IN,
2000-11-20 16:31:03 +01:00
FADING_IN,
2001-07-13 16:55:52 +02:00
FADED_IN,
2000-11-20 16:31:03 +01:00
FADING_OUT,
2001-06-21 00:57:27 +02:00
PAUSE_AFTER_FADING_OUT,
2000-11-20 16:31:03 +01:00
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;
2001-06-21 00:57:27 +02:00
static int s_waitFrames;
2000-11-20 16:31:03 +01:00
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __GFX_FADER_H__ */
/*===========================================================================
end */