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 CINE_OBJECT_H
23#define CINE_OBJECT_H
24
25#include "script.h"
26
27namespace Cine {
28
30 int16 x;
31 int16 y;
32 uint16 mask;
33 int16 frame;
34 int16 costume;
35 char name[20];
36 uint16 part;
37
39 void clear() {
40 this->x = 0;
41 this->y = 0;
42 this->mask = 0;
43 this->frame = 0;
44 this->costume = 0;
45 memset(this->name, 0, sizeof(this->name));
46 this->part = 0;
47 }
48};
49
50struct overlay {
51 uint16 objIdx;
52 uint16 type;
53 int16 x;
54 int16 y;
55 int16 width;
56 int16 color;
57};
58
59#define NUM_MAX_OBJECT 255
60#define NUM_MAX_VAR 255
61
62void resetObjectTable();
63int16 loadObject(char *pObjectName);
64void setupObject(byte objIdx, uint16 param1, uint16 param2, uint16 param3, uint16 param4);
65void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue);
66
67void addOverlay(uint16 objIdx, uint16 type);
68int removeOverlay(uint16 objIdx, uint16 param);
69void addGfxElement(int16 objIdx, int16 param, int16 type);
70void removeGfxElement(int16 objIdx, int16 param, int16 type);
71
72int16 getObjectParam(uint16 objIdx, uint16 paramIdx);
73
74void addObjectParam(byte objIdx, byte paramIdx, int16 newValue);
75void subObjectParam(byte objIdx, byte paramIdx, int16 newValue);
76bool compareRanges(uint16 aStart, uint16 aEnd, uint16 bStart, uint16 bEnd);
77uint16 compareObjectParamRanges(uint16 objIdx1, uint16 xAdd1, uint16 yAdd1, uint16 maskAdd1, uint16 objIdx2, uint16 xAdd2, uint16 yAdd2, uint16 maskAdd2);
78uint16 compareObjectParam(byte objIdx, byte param1, int16 param2);
79
80} // End of namespace Cine
81
82#endif
Definition: anim.h:29
Definition: object.h:29
void clear()
Definition: object.h:39
Definition: object.h:50