Skip to Content
The Alchemy Project

src/scene/shared/actor_bob.c

Included by kibombo_mountains.c and settlements.c.

Macros

NameDescription
#defineBOB_CYCLE_TICKS 64scActorBob's cycle, in ticks.
#defineBOB_ROCK_DIVISOR 64Its sprite's rotation is the cosine of its swing over this: up to a 64th of a turn either way.

Functions

NameDescription
Sint32scActorBob (ACTOR *actor)An actor's script call that never ends: it hops three times every BOB_CYCLE_TICKS ticks, at the cycle's start, at tick 16 and at tick 24, while its sprite rocks from side to side, once every 16 ticks.

Macros in detail

BOB_CYCLE_TICKS

#define BOB_CYCLE_TICKS 64

scActorBob's cycle, in ticks.

Referenced by scActorBob().

Definition at line 2 of file actor_bob.c.

BOB_ROCK_DIVISOR

#define BOB_ROCK_DIVISOR 64

Its sprite's rotation is the cosine of its swing over this: up to a 64th of a turn either way.

Referenced by scActorBob().

Definition at line 5 of file actor_bob.c.

Functions in detail

scActorBob

Sint32 scActorBob(ACTOR *actor)

An actor's script call that never ends: it hops three times every BOB_CYCLE_TICKS ticks, at the cycle's start, at tick 16 and at tick 24, while its sprite rocks from side to side, once every 16 ticks.

References Sint32 and syCos().

Referenced by KibomboMountainsCrateJumpScript and SettlementsCrateOnTinderScript.

Definition at line 10 of file actor_bob.c.