ScummVM API documentation
super_sprite_process.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 ULTIMA8_WORLD_SUPERSPRITEPROCESS_H
23 #define ULTIMA8_WORLD_SUPERSPRITEPROCESS_H
24 
25 #include "ultima/ultima8/kernel/process.h"
26 #include "ultima/ultima8/usecode/intrinsics.h"
27 #include "ultima/ultima8/misc/point3.h"
28 
29 namespace Ultima {
30 namespace Ultima8 {
31 
33 class SuperSpriteProcess : public Process {
34 private:
35  int _shape;
36  struct Point3 _nowpt;
37  struct Point3 _nextpt;
38  struct Point3 _pt3;
39  struct Point3 _startpt;
40  struct Point3 _pt5;
41  struct Point3 _destpt;
42 
43  uint16 _frame;
44  uint16 _fireType;
45  uint16 _damage;
46  uint16 _source;
47  uint16 _target;
48  int32 _counter;
49 
50  uint16 _item0x77;
51  uint16 _spriteNo;
52 
53  float _xstep;
54  float _ystep;
55  float _zstep;
56 
57  bool _startedAsFiretype9;
58  bool _expired;
59 
60 public:
61  // p_dynamic_class stuff
62  ENABLE_RUNTIME_CLASSTYPE()
63 
65 
77  SuperSpriteProcess(int shape, int frame, int sx, int sy, int sz,
78  int dx, int dy, int dz, uint16 firetype,
79  uint16 damage, uint16 source, uint16 target, bool inexact);
80 
82  ~SuperSpriteProcess(void) override;
83 
85  void run() override;
86 
88  void move(int x, int y, int z);
89 
90  bool loadData(Common::ReadStream *rs, uint32 version);
91  void saveData(Common::WriteStream *ws) override;
92 
93  void terminate() override;
94 
95 protected:
96  bool areaSearch();
97  void advanceFrame();
98  void hitAndFinish();
99  void makeBulletSplash(const Point3 &pt);
100  void destroyItemOrTerminate();
101 };
102 
103 } // End of namespace Ultima8
104 } // End of namespace Ultima
105 
106 #endif
void move(int x, int y, int z)
Move the sprite to a new location.
Definition: stream.h:77
Definition: process.h:34
void saveData(Common::WriteStream *ws) override
save Process data
Definition: point3.h:28
void terminate() override
terminate the process. This wakes up all processes waiting for it.
Definition: detection.h:27
void run() override
The SpriteProcess run function.
Creates a damaging sprite like a rocket or something, for Crusader.
Definition: super_sprite_process.h:33
Definition: stream.h:385
~SuperSpriteProcess(void) override
The SuperSpriteProcess destructor.