Fixage. Runs with 34.01

develop
Petr Mrázek 2012-02-15 21:35:44 +01:00
parent 448e270421
commit 1bf5080828
5 changed files with 12 additions and 11 deletions

@ -145,7 +145,7 @@ bool Maps::ReadBlock40d(uint32_t x, uint32_t y, uint32_t z, mapblock40d * buffer
buffer->local_feature = block->local_feature; buffer->local_feature = block->local_feature;
buffer->mystery = block->unk2; buffer->mystery = block->unk2;
buffer->origin = block; buffer->origin = block;
buffer->blockflags.whole = block->flags.as_int(); buffer->blockflags.whole = block->flags.whole;
return true; return true;
} }
return false; return false;
@ -185,7 +185,7 @@ bool Maps::ReadDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool &dirtybit)
df::map_block *block = getBlock(x,y,z); df::map_block *block = getBlock(x,y,z);
if (block) if (block)
{ {
dirtybit = block->flags.is_set(block_flags::Designated); dirtybit = block->flags.bits.designated;
return true; return true;
} }
return false; return false;
@ -196,7 +196,7 @@ bool Maps::WriteDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool dirtybit)
df::map_block *block = getBlock(x,y,z); df::map_block *block = getBlock(x,y,z);
if (block) if (block)
{ {
block->flags.set(block_flags::Designated, dirtybit); block->flags.bits.designated = true;
return true; return true;
} }
return false; return false;
@ -211,7 +211,7 @@ bool Maps::ReadBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags &bloc
df::map_block *block = getBlock(x,y,z); df::map_block *block = getBlock(x,y,z);
if (block) if (block)
{ {
blockflags.whole = block->flags.as_int(); blockflags.whole = block->flags.whole;
return true; return true;
} }
return false; return false;
@ -222,7 +222,8 @@ bool Maps::WriteBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags bloc
df::map_block *block = getBlock(x,y,z); df::map_block *block = getBlock(x,y,z);
if (block) if (block)
{ {
return (block->flags = blockflags.whole); block->flags.whole = blockflags.whole;
return true;
} }
return false; return false;
} }

@ -1 +1 @@
Subproject commit 6696efc85f55a6cc32161a247d5a1ca6c15344d2 Subproject commit bfc15c2083e525cb1f7a9dae6d0594c6bbcaff63

@ -27,11 +27,11 @@ command_result df_flows (Core * c, vector <string> & parameters)
for (size_t i = 0; i < world->map.map_blocks.size(); i++) for (size_t i = 0; i < world->map.map_blocks.size(); i++)
{ {
df::map_block *cur = world->map.map_blocks[i]; df::map_block *cur = world->map.map_blocks[i];
if (cur->flags.is_set(block_flags::UpdateLiquid)) if (cur->flags.bits.update_liquid)
flow1++; flow1++;
if (cur->flags.is_set(block_flags::UpdateLiquidTwice)) if (cur->flags.bits.update_liquid_twice)
flow2++; flow2++;
if (cur->flags.is_set(block_flags::UpdateLiquid) && cur->flags.is_set(block_flags::UpdateLiquidTwice)) if (cur->flags.bits.update_liquid && cur->flags.bits.update_liquid_twice)
flowboth++; flowboth++;
for (int x = 0; x < 16; x++) for (int x = 0; x < 16; x++)
{ {

@ -127,7 +127,7 @@ command_result df_getplants (Core * c, vector <string> & parameters)
} }
} }
if (dirty) if (dirty)
cur->flags.set(block_flags::Designated); cur->flags.bits.designated = true;
} }
if (count) if (count)
c->con.print("Updated %d plant designations.\n", count); c->con.print("Updated %d plant designations.\n", count);

@ -773,7 +773,7 @@ bool stamp_pattern (uint32_t bx, uint32_t by, int z_level,
} }
} }
} }
bl->flags.set(block_flags::Designated); bl->flags.bits.designated = true;
return true; return true;
}; };