Copying bytes...
Hello!
I need some help right over here...yes..here...
I''ve got an Unsigned Short Buffer that''s 288*224 and the yummy information is in the center of the Buffer
I want to Ignore the 16first and the 16last bytes per line, wich gives me a new 256*224 buffer?
Can someone help me?
please?
Ethereal
Well, you simply add 16 to the x value you want, and 32 * y to the y value. Or if your buffer is one long array and you''re wanting to copy whole rows at a time, then start your pointer at 16, and every 256 iterations, add 32 to skip over the unwanted part.
But may I also ask what the point is? I''d guess you''re using the extra space so you don''t have to do any clipping, since at a low screen size like that all your sprites would probably be 16 pixels wide. Don''t think I''ve ever seen anything but SNES use a screen width of 256 before, and it''s also 256 tall, so that couldn''t be what you''re doing. Can''t think of anything it could be used for other than clipping though...
-Deku-chan
DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)
But may I also ask what the point is? I''d guess you''re using the extra space so you don''t have to do any clipping, since at a low screen size like that all your sprites would probably be 16 pixels wide. Don''t think I''ve ever seen anything but SNES use a screen width of 256 before, and it''s also 256 tall, so that couldn''t be what you''re doing. Can''t think of anything it could be used for other than clipping though...
-Deku-chan
DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement