22#ifndef WORLD_DAMAGE_INFO_H
23#define WORLD_DAMAGE_INFO_H
25#include "common/scummsys.h"
43 bool frameDataIsAbsolute()
const {
44 return (_flags >> 7) & 1;
46 bool replaceItem()
const {
47 return (_flags >> 6) & 1;
49 bool explodeDestroysItem()
const {
50 return (_flags >> 5) & 1;
52 bool explodeWithDamage()
const {
53 return (_flags >> 3) & 1;
55 bool takesDamage()
const {
59 uint8 damagePoints()
const {
64 bool explode()
const {
65 return (_flags & 0x06) != 0;
67 int explosionType()
const {
69 return ((_flags & 0x06) >> 1) - 1;
72 uint16 getReplacementShape()
const {
73 assert(replaceItem());
74 return static_cast<uint16
>(_data[1]) << 8 | _data[0];
77 uint16 getReplacementFrame()
const {
78 assert(replaceItem());
79 return static_cast<uint16
>(_data[2]);
Definition: damage_info.h:35
bool applyToItem(Item *item, uint16 points) const
apply this damage info to the given item. Returns true if the item was destroyed in the process.