From b20aa9b8fb03f07481a0dffc31cb07a5a05a59d0 Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Sat, 30 Sep 2023 18:57:10 -0400 Subject: [PATCH] Police, PoliceEntity ClassName and IsA (#150) --- LEGO1/police.h | 14 +++++++++++++- LEGO1/policeentity.h | 12 ++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/LEGO1/police.h b/LEGO1/police.h index 8ff6dff9..a11264da 100644 --- a/LEGO1/police.h +++ b/LEGO1/police.h @@ -13,7 +13,19 @@ public: virtual ~Police() override; // vtable+0x0 virtual MxLong Notify(MxParam &p) override; // vtable+0x4 - + + // OFFSET: LEGO1 0x1005e1e0 + inline virtual const char *ClassName() const override // vtable+0xc + { + // 0x100f0450 + return "Police"; + } + + // OFFSET: LEGO1 0x1005e1f0 + inline virtual MxBool IsA(const char *name) const override // vtable+0x10 + { + return !strcmp(name, Police::ClassName()) || LegoWorld::IsA(name); + } }; #endif // POLICE_H diff --git a/LEGO1/policeentity.h b/LEGO1/policeentity.h index a23cced4..3a301016 100644 --- a/LEGO1/policeentity.h +++ b/LEGO1/policeentity.h @@ -7,7 +7,19 @@ // SIZE 0x68 class PoliceEntity : public BuildingEntity { +public: + // OFFSET: LEGO1 0x1000ed60 + inline virtual const char *ClassName() const override // vtable+0xc + { + // 0x100f0328 + return "PoliceEntity"; + } + // OFFSET: LEGO1 0x1000ed70 + inline virtual MxBool IsA(const char *name) const override // vtable+0x10 + { + return !strcmp(name, PoliceEntity::ClassName()) || BuildingEntity::IsA(name); + } }; #endif // POLICEENTITY_H