2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Starfield/Supernova.h $
15 * Include file for nebula stuff
18 * Revision 1.2 2002/06/09 04:41:15 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
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.
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
35 * 2 7/21/99 8:10p Dave
36 * First run of supernova effect.
42 #ifndef __FS2_SUPERNOVA_FUN_HEADER_FILE
43 #define __FS2_SUPERNOVA_FUN_HEADER_FILE
45 // --------------------------------------------------------------------------------------------------------------------------
46 // SUPERNOVA DEFINES/VARS
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
58 // how much bigger the sun will be when the effect hits
59 #define SUPERNOVA_SUN_SCALE 3.0f
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;
67 // --------------------------------------------------------------------------------------------------------------------------
68 // SUPERNOVA FUNCTIONS
72 void supernova_level_init();
75 void supernova_start(int seconds);
77 // call once per frame
78 void supernova_process();
80 // is there a supernova 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();
89 // time left before the supernova hits
90 float supernova_time_left();
92 // pct complete the supernova (0.0 to 1.0)
93 float supernova_pct_complete();
95 // if the camera should cut to the "you-are-toast" cam
96 int supernova_camera_cut();
98 // get view params from supernova
99 void supernova_set_view(vector *eye_pos, matrix *eye_orient);