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

Method n_eco

MicropolisCore/src/CellEngine/src/cellengine.cpp:1979–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1977
1978
1979void CellEngine::n_eco()
1980{
1981 long sum;
1982
1983#define ANTILIFE ( \
1984 ((sum = SUM8REG(1)), \
1985 (((c&1) ? (sum != 5) : (((sum != 5) && (sum != 6)) ? 1 : 0)) | \
1986 ((c&0x7f) << 1))))
1987
1988#define ECO ( \
1989 ((((sum = (SUM9REG(128) >> 7)) > 5) || (sum == 4)) \
1990 ? ((ANTILIFE & 127) | 128) \
1991 : (BRAIN & 127)))
1992
1993 if (inflation) {
1994 int last = 0;
1995 int heat = 0;
1996
1997 CAM_MASKED_REG_HEAT4_LOOP(ECO)
1998 } else {
1999 CAM_MASKED_REG_LOOP(ECO)
2000 }
2001}
2002
2003
2004void CellEngine::n_torben()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected