ScummVM API documentation
actor.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 NUVIE_ACTORS_ACTOR_H
23 #define NUVIE_ACTORS_ACTOR_H
24 
25 #include "ultima/shared/std/containers.h"
26 #include "ultima/shared/std/string.h"
27 #include "ultima/nuvie/misc/actor_list.h"
28 #include "ultima/nuvie/core/map.h"
29 #include "ultima/nuvie/core/obj_manager.h"
30 
31 namespace Ultima {
32 namespace Nuvie {
33 
34 using Std::list;
35 using Std::string;
36 using Std::vector;
37 
38 #define ACTOR_NO_READIABLE_LOCATION -1
39 #define ACTOR_HEAD 0
40 #define ACTOR_NECK 1
41 #define ACTOR_BODY 2
42 #define ACTOR_ARM 3
43 #define ACTOR_ARM_2 4
44 #define ACTOR_HAND 5
45 #define ACTOR_HAND_2 6
46 #define ACTOR_FOOT 7
47 #define ACTOR_NOT_READIABLE 8
48 
49 // actor alignment
50 enum ActorAlignment {
51  ACTOR_ALIGNMENT_DEFAULT = 0,
52  ACTOR_ALIGNMENT_NEUTRAL = 1,
53  ACTOR_ALIGNMENT_EVIL = 2,
54  ACTOR_ALIGNMENT_GOOD = 3,
55  ACTOR_ALIGNMENT_CHAOTIC = 4,
56 };
57 
58 // move-flags
59 #define ACTOR_FORCE_MOVE 1
60 #define ACTOR_IGNORE_OTHERS 2
61 #define ACTOR_OPEN_DOORS 4
62 #define ACTOR_IGNORE_DANGER 8
63 #define ACTOR_IGNORE_MOVES 0x10
64 #define ACTOR_IGNORE_PARTY_MEMBERS 0x20 // only used in Actor::check_move. In U6, player diagonal movement
65 // between two blocked tiles isn't allowed (non-party actors block)
66 
67 // push-flags (exclusive)
68 #define ACTOR_PUSH_ANYWHERE 0
69 #define ACTOR_PUSH_HERE 1
70 #define ACTOR_PUSH_FORWARD 2
71 
72 #define ACTOR_SHOW_BLOOD true
73 #define ACTOR_FORCE_HIT true
74 
75 #define ACTOR_STATUS_PROTECTED 0x1
76 #define ACTOR_STATUS_PARALYZED 0x2
77 #define ACTOR_STATUS_ASLEEP 0x4
78 #define ACTOR_STATUS_POISONED 0x8
79 #define ACTOR_STATUS_DEAD 0x10
80 #define ACTOR_STATUS_ATTACK_EVIL 0x20
81 #define ACTOR_STATUS_ATTACK_GOOD 0x40
82 #define ACTOR_STATUS_IN_PARTY 0x80
83 #define ACTOR_STATUS_ALIGNMENT_MASK 0x60
84 
85 #define ACTOR_MOVEMENT_HIT_FLAG 0x8
86 #define ACTOR_MOVEMENT_FLAGS_OLD_ALIGNMENT_MASK 0x60
87 
88 #define ACTOR_OBJ_FLAG_
89 #define ACTOR_NO_ERROR 0
90 #define ACTOR_OUT_OF_MOVES 1
91 #define ACTOR_BLOCKED 2
92 #define ACTOR_BLOCKED_BY_OBJECT 3
93 #define ACTOR_BLOCKED_BY_ACTOR 4
94 
95 #define ACTOR_MAX_READIED_OBJECTS 8
96 
97 #define ACTOR_WT_FOLLOW 1
98 #define ACTOR_WT_PLAYER 2
99 #define ACTOR_WT_RANGED 4
100 #define ACTOR_WT_RETREAT 7
101 #define ACTOR_WT_ASSAULT 8
102 
103 #define ACTOR_CHANGE_BASE_OBJ_N true
104 
105 #define ACTOR_VEHICLE_ID_N 0
106 #define ACTOR_AVATAR_ID_N 1
107 
108 #define INV_EXCLUDE_READIED_OBJECTS false
109 #define INV_INCLUDE_READIED_OBJECTS true
110 
111 #define ACTOR_MD_OBJ_FLAG_HYPOXIA 6
112 #define ACTOR_MD_OBJ_FLAG_FRENZY 7
113 
114 #define ACTOR_MD_STATUS_FLAG_COLD 0
115 
116 class Map;
117 class MapCoord;
118 class UseCode;
119 class ActorPathFinder;
120 class U6LList;
121 class GameClock;
122 class Path;
123 
124 typedef struct {
125  uint16 x;
126  uint16 y;
127  uint8 z;
128  uint8 hour;
129  uint8 day_of_week; // 0 = any day 1..7
130  uint8 worktype;
131 } Schedule;
132 
133 typedef enum { ATTACK_TYPE_NONE, ATTACK_TYPE_HAND, ATTACK_TYPE_THROWN, ATTACK_TYPE_MISSLE } AttackType;
134 
135 typedef struct {
136  uint16 obj_n;
137 
138  union {
139  uint8 defence;
140  uint8 defense;
141  };
142  union {
143  uint8 attack;
144  uint8 damage;
145  };
146 
147  uint16 hit_range;
148  AttackType attack_type;
149 
150  uint16 missle_tile_num;
151  uint16 thrown_obj_n;
152 
153  bool breaks_on_contact;
154 } CombatType;
155 
156 typedef struct {
157  Obj *obj;
158  const CombatType *combat_type;
159  bool double_handed;
160 } ReadiedObj;
161 
162 typedef uint8 ActorErrorCode;
163 typedef struct {
164  ActorErrorCode err;
165  Obj *blocking_obj;
166  Actor *blocking_actor;
167 } ActorError;
168 
169 typedef uint8 ActorMoveFlags;
170 
171 typedef enum {
172  ACTOR_ST, // single tile
173  ACTOR_DT, // double tile
174  ACTOR_QT, // quad tile
175  ACTOR_MT // multi tile
176 } ActorTileType;
177 
178 class Actor {
179  friend class ActorManager;
180  friend class MapWindow;
181  friend class Party;
182  friend class Player;
183  friend class U6UseCode;
184 
185 public:
186  struct cmp_level {
187  bool operator()(Actor *a1, Actor *a2) const {
188  return (a1->level > a2->level);
189  }
190  };
191 
192  struct cmp_dex {
193  bool operator()(Actor *a1, Actor *a2) const {
194  return (a1->dex > a2->dex);
195  }
196  };
197 
198  struct cmp_moves {
199  bool operator()(Actor *a1, Actor *a2) const {
200  return (a1->moves > a2->moves);
201  }
202  };
203 
205  bool operator()(Actor *a1, Actor *a2) const {
206  if (a1->dex == 0) {
207  a1->dex = 1;
208  DEBUG(0, LEVEL_WARNING, "%s (%d) has 0 dex!\n", a1->get_name(), a1->id_n);
209  }
210  if (a2->dex == 0) {
211  a2->dex = 1;
212  DEBUG(0, LEVEL_WARNING, "%s (%d) has 0 dex!\n", a2->get_name(), a2->id_n);
213  }
214  return (a1->moves / a1->dex > a2->moves / a2->dex);
215  }
216  };
217 
219  MapCoord cmp_loc;
220  void operator()(const MapCoord &cmp_loc2) {
221  cmp_loc = cmp_loc2;
222  }
223  bool operator()(Actor *a1, Actor *a2) {
224  MapCoord loc1(a1->x, a1->y, a1->z);
225  MapCoord loc2(a2->x, a2->y, a2->z);
226  return (loc1.distance(cmp_loc) < loc2.distance(cmp_loc));
227  }
228  };
229 
230 protected:
231 
232  uint8 id_n;
233 
234  Map *map;
235  ObjManager *obj_manager;
236  GameClock *_clock;
237  UseCode *usecode;
238  ActorPathFinder *pathfinder;
239 
240  uint16 x;
241  uint16 y;
242  uint16 z;
243 
244  uint8 worktype;
245  MapCoord work_location;
246  uint32 move_time; // time (in clock ticks) of last update() (for display)
247  // FIXME: replace with animation
248  uint16 obj_n;
249  uint16 frame_n;
250  uint16 base_obj_n;
251  uint16 old_frame_n;
252 
253  NuvieDir direction;
254  uint8 walk_frame;
255 
256  uint8 obj_flags;
257  uint8 status_flags;
258  uint8 talk_flags;
259  uint8 movement_flags; //0x19f1
260 
261  bool ethereal;
262  bool can_move;
263  bool temp_actor;
264  bool met_player;
265 
266  bool visible_flag;
267 // bool active; // "cached in"
268 
269  sint8 moves; // number of moves actor has this turn
270  uint8 light; // level of light around actor (normally 0)
271  vector<uint8> light_source;
272 
273  ActorError error_struct; // error/status; result of previous action
274 
275  uint8 strength;
276  uint8 dex;
277  uint8 intelligence;
278  uint8 hp;
279  uint8 level;
280  uint16 exp;
281  uint8 magic;
282  uint8 combat_mode;
283  ActorAlignment alignment;
284 
285  uint8 body_armor_class;
286  uint8 readied_armor_class;
287 
288  string name;
289 
290  ReadiedObj *readied_objects[ACTOR_MAX_READIED_OBJECTS];
291 
292  Schedule **sched;
293  int num_schedules;
294 
295  U6LList *obj_inventory;
296 
297 //current schedule pos;
298  uint16 sched_pos;
299 
300  list<Obj *> surrounding_objects; //used for multi-tile actors.
301  Common::HashMap<uint16, uint16> *custom_tile_tbl;
302 
303 public:
304 
305  Actor(Map *m, ObjManager *om, GameClock *c);
306  virtual ~Actor();
307 
308  virtual bool init(uint8 obj_status = NO_OBJ_STATUS);
309  void init_from_obj(Obj *obj, bool change_base_obj = false);
310 
311  bool is_avatar() const {
312  return id_n == ACTOR_AVATAR_ID_N;
313  }
314  bool is_onscreen() const {
315  return MapCoord(x, y, z).is_visible();
316  }
317  bool is_in_party() const {
318  return ((status_flags & ACTOR_STATUS_IN_PARTY) == ACTOR_STATUS_IN_PARTY);
319  }
320  bool is_in_vehicle() const;
321  bool is_visible() const {
322  return visible_flag;
323  }
324  bool is_alive() const {
325  return (status_flags & ACTOR_STATUS_DEAD) ? false : true;
326  }
327  bool is_nearby(const Actor *other) const;
328  bool is_nearby(uint8 actor_num) const;
329  bool is_nearby(const MapCoord &where, uint8 thresh = 5) const;
330  bool is_at_position(const Obj *obj) const;
331  virtual bool is_passable() const;
332  bool is_temp() const {
333  return temp_actor;
334  }
335  virtual bool isFlying() const {
336  return false;
337  }
338  virtual bool isNonBlocking() const {
339  return false;
340  }
350  virtual bool doesOccupyLocation(uint16 lx, uint16 ly, uint8 lz, bool incDoubleTile = true, bool incSurroundingObjs = true) const;
351 
352 //for lack of a better name:
353  bool is_met() const {
354  return talk_flags & 0x01;
355  }
356  bool is_poisoned() const {
357  return status_flags & ACTOR_STATUS_POISONED;
358  }
359  bool is_invisible() const {
360  return obj_flags & OBJ_STATUS_INVISIBLE;
361  }
362  virtual bool is_immobile() const; // frozen by worktype or status
363  virtual bool is_sleeping() const {
364  return status_flags & ACTOR_STATUS_ASLEEP;
365  }
366  virtual bool is_paralyzed() const {
367  return status_flags & ACTOR_STATUS_PARALYZED;
368  }
369  virtual bool is_protected() const {
370  return status_flags & ACTOR_STATUS_PROTECTED;
371  }
372  virtual bool is_charmed() const {
373  return obj_flags & OBJ_STATUS_CHARMED;
374  }
375  virtual bool is_cursed() const {
376  return obj_flags & OBJ_STATUS_CURSED;
377  }
378  virtual bool get_corpser_flag() const {
379  return false;
380  }
381  bool is_hit() const {
382  return movement_flags & ACTOR_MOVEMENT_HIT_FLAG;
383  }
384 
385  void set_name(const char *actor_name) {
386  name = actor_name;
387  }
388  const char *get_name(bool force_real_name = false);
389 
390  void get_location(uint16 *ret_x, uint16 *ret_y, uint8 *ret_level) const;
391  MapCoord get_location() const;
392 
393  uint16 get_tile_num() const;
394  Tile *get_tile() const;
395  virtual uint16 get_downward_facing_tile_num() const;
396  uint8 get_actor_num() const {
397  return id_n;
398  }
399  uint8 get_talk_flags() const {
400  return talk_flags;
401  }
402  virtual ActorTileType get_tile_type() const {
403  return ACTOR_ST;
404  }
405 
406  uint16 get_frame_n() const {
407  return frame_n;
408  }
409  uint16 get_old_frame_n() const {
410  return old_frame_n;
411  }
412  uint16 get_x() const {
413  return x;
414  }
415  uint16 get_y() const {
416  return y;
417  }
418  uint8 get_z() const {
419  return z;
420  }
421 
422  uint8 get_strength() const {
423  return strength;
424  }
425  uint8 get_dexterity() const {
426  return dex;
427  }
428  uint8 get_intelligence() const {
429  return intelligence;
430  }
431  uint8 get_hp() const {
432  return hp;
433  }
434  virtual uint8 get_hp_text_color() const {
435  return 0;
436  }
437  virtual uint8 get_str_text_color() const {
438  return 0;
439  }
440  virtual uint8 get_dex_text_color() const {
441  return 0;
442  }
443 
444  uint8 get_level() const {
445  return level;
446  }
447  uint16 get_exp() const {
448  return exp;
449  }
450  uint8 get_magic() const {
451  return magic;
452  }
453  ActorAlignment get_alignment() const {
454  return alignment;
455  }
456  uint8 get_old_alignment() const {
457  return ((movement_flags & ACTOR_MOVEMENT_FLAGS_OLD_ALIGNMENT_MASK) >> 5) + 1;
458  }
459  sint8 get_moves_left() const {
460  return moves;
461  }
462  virtual uint8 get_maxhp() const {
463  return 0;
464  }
465  virtual uint8 get_maxmagic() const {
466  return 0;
467  }
468  bool get_obj_flag(uint8 bitFlag) const {
469  return bitFlag < 8 ? (obj_flags & (1 << bitFlag)) : false;
470  }
471  bool get_status_flag(uint8 bitFlag) const {
472  return bitFlag < 8 ? (status_flags & (1 << bitFlag)) : false;
473  }
474 
475  uint16 get_base_obj_n() const {
476  return base_obj_n;
477  }
478  virtual void change_base_obj_n(uint16 val) {
479  base_obj_n = obj_n = val;
480  frame_n = 0;
481  }
482  void set_obj_n(uint16 val) {
483  obj_n = val;
484  }
485  void set_frame_n(uint16 val) {
486  frame_n = val;
487  }
488  void set_strength(uint8 val) {
489  strength = val;
490  }
491  void set_dexterity(uint8 val) {
492  dex = val;
493  }
494  void set_intelligence(uint8 val) {
495  intelligence = val;
496  }
497  void set_hp(uint8 val);
498  void set_level(uint8 val) {
499  level = val;
500  }
501  void set_exp(uint16 val) {
502  exp = clamp_max(val, 9999);
503  }
504  void set_magic(uint8 val) {
505  magic = val;
506  }
507  void set_alignment(ActorAlignment a) {
508  alignment = a;
509  }
510  void set_old_alignment(ActorAlignment a) {
511  if (a > 0 && a < 5) {
512  movement_flags |= (a - 1) << 5;
513  }
514  }
515  uint8 get_light_level() const;
516  void add_light(uint8 val);
517  void subtract_light(uint8 val);
518  void heal() {
519  set_hp(get_maxhp());
520  }
521  void cure();
522  void set_moves_left(sint8 val);
523  void set_dead_flag(bool value);
524  virtual void update_time() {
525  set_moves_left(get_moves_left() + get_dexterity());
526  }
527  void set_poisoned(bool poisoned);
528  virtual void set_paralyzed(bool paralyzed) {
529  return;
530  }
531  virtual void set_protected(bool val) {
532  return;
533  }
534  virtual void set_charmed(bool val) {
535  return;
536  }
537  virtual void set_corpser_flag(bool val) {
538  return;
539  }
540  virtual void set_cursed(bool val) {
541  return;
542  }
543  virtual void set_asleep(bool val) {
544  return;
545  }
546  void set_obj_flag(uint8 bitFlag, bool value);
547  void set_status_flag(uint8 bitFlag, bool value);
548  void set_hit_flag(bool val);
549 
550  void set_invisible(bool invisible);
551  void set_custom_tile_num(uint16 obj_num, uint16 tile_num);
552 
553  uint8 get_worktype();
554  uint8 get_sched_worktype();
555  virtual void set_worktype(uint8 new_worktype, bool init = false);
556  uint8 get_combat_mode() const {
557  return combat_mode;
558  }
559  void set_combat_mode(uint8 new_mode);
560  virtual void revert_worktype() { }
561 
562  NuvieDir get_direction() const {
563  return direction;
564  }
565  void set_direction(sint16 rel_x, sint16 rel_y);
566  virtual void set_direction(NuvieDir d);
567  void face_location(const MapCoord &loc);
568  virtual void face_location(uint16 lx, uint16 ly);
569  void face_actor(Actor *a);
570 
571  void set_talk_flags(uint8 newflags) {
572  talk_flags = newflags;
573  }
574  uint8 get_flag(uint8 bitflag);
575  void set_flag(uint8 bitflag);
576  void clear_flag(uint8 bitflag);
577  void show();
578  void hide();
579  void set_error(ActorErrorCode err);
580  void clear_error();
581  ActorError *get_error();
582 
583  const list<Obj *> &get_surrounding_obj_list() const {
584  return surrounding_objects;
585  }
586  void add_surrounding_obj(Obj *obj);
587  void unlink_surrounding_objects(bool make_objects_temporary = false);
588 
589  bool moveRelative(sint16 rel_x, sint16 rel_y, ActorMoveFlags flags = 0);
590  virtual bool move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0);
591  virtual bool check_move(uint16 new_x, uint16 new_y, uint8 new_z, ActorMoveFlags flags = 0);
592  bool check_moveRelative(sint16 rel_x, sint16 rel_y, ActorMoveFlags flags = 0);
593 
594  virtual bool can_be_moved();
595  virtual bool can_be_passed(const Actor *other, bool ignoreParty = false) const;
596  virtual void update();
597  void set_in_party(bool state);
598  void set_pathfinder(ActorPathFinder *new_pf, Path *path_type = 0);
599  ActorPathFinder *get_pathfinder() {
600  return pathfinder;
601  }
602  void delete_pathfinder();
603  virtual void pathfind_to(const MapCoord &d);
604  void pathfind_to(uint16 gx, uint16 gy, uint8 gz = 255);
605  bool walk_path();
606  virtual void preform_worktype() {
607  return;
608  }
609 
610 // combat methods
611  //void attack(const MapCoord &pos); // attack at a given map location
612  Obj *get_weapon_obj(sint8 readied_obj_location);
613  void attack(sint8 readied_obj_location, MapCoord target, Actor *foe = nullptr);
614  const CombatType *get_weapon(sint8 readied_obj_location);
615  void attract_to(Actor *target);
616  void repel_from(Actor *target);
617 
618  void hit(uint8 dmg, bool force_hit = false);
619  void reduce_hp(uint8 amount);
620  virtual void die(bool create_body = true);
621  void resurrect(const MapCoord &new_position, Obj *body_obj = nullptr);
622  uint8 get_range(uint16 target_x, uint16 target_y);
623  bool weapon_can_hit(const CombatType *weapon, uint16 target_x, uint16 target_y);
624  virtual bool weapon_can_hit(const CombatType *weapon, Actor *target, uint16 *hit_x, uint16 *hit_y) {
625  *hit_x = target->get_x();
626  *hit_y = target->get_y();
627  return true;
628  }
629  void display_condition();
630  ActorList *find_enemies(); // returns list or 0 if no enemies nearby
631 
632  U6LList *get_inventory_list();
633  const U6LList *get_inventory_list() const;
634  bool inventory_has_object(uint16 obj_n, uint8 qual = 0, bool match_quality = OBJ_MATCH_QUALITY, uint8 frame_n = 0, bool match_frame_n = OBJ_NOMATCH_FRAME_N);
635  uint32 inventory_count_objects(bool inc_readied_objects) const;
636  uint32 inventory_count_object(uint16 obj_n);
637  Obj *inventory_get_object(uint16 obj_n, uint8 qual = 0, bool match_quality = OBJ_MATCH_QUALITY, uint8 frame_n = 0, bool match_frame_n = OBJ_NOMATCH_FRAME_N);
638  bool is_double_handed_obj_readied();
639  Obj *inventory_get_readied_object(uint8 location);
640  sint16 inventory_get_readied_obj_n(uint8 location) {
641  return (inventory_get_readied_object(location) == nullptr ? -1 : inventory_get_readied_object(location)->obj_n);
642  }
643  virtual Obj *inventory_get_food(Obj *container = 0) {
644  return 0;
645  }
646  const CombatType *inventory_get_readied_object_combat_type(uint8 location);
647  bool inventory_add_object(Obj *obj, Obj *container = 0, bool stack = true);
648  bool inventory_add_object_nostack(Obj *obj, Obj *container = 0) {
649  return inventory_add_object(obj, container, false);
650  }
651  void inventory_del_all_objs();
652  bool inventory_remove_obj(Obj *obj, bool run_usecode = true);
653  Obj *inventory_new_object(uint16 obj_n, uint32 qty, uint8 quality = 0);
654  uint32 inventory_del_object(uint16 obj_n, uint32 qty, uint8 quality);
655  float inventory_get_max_weight() const {
656  return strength * 2;
657  }
658  float get_inventory_weight() const;
659  float get_inventory_equip_weight();
660  void inventory_drop_all();
661  void all_items_to_container(Obj *container_obj, bool stack);
662  bool can_carry_weight(Obj *obj) const;
663  bool can_carry_weight(float obj_weight) const; // return from get_obj_weight()
664  virtual bool can_carry_object(uint16 obj_n, uint32 qty = 0) const;
665  virtual bool can_carry_object(Obj *obj) const;
666 
667  virtual uint8 get_object_readiable_location(Obj *obj);
668  virtual const CombatType *get_object_combat_type(uint16 objN) {
669  return nullptr;
670  }
671 
672  bool can_ready_obj(Obj *obj);
673  bool add_readied_object(Obj *obj);
674  void remove_readied_object(Obj *obj, bool run_usecode = true); // run_usecode to stop from running usecode twice or an infinite loop
675  void remove_readied_object(uint8 location, bool run_usecode = true);
676 
677  void remove_all_readied_objects();
678  bool has_readied_objects();
679  sint8 count_readied_objects(sint32 obj_n = -1, sint16 frame_n = -1, sint16 quality = -1);
680 
681  virtual void twitch() {
682  return;
683  }
684  bool push(Actor *pusher, uint8 where = ACTOR_PUSH_ANYWHERE);
685 
686  Obj *make_obj();
687  uint16 get_obj_n() const {
688  return obj_n;
689  }
690  virtual void clear();
691  virtual bool morph(uint16 obj_n); // change actor type
692 
693  bool get_schedule_location(MapCoord *loc) const;
694  bool is_at_scheduled_location() const;
695  int get_number_of_schedules() const {
696  return num_schedules;
697  }
698  Schedule *get_schedule(uint8 index);
699  virtual bool will_not_talk() const {
700  return false;
701  }
702  uint16 get_custom_tile_num(uint16 obj_num) const;
703 protected:
704 
705  void loadSchedule(const unsigned char *schedule_data, uint16 num);
706  virtual bool updateSchedule(uint8 hour, bool teleport = false);
707  uint16 getSchedulePos(uint8 hour);
708 // uint16 getSchedulePos(uint8 hour, uint8 day_of_week);
709 // inline uint16 Actor::getSchedulePos(uint8 hour);
710 
711  void inventory_parse_readied_objects(); //this is used to initialise the readied_objects array on load.
712 
713  virtual const CombatType *get_hand_combat_type() const {
714  return nullptr;
715  }
716 
717  virtual void set_ethereal(bool val) {
718  ethereal = val;
719  }
720  virtual void print();
721  virtual void handle_lightsource(uint8 hour) {
722  return;
723  }
724  virtual const char *get_worktype_string(uint32 wt) const {
725  return nullptr;
726  }
727 
728  Obj *find_body();
729  uint16 get_tile_num(uint16 obj_num) const;
730  uint8 get_num_light_sources() const {
731  return light_source.size();
732  }
733 
734 private:
735 
736 };
737 
738 const char *get_actor_alignment_str(ActorAlignment alignment);
739 
740 } // End of namespace Nuvie
741 } // End of namespace Ultima
742 
743 #endif
Definition: vector.h:39
Definition: map_window.h:73
Definition: actor.h:163
Definition: actor.h:178
Definition: obj.h:84
Definition: usecode.h:151
Definition: game_clock.h:49
Definition: list.h:39
Definition: actor.h:156
Definition: path.h:36
Definition: map.h:147
Definition: actor.h:124
Definition: player.h:41
Definition: party.h:92
Definition: actor_manager.h:42
Definition: detection.h:27
Definition: actor.h:198
Path
Definition: game.h:75
Definition: u6_usecode.h:67
Definition: u6_llist.h:46
Definition: map.h:84
size_type size() const
Definition: array.h:315
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: obj_manager.h:75
Definition: actor_path_finder.h:33
Definition: actor.h:186
Definition: tile_manager.h:113
Definition: actor.h:192
Definition: containers.h:38
Definition: actor.h:135