Blitting an image to the screen
{In Development - Under Construction}
DownloadSourceCode
The demo source code and xbe was developed in nasm, and makes the
assumption that your using a PAL xbox. Again if your not using a pal
xbox, the code seems to run perfectly well...but the image is blitted offset
on the screen. You should put some code to check your xbox
configuration and screen settings etc...which I might put in later. A
screenshot of what to expect is shown on the right... its not much...but it
blitz a raw image to the screen.
How did I get a raw image....well I took a 24bit bitmap and stripped off
the header information...so that the file is just a raw image of Red Green
Blue values... Again you could improve the code to check the bmp file
header...and read in the appropriate data. |
|
A nice next move, would probably be to animate an image.... possibly put in a
small loop, and have a ball bounce around the screen....or maybe even a rotating
cube? All this asm might make some people feel a little freaked
out...especially when its written by someone else...and I'm sure my asm could do
with more commenting. So our next move will be to compile our code using a
compiler....create a windows exe...then convert it to a raw binary using 'ExeToBin.exe'...and
put the header info in.
We can do slightly more complex code then....put in structures...and write
functions ....and once we get to a confortable level....we can then maybe write
an exe to xbe converter...or even an xbe linker? Of course we'll have to
start looking into debugging... as our code grows, debug information if vital.
But we'll soon get there.
{Feedback is always welcome - webmaster@xbdev.net}
|