Debian Codegraph @

Descent3/gameloop.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/gameloop.h $
21 * $Revision: 16 $
22 * $Date: 4/30/99 12:02p $
23 * $Author: Matt $
24 *
25 * Header for gameloop.c
26 *
27 * $Log: /DescentIII/main/gameloop.h $
28 *
29 * 16 4/30/99 12:02p Matt
30 * Keep the rear view up between levels, but close the other camera views.
31 *
32 * 15 4/17/99 6:15p Samir
33 * replaced gr.h with grdefs.h and fixed resulting compile bugs.
34 *
35 * 14 10/21/98 11:14a Samir
36 * added generic code to skip rendering while in game controller config or
37 * telcom.
38 *
39 * 13 8/24/98 10:40a Jason
40 * fixed some rendering problems
41 *
42 * 12 3/03/98 12:10p Samir
43 * Added simple pausing.
44 *
45 * 11 2/25/98 2:05p Jason
46 * did FOV and object visibility changes
47 *
48 * 10 2/24/98 2:31p Jason
49 * added FOV warp effect for when coming back to life
50 *
51 * 9 2/18/98 3:25p Samir
52 * Added test systems code.
53 *
54 * 8 2/12/98 6:51p Matt
55 * Renamed GameLoop() to be GameFrame(), cleaned up the StartTime/StopTime
56 * system, and moved the interval script call to GameFrame().
57 *
58 * 7 2/09/98 3:54p Matt
59 * Added prototype
60 *
61 * 6 2/04/98 6:09p Matt
62 * Changed object room number to indicate a terrain cell via a flag. Got
63 * rid of the object flag which used to indicate terrain.
64 *
65 * 5 2/04/98 12:50a Matt
66 * Added ability to view from a gun point in small views.
67 * Made pop-up view separate from and bigger than other small views.
68 * Added real keys to set view mode in the three small views.
69 * Changed rendering functions a bit to accommodate smallview changes.
70 *
71 * 4 1/30/98 2:56p Matt
72 * Added support for small views. Made R toggle rear view, and Delete-F8
73 * show a view from object 2. Also changed main window render flow so
74 * could share code with small views.
75 *
76 * 3 1/06/98 1:28p Matt
77 * Cleaned up interfaces to rendering routines, deleted unused code, etc.
78 *
79 * 2 12/29/97 5:44p Samir
80 * Took out references to grViewport and old 2d library.
81 *
82 * 3 5/05/97 4:47p Jason
83 * made terrain and mine rendering work without explicit calls to
84 * g3_Startframe in their main function calls
85 * This allows us to integrate mine/terrain engines nicely
86 *
87 * 2 2/03/97 8:14p Matt
88 * Added gameloop.cpp & gameloop.h
89 *
90 * 1 2/03/97 6:30p Matt
91 *
92 * $NoKeywords: $
93 */
94
95 #include "grdefs.h"
96 #include "object.h"
97
98 // Do all game functions for one frame: render, move objects, etc.
99 void GameFrame(void);
100
101 // Render the world into a game window
102 // Parameters: viewer - if not null, this object disabled from rendering. Not used otherwise.
103 // viewer_eye - where we're rendering from
104 // viewer_roomnum - the roomnum viewer_eye is in
105 // viewer_orient - the oriention for this view
106 // zoom - the zoom for this view
107 // rear_view - if true, we're looking out the rear of this object
108 void GameRenderWorld(object *viewer, vector *viewer_eye, int viewer_roomnum, matrix *viewer_orient, float zoom,
109 bool rear_view);
110
111 extern float Render_zoom;
112 extern float Render_FOV;
113
114 extern bool Game_paused; // determines if game is paused.
115
116 extern bool Rendering_main_view; // determines if we're rendering the main view
117 extern bool Skip_render_game_frame; // skips rendering the game frame if set.
118
119 // Turn off all camera views
120 // If total reset is true, set all views to none, otherwise kill object view but keep rear views.
121 void InitCameraViews(bool total_reset);
122
123 // Pauses game
124 void PauseGame();
125
126 // resumes game operation.
127 void ResumeGame();
128
129 #ifdef _DEBUG
130 // initializes test systems.
131 void InitTestSystems();
132 #endif