ScummVM API documentation
adv.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef M4_ADV_R_ADV_H
24 #define M4_ADV_R_ADV_H
25 
26 #include "common/algorithm.h"
27 #include "m4/adv_r/adv_hotspot.h"
28 #include "m4/m4_types.h"
29 
30 namespace M4 {
31 
32 #define MAX_SCENES 180
33 #define MAXRAILNODES 32
34 #define PATH_END 0xffff
35 #define MAX_PLYR_STRING_LEN 40
36 
37 #define STR_FADEPAL "fade palette"
38 #define STR_RAILNODE "rail node"
39 #define STR_PATH_NODE "path node"
40 
41 enum {
42  INSTALL_SOUND_DRIVERS = 1,
43  INSTALL_PLAYER_BEEN_INIT = 2,
44  INSTALL_RAIL_SYSTEM = 4,
45  INSTALL_INVENTORY_SYSTEM = 8,
46  INSTALL_INVERSE_PALETTE = 0x10,
47  INSTALL_MININUM = 0,
48  INSTALL_ALL = 0x1f
49 };
50 
51 enum {
52  UNKNOWN_OBJECT = 997,
53  BACKPACK = 998,
54  NOWHERE = 999
55 };
56 #define GLOBAL_SCENE 999
57 
58 enum KernelTriggerType {
59  KT_PARSE = 1,
60  KT_DAEMON, KT_PREPARSE, KT_EXPIRE, KT_LOOP
61 };
62 
63 struct pathNode {
64  pathNode *next = nullptr;
65  byte nodeID = 0;
66 };
67 
68 struct noWalkRect {
69  noWalkRect *next = nullptr;
70  noWalkRect *prev = nullptr;
71  int32 x1 = 0, y1 = 0, x2 = 0, y2 = 0;
72  int32 alternateWalkToNode = 0;
73  int32 walkAroundNode1 = 0;
74  int32 walkAroundNode2 = 0;
75  int32 walkAroundNode3 = 0;
76  int32 walkAroundNode4 = 0;
77 };
78 
79 struct SceneDef {
80  char art_base[MAX_FILENAME_SIZE] = { 0 };
81  char picture_base[MAX_FILENAME_SIZE] = { 0 };
82 
83  int32 num_hotspots = 0; // # of hotspots
84  HotSpotRec *hotspots = nullptr;
85  int32 num_parallax = 0;
86  HotSpotRec *parallax = nullptr;
87  int32 num_props = 0;
88  HotSpotRec *props = nullptr;
89 
90  int32 front_y = 400, back_y = 100; // Player scaling baselines
91  int32 front_scale = 100, back_scale = 85; // Player scaling factors
92 
93  int16 depth_table[16]; // Player sprite depth table
94  int32 numRailNodes = 0; // # of rails
95 
96  SceneDef() {
97  Common::fill(depth_table, depth_table + 16, 0);
98  }
99 };
100 
101 } // namespace M4
102 
103 #endif
Definition: adv.h:63
Definition: adv.h:79
Definition: database.h:28
Definition: adv_hotspot.h:30
signed char * fill(signed char *first, signed char *last, Value val)
Definition: algorithm.h:168
Definition: adv.h:68