forgotten commit. disabled until egl is adapted.
[AROS-Contrib.git] / Games / Doom / st_lib.h
blobc43bc18848ce268a9e038da6083170db7f7e668d
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15 // for more details.
17 // DESCRIPTION:
18 // The status bar widget code.
20 //-----------------------------------------------------------------------------
22 #ifndef __STLIB__
23 #define __STLIB__
26 // We are referring to patches.
27 #include "r_defs.h"
31 // Background and foreground screen numbers
33 #define BG 4
34 #define FG 0
39 // Typedefs of widgets
42 // Number widget
44 typedef struct
46 // upper right-hand corner
47 // of the number (right-justified)
48 int x;
49 int y;
51 // max # of digits in number
52 int width;
54 // last number value
55 int oldnum;
57 // pointer to current value
58 int* num;
60 // pointer to boolean stating
61 // whether to update number
62 boolean* on;
64 // list of patches for 0-9
65 patch_t** p;
67 // user data
68 int data;
70 } st_number_t;
74 // Percent widget ("child" of number widget,
75 // or, more precisely, contains a number widget.)
76 typedef struct
78 // number information
79 st_number_t n;
81 // percent sign graphic
82 patch_t* p;
84 } st_percent_t;
88 // Multiple Icon widget
89 typedef struct
91 // center-justified location of icons
92 int x;
93 int y;
95 // last icon number
96 int oldinum;
98 // pointer to current icon
99 int* inum;
101 // pointer to boolean stating
102 // whether to update icon
103 boolean* on;
105 // list of icons
106 patch_t** p;
108 // user data
109 int data;
111 } st_multicon_t;
116 // Binary Icon widget
118 typedef struct
120 // center-justified location of icon
121 int x;
122 int y;
124 // last icon value
125 int oldval;
127 // pointer to current icon status
128 boolean* val;
130 // pointer to boolean
131 // stating whether to update icon
132 boolean* on;
135 patch_t* p; // icon
136 int data; // user data
138 } st_binicon_t;
143 // Widget creation, access, and update routines
146 // Initializes widget library.
147 // More precisely, initialize STMINUS,
148 // everything else is done somewhere else.
150 void STlib_init(void);
154 // Number widget routines
155 void
156 STlib_initNum
157 ( st_number_t* n,
158 int x,
159 int y,
160 patch_t** pl,
161 int* num,
162 boolean* on,
163 int width );
165 void
166 STlib_updateNum
167 ( st_number_t* n,
168 boolean refresh );
171 // Percent widget routines
172 void
173 STlib_initPercent
174 ( st_percent_t* p,
175 int x,
176 int y,
177 patch_t** pl,
178 int* num,
179 boolean* on,
180 patch_t* percent );
183 void
184 STlib_updatePercent
185 ( st_percent_t* per,
186 int refresh );
189 // Multiple Icon widget routines
190 void
191 STlib_initMultIcon
192 ( st_multicon_t* mi,
193 int x,
194 int y,
195 patch_t** il,
196 int* inum,
197 boolean* on );
200 void
201 STlib_updateMultIcon
202 ( st_multicon_t* mi,
203 boolean refresh );
205 // Binary Icon widget routines
207 void
208 STlib_initBinIcon
209 ( st_binicon_t* b,
210 int x,
211 int y,
212 patch_t* i,
213 boolean* val,
214 boolean* on );
216 void
217 STlib_updateBinIcon
218 ( st_binicon_t* bi,
219 boolean refresh );
221 #endif
222 //-----------------------------------------------------------------------------
224 // $Log$
225 // Revision 1.1 2000/02/29 18:21:06 stegerg
226 // Doom port based on ADoomPPC. Read README.AROS!
229 //-----------------------------------------------------------------------------