mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-22 00:34:40 -05:00
slight var name clean-up
This commit is contained in:
@@ -501,24 +501,19 @@ void DetermineAllMonsterShadow(void)
|
||||
|
||||
u32 DetermineMonsterShadow(Entity *entity)
|
||||
{
|
||||
const Tile *mapTile;
|
||||
u32 shadowSize;
|
||||
u16 terrainFlags;
|
||||
EntityInfo *entityInfo;
|
||||
const Tile *mapTile = GetTileAtEntitySafe(entity);
|
||||
u16 terrainType = GetTerrainType(mapTile);
|
||||
EntityInfo *entityInfo = GetEntInfo(entity);
|
||||
u32 shadowSize = GetShadowSize(entityInfo->apparentID);
|
||||
|
||||
mapTile = GetTileAtEntitySafe(entity);
|
||||
terrainFlags = mapTile->terrainFlags & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||
entityInfo = GetEntInfo(entity);
|
||||
shadowSize = GetShadowSize(entityInfo->apparentID);
|
||||
|
||||
if (terrainFlags == (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY))
|
||||
if (terrainType == (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY))
|
||||
return 6;
|
||||
|
||||
if (terrainFlags == TERRAIN_TYPE_NORMAL) {
|
||||
if (terrainType == TERRAIN_TYPE_NORMAL) {
|
||||
if (IsWaterTileset())
|
||||
shadowSize = gUnknown_8106EEF[shadowSize];
|
||||
}
|
||||
else if (terrainFlags == TERRAIN_TYPE_SECONDARY && gDungeonWaterType[gDungeon->tileset] != DUNGEON_WATER_TYPE_LAVA)
|
||||
else if (terrainType == TERRAIN_TYPE_SECONDARY && gDungeonWaterType[gDungeon->tileset] != DUNGEON_WATER_TYPE_LAVA)
|
||||
shadowSize = gUnknown_8106EEF[shadowSize];
|
||||
|
||||
entityInfo->unk204 = shadowSize;
|
||||
|
||||
@@ -169,7 +169,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
const Tile *tile;
|
||||
Dungeon *dungeon;
|
||||
bool8 blinded;
|
||||
u32 terrainFlags;
|
||||
u32 terrainType;
|
||||
bool8 hallucinating;
|
||||
bool8 showItems;
|
||||
bool8 showHiddenTraps;
|
||||
@@ -210,7 +210,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
}
|
||||
|
||||
tile = GetTile(x, y);
|
||||
terrainFlags = GetTerrainType(tile);
|
||||
terrainType = GetTerrainType(tile);
|
||||
hallucinating = gDungeon->unk181e8.hallucinating;
|
||||
blinded = gDungeon->unk181e8.blinded;
|
||||
showHiddenTraps = gDungeon->unk181e8.showInvisibleTrapsMonsters;
|
||||
@@ -273,7 +273,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
if (!tileKnown) {
|
||||
mapGfxType = MAP_GFX_NOTHING;
|
||||
if (entType == ENTITY_ITEM) {
|
||||
if ((showItems || (tile->spawnOrVisibilityFlags.spawn & SPAWN_FLAG_ITEM)) && terrainFlags != TERRAIN_TYPE_WALL) {
|
||||
if ((showItems || (tile->spawnOrVisibilityFlags.spawn & SPAWN_FLAG_ITEM)) && terrainType != TERRAIN_TYPE_WALL) {
|
||||
mapGfxType = MAP_GFX_ITEM;
|
||||
}
|
||||
}
|
||||
@@ -291,14 +291,14 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
|
||||
if (lookForMapObject) {
|
||||
if (entType == ENTITY_ITEM) {
|
||||
if ((showItems || (tile->spawnOrVisibilityFlags.spawn & SPAWN_FLAG_ITEM)) && terrainFlags != TERRAIN_TYPE_WALL) {
|
||||
if ((showItems || (tile->spawnOrVisibilityFlags.spawn & SPAWN_FLAG_ITEM)) && terrainType != TERRAIN_TYPE_WALL) {
|
||||
mapGfxType = MAP_GFX_ITEM;
|
||||
lookForMapObject = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lookForMapObject) {
|
||||
if (terrainFlags != TERRAIN_TYPE_NORMAL) {
|
||||
if (terrainType != TERRAIN_TYPE_NORMAL) {
|
||||
mapGfxType = MAP_GFX_NOTHING;
|
||||
lookForMapObject = FALSE;
|
||||
}
|
||||
@@ -340,7 +340,7 @@ void DrawMinimapTile(s32 x, s32 y)
|
||||
if (!tileKnown) {
|
||||
mapGfxType = 1;
|
||||
}
|
||||
else if (terrainFlags != TERRAIN_TYPE_NORMAL) {
|
||||
else if (terrainType != TERRAIN_TYPE_NORMAL) {
|
||||
mapGfxType = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1453,13 +1453,13 @@ static bool8 sub_806A5A4(s16 r0)
|
||||
|
||||
void sub_806A5B8(Entity *entity)
|
||||
{
|
||||
s32 terrainFlags;
|
||||
s32 terrainType;
|
||||
|
||||
if (!EntityIsValid(entity))
|
||||
return;
|
||||
|
||||
terrainFlags = GetTerrainType(GetTileAtEntitySafe(entity));
|
||||
if (terrainFlags == TERRAIN_TYPE_SECONDARY) {
|
||||
terrainType = GetTerrainType(GetTileAtEntitySafe(entity));
|
||||
if (terrainType == TERRAIN_TYPE_SECONDARY) {
|
||||
EntityInfo *info = GetEntInfo(entity);
|
||||
// If lava - defrost and burn
|
||||
if (gDungeonWaterType[gDungeon->tileset] == DUNGEON_WATER_TYPE_LAVA) {
|
||||
@@ -1482,7 +1482,7 @@ void sub_806A5B8(Entity *entity)
|
||||
}
|
||||
}
|
||||
// If wall - decrement belly by 5
|
||||
else if (terrainFlags == TERRAIN_TYPE_WALL) {
|
||||
else if (terrainType == TERRAIN_TYPE_WALL) {
|
||||
const u8 *str;
|
||||
EntityInfo *info = GetEntInfo(entity);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user