ScummVM API documentation
shuttleweapon.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  * Additional copyright for this file:
8  * Copyright (C) 1995-1997 Presto Studios, Inc.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 
25 #ifndef PEGASUS_NEIGHBORHOOD_MARS_SHUTTLEWEAPON_H
26 #define PEGASUS_NEIGHBORHOOD_MARS_SHUTTLEWEAPON_H
27 
28 #include "pegasus/elements.h"
29 #include "pegasus/neighborhood/mars/spacechase3d.h"
30 
31 namespace Pegasus {
32 
33 // Can fire multiple times?
34 // For now, no...
35 // clone2727 adds: And now forever
36 
37 static const TimeScale kShuttleWeaponScale = kFifteenTicksPerSecond;
38 
39 class ShuttleWeapon : public IdlerAnimation {
40 public:
41  ShuttleWeapon();
42  ~ShuttleWeapon() override {}
43 
44  virtual void initShuttleWeapon();
45  virtual void cleanUpShuttleWeapon();
46 
47  virtual void fireWeapon(const CoordType, const CoordType);
48 
49  bool canFireWeapon();
50 
51 protected:
52  void timeChanged(const TimeValue) override;
53  virtual void updateWeaponPosition();
54  virtual bool collisionWithJunk(Common::Point &impactPoint);
55  bool collisionWithShuttle(Common::Point &impactPoint);
56  virtual void hitJunk(Common::Point impactPoint);
57  virtual void hitShuttle(Common::Point impactPoint);
58 
59  Point3D _weaponOrigin, _weaponTarget;
60  Point3D _weaponLocation;
61  float _weaponTime;
62  TimeValue _weaponDuration;
63 };
64 
65 } // End of namespace Pegasus
66 
67 #endif
Definition: spacechase3d.h:50
Definition: rect.h:45
Definition: shuttleweapon.h:39
Definition: elements.h:117
Definition: ai_action.h:33