摘要:在我的Framework中的错误。 我最先的设计是 Initialize Restore InitEntry 然后我 继承这个类,然后我重写 InitEntry, 这样,我就可以在子类里控制初始化过程。 但是 由于恢复是提前调用, 而我还错误的认为 InitEntry先于 Restore执行,于是我在InitEntry中做了初始化,而在子类的Restore入口里调用加载任务,于是找不到设备,...
阅读全文
摘要:游戏和游戏引擎 今天对游戏和游戏引擎的关系,可以说有个更新的认识了,比起刚学游戏编程的时候还不知道什么是游戏引擎。 2003年的时候,下面是大意,我已经记不住了: 我自己跟自己问了几个问题?这几个问题是这样的。 1.什么是游戏引擎? 2.游戏引擎和游戏什么关系? 3.游戏引擎都由哪几个部分组成。 可能还有更多问题,该死的GameRes Blog上不去了,早晚我要搬家。 当时,我...
阅读全文
摘要:虽然 VC2003可以将 VC6的项目文件转换,但是似乎对于一些特殊的VC6项目转换并不彻底。例如 DirectX Show里的 Player下的 PlayWnd, 如果直接转换,可能会出现 找不到 ATL::AtlWinModule的问题。 而且可能这种错误回因为 编译环境的不同而不同。既然编译有问题,那我们可以 重新建立项目文件,然后重新编译,一般这样可以很好的解决问题。
阅读全文
摘要:来自微软的 Donuts//-----------------------------------------------------------------------------// File: FileWatch.cpp//// Copyright (C) Microsoft Corporation. All Rights Reserved.//-----------------------...
阅读全文
摘要:DirectX SDK资料问题。 Microsoft® DirectX® 9.0 SDK Update (Summer 2003) 或 Microsoft DirectX SDK (April 2006) 里的 资料和例子。 Microsoft DirectX SDK (April 2006)的文档 在 J:\Program Files\Microsoft DirectX SDK (A...
阅读全文
摘要://三螺曲线int DrawThreeSnailCurve(Graphics* grp,int *CtrlPoint){ Pen pen(Color(255,0,255,0),1); Point p[] = {Point(200,150), //P Point(CtrlPoint[0],CtrlPoint[1]),Point(200,100), ...
阅读全文
摘要:国内开源游戏 介绍,为中国游戏助力。 作者:不夜人QQ:39974907MSN:jin_ke@hotmail.comE_mail:chenjinke@21cn.com 下载:http://show.gameres.com/ChaosArena/ChaosArena.rar (执行程式,107MB) http://show.gameres.com/ChaosArena/Client.ra...
阅读全文
摘要:float rota = 0.0f;float zrota = 1.0f; int c1 = 100;int c2 = 200;int tmp = 0;int step = -200; int Render(){ if(step > 800){ step = -200; InvalidateRect(hWnd,&rect,true); } Graphics grap...
阅读全文
摘要:float rota = 0.0f;float zrota = 1.0f; int Render(){ if(rota > 10.0f || rota < -60.0f){ zrota = -zrota; } Graphics graphics(hdc); GraphicsPath path; Pen pen(Color(255,0,255,0),1); SolidBrush s...
阅读全文
摘要:const cpxn = 700;const cpyn = 100;int zpyn = 30;int zpxn = 30; int cpx = cpxn;int cpy = cpyn;bool bs = false; int Render(){ if(i>100){ i = 0; InvalidateRect(hWnd,&rect,true); } if(cpx 700...
阅读全文
摘要:const cpxn = -400;int cpx = cpxn; int Render(){ if(i>100){ i = 0; InvalidateRect(hWnd,&rect,true); } if(cpx > 600){ cpx = cpxn; } //InvalidateRect(hWnd,&rect,true); Graphics graphics(...
阅读全文
摘要:包含gdiplus头#include using namespace Gdiplus;引用lib #pragma comment(lib,"gdiplus.lib")为了使用GDI要在 WinMain里 初始化设置 GDIint WINAPI WinMain(){ GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplu...
阅读全文
摘要:int x = 200;int y = 200;int L = 50; int DrawEllipse(int x,int y,int width,int height){ Arc(hdc,x,y,x+width,y+height,x/2,y,x/2,y); return 0;} //LineTo(hdc,1024,690) - 屏幕宽高int Render(){ x = rand()%...
阅读全文
摘要:HPEN hPen = NULL;HBRUSH hBrh = NULL; HDC hdc = NULL;RECT rect;int i = 0;//初始化画笔画刷等int InitGDI(){ hdc = GetDC(hWnd); hPen = CreatePen(PS_SOLID,2,RGB(255,0,0)); SelectObject(hdc,hPen); GetWindowRect...
阅读全文