Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

trouble flipping bitmap

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 lshadow   Members   

123
Like
Likes
Like

Posted 07 December 1999 - 03:03 AM

Ok, I'm trying to flip a bitmap after I've already loaded the data, but the program keeps freezing up. Here is the code.

typedef unsigned short WORD;
WORD image;
WORD buffer;
int height;
int bytes_line;

buffer = (WORD*)malloc(height*bytes_line);

memcpy(buffer, image, height*bytes_line);

// this is where it freezes
for (int i=0; i< height; i++)
memcpy(&image[((height-1)-i)*bytes_line],
&buffer[bytes_line*i],
bytes_line);

Thanks for any help...I need all I can get.

[This message has been edited by lshadow (edited December 01, 1999).]


#2 lshadow   Members   

123
Like
Likes
Like

Posted 07 December 1999 - 03:03 AM

Well I figured it out. I had to change the unsigned short WORD to unsigned char BYTE. That's it.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.