-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharacter.h
167 lines (149 loc) · 3.9 KB
/
character.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef KOM_CHARACTER_H
#define KOM_CHARACTER_H
#include "common/scummsys.h"
#include "common/list.h"
#include "kom/actor.h"
namespace Kom {
class KomEngine;
struct Character {
public:
Character() :
_id(-1),
_mode(0), _modeCount(0), _isBusy(false), _isAlive(true), _isVisible(true),
_spellMode(0), _gold(0),
_actorId(-1), _screenH(0), _screenHDelta(0), _height(0),
_offset14(262144), _offset1c(0), _offset20(262144), _offset28(0), _ratioX(262144),
_ratioY(262144), _relativeSpeed(1024), _direction(0), _lastDirection(2),
_stopped(true), _stoppedTime(0), _spriteName(0),
_scopeInUse(-1), _scopeWanted(8), _loadedScopeXtend(-1), _priority(0), _fightPartner(-1),
_spriteCutState(0), _spriteScope(0), _spriteTimer(0), _spriteBox(0), _somethingX(0),
_somethingY(0), _start3(0), _start3Prev(0), _start3PrevPrev(0), _start4(0),
_start4Prev(0), _start4PrevPrev(0), _start5(0), _start5Prev(0), _start5PrevPrev(0) {}
int _id;
// character
char _name[7];
int _xtend;
int _type;
char _desc[50];
int _proc;
int _locationId;
int _box;
int _data5;
int _data6;
int _data7;
int _data8;
int _isMortal;
int _hitPoints;
int _hitPointsMax;
uint16 _mode;
uint16 _modeCount;
bool _isBusy;
bool _isAlive;
bool _isVisible;
uint8 _spellMode;
int16 _spellDuration;
int _strength;
int _defense;
int _oldHitPoints;
int _oldStrength;
int _oldDefense;
int _minDamage;
int _maxDamage;
int _data14; // spell speed - unused
int _data15; // spell time - unused
int _data16;
int _spellPoints;
int _spellPointsMax;
int16 _destLoc;
int16 _destBox;
int _gold;
Common::List<int> _inventory;
Common::List<int> _weapons;
Common::List<int> _spells;
// scope
Scope _scopes[18];
int16 _actorId;
int16 _screenX;
int16 _screenY;
int32 _screenH;
int32 _screenHDelta;
int32 _height;
int32 _offset14;
int32 _offset1c;
int32 _offset20;
int32 _offset28;
int32 _ratioX;
int32 _ratioY;
int16 _priority;
int32 _lastLocation;
int32 _runawayLocation;
int32 _lastBox;
int32 _gotoBox;
int16 _gotoX;
int16 _gotoY;
int16 _gotoLoc;
uint16 _walkSpeed;
uint16 _relativeSpeed;
uint16 _animSpeed;
uint16 _direction;
uint16 _lastDirection;
bool _stopped;
uint16 _stoppedTime;
uint16 _timeout;
int32 _start3;
int32 _start3Prev;
int32 _start3PrevPrev;
int32 _start4;
int32 _start4Prev;
int32 _start4PrevPrev;
int32 _somethingX;
int32 _somethingY;
int32 _start5;
int32 _start5Prev;
int32 _start5PrevPrev;
int32 _offset78;
int16 _fightPartner;
uint8 _spriteCutState;
uint16 _spriteScope;
uint16 _spriteTimer;
uint16 _spriteBox;
uint16 _spriteType;
const char *_spriteName;
int16 _scopeInUse;
int16 _scopeWanted;
int16 _loadedScopeXtend;
void moveChar(bool param);
void moveCharOther();
void stopChar();
void hitExit(bool checkHousing);
void setScope(int16 scope);
void unsetSpell();
friend class Database;
private:
void setScopeX(int16 scope);
void setAnimation(int16 anim, int16 scope);
void housingProblem();
protected:
static KomEngine *_vm;
};
} // End of namespace Kom
#endif