ScummVM API documentation
p4.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
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 modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (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, see <http://www.gnu.org/licenses/>.
24 *
25 */
26
27#ifndef ICB_P4_H
28#define ICB_P4_H
29
30// Silly codewarrior doesn't understand relative paths
31#include "engines/icb/common/px_common.h"
32#include "engines/icb/string_vest.h"
33
34namespace ICB {
35
36// Handy #define's
37#define MS g_mission->session
38#define MSS g_mission->session->set
39
40// functions required externally
41void Terminate_ap(); // call this to end the game and return to windows
42
43// variables
44extern int32 gameCycle; // for head-up display
45extern char gamelanguage[];
46extern bool8 camera_hack;
47extern uint32 font_cluster_hash; // Res_open will compute the hash value and store it
48extern uint32 sys_font_hash; // Res_open will compute the hash value and store it
49
50#define RESOURCE_IS_COMPRESSED 1
51
52extern bool gRegainedFocus; // Set when we regain the focus. Cleared by the graphics reloading functions
53
54} // End of namespace ICB (To avoid including inside the namespace
55
56#include "engines/icb/common/px_string.h"
57
58namespace ICB {
59extern char g_characters[];
60
61#define REMORA_GRAPHICS_PATH "remora\\pc\\"
62#define FONT_PATH "fonts\\pc\\%s"
63#define REMORA_CLUSTER_PATH "A\\2DART"
64
65// Using psx style cluster paths
66#define ICON_CLUSTER_PATH "A\\2DART" // icon cluster path
67#define FONT_CLUSTER_PATH "A\\2DART" // font cluster path
68#define GLOBAL_CLUSTER_PATH "G\\G" // global cluster path
69#define SESSION_TEST_PATH "m\\%s\\%s.sex" // File to test for a sessions existence
70#define SESSION_CLUSTER_PATH "M\\%s\\%s.SEX" // Path to the session cluster
71#define CHR_PATH "C\\%s\\%s.OFT"
72#define SET_PATH "M\\%s\\%s.CAM" // path to the set
73
74#define SYS_FONT "fonts\\font.tdw" // default font name
75#define ICON_PATH "inventory_icon\\pc\\" // path for inventory objects
76#define GAMESCRIPT_PATH "gamescript"
77#define GLOBAL_VAR_PATH "globals" // globals file name
78#define GLOBAL_TEXT_FILE "%s.ttpc", gamelanguage
79
80// These are for the Remora's text system (and any other voice-over text we might need).
81// This defines the name of the resource files that are searched for Remora text.
82#define FILENAME_VOTEXT "remora.ctf"
83#define GLOBAL_VOTEXT_NAME "remora.ctf"
84#define ICON_LABELS_FILENAME "iconlabels.ctf"
85#define CONFIG_INI_FILENAME "engine\\icb.ini"
86
87// Resource Manager Sizes -- Initalize in Memory_stats
88extern uint32 BACKGROUND_BUFFER_SIZE;
89extern uint32 ANIMATION_BUFFER_SIZE;
90extern uint32 BITMAP_BUFFER_SIZE;
91extern uint32 SONICS_BUFFER_SIZE;
92
93#define ANIM_CHECK(a) \
94 if (!I->IsAnimTable(a)) \
95 Fatal_error("engine finds anim [%s] '%s' %X missing for object [%s]", (const char *)master_anim_name_table[a].name, I->get_info_name(a), I->info_name_hash[a], \
96 CGameObject::GetName(object));
97
98enum __stub_modes {
99 __mission_and_console,
100 __game_script,
101 __floors,
102 __shift_mode,
103 __troute,
104 __vox_view,
105 __set_test,
106 __console_prompt,
107 __stage_view,
108 __sequence,
109 __options_menu,
110 __font_test,
111 __toe_on_door,
112 __pause_menu,
113 __load_save_menu,
114 __credits,
115 __scrolling_text,
116 __gameover_menu,
117 __no_stub_mode
118};
119#define TOTAL_STUBS 8
120#define TARGET_TIME 70
121
122class _stub {
123 public:
124 _stub();
125 ~_stub();
126
127 void Reset(__stub_modes new_mode);
128 void Set_current_stub_mode(__stub_modes new_mode);
129 void Push_stub_mode(__stub_modes new_mode);
130 void Pop_stub_mode();
131 void Process_stub();
132 __stub_modes Return_current_stub();
133
134 void Reset_timer();
135 void Fix_time();
136 void Timer_off();
137 void Timer_on();
138 bool8 Return_timer_status();
139 void Update_screen();
140
141 __stub_modes mode[TOTAL_STUBS];
142 int32 stub; // stub level number
143 int32 cycle_speed;
144private:
145 uint32 stub_timer_time;
146 bool8 timer; // on off
147 uint8 padding1;
148 uint8 padding2;
149 uint8 padding3;
150};
151
152// this is one of the stub modes
153void Mission_and_console();
154
155// returns the CD number for the specified mission
156int32 WhichCD(const char *mission);
157
158} // End of namespace ICB
159
160#endif
Definition: p4.h:122