properly use subtype enum

This commit is contained in:
lepelog
2025-12-04 23:26:13 +01:00
parent 30b1ef3659
commit f0889aadb6
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -61,16 +61,16 @@ private:
/* 0x260 */ mVec3_c mRevealedSpawnPos;
/* 0x26C */ dAcRef_c<dAcBase_c> mWarpRef;
s32 getSpawnSubtype() const {
return (mParams >> 8 & 0xF);
SpawnSubtype getSpawnSubtype() const {
return (SpawnSubtype)(mParams >> 8 & 0xF);
}
bool isSpawnSubtype(s32 spanwSubtype) const {
bool isSpawnSubtype(SpawnSubtype spanwSubtype) const {
return getSpawnSubtype() == spanwSubtype;
}
s32 getSubtype() const {
return (mParams >> 4 & 0xF);
Subtype getSubtype() const {
return (Subtype)(mParams >> 4 & 0xF);
}
bool isSubtype(u8 subtype) const {
bool isSubtype(Subtype subtype) const {
return getSubtype() == subtype;
}
s32 getInsectCount() const {
+1 -1
View File
@@ -77,7 +77,7 @@ inline bool checkProfile(u16 prof, u32 target) {
}
int dTgInsect_c::actorPostCreate() {
s32 subtype = mParams >> 4 & 0xF;
Subtype subtype = getSubtype();
// ??? doesn't match without the double comparison
if (subtype == SUBTYPE_WOODLAND_RHINO_BEETLE
|| subtype == SUBTYPE_WOODLAND_RHINO_BEETLE