├── ColorToGrayDemo
├── ColorToGray
│ ├── ColorToGray.cpp
│ ├── macosx_xcode
│ │ └── ColorToGray.xcodeproj
│ │ │ ├── mac.mode1v3
│ │ │ ├── mac.pbxuser
│ │ │ └── project.pbxproj
│ ├── test0.bmp
│ ├── win_DevC++
│ │ ├── ColorToGray.dev
│ │ ├── ColorToGray.layout
│ │ └── Makefile.win
│ └── win_vc
│ │ ├── ColorToGray.sln
│ │ ├── ColorToGray.vcproj
│ │ └── ColorToGray.vcproj.HSS.Administrator.user
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── ErrorDiffuse
├── ErrorDiffuse
│ ├── ErrorDiffuse.cpp
│ ├── test0.bmp
│ ├── win_DevC++
│ │ ├── ErrorDiffuse.dev
│ │ ├── ErrorDiffuse.layout
│ │ └── Makefile.win
│ └── win_vc
│ │ ├── ErrorDiffuse.sln
│ │ └── ErrorDiffuse.vcproj
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hGraphic32_c.cpp
│ ├── hGraphic32_c.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── KingBlizzard
├── ColorMover.cpp
├── ColorMover.h
├── DDrawImport.cpp
├── DDrawImport.h
├── GameSys.cpp
├── GameSys.h
├── HColor.cpp
├── HColor.h
├── IGameScene.h
├── KingBlizzard.cpp
├── KingBlizzard.dsp
├── KingBlizzard.rc
├── KingBlizzard.scr
├── KingBlizzard.sln
├── KingBlizzard.vcproj
├── KingBlizzard.vcproj.HOUSISONG.hp.user
├── KingBlizzard.vcproj.HSS.Administrator.user
├── MMTime.cpp
├── MMTime.h
├── NewtonBlizzard.scr
├── PointMover.h
├── SceneJulia.cpp
├── SceneJulia.h
├── SceneKing.cpp
├── SceneKing.h
├── SceneMira.cpp
├── SceneMira.h
├── SceneNewton.cpp
├── SceneNewton.h
├── ScenePointFractal.h
├── SceneSpotFormat.cpp
├── SceneSpotFormat.h
├── Surface.h
├── hDibImport.cpp
├── hDibImport.h
├── icon1.ico
├── resource.h
└── runtest.bat
├── LocalAdaptiveDemo
├── LocalAdaptive
│ ├── LocalAdaptive.cpp
│ ├── test0.bmp
│ ├── win_DevC++
│ │ ├── LocalAdaptive.dev
│ │ ├── LocalAdaptive.layout
│ │ └── Makefile.win
│ └── win_vc
│ │ ├── LocalAdaptive.dsp
│ │ ├── LocalAdaptive.sln
│ │ └── LocalAdaptive.vcproj
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── README.md
├── RotaryDemo
├── Rotary
│ ├── RotaryTest.cpp
│ ├── test1.bmp
│ ├── win_DevC++
│ │ ├── Makefile.win
│ │ ├── RotaryTest.dev
│ │ └── RotaryTest.layout
│ ├── win_vc
│ │ ├── RotaryTest.dsp
│ │ ├── RotaryTest.sln
│ │ ├── RotaryTest.vcproj
│ │ └── RotaryTest.vcproj.HSS.Administrator.user
│ ├── yu.bmp
│ ├── zaka.bmp
│ └── zaka_ARGB32bit.bmp
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── YuvToRGB32
├── Pic
│ ├── 1024x576.bmp
│ └── 1920x1080.bmp
├── WorkThreadPool.cpp
├── WorkThreadPool.h
├── YuvToRGB32.cpp
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── ZoomDemo
├── Zoom
│ ├── ZoomTest.cpp
│ ├── ZoomTest_vc.exe
│ ├── test0.bmp
│ ├── test1.bmp
│ ├── win_DevC++
│ │ ├── Makefile.win
│ │ ├── ZoomTest.dev
│ │ └── ZoomTest.layout
│ ├── win_vc
│ │ ├── ZoomTest.dsp
│ │ ├── ZoomTest.sln
│ │ ├── ZoomTest.vcproj
│ │ └── ZoomTest.vcproj.HSS.Administrator.user
│ ├── zaka.bmp
│ └── zaka_ARGB32bit.bmp
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── base64_test
├── WorkThreadPool.cpp
├── WorkThreadPool.h
├── base64.cpp
├── base64.dsp
├── base64.exe
├── base64.sln
└── base64.vcproj
├── hssFractal1_4
├── Fractal1_4
│ ├── Fractal1_4.cpp
│ ├── win_DevC++
│ │ ├── Fractal1_4.dev
│ │ ├── Fractal1_4.layout
│ │ └── Makefile.win
│ └── win_vc
│ │ ├── Fractal1_4.dsp
│ │ ├── Fractal1_4.sln
│ │ ├── Fractal1_4.vcproj
│ │ └── Fractal1_4.vcproj.HSS.hss.user
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hGraphic32_c.cpp
│ ├── hGraphic32_c.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── hssFractal5_8
├── Fractal5_8
│ ├── Fractal5_8.cpp
│ └── win_vc
│ │ ├── Fractal5_8.dsp
│ │ ├── Fractal5_8.sln
│ │ ├── Fractal5_8.vcproj
│ │ └── Fractal5_8.vcproj.HSS.hss.user
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hGraphic32_c.cpp
│ ├── hGraphic32_c.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
├── hssFractal9_12
├── Fractal9_12
│ ├── Fractal9_12.cpp
│ └── win_vc
│ │ ├── Fractal9_12.dsp
│ │ ├── Fractal9_12.sln
│ │ ├── Fractal9_12.vcproj
│ │ └── Fractal9_12.vcproj.HSS.hss.user
└── hGraphic32
│ ├── hBmpFile.cpp
│ ├── hBmpFile.h
│ ├── hColor32.h
│ ├── hGraphic32.h
│ ├── hGraphic32_c.cpp
│ ├── hGraphic32_c.h
│ ├── hPixels32.cpp
│ ├── hPixels32.h
│ ├── hStream.cpp
│ └── hStream.h
└── raytracerCpp
├── hGraphic32
├── hBmpFile.cpp
├── hBmpFile.h
├── hColor32.h
├── hGraphic32.h
├── hGraphic32_c.cpp
├── hGraphic32_c.h
├── hPixels32.cpp
├── hPixels32.h
├── hStream.cpp
└── hStream.h
└── raytracer
├── CheckerMaterial.h
├── Color.h
├── IGeometry.h
├── IMaterial.h
├── IntersectResult.h
├── PerspectiveCamera.h
├── PhongMaterial.h
├── Plane.h
├── Ray3.h
├── Sphere.h
├── Union.h
├── Vector3.h
├── rayTraceRecursive.bmp
├── raytracer.exe_
├── raytracerTest.cpp
├── win_DevC++
├── Makefile.win
├── raytracer.dev
└── raytracer.layout
└── win_vc
├── raytracer.sln
└── raytracer.vcproj
/ColorToGrayDemo/ColorToGray/ColorToGray.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/ColorToGray/ColorToGray.cpp
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/test0.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/ColorToGray/test0.bmp
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/win_DevC++/ColorToGray.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=ColorToGray.dev
3 | Name=ColorToGray
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=ColorToGray_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\ColorToGray.cpp
34 | CompileCpp=1
35 | Folder=ColorToGray
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/win_DevC++/ColorToGray.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=
4 | [Editor_0]
5 | Open=0
6 | Top=0
7 | CursorCol=91
8 | CursorRow=529
9 | TopLine=506
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: ColorToGray
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/ColorToGray.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/ColorToGray.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -L"d:/Dev-Cpp/lib" -march=pentium4
11 | INCS = -I"d:/Dev-Cpp/include"
12 | CXXINCS = -I"d:/Dev-Cpp/include/c++" -I"d:/Dev-Cpp/include/c++/mingw32" -I"d:/Dev-Cpp/include/c++/backward" -I"d:/Dev-Cpp/include"
13 | BIN = ../ColorToGray_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../ColorToGray_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\ColorToGray_DevC++.exe" $(LIBS)
28 |
29 | ./build/ColorToGray.o: ../ColorToGray.cpp
30 | $(CPP) -c ../ColorToGray.cpp -o ./build/ColorToGray.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/win_vc/ColorToGray.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ColorToGray", "ColorToGray.vcproj", "{5EFCEE50-5004-4DBC-B35A-F8A01310FB31}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {5EFCEE50-5004-4DBC-B35A-F8A01310FB31}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {5EFCEE50-5004-4DBC-B35A-F8A01310FB31}.Debug|Win32.Build.0 = Debug|Win32
14 | {5EFCEE50-5004-4DBC-B35A-F8A01310FB31}.Release|Win32.ActiveCfg = Release|Win32
15 | {5EFCEE50-5004-4DBC-B35A-F8A01310FB31}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/ColorToGray/win_vc/ColorToGray.vcproj.HSS.Administrator.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/ColorToGrayDemo/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ColorToGrayDemo/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/ErrorDiffuse.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/ErrorDiffuse/ErrorDiffuse.cpp
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/test0.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/ErrorDiffuse/test0.bmp
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/win_DevC++/ErrorDiffuse.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=ErrorDiffuse.dev
3 | Name=ErrorDiffuse
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=ErrorDiffuse_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\ErrorDiffuse.cpp
34 | CompileCpp=1
35 | Folder=ErrorDiffuse
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/win_DevC++/ErrorDiffuse.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=1
8 | CursorRow=473
9 | TopLine=6
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: ErrorDiffuse
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/ErrorDiffuse.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/ErrorDiffuse.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -march=pentium4
11 | INCS =
12 | CXXINCS =
13 | BIN = ../ErrorDiffuse_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../ErrorDiffuse_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\ErrorDiffuse_DevC++.exe" $(LIBS)
28 |
29 | ./build/ErrorDiffuse.o: ../ErrorDiffuse.cpp
30 | $(CPP) -c ../ErrorDiffuse.cpp -o ./build/ErrorDiffuse.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/ErrorDiffuse/ErrorDiffuse/win_vc/ErrorDiffuse.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ErrorDiffuse", "ErrorDiffuse.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hGraphic32_c.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hGraphic32_c.cpp
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hGraphic32_c.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hGraphic32_c.h
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/ErrorDiffuse/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ErrorDiffuse/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/KingBlizzard/ColorMover.cpp:
--------------------------------------------------------------------------------
1 | //ColorMover.cpp
2 | #include "ColorMover.h"
3 | #include "stdlib.h"
4 |
5 | static unsigned char _colorRound_table[(csMaxColorRoundValue+1)*2];
6 | const unsigned char* colorRound_table=&_colorRound_table[(csMaxColorRoundValue+1)];
7 | class _CAuto_inti_colorRound_table
8 | {
9 | private:
10 | static inline long round_color(long x)
11 | {
12 | if (x<0) x=-x;
13 | while (x>csMaxColorRoundValue) x-=csMaxColorRoundValue;
14 | const double PI=3.1415926535897932384626433832795;
15 | double rd=( sin(x*(2.0*PI/csMaxColorRoundValue))+1+0.1)/(2.0+0.1);
16 | long ri=(long)(rd*255+0.5);
17 | //long ri=abs(x-csMaxColorRoundValue/2);
18 | if (ri<0) return 0;
19 | else if (ri>255) return 255;
20 | else return ri;
21 | }
22 | public:
23 | _CAuto_inti_colorRound_table() {
24 | for (int i=0;i<(csMaxColorRoundValue+1)*2;++i)
25 | _colorRound_table[i]=(unsigned char)round_color(i-(csMaxColorRoundValue+1));
26 | }
27 | };
28 | static _CAuto_inti_colorRound_table _Auto_inti_colorRound_table;
29 |
30 |
31 |
32 | void CColorMover::Inti(double kMin,double kMax,double ColorVMin,double ColorVMax)
33 | {
34 | m_kR=rand()*(1.0/RAND_MAX)*(kMax-kMin)+kMin;
35 | m_kG=rand()*(1.0/RAND_MAX)*(kMax-kMin)+kMin;
36 | m_kB=rand()*(1.0/RAND_MAX)*(kMax-kMin)+kMin;
37 |
38 | m_VR=rand()*(1.0/RAND_MAX)*(ColorVMax-ColorVMin)+ColorVMin;
39 | m_VG=rand()*(1.0/RAND_MAX)*(ColorVMax-ColorVMin)+ColorVMin;
40 | m_VB=rand()*(1.0/RAND_MAX)*(ColorVMax-ColorVMin)+ColorVMin;
41 | if (rand()>RAND_MAX/2) m_VR*=(-1);
42 | if (rand()>RAND_MAX/2) m_VG*=(-1);
43 | if (rand()>RAND_MAX/2) m_VB*=(-1);
44 |
45 | m_R0=rand()*(1.0/RAND_MAX)*csMaxColorRoundValue;
46 | m_G0=rand()*(1.0/RAND_MAX)*csMaxColorRoundValue;
47 | m_B0=rand()*(1.0/RAND_MAX)*csMaxColorRoundValue;
48 | }
49 |
50 | void CColorMover::Update(unsigned long StepTime_ms)
51 | {
52 | m_R0+=m_VR*StepTime_ms;
53 | m_G0+=m_VG*StepTime_ms;
54 | m_B0+=m_VB*StepTime_ms;
55 | if (m_R0<0) m_R0+=csMaxColorRoundValue; else if (m_R0>=csMaxColorRoundValue) m_R0-=csMaxColorRoundValue;
56 | if (m_G0<0) m_G0+=csMaxColorRoundValue; else if (m_G0>=csMaxColorRoundValue) m_G0-=csMaxColorRoundValue;
57 | if (m_B0<0) m_B0+=csMaxColorRoundValue; else if (m_B0>=csMaxColorRoundValue) m_B0-=csMaxColorRoundValue;
58 | }
--------------------------------------------------------------------------------
/KingBlizzard/ColorMover.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/ColorMover.h
--------------------------------------------------------------------------------
/KingBlizzard/DDrawImport.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/DDrawImport.cpp
--------------------------------------------------------------------------------
/KingBlizzard/DDrawImport.h:
--------------------------------------------------------------------------------
1 | //DDrawImport.h
2 | #ifndef __DDraw_Import_H_
3 | #define __DDraw_Import_H_
4 |
5 | #include "HColor.h"
6 |
7 | class CDDrawImprot
8 | {
9 | private:
10 | void* m_Import;
11 | void ClearImportPointer();
12 | public:
13 | CDDrawImprot();
14 | ~CDDrawImprot();
15 | void IsShowFPS(bool isShowFPS);
16 |
17 | bool IntiScreen(long ScreenWidth,long ScreenHeight,long ScreenColorBit,void * main_window_handle);
18 | bool DrawBegin(Context32& out_dst);
19 | void DrawEnd(Context32& dst);
20 | };
21 |
22 |
23 |
24 | #endif //__DDraw_Import_H_
--------------------------------------------------------------------------------
/KingBlizzard/GameSys.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/GameSys.cpp
--------------------------------------------------------------------------------
/KingBlizzard/GameSys.h:
--------------------------------------------------------------------------------
1 | //GameSys.h
2 | #ifndef __Game_Sys_H_
3 | #define __Game_Sys_H_
4 |
5 | #include "DDrawImport.h"
6 | #include "IGameScene.h"
7 | #include
8 |
9 | class CGameSys
10 | {
11 | CDDrawImprot* m_DDrawImprot;
12 | std::vector m_SceneList;
13 | unsigned long m_UpdateTime;
14 | long m_SceneRunSumTime;
15 | int m_SceneRuningIndex;
16 | long m_ScreenWidth;
17 | long m_ScreenHeight;
18 | public:
19 | CGameSys();
20 | ~CGameSys() ;
21 | void AddGameScene(IGameScene* GameScene);
22 | bool Game_Init(long ScreenWidth,long ScreenHeight,long ScreenColorBit,void * main_window_handle,bool isRunAsDebug);
23 | void Game_Shutdown();
24 | void Game_Loop();
25 | };
26 |
27 | #endif //__Game_Sys_H_
--------------------------------------------------------------------------------
/KingBlizzard/HColor.cpp:
--------------------------------------------------------------------------------
1 | //HColor.cpp
2 | #include "HColor.h"
3 |
4 | static unsigned char _color_table[256*3];
5 | const unsigned char* color_table=&_color_table[256];
6 | class _CAuto_inti_color_table
7 | {
8 | private:
9 | static inline long border_color(long x)
10 | {
11 | if (x<0) return 0;
12 | else if (x>255) return 255;
13 | else return x;
14 | }
15 | public:
16 | _CAuto_inti_color_table() {
17 | for (int i=0;i<256*3;++i)
18 | _color_table[i]=(unsigned char)border_color(i-256);
19 | }
20 | };
21 | static _CAuto_inti_color_table _Auto_inti_color_table;
--------------------------------------------------------------------------------
/KingBlizzard/HColor.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/HColor.h
--------------------------------------------------------------------------------
/KingBlizzard/IGameScene.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/IGameScene.h
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/KingBlizzard.cpp
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="KingBlizzard" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=KingBlizzard - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "KingBlizzard.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "KingBlizzard.mak" CFG="KingBlizzard - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "KingBlizzard - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "KingBlizzard - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=cl.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "KingBlizzard - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Target_Dir ""
43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
44 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
46 | # ADD RSC /l 0x804 /d "NDEBUG"
47 | BSC32=bscmake.exe
48 | # ADD BASE BSC32 /nologo
49 | # ADD BSC32 /nologo
50 | LINK32=link.exe
51 | # 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 /nologo /subsystem:console /machine:I386
52 | # 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 /nologo /subsystem:console /machine:I386
53 |
54 | !ELSEIF "$(CFG)" == "KingBlizzard - Win32 Debug"
55 |
56 | # PROP BASE Use_MFC 0
57 | # PROP BASE Use_Debug_Libraries 1
58 | # PROP BASE Output_Dir "Debug"
59 | # PROP BASE Intermediate_Dir "Debug"
60 | # PROP BASE Target_Dir ""
61 | # PROP Use_MFC 0
62 | # PROP Use_Debug_Libraries 1
63 | # PROP Output_Dir "Debug"
64 | # PROP Intermediate_Dir "Debug"
65 | # PROP Target_Dir ""
66 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
67 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
68 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
69 | # ADD RSC /l 0x804 /d "_DEBUG"
70 | BSC32=bscmake.exe
71 | # ADD BASE BSC32 /nologo
72 | # ADD BSC32 /nologo
73 | LINK32=link.exe
74 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
75 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
76 |
77 | !ENDIF
78 |
79 | # Begin Target
80 |
81 | # Name "KingBlizzard - Win32 Release"
82 | # Name "KingBlizzard - Win32 Debug"
83 | # Begin Source File
84 |
85 | SOURCE=.\KingBlizzard.cpp
86 | # End Source File
87 | # End Target
88 | # End Project
89 |
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/KingBlizzard.rc
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.scr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/KingBlizzard.scr
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KingBlizzard", "KingBlizzard.vcproj", "{FC6523F1-AFB8-4CAA-9D08-333081EE638B}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | ReleaseNewton|Win32 = ReleaseNewton|Win32
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.Debug|Win32.ActiveCfg = Debug|Win32
14 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.Debug|Win32.Build.0 = Debug|Win32
15 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.Release|Win32.ActiveCfg = Release|Win32
16 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.Release|Win32.Build.0 = Release|Win32
17 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.ReleaseNewton|Win32.ActiveCfg = ReleaseNewton|Win32
18 | {FC6523F1-AFB8-4CAA-9D08-333081EE638B}.ReleaseNewton|Win32.Build.0 = ReleaseNewton|Win32
19 | EndGlobalSection
20 | GlobalSection(SolutionProperties) = preSolution
21 | HideSolutionNode = FALSE
22 | EndGlobalSection
23 | EndGlobal
24 |
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.vcproj.HOUSISONG.hp.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/KingBlizzard/KingBlizzard.vcproj.HSS.Administrator.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
67 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/KingBlizzard/MMTime.cpp:
--------------------------------------------------------------------------------
1 | //MMTime.cpp
2 |
3 | #include "MMTime.h"
4 | #include "Windows.h"
5 | #include "mmSystem.h"
6 |
7 | unsigned long mmGetTime()
8 | {
9 | return timeGetTime();
10 | }
11 |
12 |
13 | void mmSleep(unsigned long time_ms)
14 | {
15 | Sleep(time_ms);
16 | }
17 |
--------------------------------------------------------------------------------
/KingBlizzard/MMTime.h:
--------------------------------------------------------------------------------
1 | //MMTime.h
2 |
3 | #ifndef __MMTime_H_
4 | #define __MMTime_H_
5 |
6 | unsigned long mmGetTime();
7 | void mmSleep(unsigned long time_ms);
8 |
9 | #endif //__MMTime_H_
10 |
--------------------------------------------------------------------------------
/KingBlizzard/NewtonBlizzard.scr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/NewtonBlizzard.scr
--------------------------------------------------------------------------------
/KingBlizzard/PointMover.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/PointMover.h
--------------------------------------------------------------------------------
/KingBlizzard/SceneJulia.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneJulia.cpp
--------------------------------------------------------------------------------
/KingBlizzard/SceneJulia.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneJulia.h
--------------------------------------------------------------------------------
/KingBlizzard/SceneKing.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneKing.cpp
--------------------------------------------------------------------------------
/KingBlizzard/SceneKing.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneKing.h
--------------------------------------------------------------------------------
/KingBlizzard/SceneMira.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneMira.cpp
--------------------------------------------------------------------------------
/KingBlizzard/SceneMira.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneMira.h
--------------------------------------------------------------------------------
/KingBlizzard/SceneNewton.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneNewton.cpp
--------------------------------------------------------------------------------
/KingBlizzard/SceneNewton.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneNewton.h
--------------------------------------------------------------------------------
/KingBlizzard/ScenePointFractal.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/ScenePointFractal.h
--------------------------------------------------------------------------------
/KingBlizzard/SceneSpotFormat.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneSpotFormat.cpp
--------------------------------------------------------------------------------
/KingBlizzard/SceneSpotFormat.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/SceneSpotFormat.h
--------------------------------------------------------------------------------
/KingBlizzard/Surface.h:
--------------------------------------------------------------------------------
1 | //Surface.h
2 |
3 | #ifndef __Surface_h_
4 | #define __Surface_h_
5 |
6 | #include "HColor.h"
7 |
8 | class CSurface
9 | {
10 | private:
11 | Context32 m_data;
12 | public:
13 | CSurface() { m_data.pdata=0; Clear(); }
14 | void Inti(const unsigned long width,const unsigned long height) {
15 | if ((width*height)!=(m_data.width*m_data.height))
16 | {
17 | Clear();
18 | if ((width>=1)&&(height>=1))
19 | {
20 | m_data.pdata=new Color32[width*height];
21 | }
22 | }
23 | m_data.byte_width=width*sizeof(Color32);
24 | m_data.width=width;
25 | m_data.height=height;
26 | }
27 | void Clear() {
28 | if (m_data.pdata!=0) delete[]m_data.pdata;
29 | m_data.pdata=0;
30 | m_data.byte_width=0;
31 | m_data.width=0;
32 | m_data.height=0;
33 | }
34 | ~CSurface() { Clear(); }
35 | inline bool lock_Data(Context32& out_dst) { out_dst=m_data; return true; }
36 | inline void unlock_Data(Context32& dst) {}
37 | };
38 |
39 | #endif //__Surface_h_
40 |
--------------------------------------------------------------------------------
/KingBlizzard/hDibImport.cpp:
--------------------------------------------------------------------------------
1 | //hDibImport.cpp
2 | #include "hDibImport.h"
3 | #include "assert.h"
4 | #include "windows.h"
5 |
6 | class CDib
7 | {
8 | private:
9 | HBITMAP m_hDIB;
10 | HDC m_MemDC;
11 | HGDIOBJ m_OldObject;
12 | Context32 m_Pixels32BufData;
13 | protected:
14 | void new_pixel_buf(Context32& result,const long width,const long height);
15 | void del_pixel_buf(Context32& aPixels32BufData) ;
16 | public:
17 | CDib(const long width,const long height):m_MemDC(0),m_hDIB(0),m_OldObject(0){ new_pixel_buf(m_Pixels32BufData,width,height); }
18 | ~CDib(){ unlock_DC(); del_pixel_buf(m_Pixels32BufData); }
19 | HDC lock_DC();
20 | void unlock_DC();
21 | bool lock_Data(Context32& out_dst) { out_dst=m_Pixels32BufData; return (m_Pixels32BufData.pdata!=0); }
22 | void unlock_Data(Context32& dst) { assert(m_Pixels32BufData.pdata=dst.pdata); }
23 | };
24 |
25 | HBITMAP create_DIB(int nWidth , int nHeight,int nBitCount,BYTE*& out_pBits,long& out_WidthBytes)
26 | {
27 | out_WidthBytes=0;
28 | out_pBits=0;
29 |
30 | BITMAPINFOHEADER _BI;
31 | memset(&_BI,0,sizeof(BITMAPINFOHEADER));
32 | _BI.biSize= sizeof(BITMAPINFOHEADER);
33 | _BI.biWidth=nWidth;
34 | _BI.biHeight=nHeight;
35 | _BI.biPlanes=1;
36 | _BI.biBitCount=nBitCount;
37 | _BI.biCompression=0;
38 | _BI.biSizeImage=0;
39 | _BI.biXPelsPerMeter=0;
40 | _BI.biYPelsPerMeter=0;
41 | _BI.biClrUsed=0;
42 | _BI.biClrImportant=0;
43 | HBITMAP _hBmp=CreateDIBSection(0,(BITMAPINFO*)&_BI,DIB_RGB_COLORS,(void**)&out_pBits,0,0);
44 | if (_hBmp!=0)
45 | {
46 | assert(out_pBits!=0);
47 | BITMAP bm;
48 | ::GetObject(_hBmp,sizeof(BITMAP),&bm);
49 | _BI.biSizeImage=bm.bmHeight*bm.bmWidthBytes;
50 | _BI.biClrUsed=1<0)&&(height>0))
97 | {
98 | BYTE* out_pBits=0;
99 | long out_WidthBytes;
100 | m_hDIB=create_DIB(width,height,sizeof(Color32)*8,out_pBits,out_WidthBytes);
101 | assert(m_hDIB!=0);
102 | result.pdata=(Color32*)out_pBits;
103 | result.byte_width=out_WidthBytes;
104 | result.width=width;
105 | result.height=height;
106 | }
107 | else
108 | {
109 | result.pdata=0;
110 | result.byte_width=0;
111 | result.width=0;
112 | result.height=0;
113 | }
114 | }
115 |
116 | void CDib::del_pixel_buf(Context32& aPixels32BufData)
117 | {
118 | assert(m_MemDC==0);
119 | if (m_hDIB==0)
120 | {
121 | assert(aPixels32BufData.pdata==0);
122 | }
123 | else
124 | {
125 | delete_DIB(m_hDIB);
126 | m_hDIB=0;
127 | }
128 |
129 | aPixels32BufData.pdata=0;
130 | aPixels32BufData.byte_width=0;
131 | aPixels32BufData.width=0;
132 | aPixels32BufData.height=0;
133 | }
134 |
135 | HDC CDib::lock_DC()
136 | {
137 | assert(m_hDIB!=0);
138 | assert(m_MemDC==0);
139 |
140 | m_MemDC=create_DIB_DC(m_hDIB,m_OldObject);
141 | return m_MemDC;
142 | }
143 |
144 | void CDib::unlock_DC()
145 | {
146 | if (m_MemDC!=0)
147 | {
148 | delete_DIB_DC(m_MemDC,m_OldObject);
149 | m_MemDC=0;
150 | }
151 | }
152 |
153 |
154 | ///////////////////
155 |
156 | void CDibImport::Clear()
157 | {
158 | if (m_Import!=0)
159 | {
160 | delete (CDib*)m_Import;
161 | m_Import=0;
162 | }
163 | }
164 |
165 | void CDibImport::Inti(const long width,const long height)
166 | {
167 | Clear();
168 | m_Import=new CDib(width,height);
169 | }
170 |
171 | void* CDibImport::lock_DC()
172 | {
173 | return ((CDib*)m_Import)->lock_DC();
174 | }
175 |
176 | void CDibImport::unlock_DC()
177 | {
178 | ((CDib*)m_Import)->unlock_DC();
179 | }
180 |
181 | bool CDibImport::lock_Data(Context32& out_dst)
182 | {
183 | return ((CDib*)m_Import)->lock_Data(out_dst);
184 | }
185 |
186 | void CDibImport::unlock_Data(Context32& dst)
187 | {
188 | ((CDib*)m_Import)->unlock_Data(dst);
189 | }
--------------------------------------------------------------------------------
/KingBlizzard/hDibImport.h:
--------------------------------------------------------------------------------
1 | //hDibImport.h
2 |
3 | #ifndef __hDibImport_h_
4 | #define __hDibImport_h_
5 |
6 | #include "HColor.h"
7 |
8 | class CDibImport
9 | {
10 | private:
11 | void* m_Import;
12 | public:
13 | CDibImport():m_Import(0) {}
14 | void Inti(const long width,const long height);
15 | void Clear();
16 | ~CDibImport() { Clear(); }
17 | void* lock_DC();
18 | void unlock_DC();
19 | bool lock_Data(Context32& out_dst);
20 | void unlock_Data(Context32& dst);
21 | };
22 |
23 | #endif //__hDibImport_h_
24 |
--------------------------------------------------------------------------------
/KingBlizzard/icon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/KingBlizzard/icon1.ico
--------------------------------------------------------------------------------
/KingBlizzard/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by main.rc
4 | //
5 | #define IDI_MAINICON 102
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 103
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/KingBlizzard/runtest.bat:
--------------------------------------------------------------------------------
1 | KingBlizzard.scr /debug
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/LocalAdaptive.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/LocalAdaptive/LocalAdaptive.cpp
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/test0.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/LocalAdaptive/test0.bmp
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/win_DevC++/LocalAdaptive.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=LocalAdaptive.dev
3 | Name=LocalAdaptive
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=LocalAdaptive_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\LocalAdaptive.cpp
34 | CompileCpp=1
35 | Folder=LocalAdaptive
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/win_DevC++/LocalAdaptive.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=56
8 | CursorRow=480
9 | TopLine=463
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: LocalAdaptive
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/LocalAdaptive.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/LocalAdaptive.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -L"d:/Dev-Cpp/lib" -march=pentium4
11 | INCS = -I"d:/Dev-Cpp/include"
12 | CXXINCS = -I"d:/Dev-Cpp/include/c++" -I"d:/Dev-Cpp/include/c++/mingw32" -I"d:/Dev-Cpp/include/c++/backward" -I"d:/Dev-Cpp/include"
13 | BIN = ../LocalAdaptive_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../LocalAdaptive_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\LocalAdaptive_DevC++.exe" $(LIBS)
28 |
29 | ./build/LocalAdaptive.o: ../LocalAdaptive.cpp
30 | $(CPP) -c ../LocalAdaptive.cpp -o ./build/LocalAdaptive.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/win_vc/LocalAdaptive.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="LocalAdaptive" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=LocalAdaptive - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "LocalAdaptive.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "LocalAdaptive.mak" CFG="LocalAdaptive - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "LocalAdaptive - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "LocalAdaptive - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "LocalAdaptive - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"LocalAdaptive.exe"
54 |
55 | !ELSEIF "$(CFG)" == "LocalAdaptive - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"LocalAdaptive.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "LocalAdaptive - Win32 Release"
84 | # Name "LocalAdaptive - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\LocalAdaptive.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/LocalAdaptive/win_vc/LocalAdaptive.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LocalAdaptive", "LocalAdaptive.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/LocalAdaptiveDemo/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/LocalAdaptiveDemo/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | demoForHssBlog
2 | ==============
3 |
4 | demo's source code for my blog: http://blog.csdn.net/housisong
5 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/RotaryTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/Rotary/RotaryTest.cpp
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/test1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/Rotary/test1.bmp
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: RotaryTest
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/RotaryTest.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/RotaryTest.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -L"d:/Dev-Cpp/lib" -march=pentium4
11 | INCS = -I"d:/Dev-Cpp/include"
12 | CXXINCS = -I"d:/Dev-Cpp/include/c++" -I"d:/Dev-Cpp/include/c++/mingw32" -I"d:/Dev-Cpp/include/c++/backward" -I"d:/Dev-Cpp/include"
13 | BIN = ../RotaryTest_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../RotaryTest_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\RotaryTest_DevC++.exe" $(LIBS)
28 |
29 | ./build/RotaryTest.o: ../RotaryTest.cpp
30 | $(CPP) -c ../RotaryTest.cpp -o ./build/RotaryTest.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_DevC++/RotaryTest.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=RotaryTest.dev
3 | Name=RotaryTest
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=RotaryTest_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\RotaryTest.cpp
34 | CompileCpp=1
35 | Folder=RotaryTest
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_DevC++/RotaryTest.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=7
8 | CursorRow=2309
9 | TopLine=2302
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_vc/RotaryTest.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="RotaryTest" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=RotaryTest - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "RotaryTest.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "RotaryTest.mak" CFG="RotaryTest - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "RotaryTest - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "RotaryTest - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "RotaryTest - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"RotaryTest.exe"
54 |
55 | !ELSEIF "$(CFG)" == "RotaryTest - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"RotaryTest.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "RotaryTest - Win32 Release"
84 | # Name "RotaryTest - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\RotaryTest.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_vc/RotaryTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RotaryTest", "RotaryTest.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_vc/RotaryTest.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
27 |
30 |
33 |
36 |
39 |
44 |
65 |
68 |
73 |
76 |
85 |
88 |
91 |
94 |
99 |
102 |
105 |
108 |
111 |
112 |
122 |
125 |
128 |
131 |
134 |
139 |
155 |
158 |
163 |
166 |
176 |
179 |
182 |
185 |
190 |
193 |
196 |
199 |
202 |
203 |
204 |
205 |
206 |
207 |
210 |
213 |
214 |
217 |
218 |
221 |
222 |
225 |
226 |
229 |
230 |
233 |
234 |
237 |
238 |
241 |
242 |
243 |
246 |
247 |
248 |
249 |
250 |
251 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/win_vc/RotaryTest.vcproj.HSS.Administrator.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/yu.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/Rotary/yu.bmp
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/zaka.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/Rotary/zaka.bmp
--------------------------------------------------------------------------------
/RotaryDemo/Rotary/zaka_ARGB32bit.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/Rotary/zaka_ARGB32bit.bmp
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/RotaryDemo/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/RotaryDemo/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/YuvToRGB32/Pic/1024x576.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/Pic/1024x576.bmp
--------------------------------------------------------------------------------
/YuvToRGB32/Pic/1920x1080.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/Pic/1920x1080.bmp
--------------------------------------------------------------------------------
/YuvToRGB32/WorkThreadPool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/WorkThreadPool.cpp
--------------------------------------------------------------------------------
/YuvToRGB32/WorkThreadPool.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/WorkThreadPool.h
--------------------------------------------------------------------------------
/YuvToRGB32/YuvToRGB32.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/YuvToRGB32.cpp
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/YuvToRGB32/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/YuvToRGB32/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/ZoomTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/ZoomTest.cpp
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/ZoomTest_vc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/ZoomTest_vc.exe
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/test0.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/test0.bmp
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/test1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/test1.bmp
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: ZoomTest
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/ZoomTest.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/ZoomTest.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -L"d:/Dev-Cpp/lib" -march=pentium4
11 | INCS = -I"d:/Dev-Cpp/include"
12 | CXXINCS = -I"d:/Dev-Cpp/include/c++" -I"d:/Dev-Cpp/include/c++/mingw32" -I"d:/Dev-Cpp/include/c++/backward" -I"d:/Dev-Cpp/include"
13 | BIN = ../ZoomTest_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../ZoomTest_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\ZoomTest_DevC++.exe" $(LIBS)
28 |
29 | ./build/ZoomTest.o: ../ZoomTest.cpp
30 | $(CPP) -c ../ZoomTest.cpp -o ./build/ZoomTest.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_DevC++/ZoomTest.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=ZoomTest.dev
3 | Name=ZoomTest
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=ZoomTest_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\ZoomTest.cpp
34 | CompileCpp=1
35 | Folder=ZoomTest
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_DevC++/ZoomTest.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=10
8 | CursorRow=115
9 | TopLine=98
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_vc/ZoomTest.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="ZoomTest" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=ZoomTest - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "ZoomTest.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "ZoomTest.mak" CFG="ZoomTest - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "ZoomTest - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "ZoomTest - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "ZoomTest - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"ZoomTest.exe"
54 |
55 | !ELSEIF "$(CFG)" == "ZoomTest - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"ZoomTest.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "ZoomTest - Win32 Release"
84 | # Name "ZoomTest - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\ZoomTest.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_vc/ZoomTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZoomTest", "ZoomTest.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_vc/ZoomTest.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
27 |
30 |
33 |
36 |
39 |
44 |
65 |
68 |
73 |
76 |
85 |
88 |
91 |
94 |
99 |
102 |
105 |
108 |
111 |
112 |
122 |
125 |
128 |
131 |
134 |
139 |
155 |
158 |
163 |
166 |
176 |
179 |
182 |
185 |
190 |
193 |
196 |
199 |
202 |
203 |
204 |
205 |
206 |
207 |
210 |
213 |
214 |
217 |
218 |
221 |
222 |
225 |
226 |
229 |
230 |
233 |
234 |
237 |
238 |
241 |
242 |
243 |
246 |
247 |
248 |
249 |
250 |
251 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/win_vc/ZoomTest.vcproj.HSS.Administrator.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/zaka.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/zaka.bmp
--------------------------------------------------------------------------------
/ZoomDemo/Zoom/zaka_ARGB32bit.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/Zoom/zaka_ARGB32bit.bmp
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/ZoomDemo/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/ZoomDemo/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/base64_test/WorkThreadPool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/base64_test/WorkThreadPool.cpp
--------------------------------------------------------------------------------
/base64_test/WorkThreadPool.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/base64_test/WorkThreadPool.h
--------------------------------------------------------------------------------
/base64_test/base64.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/base64_test/base64.cpp
--------------------------------------------------------------------------------
/base64_test/base64.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="base64" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=base64 - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "base64.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "base64.mak" CFG="base64 - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "base64 - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "base64 - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=cl.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "base64 - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Target_Dir ""
43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
44 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
46 | # ADD RSC /l 0x804 /d "NDEBUG"
47 | BSC32=bscmake.exe
48 | # ADD BASE BSC32 /nologo
49 | # ADD BSC32 /nologo
50 | LINK32=link.exe
51 | # 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 /nologo /subsystem:console /machine:I386
52 | # 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 /nologo /subsystem:console /machine:I386
53 |
54 | !ELSEIF "$(CFG)" == "base64 - Win32 Debug"
55 |
56 | # PROP BASE Use_MFC 0
57 | # PROP BASE Use_Debug_Libraries 1
58 | # PROP BASE Output_Dir "Debug"
59 | # PROP BASE Intermediate_Dir "Debug"
60 | # PROP BASE Target_Dir ""
61 | # PROP Use_MFC 0
62 | # PROP Use_Debug_Libraries 1
63 | # PROP Output_Dir "Debug"
64 | # PROP Intermediate_Dir "Debug"
65 | # PROP Target_Dir ""
66 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
67 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
68 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
69 | # ADD RSC /l 0x804 /d "_DEBUG"
70 | BSC32=bscmake.exe
71 | # ADD BASE BSC32 /nologo
72 | # ADD BSC32 /nologo
73 | LINK32=link.exe
74 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
75 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
76 |
77 | !ENDIF
78 |
79 | # Begin Target
80 |
81 | # Name "base64 - Win32 Release"
82 | # Name "base64 - Win32 Debug"
83 | # Begin Source File
84 |
85 | SOURCE=.\base64.cpp
86 | # End Source File
87 | # End Target
88 | # End Project
89 |
--------------------------------------------------------------------------------
/base64_test/base64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/base64_test/base64.exe
--------------------------------------------------------------------------------
/base64_test/base64.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base64", "base64.vcproj", "{7CAD28A8-1DEE-43DE-85C8-19903F8A2D5A}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {7CAD28A8-1DEE-43DE-85C8-19903F8A2D5A}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {7CAD28A8-1DEE-43DE-85C8-19903F8A2D5A}.Debug|Win32.Build.0 = Debug|Win32
14 | {7CAD28A8-1DEE-43DE-85C8-19903F8A2D5A}.Release|Win32.ActiveCfg = Release|Win32
15 | {7CAD28A8-1DEE-43DE-85C8-19903F8A2D5A}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/base64_test/base64.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
26 |
29 |
32 |
35 |
38 |
43 |
58 |
61 |
66 |
69 |
79 |
82 |
85 |
88 |
93 |
96 |
99 |
102 |
105 |
106 |
116 |
119 |
122 |
125 |
128 |
133 |
149 |
152 |
157 |
160 |
169 |
172 |
175 |
178 |
183 |
186 |
189 |
192 |
195 |
196 |
197 |
198 |
199 |
200 |
203 |
206 |
210 |
211 |
214 |
218 |
219 |
220 |
223 |
224 |
227 |
228 |
229 |
230 |
231 |
232 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/Fractal1_4.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/Fractal1_4/Fractal1_4.cpp
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_DevC++/Fractal1_4.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=Fractal1_4.dev
3 | Name=Fractal1_4
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=Fractal1_4_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\Fractal1_4.cpp
34 | CompileCpp=1
35 | Folder=Fractal1_4
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_DevC++/Fractal1_4.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=10
8 | CursorRow=115
9 | TopLine=98
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: Fractal1_4
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/Fractal1_4.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/Fractal1_4.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -march=pentium4
11 | INCS =
12 | CXXINCS =
13 | BIN = ../Fractal1_4_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../Fractal1_4_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\Fractal1_4_DevC++.exe" $(LIBS)
28 |
29 | ./build/Fractal1_4.o: ../Fractal1_4.cpp
30 | $(CPP) -c ../Fractal1_4.cpp -o ./build/Fractal1_4.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_vc/Fractal1_4.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="Fractal1_4" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=Fractal1_4 - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "Fractal1_4.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "Fractal1_4.mak" CFG="Fractal1_4 - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "Fractal1_4 - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "Fractal1_4 - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "Fractal1_4 - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"Fractal1_4.exe"
54 |
55 | !ELSEIF "$(CFG)" == "Fractal1_4 - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"Fractal1_4.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "Fractal1_4 - Win32 Release"
84 | # Name "Fractal1_4 - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\Fractal1_4.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_vc/Fractal1_4.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fractal1_4", "Fractal1_4.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_vc/Fractal1_4.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
27 |
30 |
33 |
36 |
39 |
44 |
65 |
68 |
73 |
76 |
85 |
88 |
91 |
94 |
99 |
102 |
105 |
108 |
111 |
112 |
122 |
125 |
128 |
131 |
134 |
139 |
155 |
158 |
163 |
166 |
175 |
178 |
181 |
184 |
189 |
192 |
195 |
198 |
201 |
202 |
203 |
204 |
205 |
206 |
209 |
212 |
213 |
216 |
217 |
220 |
221 |
224 |
225 |
228 |
229 |
232 |
233 |
236 |
237 |
240 |
241 |
242 |
245 |
246 |
247 |
248 |
249 |
250 |
--------------------------------------------------------------------------------
/hssFractal1_4/Fractal1_4/win_vc/Fractal1_4.vcproj.HSS.hss.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hGraphic32_c.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hGraphic32_c.cpp
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hGraphic32_c.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hGraphic32_c.h
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/hssFractal1_4/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal1_4/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/hssFractal5_8/Fractal5_8/Fractal5_8.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/Fractal5_8/Fractal5_8.cpp
--------------------------------------------------------------------------------
/hssFractal5_8/Fractal5_8/win_vc/Fractal5_8.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="Fractal5_8" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=Fractal5_8 - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "Fractal5_8.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "Fractal5_8.mak" CFG="Fractal5_8 - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "Fractal5_8 - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "Fractal5_8 - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "Fractal5_8 - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"Fractal5_8.exe"
54 |
55 | !ELSEIF "$(CFG)" == "Fractal5_8 - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"Fractal5_8.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "Fractal5_8 - Win32 Release"
84 | # Name "Fractal5_8 - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\Fractal5_8.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/hssFractal5_8/Fractal5_8/win_vc/Fractal5_8.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fractal5_8", "Fractal5_8.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/hssFractal5_8/Fractal5_8/win_vc/Fractal5_8.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
27 |
30 |
33 |
36 |
39 |
44 |
65 |
68 |
73 |
76 |
85 |
88 |
91 |
94 |
99 |
102 |
105 |
108 |
111 |
112 |
122 |
125 |
128 |
131 |
134 |
139 |
155 |
158 |
163 |
166 |
175 |
178 |
181 |
184 |
189 |
192 |
195 |
198 |
201 |
202 |
203 |
204 |
205 |
206 |
209 |
212 |
213 |
216 |
217 |
220 |
221 |
224 |
225 |
228 |
229 |
232 |
233 |
236 |
237 |
240 |
241 |
242 |
245 |
246 |
247 |
248 |
249 |
250 |
--------------------------------------------------------------------------------
/hssFractal5_8/Fractal5_8/win_vc/Fractal5_8.vcproj.HSS.hss.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hGraphic32_c.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hGraphic32_c.cpp
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hGraphic32_c.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hGraphic32_c.h
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/hssFractal5_8/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal5_8/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/hssFractal9_12/Fractal9_12/Fractal9_12.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/Fractal9_12/Fractal9_12.cpp
--------------------------------------------------------------------------------
/hssFractal9_12/Fractal9_12/win_vc/Fractal9_12.dsp:
--------------------------------------------------------------------------------
1 | # Microsoft Developer Studio Project File - Name="Fractal9_12" - Package Owner=<4>
2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00
3 | # ** DO NOT EDIT **
4 |
5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103
6 |
7 | CFG=Fractal9_12 - Win32 Debug
8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE,
9 | !MESSAGE use the Export Makefile command and run
10 | !MESSAGE
11 | !MESSAGE NMAKE /f "Fractal9_12.mak".
12 | !MESSAGE
13 | !MESSAGE You can specify a configuration when running NMAKE
14 | !MESSAGE by defining the macro CFG on the command line. For example:
15 | !MESSAGE
16 | !MESSAGE NMAKE /f "Fractal9_12.mak" CFG="Fractal9_12 - Win32 Debug"
17 | !MESSAGE
18 | !MESSAGE Possible choices for configuration are:
19 | !MESSAGE
20 | !MESSAGE "Fractal9_12 - Win32 Release" (based on "Win32 (x86) Console Application")
21 | !MESSAGE "Fractal9_12 - Win32 Debug" (based on "Win32 (x86) Console Application")
22 | !MESSAGE
23 |
24 | # Begin Project
25 | # PROP AllowPerConfigDependencies 0
26 | # PROP Scc_ProjName ""
27 | # PROP Scc_LocalPath ""
28 | CPP=xicl6.exe
29 | RSC=rc.exe
30 |
31 | !IF "$(CFG)" == "Fractal9_12 - Win32 Release"
32 |
33 | # PROP BASE Use_MFC 0
34 | # PROP BASE Use_Debug_Libraries 0
35 | # PROP BASE Output_Dir "Release"
36 | # PROP BASE Intermediate_Dir "Release"
37 | # PROP BASE Target_Dir ""
38 | # PROP Use_MFC 0
39 | # PROP Use_Debug_Libraries 0
40 | # PROP Output_Dir "Release"
41 | # PROP Intermediate_Dir "Release"
42 | # PROP Ignore_Export_Lib 0
43 | # PROP Target_Dir ""
44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
46 | # ADD BASE RSC /l 0x804 /d "NDEBUG"
47 | # ADD RSC /l 0x804 /d "NDEBUG"
48 | BSC32=bscmake.exe
49 | # ADD BASE BSC32 /nologo
50 | # ADD BSC32 /nologo
51 | LINK32=xilink6.exe
52 | # 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 /nologo /subsystem:console /machine:I386
53 | # 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 /nologo /subsystem:console /machine:I386 /out:"Fractal9_12.exe"
54 |
55 | !ELSEIF "$(CFG)" == "Fractal9_12 - Win32 Debug"
56 |
57 | # PROP BASE Use_MFC 0
58 | # PROP BASE Use_Debug_Libraries 1
59 | # PROP BASE Output_Dir "Debug"
60 | # PROP BASE Intermediate_Dir "Debug"
61 | # PROP BASE Target_Dir ""
62 | # PROP Use_MFC 0
63 | # PROP Use_Debug_Libraries 1
64 | # PROP Output_Dir "Debug"
65 | # PROP Intermediate_Dir "Debug"
66 | # PROP Ignore_Export_Lib 0
67 | # PROP Target_Dir ""
68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
70 | # ADD BASE RSC /l 0x804 /d "_DEBUG"
71 | # ADD RSC /l 0x804 /d "_DEBUG"
72 | BSC32=bscmake.exe
73 | # ADD BASE BSC32 /nologo
74 | # ADD BSC32 /nologo
75 | LINK32=xilink6.exe
76 | # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
77 | # 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 /nologo /subsystem:console /debug /machine:I386 /out:"Fractal9_12.exe" /pdbtype:sept
78 |
79 | !ENDIF
80 |
81 | # Begin Target
82 |
83 | # Name "Fractal9_12 - Win32 Release"
84 | # Name "Fractal9_12 - Win32 Debug"
85 | # Begin Source File
86 |
87 | SOURCE=..\..\..\h2DEngine\hImport.h
88 | # End Source File
89 | # Begin Source File
90 |
91 | SOURCE=.\Fractal9_12.cpp
92 | # End Source File
93 | # Begin Source File
94 |
95 | SOURCE=..\..\..\h2DEngine\h2DEngine_vc6.lib
96 | # End Source File
97 | # End Target
98 | # End Project
99 |
--------------------------------------------------------------------------------
/hssFractal9_12/Fractal9_12/win_vc/Fractal9_12.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fractal9_12", "Fractal9_12.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/hssFractal9_12/Fractal9_12/win_vc/Fractal9_12.vcproj:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
27 |
30 |
33 |
36 |
39 |
44 |
65 |
68 |
73 |
76 |
85 |
88 |
91 |
94 |
99 |
102 |
105 |
108 |
111 |
112 |
122 |
125 |
128 |
131 |
134 |
139 |
155 |
158 |
163 |
166 |
175 |
178 |
181 |
184 |
189 |
192 |
195 |
198 |
201 |
202 |
203 |
204 |
205 |
206 |
209 |
212 |
213 |
216 |
217 |
220 |
221 |
224 |
225 |
228 |
229 |
232 |
233 |
236 |
237 |
240 |
241 |
242 |
245 |
246 |
247 |
248 |
249 |
250 |
--------------------------------------------------------------------------------
/hssFractal9_12/Fractal9_12/win_vc/Fractal9_12.vcproj.HSS.hss.user:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
35 |
36 |
39 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hGraphic32_c.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hGraphic32_c.cpp
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hGraphic32_c.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hGraphic32_c.h
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/hssFractal9_12/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/hssFractal9_12/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hBmpFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hBmpFile.cpp
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hBmpFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hBmpFile.h
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hColor32.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hColor32.h
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hGraphic32.h:
--------------------------------------------------------------------------------
1 | //hGraphic32.h
2 | #ifndef _hGraphic32_h_
3 | #define _hGraphic32_h_
4 |
5 | #include "hColor32.h"
6 | #include "hStream.h"
7 | #include "hBmpFile.h"
8 | #include "hPixels32.h"
9 |
10 | #endif //_hGraphic32_h_
11 |
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hGraphic32_c.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hGraphic32_c.cpp
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hGraphic32_c.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hGraphic32_c.h
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hPixels32.cpp:
--------------------------------------------------------------------------------
1 | //hPixels32.cpp
2 |
3 | #include "hPixels32.h"
4 |
5 | void TPixels32::getNewMemory(const long width,const long height,TPixels32Ref& out_ref){
6 | TPixels32Ref result;
7 | if ((width>0)&&(height>0)){
8 | long byte_width=width*sizeof(Color32);
9 | result.pdata=(Color32*)(new UInt8[byte_width*height]);
10 | result.byte_width=byte_width;
11 | result.width=width;
12 | result.height=height;
13 | }
14 | out_ref=result;
15 | }
16 | void TPixels32::delMemory(TPixels32Ref& ref){
17 | UInt8* pMemData=((UInt8*)ref.pdata);
18 | ref.pdata=0;
19 | ref.byte_width=0;
20 | ref.width=0;
21 | ref.height=0;
22 | if (pMemData!=0)
23 | delete []pMemData;
24 | }
25 |
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hPixels32.h:
--------------------------------------------------------------------------------
1 | //hPixels32.h
2 |
3 |
4 | #ifndef _hPixels32_h_
5 | #define _hPixels32_h_
6 |
7 | #include "hColor32.h"
8 |
9 |
10 | class TPixels32:public IPixels32Buf{
11 | private:
12 | TPixels32Ref m_data;
13 | protected:
14 | virtual void getNewMemory(const long width,const long height,TPixels32Ref& out_ref);
15 | virtual void delMemory(TPixels32Ref& ref);
16 | inline void setNewSize(int width, int height) {
17 | delMemory(m_data);
18 | getNewMemory(width, height,m_data);
19 | }
20 | public:
21 | inline explicit TPixels32():m_data() {}
22 | inline explicit TPixels32(const long width,const long height):m_data() { resizeFast(width,height); }
23 | virtual ~TPixels32() { delMemory(m_data); }
24 |
25 | virtual void resizeFast(long width,long height){
26 | if ((width > 0) && (height > 0)) {
27 | if ((width != m_data.width) || (height != m_data.height))
28 | setNewSize(width,height);
29 | } else
30 | delMemory(m_data);
31 | }
32 |
33 | inline long getWidth() const { return m_data.width; }
34 | inline long getHeight() const { return m_data.height; }
35 | inline const TPixels32Ref& getRef() const { return m_data; }
36 | //
37 | virtual bool lockBuf(TPixels32Ref& out_color32Ref){ out_color32Ref=getRef(); return true;}
38 | virtual void unlockBuf(){}
39 | };
40 |
41 |
42 | #endif //hPixels32_h_
43 |
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hStream.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hStream.cpp
--------------------------------------------------------------------------------
/raytracerCpp/hGraphic32/hStream.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/hGraphic32/hStream.h
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/CheckerMaterial.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _CheckerMaterial_h_
3 | #define _CheckerMaterial_h_
4 |
5 |
6 | #include "IMaterial.h"
7 |
8 | struct CheckerMaterial:public IMaterial{
9 | float scale;
10 | inline CheckerMaterial(float _scale,float _reflectiveness=0):IMaterial(_reflectiveness),scale(_scale) { }
11 |
12 | virtual Color sample(const Ray3& ray,const Vector3& position,const Vector3& normal){
13 | float d=abs((floor(position.x * this->scale) + floor(position.z * this->scale)));
14 | d=fmod(d,2);
15 | return d < 1 ? Color::black() : Color::white();
16 | }
17 | };
18 |
19 |
20 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/Color.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _Color_h_
3 | #define _Color_h_
4 |
5 | struct Color{
6 | float r;
7 | float g;
8 | float b;
9 | inline Color(float _r,float _g,float _b):r(_r),g(_g),b(_b) { };
10 |
11 | inline Color add(const Color& c)const { return Color(r + c.r, g + c.g, b + c.b); }
12 | inline Color multiply(float s) const { return Color(r * s, g * s, b * s); }
13 | inline Color modulate(const Color& c) const { return Color(r * c.r, g * c.g, b * c.b); }
14 | inline void saturate() { r = std::min(r, (float)1); g = std::min(g, (float)1); b = std::min(b, (float)1); }
15 |
16 | static inline Color black(){ return Color(0,0,0); }
17 | static inline Color white(){ return Color(1,1,1); }
18 | static inline Color red() { return Color(1,0,0); }
19 | static inline Color green(){ return Color(0,1,0); }
20 | static inline Color blue() { return Color(0,0,1); }
21 | };
22 |
23 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/IGeometry.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/raytracer/IGeometry.h
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/IMaterial.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _IMaterial_h_
3 | #define _IMaterial_h_
4 |
5 | #include "Vector3.h"
6 | #include "Color.h"
7 |
8 | struct IMaterial{
9 | float reflectiveness;
10 | inline IMaterial(float _reflectiveness=0):reflectiveness(_reflectiveness){}
11 |
12 | virtual Color sample(const Ray3& ray,const Vector3& position,const Vector3& normal)=0;
13 | virtual ~IMaterial(){}
14 | };
15 |
16 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/IntersectResult.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _IntersectResult_h_
3 | #define _IntersectResult_h_
4 |
5 | #include "Vector3.h"
6 | //#include "IGeometry.h"
7 | struct IGeometry;
8 |
9 | struct IntersectResult{
10 | IGeometry* geometry;
11 | float distance;
12 | Vector3 position;
13 | Vector3 normal;
14 | inline IntersectResult():geometry(0),distance(0),position(Vector3::zero()),normal(Vector3::zero()){ }
15 |
16 | static inline IntersectResult noHit() { return IntersectResult(); }
17 | };
18 |
19 |
20 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/PerspectiveCamera.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef _PerspectiveCamera_h_
4 | #define _PerspectiveCamera_h_
5 |
6 | #include "Ray3.h"
7 |
8 | struct PerspectiveCamera{
9 | Vector3 eye;
10 | Vector3 front;
11 | Vector3 refUp;
12 | float fov;
13 |
14 | Vector3 right;
15 | Vector3 up;
16 | float fovScale;
17 |
18 | inline PerspectiveCamera(const Vector3& _eye,const Vector3& _front,const Vector3& _refUp,float _fov)
19 | :eye(_eye),front(_front),refUp(_refUp),fov(_fov),
20 | right(Vector3::zero()),up(Vector3::zero()),fovScale(0) { }
21 |
22 | inline void initialize(){
23 | right = front.cross(refUp);
24 | up = right.cross(front);
25 | fovScale = tan(fov* (PI * 0.5f / 180)) * 2;
26 | }
27 |
28 | inline Ray3 generateRay(float x,float y)const{
29 | Vector3 r = right.multiply((x - 0.5f) * fovScale);
30 | Vector3 u = up.multiply((y - 0.5f) * fovScale);
31 | return Ray3(eye,front.add(r).add(u).normalize());
32 | }
33 | };
34 |
35 |
36 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/PhongMaterial.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _PhongMaterial_h_
3 | #define _PhongMaterial_h_
4 |
5 |
6 | #include "IMaterial.h"
7 |
8 | // global temp
9 | static Vector3 lightDir = Vector3(1, 1, 1).normalize();
10 | static Color lightColor = Color::white();
11 |
12 | struct PhongMaterial:public IMaterial{
13 | Color diffuse;
14 | Color specular;
15 | float shininess;
16 |
17 | inline PhongMaterial(const Color& _diffuse,const Color& _specular,const float& _shininess,float _reflectiveness=0)
18 | :IMaterial(_reflectiveness),diffuse(_diffuse),specular(_specular),shininess(_shininess){ }
19 |
20 | virtual Color sample(const Ray3& ray,const Vector3& position,const Vector3& normal){
21 | float NdotL = normal.dot(lightDir);
22 | Vector3 H = (lightDir.subtract(ray.direction)).normalize();
23 | float NdotH = normal.dot(H);
24 | Color diffuseTerm = this->diffuse.multiply(std::max(NdotL, (float)0));
25 | Color specularTerm = this->specular.multiply(pow(std::max(NdotH, (float)0), this->shininess));
26 | return lightColor.modulate(diffuseTerm.add(specularTerm));
27 | }
28 | };
29 |
30 |
31 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/Plane.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _Plane_h_
3 | #define _Plane_h_
4 |
5 | #include "IGeometry.h"
6 |
7 | struct Plane:public IGeometry{
8 | Vector3 normal;
9 | float d;
10 |
11 | Vector3 position;
12 |
13 | inline Plane(const Plane& p):normal(p.normal),d(p.d), position(Vector3::zero()) { }
14 | inline Plane(const Vector3& _normal,float _d):normal(_normal),d(_d), position(Vector3::zero()) { }
15 |
16 | inline void initialize() {
17 | position = normal.multiply(d);
18 | }
19 |
20 | virtual IntersectResult intersect(const Ray3& ray){
21 | float a = ray.direction.dot(this->normal);
22 | if (a >= 0)
23 | return IntersectResult::noHit();
24 |
25 | float b = this->normal.dot(ray.origin.subtract(this->position));
26 | IntersectResult result;
27 | result.geometry = this;
28 | result.distance = -b / a;
29 | result.position = ray.getPoint(result.distance);
30 | result.normal = this->normal;
31 | return result;
32 | }
33 |
34 | };
35 |
36 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/Ray3.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _Ray3_h_
3 | #define _Ray3_h_
4 |
5 | #include "Vector3.h"
6 |
7 | struct Ray3 {
8 | Vector3 origin;
9 | Vector3 direction;
10 |
11 | inline Ray3(const Ray3& r):origin(r.origin),direction(r.direction){}
12 | inline Ray3(const Vector3& _origin,const Vector3& _direction):origin(_origin),direction(_direction){}
13 | inline Vector3 getPoint(float t)const{ return origin.add(direction.multiply(t)); }
14 | };
15 |
16 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/Sphere.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _Sphere_h_
3 | #define _Sphere_h_
4 |
5 | #include "IGeometry.h"
6 |
7 | struct Sphere:public IGeometry{
8 | Vector3 center;
9 | float radius;
10 | inline Sphere(const Sphere& s):center(s.center),radius(s.radius) { }
11 | inline Sphere(const Vector3& _center,float _radius):center(_center),radius(_radius) { }
12 | inline float sqrRadius()const{ return radius*radius; }
13 |
14 | virtual IntersectResult intersect(const Ray3& ray){
15 | Vector3 v = ray.origin.subtract(this->center);
16 | float a0 = v.sqrLength() - this->sqrRadius();
17 | float DdotV = ray.direction.dot(v);
18 |
19 | if (DdotV <= 0) {
20 | float discr = DdotV * DdotV - a0;
21 | if (discr >= 0) {
22 | IntersectResult result;
23 | result.geometry = this;
24 | result.distance = -DdotV - sqrt(discr);
25 | result.position = ray.getPoint(result.distance);
26 | result.normal = result.position.subtract(this->center).normalize();
27 | return result;
28 | }
29 | }
30 |
31 | return IntersectResult::noHit();
32 | }
33 |
34 | };
35 |
36 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/Union.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef _Union_h_
4 | #define _Union_h_
5 |
6 | #include "IGeometry.h"
7 | #include
8 |
9 | struct Union:public IGeometry{
10 | std::vector geometries;
11 | inline Union() { }
12 |
13 | void push(IGeometry* geometry){
14 | geometries.push_back(geometry);
15 | }
16 |
17 | inline void initialize() {
18 | long size=geometries.size();
19 | for (long i=0;iinitialize();
21 | }
22 |
23 | virtual IntersectResult intersect(const Ray3& ray){
24 | const float Infinity=1e30;
25 | float minDistance = Infinity;
26 | IntersectResult minResult = IntersectResult::noHit();
27 | long size=this->geometries.size();
28 | for (long i=0;igeometries[i]->intersect(ray);
30 | if (result.geometry && (result.distance < minDistance)) {
31 | minDistance = result.distance;
32 | minResult = result;
33 | }
34 | }
35 | return minResult;
36 | }
37 |
38 | inline void clear(){
39 | long size=geometries.size();
40 | for (long i=0;i
6 | const float PI=3.141592653589793238462643383;
7 |
8 | struct Vector3{
9 | float x;
10 | float y;
11 | float z;
12 |
13 | inline Vector3(const Vector3& v):x(v.x),y(v.y),z(v.z) {}
14 | inline Vector3(float _x,float _y,float _z):x(_x),y(_y),z(_z) {}
15 | inline float length()const { return sqrt(sqrLength()); }
16 | inline float sqrLength()const { return x*x+y*y+z*z; }
17 | inline Vector3 normalize()const { float inv = 1/length(); return Vector3(x*inv,y*inv,z*inv); }
18 | inline Vector3 negate()const { return Vector3(-x, -y, -z); }
19 | inline Vector3 add(const Vector3& v)const { return Vector3(x + v.x, y + v.y, z + v.z); }
20 | inline Vector3 subtract(const Vector3& v) const { return Vector3(x - v.x, y - v.y, z - v.z); }
21 | inline Vector3 multiply(float f) const { return Vector3(x * f, y * f, z * f); }
22 | inline Vector3 divide(float f) const { float invf = 1/f; return Vector3(x * invf, y * invf, z * invf); }
23 | inline float dot(const Vector3& v) const { return x * v.x + y * v.y + z * v.z; }
24 | inline Vector3 cross(const Vector3& v) const { return Vector3(-z * v.y + y * v.z, z * v.x - x * v.z, -y * v.x + x * v.y); }
25 |
26 | static inline Vector3 zero(){ return Vector3(0,0,0); }
27 | };
28 |
29 |
30 |
31 | #endif
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/rayTraceRecursive.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/raytracer/rayTraceRecursive.bmp
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/raytracer.exe_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/raytracer/raytracer.exe_
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/raytracerTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sisong/demoForHssBlog/0775f24a9881b14bc86934985cbd6ef0b586068b/raytracerCpp/raytracer/raytracerTest.cpp
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/win_DevC++/Makefile.win:
--------------------------------------------------------------------------------
1 | # Project: raytracer
2 | # Makefile created by Dev-C++ 4.9.9.2
3 |
4 | CPP = g++.exe
5 | CC = gcc.exe
6 | WINDRES = windres.exe
7 | RES =
8 | OBJ = ./build/raytracer.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
9 | LINKOBJ = ./build/raytracer.o ./build/hBmpFile.o ./build/hPixels32.o ./build/hStream.o $(RES)
10 | LIBS = -march=pentium4
11 | INCS =
12 | CXXINCS =
13 | BIN = ../raytracer_DevC++.exe
14 | CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 -march=pentium4
15 | CFLAGS = $(INCS) -fexpensive-optimizations -O3 -march=pentium4
16 | RM = rm -f
17 |
18 | .PHONY: all all-before all-after clean clean-custom
19 |
20 | all: all-before ../raytracer_DevC++.exe all-after
21 |
22 |
23 | clean: clean-custom
24 | ${RM} $(OBJ) $(BIN)
25 |
26 | $(BIN): $(OBJ)
27 | $(CPP) $(LINKOBJ) -o "..\raytracer_DevC++.exe" $(LIBS)
28 |
29 | ./build/raytracer.o: ../raytracer.cpp
30 | $(CPP) -c ../raytracer.cpp -o ./build/raytracer.o $(CXXFLAGS)
31 |
32 | ./build/hBmpFile.o: ../../hGraphic32/hBmpFile.cpp
33 | $(CPP) -c ../../hGraphic32/hBmpFile.cpp -o ./build/hBmpFile.o $(CXXFLAGS)
34 |
35 | ./build/hPixels32.o: ../../hGraphic32/hPixels32.cpp
36 | $(CPP) -c ../../hGraphic32/hPixels32.cpp -o ./build/hPixels32.o $(CXXFLAGS)
37 |
38 | ./build/hStream.o: ../../hGraphic32/hStream.cpp
39 | $(CPP) -c ../../hGraphic32/hStream.cpp -o ./build/hStream.o $(CXXFLAGS)
40 |
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/win_DevC++/raytracer.dev:
--------------------------------------------------------------------------------
1 | [Project]
2 | FileName=raytracer.dev
3 | Name=raytracer
4 | UnitCount=9
5 | Type=1
6 | Ver=1
7 | ObjFiles=
8 | Includes=
9 | Libs=
10 | PrivateResource=
11 | ResourceIncludes=
12 | MakeIncludes=
13 | Compiler=
14 | CppCompiler=
15 | Linker=
16 | IsCpp=1
17 | Icon=
18 | ExeOutput=..\
19 | ObjectOutput=.\build\
20 | OverrideOutput=1
21 | OverrideOutputName=raytracer_DevC++.exe
22 | HostApplication=
23 | Folders=hGraphic32
24 | CommandLine=
25 | IncludeVersionInfo=0
26 | SupportXPThemes=0
27 | CompilerSet=0
28 | CompilerSettings=00000000010010000000i0
29 | UseCustomMakefile=0
30 | CustomMakefile=
31 |
32 | [Unit1]
33 | FileName=..\raytracerTest.cpp
34 | CompileCpp=1
35 | Folder=raytracer
36 | Compile=1
37 | Link=1
38 | Priority=1000
39 | OverrideBuildCmd=0
40 | BuildCmd=
41 |
42 | [VersionInfo]
43 | Major=0
44 | Minor=1
45 | Release=1
46 | Build=1
47 | LanguageID=1033
48 | CharsetID=1252
49 | CompanyName=
50 | FileVersion=
51 | FileDescription=Developed using the Dev-C++ IDE
52 | InternalName=
53 | LegalCopyright=
54 | LegalTrademarks=
55 | OriginalFilename=
56 | ProductName=
57 | ProductVersion=
58 | AutoIncBuildNr=0
59 |
60 | [Unit2]
61 | FileName=..\..\hGraphic32\hBmpFile.cpp
62 | CompileCpp=1
63 | Folder=hGraphic32
64 | Compile=1
65 | Link=1
66 | Priority=1000
67 | OverrideBuildCmd=0
68 | BuildCmd=
69 |
70 | [Unit3]
71 | FileName=..\..\hGraphic32\hBmpFile.h
72 | CompileCpp=1
73 | Folder=hGraphic32
74 | Compile=1
75 | Link=1
76 | Priority=1000
77 | OverrideBuildCmd=0
78 | BuildCmd=
79 |
80 | [Unit4]
81 | FileName=..\..\hGraphic32\hColor32.h
82 | CompileCpp=1
83 | Folder=hGraphic32
84 | Compile=1
85 | Link=1
86 | Priority=1000
87 | OverrideBuildCmd=0
88 | BuildCmd=
89 |
90 | [Unit5]
91 | FileName=..\..\hGraphic32\hGraphic32.h
92 | CompileCpp=1
93 | Folder=hGraphic32
94 | Compile=1
95 | Link=1
96 | Priority=1000
97 | OverrideBuildCmd=0
98 | BuildCmd=
99 |
100 | [Unit6]
101 | FileName=..\..\hGraphic32\hPixels32.cpp
102 | CompileCpp=1
103 | Folder=hGraphic32
104 | Compile=1
105 | Link=1
106 | Priority=1000
107 | OverrideBuildCmd=0
108 | BuildCmd=
109 |
110 | [Unit7]
111 | FileName=..\..\hGraphic32\hPixels32.h
112 | CompileCpp=1
113 | Folder=hGraphic32
114 | Compile=1
115 | Link=1
116 | Priority=1000
117 | OverrideBuildCmd=0
118 | BuildCmd=
119 |
120 | [Unit8]
121 | FileName=..\..\hGraphic32\hStream.cpp
122 | CompileCpp=1
123 | Folder=hGraphic32
124 | Compile=1
125 | Link=1
126 | Priority=1000
127 | OverrideBuildCmd=0
128 | BuildCmd=
129 |
130 | [Unit9]
131 | FileName=..\..\hGraphic32\hStream.h
132 | CompileCpp=1
133 | Folder=hGraphic32
134 | Compile=1
135 | Link=1
136 | Priority=1000
137 | OverrideBuildCmd=0
138 | BuildCmd=
139 |
140 |
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/win_DevC++/raytracer.layout:
--------------------------------------------------------------------------------
1 | [Editors]
2 | Focused=-1
3 | Order=-1
4 | [Editor_0]
5 | Open=1
6 | Top=1
7 | CursorCol=1
8 | CursorRow=473
9 | TopLine=6
10 | LeftChar=1
11 | [Editor_1]
12 | Open=0
13 | Top=0
14 | CursorCol=1
15 | CursorRow=15
16 | TopLine=43
17 | LeftChar=1
18 | [Editor_2]
19 | Open=0
20 | Top=0
21 | CursorCol=1
22 | CursorRow=1
23 | TopLine=1
24 | LeftChar=1
25 | [Editor_3]
26 | Open=0
27 | Top=0
28 | CursorCol=7
29 | CursorRow=17
30 | TopLine=1
31 | LeftChar=1
32 | [Editor_4]
33 | Open=0
34 | Top=0
35 | CursorCol=18
36 | CursorRow=10
37 | TopLine=1
38 | LeftChar=1
39 | [Editor_5]
40 | Open=0
41 | Top=0
42 | [Editor_6]
43 | Open=0
44 | Top=0
45 | [Editor_7]
46 | Open=0
47 | Top=0
48 | [Editor_8]
49 | Open=0
50 | Top=0
51 | CursorCol=20
52 | CursorRow=5
53 | TopLine=1
54 | LeftChar=1
55 |
--------------------------------------------------------------------------------
/raytracerCpp/raytracer/win_vc/raytracer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raytracer", "raytracer.vcproj", "{DB0C3C09-1CA6-4511-9869-BBB8CE389717}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Debug|Win32.Build.0 = Debug|Win32
14 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.ActiveCfg = Release|Win32
15 | {DB0C3C09-1CA6-4511-9869-BBB8CE389717}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------