mirror of https://github.com/axmolengine/axmol.git
Minor English Spelling Corrections, etc.
This commit is contained in:
parent
877fe86675
commit
216ebab0e1
|
@ -58,7 +58,7 @@ using the camera.
|
|||
|
||||
- It doesn't work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object.
|
||||
|
||||
- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effecs, use the action CCFollow or position/scale/rotate.
|
||||
- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate.
|
||||
|
||||
*/
|
||||
class CC_DLL CCCamera : public CCObject
|
||||
|
|
|
@ -70,7 +70,7 @@ using namespace std;
|
|||
unsigned int g_uNumberOfDraws = 0;
|
||||
|
||||
NS_CC_BEGIN
|
||||
// XXX it shoul be a Director ivar. Move it there once support for multiple directors is added
|
||||
// XXX it should be a Director ivar. Move it there once support for multiple directors is added
|
||||
|
||||
// singleton stuff
|
||||
static CCDisplayLinkDirector s_SharedDirector;
|
||||
|
@ -814,7 +814,7 @@ bool CCDirector::enableRetinaDisplay(bool enabled)
|
|||
return true;
|
||||
}
|
||||
|
||||
// Already diabled?
|
||||
// Already disabled?
|
||||
if (!enabled && m_fContentScaleFactor == 1)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -58,7 +58,7 @@ typedef enum {
|
|||
/// it calls "updateProjection" on the projection delegate.
|
||||
kCCDirectorProjectionCustom,
|
||||
|
||||
/// Detault projection is 3D projection
|
||||
/// Default projection is 3D projection
|
||||
kCCDirectorProjectionDefault = kCCDirectorProjection3D,
|
||||
} ccDirectorProjection;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static void lazy_init( void )
|
|||
if( ! s_bInitialized ) {
|
||||
|
||||
//
|
||||
// Position and 1 color passed as a uniform (to similate glColor4ub )
|
||||
// Position and 1 color passed as a uniform (to simulate glColor4ub )
|
||||
//
|
||||
s_pShader = CCShaderCache::sharedShaderCache()->programForKey(kCCShader_Position_uColor);
|
||||
|
||||
|
@ -67,7 +67,7 @@ static void lazy_init( void )
|
|||
}
|
||||
}
|
||||
|
||||
// When back to foreground on android, we want to it to inilialize again
|
||||
// When back to foreground on android, we want to it to initialize again
|
||||
void ccDrawInit()
|
||||
{
|
||||
s_bInitialized = false;
|
||||
|
|
|
@ -56,7 +56,7 @@ NS_CC_BEGIN
|
|||
|
||||
class CCPointArray;
|
||||
|
||||
/** initlialize context */
|
||||
/** initialize context */
|
||||
void CC_DLL ccDrawInit();
|
||||
|
||||
/** draws a point given x and y coordinate measured in points */
|
||||
|
@ -78,12 +78,12 @@ void CC_DLL ccDrawRect( CCPoint origin, CCPoint destination );
|
|||
*/
|
||||
void CC_DLL ccDrawSolidRect( CCPoint origin, CCPoint destination, ccColor4F color );
|
||||
|
||||
/** draws a poligon given a pointer to CCPoint coordiantes and the number of vertices measured in points.
|
||||
/** draws a polygon given a pointer to CCPoint coordinates and the number of vertices measured in points.
|
||||
The polygon can be closed or open
|
||||
*/
|
||||
void CC_DLL ccDrawPoly( const CCPoint *vertices, unsigned int numOfVertices, bool closePolygon );
|
||||
|
||||
/** draws a solid polygon given a pointer to CGPoint coordiantes, the number of vertices measured in points, and a color.
|
||||
/** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
|
||||
*/
|
||||
void CC_DLL ccDrawSolidPoly( const CCPoint *poli, unsigned int numberOfPoints, ccColor4F color );
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ void CCScheduler::priorityIn(tListEntry **ppList, CCObject *pTarget, int nPriori
|
|||
pListElement->next = pListElement->prev = NULL;
|
||||
pListElement->markedForDeletion = false;
|
||||
|
||||
// empey list ?
|
||||
// empty list ?
|
||||
if (! *ppList)
|
||||
{
|
||||
DL_APPEND(*ppList, pListElement);
|
||||
|
@ -763,7 +763,7 @@ void CCScheduler::update(float dt)
|
|||
dt *= m_fTimeScale;
|
||||
}
|
||||
|
||||
// Iterate all over the Updates selectors
|
||||
// Iterate over all the Updates' selectors
|
||||
tListEntry *pEntry, *pTmp;
|
||||
|
||||
// updates with priority < 0
|
||||
|
@ -799,7 +799,7 @@ void CCScheduler::update(float dt)
|
|||
}
|
||||
}
|
||||
|
||||
// Interate all over the custom selectors
|
||||
// Iterate over all the custom selectors
|
||||
for (tHashSelectorEntry *elt = m_pHashForSelectors; elt != NULL; )
|
||||
{
|
||||
m_pCurrentTarget = elt;
|
||||
|
@ -838,7 +838,7 @@ void CCScheduler::update(float dt)
|
|||
}
|
||||
}
|
||||
|
||||
// Interate all over the script callbacks
|
||||
// Iterate over all the script callbacks
|
||||
if (m_pScriptHandlerEntries)
|
||||
{
|
||||
for (int i = m_pScriptHandlerEntries->count() - 1; i >= 0; i--)
|
||||
|
@ -855,7 +855,7 @@ void CCScheduler::update(float dt)
|
|||
}
|
||||
}
|
||||
|
||||
// delete all updates that are morked for deletion
|
||||
// delete all updates that are marked for deletion
|
||||
// updates with priority < 0
|
||||
DL_FOREACH_SAFE(m_pUpdatesNegList, pEntry, pTmp)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ class CCSet;
|
|||
//
|
||||
// CCTimer
|
||||
//
|
||||
/** @brief Light weight timer */
|
||||
/** @brief Light-weight timer */
|
||||
class CC_DLL CCTimer : public CCObject
|
||||
{
|
||||
public:
|
||||
|
@ -108,7 +108,7 @@ struct _hashUpdateEntry;
|
|||
|
||||
class CCArray;
|
||||
|
||||
/** @brief Scheduler is responsible of triggering the scheduled callbacks.
|
||||
/** @brief Scheduler is responsible for triggering the scheduled callbacks.
|
||||
You should not use NSTimer. Instead use this class.
|
||||
|
||||
There are 2 different types of callbacks (selectors):
|
||||
|
@ -142,9 +142,9 @@ public:
|
|||
|
||||
/** The scheduled method will be called every 'interval' seconds.
|
||||
If paused is YES, then it won't be called until it is resumed.
|
||||
If 'interval' is 0, it will be called every frame, but if so, it recommened to use 'scheduleUpdateForTarget:' instead.
|
||||
If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
|
||||
If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
|
||||
repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continiously
|
||||
repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously
|
||||
delay is the amount of time the action will wait before it'll start
|
||||
|
||||
@since v0.99.3, repeat and delay added in v1.1
|
||||
|
|
|
@ -53,7 +53,7 @@ void CC_DLL CCLuaLog(const char * pszFormat);
|
|||
void CC_DLL CCMessageBox(const char * pszMsg, const char * pszTitle);
|
||||
|
||||
/**
|
||||
@brief Enum the language type supportted now
|
||||
@brief Enum the language type supported now
|
||||
*/
|
||||
typedef enum LanguageType
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ void CCEGLViewProtocol::setDesignResolutionSize(float width, float height, Resol
|
|||
|
||||
//setViewPortInPoints(0, 0,m_obScreenSize.width, m_obScreenSize.height);
|
||||
|
||||
// reset director's member vaviables to fit visible rect
|
||||
// reset director's member variables to fit visible rect
|
||||
CCDirector::sharedDirector()->createStatsLabel();
|
||||
CCDirector::sharedDirector()->m_obWinSizeInPoints = CCDirector::sharedDirector()->m_obWinSizeInPixels = getSize();
|
||||
CCDirector::sharedDirector()->setGLDefaultValues();
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
CCEGLViewProtocol();
|
||||
virtual ~CCEGLViewProtocol();
|
||||
|
||||
/** Force destorying EGL view, subclass must implement this method. */
|
||||
/** Force destroying EGL view, subclass must implement this method. */
|
||||
virtual void end() = 0;
|
||||
|
||||
/** Get whether opengl render system is ready, subclass must implement this method. */
|
||||
|
|
|
@ -199,7 +199,7 @@ public:
|
|||
}
|
||||
else if (preState == SAX_ARRAY)
|
||||
{
|
||||
CCAssert(! m_tArrayStack.empty(), "The state is worng!");
|
||||
CCAssert(! m_tArrayStack.empty(), "The state is wrong!");
|
||||
CCArray* pPreArray = m_tArrayStack.top();
|
||||
pPreArray->addObject(m_pArray);
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ public:
|
|||
{
|
||||
if (curState == SAX_DICT)
|
||||
{
|
||||
CCAssert(!m_sCurKey.empty(), "not found key : <integet/real>");
|
||||
CCAssert(!m_sCurKey.empty(), "key not found : <integer/real>");
|
||||
}
|
||||
|
||||
m_sCurValue.append(pText->getCString());
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
bool initWithImageFile(const char * strPath, EImageFormat imageType = kFmtPng);
|
||||
|
||||
/*
|
||||
@brief The same meaning as initWithImageFile, but it is thread safe. It is casued by
|
||||
@brief The same result as with initWithImageFile, but thread safe. It is caused by
|
||||
loadImage() in CCTextureCache.cpp.
|
||||
@param fullpath full path of the file.
|
||||
@param imageType the type of image, currently only supporting two types.
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
/**
|
||||
@brief Save CCImage data to the specified file, with specified format.
|
||||
@param pszFilePath the file's absolute path, including file subfix.
|
||||
@param pszFilePath the file's absolute path, including file suffix.
|
||||
@param bIsToRGB whether the image is saved as RGB format.
|
||||
*/
|
||||
bool saveToFile(const char *pszFilePath, bool bIsToRGB = true);
|
||||
|
|
|
@ -40,7 +40,7 @@ NS_CC_BEGIN
|
|||
|
||||
// premultiply alpha, or the effect will wrong when want to use other pixel format in CCTexture2D,
|
||||
// such as RGB888, RGB5A1
|
||||
#define CC_RGB_PREMULTIPLY_APLHA(vr, vg, vb, va) \
|
||||
#define CC_RGB_PREMULTIPLY_ALPHA(vr, vg, vb, va) \
|
||||
(unsigned)(((unsigned)((unsigned char)(vr) * ((unsigned char)(va) + 1)) >> 8) | \
|
||||
((unsigned)((unsigned char)(vg) * ((unsigned char)(va) + 1) >> 8) << 8) | \
|
||||
((unsigned)((unsigned char)(vb) * ((unsigned char)(va) + 1) >> 8) << 16) | \
|
||||
|
@ -71,7 +71,7 @@ static void pngReadCallback(png_structp png_ptr, png_bytep data, png_size_t leng
|
|||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Impliment CCImage
|
||||
// Implement CCImage
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCImage::CCImage()
|
||||
|
@ -325,7 +325,7 @@ bool CCImage::_initWithPngData(void * pData, int nDatalen)
|
|||
{
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
}
|
||||
// low-bit-depth grayscale iamges are to be expanded to 8 bits
|
||||
// low-bit-depth grayscale images are to be expanded to 8 bits
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY && m_nBitsPerComponent < 8)
|
||||
{
|
||||
png_set_expand_gray_1_2_4_to_8(png_ptr);
|
||||
|
@ -376,7 +376,7 @@ bool CCImage::_initWithPngData(void * pData, int nDatalen)
|
|||
{
|
||||
for(unsigned int j = 0; j < rowbytes; j += 4)
|
||||
{
|
||||
*tmp++ = CC_RGB_PREMULTIPLY_APLHA( row_pointers[i][j], row_pointers[i][j + 1],
|
||||
*tmp++ = CC_RGB_PREMULTIPLY_ALPHA( row_pointers[i][j], row_pointers[i][j + 1],
|
||||
row_pointers[i][j + 2], row_pointers[i][j + 3] );
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ bool CCImage::_initWithTiffData(void* pData, int nDataLen)
|
|||
after invoking TIFFReadRGBAImageOriented
|
||||
for(int j = 0; j < m_nWidth * m_nHeight * 4; j += 4)
|
||||
{
|
||||
*tmp++ = CC_RGB_PREMULTIPLY_APLHA( src[j], src[j + 1],
|
||||
*tmp++ = CC_RGB_PREMULTIPLY_ALPHA( src[j], src[j + 1],
|
||||
src[j + 2], src[j + 3] );
|
||||
}
|
||||
*/
|
||||
|
@ -585,7 +585,7 @@ bool CCImage::_initWithRawData(void * pData, int nDatalen, int nWidth, int nHeig
|
|||
m_nWidth = (short)nWidth;
|
||||
m_bHasAlpha = true;
|
||||
|
||||
// only RGBA8888 surported
|
||||
// only RGBA8888 supported
|
||||
int nBytesPerComponent = 4;
|
||||
int nSize = nHeight * nWidth * nBytesPerComponent;
|
||||
m_pData = new unsigned char[nSize];
|
||||
|
|
|
@ -44,7 +44,7 @@ Config of cocos2d-x project, per target platform.
|
|||
#define CC_PLATFORM_BLACKBERRY 7
|
||||
#define CC_PLATFORM_MAC 8
|
||||
|
||||
// Determine tartet platform by compile environment macro.
|
||||
// Determine target platform by compile environment macro.
|
||||
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
|
||||
|
||||
// iphone
|
||||
|
|
|
@ -49,7 +49,7 @@ bool CCSAXParser::init(const char *pszEncoding)
|
|||
bool CCSAXParser::parse(const char* pXMLData, unsigned int uDataLength)
|
||||
{
|
||||
/*
|
||||
* this initialize the library and check potential ABI mismatches
|
||||
* this initializes the library and checks potential ABI mismatches
|
||||
* between the version it was compiled for and the actual shared
|
||||
* library used.
|
||||
*/
|
||||
|
|
|
@ -15,8 +15,8 @@ public:
|
|||
virtual ~CCApplication();
|
||||
|
||||
/**
|
||||
@brief Callback by CCDirector for limit FPS.
|
||||
@interval The time, which expressed in second in second, between current frame and next.
|
||||
@brief Callback by CCDirector to limit FPS.
|
||||
@interval The time, expressed in seconds, between current frame and next.
|
||||
*/
|
||||
void setAnimationInterval(double interval);
|
||||
|
||||
|
@ -33,8 +33,8 @@ public:
|
|||
} Orientation;
|
||||
|
||||
/**
|
||||
@brief Callback by CCDirector for change device orientation.
|
||||
@orientation The defination of orientation which CCDirector want change to.
|
||||
@brief Callback by CCDirector to change device orientation.
|
||||
@orientation The desired orientation.
|
||||
@return The actual orientation of the application.
|
||||
*/
|
||||
Orientation setOrientation(Orientation orientation);
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
int run();
|
||||
|
||||
/**
|
||||
@brief Get current applicaiton instance.
|
||||
@brief Get current application instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication* sharedApplication();
|
||||
|
|
|
@ -41,7 +41,7 @@ THE SOFTWARE.
|
|||
// normal process
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
// gl2.h don't define GLchar on Android
|
||||
// gl2.h doesn't define GLchar on Android
|
||||
typedef char GLchar;
|
||||
|
||||
//declare here while define in CCEGLView_android.cpp
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
* this method call Cococs2dx.createBitmap()(java code) to create the bitmap, the java code
|
||||
* will call Java_org_cocos2dx_lib_Cocos2dxBitmap_nativeInitBitmapDC() to init the width, height
|
||||
* and data.
|
||||
* use this appoach to decrease the jni call number
|
||||
* use this approach to decrease the jni call number
|
||||
*/
|
||||
jstring jstrText = methodInfo.env->NewStringUTF(text);
|
||||
jstring jstrFont = methodInfo.env->NewStringUTF(pFontName);
|
||||
|
|
|
@ -66,7 +66,7 @@ static id s_sharedDirectorCaller;
|
|||
|
||||
-(void) startMainLoop
|
||||
{
|
||||
// CCDirector::setAnimationInterval() is called, we should invalide it first
|
||||
// CCDirector::setAnimationInterval() is called, we should invalidate it first
|
||||
[displayLink invalidate];
|
||||
displayLink = nil;
|
||||
|
||||
|
@ -77,7 +77,7 @@ static id s_sharedDirectorCaller;
|
|||
|
||||
-(void) setAnimationInterval:(double)intervalNew
|
||||
{
|
||||
// CCDirector::setAnimationInterval() is called, we should invalide it first
|
||||
// CCDirector::setAnimationInterval() is called, we should invalidate it first
|
||||
[displayLink invalidate];
|
||||
displayLink = nil;
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ CCArray* ccFileUtils_arrayWithContentsOfFileThreadSafe(const char* pFileName)
|
|||
unsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* pszMode, unsigned long * pSize)
|
||||
{
|
||||
unsigned char * pBuffer = NULL;
|
||||
CCAssert(pszFileName != NULL && pSize != NULL && pszMode != NULL, "Invaild parameters.");
|
||||
CCAssert(pszFileName != NULL && pSize != NULL && pszMode != NULL, "Invalid parameters.");
|
||||
*pSize = 0;
|
||||
do
|
||||
{
|
||||
|
|
|
@ -437,7 +437,7 @@ bool CCImage::_initWithRawData(void *pData, int nDatalen, int nWidth, int nHeigh
|
|||
m_nWidth = (short)nWidth;
|
||||
m_bHasAlpha = true;
|
||||
|
||||
// only RGBA8888 surported
|
||||
// only RGBA8888 supported
|
||||
int nBytesPerComponent = 4;
|
||||
int nSize = nHeight * nWidth * nBytesPerComponent;
|
||||
m_pData = new unsigned char[nSize];
|
||||
|
|
|
@ -577,7 +577,7 @@ static EAGLView *view = 0;
|
|||
/* If text can be selected, it can be marked. Marked text represents provisionally
|
||||
* inserted text that has yet to be confirmed by the user. It requires unique visual
|
||||
* treatment in its display. If there is any marked text, the selection, whether a
|
||||
* caret or an extended range, always resides witihin.
|
||||
* caret or an extended range, always resides within.
|
||||
*
|
||||
* Setting marked text either replaces the existing marked text or, if none is present,
|
||||
* inserts it from the current selection. */
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
|
||||
- (ZAttributedString *)attributedSubstringFromRange:(NSRange)aRange {
|
||||
if (NSMaxRange(aRange) > [_buffer length]) {
|
||||
@throw [NSException exceptionWithName:NSRangeException reason:@"range was outisde of the attributed string" userInfo:nil];
|
||||
@throw [NSException exceptionWithName:NSRangeException reason:@"range was outside of the attributed string" userInfo:nil];
|
||||
}
|
||||
ZMutableAttributedString *newStr = [self mutableCopy];
|
||||
if (aRange.location > 0) {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
@end
|
||||
|
||||
// override UIAccelerometer behaviour
|
||||
// override UIAccelerometer behavior
|
||||
@interface UIAccelerometer (Simulation)
|
||||
+ (UIAccelerometer *)sharedAccelerometer;
|
||||
@end
|
||||
|
|
|
@ -167,7 +167,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
accObject = [UIAccelerationSimulation alloc];
|
||||
isExiting = false;
|
||||
|
||||
// couldn't get the CFSocket version to work with UDP and runloop, so used Berkely sockets and a thread instead
|
||||
// couldn't get the CFSocket version to work with UDP and runloop, so used Berkeley sockets and a thread instead
|
||||
|
||||
udpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
struct sockaddr_in sin;
|
||||
|
|
Loading…
Reference in New Issue