MCPcopy Create free account
hub / github.com/SimHacker/micropolis / n_moore_a

Method n_moore_a

MicropolisCore/src/CellEngine/src/cellengine.cpp:1575–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1573
1574
1575void CellEngine::n_moore_a()
1576{
1577 if (rule == NULL) return;
1578
1579 // 0 1 2 3 4 5 6 7 8 9
1580 // c c' se sw ne nw e w s n
1581 // 0x1 0x2 0x4 0x8 0x10 0x20 0x40 0x80 0x100 0x200
1582
1583#define MOORE_A ( \
1584 ((nw & 1) << 5) | \
1585 ((n & 1) << 9) | \
1586 ((ne & 1) << 4) | \
1587 ((w & 1) << 7) | \
1588 ((c & 3) << 0) | \
1589 ((e & 1) << 6) | \
1590 ((sw & 1) << 3) | \
1591 ((s & 1) << 8) | \
1592 ((se & 1) << 2))
1593
1594 if (inflation) {
1595 int last = 0;
1596 int heat = 0;
1597
1598 CAM_MASKED_REG_TABLE_HEAT6_LOOP(MOORE_A)
1599 } else {
1600 CAM_MASKED_REG_TABLE_LOOP(MOORE_A)
1601 } // if
1602}
1603
1604
1605void CellEngine::n_moore_ab()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected