#10 Incorrect square colors

open
nobody
None
5
2009-04-04
2009-04-04
No

Hello again, sorry about my previous bug notice... I felt such a n00b afterwards -_-;
Today I downloaded the svn version and even though, in the config, VISUAL_COLOR was set to 1 (blue) the squares were white. So I did a bit of sniffing in the source and found that the offending piece of code actually had a "fixme" on it.
(the main cause is in the 'resourcepaths' initialisation, which adds files in a pretty random order, but fixing that is not so easy).
I wrote a patch for the "fixme" and it seems to be working. I included plenty of comments and feel free to remove them if you want.

Discussion

  • Jonathan Toomim

    Jonathan Toomim - 2009-04-05

    Thanks for pointing out the bug and offering a patch. The #fixme was actually referring to something else. I'm working on adapting the code so that it can accept any image set that it finds in the res/sprites/ folder, and not just the default colored_squares one we ship it with. On OS X, os.listdir(...) appears to return a list in alphabetical order, but that isn't the case on other OSes. I added a filelist.sort() at the relevant place in the code in rev 58. Does that fix the problem you mentioned?

    Jonathan

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks