00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef FXFX_H
00016 #define FXFX_H
00017
00018 #include <Windows.h>
00019
00020 #include "Genesis.h"
00021
00022 #include "Console.h"
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028
00029
00030
00031 #define FX_SMOKE_TRAIL (1<<0)
00032 #define FX_PARTICLE_TRAIL (1<<1)
00033 #define FX_SHREDDER (1<<2)
00034
00035
00036 #define FX_EXPLODE1 0
00037 #define FX_EXPLODE2 1
00038
00039
00040 #define NUM_SMOKE_TEXTURES 10
00041 #define NUM_PARTICLE_TEXTURES 8
00042 #define NUM_EXPLODE_TEXTURES 6
00043
00044 #define FX_MAX_TEMP_PLAYERS 512
00045
00046
00047
00048 typedef struct Fx_System Fx_System;
00049 typedef struct Fx_Player Fx_Player;
00050 typedef struct Fx_TempPlayer Fx_TempPlayer;
00051
00052 typedef geBoolean Fx_TempPlayerControl(Fx_System *Fx, Fx_TempPlayer *Player, float Time);
00053
00054 typedef struct Fx_Player
00055 {
00056 float Time;
00057
00058 uint16 FxFlags;
00059
00060 geXForm3d XForm;
00061 } Fx_Player;
00062
00063 typedef struct Fx_TempPlayer
00064 {
00065 geBoolean Active;
00066 Fx_TempPlayerControl *Control;
00067
00068 float Time;
00069 geVec3d Pos;
00070 } Fx_TempPlayer;
00071
00072 typedef struct Fx_System
00073 {
00074 geWorld *World;
00075
00076 geBitmap *SmokeBitmaps[NUM_SMOKE_TEXTURES];
00077 geBitmap *ParticleBitmaps[NUM_PARTICLE_TEXTURES];
00078 geBitmap *ExplodeBitmaps[NUM_EXPLODE_TEXTURES];
00079
00080 Fx_TempPlayer TempPlayers[FX_MAX_TEMP_PLAYERS];
00081 Fx_TempPlayer *CurrentTempPlayer;
00082
00083 Console_Console *Console;
00084 } Fx_System;
00085
00086
00087
00088 Fx_System *Fx_SystemCreate(geWorld *World, Console_Console *Console);
00089 void Fx_SystemDestroy(Fx_System *Fx);
00090 geBoolean Fx_SystemFrame(Fx_System *Fx, float Time);
00091 geBoolean Fx_SpawnFx(Fx_System *Fx, geVec3d *Pos, uint8 Type);
00092 Fx_TempPlayer *Fx_SystemAddTempPlayer(Fx_System *Fx);
00093 void Fx_SystemRemoveTempPlayer(Fx_System *Fx, Fx_TempPlayer *Player);
00094 geBoolean Fx_PlayerSetFxFlags(Fx_System *Fx, Fx_Player *Player, uint16 FxFlags);
00095 geBoolean Fx_PlayerFrame(Fx_System *Fx, Fx_Player *Player, const geXForm3d *XForm, float Time);
00096
00097 #ifdef __cplusplus
00098 }
00099 #endif
00100
00101 #endif