diff --git a/.gitignore b/.gitignore index 0c259446..2080b392 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,8 @@ -/demo - /include /lib /doc -/vc6 +/publish diff --git a/7z.dll b/7z.dll new file mode 100644 index 00000000..cea996e4 Binary files /dev/null and b/7z.dll differ diff --git a/7z.exe b/7z.exe new file mode 100644 index 00000000..b55fefe6 Binary files /dev/null and b/7z.exe differ diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..d23a48df --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +misakamm misakamm starts the EGE project and complete all the source codes of ege-13.04 \ No newline at end of file diff --git a/CONTRIBUTORS b/CONTRIBUTORS new file mode 100644 index 00000000..b614ae7c --- /dev/null +++ b/CONTRIBUTORS @@ -0,0 +1,2 @@ +Cui Yidong Rearrange the build structure (13.04.02) +Zhou Sida contribute 5 dialog input functions (13.04.01) \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..b1369190 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ +To Be Determined \ No newline at end of file diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..de4b963d --- /dev/null +++ b/ChangeLog @@ -0,0 +1,15 @@ +2015-03-29 [version 13.04.02 released] + * Fix: Dev-C++ compiler complaints: the GCC __attribute__ should follow 'struct' + * Misc: add ChangeLog, AUTHORS, COPYING, README + +2015-02-09 [version 13.04.01 released] + * Feature: add 5 functions to enhance input which is needed by newbies of C/C++ + * Fix: add VC++2013 support + * Fix: remove VC++6.0 support + * Fix: support mingw-4.7.2 / mingw-4.8.1 / mingw64-3.3.0(gcc 4.9.2) + * Misc: reorgnize the batch scripts of building ege lib + +~2015 [version 13.04] + * Author: misakamm[at gmail com] + * Blog: http://misakamm.com + * Homepage: http://misakamm.github.com/xege/ \ No newline at end of file diff --git a/README b/README new file mode 100644 index 00000000..eabcedd7 --- /dev/null +++ b/README @@ -0,0 +1,52 @@ +/* +** Filename: README +** Version: 13.04.02-20150329 +*/ + +/* +* EGE (Easy Graphics Engine) +* HomePage1 http://misakamm.github.com/xege/ +* HomePage2 https://misakamm.bitbucket.org/index.htm +* HomePage3 http://tcgraphics.sourceforge.net +* HomePage4 http://tcgraphics.svn.sourceforge.net/viewvc/tcgraphics/index.htm +* mailing list https://lists.sourceforge.net/lists/listinfo/tcgraphics-faqs +* teiba1 http://tieba.baidu.com/f?kw=ege +* teiba2 http://tieba.baidu.com/f?kw=ege%C4%EF +* resource http://code.google.com/p/misaka/downloads/list +* Blog: http://misakamm.com +* E-Mail: mailto:misakamm[at gmail com] +* 详细帮助文档,在压缩包里的man目录下,用浏览器打开index.htm就可以看到了 +*/ + +EGE图形库 + +  EGE(Easy Graphics Engine),是windows下的简易绘图库,是一个类似BGI(graphics.h)的面向C/C++语言新手的图形库,它的目标也是为了替代TC的BGI库而存在。它的使用方法与TC中的graphics.h相当接近,对新手来说,简单,友好,容易上手,免费开源,而且因为接口意义直观,即使是之前完全没有接触过图形编程的,也能迅速学会基本的绘图。 目前,EGE图形库已经完美支持VC6, VC2008, VC2010, C-Free, DevCpp, Code::Blocks, CodeLite, Dev-C++, Eclipse for C/C++等IDE,即支持使用MinGW为编译环境的IDE。如果你需要在VC下使用graphics.h,那么ege将会是很好的替代品。 + +为什么要写这个库? +  许多学编程的都是从 C 语言开始入门的,而目前的现状是: +  1. 有些学校以 Turbo C 为环境讲 C 语言,只是 Turbo C 的环境实在太老了,复制粘贴都很不方便。并且dos环境在现在的操作系统支持很有限,并且dos下可用颜色数太少。 +  2. 有些学校直接拿 VC 来讲 C 语言,因为 VC 的编辑和调试环境都很优秀,并且 VC 有适合教学的免费版本。可惜初学者在 VC 下一般只会做一些文字性的练习题,想画条直线画个圆都很难,还要注册窗口类、建消息循环等等,初学者会受严重打击的,甚至有初学者以为C只能在“黑框”下使用。 +  3. 还有计算机图形学,这门课程的重点是绘图算法,而不是 Windows 编程。所以,许多老师不得不用 TC 教学,因为 Windows 绘图太复杂了,会偏离教学的重点。新的图形学的书有不少是用的 OpenGL,可是门槛依然很高。 +  如果您刚开始学 C 语言,或者您是一位教C语言的老师,再或者您在教计算机图形学,那么这个库一定会让您兴奋的。采用ege图形库,您将可以在VC的环境中方便的处理和生成图像,甚至制作动画和游戏。 + +ege图形库的优点 +  ★效率较好 特别在窗口锁定绘图模式下,640*480的半透明混合,可以直接使用 getpixel / putpixel 完成,并且优化后可以在大约1.5G CPU台式机器上达到60fps (60帧/秒) +  ★灵活性强 绘图可以直接针对一个PIMAGE,或者画在控件上,不必只能画在屏幕上 +  ★功能更多 支持拉伸贴图,支持图片旋转,支持透明半透明贴图,支持图像模糊滤镜操作,可以用对话框函数进行图形化的输入,可以方便地对帧率进行准确的控制,可以读取常见的流行的图片格式(bmp/jpg/png),可以保存图片为bmp或png格式。 +  ★免费开源 本图形库为免费开源的图形库,你不但可以获取本图形库的全部源代码,你也可以参与到本图形库的开发,详情请联系作者misakamm + +ege简要使用说明 +  目前模拟了绝大多数 BGI 的绘图函数。使用上,基本的绘图函数和 TC / BC 没太大区别。看一个画圆的例子吧: +#include "graphics.h" // 就是需要引用这个图形库 +int main() +{ + initgraph(640, 480); // 初始化,显示一个窗口,这里和 TC 略有区别 + circle(200, 200, 100); // 画圆,圆心(200, 200),半径 100 + getch(); // 暂停一下等待用户按键 + closegraph(); // 关闭图形界面 + return 0; +} +  呵呵,很简单吧。更详细的请参阅ege文档。 + +ege的将来 +  目前ege项目之下,有另一个项目Xege,x代表x-window,意为跨越支持x-window的平台(主要为linux系统)。Xege将发展为一个强大的,开源的,跨平台的,同时也同样简单易上手的图形库。目前Xege在开发中。 diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..35ab86e8 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +13.04.02 \ No newline at end of file diff --git a/copyvc6.bat b/copyvc6.bat deleted file mode 100644 index 6233f74a..00000000 --- a/copyvc6.bat +++ /dev/null @@ -1,15 +0,0 @@ -call setver -set path=C:\Program Files\7-Zip -set pubpath=pub/%egever%/bin - -copy include\* vc6\VC98\Include\ -mkdir vc6\VC98\Include\ege -copy include\ege\* vc6\VC98\Include\ege\ -copy lib\vc6\* vc6\VC98\Lib\ -mkdir "%pubpath%" -del /Q "%pubpath%\vc6_ege%egever%.7z" -7z a -t7z -bd -mx=9 -ms=on "%pubpath%\vc6_ege%egever%.7z" "vc6\*" -if not "%EGE_NOPAUSE%" == "1" ( - pause -) - diff --git a/copyziplib.bat b/copyziplib.bat deleted file mode 100644 index c124db7e..00000000 --- a/copyziplib.bat +++ /dev/null @@ -1,12 +0,0 @@ -call setver -set path=C:\Program Files\7-Zip -set pubpath=pub/%egever%/bin -mkdir "%pubpath%" -del /Q "%pubpath%\ege%egever%.zip" -7z a -tzip -bd -mx=9 -mm=LZMA "%pubpath%\ege%egever%.zip" "lib\*" "include\*" "说明.txt" "demo\src\*" "man\*" -del /Q "%pubpath%\ege%egever%.7z" -7z a -t7z -bd -mx=9 -ms=on "%pubpath%\ege%egever%.7z" "lib\*" "include\*" "说明.txt" "demo\src\*" "man\*" -if not "%EGE_NOPAUSE%" == "1" ( - pause -) - diff --git a/copyzipman.bat b/copyzipman.bat deleted file mode 100644 index 2013ad9c..00000000 --- a/copyzipman.bat +++ /dev/null @@ -1,11 +0,0 @@ -call setver -set path=C:\Program Files\7-Zip -set pubpath=pub/%egever%/man -mkdir "%pubpath%" - -del /Q "%pubpath%\egeman%egever%.7z" -7z a -t7z -bd -mx=9 -ms=on "%pubpath%\egeman%egever%.7z" "man\*" -if not "%EGE_NOPAUSE%" == "1" ( - pause -) - diff --git a/copyzipsrc.bat b/copyzipsrc.bat deleted file mode 100644 index a8ecf115..00000000 --- a/copyzipsrc.bat +++ /dev/null @@ -1,16 +0,0 @@ -call setver - -cd src -call clear -cd .. - -set path=C:\Program Files\7-Zip -set pubpath=pub/%egever%/src -mkdir "%pubpath%" - -del /Q "%pubpath%\egesrc%egever%.7z" -7z a -t7z -bd -mx=9 -ms=on "%pubpath%\egesrc%egever%.7z" "src\*" -if not "%EGE_NOPAUSE%" == "1" ( - pause -) - diff --git a/demo/MandelbrotSetBase.dev b/demo/MandelbrotSetBase.dev new file mode 100644 index 00000000..f194ad5e --- /dev/null +++ b/demo/MandelbrotSetBase.dev @@ -0,0 +1,62 @@ +[Project] +FileName=MandelbrotSetBase.dev +Name=MandelbrotSetBase +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=MandelbrotSetBase.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\MandelbrotSetBase.cpp +CompileCpp=1 +Folder=MandelbrotSetBase +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/ege5star.dev b/demo/ege5star.dev new file mode 100644 index 00000000..71a9849b --- /dev/null +++ b/demo/ege5star.dev @@ -0,0 +1,62 @@ +[Project] +FileName=ege5star.dev +Name=ege5star +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=ege5star.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\ege5star.cpp +CompileCpp=1 +Folder=ege5star +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egearrow.dev b/demo/egearrow.dev new file mode 100644 index 00000000..ce59d7be --- /dev/null +++ b/demo/egearrow.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egearrow.dev +Name=egearrow +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egearrow.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egearrow.cpp +CompileCpp=1 +Folder=egearrow +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egeball.dev b/demo/egeball.dev new file mode 100644 index 00000000..2896f024 --- /dev/null +++ b/demo/egeball.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egeball.dev +Name=egeball +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egeball.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egeball.cpp +CompileCpp=1 +Folder=egeball +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egeball2.dev b/demo/egeball2.dev new file mode 100644 index 00000000..555b57d1 --- /dev/null +++ b/demo/egeball2.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egeball2.dev +Name=egeball2 +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler=-finput-charset=UTF-8_@@_ +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egeball2.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egeball2.cpp +CompileCpp=1 +Folder=egeball2 +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egecatharine.dev b/demo/egecatharine.dev new file mode 100644 index 00000000..2d3d329c --- /dev/null +++ b/demo/egecatharine.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egecatharine.dev +Name=egecatharine +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egecatharine.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egecatharine.cpp +CompileCpp=1 +Folder=egecatharine +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egeclock.dev b/demo/egeclock.dev new file mode 100644 index 00000000..affda731 --- /dev/null +++ b/demo/egeclock.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egeclock.dev +Name=egeclock +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egeclock.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egeclock.cpp +CompileCpp=1 +Folder=egeclock +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egefilter_ball.dev b/demo/egefilter_ball.dev new file mode 100644 index 00000000..9a833f49 --- /dev/null +++ b/demo/egefilter_ball.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egefilter_ball.dev +Name=egefilter_ball +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egefilter_ball.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egefilter_ball.cpp +CompileCpp=1 +Folder=egefilter_ball +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egejulia.dev b/demo/egejulia.dev new file mode 100644 index 00000000..4ae857e6 --- /dev/null +++ b/demo/egejulia.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egejulia.dev +Name=egejulia +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egejulia.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egejulia.cpp +CompileCpp=1 +Folder=egejulia +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egelines.dev b/demo/egelines.dev new file mode 100644 index 00000000..eb4176d8 --- /dev/null +++ b/demo/egelines.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egelines.dev +Name=egelines +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egelines.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egelines.cpp +CompileCpp=1 +Folder=egelines +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egemouseball.dev b/demo/egemouseball.dev new file mode 100644 index 00000000..a8126054 --- /dev/null +++ b/demo/egemouseball.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egemouseball.dev +Name=egemouseball +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egemouseball.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egemouseball.cpp +CompileCpp=1 +Folder=egemouseball +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egemousetest.dev b/demo/egemousetest.dev new file mode 100644 index 00000000..cb12e858 --- /dev/null +++ b/demo/egemousetest.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egemousetest.dev +Name=egemousetest +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egemousetest.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egemousetest.cpp +CompileCpp=1 +Folder=egemousetest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egenet.dev b/demo/egenet.dev new file mode 100644 index 00000000..49f8d0fa --- /dev/null +++ b/demo/egenet.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egenet.dev +Name=egenet +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egenet.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egenet.cpp +CompileCpp=1 +Folder=egenet +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egerotateimage.dev b/demo/egerotateimage.dev new file mode 100644 index 00000000..b2ac2b0b --- /dev/null +++ b/demo/egerotateimage.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egerotateimage.dev +Name=egerotateimage +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egerotateimage.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egerotateimage.cpp +CompileCpp=1 +Folder=egerotateimage +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egesnake.dev b/demo/egesnake.dev new file mode 100644 index 00000000..0cdc0d80 --- /dev/null +++ b/demo/egesnake.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egesnake.dev +Name=egesnake +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egesnake.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egesnake.cpp +CompileCpp=1 +Folder=egesnake +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egestar.dev b/demo/egestar.dev new file mode 100644 index 00000000..eaef22d8 --- /dev/null +++ b/demo/egestar.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egestar.dev +Name=egestar +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egestar.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egestar.cpp +CompileCpp=1 +Folder=egestar +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egetetris.dev b/demo/egetetris.dev new file mode 100644 index 00000000..6b34897f --- /dev/null +++ b/demo/egetetris.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egetetris.dev +Name=egetetris +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egetetris.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egetetris.cpp +CompileCpp=1 +Folder=egetetris +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egetriangle.dev b/demo/egetriangle.dev new file mode 100644 index 00000000..d2ee771b --- /dev/null +++ b/demo/egetriangle.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egetriangle.dev +Name=egetriangle +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egetriangle.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egetriangle.cpp +CompileCpp=1 +Folder=egetriangle +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/demo/egetypegame.dev b/demo/egetypegame.dev new file mode 100644 index 00000000..69430bb1 --- /dev/null +++ b/demo/egetypegame.dev @@ -0,0 +1,62 @@ +[Project] +FileName=egetypegame.dev +Name=egetypegame +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=egetypegame.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\egetypegame.cpp +CompileCpp=1 +Folder=egetypegame +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/src/demo/MandelbrotSetBase.cpp b/demo/src/MandelbrotSetBase.cpp similarity index 99% rename from src/demo/MandelbrotSetBase.cpp rename to demo/src/MandelbrotSetBase.cpp index e831f1ff..295387d0 100644 --- a/src/demo/MandelbrotSetBase.cpp +++ b/demo/src/MandelbrotSetBase.cpp @@ -1,4 +1,3 @@ -//鼠标放大mandelbrot集演示 #include // 定义常量 diff --git a/src/demo/ege5star.cpp b/demo/src/ege5star.cpp similarity index 71% rename from src/demo/ege5star.cpp rename to demo/src/ege5star.cpp index 03f3fbf2..b85220bb 100644 --- a/src/demo/ege5star.cpp +++ b/demo/src/ege5star.cpp @@ -1,36 +1,33 @@ -// 鏃嬭浆浜旇鏄熷姩鐢绘紨绀虹▼搴 -#include -#include -#include -#include - -void paintstar(double x, double y, double r, double a) -{ - int pt[10]; - for (int n = 0; n < 5; ++n) - { - pt[n*2] = (int)( -cos( PI * 4 / 5 * n + a ) * r + x ); - pt[n*2+1] = (int)( sin( PI * 4 / 5 * n + a) * r + y ); - } - fillpoly(5, pt); -} - -int main() -{ - initgraph( 640, 480 ); - setrendermode(RENDER_MANUAL); - double r = 0; - fps f; - for ( ; is_run(); delay_fps(1000) ) - { - r += 0.02; - if (r > PI * 2) r -= PI * 2; - - cleardevice(); - setcolor( RGB(0xff, 0xff, 0xff) ); - setfillcolor( RGB(0, 0, 0xff) ); - paintstar(300, 200, 100, r); - } - return 0; -} - +#include +#include +#include + +void paintstar(double x, double y, double r, double a) +{ + int pt[10]; + for (int n = 0; n < 5; ++n) + { + pt[n*2] = (int)( -cos( PI * 4 / 5 * n + a ) * r + x ); + pt[n*2+1] = (int)( sin( PI * 4 / 5 * n + a) * r + y ); + } + fillpoly(5, pt); +} + +int main() +{ + initgraph( 640, 480 ); + setcolor( RGB(0xff, 0xff, 0xff) ); + setfillcolor( RGB(0, 0, 0xff) ); + setrendermode(RENDER_MANUAL); + double r = 0; + for ( ; is_run(); delay_fps(60) ) + { + r += 0.02; + if (r > PI * 2) r -= PI * 2; + + cleardevice(); + paintstar(300, 200, 100, r); + } + return 0; +} + diff --git a/src/demo/egearrow.cpp b/demo/src/egearrow.cpp similarity index 92% rename from src/demo/egearrow.cpp rename to demo/src/egearrow.cpp index 44bf8c4b..efbf4118 100644 --- a/src/demo/egearrow.cpp +++ b/demo/src/egearrow.cpp @@ -1,32 +1,31 @@ -// 鐢荤澶寸畻娉曟紨绀哄皬绋嬪簭 -#include -#include - -void draw_arrow(float sx, float sy, - float ex, float ey, - float r, float len) { - float c = cos(r), s = sin(r); - float dx = sx - ex, dy = sy - ey; - ege_line(sx, sy, ex, ey); - ege_point points[3] = { - ex, ey, - len * (dx * c + dy * s) + ex, - len * (-dx * s + dy * c) + ey, - len * (dx * c - dy * s) + ex, - len * (dx * s + dy * c) + ey - }; - ege_fillpoly(3, points); -} - -int main( void ) { - initgraph(640, 480); - ege_enable_aa(true); - setcolor(EGEARGB(0xff, 0xff, 0xff, 0xff)); - setfillcolor(EGEARGB(0xff, 0xff, 0x0, 0xff)); - setlinewidth(2.0f); - draw_arrow(100.0f, 100.0f, 300.0f, 150.0f, - (float)(PI/8), 0.2f); - getch(); - return 0; -} - +#include +#include + +void draw_arrow(float sx, float sy, + float ex, float ey, + float r, float len) { + float c = cos(r), s = sin(r); + float dx = sx - ex, dy = sy - ey; + ege_line(sx, sy, ex, ey); + ege_point points[3] = { + ex, ey, + len * (dx * c + dy * s) + ex, + len * (-dx * s + dy * c) + ey, + len * (dx * c - dy * s) + ex, + len * (dx * s + dy * c) + ey + }; + ege_fillpoly(3, points); +} + +int main( void ) { + initgraph(640, 480); + ege_enable_aa(true); + setcolor(EGEARGB(0xff, 0xff, 0xff, 0xff)); + setfillcolor(EGEARGB(0xff, 0xff, 0x0, 0xff)); + setlinewidth(2.0f); + draw_arrow(100.0f, 100.0f, 300.0f, 150.0f, + (float)(PI/8), 0.2f); + getch(); + return 0; +} + diff --git a/src/demo/egeball.cpp b/demo/src/egeball.cpp similarity index 90% rename from src/demo/egeball.cpp rename to demo/src/egeball.cpp index b7637e10..d8ddd70d 100644 --- a/src/demo/egeball.cpp +++ b/demo/src/egeball.cpp @@ -1,145 +1,142 @@ -// 寮圭悆鐗╃悊纰版挒婕旂ず - -#include -#include -#include - -#define myrand(m) ((float)random(10000) * m / 10000.0f) -#define IsCrash(a, b) ((a.x - b.x)*(a.x - b.x)+(a.y - b.y)*(a.y - b.y) < (a.r + b.r)*(a.r + b.r)) -#define IsWEdge(a) (a.x < a.r || a.x >= 640-a.r) -#define IsHEdge(a) (a.y < a.r || a.y >= 480-a.r) -#define IsEdge(a) (IsWEdge(a) || IsHEdge(a)) -#define Distance(x1, y1, x2, y2) (((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))) - - -typedef struct { - float x, y; - float vx, vy; - int r; - int color; -} Obj; - - -//瀹氫箟涓涓狝niObj绫 -class AniObj { -public: - AniObj() { - n = 8; - int i, j; - bool goon; - for ( i = 0; i < n; i++ ) { - do { - goon = false; - obj[i].x = ( float )random( getwidth() ); - obj[i].y = ( float )random( getheight() ); - obj[i].r = random( 40 ) + 20; - if ( IsEdge( obj[i] ) ) - goon = true; - else if ( i != 0 ) - for ( j = i - 1; j >= 0; j-- ) - if ( IsCrash( obj[i], obj[j] ) ) { - goon = true; - break; - } - } while ( goon ); - obj[i].vx = obj[i].vy = 0.0f; - obj[i].color = EGEAGRAY( 0xff, HSVtoRGB( myrand( 360.0f ), 1.0f, 1.0f ) ); - } - } - - //鏇存柊浣嶇疆绛夌浉鍏冲睘鎬 - void updateobj() { - int i, j; - for ( i = 0; i < n; i++ ) { - obj[i].vy += 0.05f; - obj[i].x += obj[i].vx; - obj[i].y += obj[i].vy; - if ( obj[i].y >= 480 - obj[i].r && obj[i].vy > 0 ) { - obj[i].y -= obj[i].vy; - obj[i].vy = - obj[i].vy; - } - if ( obj[i].x < obj[i].r && obj[i].vx < 0 ) obj[i].vx = - obj[i].vx; - if ( obj[i].x >= 640 - obj[i].r && obj[i].vx > 0 ) obj[i].vx = - obj[i].vx; - } - for ( i = 1; i < n; i++ ) - for ( j = i - 1; j >= 0; j-- ) - if ( IsCrash( obj[i], obj[j] ) && - ( Distance( obj[i].x, obj[i].y, obj[j].x, obj[j].y ) > - Distance( obj[i].x + obj[i].vx, obj[i].y + obj[i].vy, obj[j].x + obj[j].vx, obj[j].y + obj[j].vy ) - ) - ) - Crash( obj[i], obj[j] ); - } - - //鏍规嵁灞炴у肩粯鐢 - void drawobj() { - for ( int i = 0; i < n; i++ ) { - setfillcolor( obj[i].color ); - ege_fillellipse( obj[i].x - obj[i].r, obj[i].y - obj[i].r, - obj[i].r * 2, obj[i].r * 2 ); - } - } - - ~AniObj() { - } - -private: - void Crash( Obj &a, Obj &b ) { - float ma = a.r * a.r, mb = b.r * b.r; - - float sx = a.x - b.x; - float sy = a.y - b.y; - float s1x = sx / sqrt( sx*sx + sy*sy ); - float s1y = sy / sqrt( sx*sx + sy*sy ); - float t1x = -s1y; - float t1y = s1x; - - float vas = a.vx * s1x + a.vy * s1y; - float vat = a.vx * t1x + a.vy * t1y; - float vbs = b.vx * s1x + b.vy * s1y; - float vbt = b.vx * t1x + b.vy * t1y; - - float vasf = ( 2 * mb * vbs + vas * ( ma - mb ) ) / ( ma + mb ); - float vbsf = ( 2 * ma * vas - vbs * ( ma - mb ) ) / ( ma + mb ); - - float nsx = vasf * s1x; - float nsy = vasf * s1y; - float ntx = vat * t1x; - float nty = vat * t1y; - - a.vx = nsx + ntx; - a.vy = nsy + nty; - - nsx = vbsf * s1x; - nsy = vbsf * s1y; - ntx = vbt * t1x; - nty = vbt * t1y; - - b.vx = nsx + ntx; - b.vy = nsy + nty; - } - -private: - Obj obj[20]; - int n; -}; - -int main() { - setinitmode( INIT_ANIMATION ); - initgraph( 640, 480 ); - randomize(); //鍒濆鍖栭殢鏈虹瀛 - - AniObj aniobj; //瀹氫箟瀵硅薄 - fps f; - ege_enable_aa( true ); - - for ( ; is_run(); delay_fps( 120 ) ) { - aniobj.updateobj(); //鏇存柊浣嶇疆 - cleardevice(); - aniobj.drawobj(); //缁樼敾 - } - - closegraph(); - return 0; -} - +#include +#include +#include + +#define myrand(m) ((float)random(10000) * m / 10000.0f) +#define IsCrash(a, b) ((a.x - b.x)*(a.x - b.x)+(a.y - b.y)*(a.y - b.y) < (a.r + b.r)*(a.r + b.r)) +#define IsWEdge(a) (a.x < a.r || a.x >= 640-a.r) +#define IsHEdge(a) (a.y < a.r || a.y >= 480-a.r) +#define IsEdge(a) (IsWEdge(a) || IsHEdge(a)) +#define Distance(x1, y1, x2, y2) (((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))) + + +typedef struct { + float x, y; + float vx, vy; + int r; + int color; +} Obj; + + +//定义一个AniObj类 +class AniObj { +public: + AniObj() { + n = 8; + int i, j; + bool goon; + for ( i = 0; i < n; i++ ) { + do { + goon = false; + obj[i].x = ( float )random( getwidth() ); + obj[i].y = ( float )random( getheight() ); + obj[i].r = random( 40 ) + 20; + if ( IsEdge( obj[i] ) ) + goon = true; + else if ( i != 0 ) + for ( j = i - 1; j >= 0; j-- ) + if ( IsCrash( obj[i], obj[j] ) ) { + goon = true; + break; + } + } while ( goon ); + obj[i].vx = obj[i].vy = 0.0f; + obj[i].color = EGEAGRAY( 0xff, HSVtoRGB( myrand( 360.0f ), 1.0f, 1.0f ) ); + } + } + + //更新位置等相关属性 + void updateobj() { + int i, j; + for ( i = 0; i < n; i++ ) { + obj[i].vy += 0.05f; + obj[i].x += obj[i].vx; + obj[i].y += obj[i].vy; + if ( obj[i].y >= 480 - obj[i].r && obj[i].vy > 0 ) { + obj[i].y -= obj[i].vy; + obj[i].vy = - obj[i].vy; + } + if ( obj[i].x < obj[i].r && obj[i].vx < 0 ) obj[i].vx = - obj[i].vx; + if ( obj[i].x >= 640 - obj[i].r && obj[i].vx > 0 ) obj[i].vx = - obj[i].vx; + } + for ( i = 1; i < n; i++ ) + for ( j = i - 1; j >= 0; j-- ) + if ( IsCrash( obj[i], obj[j] ) && + ( Distance( obj[i].x, obj[i].y, obj[j].x, obj[j].y ) > + Distance( obj[i].x + obj[i].vx, obj[i].y + obj[i].vy, obj[j].x + obj[j].vx, obj[j].y + obj[j].vy ) + ) + ) + Crash( obj[i], obj[j] ); + } + + //根据属性值绘画 + void drawobj() { + for ( int i = 0; i < n; i++ ) { + setfillcolor( obj[i].color ); + ege_fillellipse( obj[i].x - obj[i].r, obj[i].y - obj[i].r, + obj[i].r * 2, obj[i].r * 2 ); + } + } + + ~AniObj() { + } + +private: + void Crash( Obj &a, Obj &b ) { + float ma = a.r * a.r, mb = b.r * b.r; + + float sx = a.x - b.x; + float sy = a.y - b.y; + float s1x = sx / sqrt( sx*sx + sy*sy ); + float s1y = sy / sqrt( sx*sx + sy*sy ); + float t1x = -s1y; + float t1y = s1x; + + float vas = a.vx * s1x + a.vy * s1y; + float vat = a.vx * t1x + a.vy * t1y; + float vbs = b.vx * s1x + b.vy * s1y; + float vbt = b.vx * t1x + b.vy * t1y; + + float vasf = ( 2 * mb * vbs + vas * ( ma - mb ) ) / ( ma + mb ); + float vbsf = ( 2 * ma * vas - vbs * ( ma - mb ) ) / ( ma + mb ); + + float nsx = vasf * s1x; + float nsy = vasf * s1y; + float ntx = vat * t1x; + float nty = vat * t1y; + + a.vx = nsx + ntx; + a.vy = nsy + nty; + + nsx = vbsf * s1x; + nsy = vbsf * s1y; + ntx = vbt * t1x; + nty = vbt * t1y; + + b.vx = nsx + ntx; + b.vy = nsy + nty; + } + +private: + Obj obj[20]; + int n; +}; + +int main() { + setinitmode( INIT_ANIMATION ); + initgraph( 640, 480 ); + randomize(); //初始化随机种子 + + AniObj aniobj; //定义对象 + fps f; + ege_enable_aa( true ); + + for ( ; is_run(); delay_fps( 120 ) ) { + aniobj.updateobj(); //更新位置 + cleardevice(); + aniobj.drawobj(); //绘画 + } + + closegraph(); + return 0; +} \ No newline at end of file diff --git a/demo/src/egeball2.cpp b/demo/src/egeball2.cpp new file mode 100644 index 00000000..eb81bf75 --- /dev/null +++ b/demo/src/egeball2.cpp @@ -0,0 +1,318 @@ +//cyd@20150329 +// 用GCC编译时,compile参数需指明为 -finput-charset=UTF-8 +// 否则,编译后的程序运行中汉字说明会变成乱码 +#include +#include +#include +#include +#include + +#define SCREEN_WIDTH 800 +#define SCREEN_HEIGHT 600 +#define BALL_AMOUNT 300 + +#ifdef PI +#undef PI +#endif + +#define PI 3.14159f +#define PI2 (2*PI) +#define FLOATCOMP0(x) (x < 0.01f && x > -0.01f) + +using std::vector; + +float getAngleByNormal(float x, float y) +{ + float d = sqrtf(x*x+y*y); + if(FLOATCOMP0(d)) return .0f; + float angle = asinf(y / d); + if(x > .0f) + { + if(y > .0f) return angle; + else return PI2 + angle; + } + else + { + return PI - angle; + } +} + +class Ball +{ +public: + Ball() : m_x(SCREEN_WIDTH / 2), m_y(SCREEN_HEIGHT / 2) + { + s_speed += .01f; + m_dx = s_speed * cosf(s_direction); + m_dy = s_speed * sinf(s_direction); + m_speed = s_speed; + m_radius = randomf() * 5.0f + 2.0f; + m_color = random(0xff0000) + 0xffff; + s_direction += .1f; + } + + void update() + { + m_x += m_dx; + m_y += m_dy; + + if(m_x < .0f || m_x > SCREEN_WIDTH) + { + m_dx = -m_dx; + m_x += m_dx; + } + if(m_y < .0f || m_y > SCREEN_HEIGHT) + { + m_dy = -m_dy; + m_y += m_dy; + } + +#ifdef _DEBUG + + if(m_x < .0f || m_x > SCREEN_WIDTH || m_y < .0f || m_y > SCREEN_HEIGHT) + { + setcaption("检测到某些点出界了!!"); + } + +#endif + } + + void render() + { + setfillcolor(m_color); + setcolor(m_color); + fillellipse(m_x, m_y, m_radius, m_radius); + } + + void turn(float x, float y) + { + float aglBall = getAngleByNormal(-m_dx, -m_dy); + float aglLine = getAngleByNormal(x, y); + float angle = 2 * aglLine - aglBall; + m_dx = cosf(angle) * m_speed; + m_dy = sinf(angle) * m_speed; + m_x += m_dx; + m_y += m_dy; + } + + void getPos(float& x, float& y) + { + x = m_x; + y = m_y; + } + + float getRadius() { return m_radius; } + + ~Ball() {} + +private: + float m_x, m_y; + float m_dx, m_dy; + float m_radius; + float m_speed; + COLORREF m_color; + static float s_direction; + static float s_speed; +}; + +float Ball::s_direction; +float Ball::s_speed = 0.5f; + +class Line +{ +public: + Line() {} + Line(int x1, int y1, int x2, int y2) + : m_x1(x1), m_y1(y1), m_x2(x2), m_y2(y2), m_maxx(x1), m_minx(x2), m_maxy(y1), m_miny(y2) + { + if(m_maxx < m_minx) std::swap(m_maxx, m_minx); + if(m_maxy < m_miny) std::swap(m_maxy, m_miny); + getLineEquation(); + } + ~Line() {} + + void getLineEquation() //ax + by + c = 0 + { + float a = m_y1 - m_y2, b = m_x1 - m_x2, c = m_x1 * m_y2 - m_x2 * m_y1; + if(FLOATCOMP0(b)) + { + m_a = 1; + m_b = 0.0f; + m_c = -m_x1; + } + else + { + m_a = a / b; + m_b = -1.0f; + m_c = c / b; + } + m_d2 = m_a * m_a + m_b * m_b; + m_d = sqrtf(m_d2); + } + + void render() { line(m_x1, m_y1, m_x2, m_y2); } + + void collisionDetect(Ball& ball) + { + float x,y; + ball.getPos(x,y); + float prjX = (m_b*m_b*x - m_a*m_b*y - m_a*m_c) / m_d2; + float prjY = (m_a*m_a*y - m_b*m_c - m_a*m_b*x) / m_d2; + + if(prjX >= m_minx && prjX <= m_maxx && prjY >= m_miny && prjY <= m_maxy) + { + float distance = fabs(m_a * x + m_b * y + m_c) / m_d; + if(distance < ball.getRadius()) + { + ball.turn(m_a, m_b); + } + } + else + { + //处理可能的与端点碰撞,如无处理,则事件不确定。 + } + } + +private: + int m_x1, m_y1; + int m_x2, m_y2; + int m_maxx, m_maxy, m_minx, m_miny; + float m_a, m_b, m_c, m_d, m_d2; +}; + +class Scene +{ +public: + Scene() : m_activeBallNum(0), m_bUpdate(true), m_bBlurring(true) {} + ~Scene(){} + + void update() + { + static bool bFirstTime = true; + if(bFirstTime) + { + setbkmode(TRANSPARENT); // 真正双缓冲啊!也只有这个才会出现这种奇葩现象。 + setfont(20, 10, "黑体"); // 你没保存系统状态,如果去掉这两句,你看看就知道了。 + if(m_activeBallNum < BALL_AMOUNT) ++m_activeBallNum; + outtextxy(10, 10, "如果小球数量过多(最多300)造成卡顿,请按'+'和'-'来调节,一次增加或减少10个小球"); + outtextxy(10, 30, "使用空格键可以定住小球方便画线,使用回车键可以取消画面模糊!"); + outtextxy(10, 50, "使用BackSpace 或 Delete键可以撤销上一次的画线,直至消除所有直线."); + outtextxy(10, 70, "也许你可以按下space键来尝试画一个多边形,^_^ "); + outtextxy(10, 100, "必须说明的是, 没有做直线两端点的检测,这个很简单,弹回去嘛,但是太没意思"); + outtextxy(10, 130, "所以……我是让小球沿着直线滑动,并且入射角度越大滑动越快,好玩吧!"); + outtextxy(100, 300, "现在, 恩, 按下任意键就不用看到讨厌的我啦!"); + } + if(kbhit()) + { + bFirstTime = false; + int c; + switch(c = getch()) + { + case 27: + closegraph(); + exit(0); + case ' ': m_bUpdate = !m_bUpdate; break; + case '\r': m_bBlurring = !m_bBlurring; break; + case '+': if((m_activeBallNum += 10) > BALL_AMOUNT) m_activeBallNum = BALL_AMOUNT; break; + case '-': if((m_activeBallNum -= 10) <= 0) m_activeBallNum = 1; break; + case 8: case 302: if(!m_vec.empty()) m_vec.erase(m_vec.end() - 1); + default:; + } + flushkey(); + } + if(m_bBlurring) + { + imagefilter_blurring(NULL, 0x7e, 0xff); + swappage(); + delay_fps(60); + } + else + { + + swappage(); + delay_fps(60); + cleardevice(); + } + + } + + void addLine() + { + static int s_x = 0, s_y = 0; + static bool isLbuttonDown = false; + + if(mousemsg()) + { + MOUSEMSG msg; + do + msg = GetMouseMsg(); + while(msg.uMsg == WM_MOUSEMOVE && mousemsg()); + if(msg.uMsg == WM_LBUTTONDOWN) + { + s_x = msg.x; + s_y = msg.y; + isLbuttonDown = true; + } + if(msg.uMsg == WM_LBUTTONUP) + { + m_vec.push_back(Line(s_x, s_y, msg.x, msg.y)); + isLbuttonDown = false; + } + } + if(isLbuttonDown) + { + int x, y; + mousepos(&x, &y); + setlinestyle(PS_DASH); + setcolor(RED); + line(s_x, s_y, x, y); + setlinestyle(PS_SOLID); + } + } + + void show() + { + for(int i = 0; i != m_activeBallNum; ++i) + { + if(m_bUpdate) m_ball[i].update(); + m_ball[i].render(); + for(std::vector::iterator iter = m_vec.begin(); iter != m_vec.end(); ++iter) + { + iter->collisionDetect(m_ball[i]); + } + } + setcolor(WHITE); + for(std::vector::iterator iter = m_vec.begin(); iter != m_vec.end(); ++iter) + { + iter->render(); + } + addLine(); + } + +private: + Ball m_ball[BALL_AMOUNT]; + vector m_vec; + int m_activeBallNum; + bool m_bBlurring, m_bUpdate; +}; + +int main() +{ + setinitmode(0); + initgraph(SCREEN_WIDTH, SCREEN_HEIGHT); + setcaption("任意直线的碰撞检测——wysaid"); + randomize(); + setrendermode(RENDER_MANUAL); + setbkmode(TRANSPARENT); + setfont(20, 10, "黑体"); + + Scene scene; + + for( ; ; ) + { + scene.update(); + scene.show(); + } + return 0; +} + diff --git a/src/demo/egecatharine.cpp b/demo/src/egecatharine.cpp similarity index 97% rename from src/demo/egecatharine.cpp rename to demo/src/egecatharine.cpp index a1194033..81449416 100644 --- a/src/demo/egecatharine.cpp +++ b/demo/src/egecatharine.cpp @@ -1,6 +1,4 @@ -// 烟花特效演示 - -#include +#include "graphics.h" #include #include diff --git a/src/demo/egeclock.cpp b/demo/src/egeclock.cpp similarity index 96% rename from src/demo/egeclock.cpp rename to demo/src/egeclock.cpp index d7cf0c0a..573d140f 100644 --- a/src/demo/egeclock.cpp +++ b/demo/src/egeclock.cpp @@ -1,4 +1,3 @@ -// 鎸囬拡寮忔椂閽熸樉绀+鎶楅敮榻挎紨绀 #include #include #include @@ -93,9 +92,9 @@ int main() ege::setinitmode(ege::INIT_ANIMATION); ege::initgraph(400, 480); ege::randomize(); - // 绋嬪簭涓诲惊鐜 + // 程序主循环 mainloop(); - // 鍏抽棴缁樺浘璁惧 + // 关闭绘图设备 ege::closegraph(); return 0; } diff --git a/demo/src/egefilter_ball.cpp b/demo/src/egefilter_ball.cpp new file mode 100644 index 00000000..0bc8dc8a --- /dev/null +++ b/demo/src/egefilter_ball.cpp @@ -0,0 +1,278 @@ +// 弹球物理碰撞演示 + +#include +#include +#include +#include +#include + +#define SC_W 400 +#define SC_H 300 + +#define myrand(m) ((float)(randomf() * (m))) +#define IsCrash(a, b) ((a.x - b.x)*(a.x - b.x)+(a.y - b.y)*(a.y - b.y) < (a.r + b.r)*(a.r + b.r)) +#define IsWEdge(a) (a.x < a.r || a.x >= SC_W-a.r) +#define IsHEdge(a) (a.y < a.r || a.y >= SC_H-a.r) +#define IsEdge(a) (IsWEdge(a) || IsHEdge(a)) +#define Distance(x1, y1, x2, y2) (((x1) - (x2))*((x1) - (x2)) + ((y1) - (y2))*((y1) - (y2))) + + +typedef struct { + float x, y; + float vx, vy; + int r; + int color; +} Obj; + + +//定义一个AniObj类 +class AniObj { +public: + AniObj() { + n = 8; + int i, j; + bool goon; + for ( i = 0; i < n; i++ ) { + do { + goon = false; + obj[i].x = ( float )random( getwidth() ); + obj[i].y = ( float )random( getheight() ); + obj[i].r = random( 30 ) + 15; + if ( IsEdge( obj[i] ) ) + goon = true; + else if ( i != 0 ) + for ( j = i - 1; j >= 0; j-- ) + if ( IsCrash( obj[i], obj[j] ) ) { + goon = true; + break; + } + } while ( goon ); + obj[i].vx = obj[i].vy = 0.0f; + obj[i].color = EGEAGRAY( 0xff, HSVtoRGB( myrand( 360.0f ), 1.0f, 1.0f ) ); + } + } + + //更新位置等相关属性 + void updateobj() { + int i, j; + for ( i = 0; i < n; i++ ) { + obj[i].vy += 0.05f; + obj[i].x += obj[i].vx; + obj[i].y += obj[i].vy; + if ( obj[i].y >= SC_H - obj[i].r && obj[i].vy > 0 ) { + obj[i].y -= obj[i].vy; + obj[i].vy = - obj[i].vy; + } + if ( obj[i].x < obj[i].r && obj[i].vx < 0 ) obj[i].vx = - obj[i].vx; + if ( obj[i].x >= SC_W - obj[i].r && obj[i].vx > 0 ) obj[i].vx = - obj[i].vx; + } + for ( i = 1; i < n; i++ ) + for ( j = i - 1; j >= 0; j-- ) + if ( IsCrash( obj[i], obj[j] ) && + ( Distance( obj[i].x, obj[i].y, obj[j].x, obj[j].y ) > + Distance( obj[i].x + obj[i].vx, obj[i].y + obj[i].vy, obj[j].x + obj[j].vx, obj[j].y + obj[j].vy ) + ) + ) + Crash( obj[i], obj[j] ); + } + + //根据属性值绘画 + void drawobj() { + for ( int i = 0; i < n; i++ ) { + setfillcolor( obj[i].color ); + ege_fillellipse( obj[i].x - obj[i].r, obj[i].y - obj[i].r, + obj[i].r * 2, obj[i].r * 2 ); + } + } + + ~AniObj() { + } + +private: + void Crash( Obj &a, Obj &b ) { + float ma = a.r * a.r, mb = b.r * b.r; + + float sx = a.x - b.x; + float sy = a.y - b.y; + float s1x = sx / sqrt( sx*sx + sy*sy ); + float s1y = sy / sqrt( sx*sx + sy*sy ); + float t1x = -s1y; + float t1y = s1x; + + float vas = a.vx * s1x + a.vy * s1y; + float vat = a.vx * t1x + a.vy * t1y; + float vbs = b.vx * s1x + b.vy * s1y; + float vbt = b.vx * t1x + b.vy * t1y; + + float vasf = ( 2 * mb * vbs + vas * ( ma - mb ) ) / ( ma + mb ); + float vbsf = ( 2 * ma * vas - vbs * ( ma - mb ) ) / ( ma + mb ); + + float nsx = vasf * s1x; + float nsy = vasf * s1y; + float ntx = vat * t1x; + float nty = vat * t1y; + + a.vx = nsx + ntx; + a.vy = nsy + nty; + + nsx = vbsf * s1x; + nsy = vbsf * s1y; + ntx = vbt * t1x; + nty = vbt * t1y; + + b.vx = nsx + ntx; + b.vy = nsy + nty; + } + +private: + Obj obj[20]; + int n; +}; + +void draw( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + dp[x * 2] = c; + dp[x * 2 + 1] = c; + dp[x * 2 + w*2] = c; + dp[x * 2 + w*2 + 1] = c; + } + } +} + +void draw_colorscan( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + dp[x * 2] = c & 0xFF; + dp[x * 2 + 1] = c & 0xFF00; + dp[x * 2 + w*2] = c & 0xFF0000; + dp[x * 2 + w*2 + 1] = 0; + } + } +} + +void draw_colorscan2( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + color_t lc = 0; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + color_t nc = sp[x + 1]; + if ( x + 1 == w ) nc = 0; + dp[x * 2] = lc & 0xFF00FF; + dp[x * 2 + 1] = c & 0xFF00; + dp[x * 2 + w*2] = c & 0xFF00; + dp[x * 2 + w*2 + 1] = nc & 0xFF00FF; + lc = c; + } + } +} + +void draw_colorscan3( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + color_t lc = 0; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + color_t nc = sp[x + 1]; + if ( x + 1 == w ) nc = 0; + dp[x * 2] = lc & 0xFF00FF | c & 0xFF00; + dp[x * 2 + 1] = c; + dp[x * 2 + w*2] = c; + dp[x * 2 + w*2 + 1] = c & 0xFF00FF | nc & 0xFF00; + lc = c; + } + } +} + +void draw_smooth( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + color_t lc = 0; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + color_t nc = sp[x + 1]; + color_t tc; + if ( x + 1 == w ) nc = 0; + dp[x * 2] = c; + dp[x * 2 + 1] = tc = ( ( c & 0xFEFEFE ) >> 1 ) + ( ( nc & 0xFEFEFE ) >> 1 ); + dp[x * 2 + w*2] = c; + dp[x * 2 + w*2 + 1] = tc; + if ( y > 0 ) { + dp[x * 2 - w*2] = ( ( dp[x * 2 - w*2] & 0xFEFEFE ) >> 1 ) + ( ( c & 0xFEFEFE ) >> 1 ); + dp[x * 2 - w*2 + 1] = ( ( dp[x * 2 - w*2 + 1] & 0xFEFEFE ) >> 1 ) + ( ( tc & 0xFEFEFE ) >> 1 ); + } + lc = c; + } + } +} + +void draw_scanline50( color_t* d_pt, color_t* s_pt, int w, int h ) { + for ( int y = 0; y < h; ++y ) { + color_t* dp = &d_pt[y * w * 4]; + color_t* sp = &s_pt[y * w]; + for ( int x = 0; x < w; ++x ) { + color_t c = sp[x]; + dp[x * 2] = c; + dp[x * 2 + 1] = c; + dp[x * 2 + w*2] = 0; + dp[x * 2 + w*2 + 1] = 0; + } + } +} + +int main() { + typedef void ( *filter_fun )( color_t* , color_t* , int , int ); + setinitmode( INIT_ANIMATION ); + initgraph( SC_W * 2, SC_H * 2 ); + randomize(); //初始化随机种子 + + AniObj aniobj; //定义对象 + fps f; + PIMAGE img = newimage( SC_W, SC_H ); + color_t* d_pt = ( color_t* )getbuffer( NULL ); + color_t* s_pt = ( color_t* )getbuffer( img ); + filter_fun f_list[] = {draw, draw_smooth, + draw_colorscan, draw_scanline50, draw_colorscan2, draw_colorscan3 + }; + const char* str_list[] = {"soft_2x", "smooth", + "colorscan", "scanline 50%", "colorscan2", "colorscan3" + }; + + int pause = 0; + int i_fun = 0; + + for ( ; is_run(); delay_fps( 1000 ) ) { + if ( kbhit() ) { + int k = toupper( getch() ); + if ( k == 'P' ) pause = 1 - pause; + if ( k == 'C' ) i_fun = ( 1 + i_fun ) % ( sizeof( f_list ) / sizeof( *f_list ) ); + } + if ( pause == 0 ) { + aniobj.updateobj(); //更新位置 + + settarget( img ); + ege_enable_aa( true ); + //cleardevice(); + imagefilter_blurring( NULL, 0x40, 0xFF ); + aniobj.drawobj(); //绘画 + } + settarget( NULL ); + f_list[i_fun]( d_pt, s_pt, SC_W, SC_H ); + outtextxy( 0, 16, str_list[i_fun] ); + //putimage(0, 0, img); + } + + closegraph(); + return 0; +} + diff --git a/src/demo/egejulia.cpp b/demo/src/egejulia.cpp similarity index 90% rename from src/demo/egejulia.cpp rename to demo/src/egejulia.cpp index 31bd1bb6..d6e1cec3 100644 --- a/src/demo/egejulia.cpp +++ b/demo/src/egejulia.cpp @@ -1,539 +1,543 @@ -// julia闆嗚绠楀睆淇濆姩鐢伙紙缂栬瘧鍚庢敼涓簊cr鍚庣紑浣跨敤锛 -#include "graphics.h" -#include -#include -#include -#include - -// 瀹氫箟甯搁噺 -#define MAXCOLOR 64 // 棰滆壊鏁 -#define BF_W 1200 -#define BF_H 1200 - -int g_w, g_h; - -///////////////////////////////////////////////// -// 瀹氫箟澶嶆暟鍙婁箻銆佸姞杩愮畻 -///////////////////////////////////////////////// - -// 瀹氫箟澶嶆暟 -struct COMPLEX -{ - double re; - double im; -}; - -// 瀹氫箟澶嶆暟鈥滀箻鈥濊繍绠 -COMPLEX operator * (COMPLEX a, COMPLEX b) -{ - COMPLEX c; - c.re = a.re * b.re - a.im * b.im; - c.im = a.im * b.re + a.re * b.im; - return c; -} - -// 瀹氫箟澶嶆暟鈥滃姞鈥濊繍绠 -COMPLEX operator + (COMPLEX a, COMPLEX b) -{ - COMPLEX c; - c.re = a.re + b.re; - c.im = a.im + b.im; - return c; -} - - -///////////////////////////////////////////////// -// 瀹氫箟棰滆壊鍙婂垵濮嬪寲棰滆壊 -///////////////////////////////////////////////// - -// 瀹氫箟棰滆壊 -int Color[MAXCOLOR]; - -// 鍒濆鍖栭鑹 -void InitColor() -{ - // 浣跨敤 HSL 棰滆壊妯″紡浜х敓瑙掑害 h1 鍒 h2 鐨勬笎鍙樿壊 - int h1 = 240, h2 = 30; - for(int i=0; i= BF_W || y < 0 || y >= BF_H) return; - if (pMap[y][x].ed == 0) - { - g_udlist.push(x, y); - } -} - -void jaddpoint(int x, int y, int it = -1) -{ - if (x < 0 || x >= g_w || y < 0 || y >= g_h) return; - if (g_st[y * g_w + x].ed == 0) - { - g_udlist.push(x, y); - } -} - -int MandelbrotEx(state& z) -{ - if (z.iter >= 64) return z.iter; - int k = 64; - int b = k; - while (k > 0) - { - --k; - z.z = z.z * z.z + z.c; - if ( z.z.re*z.z.re + z.z.im*z.z.im > 4.0 ) - { - z.ed = 1; - break; - } - } - z.iter += b - k; - return z.iter; -} - -int kbmouhit() -{ - if (kbmsg()) return 1; - //return kbhit() || MouseHit(); - return 0; -} - -int MDraw(double fromx, double fromy, double tox, double toy) -{ - int t = clock(); - int ret = 0; - { - int x, y; - while (g_udlist.pop(&x, &y)) - { - state& p = pMap[y][x]; - if (p.iter == 0 && p.ed == 0) - { - COMPLEX z, c; - c.re = fromx + (tox - fromx) * (x / (double)BF_W); - c.im = fromy + (toy - fromy) * (y / (double)BF_H); - z.re = z.im = 0.0; - p.c = c; - p.z = z; - } - if (p.ed == 0) - { - int k; - k = MandelbrotEx(p); - if (p.ed) - { - ret++; - { - addpoint(x, y-1, k); - addpoint(x, y+1, k); - addpoint(x-1, y, k); - addpoint(x+1, y, k); - } - g_mi[y][x] = k; - /* - { - color_t c = 0; - c = colorMap(p.z, p.iter); - putpixel(x, y, c); - }// */ - } - else - { - addpoint(x, y); - } - } - if (kbmouhit()) break; - } - } - g_udlist.swap(); - return ret; -} - -int g_updatepoint = 0; - -///////////////////////////////////////////////// -// 缁樺埗 Julia Set -///////////////////////////////////////////////// -int JDraw(COMPLEX c, double fromx, double fromy, double tox, double toy, double sr, double cr) -{ - int ret = 0; - int update = 0; - state* st = g_st - 1; - clock_t tt = clock(); - g_updatepoint = 0; - for(int y=0; yed) - { - continue; - } - COMPLEX& z = st->z; - - if (st->iter == 0) - { - double re = fromx + (tox - fromx) * (x / (double)g_w); - double im = fromy + (toy - fromy) * (y / (double)g_h); - z.re = cr * re + sr * im; - z.im = sr * re - cr * im; - } - else - { - //z = st->z; - } - st->iter++; - { - z = z * z + c; - if ( z.re*z.re + z.im*z.im > bilout ) - { - st->ed = 1; - } - } - ++ret; - if ( st->ed ) - { - color_t c = 0; - c = colorMap(z, st->iter); - putpixel(x, y, c); - g_updatepoint += 1; - } - else if (st->iter == 1) - { - color_t c = 0; - //c = colorMap(z, st->iter); - putpixel_f(x, y, c); - } - } - if (clock() - tt > 10) - { - tt = clock(); - if (kbmouhit()) - { - return -1; - } - } - } - return ret; -} - -int JDrawA(COMPLEX c, double fromx, double fromy, double tox, double toy) -{ - clock_t tt = clock(); - int ret = 0; - g_updatepoint = 0; - state* st = g_st; - { - int x, y; - while (g_udlist.pop(&x, &y)) - { - state& p = st[y * g_w + x]; - if (p.ed == 0) - { - int k; - { - p.iter++; - k = p.iter; - COMPLEX &z = p.z; - z = z * z + c; - if ( z.re*z.re + z.im*z.im > bilout ) - { - p.ed = 1; - } - } - ret ++; - if (p.ed) - { - color_t c = 0; - c = colorMap(p.z, k); - putpixel(x, y, c); - g_updatepoint += 1; - } - else - { - g_udlist.push(x, y); - } - } - /* - if (clock() - tt > 10) - { - delay(1); - tt = clock(); - if (0 && kbmouhit()) - { - return -1; - } - }//*/ - } - } - g_udlist.swap(); - return ret; -} - -void init_st(int x, int y) -{ - memset(g_st, 0, x * y * sizeof(state)); -} - -///////////////////////////////////////////////// -// 涓诲嚱鏁 -///////////////////////////////////////////////// -int main(int argc, char* argv[]) -{ - // 鍒濆鍖栫粯鍥剧獥鍙e強棰滆壊 - setinitmode(0x005, 0, 0); - if (argc < 2) - { - MessageBoxW(NULL, L"鏈睆骞曚繚鎶ょ▼搴忔棤閰嶇疆", L"JuliaSet", MB_OK); - return 0; - } - else if (stricmp(argv[1], "/p") == 0) - { - HWND hwnd; - sscanf(argv[2], "%d", &hwnd); - attachHWND(hwnd); - setinitmode(0x107, 0, 0); - } - else if (stricmp(argv[1], "/s")) - { - MessageBoxW(NULL, L"鏈睆骞曚繚鎶ょ▼搴忔棤閰嶇疆", L"JuliaSet", MB_OK); - return 0; - } - - //initgraph(320, 240); - initgraph(-1, -1); - - randomize(); - showmouse(0); - FlushMouseMsgBuffer(); - while(kbhit()) getch(); - - //InitColor(); - InitLog(); - g_w = getwidth(NULL); - g_h = getheight(NULL); - g_st = (state*)malloc(g_w * g_h * sizeof(state)); - COMPLEX c = {0.262, 0.002}, z = {0, 0}; - double r = 1.5, d = g_w / (double)g_h, rotate = 0, sr = sin(rotate), cr = cos(rotate); - init_st(g_w, g_h); - int n_update = 0; - double ftime = fclock(); - { - double dc = 64, dca = 128, db = 16; - col_r = randomf() * dc + db; - col_g = randomf() * dc + db; - col_b = randomf() * dc + db; - col_ar = randomf() * dca; - col_ag = randomf() * dca; - col_ab = randomf() * dca; - rotate = randomf() * 360; - sr = sin(rotate), cr = cos(rotate); - } - setrendermode(RENDER_MANUAL); - for (int loop = 1; kbmouhit() == 0; ++loop) - { - int ret; - if (loop <= 4) - { - ret = JDraw(c, z.re - r * d, z.im - r, z.re + r * d, z.im + r, sr, cr); - if (loop == 4) - { - g_udlist.swap(); - for(int y=0; y 30) - { - delay(1); - t = clock(); - } - } - if (g_updatepoint == 0) - { - n_update++; - } - else - { - n_update = 0; - } - if (0) - { - char str[500]; - sprintf(str, "%d %d %f %f", g_w, g_h, r, d); - outtextxy(0, 0, str); - } - if (ret == 0 || n_update > 8 || loop > 1000) - { - loop = 0; - if (g_mi[0][0] == 0) - { - delay(1); - memset(pMap, 0, BF_W * BF_H * sizeof(state)); - g_udlist.clear(); - for (int i = 0; i < BF_W; ++i) - { - addpoint(i, 0); - addpoint(i, BF_H - 1); - } - for (int i = 0; i < 4; ) - { - if (MDraw(-1.9, -1.2, 0.5, 1.2) == 0) - { - ++i; - } - else - { - i = 0; - } - if (kbmouhit()) return 0; - } - } - double dc = 64, dca = 128, db = 16; - col_r = randomf() * dc + db; - col_g = randomf() * dc + db; - col_b = randomf() * dc + db; - col_ar = randomf() * dca; - col_ag = randomf() * dca; - col_ab = randomf() * dca; - rotate = randomf() * 360; - sr = sin(rotate), cr = cos(rotate); - do - { - c.re = randomf() * 2.4 - 1.9; - c.im = randomf() * 2.4 - 1.2; - int ir = (int)((c.re - (-1.9)) / (0.5 - (-1.9)) * BF_W); - int im = (int)((c.im - (-1.2)) / (1.2 - (-1.2)) * BF_H); - if (g_mi[im][ir] >= 16) - { - break; - } - } while (1); - init_st(g_w, g_h); - n_update = 0; - if (fclock() - ftime < 3) - { - delay_ms((int)((3 - (fclock() - ftime)) * 1000)); - } - else - { - delay(1); - } - ftime = fclock(); - } - } - - closegraph(); - return 0; -} - +/* +** 注意:本程序中使用了宽字符串表示汉字,需要在编译时加上 -finput-charset=GBK +** 方能通过 +*/ + +#include "graphics.h" +#include +#include +#include +#include + +// 定义常量 +#define MAXCOLOR 64 // 颜色数 +#define BF_W 1200 +#define BF_H 1200 + +int g_w, g_h; + +///////////////////////////////////////////////// +// 定义复数及乘、加运算 +///////////////////////////////////////////////// + +// 定义复数 +struct COMPLEX +{ + double re; + double im; +}; + +// 定义复数“乘”运算 +COMPLEX operator * (COMPLEX a, COMPLEX b) +{ + COMPLEX c; + c.re = a.re * b.re - a.im * b.im; + c.im = a.im * b.re + a.re * b.im; + return c; +} + +// 定义复数“加”运算 +COMPLEX operator + (COMPLEX a, COMPLEX b) +{ + COMPLEX c; + c.re = a.re + b.re; + c.im = a.im + b.im; + return c; +} + + +///////////////////////////////////////////////// +// 定义颜色及初始化颜色 +///////////////////////////////////////////////// + +// 定义颜色 +int Color[MAXCOLOR]; + +// 初始化颜色 +void InitColor() +{ + // 使用 HSL 颜色模式产生角度 h1 到 h2 的渐变色 + int h1 = 240, h2 = 30; + for(int i=0; i= BF_W || y < 0 || y >= BF_H) return; + if (pMap[y][x].ed == 0) + { + g_udlist.push(x, y); + } +} + +void jaddpoint(int x, int y, int it = -1) +{ + if (x < 0 || x >= g_w || y < 0 || y >= g_h) return; + if (g_st[y * g_w + x].ed == 0) + { + g_udlist.push(x, y); + } +} + +int MandelbrotEx(state& z) +{ + if (z.iter >= 64) return z.iter; + int k = 64; + int b = k; + while (k > 0) + { + --k; + z.z = z.z * z.z + z.c; + if ( z.z.re*z.z.re + z.z.im*z.z.im > 4.0 ) + { + z.ed = 1; + break; + } + } + z.iter += b - k; + return z.iter; +} + +int kbmouhit() +{ + if (kbmsg()) return 1; + //return kbhit() || MouseHit(); + return 0; +} + +int MDraw(double fromx, double fromy, double tox, double toy) +{ + int t = clock(); + int ret = 0; + { + int x, y; + while (g_udlist.pop(&x, &y)) + { + state& p = pMap[y][x]; + if (p.iter == 0 && p.ed == 0) + { + COMPLEX z, c; + c.re = fromx + (tox - fromx) * (x / (double)BF_W); + c.im = fromy + (toy - fromy) * (y / (double)BF_H); + z.re = z.im = 0.0; + p.c = c; + p.z = z; + } + if (p.ed == 0) + { + int k; + k = MandelbrotEx(p); + if (p.ed) + { + ret++; + { + addpoint(x, y-1, k); + addpoint(x, y+1, k); + addpoint(x-1, y, k); + addpoint(x+1, y, k); + } + g_mi[y][x] = k; + /* + { + color_t c = 0; + c = colorMap(p.z, p.iter); + putpixel(x, y, c); + }// */ + } + else + { + addpoint(x, y); + } + } + if (kbmouhit()) break; + } + } + g_udlist.swap(); + return ret; +} + +int g_updatepoint = 0; + +///////////////////////////////////////////////// +// 绘制 Julia Set +///////////////////////////////////////////////// +int JDraw(COMPLEX c, double fromx, double fromy, double tox, double toy, double sr, double cr) +{ + int ret = 0; + int update = 0; + state* st = g_st - 1; + clock_t tt = clock(); + g_updatepoint = 0; + for(int y=0; yed) + { + continue; + } + COMPLEX& z = st->z; + + if (st->iter == 0) + { + double re = fromx + (tox - fromx) * (x / (double)g_w); + double im = fromy + (toy - fromy) * (y / (double)g_h); + z.re = cr * re + sr * im; + z.im = sr * re - cr * im; + } + else + { + //z = st->z; + } + st->iter++; + { + z = z * z + c; + if ( z.re*z.re + z.im*z.im > bilout ) + { + st->ed = 1; + } + } + ++ret; + if ( st->ed ) + { + color_t c = 0; + c = colorMap(z, st->iter); + putpixel(x, y, c); + g_updatepoint += 1; + } + else if (st->iter == 1) + { + color_t c = 0; + //c = colorMap(z, st->iter); + putpixel_f(x, y, c); + } + } + if (clock() - tt > 10) + { + tt = clock(); + if (kbmouhit()) + { + return -1; + } + } + } + return ret; +} + +int JDrawA(COMPLEX c, double fromx, double fromy, double tox, double toy) +{ + clock_t tt = clock(); + int ret = 0; + g_updatepoint = 0; + state* st = g_st; + { + int x, y; + while (g_udlist.pop(&x, &y)) + { + state& p = st[y * g_w + x]; + if (p.ed == 0) + { + int k; + { + p.iter++; + k = p.iter; + COMPLEX &z = p.z; + z = z * z + c; + if ( z.re*z.re + z.im*z.im > bilout ) + { + p.ed = 1; + } + } + ret ++; + if (p.ed) + { + color_t c = 0; + c = colorMap(p.z, k); + putpixel(x, y, c); + g_updatepoint += 1; + } + else + { + g_udlist.push(x, y); + } + } + /* + if (clock() - tt > 10) + { + delay(1); + tt = clock(); + if (0 && kbmouhit()) + { + return -1; + } + }//*/ + } + } + g_udlist.swap(); + return ret; +} + +void init_st(int x, int y) +{ + memset(g_st, 0, x * y * sizeof(state)); +} + +///////////////////////////////////////////////// +// 主函数 +///////////////////////////////////////////////// +int main(int argc, char* argv[]) +{ + // 初始化绘图窗口及颜色 + setinitmode(0x005, 0, 0); + if (argc < 2) + { + MessageBoxW(NULL, L"本屏幕保护程序无配置", L"JuliaSet", MB_OK); + return 0; + } + else if (strcmp(argv[1], "/p") == 0) + { + HWND hwnd; + sscanf(argv[2], "%d", &hwnd); + attachHWND(hwnd); + setinitmode(0x107, 0, 0); + } + else if (strcmp(argv[1], "/s")) + { + MessageBoxW(NULL, L"本屏幕保护程序无配置", L"JuliaSet", MB_OK); + return 0; + } + + //initgraph(320, 240); + initgraph(-1, -1); + + randomize(); + showmouse(0); + flushmouse(); + while(kbhit()) getch(); + + //InitColor(); + InitLog(); + g_w = getwidth(NULL); + g_h = getheight(NULL); + g_st = (state*)malloc(g_w * g_h * sizeof(state)); + COMPLEX c = {0.262, 0.002}, z = {0, 0}; + double r = 1.5, d = g_w / (double)g_h, rotate = 0, sr = sin(rotate), cr = cos(rotate); + init_st(g_w, g_h); + int n_update = 0; + double ftime = fclock(); + { + double dc = 64, dca = 128, db = 16; + col_r = randomf() * dc + db; + col_g = randomf() * dc + db; + col_b = randomf() * dc + db; + col_ar = randomf() * dca; + col_ag = randomf() * dca; + col_ab = randomf() * dca; + rotate = randomf() * 360; + sr = sin(rotate), cr = cos(rotate); + } + setrendermode(RENDER_MANUAL); + for (int loop = 1; kbmouhit() == 0; ++loop) + { + int ret; + if (loop <= 4) + { + ret = JDraw(c, z.re - r * d, z.im - r, z.re + r * d, z.im + r, sr, cr); + if (loop == 4) + { + g_udlist.swap(); + for(int y=0; y 30) + { + delay(1); + t = clock(); + } + } + if (g_updatepoint == 0) + { + n_update++; + } + else + { + n_update = 0; + } + if (0) + { + char str[500]; + sprintf(str, "%d %d %f %f", g_w, g_h, r, d); + outtextxy(0, 0, str); + } + if (ret == 0 || n_update > 8 || loop > 1000) + { + loop = 0; + if (g_mi[0][0] == 0) + { + delay(1); + memset(pMap, 0, BF_W * BF_H * sizeof(state)); + g_udlist.clear(); + for (int i = 0; i < BF_W; ++i) + { + addpoint(i, 0); + addpoint(i, BF_H - 1); + } + for (int i = 0; i < 4; ) + { + if (MDraw(-1.9, -1.2, 0.5, 1.2) == 0) + { + ++i; + } + else + { + i = 0; + } + if (kbmouhit()) return 0; + } + } + double dc = 64, dca = 128, db = 16; + col_r = randomf() * dc + db; + col_g = randomf() * dc + db; + col_b = randomf() * dc + db; + col_ar = randomf() * dca; + col_ag = randomf() * dca; + col_ab = randomf() * dca; + rotate = randomf() * 360; + sr = sin(rotate), cr = cos(rotate); + do + { + c.re = randomf() * 2.4 - 1.9; + c.im = randomf() * 2.4 - 1.2; + int ir = (int)((c.re - (-1.9)) / (0.5 - (-1.9)) * BF_W); + int im = (int)((c.im - (-1.2)) / (1.2 - (-1.2)) * BF_H); + if (g_mi[im][ir] >= 16) + { + break; + } + } while (1); + init_st(g_w, g_h); + n_update = 0; + if (fclock() - ftime < 3) + { + delay_ms((int)((3 - (fclock() - ftime)) * 1000)); + } + else + { + delay(1); + } + ftime = fclock(); + } + } + + closegraph(); + return 0; +} + diff --git a/src/demo/egelines.cpp b/demo/src/egelines.cpp similarity index 99% rename from src/demo/egelines.cpp rename to demo/src/egelines.cpp index d9c2fdf1..c4eded10 100644 --- a/src/demo/egelines.cpp +++ b/demo/src/egelines.cpp @@ -1,5 +1,4 @@ -// 变幻线屏保 -#include +#include "graphics.h" #include #include #include diff --git a/src/demo/egemouseball.cpp b/demo/src/egemouseball.cpp similarity index 99% rename from src/demo/egemouseball.cpp rename to demo/src/egemouseball.cpp index d9b73165..151b3753 100644 --- a/src/demo/egemouseball.cpp +++ b/demo/src/egemouseball.cpp @@ -1,4 +1,3 @@ -// 鼠标拖动弹球演示 #include #include diff --git a/demo/src/egemousetest.cpp b/demo/src/egemousetest.cpp new file mode 100644 index 00000000..fd9bc018 --- /dev/null +++ b/demo/src/egemousetest.cpp @@ -0,0 +1,68 @@ +#include +#include +#include +#include + +struct scene { + int x, y, r; + int delay; + int hit; + int cnt; +}; + +void init_scene(scene& s) { + randomize(); + s.r = random(50) + 50; + s.x = random(getwidth() - s.r * 2) + s.r; + s.y = random(getheight() - s.r * 2) + s.r; + s.delay = 12; + s.hit = 0; + s.cnt = 0; +} + +int distance(int x1, int y1, int x2, int y2) { + return (int)(sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))+.3); +} + +void mainloop (scene& s) { + for ( ; is_run(); delay_fps(120) ) { + while (mousemsg()) { + mouse_msg m = getmouse(); + if (m.msg == mouse_msg_down) { + if (distance(m.x, m.y, s.x, s.y) <= s.r) { + s.hit = 1; + } + } + } + if (s.hit) { + --s.delay; + if (s.delay == 0) { + s.r *= 2; + } else if (s.delay <= -30) { + s.r = random(50) + 50; + s.x = random(getwidth() - s.r * 2) + s.r; + s.y = random(getheight() - s.r * 2) + s.r; + s.delay = (s.cnt > 50 ? 1 : 12+6); + s.hit = 0; + s.cnt ++; + } + } + cleardevice(); + setfillcolor(EGERGB(0x80, 0x80, 0xF0)); + fillellipse(s.x, s.y, s.r, s.r); + xyprintf(0, 15, "%d", s.cnt); + } +} + +int main() +{ + initgraph( 640, 480 ); + setrendermode(RENDER_MANUAL); + fps f; + scene s; + init_scene(s); + mainloop(s); + closegraph(); + return 0; +} + diff --git a/src/demo/egenet.cpp b/demo/src/egenet.cpp similarity index 97% rename from src/demo/egenet.cpp rename to demo/src/egenet.cpp index 8a1a2549..01fe56a5 100644 --- a/src/demo/egenet.cpp +++ b/demo/src/egenet.cpp @@ -1,4 +1,3 @@ -//纰ф尝鑽℃季锛堥紶鏍囨嫋鍔ㄥ脊鍔涚墿鐞嗘ā鎷熸紨绀猴級 #include #include @@ -15,7 +14,7 @@ int g_mod_show = 3; double g_d_friction = 0.001; double g_d_min_a = 0.001; -double g_k = 0.03; /* 鍔插害绯绘暟锛屼笉鑳藉ぇ浜庣瓑浜0.5 */ +double g_k = 0.03; /* 劲度系数,不能大于等于0.5 */ struct vector_t { double dx; @@ -252,7 +251,7 @@ void cap_pt(struct net* pnet, int px, int py, int op) { void init() { int g = TRUECOLORSIZE, m = (g_height<<16) | g_width; - //initgraph(&g, &m, "纰ф尝鑽℃季"); + //initgraph(&g, &m, "碧波荡漾"); //setinitmode(3); initgraph(640, 480); g_width = getwidth(); diff --git a/src/demo/egerotateimage.cpp b/demo/src/egerotateimage.cpp similarity index 88% rename from src/demo/egerotateimage.cpp rename to demo/src/egerotateimage.cpp index d892cda7..701971a0 100644 --- a/src/demo/egerotateimage.cpp +++ b/demo/src/egerotateimage.cpp @@ -1,25 +1,25 @@ -// 鏃嬭浆鍥剧墖婕旂ず绋嬪簭 -#include -#include -#include -#include - -int main() -{ - initgraph( 640, 480 ); - setrendermode(RENDER_MANUAL); - PIMAGE img = newimage(); - getimage(img, "bg.jpg"); - double r = 0; - fps f; - for ( ; is_run(); delay_fps(60) ) - { - r += 0.02; - if (r > PI * 2) r -= PI * 2; - - cleardevice(); - putimage_rotatezoom(NULL, img, 320, 240, 0.5f, 0.5f, r, 0.5f, 0, -1, 1); - } - return 0; -} - +// 旋转图片演示程序 +#include +#include +#include +#include + +int main() +{ + initgraph( 640, 480 ); + setrendermode(RENDER_MANUAL); + PIMAGE img = newimage(); + getimage(img, "bg.jpg"); + double r = 0; + fps f; + for ( ; is_run(); delay_fps(60) ) + { + r += 0.02; + if (r > PI * 2) r -= PI * 2; + + cleardevice(); + putimage_rotatezoom(NULL, img, 320, 240, 0.5f, 0.5f, r, 0.5f, 0, -1, 1); + } + return 0; +} + diff --git a/src/demo/egesnake.cpp b/demo/src/egesnake.cpp similarity index 98% rename from src/demo/egesnake.cpp rename to demo/src/egesnake.cpp index 07748fde..a94bfe4a 100644 --- a/src/demo/egesnake.cpp +++ b/demo/src/egesnake.cpp @@ -1,5 +1,4 @@ -// 瓒呯畝鏄90琛岃椽鍚冭泧 -#include +#include "graphics.h" #include #define MAP_W 40 diff --git a/src/demo/egestar.cpp b/demo/src/egestar.cpp similarity index 96% rename from src/demo/egestar.cpp rename to demo/src/egestar.cpp index acb8c4fb..525dbf53 100644 --- a/src/demo/egestar.cpp +++ b/demo/src/egestar.cpp @@ -44,14 +44,14 @@ int preinit( int argc, char* argv[] ) { if ( argc < 2 ) { //MessageBoxA( NULL, "本屏幕保护程序无配置", "星空屏保", MB_OK ); //return -1; - } else if ( stricmp( argv[1], "/p" ) == 0 ) { // 小窗口预览模式 + } else if ( strcmp( argv[1], "/p" ) == 0 ) { // 小窗口预览模式 HWND hwnd; sscanf( argv[2], "%d", &hwnd ); attachHWND( hwnd ); // 新ege函数 setinitmode( INIT_NOBORDER | INIT_CHILD | INIT_WITHLOGO ); // 指定初始化为无边框子窗口 g_max = 200; return 1; - } else if ( stricmp( argv[1], "/s" ) ) { // 非测试运行模式 + } else if ( strcmp( argv[1], "/s" ) ) { // 非测试运行模式 MessageBoxA( NULL, "本屏幕保护程序无配置", "星空屏保", MB_OK ); return -1; } diff --git a/src/demo/egetetris.cpp b/demo/src/egetetris.cpp similarity index 99% rename from src/demo/egetetris.cpp rename to demo/src/egetetris.cpp index a2ffabdd..762f149f 100644 --- a/src/demo/egetetris.cpp +++ b/demo/src/egetetris.cpp @@ -1,11 +1,10 @@ -//ege俄罗斯方块游戏 -#include +#include "graphics.h" #include #include #include -#include +#include "ege/fps.h" const int g_width = 400; const int g_height = 520; diff --git a/src/demo/egetriangle.cpp b/demo/src/egetriangle.cpp similarity index 96% rename from src/demo/egetriangle.cpp rename to demo/src/egetriangle.cpp index c2fa9fa4..cb7f3bb6 100644 --- a/src/demo/egetriangle.cpp +++ b/demo/src/egetriangle.cpp @@ -1,6 +1,5 @@ -//彩色渐变三角形动画演示 -#include -#include +#include "graphics.h" +#include "ege/fps.h" #include #include #include @@ -133,8 +132,8 @@ int main() randomize(); //图形初始化 { - setinitmode(INIT_ANIMATION); - initgraph(width, height); + setinitmode(1, 0, 0); + initgraph(-1, -1); width = getmaxx(); height = getmaxy(); setrendermode(RENDER_MANUAL); diff --git a/src/demo/egetypegame.cpp b/demo/src/egetypegame.cpp similarity index 99% rename from src/demo/egetypegame.cpp rename to demo/src/egetypegame.cpp index 42c07b83..b504fd6a 100644 --- a/src/demo/egetypegame.cpp +++ b/demo/src/egetypegame.cpp @@ -1,4 +1,3 @@ -//打字小游戏 #include typedef struct chartarget { diff --git a/src/demo/test_setviewport.cpp b/demo/src/test_setviewport.cpp similarity index 100% rename from src/demo/test_setviewport.cpp rename to demo/src/test_setviewport.cpp diff --git a/demo/test_setviewport.dev b/demo/test_setviewport.dev new file mode 100644 index 00000000..e57f9660 --- /dev/null +++ b/demo/test_setviewport.dev @@ -0,0 +1,62 @@ +[Project] +FileName=test_setviewport.dev +Name=test_setviewport +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=-lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=test_setviewport.exe +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +CompilerSettings=000000e000000000001000100 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=src\test_setviewport.cpp +CompileCpp=1 +Folder=test_setviewport +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/doall.bat b/doall.bat deleted file mode 100644 index 8b08e8d0..00000000 --- a/doall.bat +++ /dev/null @@ -1,11 +0,0 @@ -set EGE_NOPAUSE=1 - -cd src -call makeall.bat -call testall.bat -cd .. -call copyziplib.bat -call copyzipman.bat -call copyzipsrc.bat -pause - diff --git a/index.htm b/index.htm deleted file mode 100644 index 2164841a..00000000 --- a/index.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - EGE(Easy Graphics Engine)鍥惧舰搴撲富椤 - - - -
EGE锛圗asy Graphics Engine锛
-浣滆咃細misakamm
-
-绠浠嬶細EGE锛圗asy Graphics Engine锛夛紝鏄痺indows涓嬬殑绠鏄撶粯鍥惧簱锛
-鏄竴涓被浼糂GI(graphics.h)鐨勯潰鍚慍/C++璇█鏂版墜鐨勫浘褰㈠簱锛屽畠鐨勭洰鏍囦篃鏄负浜嗘浛浠C鐨凚GI搴撹屽瓨鍦ㄣ
-瀹冪殑浣跨敤鏂规硶涓嶵C涓殑graphics.h鐩稿綋鎺ヨ繎锛屽鏂版墜鏉ヨ锛岀畝鍗曪紝鍙嬪ソ锛屽鏄撲笂鎵嬶紝鍏嶈垂寮婧愶紝
-鑰屼笖鍥犱负鎺ュ彛鎰忎箟鐩磋锛屽嵆浣挎槸涔嬪墠瀹屽叏娌℃湁鎺ヨЕ杩囧浘褰㈢紪绋嬬殑锛屼篃鑳借繀閫熷浼氬熀鏈殑缁樺浘銆
-鐩墠锛孍GE鍥惧舰搴撳凡缁忓畬缇庢敮鎸乂C6, VC2008, VC2010锛孷C2012锛屽叾涓璿c2008/2010/2012鏀寔缂栬瘧鍑64浣嶅簲鐢ㄧ▼搴
-鍚屾椂涔熸敮鎸丆-Free, DevCpp, Code::Blocks, codelite, wxDev, Eclipse for C/C++绛塈DE锛
-鍗虫敮鎸佷娇鐢∕inGW鎴栬匨inGW64涓虹紪璇戠幆澧冪殑IDE銆
-濡傛灉浣犻渶瑕佸湪VC涓嬩娇鐢╣raphics.h锛岄偅涔坋ge灏嗕細鏄緢濂界殑鏇夸唬鍝併
-
-瀹樼綉锛http://xege.org
-涓婚〉1锛http://misakamm.github.com/xege
-涓婚〉2锛http://misakamm.bitbucket.org/index.htm
-涓婚〉3锛http://tcgraphics.sourceforge.net
-涓婚〉4锛http://tcgraphics.svn.sourceforge.net/viewvc/tcgraphics/trunk/index.htm
-鍗氬锛http://blog.misakamm.org
-璐村惂锛http://tieba.baidu.com/f?kw=ege%C4%EF
-鐧剧锛http://baike.baidu.com/view/4043560.htm
-Mail锛歮isakamm[at gmail com]
-
-ege搴撲笅杞藉強鏂囨。锛堝缓璁娇鐢ㄦ渶鏂扮増锛锛
-ege鏈鏂扮増(bitbucket)
-ege鏈鏂扮増(git)
-ege鏈鏂扮増(sf)
-闀滃儚鏂囨。閾炬帴锛
-ege鏈鏂扮増闀滃儚
-浠ヤ笂鏂扮増涓嬭浇鏂规硶2锛氳鍚 ege at misakamm dot com 鍙戦佷富棰樹负ege鐨勯偖浠讹紝浼氳嚜鍔ㄧ粰浣犲洖澶32浣嶇増鏈笅杞介摼鎺
-
-ege12.03锛堟棫鎺ュ彛鐗堬級
-
-璇存槑锛12.03鐨勫瓨鍦ㄤ富瑕佹槸涓轰簡鍏煎鑰佹帴鍙h屼繚鐣欙紝鏈鏂扮増鍦12.03鐨勫熀纭涓婏紝璋冩暣浜嗕笉鍚堢悊鐨勬帴鍙o紝澧炲姞浜嗘洿澶氬己澶х殑鍔熻兘锛屽畬鍠勪簡鏂囨。銆
-濡傛灉鎮ㄥ湪浣跨敤鏂扮増鏈殑鏃跺欙紝閬囧埌浠讳綍鐨刡ug鎴栬呭彲鑳界殑闂锛屾垨鑰呮兂鍔犲叆ege寮鍙戝洟闃熺殑璇锛岃鍔犲叆閭欢鍒楄〃
-
-
-鐩稿叧涓嬭浇锛
-mingw4.5.2锛堝彲鐢╟lang2.9缂栬瘧锛
-clang2.9 for win32
-
-
-琛ュ厖璇存槑锛堥儴鍒唂aq锛夛細
-1. 涓轰粈涔堜笉鏀寔vc.net鍜寁c2005锛
-vc.net閫氬父鎸噕c2003锛岃繖涓増鏈殑vc瀹夎杩囦簬楹荤儲锛屼娇鐢ㄧ殑浜哄お灏戙
-鑰寁c2005鍏跺疄杩樼粏鍒嗕负vc2005鍜寁c2005 sp1锛屼袱涓増鏈紪璇戝嚭鏉ョ殑闈欐佸簱涓嶈兘鍏煎銆
-骞朵笖vc2008鐨勪娇鐢ㄤ綋楠屽拰vc2005鐨勫尯鍒笉澶э紝鍩烘湰鍔熻兘涓妚c2008涔熺暐寮轰竴浜
-涓轰簡閬垮厤鍒濆鑰呮贩娣嗭紝鍚屾椂涔熷噺灏戠紪璇戝伐浣滈噺绛夊洜绱狅紝鏁呬笉鎻愪緵vc2005鐨勯潤鎬佸簱銆
-浣嗗鏋滀綘纭疄鍙湁vc2005锛堟墦浜唖p1琛ヤ竵锛夛紝鍙互灏濊瘯鐩存帴浣跨敤2008鐨勯潤鎬佸簱銆
-
-濡傛灉浠ヤ笂鐩綍鏂囧瓧鏄剧ず杈冨皬锛岃鐢–trl+榧犳爣婊氳疆璋冩暣鏂囧瓧澶у皬锛屾垨鑰呯敤浣犵殑娴忚鍣ㄨ缃慨鏀瑰嵆鍙
-
- - diff --git a/lib/Readme.txt b/lib/Readme.txt new file mode 100644 index 00000000..0241fbb7 --- /dev/null +++ b/lib/Readme.txt @@ -0,0 +1,33 @@ +# 2015/03/29 version 1.1 by cyd AT bupt.edu.cn +# 2015/02/03 initial version by cyd AT bupt.edu.cn +本目录下是经过编译后生成的库文件。 + +目录结构如下: +其中的“xx”代表vc的版本号,比如vc2013,“xx”代表“13” +其中的“xxx”代表mingw的版本号,比如mingw4.7.2,“xxx”代表“4.7.2” + +\-+---vc20xx //这是用于VC++的库文件 + | | + | +----graphics.lib //这是用于win32编译环境的release版本的库文件(不带调试信息) + | | + | \----amd64 + | +----graphics64.lib //这是用于x64编译环境的release版本的库文件(不带调试信息) + | + +---TDM-GCC-64 //使用TDM MinGW64 (gcc 4.9.2)编译出来的库文件 + | +----libgraphics64.a //这是用于64位编译环境的库文件(g++ -m64) + | +----libgraphics.a //这是用于32位编译环境的库文件(g++ -m32, 64位编译器编译32位程序) + +---mingw32-x.x.x + +----libgraphics.a //这是使用MinGW32 (gcc x.x.x)编译出来的32位库文件 + +说明1: 一般情况下,请使用用于win32编译环境的release版本的库文件即可。 +说明2: 目前(2015/02)所使用的mingw来源如下 + mingw-4.7.2: 来自于Dev-Cpp_5.5.3_MinGW_4.7.2_Setup.exe内嵌mingw + mingw-4.8.1: 来自于Dev-Cpp 5.6.0 MinGW 4.8.1 Setup.exe内嵌mingw + (已弃用)mingw64-4.9.2: 来自于mingw-w64-bin-x86_64-20150102.7z (http://www.drangon.org/mingw/) + 按照这个drangon的说法,该包中使用的是MinGW64工程的3.3.0版本。 + 这里为了习惯,我将它按照gcc版本命名 + 但是这个版本有问题,只能编译64位库文件。 + 当使用-m32编译32位库文件时,报告错误:找不到cstdio中包含的 + + + +getInteger + + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛瀵硅瘽妗嗚緭鍏ュ嚱鏁-锛瀏etChar

+

鍔熻兘锛
+ 鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓瓧绗

+

澹版槑锛
+ char getChar(LPCSTR +text = "Input a character and press ENTER");

+

鍙傛暟锛
+ text 瀵硅瘽妗嗗唴鏄剧ず鐨勬彁绀烘枃瀛楋紝鍙互浣跨敤'\n'鎴栬'\t'杩涜鏍煎紡鎺у埗銆
+

+

杩斿洖鍊硷細
+ 杩斿洖鐢ㄦ埛杈撳叆鐨勫瓧绗︺

+

绀轰緥锛

+
#include "graphics.h"
+
int main() + {
+   initgraph(640, 480);
+
+   char c;
+   c = getChar();
+   outputxy(0, 0, x);
+
+   ege::getch
();
+   return 0;
+ }
+

 

+ + diff --git a/man/api/dlginput/getCoords.htm b/man/api/dlginput/getCoords.htm new file mode 100644 index 00000000..ff7e4273 --- /dev/null +++ b/man/api/dlginput/getCoords.htm @@ -0,0 +1,45 @@ + + + getString + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛瀵硅瘽妗嗚緭鍏ュ嚱鏁-锛瀏etCoords

+

鍔熻兘锛
+ 鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ュ嚑缁勫潗鏍囥傜敤鎴蜂竴娆¤緭鍏ヤ竴缁勫潗鏍囷紝鍗充袱涓潗鏍囧硷紝鍧愭爣鍊间箣闂寸敤閫楀彿鍒嗛殧锛屼緥濡傦細 10,25

+

澹版槑锛
+ int* getCoords(int coords[], unsigned int pairs, LPCSTR + title = "Input +Coordinations");

+

鍙傛暟锛
+coords[]: 瀛樺偍鐢ㄦ埛杈撳叆鐨勫潗鏍囷細coords[0]:x1, coords[1]:y1; coords[2]:x2, coords[3]:y2;......
+pairs: 鎯宠杈撳叆鐨勫潗鏍囧鐨勬暟閲忋傝鍑芥暟鍙互鎸夌収璋冪敤鑰呭埗瀹氱殑鏁伴噺涓嶆柇瑕佹眰鐢ㄦ埛杈撳叆鍧愭爣瀵
+title: 瀵硅瘽妗嗙殑鏍囬銆
+

+

杩斿洖鍊硷細
+ 杩斿洖鎸囧悜coords鏁扮粍鐨勬寚閽堛

+

绀轰緥锛

+
#include "graphics.h"
+
int main() {
+   initgraph(640, +480);
+
+  int coords[4];
+  getCoords(coords, sizeof(coords)/sizeof(int)/2, +"璇疯緭鍏ュ潗鏍");
+   line(coords[0], + coords[1], coords[2], coords[3]);
+
+   ege::getch
();
+   return 0; +
+}
+

 

+ + diff --git a/man/api/dlginput/getDouble.htm b/man/api/dlginput/getDouble.htm new file mode 100644 index 00000000..10c08c84 --- /dev/null +++ b/man/api/dlginput/getDouble.htm @@ -0,0 +1,42 @@ + + + + +getInteger + + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛瀵硅瘽妗嗚緭鍏ュ嚱鏁-锛瀏etDouble

+

鍔熻兘锛
+ 鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓弻绮惧害娴偣鏁

+

澹版槑锛
+ double getDouble(LPCSTR +text = "Input a float and press ENTER");

+

鍙傛暟锛
+ text 瀵硅瘽妗嗗唴鏄剧ず鐨勬彁绀烘枃瀛楋紝鍙互浣跨敤'\n'鎴栬'\t'杩涜鏍煎紡鎺у埗銆
+

+

杩斿洖鍊硷細
+ 杩斿洖鐢ㄦ埛杈撳叆鐨勫弻绮惧害娴偣鏁般

+

绀轰緥锛

+
#include "graphics.h"
+
int main() + {
+   initgraph(640, 480);
+
+   double x;
+   x = getDouble();
+   xyprintf(0, 0, "%f", x);
+
+   ege::getch
();
+   return 0;
+ }
+

 

+ + diff --git a/man/api/dlginput/getInteger.htm b/man/api/dlginput/getInteger.htm new file mode 100644 index 00000000..5196d2ee --- /dev/null +++ b/man/api/dlginput/getInteger.htm @@ -0,0 +1,42 @@ + + + + +getInteger + + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛瀵硅瘽妗嗚緭鍏ュ嚱鏁-锛瀏etInteger

+

鍔熻兘锛
+ 鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓暣鏁

+

澹版槑锛
+ int getInteger(LPCSTR +text = "Input an integer and press ENTER");

+

鍙傛暟锛
+ text 瀵硅瘽妗嗗唴鏄剧ず鐨勬彁绀烘枃瀛楋紝鍙互浣跨敤'\n'鎴栬'\t'杩涜鏍煎紡鎺у埗銆
+

+

杩斿洖鍊硷細
+ 杩斿洖鐢ㄦ埛杈撳叆鐨勬暣鏁般

+

绀轰緥锛

+
#include "graphics.h"
+
int main() + {
+   initgraph(640, 480);
+
+   int x;
+   x = getInteger();
+   xyprintf(0, 0, "%d", x);
+
+   ege::getch
();
+   return 0;
+ }
+

 

+ + diff --git a/man/api/dlginput/getString.htm b/man/api/dlginput/getString.htm new file mode 100644 index 00000000..9999278a --- /dev/null +++ b/man/api/dlginput/getString.htm @@ -0,0 +1,45 @@ + + + getString + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛瀵硅瘽妗嗚緭鍏ュ嚱鏁-锛瀏etString

+

鍔熻兘锛
+ 鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓瓧绗︿覆锛屼笌inputbox_getline绫讳技锛屼絾鍙傛暟鏇村皯

+

澹版槑锛
+ LPSTR + getString(LPSTR buf, int length, +LPCSTR text = "Input a string and press ENTER");

+

鍙傛暟锛
+buf 瀛楃鎸囬拡绫诲瀷锛屾寚鍚戝瓨鏀惧瓧绗︿覆鐨勫唴瀛
+int 杈撳叆鐨勫瓧绗︿覆鐨勯暱搴︼紙瀛楃涓暟锛
+ text 瀵硅瘽妗嗗唴鏄剧ず鐨勬彁绀烘枃瀛楋紝鍙互浣跨敤'\n'鎴栬'\t'杩涜鏍煎紡鎺у埗銆
+

+

杩斿洖鍊硷細
+ 杩斿洖鎸囧悜buf鐨勬寚閽堛

+

绀轰緥锛

+
#include "graphics.h"
+
int main() {
+   initgraph(640, +480);
+
+  char str[100];
+  getString(str, sizeof(str)/sizeof(*str), +"璇烽殢渚縗n杈撳叆涓涓插瓧绗︼紝杈撳叆瀹岃鍥炶溅");
+   outtextxy(0, + 0, str);
+
+   ege::getch
();
+   return 0; +
+}
+

 

+ + diff --git a/man/api/dlginput/index.htm b/man/api/dlginput/index.htm new file mode 100644 index 00000000..b4683ec5 --- /dev/null +++ b/man/api/dlginput/index.htm @@ -0,0 +1,41 @@ + + + +鍏跺畠鍑芥暟 + + + +

涓婚〉-锛搴撳嚱鏁扮洰褰-锛炲璇濇杈撳叆鍑芥暟

+

鐩綍锛 +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
鍑芥暟鎴栨暟鎹璇存槑
inputbox_getline浣跨敤瀵硅瘽妗嗚鐢ㄦ埛杈撳叆涓涓瓧绗︿覆
getInteger鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓暣鏁
getDouble鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓诞鐐规暟
getString鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓瓧绗︿覆锛屼笌inputbox_getline绫讳技锛屼絾鍙傛暟鏇村皯
getChar鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴疯緭鍏ヤ竴涓瓧绗
getCoords鏄剧ず瀵硅瘽妗嗭紝璁╃敤鎴峰惊鐜緭鍏ユ寚瀹氭暟閲忕殑鍧愭爣锛屼竴娆¤緭鍏ヤ竴瀵瑰潗鏍囷紝渚嬪锛 10,20
+ diff --git a/man/api/other/inputboxgetline.htm b/man/api/dlginput/inputboxgetline.htm similarity index 67% rename from man/api/other/inputboxgetline.htm rename to man/api/dlginput/inputboxgetline.htm index 438d41fd..ec987b8b 100644 --- a/man/api/other/inputboxgetline.htm +++ b/man/api/dlginput/inputboxgetline.htm @@ -4,32 +4,35 @@ -
涓婚〉-锛搴撳嚱鏁扮洰褰-锛鍏跺畠鍑芥暟-锛瀒nputbox_getline
+

涓婚〉-锛搴撳嚱鏁扮洰褰-锛鍏跺畠鍑芥暟-锛瀒nputbox_getline

+

-鍔熻兘锛 -浣跨敤瀵硅瘽妗嗚鐢ㄦ埛杈撳叆涓涓瓧绗︿覆 - -澹版槑锛 + 鍔熻兘锛 +
+ 浣跨敤瀵硅瘽妗嗚鐢ㄦ埛杈撳叆涓涓瓧绗︿覆

+

澹版槑锛

int inputbox_getline(LPCSTR  title, LPCSTR  text, LPSTR  buf, int len);
 int inputbox_getline(LPCWSTR title, LPCWSTR text, LPWSTR buf, int len);
-鍙傛暟锛 +

鍙傛暟锛 +
title 瀵硅瘽妗嗘爣棰 +
text 瀵硅瘽妗嗗唴鏄剧ず鐨勬彁绀烘枃瀛楋紝鍙互浣跨敤'\n'鎴栬'\t'杩涜鏍煎紡鎺у埗銆 +
buf 鐢ㄤ簬鎺ユ敹杈撳叆鐨勫瓧绗︿覆鎸囬拡锛屾寚鍚戜竴涓紦鍐插尯 +
len -鎸囧畾buf鎸囧悜鐨勭紦鍐插尯鐨勫ぇ灏忥紝鍚屾椂涔熶細闄愬埗鍦ㄥ璇濇閲岃緭鍏ョ殑鏈澶ч暱搴 - -杩斿洖鍊硷細 -杩斿洖1琛ㄧず杈撳叆鏈夋晥锛宐uf涓殑鍐呭涓虹敤鎴锋墍杈撳叆鐨勬暟鎹紝杩斿洖0琛ㄧず杈撳叆鏃犳晥锛屽悓鏃禸uf娓呯┖銆 - -绀轰緥锛 +鎸囧畾buf鎸囧悜鐨勭紦鍐插尯鐨勫ぇ灏忥紝鍚屾椂涔熶細闄愬埗鍦ㄥ璇濇閲岃緭鍏ョ殑鏈澶ч暱搴

+

杩斿洖鍊硷細
+ 杩斿洖1琛ㄧず杈撳叆鏈夋晥锛宐uf涓殑鍐呭涓虹敤鎴锋墍杈撳叆鐨勬暟鎹紝杩斿洖0琛ㄧず杈撳叆鏃犳晥锛屽悓鏃禸uf娓呯┖銆

+

绀轰緥锛

#include "graphics.h"
 
 int main()
@@ -45,7 +48,6 @@
     return 0;
 }
-
diff --git a/man/api/index.htm b/man/api/index.htm index d65742ad..453bc413 100644 --- a/man/api/index.htm +++ b/man/api/index.htm @@ -4,20 +4,18 @@ -
涓婚〉-锛炲簱鍑芥暟鐩綍
-
-鐩綍锛
-缁樺浘鐜鐩稿叧鍑芥暟
-棰滆壊琛ㄧず鍙婄浉鍏冲嚱鏁
-缁樺埗鍥惧舰鐩稿叧鍑芥暟
-鏂囧瓧杈撳嚭鐩稿叧鍑芥暟
-鍥惧儚澶勭悊鐩稿叧鍑芥暟
-閿洏榧犳爣杈撳叆鍑芥暟
-鏃堕棿鍑芥暟
-鏁板鍑芥暟
-闅忔満鍑芥暟
-鍏跺畠鍑芥暟
-
- +

涓婚〉-锛炲簱鍑芥暟鐩綍

+

鐩綍锛

+

缁樺浘鐜鐩稿叧鍑芥暟

+

棰滆壊琛ㄧず鍙婄浉鍏冲嚱鏁

+

缁樺埗鍥惧舰鐩稿叧鍑芥暟

+

鏂囧瓧杈撳嚭鐩稿叧鍑芥暟

+

鍥惧儚澶勭悊鐩稿叧鍑芥暟

+

閿洏榧犳爣杈撳叆鍑芥暟

+

瀵硅瘽妗嗚緭鍏ュ嚱鏁

+

鏃堕棿鍑芥暟

+

鏁板鍑芥暟

+

闅忔満鍑芥暟

+

鍏跺畠鍑芥暟

diff --git a/man/api/other/index.htm b/man/api/other/index.htm index a5b98af8..a5ee5a8a 100644 --- a/man/api/other/index.htm +++ b/man/api/other/index.htm @@ -1,21 +1,29 @@ + - - 鍏跺畠鍑芥暟 + +鍏跺畠鍑芥暟 -
涓婚〉-锛搴撳嚱鏁扮洰褰-锛炲叾瀹冨嚱鏁
-
-鐩綍锛
-
-
-
-
-
+

涓婚〉-锛搴撳嚱鏁扮洰褰-锛炲叾瀹冨嚱鏁

+

鐩綍锛 +

+
鍑芥暟鎴栨暟鎹璇存槑
getfps鑾峰彇褰撳墠绐楀彛鍒锋柊鐜囷紙FPS = Frame Per Second锛
GetHWnd鑾峰彇褰撳墠绐楀彛鍙ユ焺
inputbox_getline浣跨敤瀵硅瘽妗嗚鐢ㄦ埛杈撳叆涓涓瓧绗︿覆
+ + + + + + + + + + + + + + + +
鍑芥暟鎴栨暟鎹璇存槑
getfps鑾峰彇褰撳墠绐楀彛鍒锋柊鐜囷紙FPS = Frame Per Second锛
GetHWnd鑾峰彇褰撳墠绐楀彛鍙ユ焺
inputbox_getline浣跨敤瀵硅瘽妗嗚鐢ㄦ埛杈撳叆涓涓瓧绗︿覆
- - -
- - diff --git a/man/index.htm b/man/index.htm index ffa9122a..b6c3e235 100644 --- a/man/index.htm +++ b/man/index.htm @@ -4,8 +4,21 @@ -
EGE锛圗asy Graphics Engine锛13.04
-浣滆咃細misakamm
+
+

EGE锛圗asy Graphics Engine锛13.04
+
浣滆咃細misakamm

+
+
+

褰撳墠鍙戣鐗堬細 EGE 13.04.02 锛2015骞3鏈29鏃ワ級
+
涓昏鍙樻洿锛
+ 1. 澧炲姞浜嗗VC 2013鐨勬敮鎸
+ 2. 娣诲姞浜5涓緭鍏ュ嚱鏁帮紝鍒嗗埆鐢ㄤ簬杈撳叆鏁存暟銆佹诞鐐规暟銆佸瓧绗︺佸瓧绗︿覆銆佸潗鏍
+ 3. 璋冩暣浜嗘簮鐮佺紪璇戠殑鑴氭湰
+ 4. 鍏跺畠灏忕殑淇敼 +
+

+
+
 
 瀹樼綉锛http://xege.org
 涓婚〉1锛http://misakamm.github.com/xege
diff --git a/publish.bat b/publish.bat
new file mode 100644
index 00000000..e0b133fd
--- /dev/null
+++ b/publish.bat
@@ -0,0 +1,69 @@
+@echo off & setlocal enabledelayedexpansion
+title Build EGE Release Package
+color 0A
+@echo off
+cls
+
+REM We set default ege version below
+set egever=13.04.02
+
+REM Tools we use to make ege release package
+REM The following line can select proper compress algorithm according
+REM   to the filename extension of the archive files
+set compressor=7z.exe a -mx=9
+REM If we need compress to .7z, use the follow line
+REM set compressor=7z.exe a -t7z -mx=9 -ms=on
+
+REM Files to compress
+set filerelease=AUTHORS ChangeLog CONTRIBUTORS COPYING README VERSION include lib man demo publish.bat 7z.exe 7z.dll
+set filefull=%filerelease% src
+
+REM Try to read version from file VERSION
+if not exist VERSION echo.VERSION not found! & goto :CHOOSE_INPUT
+for /f "tokens=*" %%a in (VERSION) do (
+  set egever=%%a
+)
+echo.Current EGE Version is %egever%
+
+:CHOOSE_INPUT 
+choice /C ci /T 10 /D c /M "Use current version [C]; Manual input new version[I]" 
+REM Manual input 
+if errorlevel 2 goto :INPUT_VER
+REM Use current version
+if errorlevel 1 goto :START_PACK
+
+:INPUT_VER
+set /p egever=Please input new version:
+echo.New version is %egever%
+
+:START_PACK
+echo.  Start packing ......
+
+set pubpath=publish\%egever%
+set pkg7zrelease=ege-%egever%-release.7z
+set pkg7zfull=ege-%egever%-full.7z
+set pkgziprelease=ege-%egever%-release.zip
+set pkgzipfull=ege-%egever%-full.zip
+mkdir "%pubpath%" 1>nul 2>nul
+if %errorlevel% GEQ 2 echo.Error when making dir: %pubpath% & goto :end
+echo.  Removing old packages ......
+del /Q "%pubpath%\%pkg7zrelease%" 1>nul 2>nul
+del /Q "%pubpath%\%pkg7zfull%" 1>nul 2>nul
+del /Q "%pubpath%\%pkgziprelease%" 1>nul 2>nul
+del /Q "%pubpath%\%pkgzipfull%" 1>nul 2>nul
+
+echo.  Packing %pkg7zrelease% ......
+%compressor% "%pubpath%\%pkg7zrelease%" %filerelease% 1>nul
+echo.  Packing %pkg7zfull% ......
+%compressor% "%pubpath%\%pkg7zfull%" %filefull% 1>nul
+echo.  Packing %pkgziprelease% ......
+%compressor% "%pubpath%\%pkgziprelease%" %filerelease% 1>nul
+echo.  Packing %pkgzipfull% ......
+%compressor% "%pubpath%\%pkgzipfull%" %filefull% 1>nul
+echo.
+echo.Please see %pubpath%\ to find the packages
+echo.
+if not "%EGE_NOPAUSE%" == "1" (
+        pause
+)
+:end
diff --git a/setver.bat b/setver.bat
deleted file mode 100644
index 799ceb0d..00000000
--- a/setver.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-set egever=13.04
-
diff --git a/src/Makefile.in.MINGW32_NT-5.0 b/src/Makefile.in.MINGW32_NT
similarity index 100%
rename from src/Makefile.in.MINGW32_NT-5.0
rename to src/Makefile.in.MINGW32_NT
diff --git a/src/MakefileWin b/src/MakefileWin
index c46d440d..6ada812c 100644
--- a/src/MakefileWin
+++ b/src/MakefileWin
@@ -1,8 +1,8 @@
 #include ../Makefile.in.Linux
-include Makefile.in.MINGW32_NT-5.0 #$(shell uname)
+include Makefile.in.MINGW32_NT #$(shell uname)
 #include ..\Makefile.in.$(shell uname)
 
-CXXFLAGS= $(AGGCXXFLAGS) -L/usr/include/
+CXXFLAGS= $(AGGCXXFLAGS) -L/usr/include/ -m32
 
 SRC_CXX=\
 graphics.cpp \
diff --git a/src/MakefileWin64 b/src/MakefileWin64
index 39af3f35..cbf9369b 100644
--- a/src/MakefileWin64
+++ b/src/MakefileWin64
@@ -1,8 +1,9 @@
 #include ../Makefile.in.Linux
-include Makefile.in.MINGW32_NT-5.0 #$(shell uname)
+include Makefile.in.MINGW32_NT #$(shell uname)
 #include ..\Makefile.in.$(shell uname)
 
-CXXFLAGS= $(AGGCXXFLAGS) -L/usr/include/
+# CXXFLAGS= $(AGGCXXFLAGS) -L/usr/include/
+CXXFLAGS= $(AGGCXXFLAGS) -L/usr/include/ -m64
 
 SRC_CXX=\
 graphics.cpp \
diff --git a/src/_own_mingwmake.bat b/src/_own_mingwmake.bat
deleted file mode 100644
index 5dda98fd..00000000
--- a/src/_own_mingwmake.bat
+++ /dev/null
@@ -1,16 +0,0 @@
-@rem 在以下一行设置你的mingw路径,建议使用code::blocks自带的mingw版本来编译,路径可以带空格或者中文,需要使用gbk编码
-set MINGWPATH=D:\mingw4.7.1
-
-set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
-
-mingw32-make.exe -f MakefileWin clean
-mingw32-make.exe -f MakefileWin all
-
-if not %ErrorLevel% == 0 (
-    rem 编译失败
-) else (
-    rem 编译完成,请在本目录下找libgraphics.a文件
-)
-
-pause
-
diff --git a/src/demo/egedemo.cpp b/src/demo/egedemo.cpp
deleted file mode 100644
index ff0df39d..00000000
--- a/src/demo/egedemo.cpp
+++ /dev/null
@@ -1,1122 +0,0 @@
-#include "graphics.h"
-#include 
-#include 
-#include 
-
-class SceneBase
-{
-public:
-    virtual SceneBase* Update()
-    {
-        return NULL;
-    }
-};
-
-class SceneHelloWorld6 : public SceneBase
-{
-public:
-    SceneHelloWorld6(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        setcolor(RED);
-        arc(100, 100, 0, 180, 50);
-        arc(200, 100, 0, 180, 50);
-        line(50, 100, 150, 200);
-        line(250, 100, 150, 200);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    initgraph(640, 480);\n\n    setcolor(RED);\n    //画弧线,以(100,100)为圆心,0度到180度,半径50\n    arc(100, 100, 0, 180, 50);\n    //同画弧线,只是位置不同\n    arc(200, 100, 0, 180, 50);\n    //从(50,100)到(150,200)画线\n    line(50, 100, 150, 200);\n    //从(250,100)到(150,200)画线\n    line(250, 100, 150, 200);\n    getch(); //等待用户按键,相当于暂停\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return m_parent;
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneHelloWorld5 : public SceneBase
-{
-public:
-    SceneHelloWorld5(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        setcolor(YELLOW);
-        setfillstyle(MAGENTA);
-        fillellipse(150, 200, 50, 100);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    //图形窗口初始化为640*480大小\n    initgraph(640, 480);\n\n    //设置颜色为黄色\n    setcolor(YELLOW);\n    //设置填充颜色为紫红色\n    setfillstyle(MAGENTA);\n    //以(150,200)为圆心,x半径为50,y半径为100,画一个实心椭圆\n    fillellipse(150, 200, 50, 100);\n\n    getch(); //等待用户按键,相当于暂停\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneHelloWorld6(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneHelloWorld4 : public SceneBase
-{
-public:
-    SceneHelloWorld4(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        setfillstyle(GREEN);
-        bar(100, 100, 200, 400);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    //图形窗口初始化为640*480大小\n    initgraph(640, 480);\n\n    //设置填充颜色为绿色,注意是用来填充颜色\n    setfillstyle(GREEN);\n    //从(100,100)到(200,400)画一个实心矩形,使用填充颜色\n    bar(100, 100, 200, 400);\n\n    getch(); //等待用户按键,相当于暂停\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneHelloWorld5(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneHelloWorld3 : public SceneBase
-{
-public:
-    SceneHelloWorld3(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        setcolor(GREEN);
-        circle(200, 100, 80);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    //图形窗口初始化为640*480大小\n    initgraph(640, 480);\n\n    //设置颜色为绿色\n    setcolor(GREEN);\n    //在x=200,y=100的地方,画一个半径80的圆\n    circle(200, 100, 80);\n\n    getch(); //等待用户按键,相当于暂停\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneHelloWorld4(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneHelloWorld2 : public SceneBase
-{
-public:
-    SceneHelloWorld2(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        circle(200, 100, 80);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    //图形窗口初始化为640*480大小\n    initgraph(640, 480);\n\n    //在x=200,y=100的地方,画一个半径80的圆\n    circle(200, 100, 80);\n\n    getch(); //等待用户按键,相当于暂停\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneHelloWorld3(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneHelloWorld : public SceneBase
-{
-public:
-    SceneHelloWorld(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    SceneBase* Update()
-    {
-        char str[] = "//由两个斜杠\'//\'开始后面的内容为注释,不影响编译\n//以下这个是PowerEasyX图形库的头文件,并不是TC图形的头文件,请注意\n//要正确编译本程序,请先为你的VC或者C-Free安装好PEX\n加了包含这个头文件后,就可以使用图形函数了\n#include \"graphics.h\"\n\nint main() //请使用int声明main,作为规范\n{\n    //图形窗口初始化为640*480大小\n    initgraph(640, 480);\n\n    //设置字体高度为20,宽度为默认值的宋体字\n    setfont(20, 0, \"宋体\");\n\n    //在x=100,y=0的地方开始,显示一段文字\n    outtextxy(100, 0, \"Hello World\");\n\n    //等待用户按键,相当于暂停,注意这是图形库的函数\n    getch();\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        setfont(20, 0, "宋体");
-        outtextxy(100, 0, "Hello World");
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneHelloWorld2(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneForLoop9 : public SceneBase
-{
-public:
-    SceneForLoop9(SceneBase* parent)
-    {
-        m_parent = parent;
-        img = newimage();
-    }
-    ~SceneForLoop9()
-    {
-        delimage(img);
-    }
-    void smain()
-    {
-        int y, x;
-        setbkcolor(DARKGRAY);
-        for (y = 0; y < 8; ++y)
-        {
-            for (x = 0; x < 8; ++x)
-            {
-                setfillcolor(((x^y)&1) ? BLACK : WHITE );
-                bar(x * 30, y * 30, (x + 1) * 30, (y + 1) * 30);
-            }
-        }
-        info();
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\nint main()\n{\
-\n    initgraph(640, 480);\
-\n    int y, x;\
-\n    setbkcolor(DARKGRAY);\
-\n    for (y = 0; y < 8; ++y)\
-\n    {\
-\n        for (x = 0; x < 8; ++x)\
-\n        {\
-\n            setfillcolor(((x^y)&1) ? BLACK : WHITE );\
-\n            bar(x * 30, y * 30,\
-\n                (x+1) * 30, (y+1) * 30));\
-\n        }\
-\n    }\
-\n    getch();\n    return 0;\n}";
-            img->createimage(320, 480);
-            setfont(12, 0, "宋体", img);
-            setbkmode(TRANSPARENT, img);
-            setcolor(0x808080, img);
-            line(0, 0, 0, 480, img);
-            setcolor(0xFFFFFF, img);
-            outtextrect(0, 50, 320, 480, str, img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", img);
-        }
-        putimage(320, 0, img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return m_parent;
-    }
-private:
-    SceneBase* m_parent;
-    PIMAGE img;
-};
-
-class SceneForLoop8 : public SceneBase
-{
-public:
-    SceneForLoop8(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        int y, x;
-        setbkcolor(DARKGRAY);
-        for (y = 0; y < 8; ++y)
-        {
-            for (x = 0; x < 8; ++x)
-            {
-                setfillstyle(((x^y)&1) ? BLACK : WHITE );
-                bar(x * 30, y * 30, (x + 1) * 30, (y + 1) * 30);
-            }
-        }
-        info();
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\nint main()\n{\
-\n    initgraph(640, 480);\
-\n    int y, x;\
-\n    setbkcolor(DARKGRAY);\
-\n    for (y = 0; y < 8; ++y)\
-\n    {\
-\n        for (x = 0; x < 8; ++x)\
-\n        {\
-\n            setfillstyle(((x^y)&1) ? BLACK : WHITE );\
-\n            bar(x * 30, y * 30,\
-\n                (x+1) * 30, (y+1) * 30));\
-\n        }\
-\n    }\
-\n    getch();\n    return 0;\n}";
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50, 320, 480, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return m_parent;
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-};
-
-class SceneForLoop7 : public SceneBase
-{
-public:
-    SceneForLoop7(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        int y;
-        for (y = 0; y < 360; ++y)
-        {
-            setcolor(HSVtoRGB((float)y, 1.0f, 1.0f));
-            line(0, y, 200, y);
-        }
-        info();
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\nint main()\n{\
-\n    initgraph(640, 480);\
-\n    {\
-\n        int y;\
-\n        for (y = 0; y < 360; ++y)\
-\n        {\
-\n            setcolor(HSVtoRGB((float)y, 1.0f, 1.0f));\
-\n            line(0, y, 200, y);\
-\n        }\
-\n    }\n    getch();\n    return 0;\n}";
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50, 320, 480, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return new SceneForLoop8(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-};
-
-class SceneForLoop6 : public SceneBase
-{
-public:
-    SceneForLoop6(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        int x = 0, dx = 1, color = 0;
-        for (; kbhit() == 0; delay_fps(60))
-        {
-            cleardevice();
-            if (x >= 320)
-            {
-                dx = -1;
-            }
-            else if (x <= 0)
-            {
-                dx = 1;
-            }
-            x += dx;
-            color += 1;
-            if (color >= 360)
-            {
-                color = 0;
-            }
-            setcolor(HSVtoRGB((float)color, 1.0f, 1.0f));
-            circle(x, 100, 100);
-            info();
-        }
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\nint main()\n{\
-\n    initgraph(640, 480);\
-\n    int x = 0, dx = 1, color = 0; //x表示圆的横坐标,dx表示速度方向\
-\n    //动画主循环,kbhit()检测当前有没有按键,有就退出\
-\n    //delay_fps(60)控制这个循环每秒循环60次\
-\n    for (; kbhit() == 0; delay_fps(60))\
-\n    {\
-\n        cleardevice();\
-\n        //根据x来调整dx的符号\
-\n        if (x >= 320)\
-\n        {\
-\n            dx = -1;\
-\n        }\
-\n        else if (x <= 0)\
-\n        {\
-\n            dx = 1;\
-\n        }\
-\n        //通过对dx的控制,间接控制x的增减方向\
-\n        x += dx;\
-\n        color += 1;\
-\n        if (color >= 360)\
-\n        {\
-\n            color = 0;\
-\n        }\
-\n        //使用HSV方式指定颜色\
-\n        //关于HSV的介绍见图形库文档或者Google\
-\n        setcolor(HSVtoRGB((float)color, 1.0f, 1.0f));\
-\n        circle(x, 100, 100);\n    }\n    getch();\n    return 0;\n}";
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50, 320, 480, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return new SceneForLoop7(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-};
-
-class SceneForLoop5 : public SceneBase
-{
-public:
-    SceneForLoop5(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        int x = 0, dx = 1;
-        for (; kbhit() == 0; delay_fps(60))
-        {
-            cleardevice();
-            if (x >= 320)
-            {
-                dx = -1;
-            }
-            else if (x <= 0)
-            {
-                dx = 1;
-            }
-            x += dx;
-            setcolor(0xFF0080);
-            circle(x, 100, 100);
-            info();
-        }
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\n\nint main()\n{\
-\n    initgraph(640, 480);\
-\n    int x = 0, dx = 1; //x表示圆的横坐标,dx表示速度方向\
-\n    //动画主循环,kbhit()检测当前有没有按键,有就退出\
-\n    //delay_fps(60)控制这个循环每秒循环60次\
-\n    for (; kbhit() == 0; delay_fps(60))\
-\n    {\
-\n        //清屏\
-\n        cleardevice();\
-\n        //根据x来调整dx的符号\
-\n        if (x >= 320)\
-\n        {\
-\n            dx = -1;\
-\n        }\
-\n        else if (x <= 0)\
-\n        {\
-\n            dx = 1;\
-\n        }\
-\n        //通过对dx的控制,间接控制x的增减方向\
-\n        x += dx;\
-\n        //使用RGB分量方式指定颜色\
-\n        //红色为80,绿为0,蓝为FF\
-\n        setcolor(0xFF0080);\
-\n        circle(x, 100, 100);\n    }\n    getch();\n    return 0;\n}";
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50, 320, 480, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return new SceneForLoop6(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-};
-
-class SceneForLoop4 : public SceneBase
-{
-public:
-    SceneForLoop4(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        for (int n = 0; n < 320; n++)
-        {
-            double x = ((double)n - 160) / 20;
-            double y = sin(x);
-            y = -y * 80 + 240;
-            putpixel(n, (int)y, WHITE);
-        }
-        line(0, 240, 320, 240);
-        line(160, 0, 160, 480);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    initgraph(640, 480);\n    int n; //声明变量x\n    //变量x从0到320,取出每个横坐标\
-\n    for (int n = 0; n < 320; n++)\
-\n    {\
-\n        //映射到-8到8的浮点数范围\
-\n        double x = ((double)n - 160) / 20;\
-\n        //计算对应的y\
-\n        double y = sin(x);\
-\n        //把y映射回屏幕坐标\
-\n        y = -y * 80 + 240;\
-\n        //画出这个点\
-\n        putpixel(n, (int)y, WHITE);\
-\n    }\
-\n    //画坐标轴\
-\n    line(0, 240, 320, 240);\
-\n    line(160, 0, 160, 480);\
-\n    getch();\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneForLoop5(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneForLoop3 : public SceneBase
-{
-public:
-    SceneForLoop3(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        for (int n = 0; n < 320; n++)
-        {
-            double x = ((double)n - 160) / 80;
-            double y = x * x;
-            y = -y * 80 + 240;
-            putpixel(n, (int)y, WHITE);
-        }
-        line(0, 240, 320, 240);
-        line(160, 0, 160, 480);
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    initgraph(640, 480);\n    int n; //声明变量x\n    //变量x从0到320,取出每个横坐标\
-\n    for (int n = 0; n < 320; n++)\
-\n    {\
-\n        //映射到-2到2的浮点数范围\
-\n        double x = ((double)n - 160) / 80;\
-\n        //计算对应的y\
-\n        double y = x * x;\
-\n        //把y映射回屏幕坐标\
-\n        y = -y * 80 + 240;\
-\n        //画出这个点\
-\n        putpixel(n, (int)y, WHITE);\
-\n    }\
-\n    //画坐标轴\
-\n    line(0, 240, 320, 240);\
-\n    line(160, 0, 160, 480);\
-\n    getch();\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneForLoop4(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneForLoop2 : public SceneBase
-{
-public:
-    SceneForLoop2(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        for (int x = 100; x < 300; x += 3)
-        {
-            putpixel(x, 100, GREEN);
-        }
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    initgraph(640, 480);\n    int x; //声明变量x\n    //变量x从100到300,步长为3,这样画出虚线\n    for (x = 100; x < 300; x += 3)\n    {\n        //在y=100的地方画绿点,多个连续点构成线\n        putpixel(x, 100, GREEN);\n    }\n    getch();\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneForLoop3(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneForLoop : public SceneBase
-{
-public:
-    SceneForLoop(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        for (int x = 100; x < 300; x++)
-        {
-            putpixel(x, 100, RED);
-        }
-    }
-    SceneBase* Update()
-    {
-        char str[] = "#include \"graphics.h\"\n\nint main()\n{\n    initgraph(640, 480);\n    int x; //声明变量x\n    //变量x从100到300\n    for (x = 100; x < 300; x++)\n    {\n        //在y=100的地方画红点,多个连续点构成线\n        putpixel(x, 100, RED);\n    }\n    getch();\n    return 0;\n}";
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        smain();
-        {
-            setfont(12, 0, "宋体");
-            setcolor(0x808080);
-            line(320, 0, 320, 480);
-            setcolor(0xFFFFFF);
-            outtextrect(320, 100, 320, 380, str);
-            outtextrect(320, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子");
-        }
-        getch();
-        return new SceneForLoop2(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-};
-
-class SceneArray2 : public SceneBase
-{
-public:
-    SceneArray2(SceneBase* parent)
-    {
-        m_parent = parent;
-        m_dline = 0;
-        m_resettext = 1;
-    }
-    void mydelay(int ms)
-    {
-        int nms = 0;
-        for ( ; nms < ms; delay_ms(50), nms += 50)
-        {
-            while (kbhit(1))
-            {
-                int key = getch(1);
-                if ( (key & KEYMSG_DOWN) == 0) continue;
-                key &= 0xFFFF;
-                if (key == 'W' || key == VK_UP)
-                {
-                    m_dline += 1;
-                    m_resettext = 1;
-                }
-                else if ((key == 'S' || key == VK_DOWN) && m_dline > 0)
-                {
-                    m_dline -= 1;
-                    m_resettext = 1;
-                }
-            }
-            info();
-        }
-    }
-    void display(int arr[], int n, int i)
-    {
-        int a;
-        cleardevice();
-        for (a = 0; a < n; ++a)
-        {
-            setcolor(WHITE);
-            setfillstyle(HSLtoRGB(120.0f, 1.0f, (float)(arr[a] / 32.0)));
-            fillellipse(100, 20 * a + 30, 9, 9);
-        }
-        if (i >= 0)
-        {
-            setfillstyle(HSLtoRGB(120.0f, 1.0f, 1.0f));
-            fillellipse(80, 20 * i + 30, 9, 9);
-            fillellipse(80, 20 * (i + 1) + 30, 9, 9);
-        }
-        mydelay(500);
-    }
-    void smain()
-    {
-        int arr[20];
-        int a, b;
-        randomize();
-        for (a = 0; a < 20; ++a)
-        {
-            arr[a] = random(32);
-        }
-        display(arr, 20, -1);
-        setfont(12, 0, "宋体");
-        outtextxy(0, 0, "请按任意键开始演示冒泡排序");
-        info();
-        getch();
-        cleardevice();
-        for (b = 20; b > 0; --b)
-        {
-            for (a = 1; a < b; ++a)
-            {
-                if ( arr[a] < arr[a-1])
-                {
-                    int t = arr[a];
-                    arr[a] = arr[a-1];
-                    arr[a-1] = t;
-                }
-                display(arr, 20, a-1);
-            }
-        }
-        outtextxy(0, 0, "排序完成");
-    }
-    void info()
-    {
-        if (m_resettext)
-        {
-            char str[] = "#include \"graphics.h\"\n#include \n#include \n#include \
-\nvoid display(int arr[], int n)\
-\n{\
-\n    int a;\
-\n    cleardevice();\
-\n    for (a = 0; a < n; ++a)\
-\n    {\
-\n        setcolor(WHITE);\
-\n        setfillstyle(HSLtoRGB(120.0f, 1.0f, (float)(arr[a] / 32.0)));\
-\n        fillellipse(100, 20 * a, 9, 9);\
-\n    }\
-\n    if (i >= 0)\
-\n    {\
-\n        setfillstyle(HSLtoRGB(120.0f, 1.0f, 1.0f)));\
-\n        fillellipse(80, 20 * i + 30, 9, 9);\
-\n        fillellipse(80, 20 * (i + 1) + 30, 9, 9);\
-\n    }\
-\n    delay(500);\
-\n}\
-\nint main()\
-\n{\
-\n    int arr[20];\
-\n    int a, b;\
-\n    initgraph(640, 480);\
-\n    randomize();\
-\n    for (a = 0; a < 20; ++a)\
-\n    {\
-\n        arr[a] = random(32);\
-\n    }\
-\n    display(arr, 20);\
-\n    setfont(12, 0, \"宋体\");\
-\n    outtextxy(0, 0, \"请按任意键开始演示\");\
-\n    getch();\
-\n    cleardevice();\
-\n    for (b = 20; b > 0; --b)\
-\n    {\
-\n        for (a = 1; a < b; ++a)\
-\n        {\
-\n            if ( arr[a] < arr[a-1])\
-\n            {\
-\n                int t = arr[a];\
-\n                arr[a] = arr[b];\
-\n                arr[b] = t;\
-\n            }\
-\n            display(arr, 20, a-1);\
-\n        }\
-\n    }\
-\n    outtextxy(0, 0, \"排序完成\");\
-\n    return 0;\
-\n}\
-";
-            m_resettext = 0;
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50 - m_dline * 12, 320, 2048, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return m_parent;
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-    int m_dline;
-    int m_resettext;
-};
-
-class SceneArray : public SceneBase
-{
-public:
-    SceneArray(SceneBase* parent)
-    {
-        m_parent = parent;
-    }
-    void smain()
-    {
-        int t = clock();
-        char str[100];
-        for (; kbhit() == 0; delay_fps(60))
-        {
-            cleardevice();
-            sprintf(str, "经过时间%d", clock() - t);
-            setfont(36, 0, "幼圆");
-            outtextxy(0, 0, str);
-            info();
-        }
-    }
-    void info()
-    {
-        if (img.getwidth() <= 1)
-        {
-            char str[] = "#include \"graphics.h\"\n#include \n#include \n#include \nint main()\n{\
-\n    initgraph(640, 480);\
-\n    {\
-\n        int t = clock(); //记录超始时间\
-\n        char str[100];\
-\n        for (; kbhit() == 0; delay_fps(60))\
-\n        {\
-\n            cleardevice();\
-\n            //把clock()-t的结果输出到字符串str\
-\n            //实现简单的计时,可扩展成秒表\
-\n            sprintf(str, \"经过时间%d\", clock() - t;\
-\n            setfont(36, 0, \"幼圆\");\
-\n            outtextxy(0, 0, str);\
-\n        }\
-\n    }\
-\n    getch();\n    return 0;\n}";
-            img.createimage(320, 480);
-            setfont(12, 0, "宋体", &img);
-            setbkmode(TRANSPARENT, &img);
-            setcolor(0x808080, &img);
-            line(0, 0, 0, 480, &img);
-            setcolor(0xFFFFFF, &img);
-            outtextrect(0, 50, 320, 480, str, &img);
-            outtextrect(0, 0, 320, 400, "左半边是程序运行结果,下面是相应的源代码\n按任意键查看下一个例子", &img);
-        }
-        putimage(320, 0, &img);
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(BLACK);
-        cleardevice();
-        setcolor(LIGHTGRAY);
-        while (kbhit())
-        {
-            getch();
-        }
-        smain();
-        getch();
-        return new SceneArray2(m_parent);
-    }
-private:
-    SceneBase* m_parent;
-    IMAGE img;
-};
-
-class SceneMenu : public SceneBase
-{
-public:
-    SceneMenu()
-    {
-        memset(m_strlist, 0, sizeof(m_strlist));
-        strcpy(m_strlist[0], "1.如果我刚学会Hello World");
-    }
-    SceneBase* Update()
-    {
-        setbkcolor_f(0x808080);
-        cleardevice();
-        setcolor(0xFFFFFF);
-        setfont(24, 0, "宋体");
-        outtextrect(100, 200, 500, 500, "1.如果我刚刚学会Hello World\n2.如果我刚刚学会循环和分支\n3.如果我刚刚学会数组和字符串\n(更多内容有待添加)\n");
-        outtextxy(100, 100, "请按数字键选你要看的内容");
-        int k;
-        while (1)
-        {
-            k = getch();
-            if (k == '1')
-            {
-                return new SceneHelloWorld(new SceneMenu);
-            }
-            else if (k == '2')
-            {
-                return new SceneForLoop(new SceneMenu);
-            }
-            else if (k == '3')
-            {
-                return new SceneArray(new SceneMenu);
-            }
-        }
-    }
-private:
-    int m_x, m_y;
-    int m_highlight;
-    char m_strlist[100][32];
-};
-
-class SceneIntroduce : public SceneBase
-{
-public:
-    SceneIntroduce()
-    {
-        memset(m_str, 0, sizeof(m_str));
-        strcpy(m_str, "你是刚刚学习C语言的新手吗?你是不是觉得单纯的字符输出有点无聊?C语言只能做这些吗?能不能做更有趣的?比如写游戏?\r\n本演示程序就是为了给你解开这个疑惑,本程序将带你进入精彩的C语言图形世界!不管你现在的C是刚刚开始学,还是学了一段时间,只要你有VC或者C-Free,都可以享受这个图形的盛宴。。。\r\n在正式开始前,请你百度“PowerEasyX”,下载并按里面的说明文档安装好。如果安装时遇到什么困难,可以加QQ群46612969说明你的情况,会有人协助你解决的。\r\n(请按任意键继续)\r\n");
-    }
-    SceneBase* Update()
-    {
-        char str[1024] = {0};
-        int len = 0;
-        setfont(20, 0, "宋体");
-        for (len = 0 ; len<=0x80; delay_fps(60))
-        {
-            setbkcolor_f(RGB(len, len, len));
-            cleardevice();
-            ++len;
-        }
-
-        for (len = 0 ; m_str[len]; delay_fps(30))
-        {
-            strncpy(str, m_str, len);
-            len += 2;
-            cleardevice();
-            setcolor(0x0);
-            outtextrect(102, 101, 440, 480, str);
-            setcolor(0xFFFFFF);
-            outtextrect(100, 100, 440, 480, str);
-        }
-        getch();
-        IMAGE img;
-        getimage(&img, 0, 0, 640, 480);
-        for (len = 255 ; len>=0; delay_fps(60))
-        {
-            cleardevice();
-            putimage_alphablend(NULL, &img, 0, 0, len);
-            len -= 3;
-        }
-        return new SceneMenu;
-    }
-private:
-    char m_str[1024];
-};
-
-int WinMain()
-{
-    initgraph(640, 480);
-    SceneBase* scene = new SceneIntroduce; //SceneIntroduce; SceneMenu
-    setbkmode(TRANSPARENT);
-    BeginBatchDraw();
-    for (SceneBase* newscene = scene; newscene != NULL; delay_fps(60))
-    {
-        newscene = scene->Update();
-        if (newscene != scene)
-        {
-            delete scene;
-            scene = newscene;
-        }
-    }
-    EndBatchDraw();
-    closegraph();
-    return 0;
-}
-
diff --git a/src/ege.h b/src/ege.h
index ae687568..96062a72 100644
--- a/src/ege.h
+++ b/src/ege.h
@@ -1,3 +1,15 @@
+/*
+** Filename: ege.h
+** version:  13.04.01-20150207
+*/
+/***************************************************************************
+** 20150203 by cyd AT bupt dot edu dot cn
+** 关于用VC2013编译时的问题
+** 由于原作者misakamm在 ege.h 中 使用#pragma指定了链接库,并且将所有版本号
+** 大_MSC_VER于1700的VC编译器全部指定为使用 graphics12.lib,导致编译失败。
+** 因此,在本版ege.h中,将相关的代码做了处理。
+****************************************************************************/
+
 /*********************************************************
 * EGE (Easy Graphics Engine)
 * FileName      ege.h
@@ -31,6 +43,9 @@
 * ★合理地使用delay_ms/delay_fps函数,可以减少你的程序占用的CPU,否则一个都没有调用同时也没有getch/getmouse的话,程序将占满一个CPU的时间
 ****************************************************************************/
 
+
+#include 
+#include 
 #ifndef _EGE_H_
 #define _EGE_H_
 
@@ -70,56 +85,36 @@
 #endif
 #endif
 
+/* 20150203 by cyd@bupt.edu.cn 
+VC内部版本号    宏的值           VC发行版编号
+MS VC++ 13.0 _MSC_VER = 1900 (Visual C++ 2015)
+MS VC++ 12.0 _MSC_VER = 1800 (Visual C++ 2013)
+MS VC++ 11.0 _MSC_VER = 1700 (Visual C++ 2012)
+MS VC++ 10.0 _MSC_VER = 1600 (Visual C++ 2010)
+MS VC++ 9.0  _MSC_VER = 1500 (Visual C++ 2008)
+MS VC++ 8.0  _MSC_VER = 1400 (Visual C++ 2005)
+MS VC++ 7.1  _MSC_VER = 1310 (Visual C++ 7.1)
+MS VC++ 7.0  _MSC_VER = 1300 (Visual C++ 7.0)
+MS VC++ 6.0  _MSC_VER = 1200 (Visual C++ 6.0)
+MS VC++ 5.0  _MSC_VER = 1100 (Visual C++ 5.0)
+*/
+/* 20150329 by cyd AT bupt dot edu dot cn 
+** 将所有VC工程中(graphicsXX.vcxproj)中的“ProjectName”字段从“graphicsXX”改为
+** “graphics”,这样不论哪个版本的Visual Studio编译出来的库文件名字都是graphics.lib(
+** 32位)以及graphics64.lib(64位)
+** 在下面针对VC++的链接库也就容易处理了
+*/
 #if !defined(_GRAPH_LIB_BUILD_) && !defined(_GRAPH_NO_LIB_)
 	#ifdef _MSC_VER
 		#ifdef _WIN64
-			#if (_MSC_VER >= 1700)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics1264d.lib")
-				#else
-					#pragma comment(lib,"graphics1264.lib")
-				#endif
-			#elif (_MSC_VER >= 1600)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics1064d.lib")
-				#else
-					#pragma comment(lib,"graphics1064.lib")
-				#endif
-			#elif (_MSC_VER >= 1500)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics0864d.lib")
-				#else
-					#pragma comment(lib,"graphics0864.lib")
-				#endif
-			#elif (_MSC_VER > 1200)
-				#pragma comment(lib,"graphics05.lib")
-			#else
-				#pragma comment(lib,"graphics.lib")
-			#endif
-		#else
-			#if (_MSC_VER >= 1700)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics12d.lib")
-				#else
-					#pragma comment(lib,"graphics12.lib")
-				#endif
-			#elif (_MSC_VER >= 1600)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics10d.lib")
-				#else
-					#pragma comment(lib,"graphics10.lib")
-				#endif
-			#elif (_MSC_VER >= 1500)
-				#if 0 && defined(_DLL)
-					#pragma comment(lib,"graphics08d.lib")
-				#else
-					#pragma comment(lib,"graphics08.lib")
-				#endif
-			#elif (_MSC_VER > 1200)
-				#pragma comment(lib,"graphics05.lib")
-			#else
+			#if (_MSC_VER >= 1400)  //VS2008及之后的版本支持64位
+				//要求编译器自动链接下面的库文件,无需程序员手动指定
+				#pragma comment(lib,"graphics64.lib")
+			#else											//VS2005及更老的版本,都不支持x64,包括VC6。
 				#pragma comment(lib,"graphics.lib")
 			#endif
+		#else //以下为32位编译环境
+			#pragma comment(lib,"graphics.lib")
 		#endif
 		#if _MSC_VER >= 1700
 			#ifdef _DEBUG
@@ -253,7 +248,7 @@ namespace ege {
 const double PI = 3.1415926535897932384626;
 
 enum graphics_drivers {     /* define graphics drivers */
-	DETECT,         /* requests autodetection */
+	DETECT,         /* requests auto detection */
 	CGA, MCGA, EGA, EGA64, EGAMONO, IBM8514,/* 1 - 6 */
 	HERCMONO, ATT400, VGA, PC3270,          /* 7 - 10 */
 	TRUECOLOR, TRUECOLORSIZE,
@@ -623,8 +618,13 @@ typedef struct ege_colpoint {
 }ege_colpoint;
 
 // 鼠标消息
+#if defined(__GNUC__) 
+//GCC要求__attribute__放到struct关键字后面,否则编译会有提示
+struct EGE_DEPRECATE(MOUSEMSG) MOUSEMSG {
+#else    
 EGE_DEPRECATE(MOUSEMSG)
 struct MOUSEMSG {
+#endif
 	UINT uMsg;              // 当前鼠标消息
 	bool mkCtrl;            // Ctrl 键是否按下
 	bool mkShift;           // Shift 键是否按下
@@ -1283,6 +1283,34 @@ int EGEAPI inputbox_getline(LPCSTR  title, LPCSTR  text, LPSTR  buf, int len);
 int EGEAPI inputbox_getline(LPCWSTR title, LPCWSTR text, LPWSTR buf, int len);  //弹出对话框,让用户输入,当前程序运行暂停,返回非0表示输入有效,0为无效
 
 
+/*
+** ege图形库的输入增强函数。
+** 以下5个函数,是为了帮助C语言初学者解决数字字符输入解析的问题
+** Programmer: zsd@bupt (blacketzsd AT qq dot com) 2013/06/01
+** Modifier:   cyd@bupt (cyd AT bupt dot edu dot cn) 2015/02/07
+*/
+
+//限制输入为整形的输入框,可改变 对话框提示文字;返回输入的整数
+int EGEAPI getInteger(LPCSTR text = "Input an integer and press ENTER");
+
+//限制输入为浮点数的输入框,可改变 对话框提示文字;返回输入的浮点数
+double EGEAPI getDouble(LPCSTR text = "Input a float and press ENTER");
+
+//限制输入内容长度的字符串输入框,可改变 对话框提示文字;输入的字符串存放在 buf 中,函数返回 buf地址
+LPSTR EGEAPI getString(LPSTR buf, int length, LPCSTR text = "Input a string and press ENTER");
+
+//限制输入为字符的输入框,可改变 对话框提示文字;返回输入的字符
+char getChar(LPCSTR text = "Input a character and press ENTER");
+
+//限制输入格式为点的坐标的输入框,可改变 对话框的标题
+//每个点的坐标有两个:x,y;可以称为一个坐标对
+//coords:   存储用户输入的坐标:coords[0]:x1, coords[1]:y1; coords[2]:x2, coords[3]:y2;......
+//pairs:    想要输入的坐标对的数量。该函数可以按照调用者制定的数量不断要求用户输入坐标对
+//title:    对话框的标题
+//返回值:指向coords[]数组的指针 
+int* getCoords(int* const coords, unsigned int pairs, LPCSTR title = "Input Coordinations");
+/* End of ege图形库的输入增强函数 */
+
 //键盘处理函数
 int     EGEAPI kbmsg();
 key_msg EGEAPI getkey();
diff --git a/src/ege_sbt_simple.h b/src/ege_sbt_simple.h
new file mode 100644
index 00000000..8faea6da
--- /dev/null
+++ b/src/ege_sbt_simple.h
@@ -0,0 +1,369 @@
+/* vim: set tabstop=4 shiftwidth=4: */
+#pragma once
+
+#define NULL_PTR 0
+
+namespace ege {
+
+typedef long sbt_int_t;
+
+template
+class SBT {
+protected:
+	struct SBT_Node {
+		SBT_Node*   l;
+		SBT_Node*   r;
+		sbt_int_t   size;
+		VAL         val;
+		SBT_Node(): l(NULL_PTR), r(NULL_PTR), size(1) {
+		}
+	};
+	typedef SBT_Node  NodeType;
+public:
+	typedef SBT_Node* TreeType;
+	SBT() : _root(NULL_PTR) {
+	}
+	SBT(const SBT& sbt) : _root(NULL_PTR) {
+		_copy(_root, sbt.root());
+	}
+	~SBT() {
+		_clear(root());
+	}
+
+	TreeType&
+	root() {
+		return _root;
+	}
+	const TreeType&
+	root() const {
+		return _root;
+	}
+	void
+	clear() {
+		_clear(root());
+	}
+	sbt_int_t
+	size() const {
+		return _size(root());
+	}
+	SBT&
+	operator = (const SBT& sbt) {
+		_copy(root(), sbt.root());
+	}
+
+protected:
+	void
+	_clear(TreeType& t) {
+		if (t == NULL_PTR)
+			return ;
+		_clear(t->l);
+		_clear(t->r);
+		delete t;
+		t = NULL_PTR;
+	}
+	void
+	_copy(TreeType &t1, const TreeType &t2) {
+		if (t1) {
+			_clear(t1);
+		}
+		if (t2) {
+			t1 = new NodeType;
+			t1->size = t2->size;
+			t1->val = t2->val;
+			_copy(t1->l, t2->l);
+			_copy(t1->r, t2->r);
+		}
+	}
+	sbt_int_t
+	_size(const TreeType& t) const {
+		if (t) return t->size;
+		return 0;
+	}
+	// face to: //
+	//    t     //
+	//   / \    //
+	//  a   k   //
+	//     / \  //
+	//    b   c //
+	// trans to //
+	//    k     //
+	//   / \    //
+	//  t   c   //
+	// / \      //
+	//a   b     //
+	inline void
+	_left_rotate(TreeType &t) {
+		TreeType k = t->r;
+		t->r = k->l;
+		k->l = t;
+		k->size = t->size;
+		t->size = _size(t->l)
+				+ _size(t->r)
+				+ 1;
+		t = k;
+	}
+	// face to: //
+	//    t     //
+	//   / \    //
+	//  k   c   //
+	// / \      //
+	//a   b     //
+	// trans to //
+	//    k     //
+	//   / \    //
+	//  a   t   //
+	//     / \  //
+	//    b   c //
+	inline void
+	_right_rotate(TreeType &t) {
+		TreeType k = t->l;
+		t->l = k->r;
+		k->r = t;
+		k->size = t->size;
+		t->size = _size(t->l)
+				+ _size(t->r)
+				+ 1;
+		t = k;
+	}
+	void
+	_maintain(TreeType& t, bool flag) {
+		if (t == NULL_PTR)
+			return;
+		if (!flag) {
+			if ( t->l && t->l->l
+					&&(!t->r || t->l->l->size > t->r->size) )
+				_right_rotate(t);
+			else if ( t->l && t->l->r
+					&&(!t->r || t->l->r->size > t->r->size) ) {
+				_left_rotate(t->l);
+				_right_rotate(t);
+			} else
+				return;
+		} else {
+			if ( t->r && t->r->r
+					&&(!t->l || t->r->r->size > t->l->size) ) {
+				_left_rotate(t);
+			} else if ( t->r && t->r->l
+					&&(!t->l || t->r->l->size > t->l->size) ) {
+				_right_rotate(t->r);
+				_left_rotate(t);
+			} else
+				return;
+		}
+		_maintain(t->l, false);
+		_maintain(t->r, true);
+		_maintain(t, false);
+		_maintain(t, true);
+	}
+	const TreeType
+	_search(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return NULL_PTR;
+		if (val == t->val)
+			return t;
+		if (val < t->val)
+			return _search(t->l, val);
+		else
+			return _search(t->r, val);
+	}
+	sbt_int_t
+	_lower_bound(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return 0;
+		// val <= t->val
+		if ( !( t->val < val) ) {
+			return _lower_bound(t->l, val);
+		} else {
+			sbt_int_t s = _lower_bound(t->r, val);
+			return s + (_size(t->l) + 1);
+		}
+	}
+	sbt_int_t
+	_upper_bound(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return 0;
+		// val < t->val
+		if ( val < t->val ) {
+			return _lower_bound(t->l, val);
+		} else {
+			sbt_int_t s = _lower_bound(t->r, val);
+			return s + (_size(t->l) + 1);
+		}
+	}
+	const TreeType
+	_pred(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return NULL_PTR;
+		// val <= t->val
+		if ( !(t->val < val) )
+			return _pred(t->l, val);
+		else {
+			const TreeType s = _pred(t->r, val);
+			return (s ? s : t);
+		}
+	}
+	const TreeType
+	_succ(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return NULL_PTR;
+		// val >= t->val
+		if ( !(val < t->val) )
+			return _succ(t->r, val);
+		else {
+			const TreeType s = _succ(t->l, val);
+			return (s ? s : t);
+		}
+	}
+	TreeType
+	_insert(TreeType& t, const VAL & val) {
+		if (t == NULL_PTR) {
+			t = new NodeType;
+			t->val = val;
+			t->size = 1;
+			return t;
+		} else {
+			TreeType ret;
+			if (val < t->val)
+				ret = _insert(t->l, val);
+			else
+				ret = _insert(t->r, val);
+			//if (ret)
+			{
+				t->size++;
+				_maintain(t, !(val < t->val));
+			}
+			return ret;
+		}
+	}
+	TreeType
+	_remove_select(TreeType& t, sbt_int_t rank) {
+		if (t == NULL_PTR || (t->size <= rank) )
+			return NULL_PTR;
+		sbt_int_t lsize = _size(t->l);
+		t->size -= 1;
+		if (lsize == rank) {
+			TreeType del = t;
+			if ( !t->l || !t->r ) {
+				t = ( t->l ? t->l : t->r );
+			} else {
+				del = _remove_select(t->l, lsize - 1);
+				t->val = del->val;
+			}
+			return del;
+		} else {
+			TreeType ret;
+			if ( lsize > rank ) {
+				ret = _remove_select(t->l, rank);
+			} else {
+				ret = _remove_select(t->r, rank - lsize - 1);
+			}
+			_maintain(t, false);
+			_maintain(t, true);
+			return ret;
+		}
+	}
+	TreeType
+	_remove(TreeType& t, const VAL & val) {
+		if (t == NULL_PTR)
+			return NULL_PTR;
+		t->size -= 1;
+		if (val == t->val) {
+			TreeType del = t;
+			if ( !t->l || !t->r ) {
+				t = ( t->l ? t->l : t->r );
+			} else {
+				del = _remove_select(t->l, t->l->size - 1);
+				t->val = del->val;
+			}
+			return del;
+		} else {
+			TreeType ret;
+			if (val < t->val) {
+				ret = _remove(t->l, val);
+			} else {
+				ret = _remove(t->r, val);
+			}
+			_maintain(t, false);
+			_maintain(t, true);
+			return ret;
+		}
+	}
+	const TreeType
+	_select(const TreeType t, sbt_int_t rank) const {
+		if (t == NULL_PTR || (t->size <= rank) )
+			return NULL_PTR;
+		sbt_int_t lsize = _size(t->l);
+		if (lsize == rank)
+			return t;
+		else if ( lsize > rank )
+			return _select(t->l, rank);
+		else
+			return _select(t->r, rank - lsize - 1);
+	}
+	sbt_int_t
+	_rank(const TreeType t, const VAL & val) const {
+		if (t == NULL_PTR)
+			return -1;
+		if (t->val == val)
+			return _size(t->l);
+		else if ( val < t->val )
+			return _rank(t->l, val);
+		else {
+			sbt_int_t r = _rank(t->r, val);
+			if (r >= 0)
+				return r + (_size(t->l) + 1);
+			return -1;
+		}
+	}
+public:
+	TreeType
+	search(const VAL & val) {
+		return _search(root(), val);
+	}
+	TreeType
+	pred(const VAL & val) {
+		return const_cast(_pred(root(), val));
+	}
+	TreeType
+	succ(const VAL & val) {
+		return const_cast(_succ(root(), val));
+	}
+	TreeType
+	insert(const VAL & val) {
+		return _insert(root(), val);
+	}
+	bool
+	remove_select(sbt_int_t rank) {
+		TreeType del = _remove_select(root(), rank);
+		if (del) {
+			delete del;
+			return true;
+		}
+		return false;
+	}
+	bool
+	remove(const VAL & val) {
+		TreeType del = _remove(root(), val);
+		if (val) {
+			delete del;
+			return true;
+		}
+		return false;
+	}
+	const TreeType
+	select(sbt_int_t rank) const {
+		return _select(root(), rank);
+	}
+	TreeType
+	select(sbt_int_t rank) {
+		return const_cast(_select(root(), rank));
+	}
+	sbt_int_t
+	rank(const VAL & val) const {
+		return _rank(root(), val);
+	}
+protected:
+	TreeType _root;
+};
+
+}
diff --git a/src/egegapi.cpp b/src/egegapi.cpp
index 89e1f09e..de24ef0e 100644
--- a/src/egegapi.cpp
+++ b/src/egegapi.cpp
@@ -13,6 +13,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include "lpng/zlib.h"
 #include "ege/sys_edit.h"
@@ -2407,6 +2409,181 @@ inputbox_getline(LPCWSTR title, LPCWSTR text, LPWSTR buf, int len) {
 	return ret;
 }
 
+/*
+** ege图形库的输入增强函数。 
+** 以下5个函数,是为了帮助C语言初学者解决数字字符输入解析的问题
+** Programmer: zsd@bupt (blacketzsd AT qq dot com) 2013/06/01
+** Modifier:   cyd@bupt (cyd AT bupt dot edu dot cn) 2015/02/07
+*/
+
+
+int 
+getInteger(LPCSTR text)
+{
+	int out;
+	setfont(20, 0, "黑体");
+	setfontbkcolor(getbkcolor());
+	setbkmode(OPAQUE);
+	char str[100];
+#ifdef DEBUG
+	char temp[100];
+#endif
+	for ( ; ; )
+	{
+		inputbox_getline("Input Integer",
+						text,
+						str,
+						sizeof(str) / sizeof(*str));		
+		out = atoi(str);
+
+
+		if (0 == out && (str[0] < 48 || str[0] > 57)) /*若首字符不为数字,且返回值为0,表示输入有误*/
+		{
+			outtextxy(0, 460, "Error! please retry!");
+			delay_ms(1000);
+			outtextxy(0, 460, "                                ");
+		}
+		else
+		{
+#ifdef DEBUG
+			 sprintf(temp, "Your input is: %d", out);
+			 outtextxy(0, 460, temp);
+			 delay_ms(1000);
+			 outtextxy(0, 460, "                              ");
+#endif
+			 break;
+		}
+	}
+	return out;
+}
+
+/* min positive value */
+#define FLT_MIN 1.175494351e-38F 
+/* max value */
+#define FLT_MAX 3.402823466e+38F 
+/* smallest such that 1.0+FLT_EPSILON != 1.0 */ 
+#define FLT_EPSILON 1.192092896e-07F
+	 
+double 
+getDouble(LPCSTR text)
+{
+	double out;
+	setfont(20, 0, "黑体");
+	setfontbkcolor(getbkcolor());
+	setbkmode(OPAQUE);
+	char str[100];
+#ifdef DEBUG
+	char temp[100];
+#endif
+	 for( ; ; )
+	{
+		inputbox_getline("Input Float",
+						text,
+						str,
+						sizeof(str) / sizeof(*str));		
+		out = atof(str);
+
+		if ((fabs(out-0.0) < FLT_EPSILON) && (str[0] < 48 || str[0] > 57)) /*若首字符不为数字,且返回值为0.0,表示输入有误*/
+		{
+			 outtextxy(0, 460, "Error! please retry!");
+			 delay_ms(1000);
+			 outtextxy(0, 460, "                              ");
+		}
+		else
+		{
+#ifdef DEBUG			 
+			 sprintf(temp, "Your input is: %f", out);
+			 outtextxy(0, 460, temp);
+			 delay_ms(1000);
+			 outtextxy(0, 460, "                              ");
+#endif			 
+			 break;
+		}
+	}
+	return out;
+}
+
+LPSTR 
+getString(LPSTR buf, int length, LPCSTR text)
+{	
+	setfont(20, 0, "黑体");
+	setfontbkcolor(getbkcolor());
+	setbkmode(OPAQUE);
+	inputbox_getline("Input String",
+				text,
+				buf,
+				length+1);
+	return buf;
+}
+
+char 
+getChar(LPCSTR text)
+{
+	char str[2];
+	inputbox_getline("Input Character",
+					text,
+					str,
+					2);
+	return str[0];
+}
+
+int* 
+getCoords(int* const coords, unsigned int pairs, LPCSTR title)
+{
+	setfont(20, 0, "黑体");
+	setfontbkcolor(getbkcolor());
+	setbkmode(OPAQUE);
+	char temp[100];
+	char description[100];
+	int count = pairs;
+	for (; pairs>0;)
+	{
+		sprintf(description, "Inputting...\n Input the %d coords pair (eg: 13,14).\n ENTER to input the next pair or finish\n", count - pairs + 1);
+		inputbox_getline(title,description,temp,sizeof(temp));
+		for (int k = 0, n = 0, m = 2 * (count - pairs); temp[k] != '\0'; k++)
+		{
+			if(temp[k] == ',')
+			{
+				coords[m] = n;
+				m++;
+				n = 0;	
+			}
+			else if (47<(int)temp[k] && (int)temp[k]<58)
+			{
+				n = 10*n + (int)temp[k] -48;
+			}
+			else
+			{
+				outtextxy(0,460,"Error! please retry!");
+				delay_ms(1000);
+				outtextxy(0,460,"                             ");
+				break;
+			}
+			if(temp[k+1] == '\0')
+			{
+				if(m%2 ==1)
+				{
+					coords[m] = n;
+					outtextxy(0,460,"Success!");
+					pairs--;
+					delay_ms(1000);
+					outtextxy(0,460,"                           ");
+				}
+				else
+				{
+					outtextxy(0,460,"Error! please retry!");
+					delay_ms(1000);
+					outtextxy(0,460,"                           ");
+					break;
+				}
+			}
+		}
+	}
+	return coords;
+}
+
+/* End of ege图形库的输入增强函数 */
+
 float
 _GetFPS(int add) {//获取帧数
 	static int      fps = 0;
diff --git a/src/graphicstest/graphicstest10.sln b/src/egetest/graphicstest10.sln
similarity index 100%
rename from src/graphicstest/graphicstest10.sln
rename to src/egetest/graphicstest10.sln
diff --git a/src/graphicstest/graphicstest10.vcxproj b/src/egetest/graphicstest10.vcxproj
similarity index 93%
rename from src/graphicstest/graphicstest10.vcxproj
rename to src/egetest/graphicstest10.vcxproj
index 8b43858b..1b4684bf 100644
--- a/src/graphicstest/graphicstest10.vcxproj
+++ b/src/egetest/graphicstest10.vcxproj
@@ -28,23 +28,31 @@
     Application
     true
     Unicode
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2010;$(LibraryPath)
   
   
     Application
     true
     Unicode
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2010;$(LibraryPath)
   
   
     Application
     false
     true
     Unicode
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2010;$(LibraryPath)
   
   
     Application
     false
     true
     Unicode
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2010;$(LibraryPath)
   
   
   
diff --git a/src/graphicstest/graphicstest12.sln b/src/egetest/graphicstest12.sln
similarity index 100%
rename from src/graphicstest/graphicstest12.sln
rename to src/egetest/graphicstest12.sln
diff --git a/src/graphicstest/graphicstest12.vcxproj b/src/egetest/graphicstest12.vcxproj
similarity index 91%
rename from src/graphicstest/graphicstest12.vcxproj
rename to src/egetest/graphicstest12.vcxproj
index 2b0d6d58..39dae3b3 100644
--- a/src/graphicstest/graphicstest12.vcxproj
+++ b/src/egetest/graphicstest12.vcxproj
@@ -1,5 +1,5 @@
 锘
-
+
   
     
       Debug
@@ -68,20 +68,26 @@
   
   
     true
-  
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2012;$(LibraryPath)
+   
   
     true
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2012\amd64;$(LibraryPath)
   
   
     false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2012\amd64;$(LibraryPath)
   
   
     false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2012\amd64;$(LibraryPath)
   
   
     
-      
-      
       Level3
       Disabled
       WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
diff --git a/src/egetest/graphicstest13.sln b/src/egetest/graphicstest13.sln
new file mode 100644
index 00000000..1d29ff96
--- /dev/null
+++ b/src/egetest/graphicstest13.sln
@@ -0,0 +1,31 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphicstest13", "graphicstest13.vcxproj", "{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		ReleaseD|Win32 = ReleaseD|Win32
+		ReleaseD|x64 = ReleaseD|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Debug|Win32.Build.0 = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Debug|x64.ActiveCfg = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|Win32.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|Win32.Build.0 = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|x64.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|Win32.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|Win32.Build.0 = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|x64.ActiveCfg = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/egetest/graphicstest13.vcxproj b/src/egetest/graphicstest13.vcxproj
new file mode 100644
index 00000000..26103b55
--- /dev/null
+++ b/src/egetest/graphicstest13.vcxproj
@@ -0,0 +1,157 @@
+锘
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    {2379FAF3-BDE3-438F-8934-7C6294A5EDAF}
+    Win32Proj
+    graphicstest13
+  
+  
+  
+    Application
+    true
+    Unicode
+    v120
+  
+  
+    Application
+    true
+    Unicode
+    v120
+    MultiByte
+  
+  
+    Application
+    false
+    Unicode
+    v120
+  
+  
+    Application
+    false
+    true
+    MultiByte
+    v120
+  
+  
+  
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+  
+    true
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2013;$(LibraryPath)
+  
+  
+    true
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2013\amd64;$(LibraryPath)
+  
+  
+    false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2013\;$(LibraryPath)
+  
+  
+    false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2013\amd64;$(LibraryPath)
+  
+  
+    
+      Level3
+      Disabled
+      WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+    
+    
+      Windows
+      true
+    
+  
+  
+    
+      
+      
+      Level3
+      Disabled
+      true
+      _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+    
+    
+      Windows
+      true
+    
+  
+  
+    
+      Level3
+      
+      
+      MaxSpeed
+      true
+      true
+      WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+    
+    
+      Windows
+      false
+      true
+      true
+    
+  
+  
+    
+      Level3
+      
+      
+      MaxSpeed
+      true
+      true
+      true
+      _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+    
+    
+      Windows
+      false
+      true
+      true
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/src/egetest/graphicstest15.sln b/src/egetest/graphicstest15.sln
new file mode 100644
index 00000000..d9938173
--- /dev/null
+++ b/src/egetest/graphicstest15.sln
@@ -0,0 +1,30 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphicstest15", "graphicstest15.vcxproj", "{2379FAF3-BDE3-438F-8934-7C6294A5ABCD}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		ReleaseD|Win32 = ReleaseD|Win32
+		ReleaseD|x64 = ReleaseD|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2379FAF3-BDE3-438F-8934-7C6294A5ABCD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5ABCD}.Debug|Win32.Build.0 = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5ABCD}.Debug|x64.ActiveCfg = Debug|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|Win32.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|Win32.Build.0 = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.Release|x64.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|Win32.ActiveCfg = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|Win32.Build.0 = Release|Win32
+		{2379FAF3-BDE3-438F-8934-7C6294A5EDAF}.ReleaseD|x64.ActiveCfg = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/egetest/graphicstest15.vcxproj b/src/egetest/graphicstest15.vcxproj
new file mode 100644
index 00000000..7912006c
--- /dev/null
+++ b/src/egetest/graphicstest15.vcxproj
@@ -0,0 +1,157 @@
+锘
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    {2379FAF3-BDE3-438F-8934-7C6294A5ABCD}
+    Win32Proj
+    graphicstest13
+  
+  
+  
+    Application
+    true
+    Unicode
+    v130
+  
+  
+    Application
+    true
+    Unicode
+    v130
+    MultiByte
+  
+  
+    Application
+    false
+    Unicode
+    v130
+  
+  
+    Application
+    false
+    true
+    MultiByte
+    v130
+  
+  
+  
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+  
+    true
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2015;$(LibraryPath)
+  
+  
+    true
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2015\amd64;$(LibraryPath)
+  
+  
+    false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2015\;$(LibraryPath)
+  
+  
+    false
+    ..\..\include;$(IncludePath)
+    ..\..\lib\vc2015\amd64;$(LibraryPath)
+  
+  
+    
+      Level3
+      Disabled
+      WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+    
+    
+      Windows
+      true
+    
+  
+  
+    
+      
+      
+      Level3
+      Disabled
+      true
+      _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+    
+    
+      Windows
+      true
+    
+  
+  
+    
+      Level3
+      
+      
+      MaxSpeed
+      true
+      true
+      WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+    
+    
+      Windows
+      false
+      true
+      true
+    
+  
+  
+    
+      Level3
+      
+      
+      MaxSpeed
+      true
+      true
+      true
+      _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+    
+    
+      Windows
+      false
+      true
+      true
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/src/graphicstest/maintest.cpp b/src/egetest/maintest.cpp
similarity index 99%
rename from src/graphicstest/maintest.cpp
rename to src/egetest/maintest.cpp
index ab8f0c83..3e0e2d39 100644
--- a/src/graphicstest/maintest.cpp
+++ b/src/egetest/maintest.cpp
@@ -1,6 +1,6 @@
 #if 0
 
-#include
+#include "graphics.h"
 #include
 #include
 int main()
@@ -21,9 +21,9 @@ int main()
 
 #else
 
-#include 
-#include 
-#include 
+#include "graphics.h"
+#include "ege/fps.h"
+#include "ege/sys_edit.h"
 #include 
 #include 
 #include 
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 812bc161..2d03e503 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -16,33 +16,12 @@
 本文件定义平台密切相关的操作及接口
 */
 
-//编译器版本,目前仅支持vc6/vc2008/vc2010/vc2012/mingw
-#ifdef _WIN64
-#define SYSBITS TEXT("x64")
-#else
-#define SYSBITS TEXT("x86")
-#endif
-
-#ifdef _MSC_VER
-	#if (_MSC_VER >= 1700)
-		#define COMPILER_VER TEXT("VC2012") SYSBITS
-	#elif (_MSC_VER >= 1600)
-		#define COMPILER_VER TEXT("VC2010") SYSBITS
-	#elif (_MSC_VER >= 1500)
-		#define COMPILER_VER TEXT("VC2008") SYSBITS
-	#elif (_MSC_VER > 1200)
-		#define COMPILER_VER TEXT("VC2005") SYSBITS
-	#else
-		#define COMPILER_VER TEXT("VC6") SYSBITS
-	#endif
-#else
-	#define TOSTRING_(x) #x
-	#define TOSTRING(x) TOSTRING_(x)
-	#define GCC_VER TEXT(TOSTRING(__GNUC__)) TEXT(".") TEXT(TOSTRING(__GNUC_MINOR__))
-	#define COMPILER_VER TEXT("GCC") GCC_VER SYSBITS
-#endif
-
-#define EGE_TITLE TEXT("EGE13.04 ") COMPILER_VER
+/*
+** Modified by cyd@20150329
+** Extract the codes related with compiler version to a seperate header
+** ==> version.h
+*/
+#include "version.h"
 
 #ifndef _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
 #define _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
diff --git a/src/graphics/graphics.dsp b/src/graphics/graphics.dsp
deleted file mode 100644
index ef9fa153..00000000
--- a/src/graphics/graphics.dsp
+++ /dev/null
@@ -1,336 +0,0 @@
-# Microsoft Developer Studio Project File - Name="graphics" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=graphics - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "graphics.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "graphics.mak" CFG="graphics - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "graphics - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "graphics - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "graphics - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\Include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x804 /d "NDEBUG"
-# ADD RSC /l 0x804 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=postbuild.bat
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "graphics - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x804 /d "_DEBUG"
-# ADD RSC /l 0x804 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"../../lib/vc6/graphics.lib"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "graphics - Win32 Release"
-# Name "graphics - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\lpng\adler32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\color.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\crc32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\deflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\egecontrolbase.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\egegapi.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\graphics.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\gzclose.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\gzlib.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\gzread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\gzwrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\image.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\infback.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inffast.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inftrees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\logo.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\math.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\music.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\png.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngget.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngmem.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngpread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngrio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngrtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngrutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngset.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngtrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngwio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngwrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngwtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngwutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\random.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\trees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\uncompr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\zutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\lpng\crc32.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\deflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\ege.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\ege_head.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\graphics.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\gzguts.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inffast.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inffixed.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\inftrees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\png.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngdebug.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pnginfo.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pnglibconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngpriv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\pngstruct.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\trees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\zlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\lpng\zutil.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/src/graphics/graphics.dsw b/src/graphics/graphics.dsw
deleted file mode 100644
index c9e20722..00000000
--- a/src/graphics/graphics.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "graphics"=.\graphics.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/graphics/postbuild.bat b/src/graphics/postbuild.bat
deleted file mode 100644
index c3fcb856..00000000
--- a/src/graphics/postbuild.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-call ../setenv
-"%VC6PATH%\Bin\LIB.EXE" /out:"..\..\lib\vc6\graphics.lib" "Release\graphics.lib" "..\Lib\GdiPlus.lib"
-echo link lib graphics.lib success
diff --git a/src/graphics08/graphics08.vcproj b/src/graphics08/graphics08.vcproj
deleted file mode 100644
index 127c2f63..00000000
--- a/src/graphics08/graphics08.vcproj
+++ /dev/null
@@ -1,700 +0,0 @@
-
-
-	
-		
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-		
-		
-		
-	
-	
-	
-
diff --git a/src/graphics10/graphics10.vcxproj.filters b/src/graphics10/graphics10.vcxproj.filters
deleted file mode 100644
index 578b008d..00000000
--- a/src/graphics10/graphics10.vcxproj.filters
+++ /dev/null
@@ -1,204 +0,0 @@
-锘
-
-  
-    
-      {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
-      cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-    
-    
-      {93995380-89BD-4b04-88EB-625FBE52EBFB}
-      h;hpp;hxx;hm;inl;inc;xsd
-    
-    
-      {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
-      rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav
-    
-  
-  
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-    
-      Source Files
-    
-  
-  
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-    
-      Header Files
-    
-  
-  
-    
-  
-
\ No newline at end of file
diff --git a/src/graphicstest/graphicstest06.dsp b/src/graphicstest/graphicstest06.dsp
deleted file mode 100644
index 5941e6ec..00000000
--- a/src/graphicstest/graphicstest06.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="graphicstest06" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=graphicstest06 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "graphicstest06.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "graphicstest06.mak" CFG="graphicstest06 - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "graphicstest06 - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "graphicstest06 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "graphicstest06 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x804 /d "NDEBUG"
-# ADD RSC /l 0x804 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "graphicstest06 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x804 /d "_DEBUG"
-# ADD RSC /l 0x804 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "graphicstest06 - Win32 Release"
-# Name "graphicstest06 - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\maintest.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/graphicstest/graphicstest06.dsw b/src/graphicstest/graphicstest06.dsw
deleted file mode 100644
index 21bceb18..00000000
--- a/src/graphicstest/graphicstest06.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# 警告: 不能编辑或删除该工作区文件!
-
-###############################################################################
-
-Project: "graphicstest06"=.\graphicstest06.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/graphicstest/graphicstest09.sln b/src/graphicstest/graphicstest09.sln
deleted file mode 100644
index 65b0ca0b..00000000
--- a/src/graphicstest/graphicstest09.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-锘
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphicstest09", "graphicstest09.vcproj", "{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Debug|Win32.Build.0 = Debug|Win32
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Debug|x64.ActiveCfg = Debug|x64
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Debug|x64.Build.0 = Debug|x64
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Release|Win32.ActiveCfg = Release|Win32
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Release|Win32.Build.0 = Release|Win32
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Release|x64.ActiveCfg = Release|x64
-		{2A7C80E7-F2E3-4B66-8AA7-D8258A808E67}.Release|x64.Build.0 = Release|x64
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/src/graphicstest/graphicstest09.vcproj b/src/graphicstest/graphicstest09.vcproj
deleted file mode 100644
index 8c15015c..00000000
--- a/src/graphicstest/graphicstest09.vcproj
+++ /dev/null
@@ -1,349 +0,0 @@
-
-
-	
-		
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-		
-		
-		
-		
-		
-	
-	
-	
-
diff --git a/src/graphicstest/graphicstest10.vcxproj.filters b/src/graphicstest/graphicstest10.vcxproj.filters
deleted file mode 100644
index aaf2aabc..00000000
--- a/src/graphicstest/graphicstest10.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-锘
-
-  
-    
-      {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
-      cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-    
-    
-      {93995380-89BD-4b04-88EB-625FBE52EBFB}
-      h;hpp;hxx;hm;inl;inc;xsd
-    
-    
-      {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
-      rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-    
-  
-  
-    
-      婧愭枃浠
-    
-  
-
\ No newline at end of file
diff --git a/src/clear.bat b/src/make-clean.bat
similarity index 100%
rename from src/clear.bat
rename to src/make-clean.bat
diff --git a/src/make-ege-mingw-all.bat b/src/make-ege-mingw-all.bat
new file mode 100644
index 00000000..aba64e32
--- /dev/null
+++ b/src/make-ege-mingw-all.bat
@@ -0,0 +1,10 @@
+echo yy | call make-ege-mingw32-4.7.2
+echo yy | call make-ege-mingw32-4.8.1
+echo yy | call make-ege-mingw64-4.9.2
+echo yy | call setup
+@del /Q *~
+@del /Q *.o
+@del /Q lpng\*.o
+@del /Q *.swp
+
+pause
\ No newline at end of file
diff --git a/src/make-ege-mingw32-4.7.2.bat b/src/make-ege-mingw32-4.7.2.bat
new file mode 100644
index 00000000..f16aa617
--- /dev/null
+++ b/src/make-ege-mingw32-4.7.2.bat
@@ -0,0 +1,26 @@
+call setenv
+
+set MINGWPATH=%MINGW32_472PATH%
+set MINGWDIR=%MINGW32_472DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
+
+mingw32-make.exe -f MakefileWin clean
+mingw32-make.exe -f MakefileWin all
+
+echo.
+echo.
+
+if not %ErrorLevel% == 0 (
+    echo "编译失败"
+) else (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics.a ..\lib\%MINGWDIR%\
+	echo.
+	echo "请到..\lib\%MINGWDIR%目录下找库文件libgraphics.a"	
+)
+
+echo.
+echo.
+pause
+
diff --git a/src/make-ege-mingw32-4.8.1.bat b/src/make-ege-mingw32-4.8.1.bat
new file mode 100644
index 00000000..ff9f7aef
--- /dev/null
+++ b/src/make-ege-mingw32-4.8.1.bat
@@ -0,0 +1,26 @@
+@echo off
+call setenv
+set MINGWPATH=%MINGW32_481PATH%
+set MINGWDIR=%MINGW32_481DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
+
+mingw32-make.exe -f MakefileWin clean
+mingw32-make.exe -f MakefileWin all
+
+echo.
+echo.
+
+if not %ErrorLevel% == 0 (
+    echo "编译失败"
+) else (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics.a ..\lib\%MINGWDIR%\
+	echo .
+	echo "请到..\lib\%MINGWDIR%目录下找库文件libgraphics.a。"	
+)
+
+echo.
+echo.
+pause
+
diff --git a/src/make-ege-mingw32.bat b/src/make-ege-mingw32.bat
new file mode 100644
index 00000000..2258b788
--- /dev/null
+++ b/src/make-ege-mingw32.bat
@@ -0,0 +1,24 @@
+@echo off
+rem 在setenv.bat中设置你的mingw路径,建议使用Dev-C++自带的mingw版本来编译,路径可以带空格或者中文,需要使用gbk编码
+rem set MINGW32PATH=D:\mingw\mingw4.7.1
+rem set MINGW32PATH=C:\Program Files (x86)\Dev-Cpp\MinGW32
+
+
+set MINGWPATH=%MINGW32_PATH%
+set MINGWDIR=%MINGW32_DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
+
+mingw32-make.exe -f MakefileWin clean
+mingw32-make.exe -f MakefileWin all
+if not %ErrorLevel% == 0 (
+    echo "编译失败"
+    pause
+) else (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics.a ..\lib\%MINGWDIR%\
+echo "请到..\lib\%MINGWDIR%目录下找库文件libgraphics.a。"	
+)
+
+pause
+
diff --git a/src/make-ege-mingw64-4.9.2.bat b/src/make-ege-mingw64-4.9.2.bat
new file mode 100644
index 00000000..6dc0f7c4
--- /dev/null
+++ b/src/make-ege-mingw64-4.9.2.bat
@@ -0,0 +1,41 @@
+@echo off
+call setenv
+
+set MINGWPATH=%MINGW64_492PATH%
+set MINGWDIR=%MINGW64_492DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\x86_64-w64-mingw32\bin
+
+set CCMODE64=0
+set CCMODE32=0
+
+REM 用64位模式编译。在makefile中使用编译参数 -m64 (如果不指定,则默认为 -m64)
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin64 clean
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin64 all
+if %ErrorLevel% == 0 (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics64.a ..\lib\%MINGWDIR%\
+	set CCMODE64=成功
+) else (
+    set CCMODE64=失败 
+)
+
+REM 用32位模式编译。在makefile中使用编译参数 -m32
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin clean
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin all
+if %ErrorLevel% == 0 (
+    mkdir ..\lib\%MINGWDIR%
+	echo.
+    move /y libgraphics.a ..\lib\%MINGWDIR%\
+    set CCMODE32=成功
+) else (
+    set CCMODE32=失败 
+)
+echo.
+echo.
+echo 64位库编译%CCMODE64%
+echo 32位库编译%CCMODE32%
+echo 32位和64位库文件请到..\lib\%MINGWDIR%中查看
+echo.
+echo.
+pause
diff --git a/src/make-ege-mingw64.bat b/src/make-ege-mingw64.bat
new file mode 100644
index 00000000..6801570e
--- /dev/null
+++ b/src/make-ege-mingw64.bat
@@ -0,0 +1,44 @@
+@echo off
+rem 在setenv.bat中设置你的mingw路径,建议使用Dev-C++自带的mingw版本来编译,路径可以带空格或者中文,需要使用gbk编码
+rem set MINGW64PATH=C:\Program Files (x86)\Dev-Cpp\MinGW64
+
+set MINGWPATH=%MINGW64_PATH%
+set MINGWDIR=%MINGW64_DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\x86_64-w64-mingw32\bin
+
+set CCMODE64=0
+set CCMODE32=0
+
+REM 用64位模式编译。在makefile中使用编译参数 -m64 (如果不指定,则默认为 -m64)
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin64 clean
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin64 all
+if %ErrorLevel% == 0 (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics64.a ..\lib\%MINGWDIR%\
+	set CCMODE64=成功
+) else (
+    set CCMODE64=失败 
+	echo "64位库文件编译失败"
+	pause
+)
+
+REM 用32位模式编译。在makefile中使用编译参数 -m32
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin clean
+mingw32-make.exe -f %MINGWMAKEFILE%MakefileWin all
+if %ErrorLevel% == 0 (
+    mkdir ..\lib\%MINGWDIR%
+    move /y libgraphics.a ..\lib\%MINGWDIR%\
+    set CCMODE32=成功
+) else (
+    set CCMODE32=失败 
+	echo "32位库文件编译失败"
+    pause
+)
+
+echo "64位库编译%CCMODE64%。"
+echo "32位库编译%CCMODE32%。"
+echo "32位和64位库文件请到..\lib\%MINGWDIR%中查看"
+
+pause
+
diff --git a/src/make-ege-vc-all.bat b/src/make-ege-vc-all.bat
new file mode 100644
index 00000000..ed52f513
--- /dev/null
+++ b/src/make-ege-vc-all.bat
@@ -0,0 +1,11 @@
+call make-ege-vc10
+call make-ege-vc12
+call make-ege-vc13
+call make-ege-vc15
+
+call setup
+@del /Q *~
+@del /Q *.o
+@del /Q *.swp
+
+pause
\ No newline at end of file
diff --git a/src/make-ege-vc10.bat b/src/make-ege-vc10.bat
new file mode 100644
index 00000000..a1ccfcd1
--- /dev/null
+++ b/src/make-ege-vc10.bat
@@ -0,0 +1,45 @@
+@echo off
+call setenv
+
+REM 注意,不能使用 /Rebuild,而应该使用/Build。如果使用前者,则Win32的库会被VC自动删掉
+
+REM 以下三个变量用于确定编译环境
+REM VC的安装路径
+set VCPATH=%VC10PATH%
+REM ege的vc项目的目录
+set PROJECT_DIR=vc2010
+REM ege的vc项目的名称
+set PROJECT_NAME=graphics10.sln
+
+REM 一下三个变量用于记录编译时的状态
+set CCMODE=
+set FAILOR=
+set SUCCESSOR=
+
+REM 开始编译
+set CCMODE=Release-Win32
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|Win32"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+set CCMODE=Release-x64
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|x64"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+
+
+echo.
+echo ----------------------------------------------
+echo 编译%PROJECT_NAME%
+echo 编译成功的项目有: %SUCCESSOR%
+echo 编译失败的项目有: %FAILOR%
+echo.
+echo ----------------------------------------------
+pause
\ No newline at end of file
diff --git a/src/make-ege-vc12.bat b/src/make-ege-vc12.bat
new file mode 100644
index 00000000..2d2ff619
--- /dev/null
+++ b/src/make-ege-vc12.bat
@@ -0,0 +1,45 @@
+@echo off
+call setenv
+
+REM 注意,不能使用 /Rebuild,而应该使用/Build。如果使用前者,则Win32的库会被VC自动删掉
+
+REM 以下三个变量用于确定编译环境
+REM VC的安装路径
+set VCPATH=%VC12PATH%
+REM ege的vc项目的目录
+set PROJECT_DIR=vc2012
+REM ege的vc项目的名称
+set PROJECT_NAME=graphics12.sln
+
+REM 一下三个变量用于记录编译时的状态
+set CCMODE=
+set FAILOR=
+set SUCCESSOR=
+
+REM 开始编译
+set CCMODE=Release-Win32
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|Win32"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+set CCMODE=Release-x64
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|x64"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+
+
+echo.
+echo ----------------------------------------------
+echo 编译%PROJECT_NAME%
+echo 编译成功的项目有: %SUCCESSOR%
+echo 编译失败的项目有: %FAILOR%
+echo.
+echo ----------------------------------------------
+pause
\ No newline at end of file
diff --git a/src/make-ege-vc13.bat b/src/make-ege-vc13.bat
new file mode 100644
index 00000000..76f7a345
--- /dev/null
+++ b/src/make-ege-vc13.bat
@@ -0,0 +1,45 @@
+@echo off
+call setenv
+
+REM 注意,不能使用 /Rebuild,而应该使用/Build。如果使用前者,则Win32的库会被VC自动删掉
+
+REM 以下三个变量用于确定编译环境
+REM VC的安装路径
+set VCPATH=%VC13PATH%
+REM ege的vc项目的目录
+set PROJECT_DIR=vc2013
+REM ege的vc项目的名称
+set PROJECT_NAME=graphics13.sln
+
+REM 一下三个变量用于记录编译时的状态
+set CCMODE=
+set FAILOR=
+set SUCCESSOR=
+
+REM 开始编译
+set CCMODE=Release-Win32
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|Win32"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+set CCMODE=Release-x64
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|x64"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+
+
+echo.
+echo ----------------------------------------------
+echo 编译%PROJECT_NAME%
+echo 编译成功的项目有: %SUCCESSOR%
+echo 编译失败的项目有: %FAILOR%
+echo.
+echo ----------------------------------------------
+pause
\ No newline at end of file
diff --git a/src/make-ege-vc13express.bat b/src/make-ege-vc13express.bat
new file mode 100644
index 00000000..766fbf27
--- /dev/null
+++ b/src/make-ege-vc13express.bat
@@ -0,0 +1,43 @@
+@echo off
+call setenv
+set COMPILER=MS Build 2013 (replace "VC2013 Express for Desktop")
+set CCMODE=0
+
+rem vs 2013 for desktop 不支持命令行编译,因此只能改用msbuild
+rem "%VC13PATH%\..\Common7\IDE\devenv.com" "vc2013/graphics13.sln" /Rebuild "Release|x64"
+rem "%VC13PATH%\..\Common7\IDE\devenv.com" "vc2013/graphics13.sln" /Build "Release|Win32"
+rem if not %ErrorLevel% == 0 (
+rem        pause
+rem        goto end
+rem )
+
+"%MSBUILD13PATH%\bin\msbuild.exe" "vc2013/graphics13.sln" /t:Build  /p:Configuration=Release /p:Platform=Win32 /p:VisualStudioVersion=12.0
+if %ErrorLevel% == 0 (
+	rem Success, Continue
+) else (
+	set CCMODE=Win32 Release
+	goto endfail
+)
+
+"%MSBUILD13PATH%\bin\msbuild.exe" "vc2013/graphics13.sln" /t:Build  /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=12.0
+if %ErrorLevel% == 0 (
+	rem Success, Continue
+) else (
+	set CCMODE=x64 Release
+	goto endfail
+)
+
+
+goto end
+
+
+:endfail
+echo "%COMPILER% 编译失败"
+echo "失败版本:%CCMODE%"
+echo 要正确执行本编译,需要微软 MSBuild 2013 工具的支持
+echo You need to download MSBuild tools from microsoft.
+echo 你需要去微软官网下载并安装 MSBuild 工具
+echo http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_3
+:end
+
+pause
diff --git a/src/make-ege-vc15.bat b/src/make-ege-vc15.bat
new file mode 100644
index 00000000..b5d158ec
--- /dev/null
+++ b/src/make-ege-vc15.bat
@@ -0,0 +1,46 @@
+@echo off
+call setenv
+
+REM 注意,不能使用 /Rebuild,而应该使用/Build。如果使用前者,则Win32的库会被VC自动删掉
+
+REM 以下三个变量用于确定编译环境
+REM VC的安装路径
+set VCPATH=%VC15PATH%
+REM ege的vc项目的目录
+set PROJECT_DIR=vc2015
+REM ege的vc项目的名称
+set PROJECT_NAME=graphics15.sln
+
+REM 一下三个变量用于记录编译时的状态
+set CCMODE=
+set FAILOR=
+set SUCCESSOR=
+
+REM 开始编译
+set CCMODE=Release-Win32
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|Win32"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+
+set CCMODE=Release-x64
+"%VCPATH%\..\Common7\IDE\devenv.com" "%PROJECT_DIR%/%PROJECT_NAME%" /Build "Release|x64"
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+
+
+echo.
+echo ----------------------------------------------
+echo 编译%PROJECT_NAME%
+echo 编译成功的项目有: %SUCCESSOR%
+echo 编译失败的项目有: %FAILOR%
+echo.
+echo ----------------------------------------------
+pause
\ No newline at end of file
diff --git a/src/make-egetest-mingw32-4.7.2.bat b/src/make-egetest-mingw32-4.7.2.bat
new file mode 100644
index 00000000..ef1c639e
--- /dev/null
+++ b/src/make-egetest-mingw32-4.7.2.bat
@@ -0,0 +1,25 @@
+@echo off
+call setenv
+
+set MINGWPATH=%MINGW32_472PATH%
+set MINGWDIR=%MINGW32_472DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
+
+set COMPILER=0
+
+
+g++ -O3 "egetest/maintest.cpp" -L../lib/%MINGWDIR% -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows -m32 --static -oz.exe
+if %ErrorLevel% == 0 (
+	echo %MINGWDIR% compile SUCCESS
+) else (
+	set COMPILER=%MINGWDIR%
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+echo 现在可以运行z.exe
+pause
diff --git a/src/make-egetest-mingw32-4.8.1.bat b/src/make-egetest-mingw32-4.8.1.bat
new file mode 100644
index 00000000..37b5d801
--- /dev/null
+++ b/src/make-egetest-mingw32-4.8.1.bat
@@ -0,0 +1,25 @@
+@echo off
+call setenv
+
+set MINGWPATH=%MINGW32_481PATH%
+set MINGWDIR=%MINGW32_481DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\mingw32\bin
+
+set COMPILER=0
+
+
+g++ -O3 "egetest/maintest.cpp" -L../lib/%MINGWDIR% -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows -m32 --static -oz.exe
+if %ErrorLevel% == 0 (
+	echo %MINGWDIR% compile SUCCESS
+) else (
+	set COMPILER=%MINGWDIR%
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+echo 现在可以运行z.exe
+pause
diff --git a/src/make-egetest-mingw64-4.9.2.bat b/src/make-egetest-mingw64-4.9.2.bat
new file mode 100644
index 00000000..40faebce
--- /dev/null
+++ b/src/make-egetest-mingw64-4.9.2.bat
@@ -0,0 +1,23 @@
+@echo off
+call setenv
+
+set MINGWPATH=%MINGW64_492PATH%
+set MINGWDIR=%MINGW64_492DIR%
+
+set path=%MINGWPATH%\bin;%MINGWPATH%\x86_64-w64-mingw32\bin
+
+set COMPILER=
+
+g++ -O3 "egetest/maintest.cpp" -I../include -L./ -L../lib/%MINGWDIR% -s -lgraphics64 -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows -m64 --static -oz64.exe
+if %ErrorLevel% == 0 (
+	echo %MINGWDIR% compile SUCCESS
+) else (
+	set COMPILER=%MINGWDIR%
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+pause
diff --git a/src/make-egetest-vc-all.bat b/src/make-egetest-vc-all.bat
new file mode 100644
index 00000000..62361ace
--- /dev/null
+++ b/src/make-egetest-vc-all.bat
@@ -0,0 +1,67 @@
+@echo off
+call setenv
+
+set COMPILER=
+set FAILOR=
+set SUCCESSOR=
+
+set COMPILER=vc15
+call make-egetest-vc15
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+set COMPILER=vc13
+call make-egetest-vc13
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+set COMPILER=vc12
+call make-egetest-vc12
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+set COMPILER=vc10
+call make-egetest-vc10
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+set COMPILER=mingw32-4.7.2
+call make-egetest-mingw32-4.7.2
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+set COMPILER=mingw32-4.8.1
+call make-egetest-mingw32-4.8.1
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+call make-egetest-mingw64-4.9.2
+set COMPILER=mingw32-4.9.2
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %COMPILER%
+) else (
+    set FAILOR=%FAILOR%  %COMPILER%
+)
+
+echo 编译成功: %SUCCESSOR%
+echo 编译失败: %FAILOR%
+
+pause
diff --git a/src/make-egetest-vc10.bat b/src/make-egetest-vc10.bat
new file mode 100644
index 00000000..b5907d10
--- /dev/null
+++ b/src/make-egetest-vc10.bat
@@ -0,0 +1,27 @@
+@echo off
+call setenv
+
+set COMPILER=
+
+
+"%VC10PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest10.vcxproj" /Rebuild "Release|Win32"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2010 release
+	goto end1
+)
+
+"%VC10PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest10.vcxproj" /Rebuild "Release|x64"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2010 release x64
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+pause
diff --git a/src/make-egetest-vc12.bat b/src/make-egetest-vc12.bat
new file mode 100644
index 00000000..7810310f
--- /dev/null
+++ b/src/make-egetest-vc12.bat
@@ -0,0 +1,28 @@
+@echo off
+call setenv
+
+set COMPILER=
+
+
+"%VC12PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest12.vcxproj" /Rebuild "Release|Win32"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2012 release
+	goto end1
+)
+
+"%VC12PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest12.vcxproj" /Rebuild "Release|x64"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2012 release x64
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+pause
+
diff --git a/src/make-egetest-vc13.bat b/src/make-egetest-vc13.bat
new file mode 100644
index 00000000..26db8b08
--- /dev/null
+++ b/src/make-egetest-vc13.bat
@@ -0,0 +1,27 @@
+@echo off
+call setenv
+
+set COMPILER=
+
+
+"%VC13PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest13.vcxproj" /Rebuild "Release|Win32"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2013 release
+	goto end1
+)
+
+"%VC13PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest13.vcxproj" /Rebuild "Release|x64"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2013 release x64
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+pause
diff --git a/src/make-egetest-vc13express.bat b/src/make-egetest-vc13express.bat
new file mode 100644
index 00000000..93f1f4f2
--- /dev/null
+++ b/src/make-egetest-vc13express.bat
@@ -0,0 +1,40 @@
+@echo off
+
+call setenv
+
+set COMPILER=MS Build 2013 (replace "VC2013 Express for Desktop")
+
+
+"%MSBUILD13PATH%\bin\msbuild.exe" "egetest/graphicstest13.sln" /t:Clean
+
+set CCMODE=
+set FAILOR=
+set SUCCESSOR=
+
+set CCMODE=Release-Win32
+"%MSBUILD13PATH%\bin\msbuild.exe" "egetest/graphicstest13.sln"  /t:Rebuild  /p:Configuration=Release /p:Platform=Win32 /p:VisualStudioVersion=12.0
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+
+set CCMODE=Release-x64
+"%MSBUILD13PATH%\bin\msbuild.exe" "egetest/graphicstest13.sln" /t:Rebuild  /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=12.0
+if %ErrorLevel% == 0 (
+	set SUCCESSOR=%SUCCESSOR%  %CCMODE%
+) else (
+    set FAILOR=%FAILOR%  %CCMODE%
+)
+echo.
+echo ----------------------------------------------
+echo 要正确执行本编译,需要微软 MSBuild 2013 工具的支持
+echo You need to download MSBuild tools from microsoft.
+echo 你需要去微软官网下载并安装 MSBuild 工具
+echo http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_3
+echo.
+echo 编译成功的项目有: %SUCCESSOR%
+echo 编译失败的项目有: %FAILOR%
+echo.
+echo ----------------------------------------------
+pause
diff --git a/src/make-egetest-vc15.bat b/src/make-egetest-vc15.bat
new file mode 100644
index 00000000..8a0f6feb
--- /dev/null
+++ b/src/make-egetest-vc15.bat
@@ -0,0 +1,27 @@
+@echo off
+call setenv
+
+set COMPILER=
+
+
+"%VC15PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest15.vcxproj" /Rebuild "Release|Win32"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2015 release
+	goto end1
+)
+
+"%VC15PATH%\..\Common7\IDE\devenv.com" "egetest/graphicstest15.vcxproj" /Rebuild "Release|x64"
+if %ErrorLevel% == 0 (
+	rem SUCCESS
+) else (
+	set COMPILER=VC2015 release x64
+	goto end1
+)
+
+goto end2
+:end1
+echo "%COMPILER% 编译失败"
+:end2
+pause
diff --git a/src/makeall.bat b/src/makeall.bat
deleted file mode 100644
index 34914398..00000000
--- a/src/makeall.bat
+++ /dev/null
@@ -1,16 +0,0 @@
-@echo off
-call vc6make
-call vc9make
-call vc10make
-call vc12make
-call mingw3.4make
-call mingw4.7make
-call mingw64make
-call setup
-@del /Q *~
-@del /Q *.o
-@del /Q *.swp
-if not "%EGE_NOPAUSE%" == "1" (
-        pause
-)
-
diff --git a/src/mingw3.4make.bat b/src/mingw3.4make.bat
deleted file mode 100644
index 071b582d..00000000
--- a/src/mingw3.4make.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-call setenv
-set path=%MINGW35PATH%\bin;%MINGW35PATH%\mingw32\bin
-
-mingw32-make.exe -f MakefileWin clean
-mingw32-make.exe -f MakefileWin all
-if not %ErrorLevel% == 0 (
-    pause
-) else (
-    mkdir ..\lib\mingw3.4
-    move /y libgraphics.a ..\lib\mingw3.4\
-)
-
diff --git a/src/mingw4.5make.bat b/src/mingw4.5make.bat
deleted file mode 100644
index 02c01b94..00000000
--- a/src/mingw4.5make.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-call setenv
-set path=%MINGW45PATH%\bin;%MINGW45PATH%\mingw32\bin
-
-mingw32-make.exe -f MakefileWin clean
-mingw32-make.exe -f MakefileWin all
-if not %ErrorLevel% == 0 (
-    pause
-) else (
-    mkdir ..\lib\mingw4.5
-    move /y libgraphics.a ..\lib\mingw4.5\
-)
-
diff --git a/src/mingw4.6make.bat b/src/mingw4.6make.bat
deleted file mode 100644
index e095e9e7..00000000
--- a/src/mingw4.6make.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-call setenv
-set path=%MINGW46PATH%\bin;%MINGW46PATH%\mingw32\bin
-
-mingw32-make.exe -f MakefileWin clean
-mingw32-make.exe -f MakefileWin all
-if not %ErrorLevel% == 0 (
-    pause
-) else (
-    mkdir ..\lib\mingw4.6
-    move /y libgraphics.a ..\lib\mingw4.6\
-)
-
diff --git a/src/mingw4.7make.bat b/src/mingw4.7make.bat
deleted file mode 100644
index c4cda2e6..00000000
--- a/src/mingw4.7make.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-call setenv
-set path=%MINGW47PATH%\bin;%MINGW47PATH%\mingw32\bin
-
-mingw32-make.exe -f MakefileWin clean
-mingw32-make.exe -f MakefileWin all
-if not %ErrorLevel% == 0 (
-    pause
-) else (
-    mkdir ..\lib\mingw4.7
-    move /y libgraphics.a ..\lib\mingw4.7\
-)
-
diff --git a/src/mingw64make.bat b/src/mingw64make.bat
deleted file mode 100644
index 05d0af0e..00000000
--- a/src/mingw64make.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-call setenv
-set path=%MINGW64PATH%\bin;
-
-mingw32-make.exe -f MakefileWin64 clean
-mingw32-make.exe -f MakefileWin64 all
-if not %ErrorLevel% == 0 (
-        pause
-) else (
-    mkdir ..\lib\mingw64
-    move /y libgraphics64.a ..\lib\mingw64\
-)
-
-
diff --git a/src/setenv.bat b/src/setenv.bat
index 908f40fd..8e3a274e 100644
--- a/src/setenv.bat
+++ b/src/setenv.bat
@@ -1,11 +1,63 @@
-set VC6PATH=D:\VC6\VC98
-set VC9PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
+@echo off
+REM 微软自2005年之后用年份作为VS的发行代号,与其内部版本号不一致
+
+REM  内部版本号     宏版本号         发行版本号
+REM MS VC++ 12.0 _MSC_VER = 1800 (Visual C++ 2013)
+REM MS VC++ 11.0 _MSC_VER = 1700 (Visual C++ 2012)
+REM MS VC++ 10.0 _MSC_VER = 1600 (Visual C++ 2010)
+REM MS VC++ 9.0  _MSC_VER = 1500 (Visual C++ 2008)
+REM MS VC++ 8.0  _MSC_VER = 1400 (Visual C++ 2005)
+REM MS VC++ 7.1  _MSC_VER = 1310 (Visual C++ 7.1)
+REM MS VC++ 7.0  _MSC_VER = 1300 (Visual C++ 7.0)
+REM MS VC++ 6.0  _MSC_VER = 1200 (Visual C++ 6.0)
+REM MS VC++ 5.0  _MSC_VER = 1100 (Visual C++ 5.0)
+echo.
+echo.
+echo ==========注意:如果你的Visual C++不是安装在C:\Program Files (x86)目录==========
+echo ==========   ,请你先按Ctrl-C,然后用文本编辑器修改 setenv.bat 的内容  ==========
+echo.
+echo.
+
 set VC10PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
 set VC12PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
+set VC13PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
+set VC15PATH=C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC
+
+rem MSBuild 不依赖于VC++的安装(不装VC++也能用MSBuild编译)
+rem 对于VS2013 Express,只能使用MSBuild 2013执行命令行编译
+rem 下载地址:http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_3
+set MSBUILD13PATH=C:\Program Files (x86)\MSBuild\12.0
+rem 其它版本的MSBuild(假如有的话)
+set MSBUILD10PATH=C:\Program Files (x86)\MSBuild\10.0
+set MSBUILD12PATH=C:\Program Files (x86)\MSBuild\11.0
+set MSBUILD15PATH=C:\Program Files (x86)\MSBuild\13.0
+
+echo.
+echo.
+echo ==========注意:如果你使用mingw(gcc/g++)编译,请你先按Ctrl-C退出批处理==========
+echo ==========      然后用文本编辑器修改 setenv.bat 中关于mingw的内容      ==========
+echo.
+echo.
+pause
+
+rem set MINGWMAKEFILE=mingw
 rem set MINGWPATH=C:\Dev-Cpp
-set MINGW35PATH=D:\mingw3.4.5
-set MINGW45PATH=D:\mingw4.5.2
-set MINGW46PATH=D:\mingw4.6
-set MINGW47PATH=D:\MinGW-4.7.1
-set MINGW472PATH=D:\MinGW-4.7.2
-set MINGW64PATH=D:\mingw64
+set MINGW_BASE_PATH=D:\mingw
+set MINGW32_472DIR=mingw-4.7.2
+set MINGW32_472PATH=%MINGW_BASE_PATH%\%MINGW32_472DIR%
+set MINGW32_481DIR=mingw-4.8.1
+set MINGW32_481PATH=%MINGW_BASE_PATH%\%MINGW32_481DIR%
+rem set MINGW64_492DIR=mingw64-4.9.2
+rem set MINGW64_492PATH=%MINGW_BASE_PATH%\%MINGW64_492DIR%
+
+REM 由于来自http://www.drangon.org/mingw/的mingw64-4.9.2无法编译32位库,故此放弃
+REM 改为使用TDM发行的MinGW64
+set MINGW64_492DIR=TDM-GCC-64
+set MINGW64_492PATH=%MINGW_BASE_PATH%\%MINGW64_492DIR%
+
+rem 我们使用Dev-C++中自带的MinGW。
+rem 注意:你需要去看清楚Dev-Cpp安装的是哪个版本的MinGW!
+set MINGW32_DIR=mingw32
+set MINGW32PATH=C:\Program Files (x86)\Dev-Cpp\MinGW32
+set MINGW64_DIR=mingw64
+set MINGW64PATH=C:\Program Files (x86)\Dev-Cpp\MinGW64
\ No newline at end of file
diff --git a/src/setup.bat b/src/setup.bat
index 29c3b855..307cca5d 100644
--- a/src/setup.bat
+++ b/src/setup.bat
@@ -1,49 +1,67 @@
+@echo off
 call setenv
 
 mkdir "..\include\ege"
 copy graphics.h "..\include\"
 copy ege.h "..\include\"
 copy /y "ege" "..\include\ege"
-
-mkdir "%VC6PATH%\include\ege"
-copy ..\include\*.h "%VC6PATH%\include\"
-copy ..\include\ege\*.h "%VC6PATH%\include\ege"
-copy /Y ..\lib\vc6\* "%VC6PATH%\lib\"
-
-mkdir "%VC9PATH%\include\ege"
-copy ..\include\*.h "%VC9PATH%\include\"
-copy ..\include\ege\*.h "%VC9PATH%\include\ege"
-copy /Y ..\lib\vc2008\* "%VC9PATH%\lib\"
-copy /Y ..\lib\vc2008\amd64\* "%VC9PATH%\lib\amd64\"
-
-mkdir "%VC10PATH%\include\ege"
-copy ..\include\*.h "%VC10PATH%\include\"
-copy ..\include\ege\*.h "%VC10PATH%\include\ege"
-copy /Y ..\lib\vc2010\* "%VC10PATH%\lib\"
-copy /Y ..\lib\vc2010\amd64\* "%VC10PATH%\lib\amd64\"
-
-mkdir "%VC12PATH%\include\ege"
-copy ..\include\*.h "%VC12PATH%\include\"
-copy ..\include\ege\*.h "%VC12PATH%\include\ege"
-copy /Y ..\lib\vc2012\* "%VC12PATH%\lib\"
-copy /Y ..\lib\vc2012\amd64\* "%VC12PATH%\lib\amd64\"
-
-mkdir "%MINGW35PATH%\include\ege"
-copy ..\include\*.h "%MINGW35PATH%\include\"
-copy ..\include\ege\*.h "%MINGW35PATH%\include\ege\"
-copy /y ..\lib\mingw3.4\* "%MINGW35PATH%\lib\"
-
-mkdir "%MINGW47PATH%\include\ege"
-copy ..\include\*.h "%MINGW47PATH%\include\"
-copy ..\include\ege\*.h "%MINGW47PATH%\include\ege\"
-copy /y ..\lib\mingw4.7\* "%MINGW47PATH%\lib\"
-
-mkdir "%MINGW472PATH%\include\ege"
-copy ..\include\*.h "%MINGW472PATH%\include\"
-copy ..\include\ege\*.h "%MINGW472PATH%\include\ege\"
-copy /y ..\lib\mingw4.7.2\* "%MINGW472PATH%\lib\"
-
-mkdir "%MINGW64PATH%\x86_64-w64-mingw32\include\ege"
-copy ..\include\*.h "%MINGW64PATH%\x86_64-w64-mingw32\include\"
-copy ..\include\ege\*.h "%MINGW64PATH%\x86_64-w64-mingw32\include\ege\"
-copy /y ..\lib\mingw64\* "%MINGW64PATH%\x86_64-w64-mingw32\lib\"
+echo.
+echo.
+echo.
+echo 请手动将ege的包含文件以及库文件拷贝到你的编译器的相应目录下
+echo ------------------------------------
+echo 对于VC的配置
+echo.
+echo 请将ege\include下的所有内容拷贝到VC++的include目录中
+echo 请将ege\lib\vcxx下的所有内容拷贝到vc++的库目录中
+echo 例如,对于VC++2013:
+echo 将ege\include下面的内容拷贝到%VC13PATH%\include下面
+echo 将ege\lib\vc2013下面的内容拷贝到%VC13PATH%\lib下面
+echo.
+echo ------------------------------------
+echo 对于mingw的配置
+echo.
+echo 请将ege\include下的所有内容拷贝到mingw的include目录中
+echo 请将ege\lib\mingwxxxx下的所有内容拷贝到mingw的库目录中
+echo 例如,对于mingw4.7.2:
+echo 将ege\include下面的内容拷贝到%MINGW32_472PATH%\include下面
+echo 将ege\lib\ming32-xxx下面的内容拷贝到%MINGW32_472PATH%\lib下面
+echo 对于 mingw64-3.3.0
+echo 将ege\include下面的内容拷贝到%MINGW64_330PATH%\x86_64-w64-mingw32\include下面
+echo 将ege\lib\vc2013下面的内容拷贝到%MINGW64_330PATH%\x86_64-w64-mingw32\lib下面
+echo.
+pause
+rem  mkdir "%VC10PATH%\include\ege"
+rem  copy ..\include\*.h "%VC10PATH%\include\"
+rem  copy ..\include\ege\*.h "%VC10PATH%\include\ege"
+rem  copy /Y ..\lib\vc2010\* "%VC10PATH%\lib\"
+rem  copy /Y ..\lib\vc2010\amd64\* "%VC10PATH%\lib\amd64\"
+rem  
+rem  mkdir "%VC12PATH%\include\ege"
+rem  copy ..\include\*.h "%VC12PATH%\include\"
+rem  copy ..\include\ege\*.h "%VC12PATH%\include\ege"
+rem  copy /Y ..\lib\vc2012\* "%VC12PATH%\lib\"
+rem  copy /Y ..\lib\vc2012\amd64\* "%VC12PATH%\lib\amd64\"
+rem  
+rem  mkdir "%VC13PATH%\include\ege"
+rem  copy ..\include\*.h "%VC12PATH%\include\"
+rem  copy ..\include\ege\*.h "%VC12PATH%\include\ege"
+rem  copy /Y ..\lib\vc2013\* "%VC12PATH%\lib\"
+rem  copy /Y ..\lib\vc2013\amd64\* "%VC12PATH%\lib\amd64\"
+rem  
+rem  mkdir "%VC15PATH%\include\ege"
+rem  copy ..\include\*.h "%VC12PATH%\include\"
+rem  copy ..\include\ege\*.h "%VC12PATH%\include\ege"
+rem  copy /Y ..\lib\vc2015\* "%VC12PATH%\lib\"
+rem  copy /Y ..\lib\vc2015\amd64\* "%VC12PATH%\lib\amd64\"
+rem  
+rem  mkdir "%MINGW472PATH%\include\ege"
+rem  copy ..\include\*.h "%MINGW472PATH%\include\"
+rem  copy ..\include\ege\*.h "%MINGW472PATH%\include\ege\"
+rem  copy /y ..\lib\mingw4.7.2\* "%MINGW472PATH%\lib\"
+rem  
+rem  mkdir "%MINGW64PATH%\x86_64-w64-mingw32\include\ege"
+rem  copy ..\include\*.h "%MINGW64PATH%\x86_64-w64-mingw32\include\"
+rem  copy ..\include\ege\*.h "%MINGW64PATH%\x86_64-w64-mingw32\include\ege\"
+rem  copy /y ..\lib\mingw64\* "%MINGW64PATH%\x86_64-w64-mingw32\lib\"
+rem  
\ No newline at end of file
diff --git a/src/testall.bat b/src/testall.bat
deleted file mode 100644
index cdd1a118..00000000
--- a/src/testall.bat
+++ /dev/null
@@ -1,52 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-call testvc6
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-call testmingw35
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-call testmingw47
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-call testmingw64
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-call testvc9
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-call testvc10
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	goto end1
-)
-
-echo "全部编译成功"
-goto end2
-:end1
-pause
-:end2
diff --git a/src/testmingw35.bat b/src/testmingw35.bat
deleted file mode 100644
index 9898605c..00000000
--- a/src/testmingw35.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-set path=%MINGW35PATH%\bin;%MINGW35PATH%\mingw32\bin
-g++ -O3 "graphicstest/maintest.cpp" -L./ -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows --static -oz.exe
-if %ErrorLevel% == 0 (
-	echo MinGW32 compile SUCCESS
-) else (
-	set COMPILER=MinGW35
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testmingw45.bat b/src/testmingw45.bat
deleted file mode 100644
index 0fa79327..00000000
--- a/src/testmingw45.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-set path=%MINGW45PATH%\bin;%MINGW45PATH%\mingw32\bin
-g++ -O3 "graphicstest/maintest.cpp" -L./ -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows --static -oz.exe
-if %ErrorLevel% == 0 (
-	echo MinGW32 compile SUCCESS
-) else (
-	set COMPILER=MinGW45
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testmingw46.bat b/src/testmingw46.bat
deleted file mode 100644
index 53541b9e..00000000
--- a/src/testmingw46.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-set path=%MINGW46PATH%\bin;%MINGW46PATH%\mingw32\bin
-g++ -O3 "graphicstest/maintest.cpp" -L./ -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows --static -oz.exe
-if %ErrorLevel% == 0 (
-	echo MinGW32 compile SUCCESS
-) else (
-	set COMPILER=MinGW46
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testmingw47.bat b/src/testmingw47.bat
deleted file mode 100644
index 16d713cb..00000000
--- a/src/testmingw47.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-set path=%MINGW47PATH%\bin;%MINGW47PATH%\mingw32\bin
-g++ -O3 "graphicstest/maintest.cpp" -L./ -s -lgraphics -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows --static -oz.exe
-if %ErrorLevel% == 0 (
-	echo MinGW32 compile SUCCESS
-) else (
-	set COMPILER=MinGW47
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testmingw64.bat b/src/testmingw64.bat
deleted file mode 100644
index aa0f9a3f..00000000
--- a/src/testmingw64.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-set path=%MINGW64PATH%\bin;
-g++ -O3 "graphicstest/maintest.cpp" -L./ -s -lgraphics64 -lgdi32 -limm32 -lmsimg32 -lole32 -loleaut32 -lwinmm -luuid -mwindows --static -oz64.exe
-if %ErrorLevel% == 0 (
-	echo MinGW64 compile SUCCESS
-) else (
-	set COMPILER=MinGW64
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testvc10.bat b/src/testvc10.bat
deleted file mode 100644
index 715c7312..00000000
--- a/src/testvc10.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest10.vcxproj" /Rebuild "Debug|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2010 debug
-	goto end1
-)
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest10.vcxproj" /Rebuild "Release|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2010 release
-	goto end1
-)
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest10.vcxproj" /Rebuild "Debug|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2010 debug x64
-	goto end1
-)
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest10.vcxproj" /Rebuild "Release|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2010 release x64
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testvc12.bat b/src/testvc12.bat
deleted file mode 100644
index 8eac38d6..00000000
--- a/src/testvc12.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest12.vcxproj" /Rebuild "Debug|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2012 debug
-	goto end1
-)
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest12.vcxproj" /Rebuild "Release|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2012 release
-	goto end1
-)
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest12.vcxproj" /Rebuild "Debug|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2012 debug x64
-	goto end1
-)
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest12.vcxproj" /Rebuild "Release|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2012 release x64
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testvc6.bat b/src/testvc6.bat
deleted file mode 100644
index 610d86c4..00000000
--- a/src/testvc6.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-"%VC6PATH%\..\Common\MSDev98\Bin\MSDEV.COM" "graphicstest/graphicstest06.dsw" /make "ALL" /CLEAN
-"%VC6PATH%\..\Common\MSDev98\Bin\MSDEV.COM" "graphicstest/graphicstest06.dsw" /make "ALL"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC6
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/testvc9.bat b/src/testvc9.bat
deleted file mode 100644
index 9c8bebc9..00000000
--- a/src/testvc9.bat
+++ /dev/null
@@ -1,39 +0,0 @@
-@echo off
-call setenv
-
-set COMPILER=
-
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest09.vcproj" /Rebuild "Debug|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2008 debug
-	goto end1
-)
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest09.vcproj" /Rebuild "Release|Win32"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2008 release
-	goto end1
-)
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest09.vcproj" /Rebuild "Debug|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2008 debug x64
-	goto end1
-)
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphicstest/graphicstest09.vcproj" /Rebuild "Release|x64"
-if %ErrorLevel% == 0 (
-	rem SUCCESS
-) else (
-	set COMPILER=VC2008 release x64
-	goto end1
-)
-
-goto end2
-:end1
-echo "%COMPILER% 编译失败"
-pause
-:end2
diff --git a/src/vc10make.bat b/src/vc10make.bat
deleted file mode 100644
index 6b0435ea..00000000
--- a/src/vc10make.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-@echo off
-call setenv
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphics10/graphics10.vcxproj" /Rebuild "Release|x64"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-"%VC10PATH%\..\Common7\IDE\devenv.com" "graphics10/graphics10.vcxproj" /Build "Release|Win32"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-:end
diff --git a/src/vc12make.bat b/src/vc12make.bat
deleted file mode 100644
index b10052a7..00000000
--- a/src/vc12make.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-@echo off
-call setenv
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphics12/graphics12.vcxproj" /Rebuild "Release|x64"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-"%VC12PATH%\..\Common7\IDE\devenv.com" "graphics12/graphics12.vcxproj" /Build "Release|Win32"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-:end
diff --git a/src/graphics10/graphics10.sln b/src/vc2010/graphics10.sln
similarity index 100%
rename from src/graphics10/graphics10.sln
rename to src/vc2010/graphics10.sln
diff --git a/src/graphics10/graphics10.vcxproj b/src/vc2010/graphics10.vcxproj
similarity index 98%
rename from src/graphics10/graphics10.vcxproj
rename to src/vc2010/graphics10.vcxproj
index 9799e9bd..6eb03db0 100644
--- a/src/graphics10/graphics10.vcxproj
+++ b/src/vc2010/graphics10.vcxproj
@@ -27,9 +27,9 @@
     
   
   
-    graphics10
+    graphics
     {BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}
-    graphics08
+    graphics10
     Win32Proj
   
   
@@ -130,7 +130,7 @@
       EditAndContinue
     
     
-      $(SolutionDir)..\..\lib\$(TargetName).lib
+      $(SolutionDir)..\..\vc2010\lib\$(TargetName)d.lib
     
   
   
@@ -146,7 +146,7 @@
       ProgramDatabase
     
     
-      $(SolutionDir)..\..\lib\$(TargetName).lib
+      $(SolutionDir)..\..\lib\vc2010\amd64\$(TargetName)64d.lib
     
   
   
@@ -214,7 +214,7 @@
       false
     
     
-      $(SolutionDir)..\..\lib\vc2010\$(TargetName)d.lib
+      $(SolutionDir)..\..\lib\vc2010\$(TargetName).lib
       true
     
   
@@ -239,7 +239,7 @@
       false
     
     
-      $(SolutionDir)..\..\lib\vc2010\amd64\$(TargetName)64d.lib
+      $(SolutionDir)..\..\lib\vc2010\amd64\$(TargetName)64.lib
       true
     
   
diff --git a/src/graphics12/graphics12.sln b/src/vc2012/graphics12.sln
similarity index 100%
rename from src/graphics12/graphics12.sln
rename to src/vc2012/graphics12.sln
diff --git a/src/graphics12/graphics12.vcxproj b/src/vc2012/graphics12.vcxproj
similarity index 98%
rename from src/graphics12/graphics12.vcxproj
rename to src/vc2012/graphics12.vcxproj
index 334765e2..b978b4d5 100644
--- a/src/graphics12/graphics12.vcxproj
+++ b/src/vc2012/graphics12.vcxproj
@@ -27,9 +27,9 @@
     
   
   
-    graphics12
+    graphics
     {BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}
-    graphics08
+    graphics12
     Win32Proj
   
   
@@ -136,7 +136,7 @@
       EditAndContinue
     
     
-      $(SolutionDir)..\..\lib\$(TargetName).lib
+      $(SolutionDir)..\..\lib\vc2012\$(TargetName)d.lib
     
   
   
@@ -152,7 +152,7 @@
       ProgramDatabase
     
     
-      $(SolutionDir)..\..\lib\$(TargetName).lib
+      $(SolutionDir)..\..\lib\vc2012\amd64\$(TargetName)64d.lib
     
   
   
@@ -220,7 +220,7 @@
       false
     
     
-      $(SolutionDir)..\..\lib\vc2012\$(TargetName)d.lib
+      $(SolutionDir)..\..\lib\vc2012\$(TargetName).lib
       true
     
   
@@ -245,7 +245,7 @@
       false
     
     
-      $(SolutionDir)..\..\lib\vc2012\amd64\$(TargetName)64d.lib
+      $(SolutionDir)..\..\lib\vc2012\amd64\$(TargetName)64.lib
       true
     
   
diff --git a/src/graphics08/graphics08.sln b/src/vc2013/graphics13.sln
similarity index 77%
rename from src/graphics08/graphics08.sln
rename to src/vc2013/graphics13.sln
index e332e82b..1f6364c8 100644
--- a/src/graphics08/graphics08.sln
+++ b/src/vc2013/graphics13.sln
@@ -1,7 +1,9 @@
 锘
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics08", "graphics08.vcproj", "{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics13", "graphics13.vcxproj", "{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,10 +23,10 @@ Global
 		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.Release|Win32.Build.0 = Release|Win32
 		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.Release|x64.ActiveCfg = Release|x64
 		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.Release|x64.Build.0 = Release|x64
-		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|Win32.ActiveCfg = ReleaseD|Win32
-		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|Win32.Build.0 = ReleaseD|Win32
-		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|x64.ActiveCfg = ReleaseD|x64
-		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|x64.Build.0 = ReleaseD|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|Win32.ActiveCfg = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|Win32.Build.0 = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|x64.ActiveCfg = Release|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}.ReleaseD|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/src/vc2013/graphics13.vcxproj b/src/vc2013/graphics13.vcxproj
new file mode 100644
index 00000000..33b606cb
--- /dev/null
+++ b/src/vc2013/graphics13.vcxproj
@@ -0,0 +1,322 @@
+锘
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      ReleaseD
+      Win32
+    
+    
+      ReleaseD
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    graphics
+    {BE96861E-BBBD-46E5-BDC3-C7C330A0B4F3}
+    graphics13
+    Win32Proj
+  
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v120
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v120
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v120
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v120
+  
+  
+    StaticLibrary
+    Unicode
+    v120
+  
+  
+    StaticLibrary
+    Unicode
+    v120
+  
+  
+  
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+  
+  
+    
+      Disabled
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+      true
+      EnableFastChecks
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      EditAndContinue
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\$(TargetName)d.lib
+    
+  
+  
+    
+      Disabled
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+      EnableFastChecks
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      ProgramDatabase
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\amd64\$(TargetName)64d.lib
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\$(TargetName).lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\amd64\$(TargetName)64.lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      false
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\$(TargetName).lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      false
+    
+    
+      $(SolutionDir)..\..\lib\vc2013\amd64\$(TargetName)64.lib
+      true
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/src/vc2015/graphics15.sln b/src/vc2015/graphics15.sln
new file mode 100644
index 00000000..f42f7888
--- /dev/null
+++ b/src/vc2015/graphics15.sln
@@ -0,0 +1,33 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics15", "graphics15.vcxproj", "{BE96861E-BBBD-46E5-BDC3-C7C330A01234}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		ReleaseD|Win32 = ReleaseD|Win32
+		ReleaseD|x64 = ReleaseD|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Debug|Win32.Build.0 = Debug|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Debug|x64.ActiveCfg = Debug|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Debug|x64.Build.0 = Debug|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Release|Win32.ActiveCfg = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Release|Win32.Build.0 = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Release|x64.ActiveCfg = Release|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.Release|x64.Build.0 = Release|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.ReleaseD|Win32.ActiveCfg = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.ReleaseD|Win32.Build.0 = Release|Win32
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.ReleaseD|x64.ActiveCfg = Release|x64
+		{BE96861E-BBBD-46E5-BDC3-C7C330A01234}.ReleaseD|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/vc2015/graphics15.vcxproj b/src/vc2015/graphics15.vcxproj
new file mode 100644
index 00000000..98ede44f
--- /dev/null
+++ b/src/vc2015/graphics15.vcxproj
@@ -0,0 +1,322 @@
+锘
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      ReleaseD
+      Win32
+    
+    
+      ReleaseD
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    graphics15
+    {BE96861E-BBBD-46E5-BDC3-C7C330A01234}
+    graphics15
+    Win32Proj
+  
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v130
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v130
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v130
+  
+  
+    StaticLibrary
+    Unicode
+    true
+    v130
+  
+  
+    StaticLibrary
+    Unicode
+    v130
+  
+  
+    StaticLibrary
+    Unicode
+    v130
+  
+  
+  
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(SolutionDir)$(Configuration)\
+    $(Configuration)\
+    $(Configuration)\
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+    AllRules.ruleset
+    AllRules.ruleset
+    
+    
+    
+    
+  
+  
+    
+      Disabled
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+      true
+      EnableFastChecks
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      EditAndContinue
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\$(TargetName)d.lib
+    
+  
+  
+    
+      Disabled
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+      EnableFastChecks
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      ProgramDatabase
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\amd64\$(TargetName)64d.lib
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\$(TargetName).lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreaded
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\amd64\$(TargetName)64.lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      false
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\$(TargetName).lib
+      true
+    
+  
+  
+    
+      MaxSpeed
+      true
+      false
+      $(SolutionDir)..\;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      
+      
+      4996;%(DisableSpecificWarnings)
+      true
+    
+    
+      false
+    
+    
+      $(SolutionDir)..\..\lib\vc2015\amd64\$(TargetName)64.lib
+      true
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/src/vc6make.bat b/src/vc6make.bat
deleted file mode 100644
index 56a098fb..00000000
--- a/src/vc6make.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@echo off
-call setenv
-"%VC6PATH%\..\Common\MSDev98\Bin\MSDEV.COM" "graphics/graphics.dsw" /make "graphics - Win32 Release" /CLEAN
-"%VC6PATH%\..\Common\MSDev98\Bin\MSDEV.COM" "graphics/graphics.dsw" /make "graphics - Win32 Release"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-:end
diff --git a/src/vc9make.bat b/src/vc9make.bat
deleted file mode 100644
index 5e0276c9..00000000
--- a/src/vc9make.bat
+++ /dev/null
@@ -1,13 +0,0 @@
-@echo off
-call setenv
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphics08/graphics08.vcproj" /Rebuild "Release|x64"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-"%VC9PATH%\..\Common7\IDE\devenv.com" "graphics08/graphics08.vcproj" /Rebuild "Release|Win32"
-if not %ErrorLevel% == 0 (
-        pause
-        goto end
-)
-:end
diff --git a/src/version.h b/src/version.h
new file mode 100644
index 00000000..8b91cca8
--- /dev/null
+++ b/src/version.h
@@ -0,0 +1,53 @@
+#ifndef VERSION_H
+#define VERSION_H
+// Currently, this file is only included by graphics.cpp
+
+/* 20150203 by cyd AT bupt dot edu dot cn 
+VC内部版本号    宏的值           VC发行版编号
+MS VC++ 13.0 _MSC_VER = 1900 (Visual C++ 2015)
+MS VC++ 12.0 _MSC_VER = 1800 (Visual C++ 2013)
+MS VC++ 11.0 _MSC_VER = 1700 (Visual C++ 2012)
+MS VC++ 10.0 _MSC_VER = 1600 (Visual C++ 2010)
+MS VC++ 9.0  _MSC_VER = 1500 (Visual C++ 2008)
+MS VC++ 8.0  _MSC_VER = 1400 (Visual C++ 2005)
+MS VC++ 7.1  _MSC_VER = 1310 (Visual C++ 7.1)
+MS VC++ 7.0  _MSC_VER = 1300 (Visual C++ 7.0)
+MS VC++ 6.0  _MSC_VER = 1200 (Visual C++ 6.0)
+MS VC++ 5.0  _MSC_VER = 1100 (Visual C++ 5.0)
+*/
+//编译器版本,目前仅支持vc6/vc2008/vc2010/vc2012/mingw
+//cyd@bupt, 20150207 显然要考虑vc2013/vc2015等等编译器
+#ifdef _WIN64
+#define SYSBITS TEXT("x64")
+#else
+#define SYSBITS TEXT("x86")
+#endif
+
+#ifdef _MSC_VER
+	#if (_MSC_VER > 1900)
+		#define COMPILER_VER TEXT("VC20XX") SYSBITS
+	#elif (_MSC_VER >= 1900)
+		#define COMPILER_VER TEXT("VC2015") SYSBITS
+	#elif (_MSC_VER >= 1800)
+		#define COMPILER_VER TEXT("VC2013") SYSBITS
+	#elif (_MSC_VER >= 1700)
+		#define COMPILER_VER TEXT("VC2012") SYSBITS
+	#elif (_MSC_VER >= 1600)
+		#define COMPILER_VER TEXT("VC2010") SYSBITS
+	#elif (_MSC_VER > 1500)
+		#define COMPILER_VER TEXT("VC2008") SYSBITS
+	#else
+		#define COMPILER_VER TEXT("VisualC++") SYSBITS
+	#endif
+#else
+	#define TOSTRING_(x) #x
+	#define TOSTRING(x) TOSTRING_(x)
+	#define GCC_VER TEXT(TOSTRING(__GNUC__)) TEXT(".") TEXT(TOSTRING(__GNUC_MINOR__))
+	#define COMPILER_VER TEXT("GCC") GCC_VER SYSBITS
+#endif
+
+//#define EGE_TITLE TEXT("EGE13.04 ") COMPILER_VER
+// cyd@bupt 20150207 We increase the lib version
+#define EGE_TITLE TEXT("EGE13.04.02 ") COMPILER_VER
+
+#endif //end #ifndef VERSION_H
\ No newline at end of file