├── FC-tank.pro
├── FC-tank.pro.user
├── README.md
├── UML.vsdx
├── bullet.cpp
├── bullet.h
├── config.cpp
├── config.h
├── enemy.cpp
├── enemy.h
├── images
├── ERROR.jpg
├── UML.jpg
├── bug.jpg
├── crash.jpg
├── gameover.jpg
├── map.jpg
├── process.jpg
├── restart.jpg
├── run.jpg
├── start.jpg
├── victory.jpg
└── window.jpg
├── main.cpp
├── player.cpp
├── player.h
├── process.vsdx
├── res.qrc
├── res
├── data
│ └── map.dat
├── pic
│ ├── 0Player
│ │ ├── m0-0-1.gif
│ │ ├── m0-0-2.gif
│ │ ├── m0-1-1.gif
│ │ ├── m0-1-2.gif
│ │ ├── m0-2-1.gif
│ │ ├── m0-2-2.gif
│ │ ├── m0-3-1.gif
│ │ ├── m0-3-2.gif
│ │ ├── m1-0-1.gif
│ │ ├── m1-0-2.gif
│ │ ├── m1-1-1.gif
│ │ ├── m1-1-2.gif
│ │ ├── m1-2-1.gif
│ │ ├── m1-2-2.gif
│ │ ├── m1-3-1.gif
│ │ ├── m1-3-2.gif
│ │ ├── m2-0-1.gif
│ │ ├── m2-0-2.gif
│ │ ├── m2-1-1.gif
│ │ ├── m2-1-2.gif
│ │ ├── m2-2-1.gif
│ │ ├── m2-2-2.gif
│ │ ├── m2-3-1.gif
│ │ ├── m2-3-2.gif
│ │ ├── m3-0-1.gif
│ │ ├── m3-0-2.gif
│ │ ├── m3-1-1.gif
│ │ ├── m3-1-2.gif
│ │ ├── m3-2-1.gif
│ │ ├── m3-2-2.gif
│ │ ├── m3-3-1.gif
│ │ └── m3-3-2.gif
│ ├── 100.gif
│ ├── 1P.gif
│ ├── 1Player
│ │ ├── m0-0-1.gif
│ │ ├── m0-0-2.gif
│ │ ├── m0-1-1.gif
│ │ ├── m0-1-2.gif
│ │ ├── m0-2-1.gif
│ │ ├── m0-2-2.gif
│ │ ├── m0-3-1.gif
│ │ ├── m0-3-2.gif
│ │ ├── m1-0-1.gif
│ │ ├── m1-0-2.gif
│ │ ├── m1-1-1.gif
│ │ ├── m1-1-2.gif
│ │ ├── m1-2-1.gif
│ │ ├── m1-2-2.gif
│ │ ├── m1-3-1.gif
│ │ ├── m1-3-2.gif
│ │ ├── m2-0-1.gif
│ │ ├── m2-0-2.gif
│ │ ├── m2-1-1.gif
│ │ ├── m2-1-2.gif
│ │ ├── m2-2-1.gif
│ │ ├── m2-2-2.gif
│ │ ├── m2-3-1.gif
│ │ ├── m2-3-2.gif
│ │ ├── m3-0-1.gif
│ │ ├── m3-0-2.gif
│ │ ├── m3-1-1.gif
│ │ ├── m3-1-2.gif
│ │ ├── m3-2-1.gif
│ │ ├── m3-2-2.gif
│ │ ├── m3-3-1.gif
│ │ └── m3-3-2.gif
│ ├── 200.gif
│ ├── 2P.gif
│ ├── 300.gif
│ ├── 400.gif
│ ├── 500.gif
│ ├── bg_black.gif
│ ├── bg_gray.gif
│ ├── big-gameover.gif
│ ├── black-number.gif
│ ├── blast
│ │ ├── 0.gif
│ │ ├── 1.gif
│ │ ├── 2.gif
│ │ ├── 3.gif
│ │ └── 4.gif
│ ├── bullet-0.gif
│ ├── bullet-1.gif
│ ├── bullet-2.gif
│ ├── bullet-3.gif
│ ├── bump1.gif
│ ├── bump2.gif
│ ├── bump3.gif
│ ├── camp0.gif
│ ├── camp1.gif
│ ├── enemytank-ico.gif
│ ├── flag.gif
│ ├── forest.gif
│ ├── gameover.gif
│ ├── gray-tank
│ │ ├── 1-1-1.gif
│ │ ├── 1-1-2.gif
│ │ ├── 1-2-1.gif
│ │ ├── 1-2-2.gif
│ │ ├── 1-3-1.gif
│ │ ├── 1-3-2.gif
│ │ ├── 1-4-1.gif
│ │ ├── 1-4-2.gif
│ │ ├── 2-1-1.gif
│ │ ├── 2-1-2.gif
│ │ ├── 2-2-1.gif
│ │ ├── 2-2-2.gif
│ │ ├── 2-3-1.gif
│ │ ├── 2-3-2.gif
│ │ ├── 2-4-1.gif
│ │ ├── 2-4-2.gif
│ │ ├── 3-1-1.gif
│ │ ├── 3-1-2.gif
│ │ ├── 3-2-1.gif
│ │ ├── 3-2-2.gif
│ │ ├── 3-3-1.gif
│ │ ├── 3-3-2.gif
│ │ ├── 3-4-1.gif
│ │ ├── 3-4-2.gif
│ │ ├── 4-1-1.gif
│ │ ├── 4-1-2.gif
│ │ ├── 4-2-1.gif
│ │ ├── 4-2-2.gif
│ │ ├── 4-3-1.gif
│ │ ├── 4-3-2.gif
│ │ ├── 4-4-1.gif
│ │ └── 4-4-2.gif
│ ├── ice.gif
│ ├── icon.png
│ ├── other-tank
│ │ ├── g4-1-1.gif
│ │ ├── g4-1-2.gif
│ │ ├── g4-2-1.gif
│ │ ├── g4-2-2.gif
│ │ ├── g4-3-1.gif
│ │ ├── g4-3-2.gif
│ │ ├── g4-4-1.gif
│ │ ├── g4-4-2.gif
│ │ ├── y4-1-1.gif
│ │ ├── y4-1-2.gif
│ │ ├── y4-2-1.gif
│ │ ├── y4-2-2.gif
│ │ ├── y4-3-1.gif
│ │ ├── y4-3-2.gif
│ │ ├── y4-4-1.gif
│ │ └── y4-4-2.gif
│ ├── playertank-ico.gif
│ ├── prop
│ │ ├── p0.gif
│ │ ├── p1.gif
│ │ ├── p2.gif
│ │ ├── p3.gif
│ │ ├── p4.gif
│ │ └── p5.gif
│ ├── red-tank
│ │ ├── 1-1-1.gif
│ │ ├── 1-1-2.gif
│ │ ├── 1-2-1.gif
│ │ ├── 1-2-2.gif
│ │ ├── 1-3-1.gif
│ │ ├── 1-3-2.gif
│ │ ├── 1-4-1.gif
│ │ ├── 1-4-2.gif
│ │ ├── 2-1-1.gif
│ │ ├── 2-1-2.gif
│ │ ├── 2-2-1.gif
│ │ ├── 2-2-2.gif
│ │ ├── 2-3-1.gif
│ │ ├── 2-3-2.gif
│ │ ├── 2-4-1.gif
│ │ ├── 2-4-2.gif
│ │ ├── 3-1-1.gif
│ │ ├── 3-1-2.gif
│ │ ├── 3-2-1.gif
│ │ ├── 3-2-2.gif
│ │ ├── 3-3-1.gif
│ │ ├── 3-3-2.gif
│ │ ├── 3-4-1.gif
│ │ ├── 3-4-2.gif
│ │ ├── 4-1-1.gif
│ │ ├── 4-1-2.gif
│ │ ├── 4-2-1.gif
│ │ ├── 4-2-2.gif
│ │ ├── 4-3-1.gif
│ │ ├── 4-3-2.gif
│ │ ├── 4-4-1.gif
│ │ └── 4-4-2.gif
│ ├── ring0.gif
│ ├── ring1.gif
│ ├── river-0.gif
│ ├── river-1.gif
│ ├── scorepanel
│ │ ├── background.gif
│ │ ├── bunds.gif
│ │ ├── player-0.gif
│ │ ├── player-1.gif
│ │ ├── pts-0.gif
│ │ └── pts-1.gif
│ ├── select_player.gif
│ ├── stage.gif
│ ├── star0.gif
│ ├── star1.gif
│ ├── star2.gif
│ ├── star3.gif
│ ├── stone.gif
│ ├── wall.gif
│ ├── white-number.gif
│ └── yellow-number.gif
└── sound
│ ├── addlife.wav
│ ├── bin.wav
│ ├── bk_sound.wav
│ ├── bouns1000.wav
│ ├── camp_bomb.wav
│ ├── enemy-bomb.wav
│ ├── fail.wav
│ ├── get-prop.wav
│ ├── move.wav
│ ├── player_bomb.wav
│ ├── player_move.wav
│ ├── prop-out.wav
│ ├── scorepanel_di.wav
│ ├── shoot.wav
│ ├── start.wav
│ ├── 未知1.wav
│ ├── 未知2.wav
│ ├── 未知3.wav
│ ├── 未知5.wav
│ ├── 未知6.wav
│ └── 未知7.wav
├── tank.ico
├── tankbase.cpp
├── tankbase.h
├── widget.cpp
├── widget.h
└── 坦克大战.md
/FC-tank.pro:
--------------------------------------------------------------------------------
1 | QT += core gui
2 | QT += multimedia
3 |
4 | RC_ICONS = tank.ico
5 |
6 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
7 |
8 | CONFIG += c++11
9 |
10 | # The following define makes your compiler emit warnings if you use
11 | # any Qt feature that has been marked deprecated (the exact warnings
12 | # depend on your compiler). Please consult the documentation of the
13 | # deprecated API in order to know how to port your code away from it.
14 | DEFINES += QT_DEPRECATED_WARNINGS
15 |
16 | # You can also make your code fail to compile if it uses deprecated APIs.
17 | # In order to do so, uncomment the following line.
18 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
19 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
20 |
21 | SOURCES += \
22 | bullet.cpp \
23 | config.cpp \
24 | enemy.cpp \
25 | main.cpp \
26 | player.cpp \
27 | tankbase.cpp \
28 | widget.cpp
29 |
30 | HEADERS += \
31 | bullet.h \
32 | config.h \
33 | enemy.h \
34 | player.h \
35 | tankbase.h \
36 | widget.h
37 |
38 | # Default rules for deployment.
39 | qnx: target.path = /tmp/$${TARGET}/bin
40 | else: unix:!android: target.path = /opt/$${TARGET}/bin
41 | !isEmpty(target.path): INSTALLS += target
42 |
43 | RESOURCES += \
44 | res.qrc
45 |
--------------------------------------------------------------------------------
/FC-tank.pro.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EnvironmentId
7 | {edc41924-7f29-487e-89c3-9b6a755ebd08}
8 |
9 |
10 | ProjectExplorer.Project.ActiveTarget
11 | 0
12 |
13 |
14 | ProjectExplorer.Project.EditorSettings
15 |
16 | true
17 | false
18 | true
19 |
20 | Cpp
21 |
22 | CppGlobal
23 |
24 |
25 |
26 | QmlJS
27 |
28 | QmlJSGlobal
29 |
30 |
31 | 2
32 | UTF-8
33 | false
34 | 4
35 | false
36 | 80
37 | true
38 | true
39 | 1
40 | true
41 | false
42 | 0
43 | true
44 | true
45 | 0
46 | 8
47 | true
48 | 1
49 | true
50 | true
51 | true
52 | false
53 |
54 |
55 |
56 | ProjectExplorer.Project.PluginSettings
57 |
58 |
59 | -fno-delayed-template-parsing
60 |
61 | true
62 |
63 |
64 |
65 | ProjectExplorer.Project.Target.0
66 |
67 | Desktop Qt 5.14.1 MinGW 64-bit
68 | Desktop Qt 5.14.1 MinGW 64-bit
69 | qt.qt5.5141.win64_mingw73_kit
70 | 1
71 | 0
72 | 0
73 |
74 | E:/Qt/build-FC-tank-Desktop_Qt_5_14_1_MinGW_64_bit-Debug
75 |
76 |
77 | true
78 | QtProjectManager.QMakeBuildStep
79 | true
80 |
81 | false
82 | false
83 | false
84 |
85 |
86 | true
87 | Qt4ProjectManager.MakeStep
88 |
89 | false
90 |
91 |
92 | false
93 |
94 | 2
95 | Build
96 | Build
97 | ProjectExplorer.BuildSteps.Build
98 |
99 |
100 |
101 | true
102 | Qt4ProjectManager.MakeStep
103 |
104 | true
105 | clean
106 |
107 | false
108 |
109 | 1
110 | Clean
111 | Clean
112 | ProjectExplorer.BuildSteps.Clean
113 |
114 | 2
115 | false
116 |
117 | Debug
118 | Qt4ProjectManager.Qt4BuildConfiguration
119 | 2
120 |
121 |
122 | E:/Qt/build-FC-tank-Desktop_Qt_5_14_1_MinGW_64_bit-Release
123 |
124 |
125 | true
126 | QtProjectManager.QMakeBuildStep
127 | false
128 |
129 | false
130 | false
131 | true
132 |
133 |
134 | true
135 | Qt4ProjectManager.MakeStep
136 |
137 | false
138 |
139 |
140 | false
141 |
142 | 2
143 | Build
144 | Build
145 | ProjectExplorer.BuildSteps.Build
146 |
147 |
148 |
149 | true
150 | Qt4ProjectManager.MakeStep
151 |
152 | true
153 | clean
154 |
155 | false
156 |
157 | 1
158 | Clean
159 | Clean
160 | ProjectExplorer.BuildSteps.Clean
161 |
162 | 2
163 | false
164 |
165 | Release
166 | Qt4ProjectManager.Qt4BuildConfiguration
167 | 0
168 |
169 |
170 | E:/Qt/build-FC-tank-Desktop_Qt_5_14_1_MinGW_64_bit-Profile
171 |
172 |
173 | true
174 | QtProjectManager.QMakeBuildStep
175 | true
176 |
177 | false
178 | true
179 | true
180 |
181 |
182 | true
183 | Qt4ProjectManager.MakeStep
184 |
185 | false
186 |
187 |
188 | false
189 |
190 | 2
191 | Build
192 | Build
193 | ProjectExplorer.BuildSteps.Build
194 |
195 |
196 |
197 | true
198 | Qt4ProjectManager.MakeStep
199 |
200 | true
201 | clean
202 |
203 | false
204 |
205 | 1
206 | Clean
207 | Clean
208 | ProjectExplorer.BuildSteps.Clean
209 |
210 | 2
211 | false
212 |
213 | Profile
214 | Qt4ProjectManager.Qt4BuildConfiguration
215 | 0
216 |
217 | 3
218 |
219 |
220 | 0
221 | Deploy
222 | Deploy
223 | ProjectExplorer.BuildSteps.Deploy
224 |
225 | 1
226 | ProjectExplorer.DefaultDeployConfiguration
227 |
228 | 1
229 |
230 |
231 | dwarf
232 |
233 | cpu-cycles
234 |
235 |
236 | 250
237 |
238 | -e
239 | cpu-cycles
240 | --call-graph
241 | dwarf,4096
242 | -F
243 | 250
244 |
245 | -F
246 | true
247 | 4096
248 | false
249 | false
250 | 1000
251 |
252 | true
253 |
254 | false
255 | false
256 | false
257 | false
258 | true
259 | 0.01
260 | 10
261 | true
262 | kcachegrind
263 | 1
264 | 25
265 |
266 | 1
267 | true
268 | false
269 | true
270 | valgrind
271 |
272 | 0
273 | 1
274 | 2
275 | 3
276 | 4
277 | 5
278 | 6
279 | 7
280 | 8
281 | 9
282 | 10
283 | 11
284 | 12
285 | 13
286 | 14
287 |
288 | 2
289 |
290 | Qt4ProjectManager.Qt4RunConfiguration:E:/Qt/FC-tank/FC-tank.pro
291 | E:/Qt/FC-tank/FC-tank.pro
292 |
293 | false
294 |
295 | false
296 | true
297 | true
298 | false
299 | false
300 | true
301 |
302 | E:/Qt/build-FC-tank-Desktop_Qt_5_14_1_MinGW_64_bit-Release
303 |
304 | 1
305 |
306 |
307 |
308 | ProjectExplorer.Project.TargetCount
309 | 1
310 |
311 |
312 | ProjectExplorer.Project.Updater.FileVersion
313 | 22
314 |
315 |
316 | Version
317 | 22
318 |
319 |
320 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## C++ 大作业
2 |
3 | 坦克大战小游戏
4 |
5 |
6 |
7 | ## 项目说明文档
8 |
9 | ### [坦克大战开发说明](./坦克大战.md)
10 |
11 |
12 |
13 | ## 地址
14 |
15 | github项目地址:https://github.com/zhouyumin/FC-tank
16 |
17 | 国内gitee项目地址:https://gitee.com/zym4732/FC-tank
18 |
19 | 可执行文件下载地址:https://github.com/zhouyumin/FC-tank/releases
20 |
21 | 可执行文件国内下载地址:https://gitee.com/zym4732/FC-tank/releases
22 |
23 |
24 |
25 | ## 游戏说明
26 |
27 | 不要放在中文路径下
28 |
29 | W S A D 控制方向
30 |
31 | J 发射子弹
--------------------------------------------------------------------------------
/UML.vsdx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/UML.vsdx
--------------------------------------------------------------------------------
/bullet.cpp:
--------------------------------------------------------------------------------
1 | #include "bullet.h"
2 | #include
3 | Bullet::Bullet()
4 | {
5 | w = 8;
6 | h = 12;
7 | speed = BASESIZE*2 / 3;
8 | active = false;
9 | bump = false;
10 | leftimg.load((rootdir+"\\pic\\bullet-0.gif").c_str());
11 | leftimg = resizePic(leftimg,h,w);
12 |
13 | upimg.load((rootdir+"\\pic\\bullet-1.gif").c_str());
14 | upimg = resizePic(upimg,w,h);
15 |
16 | rightimg.load((rootdir+"\\pic\\bullet-2.gif").c_str());
17 | rightimg = resizePic(rightimg,h,w);
18 |
19 | downimg.load((rootdir+"\\pic\\bullet-3.gif").c_str());
20 | downimg = resizePic(downimg,w,h);
21 |
22 | // bump1.load((rootdir+"\\pic\\bump1.gif").c_str());
23 | // bump1 = resizePic(bump1,BASESIZE,BASESIZE);
24 | // bump2.load((rootdir+"\\pic\\bump2.gif").c_str());
25 | // bump2 = resizePic(bump2,BASESIZE,BASESIZE);
26 | bump3.load((rootdir+"\\pic\\bump3.gif").c_str());
27 | bump3 = resizePic(bump3,BASESIZE,BASESIZE);
28 | rect.setRect(-1,-1,0,0);
29 | }
30 |
31 | Bullet::Bullet(const Bullet &other)
32 | {
33 | *this=other;
34 | }
35 |
36 | void Bullet::setActive(bool a)
37 | {
38 | active = a;
39 | if(active==false)
40 | {
41 | bump = true;
42 | //这里设置偏移量
43 | int x = rect.x();
44 | int y = rect.y();
45 | if(dir==direct::up||dir ==direct::down)
46 | {
47 | x-=(BASESIZE-w)/2;
48 | }
49 | else if(dir ==direct::left||dir == direct::right)
50 | {
51 | y-=(BASESIZE-w)/2;
52 | }
53 | bumpx = x;
54 | bumpy = y;
55 | rect.setRect(-1,-1,0,0);
56 | }
57 | }
58 |
59 | bool Bullet::getActive()
60 | {
61 | return active;
62 | }
63 |
64 | void Bullet::move()
65 | {
66 | if(getActive()==false)
67 | return;
68 | int x = rect.x();
69 | int y = rect.y();
70 | if(dir == direct::up)
71 | {
72 | y -= speed;
73 | }
74 | else if(dir == direct::down)
75 | {
76 | y += speed;
77 | }
78 | else if(dir == direct::left)
79 | {
80 | x -= speed;
81 | }
82 | else if(dir == direct::right)
83 | {
84 | x += speed;
85 | }
86 |
87 | //更新坐标
88 | if(canReachable(x, y,dir))
89 | {
90 | rect.moveTo(x,y);
91 | }
92 | else
93 | {
94 | setActive(false);
95 | }
96 | }
97 |
98 | void Bullet::setDir(direct dir)
99 | {
100 | this->dir=dir;
101 | }
102 |
103 | void Bullet::display(QPainter &paint)
104 | {
105 | if(!getActive())//未发射 return
106 | {
107 | return;
108 | }
109 | if(dir==direct::up)
110 | {
111 | paint.drawPixmap(rect.x(),rect.y(),upimg);
112 | }
113 | else if(dir==direct::down)
114 | {
115 | paint.drawPixmap(rect.x(),rect.y(),downimg);
116 | }
117 | else if(dir==direct::left)
118 | {
119 | paint.drawPixmap(rect.x(),rect.y(),leftimg);
120 | }
121 | else if(dir==direct::right)
122 | {
123 | paint.drawPixmap(rect.x(),rect.y(),rightimg);
124 | }
125 | }
126 |
127 | bool Bullet::canReachable(int x, int y, direct dir)
128 | {
129 | //转换map坐标
130 | x /= BASESIZE;
131 | y /= BASESIZE;
132 | int x1(0);
133 | int y1(0);
134 | if(dir==direct::up)
135 | {
136 | x1 = x + 1;
137 | y1 = y;
138 | }
139 | else if (dir==direct::down)
140 | {
141 | // y += 1;
142 | y1 = y;
143 | x1 = x + 1;
144 | }
145 | else if(dir==direct::left)
146 | {
147 | x1 = x;
148 | y1 = y+1;
149 | }
150 | else if(dir==direct::right)
151 | {
152 | // x += 1;
153 | x1 = x;
154 | y1 = y + 1;
155 | }
156 | //判断是否越界
157 | if(x<0 || x1<0 || x>25 || x1>25 || y<0 || y1<0 || y>25 || y1>25)
158 | {
159 | // qDebug()<<"子弹越界";
160 | return false;
161 | }
162 | //判断是否有障碍物
163 | else if((map[y][x]<='2'||map[y][x]=='4')&&(map[y1][x1]<='2'||map[y1][x1]=='4'))//注意行和列与x,y的关系
164 | {
165 | return true;
166 | }
167 | else
168 | {
169 | //打砖块
170 | if(map[y][x]=='3')
171 | {
172 | map[y][x]='0';
173 | }
174 | if(map[y1][x1]=='3')
175 | {
176 | map[y1][x1]='0';
177 | }
178 | if(map[y][x]=='5'||map[y1][x1]=='5')
179 | {
180 | QSound::play((rootdir+"sound\\bin.wav").c_str());
181 | }
182 | return false;
183 | }
184 | }
185 |
186 | Bullet &Bullet::operator=(const Bullet &other)
187 | {
188 | if(this==&other)return *this;
189 | speed=other.speed;
190 | active=other.active;
191 | bump = other.bump;
192 | bumpx = other.bumpx;
193 | bumpy = other.bumpy;
194 | w=other.w;
195 | h=other.h;
196 | dir=other.dir;
197 | upimg=other.upimg;
198 | downimg=other.downimg;
199 | leftimg=other.leftimg;
200 | rightimg=other.rightimg;
201 | // bump1=other.bump1;
202 | // bump2=other.bump2;
203 | bump3=other.bump3;
204 | rect=other.rect;
205 | return *this;
206 | }
207 |
208 | void Bullet::showExplosion(QPainter& paint)
209 | {
210 | // static int index=0;
211 | // if(index>=3)
212 | // {
213 | bump=false;
214 | // index=0;
215 | // }
216 | // if(index==0)
217 | // {
218 | // paint.drawPixmap(bumpx,bumpy,bump1);
219 | // }
220 | // else if(index==1)
221 | // {
222 | // paint.drawPixmap(bumpx,bumpy,bump2);
223 | // }
224 | // else if(index==2)
225 | // {
226 |
227 | // }
228 | paint.drawPixmap(bumpx,bumpy,bump3);
229 | // index++;
230 | }
231 |
232 | Bullet::~Bullet()
233 | {
234 |
235 | }
236 |
237 |
--------------------------------------------------------------------------------
/bullet.h:
--------------------------------------------------------------------------------
1 | #ifndef BULLET_H
2 | #define BULLET_H
3 | #include "config.h"
4 | #include
5 | #include
6 | #include
7 |
8 | class Bullet
9 | {
10 | private:
11 | int speed;
12 | bool active;
13 |
14 | public:
15 | bool bump;
16 | int bumpx;
17 | int bumpy;
18 | int w;
19 | int h;
20 | direct dir;
21 | QPixmap upimg;
22 | QPixmap downimg;
23 | QPixmap leftimg;
24 | QPixmap rightimg;
25 | // QPixmap bump1;
26 | // QPixmap bump2;
27 | QPixmap bump3;
28 | QRect rect;
29 | explicit Bullet();
30 | Bullet(const Bullet&);
31 | void setActive(bool);
32 | bool getActive();
33 | void move();
34 | void setDir(direct);
35 | void display(QPainter&);
36 | bool canReachable(int,int,direct);
37 | Bullet& operator=(const Bullet&);
38 | void showExplosion(QPainter&);
39 | ~Bullet();
40 | };
41 |
42 | #endif // BULLET_H
43 |
--------------------------------------------------------------------------------
/config.cpp:
--------------------------------------------------------------------------------
1 | #include "config.h"
2 | #include
3 |
4 | char map[26][27];
5 | const std::string rootdir=":\\res\\";
6 | //QPixmap resizePic(QPixmap&p,int size)
7 | //{
8 | // return p.scaled(size,size,Qt::AspectRatioMode::IgnoreAspectRatio,Qt::TransformationMode::SmoothTransformation);
9 | //}
10 |
--------------------------------------------------------------------------------
/config.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIG_H
2 | #define CONFIG_H
3 |
4 | #include
5 | extern char map[26][27];
6 | extern const std::string rootdir;
7 | //extern QPixmap resizePic(QPixmap&p,int size);
8 | enum direct{up,right,down,left};
9 | #define resizePic(p,w,h) p.scaled(w,h,Qt::AspectRatioMode::IgnoreAspectRatio,Qt::TransformationMode::SmoothTransformation)
10 | #define WIDTH 600
11 | #define HEIGHT 600
12 | #define BASESIZE 20
13 | #define SIZE 40
14 |
15 | #endif // CONFIG_H
16 |
--------------------------------------------------------------------------------
/enemy.cpp:
--------------------------------------------------------------------------------
1 | #include "enemy.h"
2 |
3 | Enemy::Enemy()
4 | {
5 | dir = down;
6 | speed = 20;
7 | rect.setRect(0*BASESIZE,0*BASESIZE,SIZE,SIZE);
8 |
9 | upimg1.load((rootdir+"\\pic\\gray-tank\\1-2-1.gif").c_str());
10 | upimg1 = resizePic(upimg1,SIZE,SIZE);
11 | upimg2.load((rootdir+"\\pic\\gray-tank\\1-2-2.gif").c_str());
12 | upimg2 = resizePic(upimg2,SIZE,SIZE);
13 |
14 | leftimg1.load((rootdir+"\\pic\\gray-tank\\1-1-1.gif").c_str());
15 | leftimg1 = resizePic(leftimg1,SIZE,SIZE);
16 | leftimg2.load((rootdir+"\\pic\\gray-tank\\1-1-2.gif").c_str());
17 | leftimg2 = resizePic(leftimg2,SIZE,SIZE);
18 |
19 | rightimg1.load((rootdir+"\\pic\\gray-tank\\1-3-1.gif").c_str());
20 | rightimg1 = resizePic(rightimg1,SIZE,SIZE);
21 | rightimg2.load((rootdir+"\\pic\\gray-tank\\1-3-2.gif").c_str());
22 | rightimg2 = resizePic(rightimg2,SIZE,SIZE);
23 |
24 | downimg1.load((rootdir+"\\pic\\gray-tank\\1-4-1.gif").c_str());
25 | downimg1 = resizePic(downimg1,SIZE,SIZE);
26 | downimg2.load((rootdir+"\\pic\\gray-tank\\1-4-2.gif").c_str());
27 | downimg2 = resizePic(downimg2,SIZE,SIZE);
28 |
29 | }
30 |
31 | bool Enemy::operator==(const Enemy &other)
32 | {
33 | if(this->rect==other.rect)//矩形框相等视为同一个对象
34 | return true;
35 | return false;
36 | }
37 |
38 | Enemy::~Enemy()
39 | {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/enemy.h:
--------------------------------------------------------------------------------
1 | #ifndef ENEMY_H
2 | #define ENEMY_H
3 | #include "tankbase.h"
4 | #include "config.h"
5 |
6 | class Enemy : public tankBase
7 | {
8 | public:
9 | Enemy();
10 | bool operator==(const Enemy& other);
11 | virtual ~Enemy();
12 | };
13 |
14 | #endif // ENEMY_H
15 |
--------------------------------------------------------------------------------
/images/ERROR.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/ERROR.jpg
--------------------------------------------------------------------------------
/images/UML.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/UML.jpg
--------------------------------------------------------------------------------
/images/bug.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/bug.jpg
--------------------------------------------------------------------------------
/images/crash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/crash.jpg
--------------------------------------------------------------------------------
/images/gameover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/gameover.jpg
--------------------------------------------------------------------------------
/images/map.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/map.jpg
--------------------------------------------------------------------------------
/images/process.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/process.jpg
--------------------------------------------------------------------------------
/images/restart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/restart.jpg
--------------------------------------------------------------------------------
/images/run.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/run.jpg
--------------------------------------------------------------------------------
/images/start.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/start.jpg
--------------------------------------------------------------------------------
/images/victory.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/victory.jpg
--------------------------------------------------------------------------------
/images/window.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/images/window.jpg
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include "widget.h"
2 |
3 | #include
4 | #include
5 |
6 | int main(int argc, char *argv[])
7 | {
8 | QApplication a(argc, argv);
9 | Widget w;
10 | w.show();
11 | return a.exec();
12 | // int e = a.exec();
13 | // if(e == RETCODE_RESTART)
14 | // {
15 | // // 传入 qApp->applicationFilePath(),启动自己
16 | // QProcess::startDetached(qApp->applicationFilePath(), QStringList());
17 | // return 0;
18 | // }
19 | // return e;
20 | }
21 |
--------------------------------------------------------------------------------
/player.cpp:
--------------------------------------------------------------------------------
1 | #include "player.h"
2 | #include
3 |
4 | player::player()
5 | {
6 | ismove = false;
7 | dir = up;
8 | speed = 20;
9 | upimg1.load((rootdir+"pic\\0Player\\m0-1-1.gif").c_str());
10 | upimg1 = resizePic(upimg1,SIZE,SIZE);
11 | upimg2.load((rootdir+"pic\\0Player\\m0-1-2.gif").c_str());
12 | upimg2 = resizePic(upimg2,SIZE,SIZE);
13 |
14 | leftimg1.load((rootdir+"pic\\0Player\\m0-0-1.gif").c_str());
15 | leftimg1 = resizePic(leftimg1,SIZE,SIZE);
16 | leftimg2.load((rootdir+"pic\\0Player\\m0-0-2.gif").c_str());
17 | leftimg2 = resizePic(leftimg2,SIZE,SIZE);
18 |
19 | rightimg1.load((rootdir+"pic\\0Player\\m0-2-1.gif").c_str());
20 | rightimg1 = resizePic(rightimg1,SIZE,SIZE);
21 | rightimg2.load((rootdir+"pic\\0Player\\m0-2-2.gif").c_str());
22 | rightimg2 = resizePic(rightimg2,SIZE,SIZE);
23 |
24 | downimg1.load((rootdir+"pic\\0Player\\m0-3-1.gif").c_str());
25 | downimg1 = resizePic(downimg1,SIZE,SIZE);
26 | downimg2.load((rootdir+"pic\\0Player\\m0-3-2.gif").c_str());
27 | downimg2 = resizePic(downimg2,SIZE,SIZE);
28 | }
29 |
30 | void player::setDir(direct dir)
31 | {
32 | this->dir = dir;
33 | ismove = true;
34 | }
35 |
--------------------------------------------------------------------------------
/player.h:
--------------------------------------------------------------------------------
1 | #ifndef PLAYER_H
2 | #define PLAYER_H
3 | #include "tankbase.h"
4 |
5 | class player : public tankBase
6 | {
7 | public:
8 | bool ismove;
9 | player();
10 | void setDir(direct) override;
11 | };
12 |
13 | #endif // PLAYER_H
14 |
--------------------------------------------------------------------------------
/process.vsdx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/process.vsdx
--------------------------------------------------------------------------------
/res.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | res/data/map.dat
4 | res/sound/bin.wav
5 | res/sound/enemy-bomb.wav
6 | res/sound/move.wav
7 | res/sound/shoot.wav
8 | res/pic/bg_gray.gif
9 | res/pic/bullet-0.gif
10 | res/pic/bump3.gif
11 | res/pic/camp0.gif
12 | res/pic/forest.gif
13 | res/pic/ice.gif
14 | res/pic/river-0.gif
15 | res/pic/stone.gif
16 | res/pic/wall.gif
17 | res/pic/gray-tank/1-1-1.gif
18 | res/pic/gray-tank/1-1-2.gif
19 | res/pic/gray-tank/1-2-1.gif
20 | res/pic/gray-tank/1-2-2.gif
21 | res/pic/gray-tank/1-3-1.gif
22 | res/pic/gray-tank/1-3-2.gif
23 | res/pic/gray-tank/1-4-1.gif
24 | res/pic/gray-tank/1-4-2.gif
25 | res/sound/start.wav
26 | res/pic/0Player/m0-0-1.gif
27 | res/pic/0Player/m0-0-2.gif
28 | res/pic/0Player/m0-1-1.gif
29 | res/pic/0Player/m0-1-2.gif
30 | res/pic/0Player/m0-2-1.gif
31 | res/pic/0Player/m0-2-2.gif
32 | res/pic/0Player/m0-3-1.gif
33 | res/pic/0Player/m0-3-2.gif
34 | res/pic/bullet-1.gif
35 | res/pic/bullet-2.gif
36 | res/pic/bullet-3.gif
37 | res/pic/icon.png
38 | res/sound/player_bomb.wav
39 | res/pic/camp1.gif
40 |
41 |
42 |
--------------------------------------------------------------------------------
/res/data/map.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/data/map.dat
--------------------------------------------------------------------------------
/res/pic/0Player/m0-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-0-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-0-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-1-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-1-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-2-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-2-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-3-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m0-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m0-3-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-0-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-0-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-1-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-1-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-2-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-2-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-3-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m1-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m1-3-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-0-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-0-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-1-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-1-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-2-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-2-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-3-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m2-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m2-3-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-0-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-0-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-1-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-1-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-2-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-2-2.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-3-1.gif
--------------------------------------------------------------------------------
/res/pic/0Player/m3-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/0Player/m3-3-2.gif
--------------------------------------------------------------------------------
/res/pic/100.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/100.gif
--------------------------------------------------------------------------------
/res/pic/1P.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1P.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-0-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-0-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-1-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-1-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-2-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-2-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-3-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m0-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m0-3-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-0-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-0-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-1-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-1-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-2-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-2-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-3-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m1-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m1-3-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-0-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-0-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-1-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-1-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-2-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-2-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-3-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m2-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m2-3-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-0-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-0-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-0-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-0-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-1-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-1-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-2-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-2-2.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-3-1.gif
--------------------------------------------------------------------------------
/res/pic/1Player/m3-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/1Player/m3-3-2.gif
--------------------------------------------------------------------------------
/res/pic/200.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/200.gif
--------------------------------------------------------------------------------
/res/pic/2P.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/2P.gif
--------------------------------------------------------------------------------
/res/pic/300.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/300.gif
--------------------------------------------------------------------------------
/res/pic/400.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/400.gif
--------------------------------------------------------------------------------
/res/pic/500.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/500.gif
--------------------------------------------------------------------------------
/res/pic/bg_black.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bg_black.gif
--------------------------------------------------------------------------------
/res/pic/bg_gray.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bg_gray.gif
--------------------------------------------------------------------------------
/res/pic/big-gameover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/big-gameover.gif
--------------------------------------------------------------------------------
/res/pic/black-number.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/black-number.gif
--------------------------------------------------------------------------------
/res/pic/blast/0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/blast/0.gif
--------------------------------------------------------------------------------
/res/pic/blast/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/blast/1.gif
--------------------------------------------------------------------------------
/res/pic/blast/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/blast/2.gif
--------------------------------------------------------------------------------
/res/pic/blast/3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/blast/3.gif
--------------------------------------------------------------------------------
/res/pic/blast/4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/blast/4.gif
--------------------------------------------------------------------------------
/res/pic/bullet-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bullet-0.gif
--------------------------------------------------------------------------------
/res/pic/bullet-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bullet-1.gif
--------------------------------------------------------------------------------
/res/pic/bullet-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bullet-2.gif
--------------------------------------------------------------------------------
/res/pic/bullet-3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bullet-3.gif
--------------------------------------------------------------------------------
/res/pic/bump1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bump1.gif
--------------------------------------------------------------------------------
/res/pic/bump2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bump2.gif
--------------------------------------------------------------------------------
/res/pic/bump3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/bump3.gif
--------------------------------------------------------------------------------
/res/pic/camp0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/camp0.gif
--------------------------------------------------------------------------------
/res/pic/camp1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/camp1.gif
--------------------------------------------------------------------------------
/res/pic/enemytank-ico.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/enemytank-ico.gif
--------------------------------------------------------------------------------
/res/pic/flag.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/flag.gif
--------------------------------------------------------------------------------
/res/pic/forest.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/forest.gif
--------------------------------------------------------------------------------
/res/pic/gameover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gameover.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-1-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-1-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-2-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-2-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-3-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-3-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-4-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/1-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/1-4-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-1-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-1-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-2-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-2-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-3-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-3-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-4-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/2-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/2-4-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-1-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-1-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-2-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-2-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-3-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-3-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-4-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/3-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/3-4-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-1-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-1-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-2-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-2-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-3-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-3-2.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-4-1.gif
--------------------------------------------------------------------------------
/res/pic/gray-tank/4-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/gray-tank/4-4-2.gif
--------------------------------------------------------------------------------
/res/pic/ice.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/ice.gif
--------------------------------------------------------------------------------
/res/pic/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/icon.png
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-1-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-1-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-2-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-2-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-3-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-3-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-4-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/g4-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/g4-4-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-1-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-1-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-2-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-2-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-3-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-3-2.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-4-1.gif
--------------------------------------------------------------------------------
/res/pic/other-tank/y4-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/other-tank/y4-4-2.gif
--------------------------------------------------------------------------------
/res/pic/playertank-ico.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/playertank-ico.gif
--------------------------------------------------------------------------------
/res/pic/prop/p0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p0.gif
--------------------------------------------------------------------------------
/res/pic/prop/p1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p1.gif
--------------------------------------------------------------------------------
/res/pic/prop/p2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p2.gif
--------------------------------------------------------------------------------
/res/pic/prop/p3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p3.gif
--------------------------------------------------------------------------------
/res/pic/prop/p4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p4.gif
--------------------------------------------------------------------------------
/res/pic/prop/p5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/prop/p5.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-1-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-1-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-2-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-2-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-3-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-3-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-4-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/1-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/1-4-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-1-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-1-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-2-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-2-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-3-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-3-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-4-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/2-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/2-4-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-1-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-1-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-2-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-2-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-3-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-3-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-4-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/3-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/3-4-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-1-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-1-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-1-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-1-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-2-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-2-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-2-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-2-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-3-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-3-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-3-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-3-2.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-4-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-4-1.gif
--------------------------------------------------------------------------------
/res/pic/red-tank/4-4-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/red-tank/4-4-2.gif
--------------------------------------------------------------------------------
/res/pic/ring0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/ring0.gif
--------------------------------------------------------------------------------
/res/pic/ring1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/ring1.gif
--------------------------------------------------------------------------------
/res/pic/river-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/river-0.gif
--------------------------------------------------------------------------------
/res/pic/river-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/river-1.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/background.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/background.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/bunds.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/bunds.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/player-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/player-0.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/player-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/player-1.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/pts-0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/pts-0.gif
--------------------------------------------------------------------------------
/res/pic/scorepanel/pts-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/scorepanel/pts-1.gif
--------------------------------------------------------------------------------
/res/pic/select_player.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/select_player.gif
--------------------------------------------------------------------------------
/res/pic/stage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/stage.gif
--------------------------------------------------------------------------------
/res/pic/star0.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/star0.gif
--------------------------------------------------------------------------------
/res/pic/star1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/star1.gif
--------------------------------------------------------------------------------
/res/pic/star2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/star2.gif
--------------------------------------------------------------------------------
/res/pic/star3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/star3.gif
--------------------------------------------------------------------------------
/res/pic/stone.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/stone.gif
--------------------------------------------------------------------------------
/res/pic/wall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/wall.gif
--------------------------------------------------------------------------------
/res/pic/white-number.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/white-number.gif
--------------------------------------------------------------------------------
/res/pic/yellow-number.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/pic/yellow-number.gif
--------------------------------------------------------------------------------
/res/sound/addlife.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/addlife.wav
--------------------------------------------------------------------------------
/res/sound/bin.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/bin.wav
--------------------------------------------------------------------------------
/res/sound/bk_sound.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/bk_sound.wav
--------------------------------------------------------------------------------
/res/sound/bouns1000.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/bouns1000.wav
--------------------------------------------------------------------------------
/res/sound/camp_bomb.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/camp_bomb.wav
--------------------------------------------------------------------------------
/res/sound/enemy-bomb.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/enemy-bomb.wav
--------------------------------------------------------------------------------
/res/sound/fail.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/fail.wav
--------------------------------------------------------------------------------
/res/sound/get-prop.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/get-prop.wav
--------------------------------------------------------------------------------
/res/sound/move.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/move.wav
--------------------------------------------------------------------------------
/res/sound/player_bomb.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/player_bomb.wav
--------------------------------------------------------------------------------
/res/sound/player_move.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/player_move.wav
--------------------------------------------------------------------------------
/res/sound/prop-out.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/prop-out.wav
--------------------------------------------------------------------------------
/res/sound/scorepanel_di.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/scorepanel_di.wav
--------------------------------------------------------------------------------
/res/sound/shoot.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/shoot.wav
--------------------------------------------------------------------------------
/res/sound/start.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/start.wav
--------------------------------------------------------------------------------
/res/sound/未知1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知1.wav
--------------------------------------------------------------------------------
/res/sound/未知2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知2.wav
--------------------------------------------------------------------------------
/res/sound/未知3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知3.wav
--------------------------------------------------------------------------------
/res/sound/未知5.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知5.wav
--------------------------------------------------------------------------------
/res/sound/未知6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知6.wav
--------------------------------------------------------------------------------
/res/sound/未知7.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/res/sound/未知7.wav
--------------------------------------------------------------------------------
/tank.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhouyumin/FC-tank/1fc32eaaabc5d355f38793799de5e79365e944fc/tank.ico
--------------------------------------------------------------------------------
/tankbase.cpp:
--------------------------------------------------------------------------------
1 | #include "tankbase.h"
2 | #include
3 |
4 | void tankBase::shot()
5 | {
6 | //子弹已经射出就 return
7 | if(bullet.getActive() == true)
8 | return;
9 |
10 | // bullet.bump=false;
11 | bullet.setActive(true);
12 | bullet.setDir(dir);
13 |
14 | int deviation = (SIZE-bullet.w)/2;//弹道与坦克边界的偏移量
15 |
16 | if(dir == direct::up)
17 | {
18 | bullet.rect.setRect(rect.x()+deviation,rect.y(),bullet.w,bullet.h);
19 | }
20 | else if(dir == direct::down)
21 | {
22 | bullet.rect.setRect(rect.x()+deviation,rect.bottom()-bullet.h,bullet.w,bullet.h);
23 | }
24 | else if(dir == direct::left)
25 | {
26 | bullet.rect.setRect(rect.left(),rect.y()+deviation,bullet.h,bullet.w);
27 | }
28 | else if(dir == direct::right)
29 | {
30 | bullet.rect.setRect(rect.right()-bullet.h,rect.y()+deviation,bullet.h,bullet.w);
31 | }
32 | // if(bullet.rect.x()==0||bullet.rect.y()==0||bullet.rect.x()>=13*SIZE||bullet.rect.y()>=13*SIZE)
33 | // {
34 | // bullet.busy=false;
35 | // }
36 | }
37 |
38 | void tankBase::move()
39 | {
40 | int x = rect.x();
41 | int y = rect.y();
42 | if(dir == direct::up)
43 | {
44 | y -= speed;
45 | }
46 | else if(dir == direct::down)
47 | {
48 | y += speed;
49 | }
50 | else if(dir == direct::left)
51 | {
52 | x -= speed;
53 | }
54 | else if(dir == direct::right)
55 | {
56 | x += speed;
57 | }
58 | if(canReachable(x,y,this->dir))
59 | {
60 | rect.moveTo(x,y);
61 | // qDebug()<<"move"<dir=dir;
68 | }
69 |
70 | void tankBase::display(QPainter &paint,bool state)
71 | {
72 | //state两个状态切换实现履带转动效果
73 | if(state)
74 | {
75 | if(dir==direct::up)
76 | {
77 | paint.drawPixmap(rect.x(),rect.y(),upimg1);
78 | }
79 | else if(dir==direct::down)
80 | {
81 |
82 | paint.drawPixmap(rect.x(),rect.y(),downimg1);
83 | }
84 | else if(dir==direct::left)
85 | {
86 | paint.drawPixmap(rect.x(),rect.y(),leftimg1);
87 | }
88 | else if(dir==direct::right)
89 | {
90 | paint.drawPixmap(rect.x(),rect.y(),rightimg1);
91 | }
92 | }
93 | else
94 | {
95 | if(dir==direct::up)
96 | {
97 | paint.drawPixmap(rect.x(),rect.y(),upimg2);
98 | }
99 | else if(dir==direct::down)
100 | {
101 | paint.drawPixmap(rect.x(),rect.y(),downimg2);
102 | }
103 | else if(dir==direct::left)
104 | {
105 | paint.drawPixmap(rect.x(),rect.y(),leftimg2);
106 | }
107 | else if(dir==direct::right)
108 | {
109 | paint.drawPixmap(rect.x(),rect.y(),rightimg2);
110 | }
111 | }
112 | }
113 |
114 | bool tankBase::canReachable(int x, int y,direct dir)
115 | {
116 | //转换map坐标
117 | x /= BASESIZE;
118 | y /= BASESIZE;
119 | int x1(0);
120 | int y1(0);
121 | if(dir==direct::up)
122 | {
123 | x1 = x + 1;
124 | y1 = y;
125 | }
126 | else if (dir==direct::down)
127 | {
128 | y += 1;
129 | y1 = y;
130 | x1 = x + 1;
131 | }
132 | else if(dir==direct::left)
133 | {
134 | x1 = x;
135 | y1 = y+1;
136 | }
137 | else if(dir==direct::right)
138 | {
139 | x += 1;
140 | x1 = x;
141 | y1 = y + 1;
142 | }
143 | //判断是否越界
144 | if(x<0 || x1<0 || x>25 || x1>25 || y<0 || y1<0 || y>25 || y1>25)
145 | {
146 | // qDebug()<<"越界"<
5 | #include
6 |
7 | class tankBase
8 | {
9 | public:
10 | QPixmap upimg1;
11 | QPixmap upimg2;
12 | QPixmap downimg1;
13 | QPixmap downimg2;
14 | QPixmap leftimg1;
15 | QPixmap leftimg2;
16 | QPixmap rightimg1;
17 | QPixmap rightimg2;
18 | int speed;
19 | QRect rect;
20 | direct dir;
21 | void shot();
22 | Bullet bullet;
23 | virtual void move();
24 | virtual void setDir(direct);
25 | virtual void display(QPainter&,bool);
26 | bool canReachable(int,int,direct);
27 | tankBase();
28 | tankBase& operator=(const tankBase&);
29 | tankBase(const tankBase&);
30 | ~tankBase();
31 | };
32 |
33 | #endif // TANKBASE_H
34 |
--------------------------------------------------------------------------------
/widget.cpp:
--------------------------------------------------------------------------------
1 | #include "widget.h"
2 | #include
3 | Widget::Widget(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | setAttribute(Qt::WA_DeleteOnClose);
7 |
8 | setFixedSize(WIDTH,HEIGHT);
9 | setWindowTitle("坦克大战");
10 | setWindowIcon(QIcon((rootdir+"pic//icon.png").c_str()));
11 | setStyleSheet("background-color:black;");
12 | campRect.setRect(12*BASESIZE,24*BASESIZE,SIZE,SIZE);
13 | //加载图像
14 | bg_gray.load((rootdir+"pic\\bg_gray.gif").c_str());
15 | bg_gray=resizePic(bg_gray,SIZE,SIZE);
16 | grass.load((rootdir+"pic\\forest.gif").c_str());
17 | grass = resizePic(grass,BASESIZE,BASESIZE);
18 | brick.load((rootdir+"pic\\wall.gif").c_str());
19 | brick = resizePic(brick,BASESIZE,BASESIZE);
20 | iron.load((rootdir+"pic\\stone.gif").c_str());
21 | iron = resizePic(iron,BASESIZE,BASESIZE);
22 | water.load((rootdir+"pic\\river-0.gif").c_str());
23 | water = resizePic(water,BASESIZE,BASESIZE);
24 | ice.load((rootdir+"pic\\ice.gif").c_str());
25 | ice = resizePic(ice,BASESIZE,BASESIZE);
26 |
27 | timer1 = new QTimer(this);
28 | timer2 = new QTimer(this);
29 | timer3 = new QTimer(this);
30 | timer4 = new QTimer(this);
31 | timer5 = new QTimer(this);
32 | connect(timer1,&QTimer::timeout,this,&Widget::play);
33 | connect(timer2,&QTimer::timeout,this,&Widget::enemyMove);
34 | connect(timer3,&QTimer::timeout,this,&Widget::enemyShot);
35 | connect(timer4,&QTimer::timeout,this,&Widget::bulletMove);
36 | connect(timer5,&QTimer::timeout,this,&Widget::refresh);
37 | gate=1;
38 | init();
39 | }
40 |
41 | Widget::~Widget()
42 | {
43 | delete timer1;
44 | delete timer2;
45 | delete timer3;
46 | delete timer4;
47 | delete timer5;
48 | }
49 |
50 | void Widget::keyPressEvent(QKeyEvent *event)
51 | {
52 | if(start>0)
53 | {
54 | return;
55 | }
56 | if(event->key()==Qt::Key::Key_W)
57 | {
58 | role1.setDir(direct::up);
59 | }
60 | else if(event->key()==Qt::Key::Key_S)
61 | {
62 | role1.setDir(direct::down);
63 | }
64 | else if(event->key()==Qt::Key::Key_A)
65 | {
66 | role1.setDir(direct::left);
67 | }
68 | else if(event->key()==Qt::Key::Key_D)
69 | {
70 | role1.setDir(direct::right);
71 | }
72 | else if(event->key()==Qt::Key::Key_J)
73 | {
74 | if(!role1.bullet.getActive())
75 | {
76 | role1.shot();
77 | QSound::play((rootdir+"\\sound\\shoot.wav").c_str());
78 | }
79 | }
80 |
81 | }
82 |
83 | void Widget::keyReleaseEvent(QKeyEvent *event)
84 | {
85 | if(event->key()==Qt::Key::Key_J)
86 | {
87 | return;
88 | }
89 | else
90 | {
91 | role1.ismove=false;
92 | }
93 | }
94 |
95 | void Widget::collisionCheck()
96 | {
97 | //玩家子弹和敌方子弹碰撞检测
98 | for(auto& enemy:enemies)
99 | {
100 | if(true==role1.bullet.rect.intersects(enemy.bullet.rect))
101 | {
102 | role1.bullet.setActive(false);
103 | enemy.bullet.setActive(false);
104 | break;
105 | }
106 | else if(true==campRect.intersects(enemy.bullet.rect)||true==campRect.intersects(role1.bullet.rect))
107 | {
108 | QSound::play((rootdir+"\\sound\\player_bomb.wav").c_str());
109 | camp.load((rootdir+"pic\\camp1.gif").c_str());
110 | camp = resizePic(camp,SIZE,SIZE);
111 | update();
112 | gameOver();
113 | }
114 | }
115 | //玩家子弹和敌方坦克碰撞检测
116 | for(auto enemy=enemies.begin();enemy!=enemies.end();enemy++)
117 | {
118 | if(true==role1.bullet.rect.intersects(enemy->rect))
119 | {
120 | QSound::play((rootdir+"\\sound\\enemy-bomb.wav").c_str());
121 | enemies.erase(enemy);//需要重载 == 操作符
122 | enemyNum--;
123 | if(enemyNum<=0)
124 | {
125 | return;
126 | }
127 | createEnemy();
128 | role1.bullet.setActive(false);
129 | break;
130 | }
131 | }
132 | //玩家和敌方子弹碰撞检测
133 | for(auto& enemy:enemies)
134 | {
135 | if(true==role1.rect.intersects(enemy.bullet.rect))
136 | {
137 | enemy.bullet.setActive(false);
138 | createPlayer();
139 | QSound::play((rootdir+"\\sound\\player_bomb.wav").c_str());
140 | life--;
141 | if(life<=0)
142 | {
143 | gameOver();
144 | }
145 | break;
146 | }
147 | }
148 | }
149 |
150 | void Widget::nextGate()
151 | {
152 | if(gate==35)
153 | {
154 | QMessageBox msg(QMessageBox::Icon(QMessageBox::Icon::Information),"Victory","恭喜你通过全部关卡");
155 | msg.exec();
156 | exit(1);
157 | }
158 | gate++;
159 | init();
160 | }
161 |
162 | void Widget::play()
163 | {
164 | //玩家移动
165 | if(role1.ismove)
166 | {
167 | role1.move();
168 | QSound::play((rootdir+"\\sound\\move.wav").c_str());
169 | }
170 | }
171 |
172 | void Widget::enemyMove()
173 | {
174 | //敌方坦克移动
175 | static int d;
176 | srand((unsigned)time(NULL));
177 | for (auto& enemy:enemies)//使用引用类型 ,不然不是同一个对象
178 | {
179 | //随机方向移动
180 | d = rand()%4;
181 | if(d==0)
182 | {
183 | enemy.setDir(direct::left);
184 | }
185 | else if(d == 1)
186 | {
187 | enemy.setDir(direct::up);
188 | }
189 | else if(d == 2)
190 | {
191 | enemy.setDir(direct::right);
192 | }
193 | else if(d == 3)
194 | {
195 | enemy.setDir(direct::down);
196 | }
197 | enemy.move();
198 | }
199 |
200 | }
201 |
202 | void Widget::enemyShot()
203 | {
204 | for(auto& enemy: enemies)
205 | {
206 | if(!enemy.bullet.getActive())
207 | {
208 | enemy.shot();
209 | }
210 | }
211 | }
212 |
213 | void Widget::bulletMove()
214 | {
215 | //玩家子弹移动
216 | if(role1.bullet.getActive())
217 | {
218 | role1.bullet.move();
219 | }
220 | //敌人子弹移动
221 | for(auto& enemy:enemies)
222 | {
223 | if(enemy.bullet.getActive())
224 | {
225 | enemy.bullet.move();
226 | }
227 | }
228 | }
229 |
230 | void Widget::refresh()
231 | {
232 | collisionCheck();
233 | if(enemyNum<=0)
234 | {
235 | nextGate();
236 | }
237 | update();
238 | }
239 |
240 | void Widget::init()
241 | {
242 | //加载地图
243 | loadMap();
244 |
245 | camp.load((rootdir+"pic\\camp0.gif").c_str());
246 | camp = resizePic(camp,SIZE,SIZE);
247 |
248 | QSound::play((rootdir+"sound\\start.wav").c_str());
249 | //创建敌人
250 | cursor=0;
251 | enemyNum = 20;
252 | for(int i=0;i<4;i++)
253 | {
254 | createEnemy();
255 | }
256 | //创建玩家
257 | createPlayer();
258 | life = 3;
259 | // 开始游戏
260 | start = 30;
261 | timer1->start(120);
262 | timer2->start(150);
263 | timer3->start(1000);
264 | timer4->start(60);
265 | timer5->start(33);
266 | }
267 |
268 | void Widget::createPlayer()
269 | {
270 | role1.bullet.setActive(false);
271 | role1.setDir(direct::up);
272 | role1.ismove=false;
273 | role1.rect.setRect(9*BASESIZE,24*BASESIZE,SIZE,SIZE);
274 | }
275 |
276 | void Widget::createEnemy()
277 | {
278 | if(enemyNum<4)
279 | return;
280 | Enemy enemy;
281 | enemy.rect.setRect(cursor*SIZE,0,SIZE,SIZE);
282 | enemies.push_back(enemy);
283 | cursor+=6;
284 | cursor%=18;
285 | }
286 |
287 | void Widget::loadMap()
288 | {
289 | std::ifstream file;
290 | try
291 | {
292 | file.open((QCoreApplication::applicationDirPath()+"\\res\\map.dat").toStdString().c_str(),std::ios::in|std::ios::binary);
293 | if(!file)
294 | {
295 | throw "无法加载地图,请确保可执行文件所在目录的res目录下有map.dat文件,并且该游戏不放在中文目录下";
296 | }
297 |
298 | }
299 | catch(const char *err)
300 | {
301 | QMessageBox msg(QMessageBox::Icon(QMessageBox::Icon::Critical),"ERROR",err);
302 | msg.exec();
303 | exit(-1);
304 |
305 | }
306 | file.seekg(sizeof(map)*(gate-1));
307 | file.read(*map,sizeof(map));
308 | file.close();
309 | }
310 |
311 | void Widget::drawMap()
312 | {
313 | for (int i=0;i<26;i++)
314 | {
315 | for(int j=0;j<26;j++)
316 | {
317 | if(map[i][j]=='3')
318 | {
319 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,brick);
320 | }
321 | else if(map[i][j]=='5')
322 | {
323 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,iron);
324 | }
325 | else if(map[i][j]=='1')
326 | {
327 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,grass);
328 | }
329 | else if(map[i][j]=='4')
330 | {
331 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,water);
332 | }
333 | else if(map[i][j]=='2')
334 | {
335 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,ice);
336 | }
337 | }
338 | }
339 | paint.drawPixmap(campRect.x(),campRect.y(),camp);
340 | }
341 |
342 | void Widget::drawFrame()
343 | {
344 | //画边框
345 | for(int i=0;i<15;i++)
346 | {
347 | paint.drawPixmap(0,i*SIZE,bg_gray);
348 | paint.drawPixmap(14*SIZE,i*SIZE,bg_gray);
349 | paint.drawPixmap(i*SIZE,0,bg_gray);
350 | paint.drawPixmap(i*SIZE,14*SIZE,bg_gray);
351 | }
352 | }
353 |
354 | void Widget::drawPanel()
355 | {
356 | paint.drawText(6*SIZE,BASESIZE,"第"+QString::number(gate)+"关,敌人数量:"+QString::number(enemyNum));
357 | paint.drawText(7*SIZE,29*BASESIZE,"生命"+QString::number(life));
358 | }
359 |
360 | void Widget::drawStart()
361 | {
362 | for(int i=0;i<15;i++)
363 | {
364 | for(int j=0;j<15;j++)
365 | {
366 | paint.drawPixmap(i*SIZE,j*SIZE,bg_gray);
367 | }
368 | }
369 | paint.setFont(QFont("宋体",24));
370 | paint.drawText(12*BASESIZE+10,13*BASESIZE+10,"第"+QString::number(gate)+"关");
371 | }
372 |
373 | void Widget::paintEvent(QPaintEvent *)
374 | {
375 | paint.begin(this);
376 |
377 | //画关卡过渡界面
378 | if(0stop();
429 | timer2->stop();
430 | timer3->stop();
431 | timer4->stop();
432 | timer5->stop();
433 | QMessageBox msg(QMessageBox::Icon::Question,"GameOver","游戏结束是否重新开始?",(QMessageBox::StandardButton::Ok|QMessageBox::StandardButton::Cancel));
434 | if(QMessageBox::Ok == msg.exec())
435 | {
436 | // qApp->exit(RETCODE_RESTART);
437 | // enemies.clear();//线程访问出错
438 | for(auto it=enemies.begin();it!=enemies.end();it++)
439 | enemies.erase(it);
440 | gate=1;
441 | init();
442 | }
443 | else
444 | {
445 | this->close();
446 | exit(0);
447 | }
448 | }
449 |
450 |
--------------------------------------------------------------------------------
/widget.h:
--------------------------------------------------------------------------------
1 | #ifndef WIDGET_H
2 | #define WIDGET_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include "config.h"
8 | #include
9 | #include
10 | #include "player.h"
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | //static const int RETCODE_RESTART = 773;
19 | class Widget : public QWidget
20 | {
21 | Q_OBJECT
22 | private:
23 | QPixmap grass;
24 | QPixmap brick;
25 | QPixmap water;
26 | QPixmap ice;
27 | QPixmap iron;
28 | QPixmap bg_gray;
29 | QPixmap camp;
30 | void init();
31 | void createPlayer();
32 | player role1;
33 | QRect campRect;
34 | QPainter paint;
35 | QTimer* timer1;
36 | QTimer* timer2;
37 | QTimer* timer3;
38 | QTimer* timer4;
39 | QTimer* timer5;
40 | int cursor;
41 | QList enemies;
42 | int enemyNum;
43 | int life;
44 | int gate;
45 | int start;
46 | void createEnemy();
47 | protected:
48 | void loadMap();
49 | void drawMap();
50 | void drawFrame();
51 | void drawPanel();
52 | void drawStart();
53 | void paintEvent(QPaintEvent *) override;
54 | void gameOver();
55 | public:
56 | Widget(QWidget *parent = nullptr);
57 | ~Widget();
58 | void keyPressEvent(QKeyEvent *) override;
59 | void keyReleaseEvent(QKeyEvent *event) override;
60 | void collisionCheck();
61 | void nextGate();
62 | public slots:
63 | void play();
64 | void enemyMove();
65 | void enemyShot();
66 | void bulletMove();
67 | void refresh();
68 | };
69 | #endif // WIDGET_H
70 |
--------------------------------------------------------------------------------
/坦克大战.md:
--------------------------------------------------------------------------------
1 | 坦克大战
2 |
3 |
4 |
5 | ## 一、环境
6 |
7 | - 语言:C++
8 |
9 | - 编译器:gcc version 7.3.0
10 |
11 | - 应用程序开发框架:Qt version 5.14.1
12 |
13 | - 集成开发环境:Qt Creator 4.11.0 (Community)
14 |
15 |
16 |
17 | ## 二、游戏总体介绍
18 |
19 | ### 1.设计规则
20 |
21 | 该游戏总共有35关,每关有20个敌方坦克,玩家每关3条命,因为是在个人电脑上玩所以仅实现了单人游戏
22 |
23 | 击败20个敌人自动进入下一关,通过35关游戏胜利,当生命数为0或大本营被击中游戏失败
24 |
25 | 玩家坦克由键盘W、S、A、D键控制移动方向,J键发射子弹,敌方坦克则自动控制
26 |
27 | ### 2.效果展示图
28 |
29 | 
30 |
31 |
32 |
33 | 
34 |
35 |
36 |
37 | 
38 |
39 |
40 |
41 | 
42 |
43 |
44 |
45 |
46 |
47 | ### 3.UML 类图
48 |
49 | 
50 |
51 |
52 |
53 |
54 |
55 | ### 4.运行流程图
56 |
57 | 
58 |
59 |
60 |
61 | ## 三、全局参数的设置
62 |
63 | ### 1.定义全局参数
64 |
65 | 我们的全局参数主要是枚举类型方向,地图数组,图像的单位尺寸,窗口长和宽
66 |
67 | 用一个config.h头文件来设置这些全局参数,并由其他类进行include
68 |
69 | ### 2.遇到的问题
70 |
71 | 按照上面的方式写好代码进行编译时发生了变量的重复定义报错(已经进行了宏定义防止头文件多次包含)
72 |
73 | 后来经过跟踪报错发现子弹类包含了一个map数组,而坦克类中也有map数组,两者分开是不会互相影响的,但把这两个对象放到Widget对象中就会发生冲突
74 |
75 | ### 3.解决方法
76 |
77 | 在config.h中指明变量为外部变量,把具体变量定义到config.cpp中
78 |
79 | 这样子弹类和坦克类所包含的同名变量都为同一个外部变量,且指向同一个地址
80 |
81 |
82 |
83 | ## 四、主要代码
84 |
85 | ### 1.初始化
86 |
87 | 游戏初始化时先加载资源文件,各定时器开始计时,创建玩家角色,和敌方坦克
88 |
89 | 我们规定地图上最多只能有四个敌方坦克,用enemyNum变量记录剩余敌人数量,用cursor来标记出生点的位置
90 |
91 | 用enemies列表来储存敌方坦克对象
92 |
93 | ```cpp
94 | void Widget::init()
95 | {
96 | //加载地图
97 | loadMap();
98 |
99 | camp.load((rootdir+"pic\\camp0.gif").c_str());
100 | camp = resizePic(camp,SIZE,SIZE);
101 |
102 | QSound::play((rootdir+"sound\\start.wav").c_str());
103 | //创建敌人
104 | cursor=0;
105 | enemyNum = 20;
106 | for(int i=0;i<4;i++)
107 | {
108 | createEnemy();
109 | }
110 | //创建玩家
111 | createPlayer();
112 | life = 3;
113 | // 开始游戏
114 | start = 30;
115 | timer1->start(120);
116 | timer2->start(150);
117 | timer3->start(1000);
118 | timer4->start(60);
119 | timer5->start(33);
120 | }
121 |
122 | void Widget::createPlayer()
123 | {
124 | role1.bullet.setActive(false);
125 | role1.setDir(direct::up);
126 | role1.ismove=false;
127 | role1.rect.setRect(9*BASESIZE,24*BASESIZE,SIZE,SIZE);
128 | }
129 |
130 | void Widget::createEnemy()
131 | {
132 | if(enemyNum<4)
133 | return;
134 | Enemy enemy;
135 | enemy.rect.setRect(cursor*SIZE,0,SIZE,SIZE);
136 | enemies.push_back(enemy);
137 | cursor+=6;
138 | cursor%=18;
139 | }
140 | ```
141 |
142 | ### 2.图像统一大小
143 |
144 | 使用Qt中QPixmap类的scaled函数来改变图像的尺寸
145 |
146 | ```cpp
147 | QPixmap QPixmap::scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation) const
148 | ```
149 |
150 |
151 |
152 | ### 3.地图设置
153 |
154 | 游戏界面分为26行26列由二维字符数组map保存地图内容,其设定如下所示
155 |
156 | | 数据内容 | 地图类型 |
157 | | :------: | :------: |
158 | | 0 | 空白 |
159 | | 1 | 草地 |
160 | | 2 | 冰块 |
161 | | 3 | 砖块 |
162 | | 4 | 海洋 |
163 | | 5 | 钢铁 |
164 |
165 | 游戏初始化时从map.dat文件中读取数据,根据map来绘制游戏界面的地形
166 |
167 | ``` cpp
168 | void Widget::loadMap()
169 | {
170 | std::ifstream file;
171 | try
172 | {
173 | file.open((QCoreApplication::applicationDirPath()+"\\res\\map.dat").toStdString().c_str(),std::ios::in|std::ios::binary);
174 | if(!file)
175 | {
176 | throw "无法加载地图,请确保可执行文件所在目录的res目录下有map.dat文件,并且该游戏不放在中文目录下";
177 | }
178 |
179 | }
180 | catch(const char *err)
181 | {
182 | QMessageBox msg(QMessageBox::Icon(QMessageBox::Icon::Critical),"ERROR",err);
183 | msg.exec();
184 | exit(-1);
185 |
186 | }
187 | file.seekg(sizeof(map)*(gate-1));
188 | file.read(*map,sizeof(map));
189 | file.close();
190 | }
191 |
192 | void Widget::drawMap()
193 | {
194 | for (int i=0;i<26;i++)
195 | {
196 | for(int j=0;j<26;j++)
197 | {
198 | if(map[i][j]=='3')
199 | {
200 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,brick);
201 | }
202 | else if(map[i][j]=='5')
203 | {
204 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,iron);
205 | }
206 | else if(map[i][j]=='1')
207 | {
208 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,grass);
209 | }
210 | else if(map[i][j]=='4')
211 | {
212 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,water);
213 | }
214 | else if(map[i][j]=='2')
215 | {
216 | paint.drawPixmap(j*BASESIZE,i*BASESIZE,ice);
217 | }
218 | }
219 | }
220 | paint.drawPixmap(campRect.x(),campRect.y(),camp);
221 | }
222 | ```
223 |
224 |
225 |
226 | 
227 |
228 |
229 |
230 | ### 3.窗口绘制
231 |
232 | Qt的QWidget类提供了绘制窗口的虚函数,我们直接重载就能实现窗口的绘制,当界面更新时自动调用该函数
233 |
234 | 界面更新函数:`update();`由定时器定时调用
235 |
236 | ```cpp
237 | void paintEvent(QPaintEvent *) override;
238 | ```
239 |
240 | 这里主要是在窗口内绘制图像,我们只要根据各对象的坐标、方向和对应的图像然后调用QPainter类的drawPixmap 成员函数来在指定位置绘制指定图像
241 |
242 | 具体实现如下
243 |
244 | ```cpp
245 | void Widget::paintEvent(QPaintEvent *)
246 | {
247 | paint.begin(this);
248 |
249 | //画关卡过渡界面
250 | if(025 || x1>25 || y<0 || y1<0 || y>25 || y1>25)
390 | {
391 | return false;
392 | }
393 | //判断是否有障碍物
394 | else if((map[y][x]<='2'||map[y][x]=='4')&&(map[y1][x1]<='2'||map[y1][x1]=='4'))//注意行和列与x,y的关系
395 | {
396 | return true;
397 | }
398 | else
399 | {
400 | //打砖块
401 | if(map[y][x]=='3')
402 | {
403 | map[y][x]='0';
404 | }
405 | if(map[y1][x1]=='3')
406 | {
407 | map[y1][x1]='0';
408 | }
409 | if(map[y][x]=='5'||map[y1][x1]=='5')
410 | {
411 | QSound::play((rootdir+"sound\\bin.wav").c_str());
412 | }
413 | return false;
414 | }
415 | }
416 |
417 | void tankBase::move()
418 | {
419 | int x = rect.x();
420 | int y = rect.y();
421 | if(dir == direct::up)
422 | {
423 | y -= speed;
424 | }
425 | else if(dir == direct::down)
426 | {
427 | y += speed;
428 | }
429 | else if(dir == direct::left)
430 | {
431 | x -= speed;
432 | }
433 | else if(dir == direct::right)
434 | {
435 | x += speed;
436 | }
437 | if(canReachable(x,y,this->dir))
438 | {
439 | rect.moveTo(x,y);
440 | }
441 | }
442 |
443 | bool tankBase::canReachable(int x, int y,direct dir)
444 | {
445 | //转换map坐标
446 | x /= BASESIZE;
447 | y /= BASESIZE;
448 | int x1(0);
449 | int y1(0);
450 | if(dir==direct::up)
451 | {
452 | x1 = x + 1;
453 | y1 = y;
454 | }
455 | else if (dir==direct::down)
456 | {
457 | y += 1;
458 | y1 = y;
459 | x1 = x + 1;
460 | }
461 | else if(dir==direct::left)
462 | {
463 | x1 = x;
464 | y1 = y+1;
465 | }
466 | else if(dir==direct::right)
467 | {
468 | x += 1;
469 | x1 = x;
470 | y1 = y + 1;
471 | }
472 | //判断是否越界
473 | if(x<0 || x1<0 || x>25 || x1>25 || y<0 || y1<0 || y>25 || y1>25)
474 | {
475 | return false;
476 | }
477 | // 判断是否有障碍物
478 | else if(map[y][x]<='2'&&map[y1][x1]<='2')//注意行和列与x,y的关系
479 | {
480 | return true;
481 | }
482 | else
483 | {
484 | return false;
485 | }
486 | }
487 | ```
488 |
489 | ### 7.碰撞检测
490 |
491 | 碰撞检测主要是用来检测 子弹和坦克、大本营之间是否发生碰撞用以刷新各对象的执行状态
492 |
493 | Qt的QRect类提供了现成的碰撞检测函数,下面这个函数用来判断两个矩形框是否相交
494 |
495 | ```cpp
496 | bool QRect::intersects(const QRect &rectangle) const
497 | ```
498 |
499 | 具体碰撞检测如下
500 |
501 | ```cpp
502 | void Widget::collisionCheck()
503 | {
504 | //玩家子弹和敌方子弹碰撞检测
505 | for(auto& enemy:enemies)
506 | {
507 | if(true==role1.bullet.rect.intersects(enemy.bullet.rect))
508 | {
509 | role1.bullet.setActive(false);
510 | enemy.bullet.setActive(false);
511 | break;
512 | }
513 | else if(true==campRect.intersects(enemy.bullet.rect)||true==campRect.intersects(role1.bullet.rect))
514 | {
515 | QSound::play((rootdir+"\\sound\\player_bomb.wav").c_str());
516 | camp.load((rootdir+"pic\\camp1.gif").c_str());
517 | camp = resizePic(camp,SIZE,SIZE);
518 | update();
519 | gameOver();
520 | }
521 | }
522 | //玩家子弹和敌方坦克碰撞检测
523 | for(auto enemy=enemies.begin();enemy!=enemies.end();enemy++)
524 | {
525 | if(true==role1.bullet.rect.intersects(enemy->rect))
526 | {
527 | QSound::play((rootdir+"\\sound\\enemy-bomb.wav").c_str());
528 | enemies.erase(enemy);//需要重载 == 操作符
529 | enemyNum--;
530 | if(enemyNum<=0)
531 | {
532 | return;
533 | }
534 | createEnemy();
535 | role1.bullet.setActive(false);
536 | break;
537 | }
538 | }
539 | //玩家和敌方子弹碰撞检测
540 | for(auto& enemy:enemies)
541 | {
542 | if(true==role1.rect.intersects(enemy.bullet.rect))
543 | {
544 | enemy.bullet.setActive(false);
545 | createPlayer();
546 | QSound::play((rootdir+"\\sound\\player_bomb.wav").c_str());
547 | life--;
548 | if(life<=0)
549 | {
550 | gameOver();
551 | }
552 | break;
553 | }
554 | }
555 | }
556 | ```
557 |
558 | ### 8.定时器的使用和事件绑定(重点)
559 |
560 | 坦克类和子弹类的移动、发射、显示等游戏逻辑已经写好了,那么怎么使它们执行呢?
561 |
562 | Qt提供了一个事件绑定函数connect,这个函数将不同的对象绑定到一起,实现互相调用(入门操作)
563 |
564 | 游戏运行过程中要定时刷新窗口,坦克的移动,子弹的发射都要自动完成,我们只需定义相关定时器来定时调用这些已经写好的功能就行
565 |
566 | ```cpp
567 | //定时器开始,单位毫秒
568 | timer1->start(120);
569 | timer2->start(150);
570 | timer3->start(1000);
571 | timer4->start(60);
572 | timer5->start(33);//实现30帧
573 |
574 | //绑定事件
575 | //只要定时器达到指定时间,就会调用一次绑定的函数
576 | connect(timer1,&QTimer::timeout,this,&Widget::play);
577 | connect(timer2,&QTimer::timeout,this,&Widget::enemyMove);
578 | connect(timer3,&QTimer::timeout,this,&Widget::enemyShot);
579 | connect(timer4,&QTimer::timeout,this,&Widget::bulletMove);
580 | connect(timer5,&QTimer::timeout,this,&Widget::refresh);
581 |
582 | //定时关闭
583 | timer1->stop();
584 | timer2->stop();
585 | timer3->stop();
586 | timer4->stop();
587 | timer5->stop();
588 | ```
589 |
590 | ## 五、需要注意的点
591 |
592 | 在函数调用或执行的过程中可能需要进行对象的拷贝或复制,所以得重载坦克和子弹类的拷贝构造函数和复值构造函数
593 |
594 | ## 六、遇到的问题
595 |
596 | ### 1.段错误
597 |
598 | 在游戏失败时如果选择重新开始游戏会发生段错误导致程序异常结束
599 |
600 | 段错误表示该程序(方法、函数)访问的内存超出了系统给这个程序所设定的内存空间
601 |
602 | 常见的有(栈溢出、野指针、访问非法内存地址)等
603 |
604 |
605 |
606 | 
607 |
608 |
609 |
610 | ### 2.尝试解决
611 |
612 | **(1)使程序自动重启达到重新开始游戏的目的**
613 |
614 | 用Qt自带的函数`qApp->exit()`使程序退出消息循环,然后根据返回值来判断是否重启
615 |
616 | 利用`QProcess::startDetached(qApp->applicationFilePath(), QStringList());`来使该程序自动启动重新进入消息循环
617 |
618 | ``` cpp
619 | static const int RETCODE_RESTART = 555;
620 |
621 | qApp->exit(RETCODE_RESTART);//退出消息循环,返回码为RETCODE_RESTART
622 |
623 | int e = a.exec();
624 | if(e == RETCODE_RESTART)//如果返回码为重启
625 | {
626 | // 传入 qApp->applicationFilePath(),启动自己
627 | QProcess::startDetached(qApp->applicationFilePath(), QStringList());
628 | return 0;
629 | }
630 | return e;
631 | ```
632 |
633 | 没有什么比重启更简单粗暴了,但重启的话会发生游戏退出再重新打开的过程,显得不是很自然
634 |
635 | 所以最终采用第二种方法
636 |
637 |
638 |
639 | **(2)修改代码解决bug**
640 |
641 | 调试的过程中发现线程冲突是发生在对enemies列表的访问过程中的
642 |
643 | 段错误是发生在对enemies列表的访问过程中的
644 |
645 | 
646 |
647 |
648 |
649 | 之所以发生线程冲突好像是使用QList的clear函数造成的(连猜带测)
650 |
651 | 所以将清空列表的功能改为使用迭代器一个一个进行erase实现,这样好像就没有冲突了
652 |
653 | ```cpp
654 | //enemies.clear();//线程访问出错
655 | for(auto it=enemies.begin();it!=enemies.end();it++)
656 | enemies.erase(it);
657 | ```
658 |
659 | ## 七、心得
660 |
661 | 写程序一定要做好准备工作,切忌直接动手写代码(写代码往往是经过充足准备后才开始的)
662 |
663 | 要明确目标,制定可行方案,构思好程序设计的关键步骤
664 |
665 | 可从以下两个方面着手
666 |
667 | ### 1.定义程序的目标
668 |
669 | 在动手写程序之前,要在脑中有清晰的思路。想要程序去做什么
670 |
671 | (1) 首先自己要明确自己想做什么
672 |
673 | (2) 思考你的程序需要哪些信息,你能通过哪些方法获取到哪些信息
674 |
675 | (3) 要进行哪些计算和控制
676 |
677 | (4) 以及程序应该要报告什么信息。在这一步骤中,不涉及具体的计算机语言,应该用一般术语来描述问题。
678 |
679 | ### 2.设计程序
680 |
681 | 对程序应该完成什么任务有概念性的认识后,就应该考虑如何用程序来完成它
682 |
683 | (1) 用户界面应该是怎样的?
684 |
685 | (2) 如何组织程序?
686 |
687 | (3) 目标用户是谁?
688 |
689 | (4) 准备花多长时间来完成这个程序?
690 |
691 | (5) 还要决定在程序(还可能是辅助文件)中如何表示数据
692 |
693 | (6) 以及用什么方法处理数据,通常,选择一个合适的方式表示信息可以更容易地设计程序和处理数据
694 |
695 | ## 八、敌方坦克的自动行动策略(AI)
696 |
697 | 可以使用BFS(广度优先搜索)算法给敌方坦克安排进攻路线(可能提升游戏难度,我的代码没做实现,只是使用简单的随机生成方向移动)
698 |
699 |
--------------------------------------------------------------------------------