Merge pull request #1883 from GriffinRichards/doc-mod

Add some missing ARRAY_COUNT, make TV_SHOWS_COUNT depend on NUM_NORMAL_TVSHOW_SLOTS
This commit is contained in:
GriffinR 2023-05-05 02:38:30 -04:00 committed by GitHub
commit dd65eddbdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -46,7 +46,6 @@
#define OBJECT_EVENTS_COUNT 16
#define MAIL_COUNT (10 + PARTY_SIZE)
#define SECRET_BASES_COUNT 20
#define TV_SHOWS_COUNT 25
#define POKE_NEWS_COUNT 16
#define PC_ITEMS_COUNT 50
#define BAG_ITEMS_COUNT 30

View File

@ -74,6 +74,7 @@
// for TV shows from TVGROUP_NORMAL. The remainder are for TV
// shows from TVGROUP_RECORD_MIX.
#define NUM_NORMAL_TVSHOW_SLOTS 5
#define TV_SHOWS_COUNT (NUM_NORMAL_TVSHOW_SLOTS + 20)
#define PLAYERS_HOUSE_TV_NONE 0
#define PLAYERS_HOUSE_TV_LATI 1

View File

@ -2575,7 +2575,7 @@ bool8 MovementType_WanderAround_Step2(struct ObjectEvent *objectEvent, struct Sp
{
if (!ObjectEventExecSingleMovementAction(objectEvent, sprite))
return FALSE;
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
sprite->sTypeFuncId = 3;
return TRUE;
}
@ -2855,7 +2855,7 @@ bool8 MovementType_LookAround_Step2(struct ObjectEvent *objectEvent, struct Spri
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -2907,7 +2907,7 @@ bool8 MovementType_WanderUpAndDown_Step2(struct ObjectEvent *objectEvent, struct
if (!ObjectEventExecSingleMovementAction(objectEvent, sprite))
return FALSE;
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
sprite->sTypeFuncId = 3;
return TRUE;
}
@ -2975,7 +2975,7 @@ bool8 MovementType_WanderLeftAndRight_Step2(struct ObjectEvent *objectEvent, str
if (!ObjectEventExecSingleMovementAction(objectEvent, sprite))
return FALSE;
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
sprite->sTypeFuncId = 3;
return TRUE;
}
@ -3195,7 +3195,7 @@ bool8 MovementType_FaceDownAndUp_Step2(struct ObjectEvent *objectEvent, struct S
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3245,7 +3245,7 @@ bool8 MovementType_FaceLeftAndRight_Step2(struct ObjectEvent *objectEvent, struc
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysMedium[Random() % ARRAY_COUNT(sMovementDelaysMedium)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3295,7 +3295,7 @@ bool8 MovementType_FaceUpAndLeft_Step2(struct ObjectEvent *objectEvent, struct S
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3345,7 +3345,7 @@ bool8 MovementType_FaceUpAndRight_Step2(struct ObjectEvent *objectEvent, struct
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3395,7 +3395,7 @@ bool8 MovementType_FaceDownAndLeft_Step2(struct ObjectEvent *objectEvent, struct
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3445,7 +3445,7 @@ bool8 MovementType_FaceDownAndRight_Step2(struct ObjectEvent *objectEvent, struc
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3495,7 +3495,7 @@ bool8 MovementType_FaceDownUpAndLeft_Step2(struct ObjectEvent *objectEvent, stru
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3545,7 +3545,7 @@ bool8 MovementType_FaceDownUpAndRight_Step2(struct ObjectEvent *objectEvent, str
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3595,7 +3595,7 @@ bool8 MovementType_FaceUpLeftAndRight_Step2(struct ObjectEvent *objectEvent, str
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}
@ -3645,7 +3645,7 @@ bool8 MovementType_FaceDownLeftAndRight_Step2(struct ObjectEvent *objectEvent, s
{
if (ObjectEventExecSingleMovementAction(objectEvent, sprite))
{
SetMovementDelay(sprite, sMovementDelaysShort[Random() & 3]);
SetMovementDelay(sprite, sMovementDelaysShort[Random() % ARRAY_COUNT(sMovementDelaysShort)]);
objectEvent->singleMovementActive = FALSE;
sprite->sTypeFuncId = 3;
}