void Map::RenderGlyphAtLocation(char glyph, const IntVector2& loc, const RGBA& col) { IntVector2 numTilesOnScreen = GetSize(); Vector2 cellSize = Vector2(SCREEN_SIZE.x / (float)numTilesOnScreen.x, SCREEN_SIZE.y / (float)numTilesOnScreen.y); Vector2 positionToDrawFrom = loc.ToVector2() * cellSize; Vector2 positionToDrawTo = positionToDrawFrom + cellSize; String glyphStr = ""; glyphStr.push_back(glyph); float lineHeight = abs((positionToDrawFrom.y - positionToDrawTo.y) * 0.75f); g_theUI->m_squirrelFont->DrawText2D(positionToDrawFrom, glyphStr, lineHeight, col); }
bool XMLElement::SetIntVector2(const ea::string& name, const IntVector2& value) { return SetAttribute(name, value.ToString()); }
IntVector2 Deserializer::ReadIntVector2() { IntVector2 ret; Read((void*)ret.Data(), sizeof ret); return ret; }
void JSONValue::AddIntVector2(const IntVector2& value) { AddString(value.ToString()); }
void JSONValue::SetIntVector2(const String& name, const IntVector2& value) { SetString(name, value.ToString()); }