summaryrefslogtreecommitdiff
path: root/src/object/objectA.c
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2023-12-28 14:59:23 +0100
committeroctorock <79596758+octorock@users.noreply.github.com>2023-12-28 14:59:23 +0100
commit768efa50b308be03737d7eae2a1069627ea48b79 (patch)
tree447c266172ef82df68bfd6d4737acb499f2b1a9d /src/object/objectA.c
parentb6a94d5062076ce53a00609e1e661b9da9e7ee5b (diff)
parentdae4c669913c3dc4248291f2d843ac39525b2738 (diff)
Merge branch 'master' into tilemap-docs
Diffstat (limited to 'src/object/objectA.c')
-rw-r--r--src/object/objectA.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/object/objectA.c b/src/object/objectA.c
index 88128852..1eaf8f37 100644
--- a/src/object/objectA.c
+++ b/src/object/objectA.c
@@ -4,6 +4,7 @@
*
* @brief ObjectA object
*/
+#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
@@ -13,33 +14,41 @@
#include "room.h"
#include "tiles.h"
+typedef struct {
+ /*0x00*/ Entity base;
+ /*0x68*/ u8 unused1[8];
+ /*0x70*/ u16 unk_70;
+ /*0x72*/ u8 unused2[20];
+ /*0x86*/ u16 unk_86;
+} ObjectAEntity;
+
extern u8 gUpdateVisibleTiles;
-void ObjectA(Entity* this) {
+void ObjectA(ObjectAEntity* this) {
u32 uVar2;
- if (this->action == 0) {
- this->action = 1;
- this->hitbox = (Hitbox*)&gHitbox_2;
- if (this->collisionLayer == LAYER_BOTTOM) {
+ if (super->action == 0) {
+ super->action = 1;
+ super->hitbox = (Hitbox*)&gHitbox_2;
+ if (super->collisionLayer == LAYER_BOTTOM) {
uVar2 = META_TILE_TYPE_38;
} else {
uVar2 = META_TILE_TYPE_52;
}
- this->field_0x70.HALF.LO = uVar2;
- if (CheckFlags(this->field_0x86.HWORD) != 0) {
- SetMetaTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
+ this->unk_70 = uVar2;
+ if (CheckFlags(this->unk_86) != 0) {
+ SetMetaTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
if ((gRoomControls.reload_flags & 1) != 0) {
gUpdateVisibleTiles = 0;
}
DeleteThisEntity();
} else {
- AddInteractableSmallKeyLock(this);
+ AddInteractableSmallKeyLock(super);
}
- } else if (this->interactType != 0) {
- SetMetaTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
- SetFlag(this->field_0x86.HWORD);
- CreateDust(this);
+ } else if (super->interactType != INTERACTION_NONE) {
+ SetMetaTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
+ SetFlag(this->unk_86);
+ CreateDust(super);
ModDungeonKeys(-1);
DeleteThisEntity();
}