Advertisement

Copying bytes...

Started by June 18, 2001 04:19 PM
2 comments, last by Metus 23 years, 7 months ago
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
Might I ask why you don''t simply size it 256x224?
Advertisement
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^_^)
Actually, I''m reading a snes videobuffer (ZSnes) and the Vidbuffer is 288*224, but only 256*224 contains video information, the other 16 + 16 buffers seems to be some kind of scrolling buffer
Ethereal

This topic is closed to new replies.

Advertisement