More CCLog --> log.

This commit is contained in:
James Chen 2013-07-24 10:46:13 +08:00
parent e5b0bc1fc7
commit 35dec5d71e
14 changed files with 32 additions and 32 deletions

View File

@ -56,7 +56,7 @@ void log(const char * pszFormat, ...)
void MessageBox(const char * pszMsg, const char * pszTitle)
{
// MessageBoxA(NULL, pszMsg, pszTitle, MB_OK);
CCLog(pszMsg);
log(pszMsg);
}
void LuaLog(const char * pszFormat)

View File

@ -56,7 +56,7 @@ void log(const char * pszFormat, ...)
printf("\n");
}
// ios no MessageBox, use CCLog instead
// ios no MessageBox, use log instead
void MessageBox(const char * pszMsg, const char * pszTitle)
{
NSString * title = (pszTitle) ? [NSString stringWithUTF8String : pszTitle] : nil;

View File

@ -71,7 +71,7 @@ void log(const char * pszFormat, ...)
void MessageBox(const char * pszMsg, const char * pszTitle)
{
CCLog("%s: %s", pszTitle, pszMsg);
log("%s: %s", pszTitle, pszMsg);
}
void LuaLog(const char * pszFormat)

View File

@ -325,20 +325,20 @@ bool EGLView::initGL()
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)
{
CCLog("Ready for GLSL");
log("Ready for GLSL");
}
else
{
CCLog("Not totally ready :(");
log("Not totally ready :(");
}
if (glewIsSupported("GL_VERSION_2_0"))
{
CCLog("Ready for OpenGL 2.0");
log("Ready for OpenGL 2.0");
}
else
{
CCLog("OpenGL 2.0 not supported");
log("OpenGL 2.0 not supported");
}
// Enable point size by default on linux.

View File

@ -67,7 +67,7 @@ void LuaLog(const char * pszFormat)
puts(pszFormat);
}
// ios no MessageBox, use CCLog instead
// ios no MessageBox, use log instead
void MessageBox(const char * pszMsg, const char * pszTitle)
{
NSString * title = (pszTitle) ? [NSString stringWithUTF8String : pszTitle] : nil;

View File

@ -72,12 +72,12 @@ void log(const char * pszFormat, ...)
void MessageBox(const char * pszMsg, const char * pszTitle)
{
CCLog("%s: %s", pszTitle, pszMsg);
log("%s: %s", pszTitle, pszMsg);
}
void LuaLog(const char * pszFormat)
{
CCLog("%s", pszFormat);
log("%s", pszFormat);
}
NS_CC_END

View File

@ -74,7 +74,7 @@ void CocosPepperInstance::DidChangeView(const pp::View& view)
bool CocosPepperInstance::Init(uint32_t argc, const char* argn[], const char* argv[])
{
CCLog("CocosPepperInstance::Init: %x %p", pp_instance(),
log("CocosPepperInstance::Init: %x %p", pp_instance(),
pp::Module::Get()->get_browser_interface());
nacl_io_init_ppapi(pp_instance(),
pp::Module::Get()->get_browser_interface());

View File

@ -74,7 +74,7 @@ void log(const char * pszFormat, ...)
void MessageBox(const char * pszMsg, const char * pszTitle)
{
CCLog("%s: %s", pszTitle, pszMsg);
log("%s: %s", pszTitle, pszMsg);
}
void LuaLog(const char * pszFormat)

View File

@ -105,10 +105,10 @@ static bool glew_dynamic_binding()
// If the current opengl driver doesn't have framebuffers methods, check if an extension exists
if (glGenFramebuffers == NULL)
{
CCLog("OpenGL: glGenFramebuffers is NULL, try to detect an extension");
log("OpenGL: glGenFramebuffers is NULL, try to detect an extension");
if (strstr(gl_extensions, "ARB_framebuffer_object"))
{
CCLog("OpenGL: ARB_framebuffer_object is supported");
log("OpenGL: ARB_framebuffer_object is supported");
glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) wglGetProcAddress("glIsRenderbuffer");
glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) wglGetProcAddress("glBindRenderbuffer");
@ -131,7 +131,7 @@ static bool glew_dynamic_binding()
else
if (strstr(gl_extensions, "EXT_framebuffer_object"))
{
CCLog("OpenGL: EXT_framebuffer_object is supported");
log("OpenGL: EXT_framebuffer_object is supported");
glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) wglGetProcAddress("glIsRenderbufferEXT");
glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) wglGetProcAddress("glBindRenderbufferEXT");
glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) wglGetProcAddress("glDeleteRenderbuffersEXT");
@ -152,8 +152,8 @@ static bool glew_dynamic_binding()
}
else
{
CCLog("OpenGL: No framebuffers extension is supported");
CCLog("OpenGL: Any call to Fbo will crash!");
log("OpenGL: No framebuffers extension is supported");
log("OpenGL: Any call to Fbo will crash!");
return false;
}
}
@ -228,20 +228,20 @@ bool EGLView::initGL()
if (GLEW_ARB_vertex_shader && GLEW_ARB_fragment_shader)
{
CCLog("Ready for GLSL");
log("Ready for GLSL");
}
else
{
CCLog("Not totally ready :(");
log("Not totally ready :(");
}
if (glewIsSupported("GL_VERSION_2_0"))
{
CCLog("Ready for OpenGL 2.0");
log("Ready for OpenGL 2.0");
}
else
{
CCLog("OpenGL 2.0 not supported");
log("OpenGL 2.0 not supported");
}
if(glew_dynamic_binding() == false)

View File

@ -383,7 +383,7 @@ bool Image::initWithString(
if (! dc.setFont(pFontName, nSize))
{
CCLog("Can't found font(%s), use system default", pFontName);
log("Can't found font(%s), use system default", pFontName);
}
// draw text

View File

@ -216,31 +216,31 @@ void TestAds::caseChanged(Object* pSender)
default:
break;
}
CCLog("case selected change to : %s", strLog.c_str());
log("case selected change to : %s", strLog.c_str());
}
void TestAds::typeChanged(Object* pSender)
{
int selectIndex = _typeItem->getSelectedIndex();
_type = (ProtocolAds::AdsType) selectIndex;
CCLog("type selected change to : %d", _type);
log("type selected change to : %d", _type);
}
void TestAds::posChanged(Object* pSender)
{
int selectIndex = _posItem->getSelectedIndex();
_pos = (ProtocolAds::AdsPos) selectIndex;
CCLog("pos selected change to : %d", _pos);
log("pos selected change to : %d", _pos);
}
void MyAdsListener::onAdsResult(AdsResultCode code, const char* msg)
{
CCLog("OnAdsResult, code : %d, msg : %s", code, msg);
log("OnAdsResult, code : %d, msg : %s", code, msg);
}
void MyAdsListener::onPlayerGetPoints(cocos2d::plugin::ProtocolAds* pAdsPlugin, int points)
{
CCLog("Player get points : %d", points);
log("Player get points : %d", points);
// @warning should add code to give game-money to player here

View File

@ -153,7 +153,7 @@ void TestAnalytics::eventMenuCallback(Object* pSender)
case TAG_LOG_ONLINE_CONFIG:
{
PluginParam param("abc");
CCLog("Online config = %s", _pluginAnalytics->callStringFuncWithParam("getConfigParams", &param, NULL).c_str());
log("Online config = %s", _pluginAnalytics->callStringFuncWithParam("getConfigParams", &param, NULL).c_str());
}
break;
case TAG_LOG_EVENT_ID_DURATION:
@ -259,7 +259,7 @@ void TestAnalytics::loadPlugins()
_pluginAnalytics->setSessionContinueMillis(10000);
const char* sdkVer = _pluginAnalytics->getSDKVersion().c_str();
CCLog("SDK version : %s", sdkVer);
log("SDK version : %s", sdkVer);
_pluginAnalytics->callFuncWithParam("updateOnlineConfig", NULL);

View File

@ -170,6 +170,6 @@ void MyIAPOnlineResult::onPayResult(PayResultCode ret, const char* msg, TProduct
MessageBox(goodInfo , msg);
if (ret == kPaySuccess) {
CCLog("Pay success locally, should check the real result by game server!");
log("Pay success locally, should check the real result by game server!");
}
}

View File

@ -215,8 +215,8 @@ void MyUserActionResult::onActionResult(ProtocolUser* pPlugin, UserActionResultC
// get session ID
std::string sessionID = pPlugin->getSessionID();
CCLog("User Session ID of plugin %s is : %s", pPlugin->getPluginName(), sessionID.c_str());
log("User Session ID of plugin %s is : %s", pPlugin->getPluginName(), sessionID.c_str());
std::string strStatus = pPlugin->isLogined() ? "online" : "offline";
CCLog("User status of plugin %s is : %s", pPlugin->getPluginName(), strStatus.c_str());
log("User status of plugin %s is : %s", pPlugin->getPluginName(), strStatus.c_str());
}