This commit is contained in:
root
2026-09-20 14:16:41 +02:00
parent 0798933b05
commit b6d1909d7f
56 changed files with 3752 additions and 1989 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
package sim
import (
"wh/config"
"wh/fixed"
"wh/world"
"halcyon/config"
"halcyon/fixed"
"halcyon/world"
)
// tickCtx is per-tick shared context; asteroid positions are computed lazily
@@ -81,11 +81,11 @@ func axis(v fixed.Vec, port, base uint16, conv func(fixed.F) int32) int32 {
func (b *shipBus) In(port uint16) int32 {
sh, tc := b.sh, b.tc
switch {
case port == PortTick:
case port == PortTurn:
return int32(tc.tick)
case port == PortDay:
return sat32(tc.s.Day)
case port == PortTicks:
case port == PortTurns:
return int32(tc.cfg.TicksPerDay)
case port >= PortPosX && port <= PortPosZ:
return axis(sh.Pos, port, PortPosX, kmInt)