On Tue, 23 Apr 2013 06:02:33 PM Thue Janus Kristensen wrote: > When I start a new game, MENUS debugging is not enabled. But if I save the > game and load it again, MENUS debugging is enabled. That is caused by the > following code in FreeColDebugger.java : setDebugModes(), which is called > from readGame() : > > if (optionValue == null || "".equals(optionValue)) { > enableDebugMode(DebugMode.MENUS); > return true; > } > > This seems very strange to me - why do this?
The representation of the debug mode has changed from a simple boolean, to a number, to the present bitmap. This has lead to some confusing code. The above is correct in effect at least with respect to the place in FreeCol.java where it is called if the --debug option is set --- the intent is that empty option values default to the MENUS functionality, which is the closest match to the default behaviour back when debug mode was just a boolean. However as you rightly point out, this does not make sense for the other place setDebugModes is called, in readGame. My mistake. Fixed in git.200510c. Cheers, Mike Pope
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers