mirror of https://github.com/axmolengine/axmol.git
remove unneeded function, and make protocol an abstract class
This commit is contained in:
parent
2438dba1a8
commit
37915cfed6
|
@ -88,8 +88,6 @@ public:
|
|||
|
||||
virtual void draw();
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
|
||||
// CC Texture protocol
|
||||
|
||||
/** returns the used texture*/
|
||||
|
|
|
@ -180,8 +180,7 @@ namespace cocos2d{
|
|||
virtual const char* getString(void);
|
||||
virtual void setCString(const char *label);
|
||||
virtual void setAnchorPoint(const CCPoint& var);
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual CCLabelProtocol* convertToLabelProtocol() { return (CCLabelProtocol*)this; }
|
||||
|
||||
#if CC_LABELBMFONT_DEBUG_DRAW
|
||||
virtual void draw();
|
||||
#endif // CC_LABELBMFONT_DEBUG_DRAW
|
||||
|
|
|
@ -182,7 +182,8 @@ public:
|
|||
/** BlendFunction. Conforms to CCBlendProtocol protocol */
|
||||
CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc)
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
LAYER_NODE_FUNC(CCLayerColor);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -118,7 +118,8 @@ namespace cocos2d{
|
|||
*/
|
||||
virtual void onExit();
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
|
||||
protected:
|
||||
CCMenuItem* itemForTouch(CCTouch * touch);
|
||||
|
|
|
@ -124,7 +124,8 @@ namespace cocos2d{
|
|||
virtual void setColor(const ccColor3B& color);
|
||||
virtual const ccColor3B& getColor();
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
protected:
|
||||
ccColor3B m_tColorBackup;
|
||||
float m_fOriginalScale;
|
||||
|
@ -236,7 +237,8 @@ namespace cocos2d{
|
|||
virtual void unselected();
|
||||
virtual void setIsEnabled(bool bEnabled);
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
};
|
||||
|
||||
/** @brief CCMenuItemImage accepts images as items.
|
||||
|
@ -308,7 +310,8 @@ namespace cocos2d{
|
|||
virtual void unselected();
|
||||
virtual void setIsEnabled(bool var);
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol*)this; }
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ public:
|
|||
CCObject(void);
|
||||
virtual ~CCObject(void);
|
||||
|
||||
virtual void release(void);
|
||||
virtual void retain(void);
|
||||
void release(void);
|
||||
void retain(void);
|
||||
CCObject* autorelease(void);
|
||||
CCObject* copy(void);
|
||||
bool isSingleRefrence(void);
|
||||
|
|
|
@ -63,12 +63,12 @@ public:
|
|||
Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO
|
||||
@since v0.8
|
||||
*/
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) = 0;
|
||||
|
||||
/** returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity);
|
||||
@since v0.8
|
||||
*/
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
virtual bool getIsOpacityModifyRGB(void) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
virtual CCTexture2D* getTexture(void) = 0;
|
||||
|
||||
// sets a new texture. it will be retained
|
||||
virtual void setTexture(CCTexture2D *texture) {CC_UNUSED_PARAM(texture);}
|
||||
virtual void setTexture(CCTexture2D *texture) = 0;
|
||||
};
|
||||
|
||||
//! @brief Common interface for Labels
|
||||
|
|
|
@ -246,8 +246,6 @@ public:
|
|||
virtual void setIsOpacityModifyRGB(bool bValue);
|
||||
virtual bool getIsOpacityModifyRGB(void);
|
||||
|
||||
virtual CCRGBAProtocol* convertToRGBAProtocol() { return (CCRGBAProtocol *)this; }
|
||||
|
||||
// CCTextureProtocol
|
||||
virtual void setTexture(CCTexture2D *texture);
|
||||
virtual CCTexture2D* getTexture(void);
|
||||
|
|
|
@ -82,13 +82,13 @@ public: virtual const varType& get##funName(void);
|
|||
*/
|
||||
#define CC_PROPERTY(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
public: virtual varType get##funName(void);\
|
||||
public: virtual void set##funName(varType var);
|
||||
public: varType get##funName(void);\
|
||||
public: void set##funName(varType var);
|
||||
|
||||
#define CC_PROPERTY_PASS_BY_REF(varType, varName, funName)\
|
||||
protected: varType varName;\
|
||||
public: virtual const varType& get##funName(void);\
|
||||
public: virtual void set##funName(const varType& var);
|
||||
public: const varType& get##funName(void);\
|
||||
public: void set##funName(const varType& var);
|
||||
|
||||
/** CC_SYNTHESIZE_READONLY is used to declare a protected variable.
|
||||
We can use getter to read the variable.
|
||||
|
|
Loading…
Reference in New Issue