mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
Moved ILLEGAL_BATTLE_TYPES to include\constants\battle.h and renamed it to BATTLE_TYPE_RECORDED_INVALID
This commit is contained in:
parent
bb2e64b3fc
commit
453da8aa8c
@ -78,6 +78,11 @@
|
||||
#define BATTLE_TYPE_RECORDED_IS_MASTER (1 << 31)
|
||||
#define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE | BATTLE_TYPE_PYRAMID)
|
||||
#define BATTLE_TYPE_FRONTIER_NO_PYRAMID (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE)
|
||||
#define BATTLE_TYPE_RECORDED_INVALID ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \
|
||||
| BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_ROAMER | BATTLE_TYPE_EREADER_TRAINER \
|
||||
| BATTLE_TYPE_KYOGRE_GROUDON | BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI \
|
||||
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE \
|
||||
| BATTLE_TYPE_GROUDON | BATTLE_TYPE_KYOGRE | BATTLE_TYPE_RAYQUAZA))
|
||||
|
||||
// Battle Outcome defines
|
||||
#define B_OUTCOME_WON 1
|
||||
|
@ -21,11 +21,6 @@
|
||||
#include "constants/rgb.h"
|
||||
|
||||
#define BATTLER_RECORD_SIZE 664
|
||||
#define ILLEGAL_BATTLE_TYPES ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \
|
||||
| BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_ROAMER | BATTLE_TYPE_EREADER_TRAINER \
|
||||
| BATTLE_TYPE_KYOGRE_GROUDON | BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI \
|
||||
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE \
|
||||
| BATTLE_TYPE_GROUDON | BATTLE_TYPE_KYOGRE | BATTLE_TYPE_RAYQUAZA))
|
||||
|
||||
struct PlayerInfo
|
||||
{
|
||||
@ -301,7 +296,7 @@ static bool32 IsRecordedBattleSaveValid(struct RecordedBattleSave *save)
|
||||
{
|
||||
if (save->battleFlags == 0)
|
||||
return FALSE;
|
||||
if (save->battleFlags & ILLEGAL_BATTLE_TYPES)
|
||||
if (save->battleFlags & BATTLE_TYPE_RECORDED_INVALID)
|
||||
return FALSE;
|
||||
if (CalcByteArraySum((void *)(save), sizeof(*save) - 4) != save->checksum)
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user