Unhardcode the placement of counter numbers on the tilesheet
This commit is contained in:
parent
4cb2afcc74
commit
821bc4201f
@ -535,6 +535,12 @@ export const CC2_TILESET_LAYOUT = {
|
|||||||
|
|
||||||
logic_gate: {
|
logic_gate: {
|
||||||
__special__: 'logic-gate',
|
__special__: 'logic-gate',
|
||||||
|
counter_numbers: {
|
||||||
|
x: 0,
|
||||||
|
y: 3,
|
||||||
|
width: 0.75,
|
||||||
|
height: 1,
|
||||||
|
},
|
||||||
logic_gate_tiles: {
|
logic_gate_tiles: {
|
||||||
'latch-ccw': {
|
'latch-ccw': {
|
||||||
north: [8, 21],
|
north: [8, 21],
|
||||||
@ -1275,6 +1281,12 @@ export const LL_TILESET_LAYOUT = {
|
|||||||
'#wire-tunnel': [2, 30],
|
'#wire-tunnel': [2, 30],
|
||||||
logic_gate: {
|
logic_gate: {
|
||||||
__special__: 'logic-gate',
|
__special__: 'logic-gate',
|
||||||
|
counter_numbers: {
|
||||||
|
x: 7,
|
||||||
|
y: 1,
|
||||||
|
width: 0.75,
|
||||||
|
height: 1,
|
||||||
|
},
|
||||||
logic_gate_tiles: {
|
logic_gate_tiles: {
|
||||||
counter: [2, 31],
|
counter: [2, 31],
|
||||||
not: {
|
not: {
|
||||||
@ -2081,7 +2093,10 @@ export class Tileset {
|
|||||||
|
|
||||||
// Layer 3: counter number
|
// Layer 3: counter number
|
||||||
if (tile.gate_type === 'counter') {
|
if (tile.gate_type === 'counter') {
|
||||||
packet.blit(0, 3, tile.memory * 0.75, 0, 0.75, 1, 0.125, 0);
|
let nums = drawspec.counter_numbers;
|
||||||
|
packet.blit(
|
||||||
|
nums.x, nums.y, tile.memory * nums.width, 0,
|
||||||
|
nums.width, nums.height, (1 - nums.width) / 2, (1 - nums.height) / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user