fix typo
This commit is contained in:
parent
3a4bd50665
commit
ff2e248e40
|
@ -91,7 +91,7 @@ namespace Otc
|
||||||
DatLight,
|
DatLight,
|
||||||
DatDontHide,
|
DatDontHide,
|
||||||
DatTranslucent,
|
DatTranslucent,
|
||||||
DatDisplacment,
|
DatDisplacement,
|
||||||
DatElevation,
|
DatElevation,
|
||||||
DatLyingCorpse,
|
DatLyingCorpse,
|
||||||
DatAnimateAlways,
|
DatAnimateAlways,
|
||||||
|
|
|
@ -60,8 +60,8 @@ void Thing::internalDraw(int x, int y, int layers, Otc::SpriteMask mask)
|
||||||
|
|
||||||
TexturePtr spriteTex = g_sprites.getSpriteTexture(spriteId, mask);
|
TexturePtr spriteTex = g_sprites.getSpriteTexture(spriteId, mask);
|
||||||
|
|
||||||
Rect drawRect((x - xi*32) - type.xDisplacment,
|
Rect drawRect((x - xi*32) - type.xDisplacement,
|
||||||
(y - yi*32) - type.yDisplacment,
|
(y - yi*32) - type.yDisplacement,
|
||||||
32, 32);
|
32, 32);
|
||||||
g_graphics.drawTexturedRect(drawRect, spriteTex);
|
g_graphics.drawTexturedRect(drawRect, spriteTex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,9 +159,9 @@ void ThingsType::parseThingType(std::stringstream& fin, ThingType& thingType)
|
||||||
case Otc::DatTranslucent: // Grounds that are translucent
|
case Otc::DatTranslucent: // Grounds that are translucent
|
||||||
thingType.isTranslucent = true;
|
thingType.isTranslucent = true;
|
||||||
break;
|
break;
|
||||||
case Otc::DatDisplacment: // Must shift draw
|
case Otc::DatDisplacement: // Must shift draw
|
||||||
thingType.xDisplacment = Fw::getU16(fin);
|
thingType.xDisplacement = Fw::getU16(fin);
|
||||||
thingType.yDisplacment = Fw::getU16(fin);
|
thingType.yDisplacement = Fw::getU16(fin);
|
||||||
break;
|
break;
|
||||||
case Otc::DatElevation: // Must elevate draw
|
case Otc::DatElevation: // Must elevate draw
|
||||||
thingType.elevation = Fw::getU16(fin);
|
thingType.elevation = Fw::getU16(fin);
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct ThingType
|
||||||
exactSize = 0;
|
exactSize = 0;
|
||||||
xPattern = yPattern = zPattern = 0;
|
xPattern = yPattern = zPattern = 0;
|
||||||
animationPhases = 0;
|
animationPhases = 0;
|
||||||
xDisplacment = yDisplacment = 0;
|
xDisplacement = yDisplacement = 0;
|
||||||
elevation = 0;
|
elevation = 0;
|
||||||
|
|
||||||
isGround = false;
|
isGround = false;
|
||||||
|
@ -83,7 +83,7 @@ struct ThingType
|
||||||
uint8 exactSize;
|
uint8 exactSize;
|
||||||
uint8 xPattern, yPattern, zPattern;
|
uint8 xPattern, yPattern, zPattern;
|
||||||
uint8 animationPhases;
|
uint8 animationPhases;
|
||||||
uint16 xDisplacment, yDisplacment;
|
uint16 xDisplacement, yDisplacement;
|
||||||
uint16 elevation;
|
uint16 elevation;
|
||||||
std::vector<int> sprites;
|
std::vector<int> sprites;
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ void Tile::draw(int x, int y)
|
||||||
for(int yi = -1; yi <= 1; ++yi) {
|
for(int yi = -1; yi <= 1; ++yi) {
|
||||||
for(CreaturePtr creature : g_map.getTile(m_position + Position(xi, yi, 0))->getCreatures()) {
|
for(CreaturePtr creature : g_map.getTile(m_position + Position(xi, yi, 0))->getCreatures()) {
|
||||||
auto& type = creature->getType();
|
auto& type = creature->getType();
|
||||||
Rect creatureRect(x + xi*32 + creature->getWalkOffsetX() - type.xDisplacment, y + yi*32 + creature->getWalkOffsetY() - type.yDisplacment, 32, 32);
|
Rect creatureRect(x + xi*32 + creature->getWalkOffsetX() - type.xDisplacement, y + yi*32 + creature->getWalkOffsetY() - type.yDisplacement, 32, 32);
|
||||||
Rect thisTileRect(x, y, 32, 32);
|
Rect thisTileRect(x, y, 32, 32);
|
||||||
|
|
||||||
// only render creatures where bottom right is inside our rect
|
// only render creatures where bottom right is inside our rect
|
||||||
|
|
Loading…
Reference in New Issue