pmd-sky/include/dungeon_util_static.h
2025-04-30 00:16:33 -04:00

24 lines
622 B
C

#ifndef PMDSKY_DUNGEON_UTIL_STATIC_H
#define PMDSKY_DUNGEON_UTIL_STATIC_H
#include "dungeon.h"
static inline struct monster *GetEntInfo(struct entity *ent)
{
return ent->info;
}
static inline bool8 ItemSticky(u8 flags)
{
// Double bang is needed to match for some reason.
return !!(flags & ITEM_FLAG_STICKY);
}
static inline bool8 ItemExists(u8 flags)
{
return !!(flags & ITEM_FLAG_EXISTS);
}
#define ENTITY_POISONED(entity_info)((entity_info->burn_class_status.burn == STATUS_BURN_POISONED || entity_info->burn_class_status.burn == STATUS_BURN_BADLY_POISONED))
#endif // PMDSKY_DUNGEON_UTIL_STATIC_H