Demo programming

Moderators: None (Apply to moderate this forum)
Number of threads: 150
Number of posts: 326

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
2D rotation problem. Posted by MIG31 on 9 Jun 2000 at 7:03 AM
Hello,I have a problem for 2D rotation.When I rotate my sprite,there are holes on the destination image(I think that it's the rounding function).Somebody told me that I have to rotate the dest. image in the oposit side,then,I have to give the color of the SRC's found pixel.But That doesn't work?!<br>
Sorry for my bad explanation(I'm not very good in english).I can send the source(C),for more understanding.<br>
Please help me!<br>
Thanx,<br>
Bye,


Edit Report
Back order Posted by RuntimeTerror on 11 Jun 2000 at 4:04 PM
Hi MIG31,<br>
You need to draw the pixels on the screen from top to bottom and from left to right. Then you've to re-calculate (back-calculate) which Texel's (Pixel in Texture) color should be set there.<br>
What yo've done (I think) is: You've draw the Sprite from Sprite to Screen, but you have to it the other way: through screen, onto Sprite, get the color and set it on screen.<br>
To do this you really have to do the opposite transfiguration. Enlarge the coordinates if you want to have a smaller sprite and turn the coordinates left if you want to have a right-rotated image of the sprite.<br>
<br>
Hope I helped you - if not, let me know<br>
<br>
RuntimeTerror<br>
<br>
ps. for further questions: I speak German and a little bit French


URL:www.RuntimeTerror.de

Edit Report
Back order Posted by RuntimeTerror on 11 Jun 2000 at 4:05 PM
Hi MIG31,<br>
You need to draw the pixels on the screen from top to bottom and from left to right. Then you've to re-calculate (back-calculate) which Texel's (Pixel in Texture) color should be set there.<br>
What yo've done (I think) is: You've draw the Sprite from Sprite to Screen, but you have to it the other way: through screen, onto Sprite, get the color and set it on screen.<br>
To do this you really have to do the opposite transfiguration. Enlarge the coordinates if you want to have a smaller sprite and turn the coordinates left if you want to have a right-rotated image of the sprite.<br>
<br>
Hope I helped you - if not, let me know<br>
<br>
RuntimeTerror<br>
<br>
ps. for further questions: I speak German and a little bit French


URL:www.RuntimeTerror.de




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.