fix function names to match pret

This commit is contained in:
ghoulslash 2022-08-04 19:38:54 -04:00
parent c7c7a76608
commit a5773a41a8

View File

@ -664,7 +664,7 @@ static bool8 DexNavPickTile(u8 environment, u8 areaX, u8 areaY, bool8 smallScan)
{ {
if (currMapType == MAP_TYPE_UNDERGROUND) if (currMapType == MAP_TYPE_UNDERGROUND)
{ // inside (cave) { // inside (cave)
if (IsZCoordMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) if (IsElevationMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY))
break; //occurs at same z coord break; //occurs at same z coord
scale = 440 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2) - (2 * (topX + topY)); scale = 440 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2) - (2 * (topX + topY));
@ -681,7 +681,7 @@ static bool8 DexNavPickTile(u8 environment, u8 areaX, u8 areaY, bool8 smallScan)
if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehaviour)) if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehaviour))
{ {
u8 scale = 320 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2); u8 scale = 320 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2);
if (IsZCoordMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) if (IsElevationMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY))
break; break;
weight = (Random() % scale <= 1) && !MapGridIsImpassableAt(topX, topY); weight = (Random() % scale <= 1) && !MapGridIsImpassableAt(topX, topY);
@ -1341,8 +1341,8 @@ static u16 DexNavGenerateHeldItem(u16 species, u8 searchLevel)
{ {
u16 randVal = Random() % 100; u16 randVal = Random() % 100;
u8 searchLevelInfluence = searchLevel >> 1; u8 searchLevelInfluence = searchLevel >> 1;
u16 item1 = gBaseStats[species].item1; u16 item1 = gBaseStats[species].itemCommon;
u16 item2 = gBaseStats[species].item2; u16 item2 = gBaseStats[species].itemRare;
// if both are the same, 100% to hold // if both are the same, 100% to hold
if (item1 == item2) if (item1 == item2)