mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-29 06:44:01 +01:00
Move rotating tile puzzle data to src
This commit is contained in:
parent
f92b03f266
commit
85dc8a528c
@ -1,43 +0,0 @@
|
|||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_ShiftRight:: @ 8612698
|
|
||||||
store_lock_anim
|
|
||||||
walk_right
|
|
||||||
free_unlock_anim
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_ShiftDown:: @ 861269C
|
|
||||||
store_lock_anim
|
|
||||||
walk_down
|
|
||||||
free_unlock_anim
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_ShiftLeft:: @ 86126A0
|
|
||||||
store_lock_anim
|
|
||||||
walk_left
|
|
||||||
free_unlock_anim
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_ShiftUp:: @ 86126A4
|
|
||||||
store_lock_anim
|
|
||||||
walk_up
|
|
||||||
free_unlock_anim
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_FaceRight:: @ 86126A8
|
|
||||||
face_right
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_FaceDown:: @ 86126AA
|
|
||||||
face_down
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_FaceLeft:: @ 86126AC
|
|
||||||
face_left
|
|
||||||
step_end
|
|
||||||
|
|
||||||
RotatingTilePuzzle_Movement_FaceUp:: @ 86126AE
|
|
||||||
face_up
|
|
||||||
step_end
|
|
@ -644,7 +644,6 @@ SECTIONS {
|
|||||||
src/battle_factory.o(.rodata);
|
src/battle_factory.o(.rodata);
|
||||||
src/battle_pike.o(.rodata);
|
src/battle_pike.o(.rodata);
|
||||||
src/rotating_tile_puzzle.o(.rodata);
|
src/rotating_tile_puzzle.o(.rodata);
|
||||||
data/rotating_tile_puzzle.o(.rodata);
|
|
||||||
src/battle_pyramid.o(.rodata);
|
src/battle_pyramid.o(.rodata);
|
||||||
src/item_menu.o(.rodata);
|
src/item_menu.o(.rodata);
|
||||||
src/list_menu.o(.rodata);
|
src/list_menu.o(.rodata);
|
||||||
|
@ -8,15 +8,6 @@
|
|||||||
#include "constants/event_objects.h"
|
#include "constants/event_objects.h"
|
||||||
#include "constants/metatile_labels.h"
|
#include "constants/metatile_labels.h"
|
||||||
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_ShiftRight[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_ShiftDown[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_ShiftLeft[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_ShiftUp[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_FaceRight[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_FaceDown[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_FaceLeft[];
|
|
||||||
extern const u8 RotatingTilePuzzle_Movement_FaceUp[];
|
|
||||||
|
|
||||||
#define ROTATE_COUNTERCLOCKWISE 0
|
#define ROTATE_COUNTERCLOCKWISE 0
|
||||||
#define ROTATE_CLOCKWISE 1
|
#define ROTATE_CLOCKWISE 1
|
||||||
#define ROTATE_NONE 2
|
#define ROTATE_NONE 2
|
||||||
@ -34,6 +25,62 @@ struct RotatingTilePuzzle
|
|||||||
bool8 isTrickHouse;
|
bool8 isTrickHouse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_ShiftRight[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_WALK_NORMAL_RIGHT,
|
||||||
|
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_ShiftDown[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_WALK_NORMAL_DOWN,
|
||||||
|
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_ShiftLeft[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_WALK_NORMAL_LEFT,
|
||||||
|
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_ShiftUp[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_WALK_NORMAL_UP,
|
||||||
|
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_FaceRight[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_FACE_RIGHT,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_FaceDown[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_FACE_DOWN,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_FaceLeft[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_FACE_LEFT,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sMovement_FaceUp[] =
|
||||||
|
{
|
||||||
|
MOVEMENT_ACTION_FACE_UP,
|
||||||
|
MOVEMENT_ACTION_STEP_END
|
||||||
|
};
|
||||||
|
|
||||||
// This file's functions.
|
// This file's functions.
|
||||||
static void SaveRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
static void SaveRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
||||||
static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 arg1);
|
||||||
@ -106,19 +153,19 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber)
|
|||||||
switch (puzzleTileNum)
|
switch (puzzleTileNum)
|
||||||
{
|
{
|
||||||
case 0: // Right Arrow
|
case 0: // Right Arrow
|
||||||
movementScript = RotatingTilePuzzle_Movement_ShiftRight;
|
movementScript = sMovement_ShiftRight;
|
||||||
x = 1;
|
x = 1;
|
||||||
break;
|
break;
|
||||||
case 1: // Down Arrow
|
case 1: // Down Arrow
|
||||||
movementScript = RotatingTilePuzzle_Movement_ShiftDown;
|
movementScript = sMovement_ShiftDown;
|
||||||
y = 1;
|
y = 1;
|
||||||
break;
|
break;
|
||||||
case 2: // Left Arrow
|
case 2: // Left Arrow
|
||||||
movementScript = RotatingTilePuzzle_Movement_ShiftLeft;
|
movementScript = sMovement_ShiftLeft;
|
||||||
x = -1;
|
x = -1;
|
||||||
break;
|
break;
|
||||||
case 3: // Up Arrow
|
case 3: // Up Arrow
|
||||||
movementScript = RotatingTilePuzzle_Movement_ShiftUp;
|
movementScript = sMovement_ShiftUp;
|
||||||
y = -1;
|
y = -1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -204,19 +251,19 @@ void TurnRotatingTileObjects(void)
|
|||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case DIR_EAST:
|
case DIR_EAST:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceUp;
|
movementScript = sMovement_FaceUp;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case DIR_SOUTH:
|
case DIR_SOUTH:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceRight;
|
movementScript = sMovement_FaceRight;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
case DIR_WEST:
|
case DIR_WEST:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceDown;
|
movementScript = sMovement_FaceDown;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case DIR_NORTH:
|
case DIR_NORTH:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceLeft;
|
movementScript = sMovement_FaceLeft;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -233,19 +280,19 @@ void TurnRotatingTileObjects(void)
|
|||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case DIR_EAST:
|
case DIR_EAST:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceDown;
|
movementScript = sMovement_FaceDown;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_DOWN;
|
||||||
break;
|
break;
|
||||||
case DIR_SOUTH:
|
case DIR_SOUTH:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceLeft;
|
movementScript = sMovement_FaceLeft;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_LEFT;
|
||||||
break;
|
break;
|
||||||
case DIR_WEST:
|
case DIR_WEST:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceUp;
|
movementScript = sMovement_FaceUp;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_UP;
|
||||||
break;
|
break;
|
||||||
case DIR_NORTH:
|
case DIR_NORTH:
|
||||||
movementScript = RotatingTilePuzzle_Movement_FaceRight;
|
movementScript = sMovement_FaceRight;
|
||||||
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
eventObjects[sRotatingTilePuzzle->objects[i].eventTemplateId].movementType = MOVEMENT_TYPE_FACE_RIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user