Mappy and 1.10

BlitzMax Forums/BlitzMax Programming/Mappy and 1.10

tonyg(Posted 2005) [#1]
I had the Mappy module running OK a few months ago.
Tried it again tonight and all the examples produce a black screen. Tried with GL drivers but still no luck.
Anybody else use this mod?


gman(Posted 2005) [#2]
ill give it a check tomorrow morning to see whats up.


gman(Posted 2005) [#3]
i do see the problem you are having but could not find the reason in the limited time i had this morning. if its not found by the weekend i will take another look then. my weeknights are pretty full this week :(


tonyg(Posted 2005) [#4]
gman, In mappy.bmx mapdrawbg there's a comment...
make the blending solid (0) to replicate old DrawBlock function


but no setblend solidblend statement.
If I add one (either in mappy.bmx or my program) the tiles show OK. I can't now get the mapdrawfg to show using maskblend. Also having problems with maskcolours but that should be easy to fix.
Not sure how/why this started as I am *sure* it was working OK.


<edit> Thought this might be a problem in maskimage method which needs to be changed to
[code]
img.frames[frame]=_max2ddriver.CreateFrameFromPixmap(pixmap,img.flags)
[/code}
(I think) but the problem continue.
In some stuff I was doing with MaskPixmap I noticed that paste.pixmap wasn't using the masking colour.
CreateFrameFromPixmap uses Paste.Pixmap which does a memcopy. The memcopy doesn't respect masked pixels so everything is copied as is.
I *think* the maskpixmap needs to be added to BRL.D3D7Max2D and BRL.GLMax2D.
I tried it in the DX module, rebuilt but had the same problem.


gman(Posted 2005) [#5]
this is killing me. i have tried to troubleshoot this off/on for the last couple days with no luck. i would really like to get my hands on the mod directory from v1.09 so i could do a text comparison. i checked the CVS version and it did not have the SetBlend command in there so i mustve removed it and not the comment. although it does appear to help having it in there. im wondering how much pixmaps changed between versions. there was also DX support added in so it could be there as well.


tonyg(Posted 2005) [#6]
I would think the solidblend was a performance addition so cls not needed. Not being able to apply masking to the other layers is a pain and I'm pretty sure it's to do with createframefrompixmap using paste.pixmap using memcopy which does a block copy. I couldn't get this to work in some other code and ended up readpixelling and then memcopying into the pixmap created from the lockimage. I'll try some more stuff later if possible.