display horizontal wires, add some globals to list
This commit is contained in:
parent
0d2ae5cc9d
commit
d1feb2aa2d
@ -1305,3 +1305,5 @@ X(WIRE_TYPE_V00)
|
||||
X(WIRE_TYPE_V01)
|
||||
X(WIRE_TYPE_V02)
|
||||
X(WIRE_TYPE_V06)
|
||||
|
||||
X(WIRE_TYPE_G_HPBX)
|
51
ecp5/gfx.cc
51
ecp5/gfx.cc
@ -127,7 +127,56 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, IdString wire_typ
|
||||
el.x2 = x + switchbox_x1;
|
||||
}
|
||||
g.push_back(el);
|
||||
}
|
||||
}
|
||||
if (wire_type == id_WIRE_TYPE_H02) {
|
||||
GraphicElement el;
|
||||
el.type = GraphicElement::TYPE_LINE;
|
||||
el.style = style;
|
||||
el.x1 = x + switchbox_x1 + 0.0017f*(16 + (tilewire - TILE_WIRE_H02W0701)+ 20 *(x%3));
|
||||
el.x2 = el.x1;
|
||||
el.y1 = y + switchbox_y1;
|
||||
el.y2 = y + switchbox_y1 - 0.0017f*(20 + (tilewire - TILE_WIRE_H02W0701)+ 20 *(x%3));
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+2) + switchbox_x1 + 0.0017f*(16 + (tilewire - TILE_WIRE_H02W0701)+ 20 *(x%3));
|
||||
el.y1 = el.y2;
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+1) + switchbox_x1 + 0.0017f*(16 + (tilewire - TILE_WIRE_H02W0701)+ 20 *(x%3));
|
||||
el.x1 = el.x2;
|
||||
el.y1 = y + switchbox_y1;
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+2) + switchbox_x1 + 0.0017f*(16 + (tilewire - TILE_WIRE_H02W0701)+ 20 *(x%3));
|
||||
el.x1 = el.x2;
|
||||
el.y1 = y + switchbox_y1;
|
||||
g.push_back(el);
|
||||
}
|
||||
if (wire_type == id_WIRE_TYPE_H06) {
|
||||
GraphicElement el;
|
||||
el.type = GraphicElement::TYPE_LINE;
|
||||
el.style = style;
|
||||
el.x1 = x + switchbox_x1 + 0.0017f*(96 + (tilewire - TILE_WIRE_H06W0303)+ 20 *(x%3));
|
||||
el.x2 = el.x1;
|
||||
el.y1 = y + switchbox_y1;
|
||||
el.y2 = y + switchbox_y1 - 0.0017f*(96 + (tilewire - TILE_WIRE_H06W0303)+ 20 *(x%3));
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+6) + switchbox_x1 + 0.0017f*(96 + (tilewire - TILE_WIRE_H06W0303)+ 20 *(x%3));
|
||||
el.y1 = el.y2;
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+3) + switchbox_x1 + 0.0017f*(96 + (tilewire - TILE_WIRE_H06W0303)+ 20 *(x%3));
|
||||
el.x1 = el.x2;
|
||||
el.y1 = y + switchbox_y1;
|
||||
g.push_back(el);
|
||||
|
||||
el.x2 = (x+6) + switchbox_x1 + 0.0017f*(96 + (tilewire - TILE_WIRE_H06W0303)+ 20 *(x%3));
|
||||
el.x1 = el.x2;
|
||||
el.y1 = y + switchbox_y1;
|
||||
g.push_back(el);
|
||||
}
|
||||
|
||||
if (wire_type == id_WIRE_TYPE_NONE) {
|
||||
if (tilewire >= TILE_WIRE_NBOUNCE && tilewire <=TILE_WIRE_SBOUNCE)
|
||||
{
|
||||
|
68
ecp5/gfx.h
68
ecp5/gfx.h
@ -365,6 +365,74 @@ enum GfxTileWireId
|
||||
TILE_WIRE_WBOUNCE,
|
||||
TILE_WIRE_EBOUNCE,
|
||||
|
||||
TILE_WIRE_V02N0701,
|
||||
TILE_WIRE_V02S0701,
|
||||
TILE_WIRE_V02N0601,
|
||||
TILE_WIRE_V02S0601,
|
||||
TILE_WIRE_V02N0501,
|
||||
TILE_WIRE_V02S0501,
|
||||
TILE_WIRE_V02N0401,
|
||||
TILE_WIRE_V02S0401,
|
||||
TILE_WIRE_V02N0301,
|
||||
TILE_WIRE_V02S0301,
|
||||
TILE_WIRE_V02N0201,
|
||||
TILE_WIRE_V02S0201,
|
||||
TILE_WIRE_V02N0101,
|
||||
TILE_WIRE_V02S0101,
|
||||
TILE_WIRE_V02N0001,
|
||||
TILE_WIRE_V02S0001,
|
||||
|
||||
TILE_WIRE_V06N0303,
|
||||
TILE_WIRE_V06S0303,
|
||||
TILE_WIRE_V06N0203,
|
||||
TILE_WIRE_V06S0203,
|
||||
TILE_WIRE_V06N0103,
|
||||
TILE_WIRE_V06S0103,
|
||||
TILE_WIRE_V06N0003,
|
||||
TILE_WIRE_V06S0003,
|
||||
|
||||
TILE_WIRE_H02W0701,
|
||||
TILE_WIRE_H02E0701,
|
||||
TILE_WIRE_H02W0601,
|
||||
TILE_WIRE_H02E0601,
|
||||
TILE_WIRE_H02W0501,
|
||||
TILE_WIRE_H02E0501,
|
||||
TILE_WIRE_H02W0401,
|
||||
TILE_WIRE_H02E0401,
|
||||
TILE_WIRE_H02W0301,
|
||||
TILE_WIRE_H02E0301,
|
||||
TILE_WIRE_H02W0201,
|
||||
TILE_WIRE_H02E0201,
|
||||
TILE_WIRE_H02W0101,
|
||||
TILE_WIRE_H02E0101,
|
||||
TILE_WIRE_H02W0001,
|
||||
TILE_WIRE_H02E0001,
|
||||
|
||||
TILE_WIRE_H06W0303,
|
||||
TILE_WIRE_H06E0303,
|
||||
TILE_WIRE_H06W0203,
|
||||
TILE_WIRE_H06E0203,
|
||||
TILE_WIRE_H06W0103,
|
||||
TILE_WIRE_H06E0103,
|
||||
TILE_WIRE_H06W0003,
|
||||
TILE_WIRE_H06E0003,
|
||||
|
||||
TILE_WIRE_G_HPBX0000,
|
||||
TILE_WIRE_G_HPBX0100,
|
||||
TILE_WIRE_G_HPBX0200,
|
||||
TILE_WIRE_G_HPBX0300,
|
||||
TILE_WIRE_G_HPBX0400,
|
||||
TILE_WIRE_G_HPBX0500,
|
||||
TILE_WIRE_G_HPBX0600,
|
||||
TILE_WIRE_G_HPBX0700,
|
||||
TILE_WIRE_G_HPBX0800,
|
||||
TILE_WIRE_G_HPBX0900,
|
||||
TILE_WIRE_G_HPBX1000,
|
||||
TILE_WIRE_G_HPBX1100,
|
||||
TILE_WIRE_G_HPBX1200,
|
||||
TILE_WIRE_G_HPBX1300,
|
||||
TILE_WIRE_G_HPBX1400,
|
||||
TILE_WIRE_G_HPBX1500,
|
||||
};
|
||||
|
||||
void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, IdString wire_type, GfxTileWireId tilewire, GraphicElement::style_t style);
|
||||
|
@ -80,6 +80,9 @@ def wire_type(name):
|
||||
if name[0].startswith("V06"):
|
||||
return "WIRE_TYPE_V06"
|
||||
|
||||
if name[0].startswith("G_HPBX"):
|
||||
return "WIRE_TYPE_G_HPBX"
|
||||
|
||||
return "WIRE_TYPE_NONE"
|
||||
|
||||
def is_global(loc):
|
||||
|
Loading…
Reference in New Issue
Block a user