Updating AccelerometerDelegate related classes

The checked in .pkg files seemed to be generating lua-bindings for
cocos2d methods that don't exist.  This seems strange, so have fixed it
for now.
This commit is contained in:
ciaranj 2011-09-18 17:56:23 +01:00
parent 55ab2aa708
commit 75edaccac9
2 changed files with 122 additions and 126 deletions

View File

@ -16,8 +16,6 @@ namespace cocos2d {
{
void didAccelerate(CCAcceleration* pAccelerationValue);
void AccelerometerDestroy(void);
void AccelerometerKeep(void);
};
} //namespace cocos2d

View File

@ -1,125 +1,123 @@
#include "CCNode.h"
#include "CCProtocols.h"
#include "CCTouchDelegateProtocol.h"
#include "CCAccelerometerDelegate.h"
#include "CCKeypadDelegate.h"
namespace cocos2d {
class CCLayer : public CCNode, public CCTouchDelegate, public CCAccelerometerDelegate, public CCKeypadDelegate
{
public:
CCLayer();
bool init();
static CCLayer *node(void);
void onEnter();
void onExit();
void onEnterTransitionDidFinish();
bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
void destroy(void);
void keep(void);
void didAccelerate(CCAcceleration* pAccelerationValue) {}
void AccelerometerDestroy(void);
void AccelerometerKeep(void);
void KeypadDestroy();
void KeypadKeep();
void registerWithTouchDispatcher(void);
void setIsTouchEnabled(bool bValue);
bool getIsTouchEnabled();
void setIsAccelerometerEnabled(bool bValue);
bool getIsAccelerometerEnabled();
void setIsKeypadEnabled(bool bValue);
bool getIsKeypadEnabled();
void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent);
};
class CCLayerColor : public CCLayer , public CCRGBAProtocol, public CCBlendProtocol
{
CCLayerColor();
void draw();
void setContentSize(CCSize var);
static CCLayerColor * layerWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
static CCLayerColor * layerWithColor(ccColor4B color);
bool initWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
bool initWithColor(ccColor4B color);
void changeWidth(GLfloat w);
void changeHeight(GLfloat h);
void changeWidthAndHeight(GLfloat w ,GLfloat h);
#include "CCNode.h"
#include "CCProtocols.h"
#include "CCTouchDelegateProtocol.h"
#include "CCAccelerometerDelegate.h"
#include "CCKeypadDelegate.h"
namespace cocos2d {
class CCLayer : public CCNode, public CCTouchDelegate, public CCAccelerometerDelegate, public CCKeypadDelegate
{
public:
CCLayer();
bool init();
static CCLayer *node(void);
void onEnter();
void onExit();
void onEnterTransitionDidFinish();
bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent);
void destroy(void);
void keep(void);
void didAccelerate(CCAcceleration* pAccelerationValue) {}
void KeypadDestroy();
void KeypadKeep();
void registerWithTouchDispatcher(void);
void setIsTouchEnabled(bool bValue);
bool getIsTouchEnabled();
void setIsAccelerometerEnabled(bool bValue);
bool getIsAccelerometerEnabled();
void setIsKeypadEnabled(bool bValue);
bool getIsKeypadEnabled();
void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent);
};
class CCLayerColor : public CCLayer , public CCRGBAProtocol, public CCBlendProtocol
{
CCLayerColor();
void draw();
void setContentSize(CCSize var);
static CCLayerColor * layerWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
static CCLayerColor * layerWithColor(ccColor4B color);
bool initWithColorWidthHeight(ccColor4B color, GLfloat width, GLfloat height);
bool initWithColor(ccColor4B color);
void changeWidth(GLfloat w);
void changeHeight(GLfloat h);
void changeWidthAndHeight(GLfloat w ,GLfloat h);
GLubyte getOpacity(void);
void setOpacity(GLubyte var);
void setColor(ccColor3B Value);
ccColor3B getColor(void);
void setBlendFunc(ccBlendFunc Value);
ccBlendFunc getBlendFunc(void);
CCRGBAProtocol* convertToRGBAProtocol();
};
class CCLayerGradient : public CCLayerColor
{
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end);
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v. */
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end, CCPoint v);
/** Initializes the CCLayer with a gradient between start and end. */
bool initWithColor(ccColor4B start, ccColor4B end);
/** Initializes the CCLayer with a gradient between start and end in the direction of v. */
bool initWithColor(ccColor4B start, ccColor4B end, CCPoint v);
ccColor3B getStartColor();
void setStartColor(ccColor3B colors);
void setEndColor(ccColor3B Value);
ccColor3B getEndColor(void);
void setStartOpacity(GLubyte Value);
GLubyte getStartOpacity(void);
void setEndOpacity(GLubyte Value);
GLubyte getEndOpacity(void);
void setVector(CCPoint Value);
CCPoint getVector(void);
void setIsCompressedInterpolation(bool Value);
bool getIsCompressedInterpolation(void);
};
class CCLayerMultiplex : public CCLayer
{
CCLayerMultiplex();
//static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
//lua instead with follow func
static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
void addLayer(CCLayer* layer);
bool initWithLayer(CCLayer* layer);
bool initWithLayers(CCLayer* layer, va_list params);
void switchTo(unsigned int n);
void switchToAndReleaseMe(unsigned int n);
};
}//namespace cocos2d
void setOpacity(GLubyte var);
void setColor(ccColor3B Value);
ccColor3B getColor(void);
void setBlendFunc(ccBlendFunc Value);
ccBlendFunc getBlendFunc(void);
CCRGBAProtocol* convertToRGBAProtocol();
};
class CCLayerGradient : public CCLayerColor
{
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end);
/** Creates a full-screen CCLayer with a gradient between start and end in the direction of v. */
static CCLayerGradient* layerWithColor(ccColor4B start, ccColor4B end, CCPoint v);
/** Initializes the CCLayer with a gradient between start and end. */
bool initWithColor(ccColor4B start, ccColor4B end);
/** Initializes the CCLayer with a gradient between start and end in the direction of v. */
bool initWithColor(ccColor4B start, ccColor4B end, CCPoint v);
ccColor3B getStartColor();
void setStartColor(ccColor3B colors);
void setEndColor(ccColor3B Value);
ccColor3B getEndColor(void);
void setStartOpacity(GLubyte Value);
GLubyte getStartOpacity(void);
void setEndOpacity(GLubyte Value);
GLubyte getEndOpacity(void);
void setVector(CCPoint Value);
CCPoint getVector(void);
void setIsCompressedInterpolation(bool Value);
bool getIsCompressedInterpolation(void);
};
class CCLayerMultiplex : public CCLayer
{
CCLayerMultiplex();
//static CCLayerMultiplex * layerWithLayers(CCLayer* layer, ... );
//lua instead with follow func
static CCLayerMultiplex * layerWithLayer(CCLayer* layer);
void addLayer(CCLayer* layer);
bool initWithLayer(CCLayer* layer);
bool initWithLayers(CCLayer* layer, va_list params);
void switchTo(unsigned int n);
void switchToAndReleaseMe(unsigned int n);
};
}//namespace cocos2d