Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.89 KB | None | 0 0
  1.  
  2. #include "iGraphics.h"
  3. #include <time.h>
  4. #include<cstdio>
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10. time_t t;
  11.  
  12. int go = 0;
  13.  
  14. int damage = 1000;
  15. int frieza_life = 300;
  16. double red;
  17. double green;
  18.  
  19.  
  20. int s = 2;
  21. int super = 1;
  22. int score = 0;
  23.  
  24. int run = 0;
  25. int goku_x = 200;
  26. int run_y = 140;
  27. int run_co = 0;
  28. int gr = 0;
  29. int gr1 = 0;
  30. int gr2 = 0;
  31. int gr3 = 0;
  32. int gr4 = 0;
  33. int gr5 = 0;
  34. int gr6 = 0;
  35. int gr7 = 0;
  36. int gr8 = 0;
  37. int gr9 = 0;
  38.  
  39. int blast_co = 0;
  40. int blast_speed = 25;
  41.  
  42. int blast = 0;
  43. int blast_x = 240;
  44. int blast_y;
  45. int blast_button = 0;
  46. int blast_flag = 0;
  47.  
  48. int blast1 = 0;
  49. int blast1_x = 240;
  50. int blast1_y;
  51. int blast1_button = 0;
  52. int blast1_flag = 0;
  53.  
  54. int blast2 = 0;
  55. int blast2_x = 240;
  56. int blast2_y;
  57. int blast2_button = 0;
  58. int blast2_flag = 0;
  59.  
  60. int blast3 = 0;
  61. int blast3_x = 240;
  62. int blast3_y;
  63. int blast3_button = 0;
  64. int blast3_flag = 0;
  65.  
  66. int blast4 = 0;
  67. int blast4_x = 240;
  68. int blast4_y;
  69. int blast4_button = 0;
  70. int blast4_flag = 0;
  71.  
  72. int blast5 = 0;
  73. int blast5_x = 240;
  74. int blast5_y;
  75. int blast5_button = 0;
  76. int blast5_flag = 0;
  77.  
  78. int blast6 = 0;
  79. int blast6_x = 240;
  80. int blast6_y;
  81. int blast6_button = 0;
  82. int blast6_flag = 0;
  83.  
  84. int blast7 = 0;
  85. int blast7_x = 240;
  86. int blast7_y;
  87. int blast7_button = 0;
  88. int blast7_flag = 0;
  89.  
  90. int blast8 = 0;
  91. int blast8_x = 240;
  92. int blast8_y;
  93. int blast8_button = 0;
  94. int blast8_flag = 0;
  95.  
  96. int blast9 = 0;
  97. int blast9_x = 240;
  98. int blast9_y;
  99. int blast9_button = 0;
  100. int blast9_flag = 0;
  101.  
  102.  
  103. int jump_key = 0;
  104. int jump = 0;
  105. int jump_x = 240;
  106. int jump_y = 140;
  107. int jump_h1 = 150;
  108. int jump_h2 = 260;
  109. int jump_limit = 450;
  110. int jd = 25;
  111. int jump_dif = jd;
  112. int jump_co = 0;
  113.  
  114.  
  115. int ground_y = 0;
  116. int ground_x = 128;
  117. int ground_x1 = 256;
  118. int ground_x2 = 384;
  119. int ground_x3 = 512;
  120. int ground_x4 = 640;
  121. int ground_x5 = 768;
  122. int ground_x6 = 896;
  123. int ground_x7 = 1024;
  124. int ground_x8 = 1152;
  125. int ground_x9 = 1280;
  126. int ground_x10 = 1408;
  127.  
  128.  
  129. int gdx = 8;
  130. int cloud_position_x = 500;
  131. int cloud_position_y = 520;
  132. int cloud2_position_x = 900;
  133. int cloud2_position_y = 620;
  134. int cloud1_position_x = 2350;
  135. int cloud1_position_y = 670;
  136. int jumping = 0;
  137.  
  138.  
  139. int spike_x = 1700;
  140. int spike2_x = 2300;
  141. int spike3_x = 2600;
  142. int spike34_diff = 400;
  143. int spike4_x = 3000;
  144. int spike5_x = 2600;
  145. int spike56_diff = 800;
  146. int spike6_x = 3400;
  147. int spike7_x = 2600;
  148. int spike78_diff = 134;
  149. int spike8_x = 2728;
  150. int spike9_x = 2600;
  151. int spike910_diff = 128;
  152. int spike10_x = 2728;
  153. int spike1011_diff = 600;
  154. int spike11_x = 3128;
  155. int spike_y = 140;
  156. int spike_direction = 1;
  157. int random;
  158. int spike_limit = 300;
  159. int spike_difference = 40;
  160. int spike_speed = 8;
  161. int spk_dmg = 5;
  162.  
  163. int sani_co = 0;
  164. char sup_str[] = "SS1.bmp";
  165. int s_anim = 0;
  166. int sco = 0;
  167.  
  168. int st_sc = 0;
  169. int press_co = 0;
  170. char pr_str[] = "N1.bmp";
  171. int prc = 0;
  172. int pri = 0;
  173.  
  174. int S_co = 0;
  175. char S_str[] = "S1.bmp";
  176. int Sc = 0;
  177. int Si = 0;
  178.  
  179. int I_co = 0;
  180. char I_str[] = "I1.bmp";
  181. int Ic = 0;
  182. int Ii = 0;
  183.  
  184. int H_co = 0;
  185. char H_str[] = "H1.bmp";
  186. int Hc = 0;
  187. int Hi = 0;
  188.  
  189. int Q_co = 0;
  190. char Q_str[] = "Q1.bmp";
  191. int Qc = 0;
  192. int Qi = 0;
  193.  
  194. int gol_anim = 0;
  195. int gol_c = 0;
  196. int gco = 0;
  197. char gol_str[] = "GT1.bmp";
  198.  
  199. int sp_sc = 0;
  200.  
  201. int aust_co = 0;
  202. int aco = 0;
  203. char au_str[] = "aust1.bmp";
  204. int aust_po = 0;
  205. int aub = 0;
  206.  
  207. int niloy_co = 0;
  208. int nco = 0;
  209. char ni_str[] = "niloy1.bmp";
  210. int niloy_po = 0;
  211. int nib = 0;
  212.  
  213. int tokey_co = 0;
  214. int tco = 0;
  215. char to_str[] = "tokey1.bmp";
  216. int tokey_po = 0;
  217. int tob = 0;
  218.  
  219. int go_co = 0;
  220. char go_str[] = "go1.bmp";
  221. int g_co = 0;
  222.  
  223. int spikehit = 0;
  224. int spikehit2 = 0;
  225. int spikehit3 = 0;
  226. int spikehit4 = 0;
  227. int spikehit5 = 0;
  228. int spikehit6 = 0;
  229. int spikehit7 = 0;
  230. int spikehit8 = 0;
  231. int spikehit9 = 0;
  232. int spikehit10 = 0;
  233. int spikehit11 = 0;
  234.  
  235. int obs_bl = 0;
  236. int obm_bl = 0;
  237. int obl_bl = 0;
  238.  
  239. int pause_state = 0;
  240. char pause_str[] = "pause1.bmp";
  241. int p_co = 0;
  242. int pauseC = 0;
  243. int pause_co = 0;
  244. int pi = 0;
  245.  
  246.  
  247.  
  248. void groundMovement() {
  249. ground_x -= gdx;
  250. ground_x1 -= gdx;
  251. ground_x2 -= gdx;
  252. ground_x3 -= gdx;
  253. ground_x4 -= gdx;
  254. ground_x5 -= gdx;
  255. ground_x6 -= gdx;
  256. ground_x7 -= gdx;
  257. ground_x8 -= gdx;
  258. ground_x9 -= gdx;
  259. ground_x10 -= gdx;
  260. if (ground_x < 0) {
  261. ground_x = 1273;
  262. }
  263. if (ground_x1 < 0) {
  264. ground_x1 = 1273;
  265. }
  266. if (ground_x2 < 0) {
  267. ground_x2 = 1273;
  268. }
  269. if (ground_x3 < 0) {
  270. ground_x3 = 1273;
  271. }
  272. if (ground_x4 <0) {
  273. ground_x4 = 1273;
  274. }
  275. if (ground_x5 < 0) {
  276. ground_x5 = 1273;
  277. }
  278. if (ground_x6 < 0) {
  279. ground_x6 = 1273;
  280. }
  281. if (ground_x7 < 0) {
  282. ground_x7 = 1273;
  283. }
  284. if (ground_x8 < 0) {
  285. ground_x8 = 1273;
  286. }
  287. if (ground_x9 < 0) {
  288. ground_x9 = 1273;
  289. }
  290. if (ground_x10 < 0) {
  291. ground_x10 = 1273;
  292. }
  293. }
  294. void goku_run() {
  295. if (pause_state == 0 && !(sp_sc >= 0 && sp_sc <= 2) && !(st_sc >= 0 && st_sc <= 4) && go == 0)
  296. {
  297. run++;
  298. if (run >= 8)
  299. run = 0;
  300. }
  301. }
  302.  
  303. //jump
  304. void goku_jump() {
  305. if (pause_state == 0 && !(sp_sc >= 0 && sp_sc <= 2) && !(st_sc >= 0 && st_sc <= 4) && go == 0){
  306. if (jumping == 1){
  307. jump_dif--;
  308.  
  309. jump_y += jump_dif;
  310. if (jump_dif < 0)
  311. jumping = 2;
  312. if (jump_y == run_y) {
  313. jump = 0;
  314. }
  315. else if (jump_y <= jump_h2) {
  316. jump = 1;
  317. }
  318. else if (jump_y < jump_limit) {
  319. jump = 2;
  320. }
  321. }
  322. else if (jumping == 2) {
  323. jump_dif--;
  324. jump_y += jump_dif;
  325. if (jump_y >= jump_h1) {
  326. jump = 0;
  327. }
  328. else if (jump_y >= jump_h2) {
  329. jump = 1;
  330. }
  331. else if (jump_y > run_y) {
  332. jump = 2;
  333. }
  334. if (jump_y <= 140)
  335. {
  336. jumping = 0;
  337. jump_co = 0;
  338. jump_limit = 450;
  339. jump_dif = jd;
  340. jump_y = 140;
  341. }
  342. }
  343. }
  344. }
  345. void goku_blast(){
  346. if (pause_state == 0 && !(sp_sc >= 0 && sp_sc <= 2) && !(st_sc >= 0 && st_sc <= 4) && go == 0){
  347. if (blast_button != 0)
  348. {
  349. blast++;
  350. if (blast > 5)
  351. blast_x += blast_speed;
  352.  
  353. if (blast >= 200)
  354. blast = 0;
  355. }
  356. else{
  357. blast = 0;
  358. }
  359. if (blast1_button != 0)
  360. {
  361. blast1++;
  362. if (blast1 > 5)
  363. blast1_x += blast_speed;
  364.  
  365. if (blast1 >= 200)
  366. blast1 = 0;
  367. }
  368. else{
  369. blast1 = 0;
  370. }
  371. if (blast2_button != 0)
  372. {
  373. blast2++;
  374. if (blast2 > 5)
  375. blast2_x += blast_speed;
  376. if (blast2 >= 200)
  377. blast2 = 0;
  378. }
  379. else{
  380. blast2 = 0;
  381. }
  382.  
  383. if (blast3_button != 0)
  384. {
  385. blast3++;
  386. if (blast3 > 5)
  387. blast3_x += blast_speed;
  388. if (blast3 >= 200)
  389. blast3 = 0;
  390. }
  391. else{
  392. blast3 = 0;
  393. }
  394.  
  395. if (blast4_button != 0)
  396. {
  397. blast4++;
  398. if (blast4 > 5)
  399. blast4_x += blast_speed;
  400. if (blast4 >= 200)
  401. blast4 = 0;
  402. }
  403. else{
  404. blast4 = 0;
  405. }
  406.  
  407. if (blast5_button != 0)
  408. {
  409. blast5++;
  410. if (blast5 > 5)
  411. blast5_x += blast_speed;
  412. if (blast5 >= 200)
  413. blast5 = 0;
  414. }
  415. else{
  416. blast5 = 0;
  417. }
  418. if (blast6_button != 0)
  419. {
  420. blast6++;
  421. if (blast6 > 5)
  422. blast6_x += blast_speed;
  423. if (blast6 >= 200)
  424. blast6 = 0;
  425. }
  426. else{
  427. blast6 = 0;
  428. }
  429. if (blast7_button != 0)
  430. {
  431. blast7++;
  432. if (blast7 > 5)
  433. blast7_x += blast_speed;
  434. if (blast7 >= 200)
  435. blast7 = 0;
  436. }
  437. else{
  438. blast7 = 0;
  439. }
  440. if (blast8_button != 0)
  441. {
  442. blast8++;
  443. if (blast8 > 5)
  444. blast8_x += blast_speed;
  445. if (blast8 >= 200)
  446. blast8 = 0;
  447. }
  448. else{
  449. blast8 = 0;
  450. }
  451. if (blast9_button != 0)
  452. {
  453. blast9++;
  454. if (blast9 > 5)
  455. blast9_x += blast_speed;
  456. if (blast9 >= 200)
  457. blast9 = 0;
  458. }
  459. else{
  460. blast9 = 0;
  461. }
  462. }
  463. }
  464.  
  465.  
  466. void spike_move() {
  467. if (random == 1) {
  468. spike_direction = 1;
  469. }
  470. else if (random == 2) {
  471. spike_direction = 2;
  472. }
  473. else if (random == 3) {
  474. spike_direction = 3;
  475. }
  476. else if (random == 4) {
  477. spike_direction = 4;
  478. }
  479. else if (random == 5) {
  480. spike_direction = 5;
  481. }
  482. else if (random == 6) {
  483. spike_direction = 6;
  484. }
  485. if (spike_direction == 1) {
  486. spike_x -= spike_speed;
  487. if (spike_x <= 0) {
  488. spikehit = 0;
  489. spike_x = 1300;
  490. random = rand() % 7;
  491. }
  492. }
  493. else if (spike_direction == 2) {
  494. spike2_x -= spike_speed;
  495. if (spike2_x <= 0) {
  496. spikehit2 = 0;
  497. spike2_x = 1500;
  498. random = rand() % 7;
  499.  
  500. }
  501. }
  502. else if (spike_direction == 3) {
  503.  
  504. spike3_x -= spike_speed;
  505. spike4_x -= spike_speed;
  506. if (spike4_x <= 0) {
  507. spikehit3 = 0;
  508. spikehit4 = 0;
  509. spike3_x = 1300;
  510. spike4_x = spike3_x + spike34_diff;
  511. random = rand() % 7;
  512.  
  513. }
  514. }
  515. else if (spike_direction == 4) {
  516. spike5_x -= spike_speed;
  517. spike6_x -= spike_speed;
  518. if (spike6_x <= 0) {
  519. spikehit5 = 0;
  520. spikehit6 = 0;
  521. spike5_x = 1300;
  522. spike6_x = spike3_x + spike56_diff;
  523. random = rand() % 7;
  524.  
  525. }
  526. }
  527. else if (spike_direction == 5) {
  528. spike7_x -= spike_speed;
  529. spike8_x -= spike_speed;
  530. if (spike8_x <= 0) {
  531. spikehit7 = 0;
  532. spikehit8 = 0;
  533. spike7_x = 1300;
  534. spike8_x = spike7_x + spike78_diff;
  535. random = rand() % 7;
  536.  
  537. }
  538. }
  539. else if (spike_direction == 6) {
  540. spike9_x -= spike_speed;
  541. spike10_x -= spike_speed;
  542. spike11_x -= spike_speed;
  543. if (spike11_x <= 0) {
  544. spikehit9 = 0;
  545.  
  546. spikehit10 = 0;
  547.  
  548. spikehit11 = 0;
  549.  
  550. spike9_x = 1300;
  551. spike10_x = spike9_x + spike910_diff;
  552. spike11_x = spike10_x + spike1011_diff;
  553. random = rand() % 7;
  554.  
  555. }
  556. }
  557. }
  558.  
  559.  
  560. //Spike goku hit
  561.  
  562. void spike_hit() {
  563. if (goku_x >= spike_x - 40 && goku_x <= spike_x + 128 && jump_y <= 160) {
  564. spikehit = 1;
  565. damage -= spk_dmg;
  566. }
  567. if (goku_x >= spike2_x - 40 && goku_x <= spike2_x + 128 && jump_y <= 160) {
  568. spikehit2 = 1;
  569. damage -= spk_dmg;
  570. }
  571. if (goku_x >= spike3_x - 40 && goku_x <= spike3_x + 128 && jump_y <= 160) {
  572. spikehit3 = 1;
  573. damage -= spk_dmg;
  574. }
  575. if (goku_x >= spike4_x - 40 && goku_x <= spike4_x + 128 && jump_y <= 160) {
  576. spikehit4 = 1;
  577. damage -= spk_dmg;
  578. }
  579. if (goku_x >= spike5_x - 40 && goku_x <= spike5_x + 128 && jump_y <= 160) {
  580. spikehit5 = 1;
  581. damage -= spk_dmg;
  582. }
  583. if (goku_x >= spike6_x - 40 && goku_x <= spike6_x + 128 && jump_y <= 160) {
  584. spikehit6 = 1;
  585. damage -= spk_dmg;
  586. }
  587. if (goku_x >= spike7_x - 40 && goku_x <= spike7_x + 128 && jump_y <= 160) {
  588. spikehit7 = 1;
  589. damage -= spk_dmg;
  590. }
  591. if (goku_x >= spike8_x - 40 && goku_x <= spike8_x + 128 && jump_y <= 160) {
  592. spikehit8 = 1;
  593. damage -= spk_dmg;
  594. }
  595.  
  596. if (goku_x >= spike9_x - 40 && goku_x <= spike9_x + 128 && jump_y <= 160) {
  597. spikehit9 = 1;
  598. damage -= 10;
  599. }
  600.  
  601. if (goku_x >= spike10_x - 40 && goku_x <= spike10_x + 128 && jump_y <= 160) {
  602. spikehit10 = 1;
  603. damage -= 10;
  604. }
  605. if (goku_x >= spike11_x - 40 && goku_x <= spike11_x + 128 && jump_y <= 160) {
  606. spikehit11 = 1;
  607. damage -= 10;
  608. }
  609. }
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616. //cell
  617.  
  618. int cell_x = 1600;
  619. int cell_y = 300;
  620. int cell1_y = 300;
  621. int cell2_y = 525;
  622. int cell3_y = 600;
  623.  
  624.  
  625. int cell_speed = 20;
  626. int random_cell;
  627.  
  628. int cell = 0;
  629. void cell_move() {
  630. cell_x -= cell_speed;
  631. if (cell_x <= 0) {
  632. cell_x = 1300;
  633. random_cell = rand() % 4;
  634. }
  635. else if (cell == 1) {
  636. cell_x = 1500;
  637. random_cell = rand() % 4;
  638. }
  639. if (random_cell == 1) {
  640. cell_y = cell1_y;
  641. }
  642. else if (random_cell == 2) {
  643. cell_y = cell2_y;
  644.  
  645. }
  646. else if (random_cell == 3) {
  647. cell_y = cell3_y;
  648.  
  649. }
  650. }
  651.  
  652. int random2_cell;
  653. int cell10_x = 20000;
  654. int cell10_y = 225;
  655. int cell11_y = 225;
  656. int cell12_y = 450;
  657. int cell13_y = 675;
  658. int cell_diff1 = 6;
  659. int cell1 = 0;
  660. void cell_move2() {
  661. cell10_x -= cell_speed + cell_diff1;
  662. if (cell10_x <= 0) {
  663. cell10_x = 1700;
  664. random2_cell = rand() % 4;
  665. }
  666. else if (cell1 == 1) {
  667. cell10_x = 2000;
  668. random2_cell = rand() % 4;
  669. }
  670. if (random2_cell == 1) {
  671. cell10_y = cell11_y;
  672. }
  673. else if (random2_cell == 2) {
  674. cell10_y = cell12_y;
  675. }
  676. else if (random2_cell == 3) {
  677. cell10_y = cell13_y;
  678. }
  679.  
  680. }
  681. int random3_cell;
  682. int cell20_x = 40000;
  683. int cell20_y = 150;
  684. int cell21_y = 150;
  685. int cell22_y = 375;
  686. int cell_diff2 = 10;
  687.  
  688. int cell2 = 0;
  689. void cell_move3() {
  690. cell20_x -= (cell_speed + cell_diff2);
  691. if (cell20_x <= 0) {
  692. random3_cell = rand() % 4;
  693. cell20_x = 1650;
  694. }
  695. else if (cell2 == 1) {
  696.  
  697. cell20_x = 1600;
  698. random3_cell = rand() % 4;
  699.  
  700. }
  701. if (random3_cell == 1) {
  702. cell20_y = cell21_y;
  703. }
  704. else if (random3_cell == 2) {
  705. cell20_y = cell22_y;
  706. }
  707. }
  708.  
  709. int hit = 0;
  710. int ss = 5;
  711.  
  712. void cell_hit() {
  713. if ((blast_x >= cell_x - 10) && (blast_y >= cell_y && blast_y <= cell_y + 80)) {
  714. cell = 1;
  715.  
  716. hit = 1;
  717. score += ss;
  718. blast_x = 1300;
  719. }
  720. else if ((blast1_x >= cell_x - 10) && (blast1_y >= cell_y - 10 && blast1_y <= cell_y + 80)) {
  721. cell = 1;
  722.  
  723. hit = 1;
  724. score += ss;
  725. blast1_x = 1300;
  726.  
  727. }
  728. else if ((blast2_x >= cell_x - 10) && (blast2_y >= cell_y - 10 && blast2_y <= cell_y + 80)) {
  729. cell = 1;
  730.  
  731. hit = 1;
  732. score += ss;
  733. blast2_x = 1300;
  734. }
  735. else if ((blast3_x >= cell_x - 10) && (blast3_y >= cell_y - 10 && blast3_y <= cell_y + 80)) {
  736. cell = 1;
  737.  
  738. hit = 1;
  739. score += ss;
  740. blast3_x = 1300;
  741. }
  742. else if ((blast4_x >= cell_x - 10) && (blast4_y >= cell_y - 10 && blast4_y <= cell_y + 80)) {
  743. cell = 1;
  744.  
  745. hit = 1;
  746. score += ss;
  747. blast4_x = 1300;
  748. }
  749. else if ((blast5_x >= cell_x - 10) && (blast5_y >= cell_y - 10 && blast5_y <= cell_y + 80)) {
  750. cell = 1;
  751.  
  752. hit = 1;
  753. score += ss;
  754. blast5_x = 1300;
  755. }
  756. else if ((blast6_x >= cell_x - 10) && (blast6_y >= cell_y - 10 && blast6_y <= cell_y + 80)) {
  757. cell = 1;
  758.  
  759. hit = 1;
  760. score += ss;
  761. blast6_x = 1300;
  762. }
  763. else if ((blast7_x >= cell_x - 10) && (blast7_y >= cell_y - 10 && blast7_y <= cell_y + 80)) {
  764. cell = 1;
  765.  
  766. hit = 1;
  767. score += ss;
  768. blast7_x = 1300;
  769. }
  770. else if ((blast8_x >= cell_x - 10) && (blast8_y >= cell_y - 10 && blast8_y <= cell_y + 80)) {
  771. cell = 1;
  772. hit = 1;
  773. score += ss;
  774. blast8_x = 1300;
  775. }
  776. else if ((blast9_x >= cell_x - 10) && (blast9_y >= cell_y - 10 && blast9_y <= cell_y + 80)) {
  777. cell = 1;
  778. hit = 1;
  779. score += ss;
  780. blast9_x = 1300;
  781. }
  782. else {
  783. cell = 0;
  784. hit = 0;
  785. }
  786. }
  787.  
  788. int hit1 = 0;
  789. int sd = 7;
  790.  
  791. void cell1_hit() {
  792. if ((blast_x >= cell10_x - 10) && (blast_y >= cell10_y - 10 && blast_y <= cell10_y + 80)) {
  793. cell1 = 1;
  794.  
  795. hit1 = 1;
  796. score += sd;
  797. blast_x = 1300;
  798. }
  799. else if ((blast1_x >= cell10_x - 10) && (blast1_y >= cell10_y - 10 && blast1_y <= cell10_y + 80)) {
  800. cell1 = 1;
  801.  
  802. hit1 = 1;
  803. score += sd;
  804. blast1_x = 1300;
  805. }
  806. else if ((blast2_x >= cell10_x - 10) && (blast2_y >= cell10_y - 10 && blast2_y <= cell10_y + 80)) {
  807. cell1 = 1;
  808.  
  809. hit1 = 1;
  810. score += sd;
  811. blast2_x = 1300;
  812. }
  813. else if ((blast3_x >= cell10_x - 10) && (blast3_y >= cell10_y - 10 && blast3_y <= cell10_y + 80)) {
  814. cell1 = 1;
  815.  
  816. hit1 = 1;
  817. score += sd;
  818. blast3_x = 1300;
  819. }
  820. else if ((blast4_x >= cell10_x - 10) && (blast4_y >= cell10_y - 10 && blast4_y <= cell10_y + 80)) {
  821. cell1 = 1;
  822.  
  823. hit1 = 1;
  824. score += sd;
  825. blast4_x = 1300;
  826. }
  827. else if ((blast5_x >= cell10_x - 10) && (blast5_y >= cell10_y - 10 && blast5_y <= cell10_y + 80)) {
  828. cell1 = 1;
  829.  
  830. hit1 = 1;
  831. score += sd;
  832. blast5_x = 1300;
  833. }
  834. else if ((blast6_x >= cell10_x - 10) && (blast6_y >= cell10_y - 10 && blast6_y <= cell10_y + 80)) {
  835. cell1 = 1;
  836.  
  837. hit1 = 1;
  838. score += sd;
  839. blast6_x = 1300;
  840. }
  841. else if ((blast7_x >= cell10_x - 10) && (blast7_y >= cell10_y - 10 && blast7_y <= cell10_y + 80)) {
  842. cell1 = 1;
  843.  
  844. hit1 = 1;
  845. score += sd;
  846. blast7_x = 1300;
  847. }
  848. else if ((blast8_x >= cell10_x - 10) && (blast8_y >= cell10_y - 10 && blast8_y <= cell10_y + 80)) {
  849. cell1 = 1;
  850.  
  851. hit1 = 1;
  852. score += sd;
  853. blast8_x = 1300;
  854. }
  855. else if ((blast9_x >= cell10_x - 10) && (blast9_y >= cell10_y - 10 && blast9_y <= cell10_y + 80)) {
  856. cell1 = 1;
  857.  
  858. hit1 = 1;
  859. score += sd;
  860. blast9_x = 1300;
  861. }
  862. else {
  863. cell1 = 0;
  864. hit1 = 0;
  865. }
  866.  
  867. }
  868. int hit2 = 0;
  869. int sd1 = 10;
  870. void cell2_hit() {
  871. if ((blast_x >= cell20_x - 10) && (blast_y >= cell20_y - 10 && blast_y <= cell20_y + 80)) {
  872. cell2 = 1;
  873.  
  874. hit2 = 1;
  875. score += sd1;
  876. blast_x = 1300;
  877. }
  878. else if ((blast1_x >= cell20_x - 10) - 10 && (blast1_y >= cell20_y - 10 && blast1_y <= cell20_y + 80)) {
  879. cell2 = 1;
  880. hit2 = 1;
  881.  
  882. score += sd1;
  883. blast1_x = 1300;
  884. }
  885. else if ((blast2_x >= cell20_x - 10) && (blast2_y >= cell20_y - 10 && blast2_y <= cell20_y + 80)) {
  886. cell2 = 1;
  887.  
  888. hit2 = 1;
  889. score += sd1;
  890. blast2_x = 1300;
  891. }
  892. else if ((blast3_x >= cell20_x - 10) && (blast3_y >= cell20_y - 10 && blast3_y <= cell20_y + 80)) {
  893. cell2 = 1;
  894.  
  895. hit2 = 1;
  896. score += sd1;
  897. blast3_x = 1300;
  898. }
  899. else if ((blast4_x >= cell20_x - 10) && (blast4_y >= cell20_y - 10 && blast4_y <= cell20_y + 80)) {
  900. cell2 = 1;
  901.  
  902. hit2 = 1;
  903. score += sd1;
  904. blast4_x = 1300;
  905. }
  906. else if ((blast5_x >= cell20_x - 10) && (blast5_y >= cell20_y - 10 && blast5_y <= cell20_y + 80)) {
  907. cell2 = 1;
  908.  
  909. hit2 = 1;
  910. score += sd1;
  911. blast5_x = 1300;
  912. }
  913. else if ((blast6_x >= cell20_x - 10) && (blast6_y >= cell20_y - 10 && blast6_y <= cell20_y + 80)) {
  914. cell2 = 1;
  915.  
  916. hit2 = 1;
  917. score += sd1;
  918. blast6_x = 1300;
  919. }
  920. else if ((blast7_x >= cell20_x - 10) && (blast7_y >= cell20_y - 10 && blast7_y <= cell20_y + 80)) {
  921. cell2 = 1;
  922.  
  923. hit2 = 1;
  924. score += sd1;
  925. blast7_x = 1300;
  926. }
  927. else if ((blast8_x >= cell20_x - 10) && (blast8_y >= cell20_y - 10 && blast8_y <= cell20_y + 80)) {
  928. cell2 = 1;
  929.  
  930. hit2 = 1;
  931. score += sd1;
  932. blast8_x = 1300;
  933. }
  934. else if ((blast9_x >= cell20_x - 10) && (blast9_y >= cell20_y - 10 && blast9_y <= cell20_y + 80)) {
  935. cell2 = 1;
  936.  
  937. hit2 = 1;
  938. score += sd1;
  939. blast9_x = 1300;
  940. }
  941. else {
  942. cell2 = 0;
  943. hit2 = 0;
  944. }
  945. }
  946.  
  947.  
  948. //obs
  949.  
  950.  
  951. int randomob = 1;
  952. int obs;
  953. int obs_speed = 8;
  954.  
  955. int obs_y = 140;
  956. int obs1_x = 1700;
  957.  
  958. int obs2_x = 2100;
  959. int obs3_x = 2500;
  960.  
  961.  
  962.  
  963. void obstacle() {
  964.  
  965. if (randomob == 1) {
  966. obs = 1;
  967.  
  968. }
  969. if (randomob == 2) {
  970. obs = 2;
  971.  
  972. }
  973. if (randomob == 3) {
  974. obs = 3;
  975.  
  976. }
  977.  
  978. if (obs == 1) {
  979. obs1_x -= obs_speed;
  980. if (obs1_x < 0) {
  981. obs1_x = 1600;
  982.  
  983. randomob = rand() % 4;
  984. }
  985.  
  986. }
  987. if (obs == 2) {
  988. obs2_x -= obs_speed;
  989. if (obs2_x <= 0) {
  990. obs2_x = 1800;
  991.  
  992. randomob = rand() % 4;
  993. }
  994.  
  995. }
  996. if (obs == 3) {
  997. obs3_x -= obs_speed;
  998. if (obs3_x <= 0) {
  999. obs3_x = 1900;
  1000.  
  1001. randomob = rand() % 4;
  1002. }
  1003.  
  1004. }
  1005.  
  1006. }
  1007.  
  1008. int bck_speed = 1;
  1009.  
  1010. int bck_x = 128;
  1011. int bck_x1 = 256;
  1012. int bck_x2 = 384;
  1013. int bck_x3 = 512;
  1014. int bck_x4 = 640;
  1015. int bck_x5 = 768;
  1016. int bck_x6 = 896;
  1017. int bck_x7 = 1024;
  1018. int bck_x8 = 1152;
  1019. int bck_x9 = 1280;
  1020. int bck_x10 = 1408;
  1021.  
  1022.  
  1023. void background() {
  1024. bck_x -= bck_speed;
  1025. bck_x1 -= bck_speed;
  1026. bck_x2 -= bck_speed;
  1027. bck_x3 -= bck_speed;
  1028. bck_x4 -= bck_speed;
  1029. bck_x5 -= bck_speed;
  1030. bck_x6 -= bck_speed;
  1031. bck_x7 -= bck_speed;
  1032. bck_x8 -= bck_speed;
  1033. bck_x9 -= bck_speed;
  1034. bck_x10 -= bck_speed;
  1035.  
  1036.  
  1037. if (bck_x < 0) {
  1038. bck_x = 1403;
  1039. }
  1040. if (bck_x1 < 0) {
  1041. bck_x1 = 1403;
  1042. }
  1043. if (bck_x2 < 0) {
  1044. bck_x2 = 1403;
  1045. }
  1046. if (bck_x3 < 0) {
  1047. bck_x3 = 1403;
  1048. }
  1049. if (bck_x4 <0) {
  1050. bck_x4 = 1403;
  1051. }
  1052. if (bck_x5 < 0) {
  1053. bck_x5 = 1403;
  1054. }
  1055. if (bck_x6 < 0) {
  1056. bck_x6 = 1403;
  1057. }
  1058. if (bck_x7 < 0) {
  1059. bck_x7 = 1403;
  1060. }
  1061. if (bck_x8 < 0) {
  1062. bck_x8 = 1403;
  1063. }
  1064. if (bck_x9 < 0) {
  1065. bck_x9 = 1403;
  1066. }
  1067. if (bck_x10 < 0) {
  1068. bck_x10 = 1403;
  1069. }
  1070.  
  1071.  
  1072.  
  1073. }
  1074.  
  1075.  
  1076. void goku_hit() {
  1077.  
  1078. if ((cell_x >= goku_x - 30 && cell_x <= goku_x + 35) && (cell_y >= jump_y - 40 && cell_y <= jump_y + 70)) {
  1079. cell = 1;
  1080. damage -= 100;
  1081. }
  1082. if ((cell10_x >= goku_x - 30 && cell10_x <= goku_x + 35) && (cell10_y >= jump_y - 40 && cell10_y <= jump_y + 70)) {
  1083. cell1 = 1;
  1084. damage -= 100;
  1085. }
  1086. if ((cell20_x >= goku_x - 30 && cell20_x <= goku_x + 35) && (cell20_y >= jump_y - 40 && cell20_y <= jump_y + 70)) {
  1087. cell2 = 1;
  1088. damage -= 100;
  1089. }
  1090.  
  1091. }
  1092.  
  1093.  
  1094. //goku walk on obstacle
  1095. int k = 1;
  1096. int obss = 0;
  1097. int obss_y = obs_y + 150;
  1098.  
  1099. int obss1_y = obs_y + 326;
  1100.  
  1101. int obss2_y = obs_y + 520;
  1102.  
  1103.  
  1104.  
  1105. int obs_run = 0;
  1106. void goku_run_obstacle_s() {
  1107.  
  1108. if ((goku_x >= obs1_x - 30 && goku_x <= obs1_x + 278) && (jump_y > 170 && jump_y <= obss_y)) {
  1109. k = 0;
  1110. jump_y = obss_y - 25;
  1111. }
  1112. else if ((goku_x >= obs2_x - 30 && goku_x <= obs2_x + 278) && (jump_y > 400 && jump_y <= obss1_y)) {
  1113. k = 0;
  1114. jump_y = obss1_y - 25;
  1115. }
  1116. else if ((goku_x >= obs3_x - 30 && goku_x <= obs3_x + 278) && (jump_y > 600 && jump_y <= obss2_y)) {
  1117. k = 0;
  1118. jump_y = obss2_y - 25;
  1119. }
  1120. else {
  1121. k = 1;
  1122. obs_run = 0;
  1123. }
  1124. }
  1125. void goku_obstacle_hit(){
  1126.  
  1127. if ((goku_x >= obs1_x && goku_x <= obs1_x + 278) && (jump_y <= obss_y - 30)) {
  1128. obs1_x = -100;
  1129. damage = damage - 50;
  1130. }
  1131. else if ((goku_x >= obs2_x && goku_x <= obs2_x + 278) && (jump_y <= obss1_y - 30)) {
  1132. obs2_x = -100;
  1133. damage = damage - 100;
  1134. }
  1135. else if ((goku_x >= obs3_x && goku_x <= obs3_x + 278) && (jump_y <= obss2_y - 30)) {
  1136. obs3_x = -100;
  1137. damage = damage - 150;
  1138. }
  1139. }
  1140. void blast_obs(){
  1141. if ((blast_x >= obs1_x && blast_x <= obs1_x + 278) && (blast_y <= obss_y) && blast_y != 0) {
  1142. obs_bl++;
  1143. blast_x = 1300;
  1144. }
  1145. else if ((blast1_x >= obs1_x && blast1_x <= obs1_x + 278) && (blast1_y <= obss_y) && blast1_y != 0) {
  1146. obs_bl++;
  1147. blast1_x = 1300;
  1148. }
  1149. else if ((blast2_x >= obs1_x && blast2_x <= obs1_x + 278) && (blast2_y <= obss_y) && blast2_y != 0) {
  1150. obs_bl++;
  1151. blast2_x = 1300;
  1152. }
  1153. else if ((blast3_x >= obs1_x && blast3_x <= obs1_x + 278) && (blast3_y <= obss_y) && blast3_y != 0) {
  1154. obs_bl++;
  1155. blast3_x = 1300;
  1156. }
  1157. else if ((blast4_x >= obs1_x && blast4_x <= obs1_x + 278) && (blast4_y <= obss_y) && blast4_y != 0) {
  1158. obs_bl++;
  1159. blast4_x = 1300;
  1160. }
  1161. else if ((blast5_x >= obs1_x && blast5_x <= obs1_x + 278) && (blast5_y <= obss_y) && blast5_y != 0) {
  1162. obs_bl++;
  1163. blast5_x = 1300;
  1164. }
  1165. else if ((blast6_x >= obs1_x && blast6_x <= obs1_x + 278) && (blast6_y <= obss_y) && blast6_y != 0) {
  1166. obs_bl++;
  1167. blast6_x = 1300;
  1168. }
  1169. else if ((blast7_x >= obs1_x && blast7_x <= obs1_x + 278) && (blast7_y <= obss_y) && blast7_y != 0) {
  1170. obs_bl++;
  1171. blast7_x = 1300;
  1172. }
  1173. else if ((blast8_x >= obs1_x && blast8_x <= obs1_x + 278) && (blast8_y <= obss_y) && blast8_y != 0) {
  1174. obs_bl++;
  1175. blast8_x = 1300;
  1176. }
  1177. else if ((blast9_x >= obs1_x && blast9_x <= obs1_x + 278) && (blast9_y <= obss_y) && blast9_y != 0) {
  1178. obs_bl++;
  1179. blast9_x = 1300;
  1180. }
  1181. else if ((blast_x >= obs2_x && blast_x <= obs2_x + 278) && (blast_y <= obss1_y) && blast_y != 0) {
  1182. obm_bl++;
  1183. blast_x = 1300;
  1184. }
  1185. else if ((blast1_x >= obs2_x && blast1_x <= obs2_x + 278) && (blast1_y <= obss1_y) && blast1_y != 0) {
  1186. obm_bl++;
  1187. blast1_x = 1300;
  1188. }
  1189. else if ((blast2_x >= obs2_x && blast2_x <= obs2_x + 278) && (blast2_y <= obss1_y) && blast2_y != 0) {
  1190. obm_bl++;
  1191. blast2_x = 1300;
  1192. }
  1193. else if ((blast3_x >= obs2_x && blast3_x <= obs2_x + 278) && (blast3_y <= obss1_y) && blast3_y != 0) {
  1194. obm_bl++;
  1195. blast3_x = 1300;
  1196. }
  1197. else if ((blast4_x >= obs2_x && blast4_x <= obs2_x + 278) && (blast4_y <= obss1_y) && blast4_y != 0) {
  1198. obm_bl++;
  1199. blast4_x = 1300;
  1200. }
  1201. else if ((blast5_x >= obs2_x && blast5_x <= obs2_x + 278) && (blast5_y <= obss1_y) && blast5_y != 0) {
  1202. obm_bl++;
  1203. blast5_x = 1300;
  1204. }
  1205. else if ((blast6_x >= obs2_x && blast6_x <= obs2_x + 278) && (blast6_y <= obss1_y) && blast6_y != 0) {
  1206. obm_bl++;
  1207. }
  1208. else if ((blast7_x >= obs2_x && blast7_x <= obs2_x + 278) && (blast7_y <= obss1_y) && blast7_y != 0) {
  1209. obm_bl++;
  1210. blast7_x = 1300;
  1211. }
  1212. else if ((blast8_x >= obs2_x && blast8_x <= obs2_x + 278) && (blast8_y <= obss1_y) && blast8_y != 0) {
  1213. obm_bl++;
  1214. blast8_x = 1300;
  1215. }
  1216. else if ((blast9_x >= obs2_x && blast9_x <= obs2_x + 278) && (blast9_y <= obss1_y) && blast9_y != 0) {
  1217. obm_bl++;
  1218. blast9_x = 1300;
  1219. }
  1220. else if ((blast_x >= obs3_x && blast_x <= obs3_x + 278) && (blast_y <= obss2_y) && blast_y != 0) {
  1221. obl_bl++;
  1222. blast_x = 1300;
  1223. }
  1224. else if ((blast1_x >= obs3_x && blast1_x <= obs3_x + 278) && (blast1_y <= obss2_y) && blast1_y != 0) {
  1225. obl_bl++;
  1226. blast1_x = 1300;
  1227. }
  1228. else if ((blast2_x >= obs3_x && blast2_x <= obs3_x + 278) && (blast2_y <= obss2_y) && blast2_y != 0) {
  1229. obl_bl++;
  1230. blast2_x = 1300;
  1231. }
  1232. else if ((blast3_x >= obs3_x && blast3_x <= obs3_x + 278) && (blast3_y <= obss2_y) && blast3_y != 0) {
  1233. obl_bl++;
  1234. blast3_x = 1300;
  1235. }
  1236. else if ((blast4_x >= obs3_x && blast4_x <= obs3_x + 278) && (blast4_y <= obss2_y) && blast4_y != 0) {
  1237. obl_bl++;
  1238. blast4_x = 1300;
  1239. }
  1240. else if ((blast5_x >= obs3_x && blast5_x <= obs3_x + 278) && (blast5_y <= obss2_y) && blast5_y != 0) {
  1241. obl_bl++;
  1242. blast5_x = 1300;
  1243. }
  1244. else if ((blast6_x >= obs3_x && blast6_x <= obs3_x + 278) && (blast6_y <= obss2_y) && blast6_y != 0) {
  1245. obl_bl++;
  1246. blast6_x = 1300;
  1247. }
  1248. else if ((blast7_x >= obs3_x && blast7_x <= obs3_x + 278) && (blast7_y <= obss2_y) && blast7_y != 0) {
  1249. obl_bl++;
  1250. blast7_x = 1300;
  1251. }
  1252. else if ((blast8_x >= obs3_x && blast8_x <= obs3_x + 278) && (blast8_y <= obss2_y) && blast8_y != 0) {
  1253. obl_bl++;
  1254. blast8_x = 1300;
  1255. }
  1256. else if ((blast9_x >= obs3_x && blast9_x <= obs3_x + 278) && (blast9_y <= obss2_y) && blast9_y != 0) {
  1257. obl_bl++;
  1258. blast9_x = 1300;
  1259. }
  1260. if (obs_bl >= 4)
  1261. {
  1262. obs1_x = -100;
  1263. obs_bl = 0;
  1264. score = score + 33;
  1265. }
  1266. if (obm_bl >= 6)
  1267. {
  1268. obs2_x = -100;
  1269. obm_bl = 0;
  1270. score = score + 66;
  1271. }
  1272. if (obl_bl >= 8)
  1273. {
  1274. obs3_x = -100;
  1275. obl_bl = 0;
  1276. score = score + 99;
  1277. }
  1278. }
  1279. int over = 0;
  1280. void GameOver() {
  1281. over++;
  1282. if (over >= 28) {
  1283. over = 28;
  1284. }
  1285. }
  1286.  
  1287. //Senzu bean
  1288. int senzu_x = 2000;
  1289. int senzu_y = 200;
  1290. int senzu_speed = 15;
  1291.  
  1292. int random_senzu;
  1293.  
  1294.  
  1295. int senzu = 1;
  1296.  
  1297. void senzu_bean() {
  1298. senzu_x -= senzu_speed;
  1299. if (senzu_x <= 0 && senzu == 1) {
  1300. senzu_x = 3100;
  1301. random_senzu = rand() % 7;
  1302. }
  1303. if (random_senzu == 1) {
  1304. senzu_y = 320;
  1305. }
  1306. else if (random_senzu == 2) {
  1307. senzu_y = 250;
  1308. }
  1309. else if (random_senzu == 3) {
  1310. senzu_y = 350;
  1311. }
  1312. else if (random_senzu == 4) {
  1313. senzu_y = 400;
  1314. }
  1315. else if (random_senzu == 5) {
  1316. senzu_y = 500;
  1317. }
  1318. else if (random_senzu == 6) {
  1319. senzu_y = 600;
  1320. }
  1321. }
  1322.  
  1323. int flag = 0;
  1324.  
  1325. void senzu_hit() {
  1326. if ((senzu_x <= goku_x + 60 && senzu_x >= goku_x) && (senzu_y >= jump_y - 20 && senzu_y <= jump_y + 70)){
  1327. senzu = 0;
  1328. senzu_x = 4200;
  1329. flag = 1;
  1330. if (flag == 1) {
  1331. damage += 150;
  1332. if (damage >= 1000) {
  1333. damage = 1000;
  1334. }
  1335.  
  1336. }
  1337. flag++;
  1338. }
  1339. else {
  1340. senzu = 1;
  1341. }
  1342. }
  1343.  
  1344.  
  1345.  
  1346. //Dragon ball
  1347. int d = 1;
  1348. int ds = 0;
  1349. int db_x = 2600;
  1350. int db_y = 320;
  1351. int db_speed = 12;
  1352. int db = 0;
  1353. int dr = 1;
  1354. int random_db;
  1355. void dragon_ball_move() {
  1356. if (random_db == 1) {
  1357. db_y = 250;
  1358. }
  1359. else if (random_db == 2) {
  1360. db_y = 150;
  1361. }
  1362. else if (random_db == 3) {
  1363. db_y = 650;
  1364. }
  1365. else if (random_db == 4) {
  1366. db_y = 340;
  1367. }
  1368. else if (random_db == 5) {
  1369. db_y = 500;
  1370. }
  1371. else if (random_db == 6) {
  1372. db_y = 600;
  1373. }
  1374. else if (random_db == 7) {
  1375. db_y = 560;
  1376. }
  1377. db_x -= db_speed;
  1378. if (db_x <= 0) {
  1379. db_x = 2400;
  1380. random_db = rand() % 8;
  1381. }
  1382. }
  1383.  
  1384.  
  1385. void dragon_ball_hit() {
  1386. if ((db_x > goku_x && db_x <= goku_x + 55) && (db_y >= jump_y - 40 && db_y <= jump_y + 90)) {
  1387. d = 0;
  1388. db++;
  1389. db_x = 2400;
  1390. random_db = rand() % 13;
  1391. }
  1392. if (db >= 7){
  1393. ds = 1;
  1394. if (s_anim != 3)
  1395. {
  1396. s_anim = 1;
  1397. super = 2;
  1398. damage = 1000;
  1399. }
  1400. }
  1401. }
  1402.  
  1403.  
  1404. //Frieza move
  1405.  
  1406. int frieza_x = 2100;
  1407. int frieza_y = 160;
  1408. int frieza_speed = 10;
  1409. int f;
  1410. void frieza_move() {
  1411. frieza_x -= 20;
  1412. if (frieza_x <= 1100) {
  1413. frieza_x = 1100;
  1414. }
  1415. if (f == 0){
  1416. frieza_y += frieza_speed;
  1417. if (frieza_y >= 700) {
  1418. f = 1;
  1419. }
  1420. }
  1421. if (f == 1) {
  1422. frieza_y -= frieza_speed;
  1423. if (frieza_y <= 160) {
  1424. f = 0;
  1425. }
  1426. }
  1427. }
  1428.  
  1429.  
  1430. //Frieza blast
  1431. int f_blast_x = frieza_x;
  1432. int f_blast1_x = frieza_x;
  1433. int f_blast = 0;
  1434. int f_blast2_x = frieza_x;
  1435. int f_blast1 = 0;
  1436. int f_blast3_x = frieza_x;
  1437. int f_blast2 = 0;
  1438. int f_blast4_x = frieza_x;
  1439. int f_blast3 = 0;
  1440. int f_blast_y = frieza_y + 27;
  1441. int f_blast1_y = frieza_y + 27;
  1442. int f_blast2_y = frieza_y + 27;
  1443. int f_blast3_y = frieza_y + 27;
  1444. int f_blast4_y = frieza_y + 27;
  1445. int f_blast_speed = 35;
  1446. int f_blast4 = 0;
  1447. int f_b = 0;
  1448.  
  1449. int f_b1 = 0;
  1450. int f_b2 = 0;
  1451. int f_b3 = 0;
  1452. int f_b4 = 0;
  1453. int f_ap;
  1454. int ff = 0;
  1455. int ff1 = 0;
  1456. int ff2 = 0;
  1457. int ff3 = 0;
  1458. int ff4 = 0;
  1459. void frieza_blast() {
  1460.  
  1461.  
  1462. if (frieza_y < 180) {
  1463. ff = 0;
  1464. f_b = f_blast;
  1465. f_blast_x = frieza_x - 20;
  1466. f_blast_y = frieza_y + 27;
  1467. f_ap = 2;
  1468. }
  1469. if (frieza_y > 180 && frieza_y < 350) {
  1470. f_ap = 0;
  1471. }
  1472. if (frieza_y > 350 && frieza_y < 420) {
  1473. ff1 = 0;
  1474. f_b1 = f_blast1;
  1475. f_blast1_x = frieza_x - 20;
  1476. f_blast1_y = frieza_y + 27;
  1477. f_ap = 1;
  1478.  
  1479. }
  1480. if (frieza_y > 430 && frieza_y < 480) {
  1481. ff2 = 0;
  1482. f_b2 = f_blast2;
  1483. f_blast2_x = frieza_x - 20;
  1484. f_blast2_y = frieza_y + 27;
  1485. f_ap = 2;
  1486. }
  1487. if (frieza_y > 490 && frieza_y < 560) {
  1488. ff3 = 0;
  1489. f_b3 = f_blast3;
  1490. f_blast3_x = frieza_x - 20;
  1491. f_blast3_y = frieza_y + 27;
  1492. f_ap = 1;
  1493. }
  1494. if (frieza_y > 560 && frieza_y < 650) {
  1495. f_ap = 0;
  1496. }
  1497.  
  1498. if (frieza_y > 650) {
  1499. ff4 = 0;
  1500. f_b4 = f_blast4;
  1501. f_blast4_x = frieza_x - 20;
  1502. f_blast4_y = frieza_y + 27;
  1503. f_ap = 2;
  1504. }
  1505.  
  1506.  
  1507.  
  1508. if (ff == 0) {
  1509. if (f_b == f_blast) {
  1510. f_blast_x -= f_blast_speed;
  1511. }
  1512. }
  1513. else if (ff == 1) {
  1514. f_blast_x = 2300;
  1515. }
  1516. if (ff1 == 0) {
  1517. if (f_b == f_blast1) {
  1518. f_blast1_x -= f_blast_speed;
  1519. }
  1520. }
  1521. else if (ff1 == 1) {
  1522. f_blast1_x = 2300;
  1523. }
  1524. if (ff2 == 0) {
  1525. if (f_b == f_blast2) {
  1526. f_blast2_x -= f_blast_speed;
  1527. }
  1528. }
  1529. else if (ff2 == 1) {
  1530. f_blast2_x = 2300;
  1531. }
  1532. if (ff3 == 0) {
  1533. if (f_b == f_blast3) {
  1534. f_blast3_x -= f_blast_speed;
  1535. }
  1536. }
  1537. else if (ff3 == 1) {
  1538. f_blast3_x = 2300;
  1539. }
  1540. if (ff4 == 0) {
  1541. if (f_b == f_blast4) {
  1542. f_blast4_x -= f_blast_speed;
  1543. }
  1544. }
  1545. else if (ff4 == 1) {
  1546. f_blast4_x = 2300;
  1547. }
  1548. }
  1549.  
  1550.  
  1551.  
  1552.  
  1553. void frieza_blast_goku_blast() {
  1554.  
  1555. if ((blast_x >= f_blast_x - 10 && blast_x <= f_blast_x + 44) && (blast_y >= f_blast_y - 20 && blast_y <= f_blast_y + 80)) {
  1556.  
  1557. blast_x = 1300;
  1558. score += ss;
  1559. ff = 1;
  1560.  
  1561. }
  1562. else if ((blast1_x >= f_blast_x - 10 && blast1_x <= f_blast_x + 44) && (blast1_y >= f_blast_y - 20 && blast1_y <= f_blast_y + 80)) {
  1563. blast1_x = 1300;
  1564. score += ss;
  1565. ff = 1;
  1566. }
  1567. else if ((blast2_x >= f_blast_x - 10 && blast2_x <= f_blast_x + 44) && (blast2_y >= f_blast_y - 20 && blast2_y <= f_blast_y + 80)) {
  1568. blast2_x = 1300;
  1569. score += ss;
  1570. ff = 1;
  1571. }
  1572. else if ((blast3_x >= f_blast_x - 10 && blast3_x <= f_blast_x + 44) && (blast3_y >= f_blast_y - 20 && blast3_y <= f_blast_y + 80)) {
  1573. blast3_x = 1300;
  1574. score += ss;
  1575. ff = 1;
  1576. }
  1577. else if ((blast4_x >= f_blast_x - 10 && blast4_x <= f_blast_x + 44) && (blast4_y >= f_blast_y - 20 && blast4_y <= f_blast_y + 80)) {
  1578. blast4_x = 1300;
  1579. score += ss;
  1580. ff = 1;
  1581. }
  1582. else if ((blast5_x >= f_blast_x - 10 && blast5_x <= f_blast_x + 44) && (blast5_y >= f_blast_y - 20 && blast5_y <= f_blast_y + 80)) {
  1583. blast5_x = 1300;
  1584. score += ss;
  1585. ff = 1;
  1586. }
  1587. else if ((blast6_x >= f_blast_x - 10 && blast6_x <= f_blast_x + 44) && (blast6_y >= f_blast_y - 20 && blast6_y <= f_blast_y + 80)) {
  1588. blast6_x = 1300;
  1589. score += ss;
  1590. ff = 1;
  1591. }
  1592. else if ((blast7_x >= f_blast_x - 10 && blast7_x <= f_blast_x + 44) && (blast7_y >= f_blast_y - 20 && blast7_y <= f_blast_y + 80)) {
  1593. blast7_x = 1300;
  1594. score += ss;
  1595. ff = 1;
  1596. }
  1597. else if ((blast8_x >= f_blast_x - 10 && blast8_x <= f_blast_x + 44) && (blast8_y >= f_blast_y - 20 && blast8_y <= f_blast_y + 80)) {
  1598. blast8_x = 1300;
  1599. score += ss;
  1600. ff = 1;
  1601. }
  1602. else if ((blast9_x >= f_blast_x - 10 && blast9_x <= f_blast_x + 44) && (blast9_y >= f_blast_y - 20 && blast9_y <= f_blast_y + 80)) {
  1603. blast9_x = 1300;
  1604. score += ss;
  1605. ff = 1;
  1606. }
  1607.  
  1608.  
  1609.  
  1610.  
  1611. else if ((blast_x >= f_blast1_x - 10 && blast_x <= f_blast1_x + 44) && (blast_y >= f_blast1_y - 20 && blast_y <= f_blast1_y + 80)) {
  1612. blast_x = 1300;
  1613. score += ss;
  1614. ff1 = 1;
  1615. }
  1616. else if ((blast1_x >= f_blast1_x - 10 && blast1_x <= f_blast1_x + 44) && (blast1_y >= f_blast1_y - 20 && blast1_y <= f_blast1_y + 80)) {
  1617. blast1_x = 1300;
  1618. score += ss;
  1619. ff1 = 1;
  1620. }
  1621. else if ((blast2_x >= f_blast1_x - 10 && blast2_x <= f_blast1_x + 44) && (blast2_y >= f_blast1_y - 20 && blast2_y <= f_blast1_y + 80)) {
  1622. blast2_x = 1300;
  1623. score += ss;
  1624. ff1 = 1;
  1625.  
  1626. }
  1627. else if ((blast3_x >= f_blast1_x - 10 && blast3_x <= f_blast1_x + 44) && (blast3_y >= f_blast1_y - 20 && blast3_y <= f_blast1_y + 80)) {
  1628. blast3_x = 1300;
  1629. score += ss;
  1630. ff1 = 1;
  1631. }
  1632. else if ((blast4_x >= f_blast1_x - 10 && blast4_x <= f_blast1_x + 44) && (blast4_y >= f_blast1_y - 20 && blast4_y <= f_blast1_y + 80)) {
  1633. blast4_x = 1300;
  1634. score += ss;
  1635. ff1 = 1;
  1636. }
  1637. else if ((blast5_x >= f_blast1_x - 10 && blast5_x <= f_blast1_x + 44) && (blast5_y >= f_blast1_y - 20 && blast5_y <= f_blast1_y + 80)) {
  1638. blast5_x = 1300;
  1639. score += ss;
  1640. ff1 = 1;
  1641. }
  1642. else if ((blast6_x >= f_blast1_x - 10 && blast6_x <= f_blast1_x + 44) && (blast6_y >= f_blast1_y - 20 && blast6_y <= f_blast1_y + 80)) {
  1643. blast6_x = 1300;
  1644. score += ss;
  1645. ff1 = 1;
  1646. }
  1647. else if ((blast7_x >= f_blast1_x - 10 && blast7_x <= f_blast1_x + 44) && (blast7_y >= f_blast1_y - 20 && blast7_y <= f_blast1_y + 80)) {
  1648. blast7_x = 1300;
  1649. score += ss;
  1650. ff1 = 1;
  1651. }
  1652. else if ((blast8_x >= f_blast1_x - 10 && blast8_x <= f_blast1_x + 44) && (blast8_y >= f_blast1_y - 20 && blast8_y <= f_blast1_y + 80)) {
  1653. blast8_x = 1300;
  1654. score += ss;
  1655. ff1 = 1;
  1656. }
  1657. else if ((blast9_x >= f_blast1_x - 10 && blast9_x <= f_blast1_x + 44) && (blast9_y >= f_blast1_y - 20 && blast9_y <= f_blast1_y + 80)) {
  1658. blast9_x = 1300;
  1659. score += ss;
  1660. ff1 = 1;
  1661. }
  1662.  
  1663. else if ((blast_x >= f_blast2_x - 10 && blast_x <= f_blast2_x + 44) && (blast_y >= f_blast2_y - 20 && blast_y <= f_blast2_y + 80)) {
  1664.  
  1665. blast_x = 1300;
  1666. score += ss;
  1667. ff2 = 1;
  1668. }
  1669. else if ((blast1_x >= f_blast2_x - 10 && blast1_x <= f_blast2_x + 44) && (blast1_y >= f_blast2_y - 20 && blast1_y <= f_blast2_y + 80)) {
  1670. blast1_x = 1300;
  1671. score += ss;
  1672. ff2 = 1;
  1673. }
  1674. else if ((blast2_x >= f_blast2_x - 10 && blast2_x <= f_blast2_x + 44) && (blast2_y >= f_blast2_y - 20 && blast2_y <= f_blast2_y + 80)) {
  1675. blast2_x = 1300;
  1676. score += ss;
  1677. ff2 = 1;
  1678.  
  1679. }
  1680. else if ((blast3_x >= f_blast2_x - 10 && blast3_x <= f_blast2_x + 44) && (blast3_y >= f_blast2_y - 20 && blast3_y <= f_blast2_y + 80)) {
  1681. blast3_x = 1300;
  1682. score += ss;
  1683. ff2 = 1;
  1684. }
  1685. else if ((blast4_x >= f_blast2_x - 10 && blast4_x <= f_blast2_x + 44) && (blast4_y >= f_blast2_y - 20 && blast4_y <= f_blast2_y + 80)) {
  1686. blast4_x = 1300;
  1687. score += ss;
  1688. ff2 = 1;
  1689. }
  1690. else if ((blast5_x >= f_blast2_x - 10 && blast5_x <= f_blast2_x + 44) && (blast5_y >= f_blast2_y - 20 && blast5_y <= f_blast2_y + 80)) {
  1691. blast5_x = 1300;
  1692. score += ss;
  1693. ff2 = 1;
  1694. }
  1695. else if ((blast6_x >= f_blast2_x - 10 && blast6_x <= f_blast2_x + 44) && (blast6_y >= f_blast2_y - 20 && blast6_y <= f_blast2_y + 80)) {
  1696. blast6_x = 1300;
  1697. score += ss;
  1698. ff2 = 1;
  1699. }
  1700. else if ((blast7_x >= f_blast2_x - 10 && blast7_x <= f_blast2_x + 44) && (blast7_y >= f_blast2_y - 20 && blast7_y <= f_blast2_y + 80)) {
  1701. blast7_x = 1300;
  1702. score += ss;
  1703. ff2 = 1;
  1704. }
  1705. else if ((blast8_x >= f_blast2_x - 10 && blast8_x <= f_blast2_x + 44) && (blast8_y >= f_blast2_y - 20 && blast8_y <= f_blast2_y + 80)) {
  1706. blast8_x = 1300;
  1707. score += ss;
  1708. ff2 = 1;
  1709. }
  1710. else if ((blast9_x >= f_blast2_x - 10 && blast9_x <= f_blast2_x + 44) && (blast9_y >= f_blast2_y - 20 && blast9_y <= f_blast2_y + 80)) {
  1711. blast9_x = 1300;
  1712. score += ss;
  1713. ff2 = 1;
  1714. }
  1715.  
  1716. else if ((blast_x >= f_blast3_x - 10 && blast_x <= f_blast3_x + 44) && (blast_y >= f_blast3_y - 20 && blast_y <= f_blast3_y + 80)) {
  1717.  
  1718. blast_x = 1300;
  1719. score += ss;
  1720. ff3 = 1;
  1721. }
  1722. else if ((blast1_x >= f_blast3_x - 10 && blast1_x <= f_blast3_x + 44) && (blast1_y >= f_blast3_y - 20 && blast1_y <= f_blast3_y + 80)) {
  1723. blast1_x = 1300;
  1724. score += ss;
  1725. ff3 = 1;
  1726. }
  1727. else if ((blast2_x >= f_blast3_x - 10 && blast2_x <= f_blast3_x + 44) && (blast2_y >= f_blast3_y - 20 && blast2_y <= f_blast3_y + 80)) {
  1728. blast2_x = 1300;
  1729. score += ss;
  1730. ff3 = 1;
  1731.  
  1732. }
  1733. else if ((blast3_x >= f_blast3_x - 10 && blast3_x <= f_blast3_x + 44) && (blast3_y >= f_blast3_y - 20 && blast3_y <= f_blast3_y + 80)) {
  1734. blast3_x = 1300;
  1735. score += ss;
  1736. ff3 = 1;
  1737. }
  1738. else if ((blast4_x >= f_blast3_x - 10 && blast4_x <= f_blast3_x + 44) && (blast4_y >= f_blast3_y - 20 && blast4_y <= f_blast3_y + 80)) {
  1739. blast4_x = 1300;
  1740. score += ss;
  1741. ff3 = 1;
  1742. }
  1743. else if ((blast5_x >= f_blast3_x - 10 && blast5_x <= f_blast3_x + 44) && (blast5_y >= f_blast3_y - 20 && blast5_y <= f_blast3_y + 80)) {
  1744. blast5_x = 1300;
  1745. score += ss;
  1746. ff3 = 1;
  1747. }
  1748. else if ((blast6_x >= f_blast3_x - 10 && blast6_x <= f_blast3_x + 44) && (blast6_y >= f_blast3_y - 20 && blast6_y <= f_blast3_y + 80)) {
  1749. blast6_x = 1300;
  1750. score += ss;
  1751. ff3 = 1;
  1752. }
  1753. else if ((blast7_x >= f_blast3_x - 10 && blast7_x <= f_blast3_x + 44) && (blast7_y >= f_blast3_y - 20 && blast7_y <= f_blast3_y + 80)) {
  1754. blast7_x = 1300;
  1755. score += ss;
  1756. ff3 = 1;
  1757. }
  1758. else if ((blast8_x >= f_blast3_x - 10 && blast8_x <= f_blast3_x + 44) && (blast8_y >= f_blast3_y - 20 && blast8_y <= f_blast3_y + 80)) {
  1759. blast8_x = 1300;
  1760. score += ss;
  1761. ff3 = 1;
  1762. }
  1763. else if ((blast9_x >= f_blast3_x - 10 && blast9_x <= f_blast3_x + 44) && (blast9_y >= f_blast3_y - 20 && blast9_y <= f_blast3_y + 80)) {
  1764. blast9_x = 1300;
  1765. score += ss;
  1766. ff3 = 1;
  1767. }
  1768.  
  1769.  
  1770. else if ((blast_x >= f_blast4_x - 10 && blast_x <= f_blast4_x + 44) && (blast_y >= f_blast4_y - 20 && blast_y <= f_blast4_y + 80)) {
  1771.  
  1772. blast_x = 1300;
  1773. score += ss;
  1774. ff4 = 1;
  1775. }
  1776. else if ((blast1_x >= f_blast4_x - 10 && blast1_x <= f_blast4_x + 44) && (blast1_y >= f_blast4_y - 20 && blast1_y <= f_blast4_y + 80)) {
  1777. blast1_x = 1300;
  1778. score += ss;
  1779. ff4 = 1;
  1780. }
  1781. else if ((blast2_x >= f_blast4_x - 10 && blast2_x <= f_blast4_x + 44) && (blast2_y >= f_blast4_y - 20 && blast2_y <= f_blast4_y + 80)) {
  1782. blast2_x = 1300;
  1783. score += ss;
  1784. ff4 = 1;
  1785.  
  1786. }
  1787. else if ((blast3_x >= f_blast4_x - 10 && blast3_x <= f_blast4_x + 44) && (blast3_y >= f_blast4_y - 20 && blast3_y <= f_blast4_y + 80)) {
  1788. blast3_x = 1300;
  1789. score += ss;
  1790. ff4 = 1;
  1791. }
  1792. else if ((blast4_x >= f_blast4_x - 10 && blast4_x <= f_blast4_x + 44) && (blast4_y >= f_blast4_y - 20 && blast4_y <= f_blast4_y + 80)) {
  1793. blast4_x = 1300;
  1794. score += ss;
  1795. ff4 = 1;
  1796. }
  1797. else if ((blast5_x >= f_blast4_x - 10 && blast5_x <= f_blast4_x + 44) && (blast5_y >= f_blast4_y - 20 && blast5_y <= f_blast4_y + 80)) {
  1798. blast5_x = 1300;
  1799. score += ss;
  1800. ff4 = 1;
  1801. }
  1802. else if ((blast6_x >= f_blast4_x - 10 && blast6_x <= f_blast4_x + 44) && (blast6_y >= f_blast4_y - 20 && blast6_y <= f_blast4_y + 80)) {
  1803. blast6_x = 1300;
  1804. score += ss;
  1805. ff4 = 1;
  1806. }
  1807. else if ((blast7_x >= f_blast4_x - 10 && blast7_x <= f_blast4_x + 44) && (blast7_y >= f_blast4_y - 20 && blast7_y <= f_blast4_y + 80)) {
  1808. blast7_x = 1300;
  1809. score += ss;
  1810. ff4 = 1;
  1811. }
  1812. else if ((blast8_x >= f_blast4_x - 10 && blast8_x <= f_blast4_x + 44) && (blast8_y >= f_blast4_y - 20 && blast8_y <= f_blast4_y + 80)) {
  1813. blast8_x = 1300;
  1814. score += ss;
  1815. ff4 = 1;
  1816. }
  1817. else if ((blast9_x >= f_blast4_x - 10 && blast9_x <= f_blast4_x + 44) && (blast9_y >= f_blast4_y - 20 && blast9_y <= f_blast4_y + 80)) {
  1818. blast9_x = 1300;
  1819. score += ss;
  1820. ff4 = 1;
  1821. }
  1822.  
  1823. }
  1824.  
  1825.  
  1826. int f_damage = 100;
  1827.  
  1828. void frieza_hit(){
  1829. if ((blast_x >= frieza_x + 5 && blast_x <= frieza_x + 60) && (blast_y >= frieza_y - 20 && blast_y <= frieza_y + 70)) {
  1830. frieza_life -= f_damage;
  1831. blast_x = 1300;
  1832. }
  1833. if ((blast1_x >= frieza_x + 5 && blast1_x <= frieza_x + 60) && (blast1_y >= frieza_y - 20 && blast1_y <= frieza_y + 70)) {
  1834. frieza_life -= f_damage;
  1835. blast1_x = 1300;
  1836. }
  1837. if ((blast2_x >= frieza_x + 5 && blast2_x <= frieza_x + 60) && (blast2_y >= frieza_y - 20 && blast2_y <= frieza_y + 70)) {
  1838. frieza_life -= f_damage;
  1839. blast2_x = 1300;
  1840. }
  1841. if ((blast3_x >= frieza_x + 5 && blast3_x <= frieza_x + 60) && (blast3_y >= frieza_y - 20 && blast3_y <= frieza_y + 70)) {
  1842. frieza_life -= f_damage;
  1843. blast3_x = 1300;
  1844. }
  1845. if ((blast4_x >= frieza_x + 5 && blast4_x <= frieza_x + 60) && (blast4_y >= frieza_y - 20 && blast4_y <= frieza_y + 70)) {
  1846. frieza_life -= f_damage;
  1847. blast4_x = 1300;
  1848. }
  1849. if ((blast5_x >= frieza_x + 5 && blast5_x <= frieza_x + 60) && (blast5_y >= frieza_y - 20 && blast5_y <= frieza_y + 70)) {
  1850. frieza_life -= f_damage;
  1851. blast5_x = 1300;
  1852. }
  1853. if ((blast6_x >= frieza_x + 5 && blast6_x <= frieza_x + 60) && (blast6_y >= frieza_y - 20 && blast6_y <= frieza_y + 70)) {
  1854. frieza_life -= f_damage;
  1855. blast6_x = 1300;
  1856. }
  1857. if ((blast7_x >= frieza_x + 5 && blast7_x <= frieza_x + 60) && (blast7_y >= frieza_y - 20 && blast7_y <= frieza_y + 70)) {
  1858. frieza_life -= f_damage;
  1859. blast7_x = 1300;
  1860. }
  1861. if ((blast8_x >= frieza_x + 5 && blast8_x <= frieza_x + 60) && (blast8_y >= frieza_y - 20 && blast8_y <= frieza_y + 60)) {
  1862. frieza_life -= f_damage;
  1863. blast8_x = 1300;
  1864. }
  1865. if ((blast9_x >= frieza_x + 5 && blast9_x <= frieza_x + 60) && (blast9_y >= frieza_y - 20 && blast9_y <= frieza_y + 60)) {
  1866. frieza_life -= f_damage;
  1867. blast9_x = 1300;
  1868. }
  1869. }
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875. void goku_hit_frieza_blast() {
  1876.  
  1877. if ((f_blast_x >= goku_x - 30 && f_blast_x <= goku_x + 35) && (f_blast_y >= jump_y - 20 && f_blast_y <= jump_y + 70)) {
  1878. ff = 1;
  1879. damage -= 50;
  1880. }
  1881. if ((f_blast1_x >= goku_x - 30 && f_blast1_x <= goku_x + 35) && (f_blast1_y >= jump_y - 20 && f_blast1_y <= jump_y + 70)) {
  1882. ff1 = 1;
  1883. damage -= 50;
  1884. }
  1885. if ((f_blast2_x >= goku_x - 30 && f_blast2_x <= goku_x + 35) && (f_blast2_y >= jump_y - 20 && f_blast2_y <= jump_y + 70)) {
  1886. ff2 = 1;
  1887. damage -= 50;
  1888. }
  1889. if ((f_blast3_x >= goku_x - 30 && f_blast3_x <= goku_x + 35) && (f_blast3_y >= jump_y - 20 && f_blast3_y <= jump_y + 70)) {
  1890. ff3 = 1;
  1891. damage -= 50;
  1892. }
  1893. if ((f_blast4_x >= goku_x - 30 && f_blast4_x <= goku_x + 35) && (f_blast4_y >= jump_y - 20 && f_blast4_y <= jump_y + 70)) {
  1894. ff4 = 1;
  1895. damage -= 50;
  1896. }
  1897. }
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903. /*
  1904. function iDraw() is called again and again by the system.
  1905. */
  1906.  
  1907.  
  1908. void iDraw()
  1909. {
  1910. iClear();
  1911. if (damage <= 0) {
  1912. go = 1;
  1913. }
  1914. if (super == 2)
  1915. {
  1916. blast_speed = 40;
  1917. jd = 27;
  1918. }
  1919. else
  1920. {
  1921. blast_speed = 25;
  1922. jd = 25;
  1923. }
  1924. if (go == 0 && pause_state == 1 && !(sp_sc >= 0 && sp_sc <= 2) && !(st_sc >= 0 && st_sc <= 4))
  1925. {
  1926. iClear();
  1927. iShowBMP(0, 24, pause_str);
  1928. pause_co++;
  1929. if (pause_co % 3 == 0)
  1930. {
  1931. pause_str[0] = '\0';
  1932. strcat(pause_str, "pause");
  1933. char pa[10];
  1934. strcat(pause_str, itoa((pauseC + 1), pa, 10));
  1935. strcat(pause_str, ".bmp");
  1936. if (pi % 2 == 0)
  1937. pauseC++;
  1938. else
  1939. pauseC--;
  1940. if (pauseC == 5)
  1941. pi++;
  1942. if (pauseC == 0)
  1943. pi++;
  1944. }
  1945. }
  1946. else if (go == 1) {
  1947. iClear();
  1948. iShowBMP(0, 24, go_str);
  1949. iShowBMP(0, 24, go_str);
  1950. go_co++;
  1951.  
  1952. if (go_co % 3 == 0)
  1953. {
  1954. go_str[0] = '\0';
  1955. strcat(go_str, "go");
  1956. char gop[10];
  1957. strcat(go_str, itoa((g_co + 1), gop, 10));
  1958. strcat(go_str, ".bmp");
  1959. if (g_co < 27)
  1960. g_co++;
  1961.  
  1962. }
  1963. }
  1964. else if (sp_sc >= 0 && sp_sc <= 2){
  1965. if (sp_sc == 0)
  1966. {
  1967. aust_co++;
  1968. iShowBMP(0, 0, au_str);
  1969. iShowBMP(0, 0, au_str);
  1970. if (aust_co % 2 == 0)
  1971. {
  1972. if (aust_po != 1)
  1973. aco++;
  1974. else{
  1975. if (aco != 1 || aub == 5)
  1976. aco--;
  1977. else
  1978. aub++;
  1979. }
  1980. au_str[0] = '\0';
  1981. strcat(au_str, "aust");
  1982. char au[10];
  1983. strcat(au_str, itoa((aco), au, 10));
  1984. strcat(au_str, ".bmp");
  1985.  
  1986. if (aco >= 11)
  1987. aust_po = 1;
  1988. if (aco <= 0){
  1989. sp_sc++;
  1990. }
  1991. }
  1992. }
  1993.  
  1994. if (sp_sc == 1)
  1995. {
  1996. niloy_co++;
  1997. iShowBMP(0, 0, ni_str);
  1998. iShowBMP(0, 0, ni_str);
  1999. if (niloy_co % 2 == 0)
  2000. {
  2001. if (niloy_po != 1)
  2002. nco++;
  2003. else{
  2004. if (nco != 1 || nib == 5)
  2005. nco--;
  2006. else
  2007. nib++;
  2008. }
  2009. ni_str[0] = '\0';
  2010. strcat(ni_str, "niloy");
  2011. char au[10];
  2012. strcat(ni_str, itoa((nco), au, 10));
  2013. strcat(ni_str, ".bmp");
  2014.  
  2015. if (nco >= 11)
  2016. niloy_po = 1;
  2017. if (nco <= 0)
  2018. sp_sc++;
  2019. }
  2020. }
  2021.  
  2022. if (sp_sc == 2)
  2023. {
  2024. tokey_co++;
  2025. iShowBMP(0, 0, to_str);
  2026. iShowBMP(0, 0, to_str);
  2027. if (tokey_co % 2 == 0)
  2028. {
  2029. if (tokey_po != 1)
  2030. tco++;
  2031. else{
  2032. if (tco != 1 || tob == 5)
  2033. tco--;
  2034. else
  2035. tob++;
  2036. }
  2037. to_str[0] = '\0';
  2038. strcat(to_str, "tokey");
  2039. char au[10];
  2040. strcat(to_str, itoa((tco), au, 10));
  2041. strcat(to_str, ".bmp");
  2042.  
  2043. if (tco >= 11)
  2044. tokey_po = 1;
  2045. if (tco <= 0)
  2046. sp_sc++;
  2047. }
  2048. }
  2049. }
  2050.  
  2051. else if (st_sc >= 0 && st_sc <= 4){
  2052. if (st_sc == 0){
  2053. iClear();
  2054. iShowBMP(0, 24, pr_str);
  2055. press_co++;
  2056. if (press_co % 3 == 0)
  2057. {
  2058. pr_str[0] = '\0';
  2059. strcat(pr_str, "N");
  2060. char pr[10];
  2061. strcat(pr_str, itoa((prc + 1), pr, 10));
  2062. strcat(pr_str, ".bmp");
  2063. if (pri % 2 == 0)
  2064. prc++;
  2065. else
  2066. prc--;
  2067. if (prc == 4)
  2068. pri++;
  2069. if (prc == 0)
  2070. pri++;
  2071.  
  2072. }
  2073. }
  2074. else if (st_sc == 1)
  2075. {
  2076. iClear();
  2077. iShowBMP(0, 24, S_str);
  2078. press_co++;
  2079. if (press_co % 3 == 0)
  2080. {
  2081. S_str[0] = '\0';
  2082. strcat(S_str, "S");
  2083. char Spr[10];
  2084. strcat(S_str, itoa((Sc + 1), Spr, 10));
  2085. strcat(S_str, ".bmp");
  2086. if (Si % 2 == 0)
  2087. Sc++;
  2088. else
  2089. Sc--;
  2090. if (Sc == 4)
  2091. Si++;
  2092. if (Sc == 0)
  2093. Si++;
  2094. }
  2095. }
  2096.  
  2097. else if (st_sc == 2)
  2098. {
  2099. iClear();
  2100. iShowBMP(0, 24, I_str);
  2101. press_co++;
  2102. if (press_co % 3 == 0)
  2103. {
  2104. I_str[0] = '\0';
  2105. strcat(I_str, "I");
  2106. char Ipr[10];
  2107. strcat(I_str, itoa((Ic + 1), Ipr, 10));
  2108. strcat(I_str, ".bmp");
  2109. if (Ii % 2 == 0)
  2110. Ic++;
  2111. else
  2112. Ic--;
  2113. if (Ic == 4)
  2114. Ii++;
  2115. if (Ic == 0)
  2116. Ii++;
  2117. }
  2118. }
  2119. else if (st_sc == 3)
  2120. {
  2121. iClear();
  2122. iShowBMP(0, 24, H_str);
  2123. press_co++;
  2124. if (press_co % 3 == 0)
  2125. {
  2126. H_str[0] = '\0';
  2127. strcat(H_str, "H");
  2128. char Hpr[10];
  2129. strcat(H_str, itoa((Hc + 1), Hpr, 10));
  2130. strcat(H_str, ".bmp");
  2131. if (Hi % 2 == 0)
  2132. Hc++;
  2133. else
  2134. Hc--;
  2135. if (Hc == 4)
  2136. Hi++;
  2137. if (Hc == 0)
  2138. Hi++;
  2139. }
  2140. }
  2141. else if (st_sc == 4)
  2142. {
  2143. iClear();
  2144. iShowBMP(0, 24, Q_str);
  2145. press_co++;
  2146. if (press_co % 3 == 0)
  2147. {
  2148. Q_str[0] = '\0';
  2149. strcat(Q_str, "Q");
  2150. char Qpr[10];
  2151. strcat(Q_str, itoa((Qc + 1), Qpr, 10));
  2152. strcat(Q_str, ".bmp");
  2153. if (Qi % 2 == 0)
  2154. Qc++;
  2155. else
  2156. Qc--;
  2157. if (Qc == 4)
  2158. Qi++;
  2159. if (Qc == 0)
  2160. Qi++;
  2161. }
  2162. }
  2163. }
  2164.  
  2165. else if (super == 2 && s_anim == 1 && !(st_sc >= 0 && st_sc <= 4)){
  2166. iClear();
  2167. iShowBMP(0, 24, sup_str);
  2168. iShowBMP(0, 24, sup_str);
  2169. sani_co++;
  2170.  
  2171. if (sani_co % 2 == 0)
  2172. {
  2173. sup_str[0] = '\0';
  2174. strcat(sup_str, "SS");
  2175. char sup[10];
  2176. strcat(sup_str, itoa((sco + 1), sup, 10));
  2177. strcat(sup_str, ".bmp");
  2178. sco++;
  2179. if (sco >= 147)
  2180. s_anim = 3;
  2181. }
  2182. }
  2183. else if (gol_anim == 1)
  2184. {
  2185. iClear();
  2186. iShowBMP(0, 24, gol_str);
  2187. iShowBMP(0, 24, gol_str);
  2188. iShowBMP(0, 24, gol_str);
  2189. gol_c++;
  2190.  
  2191. if (gol_c % 2 == 0)
  2192. {
  2193. gol_str[0] = '\0';
  2194. strcat(gol_str, "GT");
  2195. char gol[10];
  2196. strcat(gol_str, itoa((gco + 1), gol, 10));
  2197. strcat(gol_str, ".bmp");
  2198. gco++;
  2199. if (gco >= 178)
  2200. gol_anim = 3;
  2201. }
  2202. }
  2203. else if (go == 0) {
  2204.  
  2205. cell_move();
  2206. cell_move2();
  2207. cell_move3();
  2208.  
  2209. cell_hit();
  2210. cell1_hit();
  2211. cell2_hit();
  2212. frieza_move();
  2213. frieza_blast();
  2214. frieza_blast_goku_blast();
  2215. goku_hit_frieza_blast();
  2216.  
  2217. groundMovement();
  2218.  
  2219. goku_hit();
  2220. spike_move();
  2221. senzu_bean();
  2222. senzu_hit();
  2223. obstacle();
  2224. goku_run_obstacle_s();
  2225. frieza_hit();
  2226. goku_obstacle_hit();
  2227. blast_obs();
  2228.  
  2229. run_co++;
  2230. background();
  2231. spike_hit();
  2232. dragon_ball_move();
  2233. dragon_ball_hit();
  2234. iSetColor(0, 0, 0);
  2235. iFilledRectangle(0, 0, 1280, 768);
  2236.  
  2237.  
  2238. iShowBMP(bck_x, ground_y, "bck1.bmp");
  2239. iShowBMP(bck_x1, ground_y, "bck2.bmp");
  2240. iShowBMP(bck_x2, ground_y, "bck3.bmp");
  2241. iShowBMP(bck_x3, ground_y, "bck4.bmp");
  2242. iShowBMP(bck_x4, ground_y, "bck5.bmp");
  2243. iShowBMP(bck_x5, ground_y, "bck6.bmp");
  2244. iShowBMP(bck_x6, ground_y, "bck7.bmp");
  2245. iShowBMP(bck_x7, ground_y, "bck8.bmp");
  2246. iShowBMP(bck_x8, ground_y, "bck9.bmp");
  2247. iShowBMP(bck_x9, ground_y, "bck10.bmp");
  2248. iShowBMP(bck_x10, ground_y, "bck11.bmp");
  2249.  
  2250. iShowBMP(0, 0, "bck1.bmp");
  2251.  
  2252.  
  2253. iShowBMPWOBGWP(ground_x, ground_y, "gr1.bmp", 0);
  2254. iShowBMPWOBGWP(ground_x1, ground_y, "gr2.bmp", 0);
  2255. iShowBMPWOBGWP(ground_x2, ground_y, "gr3.bmp", 0);
  2256. iShowBMPWOBGWP(ground_x3, ground_y, "gr4.bmp", 0);
  2257. iShowBMPWOBGWP(ground_x4, ground_y, "gr5.bmp", 0);
  2258. iShowBMPWOBGWP(ground_x5, ground_y, "gr6.bmp", 0);
  2259. iShowBMPWOBGWP(ground_x6, ground_y, "gr7.bmp", 0);
  2260. iShowBMPWOBGWP(ground_x7, ground_y, "gr8.bmp", 0);
  2261. iShowBMPWOBGWP(ground_x8, ground_y, "gr9.bmp", 0);
  2262. iShowBMPWOBGWP(ground_x9, ground_y, "gr10.bmp", 0);
  2263. if (obs == 1) {
  2264. if (obs_bl == 0)
  2265. iShowBMPWOBGWP(obs1_x, obs_y, "obs.bmp", 0);
  2266. else if (obs_bl == 1)
  2267. iShowBMPWOBGWP(obs1_x, obs_y, "obs1.bmp", 0);
  2268. else if (obs_bl == 2)
  2269. iShowBMPWOBGWP(obs1_x, obs_y, "obs2.bmp", 0);
  2270. else if (obs_bl == 3)
  2271. iShowBMPWOBGWP(obs1_x, obs_y, "obs3.bmp", 0);
  2272. }
  2273. else if (obs == 2) {
  2274. if (obm_bl == 0)
  2275. iShowBMPWOBGWP(obs2_x, obs_y, "obm.bmp", 0);
  2276. else if (obm_bl == 1)
  2277. iShowBMPWOBGWP(obs2_x, obs_y, "obm1.bmp", 0);
  2278. else if (obm_bl == 2)
  2279. iShowBMPWOBGWP(obs2_x, obs_y, "obm2.bmp", 0);
  2280. else if (obm_bl == 3)
  2281. iShowBMPWOBGWP(obs2_x, obs_y, "obm3.bmp", 0);
  2282. else if (obm_bl == 4)
  2283. iShowBMPWOBGWP(obs2_x, obs_y, "obm4.bmp", 0);
  2284. else if (obm_bl == 5)
  2285. iShowBMPWOBGWP(obs2_x, obs_y, "obm5.bmp", 0);
  2286. }
  2287. else if (obs == 3) {
  2288. if (obl_bl == 0)
  2289. iShowBMPWOBGWP(obs3_x, obs_y, "obl.bmp", 0);
  2290. else if (obl_bl == 1)
  2291. iShowBMPWOBGWP(obs3_x, obs_y, "obl1.bmp", 0);
  2292. else if (obl_bl == 2)
  2293. iShowBMPWOBGWP(obs3_x, obs_y, "obl2.bmp", 0);
  2294. else if (obl_bl == 3)
  2295. iShowBMPWOBGWP(obs3_x, obs_y, "obl3.bmp", 0);
  2296. else if (obl_bl == 4)
  2297. iShowBMPWOBGWP(obs3_x, obs_y, "obl4.bmp", 0);
  2298. else if (obl_bl == 5)
  2299. iShowBMPWOBGWP(obs3_x, obs_y, "obl5.bmp", 0);
  2300. else if (obl_bl == 6)
  2301. iShowBMPWOBGWP(obs3_x, obs_y, "obl6.bmp", 0);
  2302. else if (obl_bl == 7)
  2303. iShowBMPWOBGWP(obs3_x, obs_y, "obl7.bmp", 0);
  2304. }
  2305.  
  2306. if (f_ap == 1)
  2307. iShowBMPWOBG(frieza_x, frieza_y, "fb1.bmp");
  2308.  
  2309. else if (f_ap == 2)
  2310. iShowBMPWOBG(frieza_x, frieza_y, "fb2.bmp");
  2311. else if (f_ap != 1 && f_ap != 2){
  2312. iShowBMPWOBG(frieza_x, frieza_y, "frieza.bmp");
  2313. }
  2314.  
  2315.  
  2316. if (frieza_life <= 0) {
  2317. iShowBMPWOBG(200, 300, "frieza.bmp");
  2318. }
  2319. iShowBMPWOBGWP(f_blast_x, f_blast_y, "rf_Blast.bmp", 0);
  2320. iShowBMPWOBGWP(f_blast1_x, f_blast1_y, "rf_Blast.bmp", 0);
  2321. iShowBMPWOBGWP(f_blast2_x, f_blast2_y, "rf_Blast.bmp", 0);
  2322. iShowBMPWOBGWP(f_blast3_x, f_blast3_y, "rf_Blast.bmp", 0);
  2323. iShowBMPWOBGWP(f_blast4_x, f_blast4_y, "rf_Blast.bmp", 0);
  2324.  
  2325.  
  2326.  
  2327. if (d = 1 && ds == 0) {
  2328. if (db == 0) {
  2329. iShowBMPWOBGWP(db_x, db_y, "db1.bmp", 0);
  2330. }
  2331. else if (db == 1) {
  2332. iShowBMPWOBGWP(db_x, db_y, "db2.bmp", 0);
  2333. }
  2334. else if (db == 2) {
  2335. iShowBMPWOBGWP(db_x, db_y, "db3.bmp", 0);
  2336. }
  2337. else if (db == 3) {
  2338. iShowBMPWOBGWP(db_x, db_y, "db4.bmp", 0);
  2339. }
  2340. else if (db == 4) {
  2341. iShowBMPWOBGWP(db_x, db_y, "db5.bmp", 0);
  2342. }
  2343. else if (db == 5) {
  2344. iShowBMPWOBGWP(db_x, db_y, "db6.bmp", 0);
  2345. }
  2346. else if (db == 6) {
  2347. iShowBMPWOBGWP(db_x, db_y, "db7.bmp", 0);
  2348. }
  2349. }
  2350.  
  2351.  
  2352.  
  2353. if (super == 1) {
  2354. if (jumping == 0 && gr != 1 && gr1 != 1 && gr2 != 1 && gr3 != 1 && gr4 != 1 && gr5 != 1 && gr6 != 1){
  2355. if (run == 0) {
  2356. iShowBMPWOBG(goku_x, jump_y, "r1.bmp");
  2357. }
  2358. else if (run == 1) {
  2359. iShowBMPWOBG(goku_x, jump_y, "r2.bmp");
  2360. }
  2361. else if (run == 2) {
  2362. iShowBMPWOBG(goku_x, jump_y, "r3.bmp");
  2363. }
  2364. else if (run == 3) {
  2365. iShowBMPWOBG(goku_x, jump_y, "r4.bmp");
  2366. }
  2367. else if (run == 4) {
  2368. iShowBMPWOBG(goku_x, jump_y, "r5.bmp");
  2369. }
  2370. else if (run == 5) {
  2371. iShowBMPWOBG(goku_x, jump_y, "r6.bmp");
  2372. }
  2373. else if (run == 6) {
  2374. iShowBMPWOBG(goku_x, jump_y, "r7.bmp");
  2375. }
  2376. else if (run == 7) {
  2377. iShowBMPWOBG(goku_x, jump_y, "r8.bmp");
  2378. }
  2379. }
  2380. }
  2381. if (k == 0 && super == 1) {
  2382. if (run == 0) {
  2383. iShowBMPWOBG(goku_x, jump_y, "r1.bmp");
  2384. }
  2385. else if (run == 1) {
  2386. iShowBMPWOBG(goku_x, jump_y, "r2.bmp");
  2387. }
  2388. else if (run == 2) {
  2389. iShowBMPWOBG(goku_x, jump_y, "r3.bmp");
  2390. }
  2391. else if (run == 3) {
  2392. iShowBMPWOBG(goku_x, jump_y, "r4.bmp");
  2393. }
  2394. else if (run == 4) {
  2395. iShowBMPWOBG(goku_x, jump_y, "r5.bmp");
  2396. }
  2397. else if (run == 5) {
  2398. iShowBMPWOBG(goku_x, jump_y, "r6.bmp");
  2399. }
  2400. else if (run == 6) {
  2401. iShowBMPWOBG(goku_x, jump_y, "r7.bmp");
  2402. }
  2403. else if (run == 7) {
  2404. iShowBMPWOBG(goku_x, jump_y, "r8.bmp");
  2405. }
  2406.  
  2407. }
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414. if (super == 2) {
  2415. if (jumping == 0 && gr != 1 && gr1 != 1 && gr2 != 1 && gr3 != 1 && gr4 != 1 && gr5 != 1 && gr6 != 1){
  2416. if (run == 0) {
  2417. iShowBMPWOBG(goku_x, jump_y, "sr1.bmp");
  2418. }
  2419. else if (run == 1) {
  2420. iShowBMPWOBG(goku_x, jump_y, "sr2.bmp");
  2421. }
  2422. else if (run == 2) {
  2423. iShowBMPWOBG(goku_x, jump_y, "sr3.bmp");
  2424. }
  2425. else if (run == 3) {
  2426. iShowBMPWOBG(goku_x, jump_y, "sr4.bmp");
  2427. }
  2428. else if (run == 4) {
  2429. iShowBMPWOBG(goku_x, jump_y, "sr5.bmp");
  2430. }
  2431. else if (run == 5) {
  2432. iShowBMPWOBG(goku_x, jump_y, "sr6.bmp");
  2433. }
  2434. else if (run == 6) {
  2435. iShowBMPWOBG(goku_x, jump_y, "sr7.bmp");
  2436. }
  2437. else if (run == 7) {
  2438. iShowBMPWOBG(goku_x, jump_y, "sr8.bmp");
  2439. }
  2440. }
  2441. if (k == 0) {
  2442. if (run == 0) {
  2443. iShowBMPWOBG(goku_x, jump_y, "sr1.bmp");
  2444. }
  2445. else if (run == 1) {
  2446. iShowBMPWOBG(goku_x, jump_y, "sr2.bmp");
  2447. }
  2448. else if (run == 2) {
  2449. iShowBMPWOBG(goku_x, jump_y, "sr3.bmp");
  2450. }
  2451. else if (run == 3) {
  2452. iShowBMPWOBG(goku_x, jump_y, "sr4.bmp");
  2453. }
  2454. else if (run == 4) {
  2455. iShowBMPWOBG(goku_x, jump_y, "sr5.bmp");
  2456. }
  2457. else if (run == 5) {
  2458. iShowBMPWOBG(goku_x, jump_y, "sr6.bmp");
  2459. }
  2460. else if (run == 6) {
  2461. iShowBMPWOBG(goku_x, jump_y, "sr7.bmp");
  2462. }
  2463. else if (run == 7) {
  2464. iShowBMPWOBG(goku_x, jump_y, "sr8.bmp");
  2465. }
  2466.  
  2467. }
  2468. }
  2469.  
  2470.  
  2471.  
  2472. //jump
  2473. if (k == 1 && super == 1) {
  2474. if (jumping == 1) {
  2475. if (jump == 0){
  2476. iShowBMPWOBG(goku_x, jump_y, "j2.bmp");
  2477. }
  2478. else if (jump == 1) {
  2479. iShowBMPWOBG(goku_x, jump_y, "j3.bmp");
  2480. }
  2481. else if (jump == 2) {
  2482. iShowBMPWOBG(goku_x, jump_y, "j3.bmp");
  2483. }
  2484. }
  2485. else if (jumping == 2) {
  2486. if (jump == 0){
  2487. iShowBMPWOBG(goku_x, jump_y, "j5.bmp");
  2488. }
  2489. else if (jump == 1) {
  2490. iShowBMPWOBG(goku_x, jump_y, "j6.bmp");
  2491. }
  2492. else if (jump == 2) {
  2493. iShowBMPWOBG(goku_x, jump_y, "j8.bmp");
  2494. }
  2495. }
  2496. }
  2497.  
  2498.  
  2499.  
  2500. if (super == 2 && k == 1) {
  2501. if (jumping == 1) {
  2502. if (jump == 0){
  2503. iShowBMPWOBG(goku_x, jump_y, "sj2.bmp");
  2504. }
  2505. else if (jump == 1) {
  2506. iShowBMPWOBG(goku_x, jump_y, "sj3.bmp");
  2507. }
  2508. else if (jump == 2) {
  2509. iShowBMPWOBG(goku_x, jump_y, "sj3.bmp");
  2510. }
  2511. }
  2512. else if (jumping == 2) {
  2513. if (jump == 0){
  2514. iShowBMPWOBG(goku_x, jump_y, "sj5.bmp");
  2515. }
  2516. else if (jump == 1) {
  2517. iShowBMPWOBG(goku_x, jump_y, "sj6.bmp");
  2518. }
  2519. else if (jump == 2) {
  2520. iShowBMPWOBG(goku_x, jump_y, "sj8.bmp");
  2521. }
  2522. }
  2523. }
  2524.  
  2525.  
  2526. //Blast
  2527. if (super == 1){
  2528. if (blast_button != 0 && blast_button != 3)
  2529. {
  2530. gr = 1;
  2531. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2532. }
  2533. else
  2534. gr = 0;
  2535. if (blast > 5 && blast_button != 0)
  2536. {
  2537. if (blast_x < 350)
  2538. {
  2539. gr = 1;
  2540. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2541.  
  2542. }
  2543. else
  2544. gr = 0;
  2545. blast_button = 3;
  2546. if (blast_flag == 0)
  2547. {
  2548. blast_y = jump_y + 27;
  2549. blast_flag = 1;
  2550. }
  2551.  
  2552. iShowBMPWOBG(blast_x, blast_y, "blast.bmp");
  2553. if (blast_x >= 1280)
  2554. {
  2555. blast_x = 240;
  2556. blast_button = 0;
  2557. blast_flag = 0;
  2558. blast_y = 0;
  2559. }
  2560. }
  2561.  
  2562. //Blast1
  2563. if (blast1_button != 0 && blast1_button != 3)
  2564. {
  2565. gr1 = 1;
  2566. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2567. }
  2568. else
  2569. gr1 = 0;
  2570. if (blast1 > 5 && blast1_button != 0)
  2571. {
  2572. if (blast1_x < 350)
  2573. {
  2574. gr1 = 1;
  2575. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2576.  
  2577. }
  2578. else
  2579. gr1 = 0;
  2580. blast1_button = 3;
  2581. if (blast1_flag == 0)
  2582. {
  2583. blast1_y = jump_y + 27;
  2584. blast1_flag = 1;
  2585. }
  2586. iShowBMPWOBG(blast1_x, blast1_y, "blast.bmp");
  2587. if (blast1_x >= 1280)
  2588. {
  2589. blast1_x = 240;
  2590. blast1_button = 0;
  2591. blast1_flag = 0;
  2592. blast1_y = 0;
  2593. }
  2594. }
  2595.  
  2596. //Blast2
  2597.  
  2598. if (blast2_button != 0 && blast2_button != 3)
  2599. {
  2600. gr2 = 1;
  2601. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2602. }
  2603. else
  2604. gr2 = 0;
  2605. if (blast2 > 5, k, k && blast2_button != 0)
  2606. {
  2607. if (blast2_x < 350)
  2608. {
  2609. gr2 = 1;
  2610. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2611.  
  2612. }
  2613. else
  2614. gr2 = 0;
  2615. blast2_button = 3;
  2616. if (blast2_flag == 0)
  2617. {
  2618. blast2_y = jump_y + 27;
  2619. blast2_flag = 1;
  2620. }
  2621.  
  2622. iShowBMPWOBG(blast2_x, blast2_y, "blast.bmp");
  2623. if (blast2_x >= 1280)
  2624. {
  2625. blast2_x = 240;
  2626. blast2_button = 0;
  2627. blast2_flag = 0;
  2628. blast2_y = 0;
  2629. }
  2630. }
  2631.  
  2632. //Blast3
  2633. if (blast3_button != 0 && blast3_button != 3)
  2634. {
  2635. gr3 = 1;
  2636. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2637. }
  2638. else
  2639. gr3 = 0;
  2640. if (blast3 > 5 && blast3_button != 0)
  2641. {
  2642. if (blast3_x < 350)
  2643. {
  2644. gr3 = 1;
  2645. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2646.  
  2647. }
  2648. else
  2649. gr3 = 0;
  2650. blast3_button = 3;
  2651. if (blast3_flag == 0)
  2652. {
  2653. blast3_y = jump_y + 27;
  2654. blast3_flag = 1;
  2655. }
  2656.  
  2657. iShowBMPWOBG(blast3_x, blast3_y, "blast.bmp");
  2658. if (blast3_x >= 1280)
  2659. {
  2660. blast3_x = 240;
  2661. blast3_button = 0;
  2662. blast3_flag = 0;
  2663. blast3_y = 0;
  2664. }
  2665. }
  2666.  
  2667.  
  2668. //Blast4
  2669.  
  2670. if (blast4_button != 0 && blast4_button != 3)
  2671. {
  2672. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2673. gr4 = 1;
  2674. }
  2675. else
  2676. gr4 = 0;
  2677. if (blast4 > 5 && blast4_button != 0)
  2678. {
  2679. if (blast4_x < 350)
  2680. {
  2681. gr4 = 1;
  2682. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2683.  
  2684. }
  2685. else
  2686. gr4 = 0;
  2687. blast4_button = 3;
  2688. if (blast4_flag == 0)
  2689. {
  2690. blast4_y = jump_y + 27;
  2691. blast4_flag = 1;
  2692. }
  2693.  
  2694. iShowBMPWOBG(blast4_x, blast4_y, "blast.bmp");
  2695. if (blast4_x >= 1280)
  2696. {
  2697. blast4_x = 240;
  2698. blast4_button = 0;
  2699. blast4_flag = 0;
  2700. blast4_y = 0;
  2701. }
  2702. }
  2703.  
  2704.  
  2705. //Blast5
  2706.  
  2707. if (blast5_button != 0 && blast5_button != 3)
  2708. {
  2709. gr5 = 1;
  2710. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2711. }
  2712. else
  2713. gr5 = 0;
  2714. if (blast5 > 5 && blast5_button != 0)
  2715. {
  2716. if (blast5_x < 350)
  2717. {
  2718. gr5 = 1;
  2719. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2720.  
  2721. }
  2722. else
  2723. gr5 = 0;
  2724. blast5_button = 3;
  2725. if (blast5_flag == 0)
  2726. {
  2727. blast5_y = jump_y + 27;
  2728. blast5_flag = 1;
  2729. }
  2730.  
  2731. iShowBMPWOBG(blast5_x, blast5_y, "blast.bmp");
  2732. if (blast5_x >= 1280)
  2733. {
  2734. blast5_x = 240;
  2735. blast5_button = 0;
  2736. blast5_flag = 0;
  2737. blast5_y = 0;
  2738. }
  2739. }
  2740.  
  2741.  
  2742. //Blast6
  2743.  
  2744. if (blast6_button != 0 && blast6_button != 3)
  2745. {
  2746. gr6 = 1;
  2747. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2748. }
  2749. else
  2750. gr6 = 0;
  2751. if (blast6 > 5 && blast6_button != 0)
  2752. {
  2753. if (blast6_x < 350)
  2754. {
  2755. gr6 = 1;
  2756. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2757.  
  2758. }
  2759. else
  2760. gr6 = 0;
  2761. blast6_button = 3;
  2762. if (blast6_flag == 0)
  2763. {
  2764. blast6_y = jump_y + 27;
  2765. blast6_flag = 1;
  2766. }
  2767.  
  2768. iShowBMPWOBG(blast6_x, blast6_y, "blast.bmp");
  2769. if (blast6_x >= 1280)
  2770. {
  2771. blast6_x = 240;
  2772. blast6_button = 0;
  2773. blast6_flag = 0;
  2774. blast6_y = 0;
  2775. }
  2776. }
  2777.  
  2778. //Blast7
  2779.  
  2780. if (blast7_button != 0 && blast7_button != 3)
  2781. {
  2782. gr7 = 1;
  2783. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2784. }
  2785. else
  2786. gr7 = 0;
  2787. if (blast7 > 5 && blast7_button != 0)
  2788. {
  2789. if (blast7_x < 350)
  2790. {
  2791. gr7 = 1;
  2792. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2793.  
  2794. }
  2795. else
  2796. gr7 = 0;
  2797. blast7_button = 3;
  2798. if (blast7_flag == 0)
  2799. {
  2800. blast7_y = jump_y + 27;
  2801. blast7_flag = 1;
  2802. }
  2803.  
  2804. iShowBMPWOBG(blast7_x, blast7_y, "blast.bmp");
  2805. if (blast7_x >= 1280)
  2806. {
  2807. blast7_x = 240;
  2808. blast7_button = 0;
  2809. blast7_flag = 0;
  2810. blast7_y = 0;
  2811. }
  2812. }
  2813.  
  2814.  
  2815. //Blast8
  2816.  
  2817. if (blast8_button != 0 && blast8_button != 3)
  2818. {
  2819. gr8 = 1;
  2820. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2821. }
  2822. else
  2823. gr8 = 0;
  2824. if (blast8 > 5 && blast8_button != 0)
  2825. {
  2826. if (blast8_x < 350)
  2827. {
  2828. gr8 = 1;
  2829. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2830.  
  2831. }
  2832. else
  2833. gr8 = 0;
  2834. blast8_button = 3;
  2835. if (blast8_flag == 0)
  2836. {
  2837. blast8_y = jump_y + 27;
  2838. blast8_flag = 1;
  2839. }
  2840.  
  2841. iShowBMPWOBG(blast8_x, blast8_y, "blast.bmp");
  2842. if (blast8_x >= 1280)
  2843. {
  2844. blast8_x = 240;
  2845. blast8_button = 0;
  2846. blast8_flag = 0;
  2847. blast8_y = 0;
  2848. }
  2849. }
  2850.  
  2851.  
  2852. //Blast9
  2853.  
  2854. if (blast9_button != 0 && blast9_button != 3)
  2855. {
  2856. gr9 = 1;
  2857. iShowBMPWOBG(goku_x, jump_y, "b1.bmp");
  2858. }
  2859. else
  2860. gr9 = 0;
  2861. if (blast9 > 5 && blast9_button != 0)
  2862. {
  2863. if (blast9_x < 350)
  2864. {
  2865. gr9 = 1;
  2866. iShowBMPWOBG(goku_x, jump_y, "b2.bmp");
  2867.  
  2868. }
  2869. else
  2870. gr9 = 0;
  2871. blast9_button = 3;
  2872. if (blast9_flag == 0)
  2873. {
  2874. blast9_y = jump_y + 27;
  2875. blast9_flag = 1;
  2876. }
  2877.  
  2878. iShowBMPWOBG(blast9_x, blast9_y, "blast.bmp");
  2879. if (blast9_x >= 1280)
  2880. {
  2881. blast9_x = 240;
  2882. blast9_button = 0;
  2883. blast9_flag = 0;
  2884. blast9_y = 0;
  2885. }
  2886. }
  2887. }
  2888.  
  2889. //Super Blast
  2890. if (super == 2) {
  2891. if (blast_button != 0 && blast_button != 3)
  2892. {
  2893. gr = 1;
  2894. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  2895. }
  2896. else
  2897. gr = 0;
  2898. if (blast > 5 && blast_button != 0)
  2899. {
  2900. if (blast_x < 350)
  2901. {
  2902. gr = 1;
  2903. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  2904. }
  2905. else
  2906. gr = 0;
  2907. blast_button = 3;
  2908. if (blast_flag == 0)
  2909. {
  2910. blast_y = jump_y + 27;
  2911. blast_flag = 1;
  2912. }
  2913.  
  2914. iShowBMPWOBG(blast_x, blast_y, "s_blast.bmp");
  2915. if (blast_x >= 1280)
  2916. {
  2917. blast_x = 240;
  2918. blast_button = 0;
  2919. blast_flag = 0;
  2920. blast_y = 0;
  2921. }
  2922. }
  2923.  
  2924. //Blast1
  2925. if (blast1_button != 0 && blast1_button != 3)
  2926. {
  2927. gr1 = 1;
  2928. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  2929. }
  2930. else
  2931. gr1 = 0;
  2932. if (blast1 > 5 && blast1_button != 0)
  2933. {
  2934. if (blast1_x < 350)
  2935. {
  2936. gr1 = 1;
  2937. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  2938. }
  2939. else
  2940. gr1 = 0;
  2941. blast1_button = 3;
  2942. if (blast1_flag == 0)
  2943. {
  2944. blast1_y = jump_y + 27;
  2945. blast1_flag = 1;
  2946. }
  2947.  
  2948. iShowBMPWOBG(blast1_x, blast1_y, "s_blast.bmp");
  2949. if (blast1_x >= 1280)
  2950. {
  2951. blast1_x = 240;
  2952. blast1_button = 0;
  2953. blast1_flag = 0;
  2954. blast1_y = 0;
  2955. }
  2956. }
  2957.  
  2958. //Blast2
  2959.  
  2960. if (blast2_button != 0 && blast2_button != 3)
  2961. {
  2962. gr2 = 1;
  2963. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  2964. }
  2965. else
  2966. gr2 = 0;
  2967. if (blast2 > 5, k, k && blast2_button != 0)
  2968. {
  2969. if (blast2_x < 350)
  2970. {
  2971. gr2 = 1;
  2972. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  2973. }
  2974. else
  2975. gr2 = 0;
  2976. blast2_button = 3;
  2977. if (blast2_flag == 0)
  2978. {
  2979. blast2_y = jump_y + 27;
  2980. blast2_flag = 1;
  2981. }
  2982.  
  2983. iShowBMPWOBG(blast2_x, blast2_y, "s_blast.bmp");
  2984. if (blast2_x >= 1280)
  2985. {
  2986. blast2_x = 240;
  2987. blast2_button = 0;
  2988. blast2_flag = 0;
  2989. blast2_y = 0;
  2990. }
  2991. }
  2992.  
  2993. //Blast3
  2994. if (blast3_button != 0 && blast3_button != 3)
  2995. {
  2996. gr3 = 1;
  2997. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  2998. }
  2999. else
  3000. gr3 = 0;
  3001. if (blast3 > 5 && blast3_button != 0)
  3002. {
  3003. if (blast3_x < 350)
  3004. {
  3005. gr3 = 1;
  3006. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3007. }
  3008. else
  3009. gr3 = 0;
  3010. blast3_button = 3;
  3011. if (blast3_flag == 0)
  3012. {
  3013. blast3_y = jump_y + 27;
  3014. blast3_flag = 1;
  3015. }
  3016.  
  3017. iShowBMPWOBG(blast3_x, blast3_y, "s_blast.bmp");
  3018. if (blast3_x >= 1280)
  3019. {
  3020. blast3_x = 240;
  3021. blast3_button = 0;
  3022. blast3_flag = 0;
  3023. blast3_y = 0;
  3024. }
  3025. }
  3026.  
  3027.  
  3028. //Blast4
  3029.  
  3030. if (blast4_button != 0 && blast4_button != 3)
  3031. {
  3032. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3033. gr4 = 1;
  3034. }
  3035. else
  3036. gr4 = 0;
  3037. if (blast4 > 5 && blast4_button != 0)
  3038. {
  3039. if (blast4_x < 350)
  3040. {
  3041. gr4 = 1;
  3042. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3043. }
  3044. else
  3045. gr4 = 0;
  3046. blast4_button = 3;
  3047. if (blast4_flag == 0)
  3048. {
  3049. blast4_y = jump_y + 27;
  3050. blast4_flag = 1;
  3051. }
  3052.  
  3053. iShowBMPWOBG(blast4_x, blast4_y, "s_blast.bmp");
  3054. if (blast4_x >= 1280)
  3055. {
  3056. blast4_x = 240;
  3057. blast4_button = 0;
  3058. blast4_flag = 0;
  3059. blast4_y = 0;
  3060. }
  3061. }
  3062.  
  3063.  
  3064. //Blast5
  3065.  
  3066. if (blast5_button != 0 && blast5_button != 3)
  3067. {
  3068. gr5 = 1;
  3069. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3070. }
  3071. else
  3072. gr5 = 0;
  3073. if (blast5 > 5 && blast5_button != 0)
  3074. {
  3075. if (blast5_x < 350)
  3076. {
  3077. gr5 = 1;
  3078. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3079. }
  3080. else
  3081. gr5 = 0;
  3082. blast5_button = 3;
  3083. if (blast5_flag == 0)
  3084. {
  3085. blast5_y = jump_y + 27;
  3086. blast5_flag = 1;
  3087. }
  3088.  
  3089. iShowBMPWOBG(blast5_x, blast5_y, "s_blast.bmp");
  3090. if (blast5_x >= 1280)
  3091. {
  3092. blast5_x = 240;
  3093. blast5_button = 0;
  3094. blast5_flag = 0;
  3095. blast5_y = 0;
  3096. }
  3097. }
  3098.  
  3099.  
  3100. //Blast6
  3101.  
  3102. if (blast6_button != 0 && blast6_button != 3)
  3103. {
  3104. gr6 = 1;
  3105. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3106. }
  3107. else
  3108. gr6 = 0;
  3109. if (blast6 > 5 && blast6_button != 0)
  3110. {
  3111. if (blast6_x < 350)
  3112. {
  3113. gr6 = 1;
  3114. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3115. }
  3116. else
  3117. gr6 = 0;
  3118. blast6_button = 3;
  3119. if (blast6_flag == 0)
  3120. {
  3121. blast6_y = jump_y + 27;
  3122. blast6_flag = 1;
  3123. }
  3124.  
  3125. iShowBMPWOBG(blast6_x, blast6_y, "s_blast.bmp");
  3126. if (blast6_x >= 1280)
  3127. {
  3128. blast6_x = 240;
  3129. blast6_button = 0;
  3130. blast6_flag = 0;
  3131. blast6_y = 0;
  3132. }
  3133. }
  3134.  
  3135. //Blast7
  3136.  
  3137. if (blast7_button != 0 && blast7_button != 3)
  3138. {
  3139. gr7 = 1;
  3140. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3141. }
  3142. else
  3143. gr7 = 0;
  3144. if (blast7 > 5 && blast7_button != 0)
  3145. {
  3146. if (blast7_x < 350)
  3147. {
  3148. gr7 = 1;
  3149. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3150. }
  3151. else
  3152. gr7 = 0;
  3153. blast7_button = 3;
  3154. if (blast7_flag == 0)
  3155. {
  3156. blast7_y = jump_y + 27;
  3157. blast7_flag = 1;
  3158. }
  3159.  
  3160. iShowBMPWOBG(blast7_x, blast7_y, "s_blast.bmp");
  3161. if (blast7_x >= 1280)
  3162. {
  3163. blast7_x = 240;
  3164. blast7_button = 0;
  3165. blast7_flag = 0;
  3166. blast7_y = 0;
  3167. }
  3168. }
  3169.  
  3170.  
  3171. //Blast8
  3172.  
  3173. if (blast8_button != 0 && blast8_button != 3)
  3174. {
  3175. gr8 = 1;
  3176. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3177. }
  3178. else
  3179. gr8 = 0;
  3180. if (blast8 > 5 && blast8_button != 0)
  3181. {
  3182. if (blast8_x < 350)
  3183. {
  3184. gr8 = 1;
  3185. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3186. }
  3187. else
  3188. gr8 = 0;
  3189. blast8_button = 3;
  3190. if (blast8_flag == 0)
  3191. {
  3192. blast8_y = jump_y + 27;
  3193. blast8_flag = 1;
  3194. }
  3195.  
  3196. iShowBMPWOBG(blast8_x, blast8_y, "s_blast.bmp");
  3197. if (blast8_x >= 1280)
  3198. {
  3199. blast8_x = 240;
  3200. blast8_button = 0;
  3201. blast8_flag = 0;
  3202. blast8_y = 0;
  3203. }
  3204. }
  3205.  
  3206.  
  3207. //Blast9
  3208.  
  3209. if (blast9_button != 0 && blast9_button != 3)
  3210. {
  3211. gr9 = 1;
  3212. iShowBMPWOBG(goku_x, jump_y, "sb1.bmp");
  3213. }
  3214. else
  3215. gr9 = 0;
  3216. if (blast9 > 5 && blast9_button != 0)
  3217. {
  3218. if (blast9_x < 350)
  3219. {
  3220. gr9 = 1;
  3221. iShowBMPWOBG(goku_x, jump_y, "sb2.bmp");
  3222. }
  3223. else
  3224. gr9 = 0;
  3225. blast9_button = 3;
  3226. if (blast9_flag == 0)
  3227. {
  3228. blast9_y = jump_y + 27;
  3229. blast9_flag = 1;
  3230. }
  3231.  
  3232. iShowBMPWOBG(blast9_x, blast9_y, "s_blast.bmp");
  3233. if (blast9_x >= 1280)
  3234. {
  3235. blast9_x = 240;
  3236. blast9_button = 0;
  3237. blast9_flag = 0;
  3238. blast9_y = 0;
  3239. }
  3240. }
  3241. }
  3242.  
  3243.  
  3244. if (spike_direction == 1) {
  3245. iShowBMPWOBGWP(spike_x, spike_y, "spikes.bmp", 0);
  3246. if (spikehit == 1)
  3247. iShowBMPWOBGWP(spike_x, spike_y, "spikesX.bmp", 0);
  3248. }
  3249. else if (spike_direction == 2) {
  3250. iShowBMPWOBGWP(spike2_x, spike_y, "spikes.bmp", 0);
  3251. if (spikehit2 == 1)
  3252. iShowBMPWOBGWP(spike2_x, spike_y, "spikesX.bmp", 0);
  3253. }
  3254. else if (spike_direction == 3) {
  3255.  
  3256. iShowBMPWOBGWP(spike3_x, spike_y, "spikes.bmp", 0);
  3257. if (spikehit3 == 1)
  3258. iShowBMPWOBGWP(spike3_x, spike_y, "spikesX.bmp", 0);
  3259. iShowBMPWOBGWP(spike4_x, spike_y, "spikes.bmp", 0);
  3260. if (spikehit4 == 1)
  3261. iShowBMPWOBGWP(spike4_x, spike_y, "spikesX.bmp", 0);
  3262. }
  3263. else if (spike_direction == 4) {
  3264. iShowBMPWOBGWP(spike5_x, spike_y, "spikes.bmp", 0);
  3265. if (spikehit5 == 1)
  3266. iShowBMPWOBGWP(spike5_x, spike_y, "spikesX.bmp", 0);
  3267. iShowBMPWOBGWP(spike6_x, spike_y, "spikes.bmp", 0);
  3268. if (spikehit6 == 1)
  3269. iShowBMPWOBGWP(spike6_x, spike_y, "spikesX.bmp", 0);
  3270. }
  3271. else if (spike_direction == 5) {
  3272. iShowBMPWOBGWP(spike7_x, spike_y, "spikes.bmp", 0);
  3273. if (spikehit7 == 1)
  3274. iShowBMPWOBGWP(spike7_x, spike_y, "spikesX.bmp", 0);
  3275. iShowBMPWOBGWP(spike8_x, spike_y, "spikes.bmp", 0);
  3276. if (spikehit8 == 1)
  3277. iShowBMPWOBGWP(spike8_x, spike_y, "spikesX.bmp", 0);
  3278. }
  3279. else if (spike_direction == 6) {
  3280. iShowBMPWOBGWP(spike9_x, spike_y, "spikes.bmp", 0);
  3281. if (spikehit9 == 1)
  3282. iShowBMPWOBGWP(spike9_x, spike_y, "spikesX.bmp", 0);
  3283.  
  3284. iShowBMPWOBGWP(spike10_x, spike_y, "spikes.bmp", 0);
  3285. if (spikehit10 == 1)
  3286. iShowBMPWOBGWP(spike10_x, spike_y, "spikesX.bmp", 0);
  3287.  
  3288. iShowBMPWOBGWP(spike11_x, spike_y, "spikes.bmp", 0);
  3289. if (spikehit11 == 1)
  3290. iShowBMPWOBGWP(spike11_x, spike_y, "spikesX.bmp", 0);
  3291.  
  3292. }
  3293.  
  3294.  
  3295.  
  3296. //cellJr
  3297. if (cell == 0) {
  3298. iShowBMPWOBG(cell_x, cell_y, "c1.bmp");
  3299. }
  3300. if (cell1 == 0) {
  3301. iShowBMPWOBG(cell10_x, cell10_y, "c1.bmp");
  3302. }
  3303. if (cell2 == 0) {
  3304. iShowBMPWOBG(cell20_x, cell20_y, "c1.bmp");
  3305. }
  3306. if (hit == 1) {
  3307. iShowBMPWOBG(cell_x, cell_y, "c2.bmp");
  3308. }
  3309. if (hit1 == 1) {
  3310. iShowBMPWOBG(cell10_x, cell10_y, "c2.bmp");
  3311. }
  3312. if (hit2 == 1) {
  3313. iShowBMPWOBG(cell20_x, cell20_y, "c2.bmp");
  3314. }
  3315.  
  3316.  
  3317. if (senzu == 1) {
  3318. iShowBMPWOBGWP(senzu_x, senzu_y, "senzu.bmp", 0);
  3319. }
  3320. if (super == 1)
  3321. iShowBMP(0, 0, "st_r.bmp");
  3322. if (super == 2)
  3323. iShowBMP(0, 0, "st_ss.bmp");
  3324. iShowBMPWOBGWP(0, 350, "HP.bmp", 0);
  3325. iShowBMPWOBGWP(0, 300, "score.bmp", 0);
  3326. iSetColor(255, 255, 255);
  3327. char p[500];
  3328. char b[100];
  3329. p[0] = '\0';
  3330. strcat_s(p, itoa(score, b, 10));
  3331. iText(40, 280, p, GLUT_BITMAP_TIMES_ROMAN_24);
  3332.  
  3333.  
  3334. //HP_Bar
  3335. if (damage >= 500){
  3336. red = (255 - damage / 3.921568627) * 2;
  3337. green = 255;
  3338. }
  3339. else{
  3340. green = (damage / 3.921568627) * 2;
  3341. red = 255;
  3342. }
  3343. iSetColor(red, green, 0);
  3344. char q[500];
  3345. char l[100];
  3346. q[0] = '\0';
  3347. strcat(q, itoa(damage / 10, l, 10));
  3348. strcat(q, "%");
  3349. iText(46, 744, q, GLUT_BITMAP_HELVETICA_18);
  3350. iFilledRectangle(52, 453, 19, (damage / 4)*1.126);
  3351. iFilledCircle(62.5, 410, 10);
  3352.  
  3353. //DragonBalls ST bar
  3354. if (db == 1){
  3355. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3356. }
  3357. if (db == 2){
  3358. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3359. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3360. }
  3361. if (db == 3){
  3362. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3363. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3364. iShowBMPWOBGWP(28, 130, "dbs3.bmp", 0);
  3365. }
  3366. if (db == 4){
  3367. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3368. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3369. iShowBMPWOBGWP(28, 130, "dbs3.bmp", 0);
  3370. iShowBMPWOBGWP(72, 130, "dbs4.bmp", 0);
  3371. }
  3372. if (db == 5){
  3373. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3374. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3375. iShowBMPWOBGWP(28, 130, "dbs3.bmp", 0);
  3376. iShowBMPWOBGWP(72, 130, "dbs4.bmp", 0);
  3377. iShowBMPWOBGWP(28, 80, "dbs5.bmp", 0);
  3378. }
  3379. if (db == 6){
  3380. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3381. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3382. iShowBMPWOBGWP(28, 130, "dbs3.bmp", 0);
  3383. iShowBMPWOBGWP(72, 130, "dbs4.bmp", 0);
  3384. iShowBMPWOBGWP(28, 80, "dbs5.bmp", 0);
  3385. iShowBMPWOBGWP(72, 80, "dbs6.bmp", 0);
  3386. }
  3387. if (db >= 7)
  3388. {
  3389. iShowBMPWOBGWP(28, 180, "dbs1.bmp", 0);
  3390. iShowBMPWOBGWP(72, 180, "dbs2.bmp", 0);
  3391. iShowBMPWOBGWP(28, 130, "dbs3.bmp", 0);
  3392. iShowBMPWOBGWP(72, 130, "dbs4.bmp", 0);
  3393. iShowBMPWOBGWP(28, 80, "dbs5.bmp", 0);
  3394. iShowBMPWOBGWP(72, 80, "dbs6.bmp", 0);
  3395. iShowBMPWOBGWP(50, 30, "dbs7.bmp", 0);
  3396. }
  3397.  
  3398.  
  3399.  
  3400. //iShowBMPWOBG(frieza_x, frieza_y, "frieza.bmp");
  3401. //place your drawing codes here
  3402.  
  3403. }
  3404.  
  3405. }
  3406.  
  3407. /*
  3408. function iMouseMove() is called when the user presses and drags the mouse.
  3409. (mx, my) is the position where the mouse pointer is.
  3410. */
  3411.  
  3412.  
  3413. void iMouseMove(int mx, int my)
  3414. {
  3415. //place your codes here
  3416. }
  3417. /*
  3418. function iMouse() is called when the user presses/releases the mouse.
  3419. (mx, my) is the position where the mouse pointer is.
  3420. */
  3421. void iMouse(int button, int state, int mx, int my)
  3422. {
  3423. if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN)
  3424. {
  3425. //place your codes here
  3426. }
  3427. if (button == GLUT_RIGHT_BUTTON && state == GLUT_DOWN)
  3428. {
  3429. //place your codes here
  3430. }
  3431. }
  3432. /*iPassiveMouseMove is called to detect and use
  3433. the mouse point without pressing any button */
  3434. void iPassiveMouseMove(int mx, int my)
  3435. {
  3436. //place your code here
  3437. if (mx == 2){} /*Something to do with mx*/
  3438. else if (my == 2){} /*Something to do with my*/
  3439. }
  3440. /*
  3441. function iKeyboard() is called whenever the user hits a key in keyboard.
  3442. key- holds the ASCII value of the key pressed.
  3443. */
  3444. void iKeyboard(unsigned char key)
  3445. {
  3446. if (key == ' ')
  3447. {
  3448. jump_co++;
  3449. if (jump_co == 1)
  3450. {
  3451. jumping = 1;
  3452. }
  3453. else if (jump_co == 2)
  3454. {
  3455. jumping = 1;
  3456. jump_limit = jump_y + 300;
  3457. jump_dif = jd;
  3458. jump_co++;
  3459. }
  3460. }
  3461. if (key == 'x' || key == 'X')
  3462. {
  3463. blast_co++;
  3464.  
  3465. if (blast_co % 10 == 9)
  3466. blast_button = 1;
  3467.  
  3468. if (blast_co % 10 == 8)
  3469. blast1_button = 1;
  3470.  
  3471. if (blast_co % 10 == 7)
  3472. blast2_button = 1;
  3473.  
  3474. if (blast_co % 10 == 6)
  3475. blast3_button = 1;
  3476.  
  3477. if (blast_co % 10 == 5)
  3478. blast4_button = 1;
  3479.  
  3480. if (blast_co % 10 == 4)
  3481. blast5_button = 1;
  3482.  
  3483. if (blast_co % 10 == 3)
  3484. blast6_button = 1;
  3485.  
  3486. if (blast_co % 10 == 2)
  3487. blast7_button = 1;
  3488.  
  3489. if (blast_co % 10 == 1)
  3490. blast8_button = 1;
  3491.  
  3492. if (blast_co % 10 == 0)
  3493. blast9_button = 1;
  3494.  
  3495. }
  3496.  
  3497. if (key == 's' || key == 'S') {
  3498. s++;
  3499. if (s % 2 == 0 && db >= 7) {
  3500. super = 1;
  3501. }
  3502. else if (s % 2 != 0 && db >= 7) {
  3503. super = 2;
  3504. if (s_anim != 3)
  3505. s_anim = 1;
  3506. }
  3507. }
  3508. if (key == '\r'){
  3509. if (st_sc == 0)
  3510. {
  3511. st_sc = 1;
  3512.  
  3513. }
  3514. else if (st_sc == 1)
  3515. {
  3516. st_sc = 100;
  3517. }
  3518. else if (st_sc == 4)
  3519. {
  3520. exit(0);
  3521. }
  3522.  
  3523. }
  3524. if (key == 'f' || key == 'F'){
  3525. if (gol_anim == 0)
  3526. gol_anim = 1;
  3527. }
  3528. if ((key == 'p') || (key == 'P') && go == 0 && !(sp_sc >= 0 && sp_sc <= 2) && !(st_sc >= 0 && st_sc <= 4))
  3529. {
  3530. p_co++;
  3531. if (p_co % 2 == 1)
  3532. pause_state = 1;
  3533. else
  3534. pause_state = 0;
  3535. }
  3536. //place your codes for other keys here
  3537. }
  3538. /*
  3539. function iSpecialKeyboard() is called whenver user hits special keys like-
  3540. function keys, home, end, pg up, pg down, arraows etc. you have to use
  3541. appropriate constants to detect them. A list is:
  3542. GLUT_KEY_F1, GLUT_KEY_F2, GLUT_KEY_F3, GLUT_KEY_F4, GLUT_KEY_F5, GLUT_KEY_F6,
  3543. GLUT_KEY_F7, GLUT_KEY_F8, GLUT_KEY_F9, GLUT_KEY_F10, GLUT_KEY_F11, GLUT_KEY_F12,
  3544. GLUT_KEY_LEFT, GLUT_KEY_UP, GLUT_KEY_RIGHT, GLUT_KEY_DOWN, GLUT_KEY_PAGE UP,
  3545. GLUT_KEY_PAGE DOWN, GLUT_KEY_HOME, GLUT_KEY_END, GLUT_KEY_INSERT
  3546. */
  3547. void iSpecialKeyboard(unsigned char key)
  3548. {
  3549. if (key == GLUT_KEY_END)
  3550. {
  3551. st_sc = 1;
  3552. }
  3553. if (key == GLUT_KEY_UP&&st_sc != 0)
  3554. {
  3555. if (st_sc == 1)
  3556. st_sc = 4;
  3557. else
  3558. st_sc--;
  3559. }
  3560. if (key == GLUT_KEY_DOWN&&st_sc != 0)
  3561. {
  3562. if (st_sc == 4)
  3563. st_sc = 1;
  3564. else
  3565. st_sc++;
  3566. }
  3567. //place your codes for other keys here
  3568. }
  3569.  
  3570. int main()
  3571. {
  3572. iSetTimer(150, goku_run);
  3573. iSetTimer(20, goku_jump);
  3574. iSetTimer(1, goku_blast);
  3575. srand(time(NULL));
  3576. srand(time(NULL));
  3577. //PlaySound("Goku_SSJ", NULL, SND_ASYNC);
  3578. iInitialize(1280, 768, "Our Last Hope");
  3579.  
  3580. return 0;
  3581. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement