ScummVM API documentation
room.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  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef CHEWY_ROOM_H
23 #define CHEWY_ROOM_H
24 
25 #include "chewy/detail.h"
26 #include "chewy/mcga_graphics.h"
27 #include "chewy/object_extra.h"
28 
29 namespace Chewy {
30 
31 #define ANI_HIDE 0
32 #define ANI_SHOW 1
33 #define SURIMY_OBJ 0
34 
35 extern const int16 SURIMY_TAF19_PHASES[4][2];
36 
37 #define MAX_ABLAGE 4
38 
39 #define ABLAGE_BLOCK_SIZE 64000l
40 
41 class JungleRoom {
42 protected:
43  static void topEntry();
44  static void leftEntry();
45  static void rightEntry();
46 
47  static void setup_func();
48 };
49 
50 struct RaumBlk {
51  byte *LowPalMem;
52  const char *InvFile;
53  const char *DetFile;
54  byte **InvSprAdr;
55 
56  RoomMovObject *Rmo;
58 
59  int16 AkAblage;
60  byte **_detImage;
61  int16 *DetKorrekt;
62  TafInfo *Fti;
63  int16 AadLoad;
64 };
65 
66 struct RaumTimer {
67  int16 _timerStart;
68  int16 _timerMaxNr;
69 
70  uint8 _objNr[MAX_ROOM_TIMER];
71  uint8 _timerNr[MAX_ROOM_TIMER];
72 };
73 
74 class Room {
75 public:
76  Room();
77  ~Room();
78 
79  void loadRoom(RaumBlk *Rb, int16 room_nr, GameState *player);
80  int16 load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, bool loadBarriers, const char *fileName);
81  byte *get_ablage(int16 nr);
82  byte **get_ablage();
83  void set_timer_start(int16 timer_start);
84  void add_timer_new_room();
85  void del_timer_old_room();
86  int16 set_timer(int16 ani_nr, int16 timer_end);
87  void set_timer_status(int16 ani_nr, int16 status);
88  void set_zoom(int16 zoom);
89  void set_pal(const byte *src_pal, byte *dest_pal);
90  void set_ak_pal(RaumBlk *Rb);
91  void calc_invent(RaumBlk *Rb, GameState *player);
92 
93  RaumTimer _roomTimer;
94  RoomInfo *_roomInfo;
95  BarrierResource *_barriers;
96 
97 private:
98  void init_ablage();
99  void free_ablage();
100  int16 get_ablage(int16 pic_nr, uint32 pic_size);
101  int16 get_ablage_g1(int16 ablage_bedarf, int16 ak_pos);
102  void set_ablage_info(int16 ablagenr, int16 bildnr, uint32 pic_size);
103 
104  int16 _akAblage;
105  int16 _lastAblageSave;
106 
107  byte *_ablage[MAX_ABLAGE];
108  byte *_ablagePal[MAX_ABLAGE];
109  int16 _ablageInfo[MAX_ABLAGE][2];
110 };
111 
112 void load_chewy_taf(int16 taf_nr);
113 extern void switchRoom(int16 nr);
114 extern void calc_person_look();
115 
116 } // namespace Chewy
117 
118 #endif
Definition: resource.h:229
Definition: room.h:41
Definition: ngstypes.h:29
Definition: object_extra.h:81
Definition: room.h:74
Definition: types.h:378
Definition: room.h:50
Definition: object_extra.h:47
Definition: detail.h:38
Definition: ani_dat.h:25
Definition: room.h:66