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