Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1288 lines
36 KiB

  1. #include <windows.h>
  2. #include "gl.h"
  3. #include "math.h"
  4. #include "atlantis.h"
  5. static float N001[3] = {0.000000 ,1.000000 ,0.000000};
  6. static float N002[3] = {0.000077 ,-0.020611 ,0.999788};
  7. static float N003[3] = {0.961425 ,0.258729 ,-0.093390};
  8. static float N004[3] = {0.510811 ,-0.769633 ,-0.383063};
  9. static float N005[3] = {0.400123 ,0.855734 ,-0.328055};
  10. static float N006[3] = {-0.770715 ,0.610204 ,-0.183440};
  11. static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316};
  12. static float N008[3] = {-0.972788 ,0.208921 ,-0.100179};
  13. static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383};
  14. static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589};
  15. static float N011[3] = {0.591434 ,-0.768401 ,-0.244471};
  16. static float N012[3] = {0.935152 ,-0.328495 ,-0.132598};
  17. static float N013[3] = {0.997102 ,0.074243 ,-0.016593};
  18. static float N014[3] = {0.969995 ,0.241712 ,-0.026186};
  19. static float N015[3] = {0.844539 ,0.502628 ,-0.184714};
  20. static float N016[3] = {-0.906608 ,0.386308 ,-0.169787};
  21. static float N017[3] = {-0.970016 ,0.241698 ,-0.025516};
  22. static float N018[3] = {-0.998652 ,0.050493 ,-0.012045};
  23. static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556};
  24. static float N020[3] = {-0.660944 ,-0.750276 ,0.015480};
  25. static float N021[3] = {0.503549 ,-0.862908 ,-0.042749};
  26. static float N022[3] = {0.953202 ,-0.302092 ,-0.012089};
  27. static float N023[3] = {0.998738 ,0.023574 ,0.044344};
  28. static float N024[3] = {0.979297 ,0.193272 ,0.060202};
  29. static float N025[3] = {0.798300 ,0.464885 ,0.382883};
  30. static float N026[3] = {-0.756590 ,0.452403 ,0.472126};
  31. static float N027[3] = {-0.953855 ,0.293003 ,0.065651};
  32. static float N028[3] = {-0.998033 ,0.040292 ,0.048028};
  33. static float N029[3] = {-0.977079 ,-0.204288 ,0.059858};
  34. static float N030[3] = {-0.729117 ,-0.675304 ,0.111140};
  35. static float N031[3] = {0.598361 ,-0.792753 ,0.116221};
  36. static float N032[3] = {0.965192 ,-0.252991 ,0.066332};
  37. static float N033[3] = {0.998201 ,-0.002790 ,0.059892};
  38. static float N034[3] = {0.978657 ,0.193135 ,0.070207};
  39. static float N035[3] = {0.718815 ,0.680392 ,0.142733};
  40. static float N036[3] = {-0.383096 ,0.906212 ,0.178936};
  41. static float N037[3] = {-0.952831 ,0.292590 ,0.080647};
  42. static float N038[3] = {-0.997680 ,0.032417 ,0.059861};
  43. static float N039[3] = {-0.982629 ,-0.169881 ,0.074700};
  44. static float N040[3] = {-0.695424 ,-0.703466 ,0.146700};
  45. static float N041[3] = {0.359323 ,-0.915531 ,0.180805};
  46. static float N042[3] = {0.943356 ,-0.319387 ,0.089842};
  47. static float N043[3] = {0.998272 ,-0.032435 ,0.048993};
  48. static float N044[3] = {0.978997 ,0.193205 ,0.065084};
  49. static float N045[3] = {0.872144 ,0.470094 ,-0.135565};
  50. static float N046[3] = {-0.664282 ,0.737945 ,-0.119027};
  51. static float N047[3] = {-0.954508 ,0.288570 ,0.075107};
  52. static float N048[3] = {-0.998273 ,0.032406 ,0.048993};
  53. static float N049[3] = {-0.979908 ,-0.193579 ,0.048038};
  54. static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938};
  55. static float N051[3] = {0.643545 ,-0.763887 ,-0.048237};
  56. static float N052[3] = {0.955580 ,-0.288954 ,0.058068};
  57. static float N053[3] = {0.000000 ,1.000000 ,0.000000};
  58. static float N054[3] = {0.000000 ,1.000000 ,0.000000};
  59. static float N055[3] = {0.000000 ,1.000000 ,0.000000};
  60. static float N056[3] = {0.000000 ,1.000000 ,0.000000};
  61. static float N057[3] = {0.000000 ,1.000000 ,0.000000};
  62. static float N058[3] = {0.000050 ,0.793007 ,-0.609213};
  63. static float N059[3] = {0.913510 ,0.235418 ,-0.331779};
  64. static float N060[3] = {-0.807970 ,0.495000 ,-0.319625};
  65. static float N061[3] = {0.000000 ,0.784687 ,-0.619892};
  66. static float N062[3] = {0.000000 ,-1.000000 ,0.000000};
  67. static float N063[3] = {0.000000 ,1.000000 ,0.000000};
  68. static float N064[3] = {0.000000 ,1.000000 ,0.000000};
  69. static float N065[3] = {0.000000 ,1.000000 ,0.000000};
  70. static float N066[3] = {-0.055784 ,0.257059 ,0.964784};
  71. static float N067[3] = {0.000000 ,1.000000 ,0.000000};
  72. static float N068[3] = {0.000000 ,1.000000 ,0.000000};
  73. static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127};
  74. static float N070[3] = {0.000000 ,1.000000 ,0.000000};
  75. static float N071[3] = {-0.987102 ,0.131723 ,-0.090984};
  76. static float N072[3] = {-0.987102 ,0.131723 ,-0.090984};
  77. static float N073[3] = {-0.987102 ,0.131723 ,-0.090984};
  78. static float N074[3] = {0.000000 ,1.000000 ,0.000000};
  79. static float N075[3] = {0.000000 ,1.000000 ,0.000000};
  80. static float N076[3] = {0.000000 ,1.000000 ,0.000000};
  81. static float N077[3] = {0.995210 ,0.071962 ,-0.066168};
  82. static float N078[3] = {0.995210 ,0.071962 ,-0.066168};
  83. static float N079[3] = {0.995210 ,0.071962 ,-0.066168};
  84. static float N080[3] = {0.000000 ,1.000000 ,0.000000};
  85. static float N081[3] = {0.000000 ,1.000000 ,0.000000};
  86. static float N082[3] = {0.000000 ,1.000000 ,0.000000};
  87. static float P001[3] = {0.00, 0.00, 0.00};
  88. static float P002[3] = {0.00, -36.59, 5687.72};
  89. static float P003[3] = {90.00, 114.73, 724.38};
  90. static float P004[3] = {58.24, -146.84, 262.35};
  91. static float P005[3] = {27.81, 231.52, 510.43};
  92. static float P006[3] = {-27.81, 230.43, 509.76};
  93. static float P007[3] = {-46.09, -146.83, 265.84};
  94. static float P008[3] = {-90.00, 103.84, 718.53};
  95. static float P009[3] = {-131.10, -165.92, 834.85};
  96. static float P010[3] = {-27.81, -285.31, 500.00};
  97. static float P011[3] = {27.81, -285.32, 500.00};
  98. static float P012[3] = {147.96, -170.89, 845.50};
  99. static float P013[3] = {180.00, 0.00, 2000.00};
  100. static float P014[3] = {145.62, 352.67, 2000.00};
  101. static float P015[3] = {55.62, 570.63, 2000.00};
  102. static float P016[3] = {-55.62, 570.64, 2000.00};
  103. static float P017[3] = {-145.62, 352.68, 2000.00};
  104. static float P018[3] = {-180.00, 0.01, 2000.00};
  105. static float P019[3] = {-178.20, -352.66, 2001.61};
  106. static float P020[3] = {-55.63, -570.63, 2000.00};
  107. static float P021[3] = {55.62, -570.64, 2000.00};
  108. static float P022[3] = {179.91, -352.69, 1998.39};
  109. static float P023[3] = {150.00, 0.00, 3000.00};
  110. static float P024[3] = {121.35, 293.89, 3000.00};
  111. static float P025[3] = {46.35, 502.93, 2883.09};
  112. static float P026[3] = {-46.35, 497.45, 2877.24};
  113. static float P027[3] = {-121.35, 293.90, 3000.00};
  114. static float P028[3] = {-150.00, 0.00, 3000.00};
  115. static float P029[3] = {-152.21, -304.84, 2858.68};
  116. static float P030[3] = {-46.36, -475.52, 3000.00};
  117. static float P031[3] = {46.35, -475.53, 3000.00};
  118. static float P032[3] = {155.64, -304.87, 2863.50};
  119. static float P033[3] = {90.00, 0.00, 4000.00};
  120. static float P034[3] = {72.81, 176.33, 4000.00};
  121. static float P035[3] = {27.81, 285.32, 4000.00};
  122. static float P036[3] = {-27.81, 285.32, 4000.00};
  123. static float P037[3] = {-72.81, 176.34, 4000.00};
  124. static float P038[3] = {-90.00, 0.00, 4000.00};
  125. static float P039[3] = {-72.81, -176.33, 4000.00};
  126. static float P040[3] = {-27.81, -285.31, 4000.00};
  127. static float P041[3] = {27.81, -285.32, 4000.00};
  128. static float P042[3] = {72.81, -176.34, 4000.00};
  129. static float P043[3] = {30.00, 0.00, 5000.00};
  130. static float P044[3] = {24.27, 58.78, 5000.00};
  131. static float P045[3] = {9.27, 95.11, 5000.00};
  132. static float P046[3] = {-9.27, 95.11, 5000.00};
  133. static float P047[3] = {-24.27, 58.78, 5000.00};
  134. static float P048[3] = {-30.00, 0.00, 5000.00};
  135. static float P049[3] = {-24.27, -58.78, 5000.00};
  136. static float P050[3] = {-9.27, -95.10, 5000.00};
  137. static float P051[3] = {9.27, -95.11, 5000.00};
  138. static float P052[3] = {24.27, -58.78, 5000.00};
  139. static float P053[3] = {0.00, 0.00, 0.00};
  140. static float P054[3] = {0.00, 0.00, 0.00};
  141. static float P055[3] = {0.00, 0.00, 0.00};
  142. static float P056[3] = {0.00, 0.00, 0.00};
  143. static float P057[3] = {0.00, 0.00, 0.00};
  144. static float P058[3] = {0.00, 1212.72, 2703.08};
  145. static float P059[3] = {50.36, 0.00, 108.14};
  146. static float P060[3] = {-22.18, 0.00, 108.14};
  147. static float P061[3] = {0.00, 1181.61, 6344.65};
  148. static float P062[3] = {516.45, -887.08, 2535.45};
  149. static float P063[3] = {-545.69, -879.31, 2555.63};
  150. static float P064[3] = {618.89, -1005.64, 2988.32};
  151. static float P065[3] = {-635.37, -1014.79, 2938.68};
  152. static float P066[3] = {0.00, 1374.43, 3064.18};
  153. static float P067[3] = {158.49, -11.89, 1401.56};
  154. static float P068[3] = {-132.08, -17.90, 1394.31};
  155. static float P069[3] = {0.00, -418.25, 5765.04};
  156. static float P070[3] = {0.00, 1266.91, 6629.60};
  157. static float P071[3] = {-139.12, -124.96, 997.98};
  158. static float P072[3] = {-139.24, -110.18, 1020.68};
  159. static float P073[3] = {-137.33, -94.52, 1022.63};
  160. static float P074[3] = {-137.03, -79.91, 996.89};
  161. static float P075[3] = {-135.21, -91.48, 969.14};
  162. static float P076[3] = {-135.39, -110.87, 968.76};
  163. static float P077[3] = {150.23, -78.44, 995.53};
  164. static float P078[3] = {152.79, -92.76, 1018.46};
  165. static float P079[3] = {154.19, -110.20, 1020.55};
  166. static float P080[3] = {151.33, -124.15, 993.77};
  167. static float P081[3] = {150.49, -111.19, 969.86};
  168. static float P082[3] = {150.79, -92.41, 969.70};
  169. static float iP002[3] = {0.00, -36.59, 5687.72};
  170. static float iP004[3] = {58.24, -146.84, 262.35};
  171. static float iP007[3] = {-46.09, -146.83, 265.84};
  172. static float iP010[3] = {-27.81, -285.31, 500.00};
  173. static float iP011[3] = {27.81, -285.32, 500.00};
  174. static float iP023[3] = {150.00, 0.00, 3000.00};
  175. static float iP024[3] = {121.35, 293.89, 3000.00};
  176. static float iP025[3] = {46.35, 502.93, 2883.09};
  177. static float iP026[3] = {-46.35, 497.45, 2877.24};
  178. static float iP027[3] = {-121.35, 293.90, 3000.00};
  179. static float iP028[3] = {-150.00, 0.00, 3000.00};
  180. static float iP029[3] = {-121.35, -304.84, 2853.86};
  181. static float iP030[3] = {-46.36, -475.52, 3000.00};
  182. static float iP031[3] = {46.35, -475.53, 3000.00};
  183. static float iP032[3] = {121.35, -304.87, 2853.86};
  184. static float iP033[3] = {90.00, 0.00, 4000.00};
  185. static float iP034[3] = {72.81, 176.33, 4000.00};
  186. static float iP035[3] = {27.81, 285.32, 4000.00};
  187. static float iP036[3] = {-27.81, 285.32, 4000.00};
  188. static float iP037[3] = {-72.81, 176.34, 4000.00};
  189. static float iP038[3] = {-90.00, 0.00, 4000.00};
  190. static float iP039[3] = {-72.81, -176.33, 4000.00};
  191. static float iP040[3] = {-27.81, -285.31, 4000.00};
  192. static float iP041[3] = {27.81, -285.32, 4000.00};
  193. static float iP042[3] = {72.81, -176.34, 4000.00};
  194. static float iP043[3] = {30.00, 0.00, 5000.00};
  195. static float iP044[3] = {24.27, 58.78, 5000.00};
  196. static float iP045[3] = {9.27, 95.11, 5000.00};
  197. static float iP046[3] = {-9.27, 95.11, 5000.00};
  198. static float iP047[3] = {-24.27, 58.78, 5000.00};
  199. static float iP048[3] = {-30.00, 0.00, 5000.00};
  200. static float iP049[3] = {-24.27, -58.78, 5000.00};
  201. static float iP050[3] = {-9.27, -95.10, 5000.00};
  202. static float iP051[3] = {9.27, -95.11, 5000.00};
  203. static float iP052[3] = {24.27, -58.78, 5000.00};
  204. static float iP053[3] = {0.00, 0.00, 0.00};
  205. static float iP061[3] = {0.00, 1181.61, 6344.65};
  206. static float iP069[3] = {0.00, -418.25, 5765.04};
  207. static float iP070[3] = {0.00, 1266.91, 6629.60};
  208. void Fish001(void)
  209. {
  210. glBegin(GL_POLYGON);
  211. glNormal3fv(N005);
  212. glVertex3fv(P005);
  213. glNormal3fv(N059);
  214. glVertex3fv(P059);
  215. glNormal3fv(N060);
  216. glVertex3fv(P060);
  217. glNormal3fv(N006);
  218. glVertex3fv(P006);
  219. glEnd();
  220. glBegin(GL_POLYGON);
  221. glNormal3fv(N015);
  222. glVertex3fv(P015);
  223. glNormal3fv(N005);
  224. glVertex3fv(P005);
  225. glNormal3fv(N006);
  226. glVertex3fv(P006);
  227. glNormal3fv(N016);
  228. glVertex3fv(P016);
  229. glEnd();
  230. glBegin(GL_POLYGON);
  231. glNormal3fv(N006);
  232. glVertex3fv(P006);
  233. glNormal3fv(N060);
  234. glVertex3fv(P060);
  235. glNormal3fv(N008);
  236. glVertex3fv(P008);
  237. glEnd();
  238. glBegin(GL_POLYGON);
  239. glNormal3fv(N016);
  240. glVertex3fv(P016);
  241. glNormal3fv(N006);
  242. glVertex3fv(P006);
  243. glNormal3fv(N008);
  244. glVertex3fv(P008);
  245. glEnd();
  246. glBegin(GL_POLYGON);
  247. glNormal3fv(N016);
  248. glVertex3fv(P016);
  249. glNormal3fv(N008);
  250. glVertex3fv(P008);
  251. glNormal3fv(N017);
  252. glVertex3fv(P017);
  253. glEnd();
  254. glBegin(GL_POLYGON);
  255. glNormal3fv(N017);
  256. glVertex3fv(P017);
  257. glNormal3fv(N008);
  258. glVertex3fv(P008);
  259. glNormal3fv(N018);
  260. glVertex3fv(P018);
  261. glEnd();
  262. glBegin(GL_POLYGON);
  263. glNormal3fv(N008);
  264. glVertex3fv(P008);
  265. glNormal3fv(N009);
  266. glVertex3fv(P009);
  267. glNormal3fv(N018);
  268. glVertex3fv(P018);
  269. glEnd();
  270. glBegin(GL_POLYGON);
  271. glNormal3fv(N008);
  272. glVertex3fv(P008);
  273. glNormal3fv(N060);
  274. glVertex3fv(P060);
  275. glNormal3fv(N009);
  276. glVertex3fv(P009);
  277. glEnd();
  278. glBegin(GL_POLYGON);
  279. glNormal3fv(N007);
  280. glVertex3fv(P007);
  281. glNormal3fv(N010);
  282. glVertex3fv(P010);
  283. glNormal3fv(N009);
  284. glVertex3fv(P009);
  285. glEnd();
  286. glBegin(GL_POLYGON);
  287. glNormal3fv(N009);
  288. glVertex3fv(P009);
  289. glNormal3fv(N019);
  290. glVertex3fv(P019);
  291. glNormal3fv(N018);
  292. glVertex3fv(P018);
  293. glEnd();
  294. glBegin(GL_POLYGON);
  295. glNormal3fv(N009);
  296. glVertex3fv(P009);
  297. glNormal3fv(N010);
  298. glVertex3fv(P010);
  299. glNormal3fv(N019);
  300. glVertex3fv(P019);
  301. glEnd();
  302. glBegin(GL_POLYGON);
  303. glNormal3fv(N010);
  304. glVertex3fv(P010);
  305. glNormal3fv(N020);
  306. glVertex3fv(P020);
  307. glNormal3fv(N019);
  308. glVertex3fv(P019);
  309. glEnd();
  310. glBegin(GL_POLYGON);
  311. glNormal3fv(N010);
  312. glVertex3fv(P010);
  313. glNormal3fv(N011);
  314. glVertex3fv(P011);
  315. glNormal3fv(N021);
  316. glVertex3fv(P021);
  317. glNormal3fv(N020);
  318. glVertex3fv(P020);
  319. glEnd();
  320. glBegin(GL_POLYGON);
  321. glNormal3fv(N004);
  322. glVertex3fv(P004);
  323. glNormal3fv(N011);
  324. glVertex3fv(P011);
  325. glNormal3fv(N010);
  326. glVertex3fv(P010);
  327. glNormal3fv(N007);
  328. glVertex3fv(P007);
  329. glEnd();
  330. glBegin(GL_POLYGON);
  331. glNormal3fv(N004);
  332. glVertex3fv(P004);
  333. glNormal3fv(N012);
  334. glVertex3fv(P012);
  335. glNormal3fv(N011);
  336. glVertex3fv(P011);
  337. glEnd();
  338. glBegin(GL_POLYGON);
  339. glNormal3fv(N012);
  340. glVertex3fv(P012);
  341. glNormal3fv(N022);
  342. glVertex3fv(P022);
  343. glNormal3fv(N011);
  344. glVertex3fv(P011);
  345. glEnd();
  346. glBegin(GL_POLYGON);
  347. glNormal3fv(N011);
  348. glVertex3fv(P011);
  349. glNormal3fv(N022);
  350. glVertex3fv(P022);
  351. glNormal3fv(N021);
  352. glVertex3fv(P021);
  353. glEnd();
  354. glBegin(GL_POLYGON);
  355. glNormal3fv(N059);
  356. glVertex3fv(P059);
  357. glNormal3fv(N005);
  358. glVertex3fv(P005);
  359. glNormal3fv(N015);
  360. glVertex3fv(P015);
  361. glEnd();
  362. glBegin(GL_POLYGON);
  363. glNormal3fv(N015);
  364. glVertex3fv(P015);
  365. glNormal3fv(N014);
  366. glVertex3fv(P014);
  367. glNormal3fv(N003);
  368. glVertex3fv(P003);
  369. glEnd();
  370. glBegin(GL_POLYGON);
  371. glNormal3fv(N015);
  372. glVertex3fv(P015);
  373. glNormal3fv(N003);
  374. glVertex3fv(P003);
  375. glNormal3fv(N059);
  376. glVertex3fv(P059);
  377. glEnd();
  378. glBegin(GL_POLYGON);
  379. glNormal3fv(N014);
  380. glVertex3fv(P014);
  381. glNormal3fv(N013);
  382. glVertex3fv(P013);
  383. glNormal3fv(N003);
  384. glVertex3fv(P003);
  385. glEnd();
  386. glBegin(GL_POLYGON);
  387. glNormal3fv(N003);
  388. glVertex3fv(P003);
  389. glNormal3fv(N012);
  390. glVertex3fv(P012);
  391. glNormal3fv(N059);
  392. glVertex3fv(P059);
  393. glEnd();
  394. glBegin(GL_POLYGON);
  395. glNormal3fv(N013);
  396. glVertex3fv(P013);
  397. glNormal3fv(N012);
  398. glVertex3fv(P012);
  399. glNormal3fv(N003);
  400. glVertex3fv(P003);
  401. glEnd();
  402. glBegin(GL_POLYGON);
  403. glNormal3fv(N013);
  404. glVertex3fv(P013);
  405. glNormal3fv(N022);
  406. glVertex3fv(P022);
  407. glNormal3fv(N012);
  408. glVertex3fv(P012);
  409. glEnd();
  410. glBegin(GL_POLYGON);
  411. glVertex3fv(P071);
  412. glVertex3fv(P072);
  413. glVertex3fv(P073);
  414. glVertex3fv(P074);
  415. glVertex3fv(P075);
  416. glVertex3fv(P076);
  417. glEnd();
  418. glBegin(GL_POLYGON);
  419. glVertex3fv(P077);
  420. glVertex3fv(P078);
  421. glVertex3fv(P079);
  422. glVertex3fv(P080);
  423. glVertex3fv(P081);
  424. glVertex3fv(P082);
  425. glEnd();
  426. }
  427. void Fish002(void)
  428. {
  429. glBegin(GL_POLYGON);
  430. glNormal3fv(N013);
  431. glVertex3fv(P013);
  432. glNormal3fv(N014);
  433. glVertex3fv(P014);
  434. glNormal3fv(N024);
  435. glVertex3fv(P024);
  436. glNormal3fv(N023);
  437. glVertex3fv(P023);
  438. glEnd();
  439. glBegin(GL_POLYGON);
  440. glNormal3fv(N014);
  441. glVertex3fv(P014);
  442. glNormal3fv(N015);
  443. glVertex3fv(P015);
  444. glNormal3fv(N025);
  445. glVertex3fv(P025);
  446. glNormal3fv(N024);
  447. glVertex3fv(P024);
  448. glEnd();
  449. glBegin(GL_POLYGON);
  450. glNormal3fv(N016);
  451. glVertex3fv(P016);
  452. glNormal3fv(N017);
  453. glVertex3fv(P017);
  454. glNormal3fv(N027);
  455. glVertex3fv(P027);
  456. glNormal3fv(N026);
  457. glVertex3fv(P026);
  458. glEnd();
  459. glBegin(GL_POLYGON);
  460. glNormal3fv(N017);
  461. glVertex3fv(P017);
  462. glNormal3fv(N018);
  463. glVertex3fv(P018);
  464. glNormal3fv(N028);
  465. glVertex3fv(P028);
  466. glNormal3fv(N027);
  467. glVertex3fv(P027);
  468. glEnd();
  469. glBegin(GL_POLYGON);
  470. glNormal3fv(N020);
  471. glVertex3fv(P020);
  472. glNormal3fv(N021);
  473. glVertex3fv(P021);
  474. glNormal3fv(N031);
  475. glVertex3fv(P031);
  476. glNormal3fv(N030);
  477. glVertex3fv(P030);
  478. glEnd();
  479. glBegin(GL_POLYGON);
  480. glNormal3fv(N013);
  481. glVertex3fv(P013);
  482. glNormal3fv(N023);
  483. glVertex3fv(P023);
  484. glNormal3fv(N022);
  485. glVertex3fv(P022);
  486. glEnd();
  487. glBegin(GL_POLYGON);
  488. glNormal3fv(N022);
  489. glVertex3fv(P022);
  490. glNormal3fv(N023);
  491. glVertex3fv(P023);
  492. glNormal3fv(N032);
  493. glVertex3fv(P032);
  494. glEnd();
  495. glBegin(GL_POLYGON);
  496. glNormal3fv(N022);
  497. glVertex3fv(P022);
  498. glNormal3fv(N032);
  499. glVertex3fv(P032);
  500. glNormal3fv(N031);
  501. glVertex3fv(P031);
  502. glEnd();
  503. glBegin(GL_POLYGON);
  504. glNormal3fv(N022);
  505. glVertex3fv(P022);
  506. glNormal3fv(N031);
  507. glVertex3fv(P031);
  508. glNormal3fv(N021);
  509. glVertex3fv(P021);
  510. glEnd();
  511. glBegin(GL_POLYGON);
  512. glNormal3fv(N018);
  513. glVertex3fv(P018);
  514. glNormal3fv(N019);
  515. glVertex3fv(P019);
  516. glNormal3fv(N029);
  517. glVertex3fv(P029);
  518. glEnd();
  519. glBegin(GL_POLYGON);
  520. glNormal3fv(N018);
  521. glVertex3fv(P018);
  522. glNormal3fv(N029);
  523. glVertex3fv(P029);
  524. glNormal3fv(N028);
  525. glVertex3fv(P028);
  526. glEnd();
  527. glBegin(GL_POLYGON);
  528. glNormal3fv(N019);
  529. glVertex3fv(P019);
  530. glNormal3fv(N020);
  531. glVertex3fv(P020);
  532. glNormal3fv(N030);
  533. glVertex3fv(P030);
  534. glEnd();
  535. glBegin(GL_POLYGON);
  536. glNormal3fv(N019);
  537. glVertex3fv(P019);
  538. glNormal3fv(N030);
  539. glVertex3fv(P030);
  540. glNormal3fv(N029);
  541. glVertex3fv(P029);
  542. glEnd();
  543. }
  544. void Fish003(void)
  545. {
  546. glBegin(GL_POLYGON);
  547. glNormal3fv(N032);
  548. glVertex3fv(P032);
  549. glNormal3fv(N023);
  550. glVertex3fv(P023);
  551. glNormal3fv(N033);
  552. glVertex3fv(P033);
  553. glNormal3fv(N042);
  554. glVertex3fv(P042);
  555. glEnd();
  556. glBegin(GL_POLYGON);
  557. glNormal3fv(N031);
  558. glVertex3fv(P031);
  559. glNormal3fv(N032);
  560. glVertex3fv(P032);
  561. glNormal3fv(N042);
  562. glVertex3fv(P042);
  563. glNormal3fv(N041);
  564. glVertex3fv(P041);
  565. glEnd();
  566. glBegin(GL_POLYGON);
  567. glNormal3fv(N023);
  568. glVertex3fv(P023);
  569. glNormal3fv(N024);
  570. glVertex3fv(P024);
  571. glNormal3fv(N034);
  572. glVertex3fv(P034);
  573. glNormal3fv(N033);
  574. glVertex3fv(P033);
  575. glEnd();
  576. glBegin(GL_POLYGON);
  577. glNormal3fv(N024);
  578. glVertex3fv(P024);
  579. glNormal3fv(N025);
  580. glVertex3fv(P025);
  581. glNormal3fv(N035);
  582. glVertex3fv(P035);
  583. glNormal3fv(N034);
  584. glVertex3fv(P034);
  585. glEnd();
  586. glBegin(GL_POLYGON);
  587. glNormal3fv(N030);
  588. glVertex3fv(P030);
  589. glNormal3fv(N031);
  590. glVertex3fv(P031);
  591. glNormal3fv(N041);
  592. glVertex3fv(P041);
  593. glNormal3fv(N040);
  594. glVertex3fv(P040);
  595. glEnd();
  596. glBegin(GL_POLYGON);
  597. glNormal3fv(N025);
  598. glVertex3fv(P025);
  599. glNormal3fv(N026);
  600. glVertex3fv(P026);
  601. glNormal3fv(N036);
  602. glVertex3fv(P036);
  603. glNormal3fv(N035);
  604. glVertex3fv(P035);
  605. glEnd();
  606. glBegin(GL_POLYGON);
  607. glNormal3fv(N026);
  608. glVertex3fv(P026);
  609. glNormal3fv(N027);
  610. glVertex3fv(P027);
  611. glNormal3fv(N037);
  612. glVertex3fv(P037);
  613. glNormal3fv(N036);
  614. glVertex3fv(P036);
  615. glEnd();
  616. glBegin(GL_POLYGON);
  617. glNormal3fv(N027);
  618. glVertex3fv(P027);
  619. glNormal3fv(N028);
  620. glVertex3fv(P028);
  621. glNormal3fv(N038);
  622. glVertex3fv(P038);
  623. glNormal3fv(N037);
  624. glVertex3fv(P037);
  625. glEnd();
  626. glBegin(GL_POLYGON);
  627. glNormal3fv(N028);
  628. glVertex3fv(P028);
  629. glNormal3fv(N029);
  630. glVertex3fv(P029);
  631. glNormal3fv(N039);
  632. glVertex3fv(P039);
  633. glNormal3fv(N038);
  634. glVertex3fv(P038);
  635. glEnd();
  636. glBegin(GL_POLYGON);
  637. glNormal3fv(N029);
  638. glVertex3fv(P029);
  639. glNormal3fv(N030);
  640. glVertex3fv(P030);
  641. glNormal3fv(N040);
  642. glVertex3fv(P040);
  643. glNormal3fv(N039);
  644. glVertex3fv(P039);
  645. glEnd();
  646. }
  647. void Fish004(void)
  648. {
  649. glBegin(GL_POLYGON);
  650. glNormal3fv(N040);
  651. glVertex3fv(P040);
  652. glNormal3fv(N041);
  653. glVertex3fv(P041);
  654. glNormal3fv(N051);
  655. glVertex3fv(P051);
  656. glNormal3fv(N050);
  657. glVertex3fv(P050);
  658. glEnd();
  659. glBegin(GL_POLYGON);
  660. glNormal3fv(N041);
  661. glVertex3fv(P041);
  662. glNormal3fv(N042);
  663. glVertex3fv(P042);
  664. glNormal3fv(N052);
  665. glVertex3fv(P052);
  666. glNormal3fv(N051);
  667. glVertex3fv(P051);
  668. glEnd();
  669. glBegin(GL_POLYGON);
  670. glNormal3fv(N042);
  671. glVertex3fv(P042);
  672. glNormal3fv(N033);
  673. glVertex3fv(P033);
  674. glNormal3fv(N043);
  675. glVertex3fv(P043);
  676. glNormal3fv(N052);
  677. glVertex3fv(P052);
  678. glEnd();
  679. glBegin(GL_POLYGON);
  680. glNormal3fv(N033);
  681. glVertex3fv(P033);
  682. glNormal3fv(N034);
  683. glVertex3fv(P034);
  684. glNormal3fv(N044);
  685. glVertex3fv(P044);
  686. glNormal3fv(N043);
  687. glVertex3fv(P043);
  688. glEnd();
  689. glBegin(GL_POLYGON);
  690. glNormal3fv(N034);
  691. glVertex3fv(P034);
  692. glNormal3fv(N035);
  693. glVertex3fv(P035);
  694. glNormal3fv(N045);
  695. glVertex3fv(P045);
  696. glNormal3fv(N044);
  697. glVertex3fv(P044);
  698. glEnd();
  699. glBegin(GL_POLYGON);
  700. glNormal3fv(N035);
  701. glVertex3fv(P035);
  702. glNormal3fv(N036);
  703. glVertex3fv(P036);
  704. glNormal3fv(N046);
  705. glVertex3fv(P046);
  706. glNormal3fv(N045);
  707. glVertex3fv(P045);
  708. glEnd();
  709. glBegin(GL_POLYGON);
  710. glNormal3fv(N036);
  711. glVertex3fv(P036);
  712. glNormal3fv(N037);
  713. glVertex3fv(P037);
  714. glNormal3fv(N047);
  715. glVertex3fv(P047);
  716. glNormal3fv(N046);
  717. glVertex3fv(P046);
  718. glEnd();
  719. glBegin(GL_POLYGON);
  720. glNormal3fv(N037);
  721. glVertex3fv(P037);
  722. glNormal3fv(N038);
  723. glVertex3fv(P038);
  724. glNormal3fv(N048);
  725. glVertex3fv(P048);
  726. glNormal3fv(N047);
  727. glVertex3fv(P047);
  728. glEnd();
  729. glBegin(GL_POLYGON);
  730. glNormal3fv(N038);
  731. glVertex3fv(P038);
  732. glNormal3fv(N039);
  733. glVertex3fv(P039);
  734. glNormal3fv(N049);
  735. glVertex3fv(P049);
  736. glNormal3fv(N048);
  737. glVertex3fv(P048);
  738. glEnd();
  739. glBegin(GL_POLYGON);
  740. glNormal3fv(N039);
  741. glVertex3fv(P039);
  742. glNormal3fv(N040);
  743. glVertex3fv(P040);
  744. glNormal3fv(N050);
  745. glVertex3fv(P050);
  746. glNormal3fv(N049);
  747. glVertex3fv(P049);
  748. glEnd();
  749. glBegin(GL_POLYGON);
  750. glNormal3fv(N070);
  751. glVertex3fv(P070);
  752. glNormal3fv(N061);
  753. glVertex3fv(P061);
  754. glNormal3fv(N002);
  755. glVertex3fv(P002);
  756. glEnd();
  757. glBegin(GL_POLYGON);
  758. glNormal3fv(N061);
  759. glVertex3fv(P061);
  760. glNormal3fv(N046);
  761. glVertex3fv(P046);
  762. glNormal3fv(N002);
  763. glVertex3fv(P002);
  764. glEnd();
  765. glBegin(GL_POLYGON);
  766. glNormal3fv(N045);
  767. glVertex3fv(P045);
  768. glNormal3fv(N046);
  769. glVertex3fv(P046);
  770. glNormal3fv(N061);
  771. glVertex3fv(P061);
  772. glEnd();
  773. glBegin(GL_POLYGON);
  774. glNormal3fv(N002);
  775. glVertex3fv(P002);
  776. glNormal3fv(N061);
  777. glVertex3fv(P061);
  778. glNormal3fv(N070);
  779. glVertex3fv(P070);
  780. glEnd();
  781. glBegin(GL_POLYGON);
  782. glNormal3fv(N002);
  783. glVertex3fv(P002);
  784. glNormal3fv(N045);
  785. glVertex3fv(P045);
  786. glNormal3fv(N061);
  787. glVertex3fv(P061);
  788. glEnd();
  789. }
  790. void Fish005(void)
  791. {
  792. glBegin(GL_POLYGON);
  793. glNormal3fv(N002);
  794. glVertex3fv(P002);
  795. glNormal3fv(N044);
  796. glVertex3fv(P044);
  797. glNormal3fv(N045);
  798. glVertex3fv(P045);
  799. glEnd();
  800. glBegin(GL_POLYGON);
  801. glNormal3fv(N002);
  802. glVertex3fv(P002);
  803. glNormal3fv(N043);
  804. glVertex3fv(P043);
  805. glNormal3fv(N044);
  806. glVertex3fv(P044);
  807. glEnd();
  808. glBegin(GL_POLYGON);
  809. glNormal3fv(N002);
  810. glVertex3fv(P002);
  811. glNormal3fv(N052);
  812. glVertex3fv(P052);
  813. glNormal3fv(N043);
  814. glVertex3fv(P043);
  815. glEnd();
  816. glBegin(GL_POLYGON);
  817. glNormal3fv(N002);
  818. glVertex3fv(P002);
  819. glNormal3fv(N051);
  820. glVertex3fv(P051);
  821. glNormal3fv(N052);
  822. glVertex3fv(P052);
  823. glEnd();
  824. glBegin(GL_POLYGON);
  825. glNormal3fv(N002);
  826. glVertex3fv(P002);
  827. glNormal3fv(N046);
  828. glVertex3fv(P046);
  829. glNormal3fv(N047);
  830. glVertex3fv(P047);
  831. glEnd();
  832. glBegin(GL_POLYGON);
  833. glNormal3fv(N002);
  834. glVertex3fv(P002);
  835. glNormal3fv(N047);
  836. glVertex3fv(P047);
  837. glNormal3fv(N048);
  838. glVertex3fv(P048);
  839. glEnd();
  840. glBegin(GL_POLYGON);
  841. glNormal3fv(N002);
  842. glVertex3fv(P002);
  843. glNormal3fv(N048);
  844. glVertex3fv(P048);
  845. glNormal3fv(N049);
  846. glVertex3fv(P049);
  847. glEnd();
  848. glBegin(GL_POLYGON);
  849. glNormal3fv(N002);
  850. glVertex3fv(P002);
  851. glNormal3fv(N049);
  852. glVertex3fv(P049);
  853. glNormal3fv(N050);
  854. glVertex3fv(P050);
  855. glEnd();
  856. glBegin(GL_POLYGON);
  857. glNormal3fv(N050);
  858. glVertex3fv(P050);
  859. glNormal3fv(N051);
  860. glVertex3fv(P051);
  861. glNormal3fv(N069);
  862. glVertex3fv(P069);
  863. glEnd();
  864. glBegin(GL_POLYGON);
  865. glNormal3fv(N051);
  866. glVertex3fv(P051);
  867. glNormal3fv(N002);
  868. glVertex3fv(P002);
  869. glNormal3fv(N069);
  870. glVertex3fv(P069);
  871. glEnd();
  872. glBegin(GL_POLYGON);
  873. glNormal3fv(N050);
  874. glVertex3fv(P050);
  875. glNormal3fv(N069);
  876. glVertex3fv(P069);
  877. glNormal3fv(N002);
  878. glVertex3fv(P002);
  879. glEnd();
  880. }
  881. void Fish006(void)
  882. {
  883. glBegin(GL_POLYGON);
  884. glNormal3fv(N066);
  885. glVertex3fv(P066);
  886. glNormal3fv(N016);
  887. glVertex3fv(P016);
  888. glNormal3fv(N026);
  889. glVertex3fv(P026);
  890. glEnd();
  891. glBegin(GL_POLYGON);
  892. glNormal3fv(N015);
  893. glVertex3fv(P015);
  894. glNormal3fv(N066);
  895. glVertex3fv(P066);
  896. glNormal3fv(N025);
  897. glVertex3fv(P025);
  898. glEnd();
  899. glBegin(GL_POLYGON);
  900. glNormal3fv(N025);
  901. glVertex3fv(P025);
  902. glNormal3fv(N066);
  903. glVertex3fv(P066);
  904. glNormal3fv(N026);
  905. glVertex3fv(P026);
  906. glEnd();
  907. glBegin(GL_POLYGON);
  908. glNormal3fv(N066);
  909. glVertex3fv(P066);
  910. glNormal3fv(N058);
  911. glVertex3fv(P058);
  912. glNormal3fv(N016);
  913. glVertex3fv(P016);
  914. glEnd();
  915. glBegin(GL_POLYGON);
  916. glNormal3fv(N015);
  917. glVertex3fv(P015);
  918. glNormal3fv(N058);
  919. glVertex3fv(P058);
  920. glNormal3fv(N066);
  921. glVertex3fv(P066);
  922. glEnd();
  923. glBegin(GL_POLYGON);
  924. glNormal3fv(N058);
  925. glVertex3fv(P058);
  926. glNormal3fv(N015);
  927. glVertex3fv(P015);
  928. glNormal3fv(N016);
  929. glVertex3fv(P016);
  930. glEnd();
  931. }
  932. void Fish007(void)
  933. {
  934. glBegin(GL_POLYGON);
  935. glNormal3fv(N062);
  936. glVertex3fv(P062);
  937. glNormal3fv(N022);
  938. glVertex3fv(P022);
  939. glNormal3fv(N032);
  940. glVertex3fv(P032);
  941. glEnd();
  942. glBegin(GL_POLYGON);
  943. glNormal3fv(N062);
  944. glVertex3fv(P062);
  945. glNormal3fv(N032);
  946. glVertex3fv(P032);
  947. glNormal3fv(N064);
  948. glVertex3fv(P064);
  949. glEnd();
  950. glBegin(GL_POLYGON);
  951. glNormal3fv(N022);
  952. glVertex3fv(P022);
  953. glNormal3fv(N062);
  954. glVertex3fv(P062);
  955. glNormal3fv(N032);
  956. glVertex3fv(P032);
  957. glEnd();
  958. glBegin(GL_POLYGON);
  959. glNormal3fv(N062);
  960. glVertex3fv(P062);
  961. glNormal3fv(N064);
  962. glVertex3fv(P064);
  963. glNormal3fv(N032);
  964. glVertex3fv(P032);
  965. glEnd();
  966. }
  967. void Fish008(void)
  968. {
  969. glBegin(GL_POLYGON);
  970. glNormal3fv(N063);
  971. glVertex3fv(P063);
  972. glNormal3fv(N019);
  973. glVertex3fv(P019);
  974. glNormal3fv(N029);
  975. glVertex3fv(P029);
  976. glEnd();
  977. glBegin(GL_POLYGON);
  978. glNormal3fv(N019);
  979. glVertex3fv(P019);
  980. glNormal3fv(N063);
  981. glVertex3fv(P063);
  982. glNormal3fv(N029);
  983. glVertex3fv(P029);
  984. glEnd();
  985. glBegin(GL_POLYGON);
  986. glNormal3fv(N063);
  987. glVertex3fv(P063);
  988. glNormal3fv(N029);
  989. glVertex3fv(P029);
  990. glNormal3fv(N065);
  991. glVertex3fv(P065);
  992. glEnd();
  993. glBegin(GL_POLYGON);
  994. glNormal3fv(N063);
  995. glVertex3fv(P063);
  996. glNormal3fv(N065);
  997. glVertex3fv(P065);
  998. glNormal3fv(N029);
  999. glVertex3fv(P029);
  1000. glEnd();
  1001. }
  1002. void Fish009(void)
  1003. {
  1004. glBegin(GL_POLYGON);
  1005. glVertex3fv(P059);
  1006. glVertex3fv(P012);
  1007. glVertex3fv(P009);
  1008. glVertex3fv(P060);
  1009. glEnd();
  1010. glBegin(GL_POLYGON);
  1011. glVertex3fv(P012);
  1012. glVertex3fv(P004);
  1013. glVertex3fv(P007);
  1014. glVertex3fv(P009);
  1015. glEnd();
  1016. }
  1017. void Fish_1(void)
  1018. {
  1019. Fish004();
  1020. Fish005();
  1021. Fish003();
  1022. Fish007();
  1023. Fish006();
  1024. Fish002();
  1025. Fish008();
  1026. Fish009();
  1027. Fish001();
  1028. }
  1029. void Fish_2(void)
  1030. {
  1031. Fish005();
  1032. Fish004();
  1033. Fish003();
  1034. Fish008();
  1035. Fish006();
  1036. Fish002();
  1037. Fish007();
  1038. Fish009();
  1039. Fish001();
  1040. }
  1041. void Fish_3(void)
  1042. {
  1043. Fish005();
  1044. Fish004();
  1045. Fish007();
  1046. Fish003();
  1047. Fish002();
  1048. Fish008();
  1049. Fish009();
  1050. Fish001();
  1051. Fish006();
  1052. }
  1053. void Fish_4(void)
  1054. {
  1055. Fish005();
  1056. Fish004();
  1057. Fish008();
  1058. Fish003();
  1059. Fish002();
  1060. Fish007();
  1061. Fish009();
  1062. Fish001();
  1063. Fish006();
  1064. }
  1065. void Fish_5(void)
  1066. {
  1067. Fish009();
  1068. Fish006();
  1069. Fish007();
  1070. Fish001();
  1071. Fish002();
  1072. Fish003();
  1073. Fish008();
  1074. Fish004();
  1075. Fish005();
  1076. }
  1077. void Fish_6(void)
  1078. {
  1079. Fish009();
  1080. Fish006();
  1081. Fish008();
  1082. Fish001();
  1083. Fish002();
  1084. Fish007();
  1085. Fish003();
  1086. Fish004();
  1087. Fish005();
  1088. }
  1089. void Fish_7(void)
  1090. {
  1091. Fish009();
  1092. Fish001();
  1093. Fish007();
  1094. Fish005();
  1095. Fish002();
  1096. Fish008();
  1097. Fish003();
  1098. Fish004();
  1099. Fish006();
  1100. }
  1101. void Fish_8(void)
  1102. {
  1103. Fish009();
  1104. Fish008();
  1105. Fish001();
  1106. Fish002();
  1107. Fish007();
  1108. Fish003();
  1109. Fish005();
  1110. Fish004();
  1111. Fish006();
  1112. }
  1113. void DrawShark(fishRec *fish)
  1114. {
  1115. float mat[4][4];
  1116. int n, phi;
  1117. float seg1, seg2, seg3, seg4, segup;
  1118. float thrash, chomp;
  1119. fish->htail = (int)(fish->htail - (int)(5.0 * fish->v)) % 360;
  1120. thrash = 50.0 * fish->v;
  1121. seg1 = 0.6 * thrash * sin(fish->htail*RRAD);
  1122. seg2 = 1.8 * thrash * sin((fish->htail+45.0)*RRAD);
  1123. seg3 = 3.0 * thrash * sin((fish->htail+90.0)*RRAD);
  1124. seg4 = 4.0 * thrash * sin((fish->htail+110.0)*RRAD);
  1125. chomp = 0.0;
  1126. if (fish->v > 2.0) {
  1127. chomp = -(fish->v - 2.0) * 200.0;
  1128. }
  1129. P004[1] = iP004[1] + chomp;
  1130. P007[1] = iP007[1] + chomp;
  1131. P010[1] = iP010[1] + chomp;
  1132. P011[1] = iP011[1] + chomp;
  1133. P023[0] = iP023[0] + seg1;
  1134. P024[0] = iP024[0] + seg1;
  1135. P025[0] = iP025[0] + seg1;
  1136. P026[0] = iP026[0] + seg1;
  1137. P027[0] = iP027[0] + seg1;
  1138. P028[0] = iP028[0] + seg1;
  1139. P029[0] = iP029[0] + seg1;
  1140. P030[0] = iP030[0] + seg1;
  1141. P031[0] = iP031[0] + seg1;
  1142. P032[0] = iP032[0] + seg1;
  1143. P033[0] = iP033[0] + seg2;
  1144. P034[0] = iP034[0] + seg2;
  1145. P035[0] = iP035[0] + seg2;
  1146. P036[0] = iP036[0] + seg2;
  1147. P037[0] = iP037[0] + seg2;
  1148. P038[0] = iP038[0] + seg2;
  1149. P039[0] = iP039[0] + seg2;
  1150. P040[0] = iP040[0] + seg2;
  1151. P041[0] = iP041[0] + seg2;
  1152. P042[0] = iP042[0] + seg2;
  1153. P043[0] = iP043[0] + seg3;
  1154. P044[0] = iP044[0] + seg3;
  1155. P045[0] = iP045[0] + seg3;
  1156. P046[0] = iP046[0] + seg3;
  1157. P047[0] = iP047[0] + seg3;
  1158. P048[0] = iP048[0] + seg3;
  1159. P049[0] = iP049[0] + seg3;
  1160. P050[0] = iP050[0] + seg3;
  1161. P051[0] = iP051[0] + seg3;
  1162. P052[0] = iP052[0] + seg3;
  1163. P002[0] = iP002[0] + seg4;
  1164. P061[0] = iP061[0] + seg4;
  1165. P069[0] = iP069[0] + seg4;
  1166. P070[0] = iP070[0] + seg4;
  1167. fish->vtail += ((fish->dtheta - fish->vtail) * 0.1);
  1168. if (fish->vtail > 0.5) {
  1169. fish->vtail = 0.5;
  1170. } else if (fish->vtail < -0.5) {
  1171. fish->vtail = -0.5;
  1172. }
  1173. segup = thrash * fish->vtail;
  1174. P023[1] = iP023[1] + segup;
  1175. P024[1] = iP024[1] + segup;
  1176. P025[1] = iP025[1] + segup;
  1177. P026[1] = iP026[1] + segup;
  1178. P027[1] = iP027[1] + segup;
  1179. P028[1] = iP028[1] + segup;
  1180. P029[1] = iP029[1] + segup;
  1181. P030[1] = iP030[1] + segup;
  1182. P031[1] = iP031[1] + segup;
  1183. P032[1] = iP032[1] + segup;
  1184. P033[1] = iP033[1] + segup * 5.0;
  1185. P034[1] = iP034[1] + segup * 5.0;
  1186. P035[1] = iP035[1] + segup * 5.0;
  1187. P036[1] = iP036[1] + segup * 5.0;
  1188. P037[1] = iP037[1] + segup * 5.0;
  1189. P038[1] = iP038[1] + segup * 5.0;
  1190. P039[1] = iP039[1] + segup * 5.0;
  1191. P040[1] = iP040[1] + segup * 5.0;
  1192. P041[1] = iP041[1] + segup * 5.0;
  1193. P042[1] = iP042[1] + segup * 5.0;
  1194. P043[1] = iP043[1] + segup * 12.0;
  1195. P044[1] = iP044[1] + segup * 12.0;
  1196. P045[1] = iP045[1] + segup * 12.0;
  1197. P046[1] = iP046[1] + segup * 12.0;
  1198. P047[1] = iP047[1] + segup * 12.0;
  1199. P048[1] = iP048[1] + segup * 12.0;
  1200. P049[1] = iP049[1] + segup * 12.0;
  1201. P050[1] = iP050[1] + segup * 12.0;
  1202. P051[1] = iP051[1] + segup * 12.0;
  1203. P052[1] = iP052[1] + segup * 12.0;
  1204. P002[1] = iP002[1] + segup * 17.0;
  1205. P061[1] = iP061[1] + segup * 17.0;
  1206. P069[1] = iP069[1] + segup * 17.0;
  1207. P070[1] = iP070[1] + segup * 17.0;
  1208. glPushMatrix();
  1209. glTranslatef(0.0, 0.0, -3000.0);
  1210. glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]);
  1211. n = 0;
  1212. if (mat[0][2] >= 0.0) {
  1213. n += 1;
  1214. }
  1215. if (mat[1][2] >= 0.0) {
  1216. n += 2;
  1217. }
  1218. if (mat[2][2] >= 0.0) {
  1219. n += 4;
  1220. }
  1221. glScalef(2.0, 1.0, 1.0);
  1222. glEnable(GL_CULL_FACE);
  1223. switch (n) {
  1224. case 0:
  1225. Fish_1();
  1226. break;
  1227. case 1:
  1228. Fish_2();
  1229. break;
  1230. case 2:
  1231. Fish_3();
  1232. break;
  1233. case 3:
  1234. Fish_4();
  1235. break;
  1236. case 4:
  1237. Fish_5();
  1238. break;
  1239. case 5:
  1240. Fish_6();
  1241. break;
  1242. case 6:
  1243. Fish_7();
  1244. break;
  1245. case 7:
  1246. Fish_8();
  1247. break;
  1248. }
  1249. glDisable(GL_CULL_FACE);
  1250. glPopMatrix();
  1251. }