mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
Reorganize dungeon struct files
This commit is contained in:
parent
31b8f9602a
commit
b611d91008
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef HEADERS_TYPES_DUNGEON_MODE_DUNGEON_H_
|
||||
#define HEADERS_TYPES_DUNGEON_MODE_DUNGEON_H_
|
||||
#ifndef PMDSKY_DUNGEON_H
|
||||
#define PMDSKY_DUNGEON_H
|
||||
|
||||
#include "dungeon_mode.h"
|
||||
#include "enums.h"
|
||||
|
|
@ -1762,5 +1762,4 @@ struct dungeon {
|
|||
u8 field_0x2cb13;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif // PMDSKY_DUNGEON_H
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
#define PMDSKY_DUNGEON_MODE_H
|
||||
|
||||
#include "direction.h"
|
||||
#include "dungeon_mode_common.h"
|
||||
#include "enums.h"
|
||||
#include "item.h"
|
||||
#include "move.h"
|
||||
#include "graphics.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2900,17 +2900,6 @@ enum movement_flag
|
|||
MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY = 1 << 15, // Set if the Pokémon is petrified and the leader cures them by swapping places.
|
||||
};
|
||||
|
||||
enum move_flag
|
||||
{
|
||||
MOVE_FLAG_EXISTS = 1 << 0,
|
||||
MOVE_FLAG_SUBSEQUENT_IN_LINK_CHAIN = 1 << 1, // This move is linked with the previous move in the Pokémon's moveset.
|
||||
MOVE_FLAG_ENABLED_FOR_AI = 1 << 2, // Enabled for the AI to use.
|
||||
MOVE_FLAG_SET = 1 << 3, // This move can be triggered by pressing L+A instead of having to go to the move menu.
|
||||
MOVE_FLAG_LAST_USED = 1 << 4, // The most recent move used by the Pokémon.
|
||||
MOVE_FLAG_DISABLED = 1 << 5, // Disabled by an effect like Taunt.
|
||||
MOVE_FLAG_INTERNAL_MARKER = 1 << 7 // Possibly some kind of flag used internally to mark a move and find it again
|
||||
};
|
||||
|
||||
// Mobility types for monsters
|
||||
enum mobility_type {
|
||||
MOBILITY_NORMAL = 0,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,28 @@
|
|||
#ifndef HEADERS_TYPES_DUNGEON_MODE_COMMON_H_
|
||||
#define HEADERS_TYPES_DUNGEON_MODE_COMMON_H_
|
||||
#ifndef PMDSKY_MOVE_H
|
||||
#define PMDSKY_MOVE_H
|
||||
|
||||
#include "enums.h"
|
||||
|
||||
enum move_flags_2
|
||||
enum move_flag
|
||||
{
|
||||
MOVE_FLAGS_SEALED = 1 << 0,
|
||||
MOVE_FLAGS_CONSUME_PP = 1 << 2,
|
||||
MOVE_FLAGS_CONSUME_2_PP = 1 << 3,
|
||||
MOVE_FLAGS_CONSUME_4_PP = 1 << 5,
|
||||
MOVE_FLAGS_MULTITALENT_PP_BOOST = 1 << 8,
|
||||
MOVE_FLAGS_EXCLUSIVE_ITEM_PP_BOOST = 1 << 9,
|
||||
MOVE_FLAGS_UNKNOWN_PP_BOOST = 1 << 10,
|
||||
MOVE_FLAG_EXISTS = 1 << 0,
|
||||
MOVE_FLAG_SUBSEQUENT_IN_LINK_CHAIN = 1 << 1, // This move is linked with the previous move in the Pokémon's moveset.
|
||||
MOVE_FLAG_ENABLED_FOR_AI = 1 << 2, // Enabled for the AI to use.
|
||||
MOVE_FLAG_SET = 1 << 3, // This move can be triggered by pressing L+A instead of having to go to the move menu.
|
||||
MOVE_FLAG_LAST_USED = 1 << 4, // The most recent move used by the Pokémon.
|
||||
MOVE_FLAG_DISABLED = 1 << 5, // Disabled by an effect like Taunt.
|
||||
MOVE_FLAG_INTERNAL_MARKER = 1 << 7 // Possibly some kind of flag used internally to mark a move and find it again
|
||||
};
|
||||
|
||||
enum move_flag_2
|
||||
{
|
||||
MOVE_FLAG_SEALED = 1 << 0,
|
||||
MOVE_FLAG_CONSUME_PP = 1 << 2,
|
||||
MOVE_FLAG_CONSUME_2_PP = 1 << 3,
|
||||
MOVE_FLAG_CONSUME_4_PP = 1 << 5,
|
||||
MOVE_FLAG_MULTITALENT_PP_BOOST = 1 << 8,
|
||||
MOVE_FLAG_EXCLUSIVE_ITEM_PP_BOOST = 1 << 9,
|
||||
MOVE_FLAG_UNKNOWN_PP_BOOST = 1 << 10,
|
||||
};
|
||||
|
||||
// Monster move info
|
||||
|
|
@ -49,4 +60,4 @@ struct move {
|
|||
u8 ginseng; // 0x7: Ginseng boost
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // PMDSKY_MOVE_H
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PMDSKY_MOVES_H
|
||||
#define PMDSKY_MOVES_H
|
||||
|
||||
#include "dungeon_mode_common.h"
|
||||
#include "move.h"
|
||||
|
||||
// Gets the maximum PP for a given move.
|
||||
// return: max PP for the given move, capped at 99
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef PMDSKY_OVERLAY_29_0231E9F0_H
|
||||
#define PMDSKY_OVERLAY_29_0231E9F0_H
|
||||
|
||||
#include "dungeon_mode_common.h"
|
||||
#include "move.h"
|
||||
|
||||
// Gets the maximum PP for a given move. A wrapper around the function in the ARM 9 binary.
|
||||
// return: max PP for the given move, capped at 99
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define PMDSKY_OVERLAY_29_0232E250_H
|
||||
|
||||
#include "dungeon_mode.h"
|
||||
#include "dungeon_mode_common.h"
|
||||
#include "move.h"
|
||||
#include "item.h"
|
||||
|
||||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
|
|
|
|||
|
|
@ -9,16 +9,15 @@ extern s16 UNKNOWN_PP_BOOST_AMOUNT;
|
|||
|
||||
u32 GetMaxPp(struct move *move)
|
||||
{
|
||||
struct move_data *moves = DUNGEON_MOVE_TABLES.moves->moves;
|
||||
s16 pp = moves[move->id].pp;
|
||||
s16 pp = DUNGEON_MOVE_TABLES.moves->moves[move->id].pp;
|
||||
|
||||
if (move->flags2 & MOVE_FLAGS_MULTITALENT_PP_BOOST)
|
||||
if (move->flags2 & MOVE_FLAG_MULTITALENT_PP_BOOST)
|
||||
pp += MULTITALENT_PP_BOOST_AMOUNT;
|
||||
|
||||
if (move->flags2 & MOVE_FLAGS_EXCLUSIVE_ITEM_PP_BOOST)
|
||||
if (move->flags2 & MOVE_FLAG_EXCLUSIVE_ITEM_PP_BOOST)
|
||||
pp += EXCLUSIVE_ITEM_PP_BOOST_AMOUNT;
|
||||
|
||||
if (move->flags2 & MOVE_FLAGS_UNKNOWN_PP_BOOST)
|
||||
if (move->flags2 & MOVE_FLAG_UNKNOWN_PP_BOOST)
|
||||
pp += UNKNOWN_PP_BOOST_AMOUNT;
|
||||
|
||||
if (pp > 99)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user