c++
iteye_15836
这个作者很懒,什么都没留下…
展开
-
CCRenderTexture截取指定区域图片
-- 记录截取目标的原始坐标local x, y = self._nodeRender:getPosition()-- 截取区域local size = CCSizeMake(376, 1122)local pRender = CCRenderTexture:create(size.width,size.height,kCCTexture2DPixelFormat_RGBA88...2015-09-23 11:40:59 · 373 阅读 · 0 评论 -
C++泛型容器类
template <class T>class wrapped_vector {private: std::vector<T> elements;public: wrapped_vector(size_t size = 20) { elements.resize(size); } typen...原创 2014-04-25 11:26:04 · 212 阅读 · 0 评论 -
C++伪GUID
static inline int secondNow() { struct timeval v; gettimeofday(&v, (struct timezone *) NULL); /* Unix Epoch time (time since January 1, 1970 (UTC)) */ return v.tv_sec + v.tv_u...原创 2014-04-25 11:28:34 · 122 阅读 · 0 评论 -
cocos2d-x获取设备信息
DeviceUtils.h //// DeviceUtils.h// gamemoom//// Created by Song on 14-8-20.////#ifndef __gamemoom__DeviceUtils__#define __gamemoom__DeviceUtils__#include <iostream&g...2014-08-20 15:09:49 · 1827 阅读 · 0 评论