ScummVM API documentation
ad_object_3d.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 /*
23  * This file is based on WME.
24  * http://dead-code.org/redir.php?target=wme
25  * Copyright (c) 2003-2013 Jan Nedoma and contributors
26  */
27 
28 #ifndef WINTERMUTE_AD_OBJECT_3D_H
29 #define WINTERMUTE_AD_OBJECT_3D_H
30 
31 #include "engines/wintermute/ad/ad_object.h"
32 
33 namespace Wintermute {
34 
35 class ShadowVolume;
36 
37 class AdObject3D : public AdObject {
38 public:
39  bool setupLights();
40  bool convert3DTo2D(DXMatrix *worldMat, int32 *posX, int32 *posY);
41  bool skipTo(int x, int y, bool tolerant = false);
42  char *_tempSkelAnim;
43  DXVector3 _lastPosVector;
44  DECLARE_PERSISTENT(AdObject3D, AdObject)
45  bool _dropToFloor;
46  bool display() override;
47  bool update() override;
48  AdObject3D(BaseGame *inGame);
49  virtual ~AdObject3D();
50  bool getBonePosition2D(const char *boneName, int32 *x, int32 *y);
51  bool getBonePosition3D(const char *boneName, DXVector3 *pos, DXVector3 *offset = nullptr);
52 
53  float _velocity;
54  float _angVelocity;
55 
56  uint32 _ambientLightColor;
57  bool _hasAmbientLightColor;
58 
59  // scripting interface
60  ScValue *scGetProperty(const Common::String &name) override;
61  bool scSetProperty(const char *name, ScValue *value) override;
62  bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
63  const char *scToString() override;
64 
65  ShadowVolume *getShadowVolume();
66 
67 private:
68  ShadowVolume *_shadowVolume;
69  BaseArray<char *> _ignoredLights;
70  void clearIgnoredLights();
71  bool addIgnoredLight(char *lightName);
72  bool removeIgnoredLight(char *lightName);
73 };
74 
75 } // namespace Wintermute
76 
77 #endif
Definition: script.h:44
Definition: base_game.h:76
Definition: script_value.h:42
Definition: str.h:59
Definition: xmath.h:50
Definition: ad_object.h:46
Definition: script_stack.h:41
Definition: 3dshadow_volume.h:49
Definition: ad_object_3d.h:37
Definition: xmath.h:116
Definition: coll_templ.h:89
Definition: achievements_tables.h:27