Add missing map constant usage
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "script.h"
|
||||
#include "trainer_see.h"
|
||||
#include "trig.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/event_object_movement.h"
|
||||
#include "constants/event_objects.h"
|
||||
|
||||
@@ -1214,8 +1215,8 @@ static void ClearObjectEvent(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
*objectEvent = (struct ObjectEvent){};
|
||||
objectEvent->localId = 0xFF;
|
||||
objectEvent->mapNum = 0xFF;
|
||||
objectEvent->mapGroup = 0xFF;
|
||||
objectEvent->mapNum = MAP_NUM(UNDEFINED);
|
||||
objectEvent->mapGroup = MAP_GROUP(UNDEFINED);
|
||||
objectEvent->movementActionId = 0xFF;
|
||||
}
|
||||
|
||||
@@ -8038,7 +8039,9 @@ static void CalcWhetherObjectIsOffscreen(struct ObjectEvent *objectEvent, struct
|
||||
x2 = graphicsInfo->width + (s16)x;
|
||||
y2 = graphicsInfo->height + (s16)y;
|
||||
|
||||
if (gSaveBlock1Ptr->location.mapGroup == 1 && gSaveBlock1Ptr->location.mapNum == 4 && objectEvent->localId == 1)
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SSANNE_EXTERIOR)
|
||||
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(SSANNE_EXTERIOR)
|
||||
&& objectEvent->localId == 1)
|
||||
{
|
||||
var = -32;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user