forgot my increments!

This commit is contained in:
Kistaro Windrider 2025-05-31 21:40:17 -07:00
parent 734811bd62
commit 35980d801a
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -1514,14 +1514,14 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
[13]=0,
}
repeat
local row,cx,opt,f = {},ulc_cx,{},0
local row,cx,opt,f,mode= {},ulc_cx,{},0,0
for i,v in ipairs(self.opt_odds) do
opt[i*4-4]=rnd()<v
end
repeat
f=fget(mget(cx, cy))
-- bits 0x03: control mark or ship?
local mode = f&0x03
mode = f&0x03
if mode==2 then
-- bits 0x0c: ship class
local ship_t = f&0x0c
@ -1536,6 +1536,7 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
add(row, self.ship_bases[ship_t]:new{col=cx-ulc_cx})
end
end
cx += 1
until mode==1
-- mode 1: end of line control mark
-- bits 0x18: what size flotilla is this row used for?
@ -1547,6 +1548,7 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
end
add(rows, row)
end
cy += 1
-- control mark bit 0x04: end of flotilla
until f&0x04 == 1
self.rows=rows