ScummVM API documentation
group.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 FREESCAPE_GROUP_H
23
#define FREESCAPE_GROUP_H
24
25
#include "freescape/gfx.h"
26
#include "freescape/objects/object.h"
27
28
namespace
Freescape
{
29
30
struct
AnimationOpcode
{
31
AnimationOpcode
(uint16 opcode_) {
32
opcode = opcode_;
33
}
34
uint16 opcode;
35
Math::Vector3d position;
36
Common::String
conditionSource;
37
FCLInstructionVector
condition;
38
};
39
40
class
Group
:
public
Object
{
41
public
:
42
Group
(uint16 objectID_, uint16 flags_,
43
const
Common::Array<uint16>
objectIds_,
44
const
Math::Vector3d offset1_,
45
const
Math::Vector3d offset2_,
46
const
Common::Array<AnimationOpcode *>
operations);
47
~
Group
();
48
void
linkObject(
Object
*obj);
49
void
assemble(
int
index);
50
void
step();
51
void
run();
52
void
run(
int
index);
53
void
reset();
54
void
start();
55
bool
collides(
const
Math::AABB &aabb);
56
void
makePartsInvisible();
57
58
Common::Array<Object *>
_objects;
59
Common::Array<Math::Vector3d>
_origins;
60
Math::Vector3d _offset1;
61
Math::Vector3d _offset2;
62
Common::Array<AnimationOpcode *>
_operations;
63
Common::Array<uint16>
_objectIds;
64
int
_scale;
65
int
_step;
66
bool
_active;
67
68
ObjectType getType()
override
{
return
ObjectType::kGroupType; };
69
bool
isDrawable()
override
{
return
true
; }
70
void
draw(
Renderer
*gfx,
float
offset = 0.0)
override
;
71
void
scale(
int
scale_)
override
{ _scale = scale_; };
72
bool
isActive() {
return
!isDestroyed() && !isInvisible() && _step > 0 && _active; };
73
Object
*duplicate()
override
;
74
};
75
76
}
// End of namespace Freescape
77
78
#endif // FREESCAPE_GLOBAL_H
Freescape::Group
Definition:
group.h:40
Common::String
Definition:
str.h:59
Freescape
Definition:
area.h:36
Common::Array< FCLInstruction >
Freescape::AnimationOpcode
Definition:
group.h:30
Freescape::Renderer
Definition:
gfx.h:63
Freescape::Object
Definition:
object.h:56
engines
freescape
objects
group.h
Generated on Fri Apr 24 2026 09:10:01 for ScummVM API documentation by
1.8.13