| 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/SmallViews.h $ |
| 21 | * $Revision: 11 $ |
| 22 | * $Date: 5/01/99 12:41a $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * Header for SmallViews.cpp |
| 26 | * |
| 27 | * $Log: /DescentIII/Main/SmallViews.h $ |
| 28 | * |
| 29 | * 11 5/01/99 12:41a Matt |
| 30 | * Added static when a small viewer object dies. |
| 31 | * |
| 32 | * 10 4/19/99 1:31p Matt |
| 33 | * Made guided missile small view use title and crosshairs flag, instead |
| 34 | * of doing special check for guided missile. |
| 35 | * |
| 36 | * 9 4/12/99 1:10a Matt |
| 37 | * Added labels for small views. |
| 38 | * |
| 39 | * 8 3/22/99 4:26p Samir |
| 40 | * added toggles for guided missile view and reticle. |
| 41 | * |
| 42 | * 7 2/10/99 1:47p Matt |
| 43 | * Changed object handle symbolic constants |
| 44 | * |
| 45 | * 6 1/13/99 12:42p Matt |
| 46 | * Added code to close a popup view |
| 47 | * |
| 48 | * 5 5/26/98 11:37a Matt |
| 49 | * Changed small view system to allow the popup window in any of the three |
| 50 | * positions, to allow any window to be the "bigger" size, and to restore |
| 51 | * the old view when a popup view goes away. |
| 52 | * |
| 53 | * 4 2/09/98 3:19p Matt |
| 54 | * Added function to return the viewer object for a small view |
| 55 | * |
| 56 | * 3 2/04/98 12:50a Matt |
| 57 | * Added ability to view from a gun point in small views. |
| 58 | * Made pop-up view separate from and bigger than other small views. |
| 59 | * Added real keys to set view mode in the three small views. |
| 60 | * Changed rendering functions a bit to accommodate smallview changes. |
| 61 | * |
| 62 | * 2 1/30/98 2:55p Matt |
| 63 | * Added SmallViews system |
| 64 | * |
| 65 | * 1 1/29/98 11:15a Matt |
| 66 | * |
| 67 | */ |
| 68 | |
| 69 | #include "descent.h"cxx . . $ `<file>/Descent3/descent.h`/ |
| 70 | |
| 71 | // Values for the small view windows |
| 72 | #define SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`! 0 |
| 73 | #define SVW_CENTERcxx . . $ `Descent3/SmallViews.h:73:9`! 1 |
| 74 | #define SVW_RIGHTcxx . . $ `Descent3/SmallViews.h:74:9`! 2 |
| 75 | |
| 76 | // Small view flags |
| 77 | #define SVF_POPUPcxx . . $ `Descent3/SmallViews.h:77:9`! 1 // This is a temporary window |
| 78 | #define SVF_BIGGERcxx . . $ `Descent3/SmallViews.h:78:9`! 2 // This window is drawn a little bigger than the normal window |
| 79 | #define SVF_REARVIEWcxx . . $ `Descent3/SmallViews.h:79:9`! 4 // Draw looking backward from the viewer |
| 80 | #define SVF_TIMEDcxx . . $ `Descent3/SmallViews.h:80:9`! 8 // This window is timer-based. DO NOT USE THIS FLAG WHEN CALLING CreateSmallView(). |
| 81 | #define SVF_CROSSHAIRScxx . . $ `Descent3/SmallViews.h:81:9`! 16 // This window has crosshairs |
| 82 | #define SVF_STATICcxx . . $ `Descent3/SmallViews.h:82:9`! 32 // Window is showing static. The object handle is unused |
| 83 | |
| 84 | // if guided missile smallview is up, this will be true. |
| 85 | extern bool Guided_missile_smallviewcxx . . $ Guided_missile_smallview.; |
| 86 | |
| 87 | // Create a new small view. If there is already a view in the given window, the old view gets blown away. |
| 88 | // Parameters: window - which window to open. See constants in SmallViews.h |
| 89 | // objhandle - handle for the object to view from |
| 90 | // flags - various view attributes. See defines in header file. |
| 91 | // time - how long to keep the window up. If 0, keep up indefinitely |
| 92 | // zoom - the zoom for this window. If 0, use the default zoom |
| 93 | // gun_num - which gun to view from. if -1, use viewer's center and orientation. |
| 94 | // label - the label for the window |
| 95 | // Returns: which window was opened, or -1 if window couldn't be created |
| 96 | int CreateSmallViewcxx . . $ CreateSmallView(114097c446ee1c3e).(int window, int objhandle, int flags = 0, float time = 0.0, float zoom = D3_DEFAULT_ZOOMcxx . . $ `Descent3/descent.h:178:9`!, |
| 97 | int gun_num = -1, const char *label = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 98 | |
| 99 | // Called to get rid of all the small views & init system |
| 100 | void ResetSmallViewscxx . . $ ResetSmallViews(49f6e7a06ebc5aa8).(); |
| 101 | |
| 102 | // Draw all the active small views |
| 103 | void DrawSmallViewscxx . . $ DrawSmallViews(49f6e7a06ebc5aa8).(); |
| 104 | |
| 105 | // Returns the viewer object for the specified small view. |
| 106 | // If the view isn't active, returns OBJECT_HANDLE_NONE. |
| 107 | int GetSmallViewercxx . . $ GetSmallViewer(7864480464b09eea).(int window); |
| 108 | |
| 109 | // Get rid of a small view |
| 110 | // Parameters: window - the window to get rid of |
| 111 | void CloseSmallViewcxx . . $ CloseSmallView(d4f767463ce0a6b3).(int window); |
| 112 | |
| 113 | // Get rid of a small view if it's a popup window |
| 114 | // Parameters: window - the window to get rid of |
| 115 | void ClosePopupViewcxx . . $ ClosePopupView(d4f767463ce0a6b3).(int window); |