gzdoom-gles/src/g_inventory/a_keys.h
Christoph Oelckers 8a50004f55 - cleanup of the virtual function definitions for inventory items. Let's better use 'virtual' and 'override' everywhere to make sure that nothing gets overlooked.
- added call wrappers and script hooks for all relevant virtuals in AInventory.
- made GetSpeedFactor and GetNoTeleportFreeze entirely scripted because they are too trivial - also do them iteratively, just like HandlePickup, because it's just a better way to do this stuff.
2016-11-30 15:54:01 +01:00

48 lines
1,009 B
C++

#ifndef A_KEYS_H
#define A_KEYS_H
#include "a_pickups.h"
class AKey : public AInventory
{
DECLARE_CLASS (AKey, AInventory)
public:
virtual bool HandlePickup (AInventory *item) override;
BYTE KeyNumber;
protected:
virtual bool ShouldStay () override;
};
bool P_CheckKeys (AActor *owner, int keynum, bool remote);
void P_InitKeyMessages ();
void P_DeinitKeyMessages ();
int P_GetMapColorForLock (int lock);
int P_GetMapColorForKey (AInventory *key);
// PuzzleItems work in conjunction with the UsePuzzleItem special
class PClassPuzzleItem : public PClassInventory
{
DECLARE_CLASS(PClassPuzzleItem, PClassInventory);
protected:
public:
virtual void DeriveData(PClass *newclass);
FString PuzzFailMessage;
};
class APuzzleItem : public AInventory
{
DECLARE_CLASS_WITH_META(APuzzleItem, AInventory, PClassPuzzleItem)
public:
virtual bool ShouldStay () override;
virtual bool Use (bool pickup) override;
virtual bool HandlePickup (AInventory *item) override;
int PuzzleItemNumber;
};
#endif