1 /* ResidualVM - A 3D game interpreter
2  *
3  * ResidualVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the AUTHORS
5  * file distributed with this source distribution.
6  *
7  * Additional copyright for this file:
8  * Copyright (C) 1999-2000 Revolution Software Ltd.
9  * This code is based on source code created by Revolution Software,
10  * used with permission.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25  *
26  */
27 
28 // global objects are in here - this makes it easier to see what there is
29 #include "engines/icb/global_objects.h"
30 #include "engines/icb/sound_logic.h"
31 
32 namespace ICB {
33 
34 int32 globalCharSpacing = 0;
35 
36 // Prop sprite brightness to use when highlighting a prop that the player could interact with
37 int32 g_prop_select_r = 200;
38 int32 g_prop_select_g = 200;
39 int32 g_prop_select_b = 200;
40 
41 // extra ambient brightness to use when highlighting a mega that the player could interact with
42 int32 g_mega_select_r = 200;
43 int32 g_mega_select_g = 200;
44 int32 g_mega_select_b = 200;
45 
46 // holds info about current mission
47 _mission *g_mission = NULL;
48 
49 // main buffer object
50 // if this remains NULL then the system knows that there are no resources present
51 // this should be used as a high level indication of the situation
52 res_man *rs1 = NULL;
53 res_man *rs2 = NULL;
54 res_man *rs3 = NULL;
55 
56 res_man *private_session_resman = NULL;
57 
58 res_man *rs_bg = NULL;     // pointer to which res_man to use for background buffer
59 res_man *rs_icons = NULL;  // pointer to which res_man to use for icons
60 res_man *rs_anims = NULL;  // pointer to which res_man to use for animation data
61 res_man *rs_remora = NULL; // pointer to which res_man to use for remora graphics
62 res_man *rs_font = NULL;   // pointer to which res_man to use for font data
63 
64 // global test only
65 res_man *global_text_resman = NULL;
66 _linked_data_file *global_text;
67 
68 // route-manager service object
69 // doesnt depend on session specific extrernal data so we make it global service
70 // gets reset by the session constructor
71 // the service exists to facilitate and coordinate the movement of non player characters - the player object has its own stuff
72 //_route_manager        router;
73 
74 // speech
75 text_sprite *g_text_bloc1;
76 
77 // pc has extra bloc for remora, etc.
78 text_sprite *g_text_bloc2;
79 
80 _mission *g_icb_mission;
81 _game_session *g_icb_session;
82 
83 // session objects
84 _barrier_handler g_icb_session_barriers;
85 _floor_world *g_icb_session_floors;
86 _logic *g_logics[MAX_session_objects];
87 _mega *g_megas[MAX_voxel_list];
88 _vox_image *g_vox_images[MAX_voxel_list];
89 
90 // master modes
91 _stub *g_stub;
92 
93 // game script manager
94 _game_script gs;
95 
96 class _remora;
97 class _icon_menu;
98 class _icon_list_manager;
99 // These objects are now all declared in one place because the order of creation matters.
100 _event_manager *g_oEventManager;
101 _line_of_sight *g_oLineOfSight;
102 _icon_menu *g_oIconMenu;
103 _icon_list_manager *g_oIconListManager;
104 _remora *g_oRemora;
105 _sound_logic *g_oSoundLogicEngine;
106 
107 // Mission strings for the options menus (harmonised for PC and PSX)
108 
109 const char *g_m01 = "m01_investigate_mine";
110 const char *g_m02 = "m02_security_hq";
111 const char *g_m03 = "m03_land_train";
112 const char *g_m04 = "m04_raid_on_containment";
113 const char *g_m05 = "m05_sabotage_refinery";
114 const char *g_m07 = "m07_mainland_base";
115 const char *g_m08 = "m08_entering_island_base";
116 const char *g_m09 = "m09_escape_island_base";
117 const char *g_m10 = "m10_submarine";
118 
119 // The collection of possible missions including the session to start for each mission
120 const char *g_mission_startup_names[MAX_MISSIONS] = {
121 	"m01_investigate_mine", "office_building",
122 	"m02_security_hq", "basement",
123 	"m03_land_train", "car_5",
124 	"m04_raid_on_containment", "level_alphabeta",
125 	"m05_sabotage_refinery", "m5_mine",
126 	"m07_mainland_base", "compound",
127 	"m08_entering_island_base", "cable_car_dock",
128 	"m08_entering_island_base", "security",
129 	"m10_submarine", "submarine",
130 	"m_ed", "2_ship",
131 	"test_mission", "test_session"
132 };
133 
134 const char *g_mission_names[NUMBER_OF_MISSIONS] = {
135 	"m01_investigate_mine",
136 	"m02_security_hq",
137 	"m03_land_train",
138 	"m04_raid_on_containment",
139 	"m05_sabotage_refinery",
140 	"m07_mainland_base",
141 	"m08_entering_island_base",
142 	"m08_entering_island_base",
143 	"m10_submarine",
144 	"m_ed",
145 	"test_mission"
146 };
147 
148 const char *g_sessions[MAX_SESSIONS] = {"m01_investigate_mine",     "mine",
149 										"m01_investigate_mine",     "mineworkings",
150 										"m01_investigate_mine",     "office_building",
151 										"m02_security_hq",          "basement",
152 										"m02_security_hq",          "ground_floor",
153 										"m02_security_hq",          "first_floor",
154 										"m03_land_train",           "car_1",
155 										"m03_land_train",           "car_2",
156 										"m03_land_train",           "car_3",
157 										"m03_land_train",           "car_4",
158 										"m03_land_train",           "car_5",
159 										"m04_raid_on_containment",  "level_alphabeta",
160 										"m04_raid_on_containment",  "level_kappa",
161 										"m04_raid_on_containment",  "level_omega",
162 										"m05_sabotage_refinery",    "m5_mine",
163 										"m05_sabotage_refinery",    "m5_office_building",
164 										"m05_sabotage_refinery",    "refinery",
165 										"m07_mainland_base",        "compound",
166 										"m07_mainland_base",        "monorail__station",
167 										"m07_mainland_base",        "cable_car_building",
168 										"m08_entering_island_base", "cable_car_dock",
169 										"m08_entering_island_base", "manufacturing",
170 										"m08_entering_island_base", "quayside",
171 										"m08_entering_island_base", "reactor",
172 										"m08_entering_island_base", "security",
173 										"m10_submarine",            "submarine",
174 										"test_mission",             "test_mission",
175 										"test_mission",             "test_session_2",
176 										"m_ed",                     "2_ship"};
177 
178 } // End of namespace ICB
179