From 4ffa704eb3920b2cf2613fa879cfd87470d2ef30 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Sun, 27 Feb 2022 06:05:06 +0200 Subject: Decompile lamp --- src/object/lamp.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/object/lamp.c (limited to 'src') diff --git a/src/object/lamp.c b/src/object/lamp.c new file mode 100644 index 00000000..caf458ad --- /dev/null +++ b/src/object/lamp.c @@ -0,0 +1,23 @@ +#include "entity.h" + +void Lamp_Init(Entity* this); +void Lamp_Action1(Entity* this); + +void Lamp(Entity* this) { + static void (*const actionFuncs[])(Entity*) = { + Lamp_Init, + Lamp_Action1, + }; + + actionFuncs[this->action](this); +} + +void Lamp_Init(Entity* this) { + this->action = 1; + UpdateSpriteForCollisionLayer(this); + InitializeAnimation(this, 0); +} + +void Lamp_Action1(Entity* this) { + GetNextFrame(this); +} -- cgit v1.2.3