summaryrefslogtreecommitdiff
path: root/include/manager/diggingCaveEntranceManager.h
blob: 3c8c70903ac0e7bc773f5dc5dfff076db104cfd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef DIGGINGCAVEENTRANCEMANAGER_H
#define DIGGINGCAVEENTRANCEMANAGER_H

#include "manager.h"

typedef struct {
    Manager base;
} DiggingCaveEntranceManager;

enum DiggingCaveEntranceType {
    CAVE_LAKE_WOODS_ENTER,
    CAVE_LAKE_WOODS_LEAVE,
    CAVE_HYRULE_TOWN_ENTER,
    CAVE_HYRULE_TOWN_LEAVE,
    CAVE_EASTERN_HILL_ENTER,
    CAVE_EASTERN_HILL_LEAVE,
    CAVE_CRENEL_ENTER,
    CAVE_CRENEL_LEAVE,
    CAVE_VEIL_FALLS_ENTER,
    CAVE_VEIL_FALLS_LEAVE,
    CAVE_TRILBY_HIGHLANDS_ENTER,
    CAVE_TRILBY_HIGHLANDS_LEAVE,
    CAVE_CASTOR_WILDS_ENTER,
    CAVE_CASTOR_WILDS_LEAVE,
    CAVE_LAKE_HYLIA_NORTH_ENTER,
    CAVE_LAKE_HYLIA_NORTH_LEAVE,
    CAVE_LON_LON_RANCH_ENTER,
    CAVE_LON_LON_RANCH_LEAVE,
    CAVE_LAKE_HYLIA_CENTER_ENTER,
    CAVE_LAKE_HYLIA_CENTER_LEAVE,
};

typedef struct {
    u16 sourceTilePos; /**< Tile position for the entrance in the source room. */
    u8 sourceRoom;     /**< @see RoomID */
    u8 type;           /**< @see DiggingCaveEntranceType */
    u8 targetArea;     /**< @see AreaID */
    u8 targetRoom;     /**< @see RoomID */
    u16 targetTilePos; /**< Tile position for the entrance in the target room. */
} DiggingCaveEntrance;

typedef struct {
    const DiggingCaveEntrance* entrance;
    u16 offsetX; /**< X offset from the player to the entrance. */
    u16 offsetY; /**< Y offset from the player to the entrance. */
    bool8 isDiggingCave;
    u8 currentArea;  /**< Area the player was in before the transition. */
    u8 previousArea; /**< Previous value of currentArea. */
    u8 targetRoom;   /**< targetRoom | 0x80 ? */
} DiggingCaveEntranceTransition;
extern DiggingCaveEntranceTransition gDiggingCaveEntranceTransition;

extern const DiggingCaveEntrance* const diggingCaveEntrances[];

#endif // DIGGINGCAVEENTRANCEMANAGER_H