Skip to content

Commit

Permalink
CCFontSprite and CCSpriteExtra (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 authored Jan 13, 2025
1 parent 8e3e882 commit 9c4ce80
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loader/include/Geode/cocos/include/cocos2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ THE SOFTWARE.

#include "../robtop/special_nodes/CCLightning.h"

#include "../robtop/sprite_nodes/CCFontSprite.h"
#include "../robtop/sprite_nodes/CCSpriteExtra.h"

#include "../robtop/xml/DS_Dictionary.h"
#include "../robtop/xml/ObjectDecoder.h"

Expand Down
29 changes: 29 additions & 0 deletions loader/include/Geode/cocos/robtop/sprite_nodes/CCFontSprite.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef __CCFONTSPRITE_H__
#define __CCFONTSPRITE_H__

#include "../../include/ccMacros.h"
#include "CCSpriteExtra.h"

NS_CC_BEGIN

// @note RobTop Addition
class CC_DLL CCFontSprite : public CCSpriteExtra {
public:
CCFontSprite() {}
virtual ~CCFontSprite() {}
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCFontSprite, CCSpriteExtra);

public:
bool m_bUseInstant;
float m_fInstantTime;
float m_fDelay;
float m_fShakesPerSecond;
float m_fShakeIntensity;
float m_fShakeElapsed;
int m_nShakeIndex;
CCPoint m_obShakePosition;
};

NS_CC_END

#endif // __CCFONTSPRITE_H__
28 changes: 28 additions & 0 deletions loader/include/Geode/cocos/robtop/sprite_nodes/CCSpriteExtra.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef __CCSPRITEEXTRA_H__
#define __CCSPRITEEXTRA_H__

#include "../../include/ccMacros.h"
#include "../../sprite_nodes/CCSprite.h"

NS_CC_BEGIN

// @note RobTop Addition
class CC_DLL CCSpriteExtra : public CCSprite {
public:
CCSpriteExtra() {}
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpriteExtra, CCSprite);

inline float getXOffset() const { return m_fXOffset; }
inline float getYOffset() const { return m_fYOffset; }

inline void setXOffset(float offset) { m_fXOffset = offset; }
inline void setYOffset(float offset) { m_fYOffset = offset; }

protected:
float m_fXOffset;
float m_fYOffset;
};

NS_CC_END

#endif // __CCSPRITEEXTRA_H__

0 comments on commit 9c4ce80

Please sign in to comment.