← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bridges into lp:widelands

 

Mhhh, We could iprove the RoadType via 4 bitflags and some inline fucntions:
 1000
 ^ Road
  ^ Bridge
   ^ Waterway
    ^ Busy

 kRoad         = 1
 kNormalRoad   = 1
 kBusyRoad     = 9
 kBridge       = 2
 kBridgeNormal = 2
 kBridgeBusy   = 10
 kWaterway     = 4    
 kNormalWaterway = 4    
 kBusyWaterway = 12
 kBusy         = 8    

This woud avoid a lot of if(this && that || soemthingElse) code?

Once this is in I would address SirVers TODO and extract some RoadDirection enum
-- 
https://code.launchpad.net/~widelands-dev/widelands/bridges/+merge/364318
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ferry.


References