spring: develop 4db90fb2 | [ Diff ] [ Back to Repository ] | |||
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
lhog | lhog | develop | 2016-05-15 23:58:17 | develop 40c00139 |
Changeset | Added UnitDef's yardmap optional extention called mask, essentially a 16 bit value, that can be presented either in HEX, DEC or BIN form. yardmap values and mask are split using # sign. See example: yardMap = [[ooooooooo#1]], By setting mask value in UnitDefs and on map (using new Spring.SetBuildingMaskData synced control function) a mod/map author can mark down which structures (via UnitDef) could be placed on which squares of map (set in SQUARE_SIZE coordinate space) and effectively block any other structure with mask, different than defined for a square from being constructed on that square. By default both UnitDef's mask and map squares mask are set to 0, so everything is buildable everythere (other things like terrain steepness, water, enemy units, other buildings. etc. can still block construction as before) Changes to be committed: modified: rts/Game/Game.cpp modified: rts/Game/GameHelper.cpp modified: rts/Game/GameHelper.h modified: rts/Lua/LuaSyncedCtrl.cpp modified: rts/Lua/LuaSyncedCtrl.h modified: rts/Sim/CMakeLists.txt new file: rts/Sim/Misc/BuildingMaskMap.cpp new file: rts/Sim/Misc/BuildingMaskMap.h modified: rts/Sim/Units/UnitDef.cpp modified: rts/Sim/Units/UnitDef.h |
|||
mod - rts/Game/Game.cpp | [ Diff ] [ File ] | |||
mod - rts/Game/GameHelper.cpp | [ Diff ] [ File ] | |||
mod - rts/Game/GameHelper.h | [ Diff ] [ File ] | |||
mod - rts/Lua/LuaSyncedCtrl.cpp | [ Diff ] [ File ] | |||
mod - rts/Lua/LuaSyncedCtrl.h | [ Diff ] [ File ] | |||
mod - rts/Sim/CMakeLists.txt | [ Diff ] [ File ] | |||
add - rts/Sim/Misc/BuildingMaskMap.cpp | [ Diff ] [ File ] | |||
add - rts/Sim/Misc/BuildingMaskMap.h | [ Diff ] [ File ] | |||
mod - rts/Sim/Units/UnitDef.cpp | [ Diff ] [ File ] | |||
mod - rts/Sim/Units/UnitDef.h | [ Diff ] [ File ] |