Debian Codegraph @

editor/HView.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/editor/HView.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:57:38 $
23 * $Author: kevinb $
24 *
25 * Header for hview.cpp
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 9 4/29/99 11:51p Matt
30 * Improved viewer move functions.
31 *
32 * 8 1/21/98 12:33p Matt
33 * Revamped viewer system
34 *
35 * 7 1/19/98 10:04a Matt
36 * Removed unused function
37 *
38 * 6 9/17/97 11:51a Samir
39 * BIG SEGMENT RIPOUT
40 *
41 * 5 8/21/97 6:02p Matt
42 * Added prototype for FindViewerObject()
43 *
44 * 4 8/04/97 12:43p Matt
45 * Added SetViewerFromRoomFace()
46 *
47 * 2 4/01/97 11:00p Matt
48 * Changed editor to keep a viewer object (type camera) seperate from the
49 * player object. This camera, and not the player, is now moved by
50 * slewing, the C key, etc. When going into the game, the viewer position
51 * & orientation are copied to the player. When going back to the editor,
52 * the player position is copied to the viewer, and the player object is
53 * reset to its start location.
54 *
55 * 1 3/17/97 2:25p Matt
56 *
57 * $NoKeywords: $
58 */
59
60 #include "room.h"
61
62 struct object;
63
64 // Set the viewer in the specified room facing the specified face
65 // If room_center is true, put viewer at the center of the room facing the face
66 // If room_center is false, put the viewer directly in front of the selected face
67 // If the room is external, put the viewer a distance away from the room,
68 // facing either the center (if room_center is true) or the specified face
69 void SetViewerFromRoomFace(room *roomp, int facenum, bool room_center);
70
71 // Returns the number (not the id) of the current viewer, in the range 0..MAX_VIEWERS
72 int GetViewerNum();
73
74 // Creates a new viewer object. Copies position & orientation from the current viewer
75 void CreateNewViewer();
76
77 // Select next viewer
78 void SelectNextViewer();
79
80 // Deletes the current viewer object
81 void DeleteViewer();
82
83 // Sets the viewer object for the editor, creating if not already in mine
84 void SetEditorViewer();
85
86 // Finds a specific viewer object it one exists
87 // Parameters: id - which viewer id
88 // Returns: object number of a viewer object, or -1 if none
89 int FindViewerObject(int id);
90
91 // Finds a viewer object if one exists.
92 // Starts looking at the specified id and searches through all possible ids
93 // Parameters: id - which viewer id
94 // view_mode - if -1, find any viewer, else find one that matches view mode
95 // Returns: object number of a viewer object, or -1 if none
96 int FindNextViewerObject(int id, int view_mode);
97
98 // Moves the room viewer to the origin, if there is a room viewer
99 void ResetRoomViewer();