1 #ifndef INNOCENT_ACTOR_H
2 #define INNOCENT_ACTOR_H
4 #include "common/queue.h"
6 #include "innocent/animation.h"
7 #include "innocent/value.h"
15 class Actor
: public Animation
{
28 kOffsetMainSprite
= 8,
29 kOffsetTicksLeft
= 0xa,
31 kOffsetInterval
= 0x10,
35 void setFrame(uint16 f
) { _frame
= f
; }
37 uint16
room() const { return _room
; }
38 void setRoom(uint16
, uint16 frame
= 0, uint16 nextFrame
= 0);
40 bool isVisible() const;
42 void setAnimation(const CodePointer
&anim
);
44 void whenYouHideUpCall(const CodePointer
&cp
);
46 Animation::Status
tick();
50 Actor(const CodePointer
&code
);
52 // just in case, we'll explicitly add those if needed
55 Actor
&operator=(const Actor
&);
57 void readHeader(const byte
*code
);
64 Common::Queue
<CodePointer
> _callBacks
;
70 Animation::Status
opcodeHandler();
75 virtual Animation::Status
op(byte code
);
77 typedef Animation::Status (Actor::*OpcodeHandler
)();
78 OpcodeHandler _handlers
[38];