Updated more names

This commit is contained in:
AnonymousRandomPerson 2023-01-13 21:00:12 -05:00
parent 9e688b3341
commit d96a76f552
6 changed files with 18 additions and 18 deletions

View File

@ -3,8 +3,8 @@
#include "dungeon_entity.h"
void ClearMonsterActionFields(struct DungeonActionContainer *actionPointer);
void SetMonsterActionFields(struct DungeonActionContainer *actionPointer, u16 action);
void SetActionPassTurnOrWalk(struct DungeonActionContainer *actionPointer, s16 species);
void ClearMonsterActionFields(struct ActionContainer *actionPointer);
void SetMonsterActionFields(struct ActionContainer *actionPointer, u16 action);
void SetActionPassTurnOrWalk(struct ActionContainer *actionPointer, s16 species);
#endif

View File

@ -12,7 +12,7 @@
#define DEFAULT_STAT_MULTIPLIER 256
#define MAX_SPEED_STAGE 4
#define MAX_STOCKPILE_STAGE 3
#define NUM_SPEED_TURN_COUNTERS 5
#define NUM_SPEED_COUNTERS 5
#define NUM_PREV_POS 4
#define STAT_STAGE_ATK 0
@ -22,7 +22,7 @@
#define STAT_STAGE_ACCURACY 0
#define STAT_STAGE_EVASION 1
struct DungeonActionContainer
struct ActionContainer
{
/* 0x0 */ u16 action;
/* 0x2 */ u8 direction;
@ -82,7 +82,7 @@ struct EntityInfo
/* 0x3E */ u8 hiddenPowerType;
u8 fill3F;
/* 0x40 */ u8 joinedAt; // Uses the dungeon index in dungeon.h.
/* 0x44 */ struct DungeonActionContainer action;
/* 0x44 */ struct ActionContainer action;
/* 0x5C */ u8 types[2];
/* 0x5E */ u8 abilities[2];
/* 0x60 */ struct Item heldItem;
@ -181,8 +181,8 @@ struct EntityInfo
/* 0x104 */ s32 speedStage;
// The turn counter for movement speed up/down is split into five timers each. Multiple timers are used if the Pokémon is affected by multiple
// speed-up/slow effects at once, like using Agility twice.
/* 0x108 */ u8 speedUpCounters[NUM_SPEED_TURN_COUNTERS];
/* 0x10D */ u8 speedDownCounters[NUM_SPEED_TURN_COUNTERS];
/* 0x108 */ u8 speedUpCounters[NUM_SPEED_COUNTERS];
/* 0x10D */ u8 speedDownCounters[NUM_SPEED_COUNTERS];
/* 0x112 */ u8 stockpileStage;
u8 fill113;
// When non-zero, an AI Pokémon will move in a random direction every turn.

View File

@ -1108,7 +1108,7 @@ void sub_8079F20(struct Entity * pokemon, struct Entity * target, u8 param_3, u8
}
moveSpeed = GetSpeedStatus(target);
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
for(index = 0; index < NUM_SPEED_COUNTERS; index++)
{
entityData->speedDownCounters[index] = 0;
}

View File

@ -246,21 +246,21 @@ void sub_8044C50(u16 action)
entityData->action.itemTargetPosition.y = -1;
}
void ClearMonsterActionFields(struct DungeonActionContainer *actionPointer)
void ClearMonsterActionFields(struct ActionContainer *actionPointer)
{
actionPointer->action = ACTION_NOTHING;
actionPointer->actionUseIndex = 0;
actionPointer->unkC = 0;
}
void SetMonsterActionFields(struct DungeonActionContainer *actionPointer, u16 action)
void SetMonsterActionFields(struct ActionContainer *actionPointer, u16 action)
{
actionPointer->action = action;
actionPointer->actionUseIndex = 0;
actionPointer->unkC = 0;
}
void SetActionPassTurnOrWalk(struct DungeonActionContainer *actionPointer, s16 species)
void SetActionPassTurnOrWalk(struct ActionContainer *actionPointer, s16 species)
{
if (CanMove(species))
{

View File

@ -495,7 +495,7 @@ void RaiseMovementSpeedTarget(struct Entity * pokemon, struct Entity * target, s
sub_80522F4(pokemon,target,*gUnknown_80FC2B8);
}
else {
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
for(index = 0; index < NUM_SPEED_COUNTERS; index++)
{
if(entityData->speedUpCounters[index] == 0)
{
@ -542,7 +542,7 @@ void LowerMovementSpeedTarget(struct Entity * pokemon, struct Entity * target, s
else {
for(counter = 0; counter < levels; counter++)
{
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
for(index = 0; index < NUM_SPEED_COUNTERS; index++)
{
if (entityData->speedDownCounters[index]== 0) {
entityData->speedDownCounters[index] = CalculateStatusTurns(target,gUnknown_80F4E48,TRUE) + 1;
@ -975,7 +975,7 @@ void sub_80783C4(struct Entity * pokemon, struct Entity * target, u8 param_3)
struct EntityInfo *entityData;
struct Entity * entity;
struct Entity * entity2;
struct DungeonActionContainer action;
struct ActionContainer action;
s32 index;
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {

View File

@ -114,9 +114,9 @@ s32 GetSpeedStatus(struct Entity *pokemon)
entityData = pokemon->info;
speed = 0;
for(index = 0; index < NUM_SPEED_TURN_COUNTERS; index++)
for(index = 0; index < NUM_SPEED_COUNTERS; index++)
{
if (entityData->speedUpCounters[index + NUM_SPEED_TURN_COUNTERS] != 0) {
if (entityData->speedUpCounters[index + NUM_SPEED_COUNTERS] != 0) {
speed--;
}
if (entityData->speedUpCounters[index] != 0) {
@ -278,7 +278,7 @@ bool8 HasNegativeStatus(struct Entity *pokemon)
return TRUE;
}
}
for (i = 0; i < NUM_SPEED_TURN_COUNTERS; i++)
for (i = 0; i < NUM_SPEED_COUNTERS; i++)
{
if (pokemonInfo->speedDownCounters[i] != 0)
{