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