摘要:1 // 2 // GetIPAddress.h 4 // 5 // 6 7 8 #define MAXADDRS 32 9 10 extern char *ip_names[MAXADDRS]; 11 12 void InitAddresses(); 13 void GetIPAddresses(); 14 void GetHWAddresses(); //// GetIPAddress.m//#include "GetIPAddress.h"#include #include #include #include #include #include #i...
阅读全文
摘要:JPEG (jpg),文件头:FFD8FFPNG (png),文件头:89504E47GIF (gif),文件头:47494638TIFF (tif),文件头:49492A00Windows Bitmap (bmp),文件头:424D
阅读全文
摘要:位图字体工具Bitmap Font ToolsBMFont(Windows)FonteditorGlyph DesignerHieroLabelAtlasCreator粒子编辑工具Particle Editing ToolsParticleCreatorParticle Designer物理编辑工具Physics Editing ToolsMekanimoPhysicsBenchPhysicsEditorVertexHelper场景编辑工具Scene Editing ToolsCocosBuilderCocoshopLevelHelper纹理地图集工具Texture Atlas ToolsDa
阅读全文
摘要:原地址:http://cblog.chinadaily.com.cn/blog-942327-4327173.html注:自身以前也写过cocos2d-x如何优化内存的应用,以及内存不够的情况下怎么样处置惩罚游戏。今天在微博中看到有友好简介了下内存,挺详细的。不晓得是谁写的,我纪录下。一,IOS与图片内存在IOS上,图片会被积极缩放到2的N次方大小。例如一张1024*1025的图片,占用的内存与一张1024*2048的图片是一致的。图片占用内存大小的共计的公式是;长*宽*4。何等一张512*512 占用的内存即是 512*512*4 = 1M。其他尺寸以此类推。(ps:IOS上支持的最大尺寸为
阅读全文
摘要:这是根据 cocos2d-x-2.0 修改的。 1 /******************************************************************** 2 * Copyright(C) 2012 Ambition( All rights reserved. ) 3 * Created: 2012/09/18 11:21 4 * File base: HSBaseHttp.h 5 * Author: Ambition 6 * 7 * Purpose: 8 *********...
阅读全文
摘要:直接贴代码: 游戏开发群:44727718如果缺少什么函数,请给下看。。 1 string HSReadData::ReadUTF8() 2 { 3 4 int utflen = ReadShort() & 0xffff; 5 wstring str; 6 str.resize(utflen); 7 vector<char> bytes; 8 bytes.resize(utflen); 9 for (int i=0;i<utflen;++i)10 {11 bytes[i] = this->ReadByte();1...
阅读全文