ScummVM API documentation
object.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_OBJECT_H
23#define CHEWY_OBJECT_H
24
25#include "chewy/object_extra.h"
26
27namespace Chewy {
28
29#define ENDLOS_FLIP_FLOP 255
30
31#define LOAD_NEW_OBJ 1
32
33#define NO_ACTION 0
34#define OBJECT_1 1
35#define OBJECT_2 2
36
37class Object {
38public:
39 Object(GameState *sp);
40 ~Object();
41
42 short load(const char *filename, RoomMovObject *rmo);
43 int16 load(const char *filename, RoomStaticInventory *rsi);
44 int16 load(const char *filename, RoomExit *roomExit);
45 void sort();
46 void free_inv_spr(byte **inv_spr_adr);
47 int16 is_sib_mouse(int16 mouse_x, int16 mouse_y);
48 int16 is_iib_mouse(int16 mouse_x, int16 mouse_y);
49 int16 iib_txt_nr(int16 inv_nr);
50 int16 sib_txt_nr(int16 sib_nr);
51 int16 action_iib_iib(int16 maus_obj_nr, int16 test_obj_nr);
52 int16 action_iib_sib(int16 maus_obj_nr, int16 test_obj_nr);
53 void hide_sib(int16 nr);
54 void show_sib(int16 nr);
55 void calc_all_static_detail();
56 void calc_static_detail(int16 det_nr);
57 int16 calc_static_use(int16 nr);
58 int16 del_obj_use(int16 nr);
59 int16 calc_rsi_flip_flop(int16 nr);
60 void set_rsi_flip_flop(int16 nr, int16 anz);
61 void addInventory(int16 nr, RaumBlk *Rb);
62 void delInventory(int16 nr, RaumBlk *Rb);
63 void changeInventory(int16 old_inv, int16 new_inv, RaumBlk *Rb);
64 void setInventory(int16 nr, int16 x, int16 y, int16 automov, RaumBlk *Rb);
65 bool checkInventory(int16 nr);
66 int16 is_exit(int16 mouse_x, int16 mouse_y);
67 uint8 mov_obj_room[MAX_MOV_OBJ + 1];
68 uint8 spieler_invnr[MAX_MOV_OBJ + 1];
69
70private:
71 int16 calc_rmo_flip_flop(int16 nr);
72
73 IibFileHeader _iibFileHeader;
74 SibFileHeader _sibFileHeader;
75 EibFileHeader _eibFileHeader;
76 int16 _maxInventoryObj;
77 int16 _maxStaticInventory;
78 int16 _maxExit;
79 GameState *_player;
80 RoomMovObject *_rmo;
82 RoomExit *_roomExit;
83};
84
85} // namespace Chewy
86
87#endif
Definition: object.h:37
Definition: object_extra.h:129
Definition: types.h:378
Definition: object_extra.h:72
Definition: room.h:50
Definition: object_extra.h:113
Definition: object_extra.h:47
Definition: object_extra.h:81
Definition: object_extra.h:104