Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
void DISPLAY_UPDATE(char *name, int x , int y , int startx, int starty , int w , int h ,float rotation) { CCSprite *sprite = [[CCSprite spriteWithFile:[NSString stringWithUTF8String:name] rect:CGRectMake(startx, starty, w, h)] retain]; float drawX = x, drawY = y; CGSize size = [sprite contentSize];
int nWidth = size.width; int nHeight = size.height; drawX = drawX + nWidth/2; drawY = drawY - nHeight/2;
Unfortunately, the image doesn't display correctly. The image's position is wrong. But in other iphone, it display correct. What's the matter? What's the problem in this coordinate convert?
Replies
However, I can tell you that cocos2d natively supports retina displays, just name your images like this:
mySprite.png - normal display
mySprite-hd.png - will be shown on retina displays
You really shouldn't have to worry about any placement issues at all.
deal.gameweaver.com
guessem.gameweaver.com
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThe same error.
Background not drawn. and the other image's position is wrong.
What's the matter?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome