Out of interest: Blitz2D/3D to Max ports.

BlitzMax Forums/BlitzMax Beginners Area/Out of interest: Blitz2D/3D to Max ports.

GA(Posted 2005) [#1]
Having recently registered blitzmax, I was toying around trying to get some 2D (if made in blitz3D) applications working in max just to test out what it is/I am capable of doing / learning the ropes.

However, I have come across a few things that have put realy big stumbling blocks in my path. Namely some of the 2D functions which seem to be missing (or I have missed). The most annoying for my little programs being the lack of a "DrawImageRect" command and the ability to call "GetColor x,y" to obtain colour details, between the two of these commands, they formed the backbone of many of my simple 2D programs. It seems that these micky mouse programs are going to have to be writen from the ground up, which isn't exactly a great surprise, but a shame none the less.

However, this experiance with these realy quite small, fairly modular, programs has got me thinking. In the run up to the release of blitz max, I lost count of the number of people putting off releases for half/nearly finished products saying that they would wait and port them to blitz max.

Judging by my (limited) experiance, I'd hate to have to port a program of any significant lenght or one that included a little spagetti code within it...

So my questions are :

Has there been any major port from BlitzBasic 2D or otherwise to max?

If so, how many?


Dreamora(Posted 2005) [#2]
No there haven't, as a port to BM means mostly a complete rewrite.

DrawImageRect does not exist, but there are similar commands in the codebase (for example DrawImageArea).

GetColor isn't a problem, but you can't do it on images, just on pixmaps.

Largest missing is the missing BufferSupport for ImageBuffers.


RiK(Posted 2005) [#3]
DrawImageRect does not exist, but there are similar commands in the codebase (for example DrawImageArea).


Why does it appear in the docs then?

Function DrawImageRect( image:TImage,x#,y#,w#,h#,frame=0 ) Draw an image to a rectangular area of the back buffer
Drawing is affected by the current blend mode, color, scale and rotation.

If the blend mode is ALPHABLEND, then the image is also affected by the current alpha value.


Doesn't work the same was as in previous versions though.


Warren(Posted 2005) [#4]
Why does it appear in the docs then?


Doesn't work the same was as in previous versions though.


Why indeed. Yes, they have a function titled "DrawImageRect". Unfortunately, it doesn't work at all like the old one and is therefore pretty much useless.

Search the code archives for Noel Cowers DrawImageRect implementation. You should be able to massage that into something workable for yourself.