: can anybody tell me how to make the screen scroll horizontally over a large background image? : : if not, can someone send me some code they have or point me in the direction of a good tutorial please. :
Lets say you have a 640*200 image you wanna display on a 320*200 screen:
when you press the right arrow, increase a var I
[code] for counter=0 to 200 do begin offsIMG:=I+(counter*640); offsSCR:=counter*320; display 320pixels from offsIMG to offsSCR end; [/code] if you have different image dimension, change the appropriate values
What's the quikest way to draw a 640*200 image. the only way i know is to actually right out a 640*200 grid of 0's then change the 0's to the colour that i want, then print it to screen with an array and some assembley code.
: you wouldn't have any source code for horizontal scrolling would you? : :
unfortunatly not. but the example i gave you is perfect. you can do it in assembly, that would be even better. but what exactly is your question? you want to know how to copy a source buffer to the screen?
if you want to do it with horizontal scrolling, you have to copy lines by lines. I could make an example if you want, send me the code you made to do this, and I will implement some documentation in it so you can complete your source code.
Comments
:
: if not, can someone send me some code they have or point me in the direction of a good tutorial please.
:
Lets say you have a 640*200 image you wanna display on a 320*200 screen:
when you press the right arrow, increase a var I
[code]
for counter=0 to 200 do begin
offsIMG:=I+(counter*640);
offsSCR:=counter*320;
display 320pixels from offsIMG to offsSCR
end;
[/code]
if you have different image dimension, change the appropriate values
:
:
unfortunatly not. but the example i gave you is perfect. you can do it in assembly, that would be even better. but what exactly is your question? you want to know how to copy a source buffer to the screen?
if you want to do it with horizontal scrolling, you have to copy lines by lines. I could make an example if you want, send me the code you made to do this, and I will implement some documentation in it so you can complete your source code.
mail it to me