add all BP indexes and fix incorrect RT indexes

This commit is contained in:
Martin Michelsen
2026-01-04 00:29:33 -08:00
parent d9540ba414
commit 4aa206bd4b
15 changed files with 38169 additions and 385 deletions
+17 -4
View File
@@ -7,6 +7,11 @@
#include "StaticGameData.hh"
#include "Types.hh"
// We don't know what the actual maximum was, since it was presumably only stored server-side on Sega's servers. The
// client uses values up to 0x6C (Kondrieu), so we just choose a value larger than that.
static constexpr size_t NUM_RT_INDEXES_V3 = 0x64;
static constexpr size_t NUM_RT_INDEXES_V4 = 0x70;
enum class EnemyType : uint8_t {
UNKNOWN = 0,
NONE,
@@ -15,6 +20,7 @@ enum class EnemyType : uint8_t {
ASTARK,
BA_BOOTA,
BARBA_RAY,
BARBA_RAY_JOINT,
BARBAROUS_WOLF,
BEE_L,
BEE_R,
@@ -35,7 +41,6 @@ enum class EnemyType : uint8_t {
DARK_GUNNER,
DARK_GUNNER_CONTROL,
DARVANT,
DARVANT_ULTIMATE,
DE_ROL_LE,
DE_ROL_LE_BODY,
DE_ROL_LE_MINE,
@@ -79,6 +84,7 @@ enum class EnemyType : uint8_t {
HILDEBLUE,
ILL_GILL,
KONDRIEU,
KONDRIEU_SPINNER,
LA_DIMENIAN,
LOVE_RAPPY,
MERICARAND,
@@ -110,6 +116,7 @@ enum class EnemyType : uint8_t {
RECOBOX,
RECON,
SAINT_MILION,
SAINT_MILION_SPINNER,
SAINT_RAPPY,
SAND_RAPPY_CRATER,
SAND_RAPPY_DESERT,
@@ -117,6 +124,7 @@ enum class EnemyType : uint8_t {
SATELLITE_LIZARD_DESERT,
SAVAGE_WOLF,
SHAMBERTIN,
SHAMBERTIN_SPINNER,
SINOW_BEAT,
SINOW_BERILL,
SINOW_GOLD,
@@ -125,6 +133,7 @@ enum class EnemyType : uint8_t {
SINOW_ZOA,
SO_DIMENIAN,
UL_GIBBON,
UL_RAY,
VOL_OPT_1,
VOL_OPT_2,
VOL_OPT_AMP,
@@ -150,8 +159,12 @@ struct EnemyTypeDefinition {
};
EnemyType type;
uint8_t flags;
uint8_t rt_index; // 0xFF if not valid (e.g. not an enemy)
uint8_t bp_index; // 0xFF if not valid (e.g. not an enemy)
uint8_t rt_index; // 0xFF if not valid (e.g. not an enemy, or has no drops)
uint8_t legacy_rt_index; // Index used by Schtserv in their Ep4 .rel format
std::vector<uint8_t> bp_stats_indexes;
std::vector<uint8_t> bp_attack_data_indexes;
std::vector<uint8_t> bp_resist_data_indexes;
std::vector<uint8_t> bp_movement_data_indexes;
const char* enum_name;
const char* in_game_name;
const char* ultimate_name; // May be null if same as in_game_name
@@ -185,4 +198,4 @@ template <>
EnemyType phosg::enum_for_name<EnemyType>(const char* name);
const std::vector<EnemyType>& enemy_types_for_rare_table_index(Episode episode, uint8_t rt_index);
const std::vector<EnemyType>& enemy_types_for_battle_param_index(Episode episode, uint8_t bp_index);
const std::vector<EnemyType>& enemy_types_for_battle_param_stats_index(Episode episode, uint8_t bp_index);