]> icculus.org git repositories - taylor/freespace2.git/blob - include/supernova.h
Initial revision
[taylor/freespace2.git] / include / supernova.h
1 /*
2  * $Logfile: /Freespace2/code/Starfield/Supernova.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Include file for nebula stuff
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
14  * 4     9/09/99 11:40p Dave
15  * Handle an Assert() in beam code. Added supernova sounds. Play the right
16  * 2 end movies properly, based upon what the player did in the mission.
17  * 
18  * 3     9/03/99 1:32a Dave
19  * CD checking by act. Added support to play 2 cutscenes in a row
20  * seamlessly. Fixed super low level cfile bug related to files in the
21  * root directory of a CD. Added cheat code to set campaign mission # in
22  * main hall.
23  * 
24  * 2     7/21/99 8:10p Dave
25  * First run of supernova effect.
26  *  
27  *
28  * $NoKeywords: $
29  */
30
31 #ifndef __FS2_SUPERNOVA_FUN_HEADER_FILE
32 #define __FS2_SUPERNOVA_FUN_HEADER_FILE
33
34 // --------------------------------------------------------------------------------------------------------------------------
35 // SUPERNOVA DEFINES/VARS
36 //
37
38 struct vector;
39 struct matrix;
40
41 // supernova timing stuff
42 #define SUPERNOVA_MIN_TIME                                                      15.0f                           // must be at least 15 seconds out
43 #define SUPERNOVA_CUT_TIME                                                      5.0f                            // note this is also the minimum time for the supernova sexpression
44 #define SUPERNOVA_CAMERA_MOVE_TIME                              2.0f                            // this is the amount of time the camera will cut from the sun to the player
45 #define SUPERNOVA_FADE_TO_WHITE_TIME                    1.0f                            // fade to white over this amount of time
46
47 // how much bigger the sun will be when the effect hits
48 #define SUPERNOVA_SUN_SCALE                                             3.0f
49
50 // status for the supernova this mission
51 #define SUPERNOVA_NONE                                                          0                                       // nothing happened in this mission
52 #define SUPERNOVA_STARTED                                                       1                                       // started, but the player never got hit by it
53 #define SUPERNOVA_HIT                                                           2                                       // started and killed the player
54 extern int Supernova_status;
55
56 // --------------------------------------------------------------------------------------------------------------------------
57 // SUPERNOVA FUNCTIONS
58 //
59
60 // level init
61 void supernova_level_init();
62
63 // start a supernova
64 void supernova_start(int seconds);
65
66 // call once per frame
67 void supernova_process();
68
69 // is there a supernova active
70 // 0 : not active.
71 // 1 : player still in control. shockwave approaching.
72 // 2 : camera cut. player controls locked. letterbox
73 // 3 : tooltime. lots of particles
74 // 4 : player is effectively dead. fade to white. stop simulation
75 // 5 : give dead popup
76 int supernova_active();
77
78 // time left before the supernova hits
79 float supernova_time_left();
80
81 // pct complete the supernova (0.0 to 1.0)
82 float supernova_pct_complete();
83
84 // if the camera should cut to the "you-are-toast" cam
85 int supernova_camera_cut();
86
87 // get view params from supernova
88 void supernova_set_view(vector *eye_pos, matrix *eye_orient);
89
90 #endif
91