- 博客(16)
- 收藏
- 关注
原创 A Loki compile problem
I tried to use Loki in VS2005, an error occured when compiling:c:/program files/microsoft visual studio 8/vc/include/xutility(314) : error C2664: bool `anonymous-namespace::CompareFixedAllocatorSi
2006-10-30 18:42:00 1338
原创 Design pattern learning III: Bridge pattern
Gang of Four says: The Bridge pattern is to de-couple an abstraction from its implementation so that the two can vary independently.intent: decouple a set of implementations from the set of object
2006-09-28 19:16:00 1021
原创 const个人小解
例子1:char ch = a;const char * pchar = &ch; // 修改pchar合法,修改*pchar不合法char const * pchar = &ch; // 修改pchar合法,修改*pchar不合法char * const pchar = &ch; // 修改pchar不合法,修改*pchar合法然后例子2:const
2006-09-13 22:37:00 1415 3
原创 还原DXT1格式的DDS文件(S3TC系列1)
//---------------------------------------------------------// 1 区域划分//---------------------------------------------------------DXT1是将原始图片划分成4×4的小方格。不足4的部分按4计算。比如一张宽7个象素高5个象素的图,就按以下方式划分: 0 1 2
2006-09-11 17:18:00 2932 1
原创 "COM as a better C++"读后小结
为什么要做这么多:dynamic composable systemcompiler-independent1:类的声明和实现的分离在h中定义接口,在CPP中定义实现2:仅向用户暴露接口在h中定义基类,仅包含纯虚函数声明,同时提供virtual destroy()方法而不把析构函数声明为虚;同时声明创建子类的方法,并返回基类指针;3:运行时多态由于接口和实现的完全分离,
2006-07-20 15:21:00 1188
转载 Microsoft Specific
Microsoft SpecificThe extended attribute syntax for specifying storage-class information uses the __declspec keyword, which specifies that an instance of a given type is to be stored with a Microsof
2006-06-14 14:09:00 949
原创 Design pattern learning II: Adapter pattern
GoF says:Convert the interface of a class into another interface that the clients expect. Adapter lets classes work together that could not otherwise because of incompatible interfaces.Basicly, this
2006-05-30 01:19:00 1003
原创 Design pattern learning I: Facade pattern
Gang of Four says: Provide a unified interface to a set of interfaces in subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.Facade pattern enables us to use a
2006-05-27 02:01:00 1136
翻译 Dead Reckoning: 在网络游戏中消除延时影响
原文来自Gamasutra的Dead Reckoning: Latency Hiding for Networked Games,作者是Jesse Aronson。可以通过这个地址http://www.gamasutra.com/features/19970919/aronson_01.htm查看该文章(可能需要先登陆到Gamasutra),或者通过文章名到Google上查找其他转贴。翻译的不
2006-05-26 21:16:00 8439 2
原创 一个清爽便利的Windows游戏窗口
因为最早做的一个游戏DEMO是全屏加上鼠标独占,而且不能全屏/窗口切换,加上自己做的游戏又粗糙,感觉极为不爽。现在想想,其实当我玩游戏的时候,我是喜欢窗口化的,可以随便拖动,这样玩游戏的时候也可以兼做其他事情,而且鼠标一定不能独占,最好是要放进去是个性化鼠标,移出来又是系统鼠标。如果要做这样一个窗口,可以把以下这几个地方改一下。先让VC.NET去生成一个Win32 Project,然后Appl
2006-05-19 00:20:00 1623
原创 我对core文件资料的收集整理
//---------------------------------------------------------------1. core文件的简单介绍//---------------------------------------------------------------在一个程序崩溃时,它一般会在指定目录下生成一个core文件。core文件仅仅是一个内存映象(同时加上调试信息
2006-04-18 22:04:00 4022 2
原创 C stream XML parser: expat
传说中基于流的C-xml解析库前面提到bticore,原先的选择是--enable-all-libs,结果某台机器上configure不过,提示需要expat的版本需要到1.95.6下载地址:http://switch.dl.sourceforge.net/sourceforge/expat/expat-1.95.6.tar.gz中文介绍资料:http://www.huihoo.com/gnu_l
2006-04-14 15:40:00 1328
原创 学习写Makefile
根据教程写的一个很简单的makefile,有了一些基本功能,TARGETS = mainSOURCES := $(wildcard *.cpp)OBJECTS := $(patsubst %.cpp, %.o, $(SOURCES))DEPENDS := $(patsubst %.o, %.d, $(OBJECTS))MISSIN
2006-04-11 22:22:00 994
原创 基于SSH的LINUX间文件传送
把一个文件从机器B(e.g.: 222.222.222.222 user2)传递到机器A(e.g.: 111.111.111.111 user1),假定现在登陆了A,有两个途径:1. 如果现在在A上,那么从A上登陆到机器B,然后从B上往A发ssh -l user2 222.222.222.222然后输入user2的密码,登陆成功后进到文件(e.g.: xxx.tar.gz)所在目录scp xx
2006-04-10 18:39:00 1135
原创 Linux下bti库的编译过程
写在前面:作为菜鸟,深受某些不完整的中文教程之苦,有问题还是多研究官网的说明,啃英文是麻烦但是能保证正确,所以我这篇,写完了当做个日记,仅供参考,不足为信具体步骤:1.进入BTI的官网www.bti.net,查看Core Code Library,获取最新版本http://www.bti.net/downloads/bti_core_lib.tar.gz,我把它放在我机器上的/home/ala
2006-04-07 23:44:00 934
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人