14 for (index = 0; index < 4; index++) {
23 for (index = 0; index < 4; index++) {
38#define FOUR_OBJECT_MOTION_DEFINE_RELEASE(name, update) \
40 struct FourObjectMotionState *state = gMenuWork; \
44 struct AnimationObject *object = state->objects[index]; \
46 if (object != NULL) { \
47 ResourceObject_ReleaseFar(object); \
48 state->objects[index] = NULL; \
51 } while (index < 4); \
52 Scheduler_RemoveCallback(update); \
60#define FOUR_OBJECT_MOTION_FULL_SCALE 0x10000u
61#define FOUR_OBJECT_MOTION_ORIGIN_Y 0x01e20000u
77 object->image.priority = 0;
81 placement.
height = vertical;
112 register s32 rowY
asm(
"r2");
114 object->image.priority = 0;
115 phase = menu->
phases[objectIndex];
120 scale.x = phase + (
s32)(0x10000 - phase) / 3;
125 placement.
height = projectedY;
136 }
while (objectIndex <= 3);
144 for (index = 0; index < 4; index++) {
147 if (
object !=
NULL) {
152 for (index = 0; index < 4; index++) {
158 state->
objects[index] = object;
159 state->
phases[index] = 0x10000;
172 state->
positionsY[index] = negative != 0 ? y | (
s32)0xffff8000 : y;
173 return 0x23c + index * 2;
199 state->
objects[index] = object;
212 for (index = 0; index < state->
partyCount; ++index) {
217#undef FOUR_OBJECT_MOTION_DEFINE_RELEASE
218#undef FOUR_OBJECT_MOTION_FULL_SCALE
219#undef FOUR_OBJECT_MOTION_ORIGIN_Y
s32 AnimationObjects_SelectAnimationFar(struct AnimationObject *state, s32 flags)
struct AnimationObject * ResourceObject_CreateFar(s32 id)
void Object_ApplyProjectedPlacementFar(struct AnimationObject *sprite, const struct SpritePlacement *position, const struct SpriteScale *scale, s32 facing)
Far call to Render_ApplyProjectedPlacement.
void ResourceObject_ReleaseFar(struct AnimationObject *sprite)
void Link_DrawShiftedTilePairFar(s32 offset)
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
s32 scale
16.16 fixed point, 0x10000 full size
The menu work as the row of four figures reads it: each figure's object, screen position and motion p...
struct AnimationObject * objects[4]
s16 positionsX[4]
screen pixels
s16 verticalOrigins[4]
screen pixels
s16 positionsY[4]
screen pixels
A sprite's screen position and its two vertical offsets, in 16.16 pixels.
s32 x
screen x of the sprite's centre
s32 y
screen y at the ground; sets the depth slot
s32 groundHeight
how far the shadow is raised above y
s32 height
how far the image is raised above y
Horizontal and vertical sprite scale; 0x10000 is the original size.
#define UI_PAGE_ARROW_VRAM