UFO: Alien Invasion
ui_internal.h
Go to the documentation of this file.
1 
7 /*
8 Copyright (C) 2002-2022 UFO: Alien Invasion.
9 
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation; either version 2
13 of the License, or (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 See the GNU General Public License for more details.
20 
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 
25 */
26 
27 #pragma once
28 
29 #define UI_MAX_WINDOWS 128
30 #define UI_MAX_COMPONENTS 128
31 #define UI_MAX_WINDOWSTACK 32
32 #define UI_MAX_ACTIONS 2*8192
33 #define UI_MAX_VARIABLESTACK 64
34 
35 #include "node/ui_node_window.h"
36 #include "node/ui_node_model.h"
37 #include "ui_main.h"
38 #include "ui_actions.h"
39 #include "ui_behaviour.h"
40 #include "ui_nodes.h"
41 #include "ui_sprite.h"
42 #include "ui_input.h"
43 #include "ui_expression.h"
44 #include "ui_data.h"
45 
49 typedef struct uiGlobal_s {
50 
60 
65 
66  int numNodes;
67 
70 
73 
74  byte* adata, *curadata;
75  int adataize;
76 
79 
82 
84  int numModels;
85 
88 
91 
92 } uiGlobal_t;
93 
94 extern uiGlobal_t ui_global;
95 
96 extern memPool_t* ui_sysPool;
98 extern memPool_t* ui_dynPool;
99 
104 #define STRUCT_MEMORY_ALIGN 8
105 
106 void* UI_AllocHunkMemory(size_t size, int align, bool reset);
107 
108 void UI_FinishInit(void);
109 void UI_FinishWindowsInit(void);
Global data shared into all UI code.
Definition: ui_internal.h:49
#define UI_MAX_COMPONENTS
Definition: ui_internal.h:30
#define UI_MAX_ACTIONS
Definition: ui_internal.h:32
void * UI_AllocHunkMemory(size_t size, int align, bool reset)
Definition: ui_main.cpp:126
Model that have more than one part (top and down part of an aircraft)
Definition: ui_node_model.h:47
uiGlobal_t ui_global
Definition: ui_main.cpp:38
int numActions
Definition: ui_internal.h:81
#define UI_MAX_MODELS
Definition: ui_node_model.h:44
voidpf void uLong size
Definition: ioapi.h:42
byte * curadata
Definition: ui_internal.h:74
#define UI_MAX_VARIABLESTACK
Definition: ui_internal.h:33
int adataize
Definition: ui_internal.h:75
#define UI_MAX_WINDOWSTACK
Definition: ui_internal.h:31
int numWindows
Definition: ui_internal.h:69
memPool_t * ui_dynStringPool
Definition: ui_main.cpp:40
int numNodes
Definition: ui_internal.h:66
int numModels
Definition: ui_internal.h:84
#define UI_MAX_KEYBINDING
Definition: ui_input.h:30
int numKeyBindings
Definition: ui_internal.h:90
Data and interface to share data.
memPool_t * ui_dynPool
Definition: ui_main.cpp:41
Atomic structure used to define most of the UI.
Definition: ui_nodes.h:80
Type for uiAction_t It also contain type about type (for example EA_BINARYOPERATOR) ...
Definition: ui_actions.h:194
int numComponents
Definition: ui_internal.h:72
void UI_FinishInit(void)
Finish initialization after everything was loaded.
Definition: ui_main.cpp:268
Atomic element to store UI scripts The parser use this atom to translate script action into many tree...
Definition: ui_actions.h:144
#define UI_MAX_WINDOWS
Definition: ui_internal.h:29
#define UI_MAX_SPRITES
Definition: ui_sprite.h:27
int numSprites
Definition: ui_internal.h:87
void UI_FinishWindowsInit(void)
Finish windows initialization.
Definition: ui_windows.cpp:665
char * keyBindings[K_KEY_SIZE]
Definition: cl_keys.cpp:63
memPool_t * ui_sysPool
Definition: ui_main.cpp:42
int windowStackPos
Definition: ui_internal.h:78
uint8_t byte
Definition: ufotypes.h:34