ScummVM API documentation
combat_dat.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 WORLD_ACTORS_COMBAT_DAT_H
23 #define WORLD_ACTORS_COMBAT_DAT_H
24 
25 #include "common/stream.h"
26 
27 #include "ultima/shared/std/string.h"
28 
29 namespace Ultima {
30 namespace Ultima8 {
31 
41 class CombatDat {
42 public:
44 
45  ~CombatDat();
46 
47  const Std::string &getName() const {
48  return _name;
49  };
50 
51  const uint8 *getData() const {
52  return _data;
53  }
54 
55  uint16 getOffset(int block) const {
56  assert(block < ARRAYSIZE(_offsets));
57  return _offsets[block];
58  }
59 
60  uint16 getDataLen() const {
61  return _dataLen;
62  }
63 
64 private:
65  Std::string _name;
66 
67  uint16 _offsets[4];
68  uint8 *_data;
69  uint16 _dataLen;
70 };
71 
72 } // End of namespace Ultima8
73 } // End of namespace Ultima
74 
75 #endif
#define ARRAYSIZE(x)
Definition: util.h:91
Definition: stream.h:745
Definition: detection.h:27
Definition: string.h:30
Definition: combat_dat.h:41