xine-lib: xine-lib-1.2.12/src/post/goom/flying_stars_fx.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
flying_stars_fx.c File Reference
`#include "goom_fx.h"`
`#include "goom_plugin_info.h"`
`#include "goom_tools.h"`
`#include "mathtools.h"`

## Data Structures
struct | _FS_STAR
struct | _FS_DATA

## Macros
#define | NCOL 15
#define | FIREWORKS_FX 0
#define | RAIN_FX 1
#define | FOUNTAIN_FX 2
#define | LAST_FX 3

## Typedefs
typedef struct _FS_STAR | Star
typedef struct _FS_DATA | FSData

## Functions
static void | fs_init (VisualFX *_this, PluginInfo *info)
static void | fs_free (VisualFX *_this)
static void | addABomb (FSData *fs, int mx, int my, float radius, float vage, float gravity, PluginInfo *info)
static void | updateStar (Star *s)
static void | fs_sound_event_occured (VisualFX *_this, PluginInfo *info)
static void | fs_apply (VisualFX *_this, Pixel *src, Pixel *dest, PluginInfo *info)
VisualFX | flying_star_create (void)

## Variables
static const int | colval []

## Macro Definition Documentation

## ◆ FIREWORKS_FX

#define FIREWORKS_FX 0

## ◆ FOUNTAIN_FX

#define FOUNTAIN_FX 2

## ◆ LAST_FX

#define LAST_FX 3

## ◆ NCOL

#define NCOL 15

## ◆ RAIN_FX

#define RAIN_FX 1

## Typedef Documentation

## ◆ FSData

typedef struct _FS_DATA FSData

## ◆ Star

typedef struct _FS_STAR Star

## Function Documentation

## ◆ addABomb()

static void addABomb | ( | FSData * | fs,
|  | int | mx,
|  | int | my,
|  | float | radius,
|  | float | vage,
|  | float | gravity,
|  | PluginInfo * | info
| ) |  |
| static

Cree une nouvelle 'bombe', c'est a dire une particule appartenant a une fusee d'artifice.

References _FS_STAR::age, _FS_STAR::ax, _FS_STAR::ay, cos256, goom_irand(), _PLUGIN_INFO::gRandom, _FS_DATA::maxStars, _FS_DATA::min_age, _FS_DATA::nbStars, sin256, _FS_DATA::stars, _FS_STAR::vage, _FS_STAR::vx, _FS_STAR::vy, _FS_STAR::x, and _FS_STAR::y.

Referenced by fs_sound_event_occured().

## ◆ flying_star_create()

VisualFX flying_star_create | ( | void |  | ) |

References fs_apply(), fs_free(), fs_init(), and _VISUAL_FX::init.

Referenced by goom_init().

## ◆ fs_apply()

static void fs_apply | ( | VisualFX * | _this,
|  | Pixel * | src,
|  | Pixel * | dest,
|  | PluginInfo * | info
| ) |  |
| static

Main methode of the FX.

References _FS_STAR::age, _PARAM::change_listener, colval, _PLUGIN_INFO::draw_line, fs_sound_event_occured(), FVAL, _VISUAL_FX::fx_data, _FS_DATA::fx_mode, _FS_DATA::fx_mode_p, goom_irand(), _PLUGIN_INFO::gRandom, _PLUGIN_INFO::_SIZE_TYPE::height, IVAL, LAST_FX, _FS_DATA::max_age, _FS_DATA::max_age_p, _FS_DATA::maxStars, _PLUGIN_INFO::methods, _FS_DATA::min_age, _FS_DATA::min_age_p, _FS_DATA::nbStars, _FS_DATA::nbStars_limit_p, _FS_DATA::nbStars_p, NCOL, _PLUGIN_INFO::screen, _PLUGIN_INFO::sound, _FS_DATA::stars, _SOUND_INFO::timeSinceLastGoom, updateStar(), _FS_STAR::vx, _FS_STAR::vy, _PLUGIN_INFO::_SIZE_TYPE::width, _FS_STAR::x, and _FS_STAR::y.

Referenced by flying_star_create().

## ◆ fs_free()

static void fs_free | ( | VisualFX * | _this | ) |
| static

References _VISUAL_FX::fx_data, _FS_DATA::params, _PARAMETERS::params, and _FS_DATA::stars.

Referenced by flying_star_create().

## ◆ fs_init()

static void fs_init | ( | VisualFX * | _this,
|  | PluginInfo * | info
| ) |  |
| static

References FIREWORKS_FX, _VISUAL_FX::fx_data, _FS_DATA::fx_mode, _FS_DATA::fx_mode_p, IMAX, IMIN, ISTEP, IVAL, _FS_DATA::max_age_p, _FS_DATA::maxStars, _FS_DATA::min_age_p, _FS_DATA::nbStars, _FS_DATA::nbStars_limit_p, _FS_DATA::nbStars_p, _FS_DATA::params, _PARAMETERS::params, _VISUAL_FX::params, plugin_parameters, secure_f_feedback, secure_i_param, and _FS_DATA::stars.

Referenced by flying_star_create().

## ◆ fs_sound_event_occured()

static void fs_sound_event_occured | ( | VisualFX * | _this,
|  | PluginInfo * | info
| ) |  |
| static

Ajoute de nouvelles particules au moment d'un evenement sonore.

References addABomb(), FIREWORKS_FX, FOUNTAIN_FX, _VISUAL_FX::fx_data, _FS_DATA::fx_mode, goom_irand(), _SOUND_INFO::goomPower, _PLUGIN_INFO::gRandom, _PLUGIN_INFO::_SIZE_TYPE::height, _FS_DATA::max_age, RAIN_FX, _PLUGIN_INFO::screen, _PLUGIN_INFO::sound, _SOUND_INFO::timeSinceLastBigGoom, and _PLUGIN_INFO::_SIZE_TYPE::width.

Referenced by fs_apply().

## ◆ updateStar()

static void updateStar | ( | Star * | s | ) |
| static

Met a jour la position et vitesse d'une particule.

References _FS_STAR::age, _FS_STAR::ax, _FS_STAR::ay, _FS_STAR::vage, _FS_STAR::vx, _FS_STAR::vy, _FS_STAR::x, and _FS_STAR::y.

Referenced by fs_apply().

## Variable Documentation

## ◆ colval

const int colval[]
| static

Initial value:
= {
0x1416181a,
0x1419181a,
0x141f181a,
0x1426181a,
0x142a181a,
0x142f181a,
0x1436181a,
0x142f1819,
0x14261615,
0x13201411,
0x111a100a,
0x0c180508,
0x08100304,
0x00050101,
0x0
}

Referenced by fs_apply().