This commit is contained in:
Miodrag Milanovic 2019-10-12 13:47:01 +02:00
parent 4b79050ef4
commit 74da9cc424
2 changed files with 32 additions and 1 deletions

View File

@ -798,8 +798,28 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
el.x1 = x + switchbox_x2;
el.y1 = el.y2;
ret.push_back(el);
}
if (tilewire >= TILE_WIRE_WD3 && tilewire <=TILE_WIRE_WD0)
{
GraphicElement el;
int part = (tilewire - TILE_WIRE_WD3) % 4;
int group = (tilewire - TILE_WIRE_WD3) / 2;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + slice_x2 + 0.005f;
el.x2 = x + slice_x2 + 0.005f + 0.0017f *(4 - part);
el.y1 = y + slice_y2 - 0.0017f * (TILE_WIRE_WDO3C_SLICE - TILE_WIRE_DUMMY_100 + 1 + part) + 3*slice_pitch;
el.y2 = el.y1;
ret.push_back(el);
el.x1 = el.x2;
el.y2 = y + slice_y2 - 0.0017f * (TILE_WIRE_WD1B_SLICE - TILE_WIRE_DUMMY_100 + 1 + (part & 1)) + (3-group)*slice_pitch;
ret.push_back(el);
el.x1 = x + slice_x2 + 0.005f;
el.y1 = el.y2;
ret.push_back(el);
}
}
if (decal.type == DecalId::TYPE_BEL) {
BelId bel;

View File

@ -377,6 +377,17 @@ enum GfxTileWireId
TILE_WIRE_Q1,
TILE_WIRE_Q0,
TILE_WIRE_F0,
TILE_WIRE_WD3,
TILE_WIRE_WD2,
TILE_WIRE_WD1,
TILE_WIRE_WD0,
TILE_WIRE_WAD3,
TILE_WIRE_WAD2,
TILE_WIRE_WAD1,
TILE_WIRE_WAD0
};
NEXTPNR_NAMESPACE_END