Loading...

cocos2d-iphone-issues@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Issue 1314 in cocos2d-iphone: cocos2d-iphone-2.0-beta2, [CCNode visible] return -1; cocos2d-iphone Tue Feb 21 10:01:12 2012


Comment #13 on issue 1314 by [EMAIL PROTECTED]: cocos2d-iphone-2.0-beta2, [CCNode visible] return -1;
http://code.google.com/p/cocos2d-iphone/issues/detail?id=1314

Some very smart person wrote in code "To reduce memory, place BOOLs that are not properties here:" If you use BOOL as 1 bit variable compilator during cast convert it to signed char( typedef signed char BOOL; ) and create variable where all bit is 1. If you make
 print NSLog(@"%d, %d", YES, sprite.visible); you can see Output: 1, -1
Why? I think during type converting from 1 bit to signed char compilator understand 1 bit for signed char as -1. Really BOOL is not standart type it is fake


// To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!! // To reduce memory, place BOOLs that are not properties here: !!!!!!!!!!!!!!!!!!!!!!
        BOOL isTransformDirty_:1;
        BOOL isInverseDirty_:1;

        // is visible
        BOOL visible_:1;
// If YES the transformtions will be relative to (-transform.x, -transform.y).
        // Sprites, Labels and any other "small" object uses it.
        // Scenes, Layers and other "whole screen" object don't use it.
        BOOL isRelativeAnchorPoint_:1;

        BOOL isReorderChildDirty_:1;


--
You received this message because you are subscribed to the Google Groups 
"cocos2d-iphone-issues" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cocos2d-iphone-issues?hl=en.