forgot my increments!
This commit is contained in:
parent
734811bd62
commit
35980d801a
@ -1514,14 +1514,14 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
|
|||||||
[13]=0,
|
[13]=0,
|
||||||
}
|
}
|
||||||
repeat
|
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
|
for i,v in ipairs(self.opt_odds) do
|
||||||
opt[i*4-4]=rnd()<v
|
opt[i*4-4]=rnd()<v
|
||||||
end
|
end
|
||||||
repeat
|
repeat
|
||||||
f=fget(mget(cx, cy))
|
f=fget(mget(cx, cy))
|
||||||
-- bits 0x03: control mark or ship?
|
-- bits 0x03: control mark or ship?
|
||||||
local mode = f&0x03
|
mode = f&0x03
|
||||||
if mode==2 then
|
if mode==2 then
|
||||||
-- bits 0x0c: ship class
|
-- bits 0x0c: ship class
|
||||||
local ship_t = f&0x0c
|
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})
|
add(row, self.ship_bases[ship_t]:new{col=cx-ulc_cx})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
cx += 1
|
||||||
until mode==1
|
until mode==1
|
||||||
-- mode 1: end of line control mark
|
-- mode 1: end of line control mark
|
||||||
-- bits 0x18: what size flotilla is this row used for?
|
-- bits 0x18: what size flotilla is this row used for?
|
||||||
@ -1547,6 +1548,7 @@ function flotilla:load(ulc_cx, ulc_cy, lvl)
|
|||||||
end
|
end
|
||||||
add(rows, row)
|
add(rows, row)
|
||||||
end
|
end
|
||||||
|
cy += 1
|
||||||
-- control mark bit 0x04: end of flotilla
|
-- control mark bit 0x04: end of flotilla
|
||||||
until f&0x04 == 1
|
until f&0x04 == 1
|
||||||
self.rows=rows
|
self.rows=rows
|
||||||
|
Loading…
x
Reference in New Issue
Block a user