ScummVM API documentation
ctp.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 CRUISE_CTP_H
23 #define CRUISE_CTP_H
24 
25 #include "common/rect.h"
26 
27 namespace Cruise {
28 
30  uint16 boxIdx; //0
31  uint16 type; //2
32  uint16 minX; //4
33  uint16 maxX; //6
34  uint16 minY; //8
35  uint16 maxY; //A
36 };
37 
39  struct ctpVar19Struct *field_0; //0
40  ctpVar19SubStruct subStruct;
41 };
42 
43 class CtEntry {
44 public:
45  CtEntry(int16 xs, int16 xe) { minX = xs; maxX = xe; }
46  CtEntry() { minX = 0; maxX = 0; }
47 
48  int16 minX;
49  int16 maxX;
50 };
51 
52 class CtStruct {
53 public:
54  CtStruct *next;
55  int16 num;
56  int16 color;
57  Common::Rect bounds;
59 };
60 
61 extern uint8 *ctpVar17;
62 
63 int initCt(const char * ctpName);
64 int computeDistance(int varX, int varY, int paramX, int paramY);
65 
66 int getNode(int nodeResult[2], int nodeId);
67 int setNodeColor(int nodeIdx, int nodeColor);
68 int setNodeState(int nodeIdx, int nodeState);
69 
70 } // End of namespace Cruise
71 
72 #endif
Definition: array.h:52
Definition: rect.h:144
Definition: ctp.h:29
Definition: ctp.h:38
Definition: ctp.h:43
Definition: actor.h:25
Definition: ctp.h:52