TexturePacker的使用(图片打包再一起)

摘要: CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("last.plist","last.png"); CCTexture2D *texture=CCTextureCache::sharedTextureCache()->textureForKey("last.png"); CCSpriteBatchNode *node=CCSpriteBatchNode::createWithTexture(texture); addChild(no 阅读全文
posted @ 2013-04-24 09:40 jack_yan 阅读(535) 评论(0) 推荐(0)

C++操作SQLite数据库

摘要: 准备工作在使用C++操作SQLite之前,需要获得sqlite3.h,sqlite3.lib,sqlite3.dll,大家可以在这里下载。并将这3个文件导入VC++工程中。其中sqlite3.dll文件放到Debug文件夹里。SQLite API介绍int sqlite3_open(char *path,sqlite3 **db)这个函数打开数据库,第一个参数为sqlite文件的地址,第二个参数是sqlite3的指针的指针,也就是二级指针。返回值为SQLITE_OK则成功打开数据库。 sqlite3_close(sqlite3 *db)这个函数关闭数据库,参数是sqlite3的指针。 sqli 阅读全文
posted @ 2013-04-24 09:31 jack_yan 阅读(782) 评论(0) 推荐(0)

抗锯齿

摘要: CCSprite *s= CCSprite::create("xiao.png"); s->getTexture()->setAntiAliasTexParameters(); s->setPosition(ccp(240, 160)); addChild(s); CCActionInterval *ac = CCScaleTo::create(2, 5); s->runAction(ac); 阅读全文
posted @ 2013-04-24 09:28 jack_yan 阅读(171) 评论(0) 推荐(0)