FS2_Open
Open source remastering of the Freespace 2 engine
supernova.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef __FS2_SUPERNOVA_FUN_HEADER_FILE
13 #define __FS2_SUPERNOVA_FUN_HEADER_FILE
14 
15 // --------------------------------------------------------------------------------------------------------------------------
16 // SUPERNOVA DEFINES/VARS
17 //
18 
19 struct vec3d;
20 struct matrix;
21 
22 // supernova timing stuff
23 #define SUPERNOVA_MIN_TIME 15.0f // must be at least 15 seconds out
24 #define SUPERNOVA_CUT_TIME 5.0f // note this is also the minimum time for the supernova sexpression
25 #define SUPERNOVA_CAMERA_MOVE_TIME 2.0f // this is the amount of time the camera will cut from the sun to the player
26 #define SUPERNOVA_FADE_TO_WHITE_TIME 1.0f // fade to white over this amount of time
27 
28 // how much bigger the sun will be when the effect hits
29 #define SUPERNOVA_SUN_SCALE 3.0f
30 
31 // status for the supernova this mission
32 #define SUPERNOVA_NONE 0 // nothing happened in this mission
33 #define SUPERNOVA_STARTED 1 // started, but the player never got hit by it
34 #define SUPERNOVA_HIT 2 // started and killed the player
35 extern int Supernova_status;
36 
37 // --------------------------------------------------------------------------------------------------------------------------
38 // SUPERNOVA FUNCTIONS
39 //
40 
41 // level init
43 
44 // start a supernova
45 void supernova_start(int seconds);
46 
47 // stop a supernova
48 void supernova_stop();
49 
50 // call once per frame
51 void supernova_process();
52 
53 // is there a supernova active
54 // 0 : not active.
55 // 1 : player still in control. shockwave approaching.
56 // 2 : camera cut. player controls locked. letterbox
57 // 3 : tooltime. lots of particles
58 // 4 : player is effectively dead. fade to white. stop simulation
59 // 5 : give dead popup
60 int supernova_active();
61 
62 // time left before the supernova hits
63 float supernova_time_left();
64 
65 // pct complete the supernova (0.0 to 1.0)
67 
68 // if the camera should cut to the "you-are-toast" cam
70 
71 // get view params from supernova
73 
74 #endif
int supernova_active()
Definition: supernova.cpp:240
void supernova_get_eye(vec3d *eye_pos, matrix *eye_orient)
Definition: supernova.cpp:320
Definition: pstypes.h:88
void supernova_process()
Definition: supernova.cpp:184
void supernova_stop()
Definition: supernova.cpp:89
matrix eye_orient
Definition: fredrender.cpp:112
vec3d eye_pos
Definition: fredrender.cpp:103
void supernova_level_init()
Definition: supernova.cpp:51
float supernova_pct_complete()
Definition: supernova.cpp:285
float supernova_time_left()
Definition: supernova.cpp:279
int supernova_camera_cut()
Definition: supernova.cpp:296
int Supernova_status
Definition: supernova.cpp:44
void supernova_start(int seconds)
Definition: supernova.cpp:67