Fog screwy
client reported:
http://www.rpgobjects.com/forum/index.php?action=vthread&forum=1&topic=695&page=0#msg9097
The fog layer is screwy. The following errors pop up when using it.
When clicking on fog mask I get following error.
File "/Users/paul/openrpg_dev/orpg/mapper/fog_handler.py", line 124, in on_color
data.SetColour(self.canvas.layers['fog'].color)
AttributeError: fog_layer instance has no attribute 'color'
When Clicking hide all the I get the following error.
File "/Users/paul/openrpg_dev/orpg/mapper/map.py", line 284, in on_paint
self.layers['fog'].layerDraw(dc, topleft, clientsize)
File "/Users/paul/openrpg_dev/orpg/mapper/fog.py", line 178, in layerDraw
dc.Blit(0, 0, self.canvas.size[0], self.canvas.size[1], mdc, 0, 0, wx.AND)
File "/usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.6/site-packages/wx-2.8-mac-unic ode/wx/_gdi.py", line 3454, in Blit
return gdi.DC_Blit(*args, **kwargs)
PyAssertionError: C++ assertion "wxAssertFailure" failed at /BUILD/wxPython-src-2.8.10.1/src/common/dcgraph.cpp(792) in DoBlit(): Logical function is not supported by the graphics context.
Maps with existing fog layer wont load probably because of the above errors.
http://www.rpgobjects.com/forum/index.php?action=vthread&forum=1&topic=695&page=0#msg9097
The fog layer is screwy. The following errors pop up when using it.
When clicking on fog mask I get following error.
File "/Users/paul/openrpg_dev/orpg/mapper/fog_handler.py", line 124, in on_color
data.SetColour(self.canvas.layers['fog'].color)
AttributeError: fog_layer instance has no attribute 'color'
When Clicking hide all the I get the following error.
File "/Users/paul/openrpg_dev/orpg/mapper/map.py", line 284, in on_paint
self.layers['fog'].layerDraw(dc, topleft, clientsize)
File "/Users/paul/openrpg_dev/orpg/mapper/fog.py", line 178, in layerDraw
dc.Blit(0, 0, self.canvas.size[0], self.canvas.size[1], mdc, 0, 0, wx.AND)
File "/usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.6/site-packages/wx-2.8-mac-unic ode/wx/_gdi.py", line 3454, in Blit
return gdi.DC_Blit(*args, **kwargs)
PyAssertionError: C++ assertion "wxAssertFailure" failed at /BUILD/wxPython-src-2.8.10.1/src/common/dcgraph.cpp(792) in DoBlit(): Logical function is not supported by the graphics context.
Maps with existing fog layer wont load probably because of the above errors.
Leave a comment
on 2009-11-28 05:57 *
By davidbyron
Well the first bug is due to the new fog not being able to change its colour. it uses the stipple image and I haven't managed to figure out how to change the stipple colour. The documentation that seems applicable is,
"The style will be set to wx.STIPPLE, unless the bitmap has a mask associated to it, in which case the style will be set to wx.STIPPLE_MASK_OPAQUE.
If the wx.STIPPLE variant is used, the bitmap will be used to fill out the area to be drawn. If the wx.STIPPLE_MASK_OPAQUE is used, the current text foreground and text background determine what colours are used for displaying and the bits in the mask (which is a mono-bitmap actually) determine where to draw what."
"The style will be set to wx.STIPPLE, unless the bitmap has a mask associated to it, in which case the style will be set to wx.STIPPLE_MASK_OPAQUE.
If the wx.STIPPLE variant is used, the bitmap will be used to fill out the area to be drawn. If the wx.STIPPLE_MASK_OPAQUE is used, the current text foreground and text background determine what colours are used for displaying and the bits in the mask (which is a mono-bitmap actually) determine where to draw what."
on 2009-11-28 21:32 *
By davidbyron
fixed change of color of fog players see:
http://trac-hg.assembla.com/openrpg_dev/changeset/504%3Ac49af9b0dd2c
http://trac-hg.assembla.com/openrpg_dev/changeset/504%3Ac49af9b0dd2c
on 2010-05-09 17:55 *
By davidbyron
I've decided to just remove the color fog thing as it never really worked as intended -- to mandate that a player see fog a colour set by the DM. I am not sure but I think this bug might now be either invalid or else fixed.
But I think it might be a Mac specific issue or at least something to do with the libraries used so the fact that i cannot now reproduce the second part of the ticket, doesn't prove it.
But I think it might be a Mac specific issue or at least something to do with the libraries used so the fact that i cannot now reproduce the second part of the ticket, doesn't prove it.
OK Paul says this is fixed now.