mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15335 from mogemimi/fix-typos
Fix typos in comments and strings
This commit is contained in:
commit
6b167a1aa1
|
@ -42,8 +42,8 @@ namespace StringUtils {
|
|||
* @brief Converts from UTF8 string to UTF16 string.
|
||||
*
|
||||
* This function resizes \p outUtf16 to required size and
|
||||
* fill its contents with result UTF16 string if convertion success.
|
||||
* If convertion fails it guarantees not to change \p outUtf16.
|
||||
* fill its contents with result UTF16 string if conversion success.
|
||||
* If conversion fails it guarantees not to change \p outUtf16.
|
||||
*
|
||||
* @param inUtf8 The source UTF8 string to be converted from.
|
||||
* @param outUtf16 The output string to hold the result UTF16s.
|
||||
|
|
|
@ -156,7 +156,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
|
|||
// xml read
|
||||
if (!FileUtils::getInstance()->isFileExist(inFullpath))
|
||||
{
|
||||
return ".csd file doesn not exists ";
|
||||
return ".csd file does not exist.";
|
||||
}
|
||||
|
||||
std::string content = FileUtils::getInstance()->getStringFromFile(inFullpath);
|
||||
|
@ -1284,7 +1284,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
|
|||
// xml read
|
||||
if (!FileUtils::getInstance()->isFileExist(inFullpath))
|
||||
{
|
||||
// CCLOG(".csd file doesn not exists ");
|
||||
// CCLOG(".csd file does not exist.");
|
||||
}
|
||||
|
||||
std::string content = FileUtils::getInstance()->getStringFromFile(inFullpath);
|
||||
|
@ -1579,7 +1579,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFileForLanguageData
|
|||
{
|
||||
//Read and parse XML data file.
|
||||
if (!FileUtils::getInstance()->isFileExist(xmlFilePath))
|
||||
return "Language XML file doesn not exists.";
|
||||
return "Language XML file does not exist.";
|
||||
std::string content = FileUtils::getInstance()->getStringFromFile(xmlFilePath);
|
||||
tinyxml2::XMLDocument* document = new (std::nothrow) tinyxml2::XMLDocument();
|
||||
document->Parse(content.c_str());
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace cocos2d { namespace network {
|
|||
|
||||
virtual ~DownloadTaskCURL()
|
||||
{
|
||||
// if task destoried unnormally, we should release WritenFileName stored in set.
|
||||
// if task destroyed unnormally, we should release WritenFileName stored in set.
|
||||
// Normally, this action should done when task finished.
|
||||
if (_tempFileName.length() && _sStoragePathSet.end() != _sStoragePathSet.find(_tempFileName))
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ namespace cocos2d { namespace network {
|
|||
|
||||
if (_sStoragePathSet.end() != _sStoragePathSet.find(_tempFileName))
|
||||
{
|
||||
// there is another task uses this storate path
|
||||
// there is another task uses this storage path
|
||||
_errCode = DownloadTask::ERROR_FILE_OP_FAILED;
|
||||
_errCodeInternal = 0;
|
||||
_errDescription = "More than one download file task write to same file:";
|
||||
|
|
|
@ -184,7 +184,7 @@ static int processTask(HttpClient* client, HttpRequest* request, NSString* reque
|
|||
}
|
||||
}
|
||||
|
||||
//read cookie propertities from file and set cookie
|
||||
//read cookie properties from file and set cookie
|
||||
std::string cookieFilename = client->getCookieFilename();
|
||||
if(!cookieFilename.empty() && nullptr != client->getCookie())
|
||||
{
|
||||
|
|
|
@ -400,7 +400,7 @@ namespace
|
|||
uint32_t bytesOfKeyValueData;
|
||||
};
|
||||
}
|
||||
//atittc struct end
|
||||
//atitc struct end
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -811,7 +811,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
end.size.height -= offestY;
|
||||
}
|
||||
|
||||
// Convert to desigin coordinate
|
||||
// Convert to design coordinate
|
||||
begin = CGRectApplyAffineTransform(begin, CGAffineTransformScale(CGAffineTransformIdentity, 1.0f/scaleX, 1.0f/scaleY));
|
||||
end = CGRectApplyAffineTransform(end, CGAffineTransformScale(CGAffineTransformIdentity, 1.0f/scaleX, 1.0f/scaleY));
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
|
|||
width = (short)size.cx;
|
||||
height = (short)size.cy;
|
||||
|
||||
// copy pixed data
|
||||
// copy pixel data
|
||||
bi.bmiHeader.biHeight = (bi.bmiHeader.biHeight > 0)
|
||||
? - bi.bmiHeader.biHeight : bi.bmiHeader.biHeight;
|
||||
GetDIBits(dc.getDC(), dc.getBitmap(), 0, height, dataBuf,
|
||||
|
|
|
@ -57,7 +57,7 @@ NS_CC_BEGIN
|
|||
static GLViewImpl* s_pEglView = NULL;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// impliment GLView
|
||||
// implement GLView
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Initialize the DirectX resources required to run.
|
||||
|
|
|
@ -64,7 +64,7 @@ void CCPrecompiledShaders::Init(void)
|
|||
m_programs.clear();
|
||||
m_precompiledPrograms.clear();
|
||||
|
||||
// add existing precomiled programs to dictionary
|
||||
// add existing precompiled programs to dictionary
|
||||
loadPrecompiledPrograms();
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ bool GLProgram::initWithByteArrays(const GLchar* vShaderByteArray, const GLchar*
|
|||
_program = glCreateProgram();
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
|
||||
// convert defines here. If we do it in "compileShader" we will do it it twice.
|
||||
// convert defines here. If we do it in "compileShader" we will do it twice.
|
||||
// a cache for the defines could be useful, but seems like overkill at this point
|
||||
std::string replacedDefines = "";
|
||||
replaceDefines(compileTimeDefines, replacedDefines);
|
||||
|
|
|
@ -40,7 +40,7 @@ static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#pragma mark - convertions
|
||||
#pragma mark - conversions
|
||||
|
||||
/*
|
||||
* PhysicsSprite
|
||||
|
|
|
@ -2300,7 +2300,7 @@ bool jsval_to_FontDefinition( JSContext *cx, JS::HandleValue vp, FontDefinition
|
|||
|
||||
JSB_PRECONDITION( jsobj, "Not a valid JS object");
|
||||
|
||||
// defaul values
|
||||
// default values
|
||||
const char * defautlFontName = "Arial";
|
||||
const int defaultFontSize = 32;
|
||||
TextHAlignment defaultTextAlignment = TextHAlignment::LEFT;
|
||||
|
@ -2419,7 +2419,7 @@ bool jsval_to_FontDefinition( JSContext *cx, JS::HandleValue vp, FontDefinition
|
|||
out->_shadow._shadowBlur = 1;
|
||||
out->_shadow._shadowOpacity = 1;
|
||||
|
||||
// shado offset
|
||||
// shadow offset
|
||||
JS_HasProperty(cx, jsobj, "shadowOffsetX", &hasProperty);
|
||||
JS_HasProperty(cx, jsobj, "shadowOffsetY", &hasSecondProp);
|
||||
if ( hasProperty && hasSecondProp )
|
||||
|
|
|
@ -63,7 +63,7 @@ int js_module_register()
|
|||
sc->addRegisterCallback(register_all_cocos2dx_builder);
|
||||
sc->addRegisterCallback(register_CCBuilderReader);
|
||||
|
||||
// ui can be commented out to reduce the package, attension studio need ui module
|
||||
// ui can be commented out to reduce the package, attention studio need ui module
|
||||
sc->addRegisterCallback(register_all_cocos2dx_ui);
|
||||
sc->addRegisterCallback(register_all_cocos2dx_ui_manual);
|
||||
|
||||
|
@ -79,7 +79,7 @@ int js_module_register()
|
|||
sc->addRegisterCallback(MinXmlHttpRequest::_js_register);
|
||||
// websocket can be commented out to reduce the package
|
||||
sc->addRegisterCallback(register_jsb_websocket);
|
||||
// sokcet io can be commented out to reduce the package
|
||||
// socket io can be commented out to reduce the package
|
||||
sc->addRegisterCallback(register_jsb_socketio);
|
||||
|
||||
// 3d can be commented out to reduce the package
|
||||
|
|
|
@ -519,7 +519,7 @@ bool JSB_glGetUniformfv(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JSObject *typedArray = NULL;
|
||||
if( utype == GL_FLOAT) {
|
||||
// FIXME: glew on windows will cause array overflow after invoking glGetUniformfv.
|
||||
// It seems that glGetUniformfv re-assign the memeroy with a wrong size which is 4x than we pass in.
|
||||
// It seems that glGetUniformfv re-assign the memory with a wrong size which is 4x than we pass in.
|
||||
// For temporary solution, we allocate 4x array.
|
||||
GLfloat* param = new (std::nothrow) GLfloat[usize*4];
|
||||
glGetUniformfv(arg0, arg1, param);
|
||||
|
@ -530,7 +530,7 @@ bool JSB_glGetUniformfv(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
CC_SAFE_DELETE_ARRAY(param);
|
||||
} else if( utype == GL_INT ) {
|
||||
// FIXME: glew on windows will cause array overflow after invoking glGetUniformfv.
|
||||
// It seems that glGetUniformfv re-assign the memeroy with a wrong size which is 4x than we pass in.
|
||||
// It seems that glGetUniformfv re-assign the memory with a wrong size which is 4x than we pass in.
|
||||
// For temporary solution, we allocate 4x array.
|
||||
GLint* param = new (std::nothrow) GLint[usize*4];
|
||||
glGetUniformiv(arg0, arg1, param);
|
||||
|
|
|
@ -851,7 +851,7 @@ int LuaStack::luaLoadChunksFromZIP(lua_State *L)
|
|||
filename.erase(pos);
|
||||
}
|
||||
}
|
||||
// replace path seperator '/' '\' to '.'
|
||||
// replace path separator '/' '\' to '.'
|
||||
for (int i=0; i<filename.size(); i++) {
|
||||
if (filename[i] == '/' || filename[i] == '\\') {
|
||||
filename[i] = '.';
|
||||
|
|
|
@ -125,7 +125,7 @@ bool luaval_to_int32(lua_State* L,int lo,int* outValue, const char* funcName)
|
|||
When we want to convert the number value from the Lua to int, we would call lua_tonumber to implement.It would
|
||||
experience two phase conversion: int -> double, double->int.But,for the 0x80000000 which the min value of int, the
|
||||
int cast may return an undefined result,like 0x7fffffff.So we must use the (int)(unsigned int)lua_tonumber() to get
|
||||
predictable results for 0x80000000.In this place,we didn't use lua_tointeger, because it may produce differen results
|
||||
predictable results for 0x80000000.In this place,we didn't use lua_tointeger, because it may produce different results
|
||||
depending on the compiler,e.g:for iPhone4s,it also get wrong value for 0x80000000.
|
||||
*/
|
||||
unsigned int estimateValue = (unsigned int)lua_tonumber(L, lo);
|
||||
|
@ -824,7 +824,7 @@ bool luaval_to_fontdefinition(lua_State* L, int lo, FontDefinition* outValue , c
|
|||
|
||||
if (ok)
|
||||
{
|
||||
// defaul values
|
||||
// default values
|
||||
const char * defautlFontName = "Arial";
|
||||
const int defaultFontSize = 32;
|
||||
TextHAlignment defaultTextAlignment = TextHAlignment::LEFT;
|
||||
|
|
|
@ -208,7 +208,7 @@ TOLUA_API void toluafix_remove_function_by_refid(lua_State* L, int refid)
|
|||
// luaL_unref(L, LUA_REGISTRYINDEX, refid);
|
||||
}
|
||||
|
||||
// check lua value is funciton
|
||||
// check lua value is function
|
||||
TOLUA_API int toluafix_isfunction(lua_State* L, int lo, const char* type, int def, tolua_Error* err)
|
||||
{
|
||||
if (lua_gettop(L) >= abs(lo) && lua_isfunction(L, lo))
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
particle is solved in the collider and only behaviour that needs the colliders?data is taken
|
||||
into account. The fact that a particle expires for example, can be achieved by using an
|
||||
Observer in combination with an EventHandler (DoExpireEventHandler).
|
||||
CT_NONE means that the particle doesn do anything. This value should be set if the behaviour
|
||||
CT_NONE means that the particle doesn't do anything. This value should be set if the behaviour
|
||||
of the particle is determined outside the collider (for example, expiring the particle).
|
||||
CT_BOUNCE means that the particle bounces off the collider.
|
||||
CT_FLOW means that the particle flows around the contours of the collider.
|
||||
|
|
Loading…
Reference in New Issue