more wires between switchboxes

This commit is contained in:
Miodrag Milanovic 2019-10-12 19:07:54 +02:00
parent 4cbdc388b8
commit 8c79044d43
4 changed files with 59 additions and 2 deletions

View File

@ -677,13 +677,49 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + switchbox_x1 + 0.005f + 0.0017f * (tilewire - TILE_WIRE_V01N0001);
el.x1 = x + switchbox_x1 + 0.0017f*4 + 0.0017f * (tilewire - TILE_WIRE_V01N0001);
el.x2 = el.x1;
el.y1 = y + switchbox_y1;
el.y2 = y + switchbox_y2 - 1;
ret.push_back(el);
}
}
if (wire_type == id_WIRE_TYPE_H01) {
if (tilewire >= TILE_WIRE_H01E0001 && tilewire <=TILE_WIRE_H01W0100)
//if (tilewire >= TILE_WIRE_H01E0000 && tilewire <=TILE_WIRE_H01W0101) // not existing in trellis
{
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + switchbox_x1;
el.x2 = x + switchbox_x2 - 1;
el.y1 = y + switchbox_y1 + 0.0017f*12 - 0.0017f * (tilewire - TILE_WIRE_H01E0001);
el.y2 = el.y1;
ret.push_back(el);
}
}
if (wire_type == id_WIRE_TYPE_HFI) {
// only TILE_WIRE_HFIE0000
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + switchbox_x1;
el.x2 = x + switchbox_x2 - 1;
el.y1 = y + switchbox_y1 + 0.0017f*1;
el.y2 = el.y1;
ret.push_back(el);
}
if (wire_type == id_WIRE_TYPE_HL7) {
// only TILE_WIRE_HL7W0001
GraphicElement el;
el.type = GraphicElement::TYPE_LINE;
el.style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_INACTIVE;
el.x1 = x + switchbox_x2 - 1;
el.x2 = x + switchbox_x1;
el.y1 = y + switchbox_y1 + 0.0017f*20;
el.y2 = el.y1;
ret.push_back(el);
}
if (wire_type == id_WIRE_TYPE_NONE) {
if (tilewire >= TILE_WIRE_FCO && tilewire <=TILE_WIRE_FCI)
{

View File

@ -1305,3 +1305,5 @@ X(WIRE_TYPE_V00)
X(WIRE_TYPE_V01)
X(WIRE_TYPE_V02)
X(WIRE_TYPE_V06)
X(WIRE_TYPE_HFI)
X(WIRE_TYPE_HL7)

View File

@ -400,6 +400,16 @@ enum GfxTileWireId
TILE_WIRE_V01S0000,
TILE_WIRE_V01S0100,
TILE_WIRE_H01E0001,
TILE_WIRE_H01E0101,
TILE_WIRE_H01W0000,
TILE_WIRE_H01W0100,
TILE_WIRE_H01E0000,
TILE_WIRE_H01E0100,
TILE_WIRE_H01W0001,
TILE_WIRE_H01W0101,
TILE_WIRE_V00T0000,
TILE_WIRE_V00T0100,
@ -415,7 +425,10 @@ enum GfxTileWireId
TILE_WIRE_NBOUNCE,
TILE_WIRE_SBOUNCE,
TILE_WIRE_WBOUNCE,
TILE_WIRE_EBOUNCE
TILE_WIRE_EBOUNCE,
TILE_WIRE_HFIE0000,
TILE_WIRE_HL7W0001
};

View File

@ -74,6 +74,12 @@ def wire_type(name):
if name[0].startswith("V06"):
return "WIRE_TYPE_V06"
if name[0].startswith("HFI"):
return "WIRE_TYPE_HFI"
if name[0].startswith("HL7"):
return "WIRE_TYPE_HL7"
return "WIRE_TYPE_NONE"
def is_global(loc):