Add some missing trainer hill constant usage
This commit is contained in:
@@ -1324,7 +1324,7 @@ u8 Unref_TryInitLocalObjectEvent(u8 localId)
|
|||||||
if (InBattlePyramid())
|
if (InBattlePyramid())
|
||||||
objectEventCount = GetNumBattlePyramidObjectEvents();
|
objectEventCount = GetNumBattlePyramidObjectEvents();
|
||||||
else if (InTrainerHill())
|
else if (InTrainerHill())
|
||||||
objectEventCount = 2;
|
objectEventCount = HILL_TRAINERS_PER_FLOOR;
|
||||||
else
|
else
|
||||||
objectEventCount = gMapHeader.events->objectEventCount;
|
objectEventCount = gMapHeader.events->objectEventCount;
|
||||||
|
|
||||||
@@ -1640,7 +1640,7 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY)
|
|||||||
if (InBattlePyramid())
|
if (InBattlePyramid())
|
||||||
objectCount = GetNumBattlePyramidObjectEvents();
|
objectCount = GetNumBattlePyramidObjectEvents();
|
||||||
else if (InTrainerHill())
|
else if (InTrainerHill())
|
||||||
objectCount = 2;
|
objectCount = HILL_TRAINERS_PER_FLOOR;
|
||||||
else
|
else
|
||||||
objectCount = gMapHeader.events->objectEventCount;
|
objectCount = gMapHeader.events->objectEventCount;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -650,7 +650,7 @@ void LoadTrainerHillObjectEventTemplates(void)
|
|||||||
eventTemplates[i].localId = i + 1;
|
eventTemplates[i].localId = i + 1;
|
||||||
eventTemplates[i].graphicsId = FacilityClassToGraphicsId(sHillData->floors[floorId].trainers[i].facilityClass);
|
eventTemplates[i].graphicsId = FacilityClassToGraphicsId(sHillData->floors[floorId].trainers[i].facilityClass);
|
||||||
eventTemplates[i].x = sHillData->floors[floorId].map.trainerCoords[i] & 0xF;
|
eventTemplates[i].x = sHillData->floors[floorId].map.trainerCoords[i] & 0xF;
|
||||||
eventTemplates[i].y = ((sHillData->floors[floorId].map.trainerCoords[i] >> 4) & 0xF) + 5;
|
eventTemplates[i].y = ((sHillData->floors[floorId].map.trainerCoords[i] >> 4) & 0xF) + HILL_FLOOR_HEIGHT_MARGIN;
|
||||||
bits = i << 2;
|
bits = i << 2;
|
||||||
eventTemplates[i].movementType = ((sHillData->floors[floorId].map.trainerDirections >> bits) & 0xF) + MOVEMENT_TYPE_FACE_UP;
|
eventTemplates[i].movementType = ((sHillData->floors[floorId].map.trainerDirections >> bits) & 0xF) + MOVEMENT_TYPE_FACE_UP;
|
||||||
eventTemplates[i].trainerRange_berryTreeId = (sHillData->floors[floorId].map.trainerRanges >> bits) & 0xF;
|
eventTemplates[i].trainerRange_berryTreeId = (sHillData->floors[floorId].map.trainerRanges >> bits) & 0xF;
|
||||||
|
|||||||
Reference in New Issue
Block a user