CruiserOne / Daedalus

The Maze generation software "Daedalus", version 3.4
http://www.astrolog.org/labyrnth/daedalus.htm
Other
53 stars 7 forks source link

Inverting pixel colors appears to only effect a few pixels #2

Closed stupid-genius closed 4 years ago

stupid-genius commented 4 years ago

Running the following command on Ubuntu: ./daedalus 'cr Size 200 100 0 0 P cDel Delay 1000 SaveBitmap "newmaze.bmp"'

It looks like only a few of the pixels are getting inverted. I thought perhaps the script was proceeding to the SaveBitmap instruction too soon, so I added a Delay, but that didn't seem to help. Possible bug, or am I doing something wrong?

newmaze

CruiserOne commented 4 years ago

I can reproduce this problem too (with Unix g++ compiler only) in which monochrome reverse only inverts the first 32 pixels in the bitmap instead of the whole thing. Daedalus runs synchronously in almost all cases (except Windows sound playing) so the Delay operation is unnecessary and won't affect anything. To fix this, in graphics.cpp line 1560 (in CMon::BitmapReverse()) append a "u" to the end of the line, i.e. change "~0;" to "~0u;".

stupid-genius commented 4 years ago

Success! Thanks! I'm going to put up a fork with all the necessary changes to run on Linux.