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

Method tryOther

MicropolisCore/src/MicropolisEngine/src/sprite.cpp:426–446  ·  view source on GitHub ↗

??? * @todo Figure out what this function is doing. * @todo Remove local magic constants and document the code. */

Source from the content-addressed store, hash-verified

424 * @todo Remove local magic constants and document the code.
425 */
426bool Micropolis::tryOther(int Tpoo, int Told, int Tnew)
427{
428 short z;
429
430 z = Told + 4;
431
432 if (z > 8) {
433 z -= 8;
434 }
435
436 if (Tnew != z) {
437 return false;
438 }
439
440 if (Tpoo == POWERBASE || Tpoo == POWERBASE + 1
441 || Tpoo == RAILBASE || Tpoo == RAILBASE + 1) {
442 return true;
443 }
444
445 return false;
446}
447
448
449/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected