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

Marine.cpp 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. #include "..\C-Engine\CHeader.hpp"
  2. #include"BoatControl.hpp"
  3. #include"BoatControlPerso.hpp"
  4. #include"BoatControlPirate.hpp"
  5. #include"EngineGUI.hpp"
  6. int Intro();//Intro du jeu
  7. int Menu();//Menu du jeu
  8. int Jeu( int stage);// Jeu en lui meme
  9. int HistoireStage1();// Les différentes histoires.
  10. int HistoireStage2();
  11. int HistoireStage3();
  12. void PrintTextDelay( int x , int y , int delay , char * txt , int length)//Fonction qui affiche le text en plus classe.
  13. {
  14. int i;
  15. char * buffer = (char *)malloc(sizeof(char) * 2);
  16. for(i = 0; i < length ; i++)
  17. {
  18. input_update();
  19. if(input_trigger(K_SHIFT))return ;
  20. buffer[0] = txt[i];
  21. buffer[1] = '\0';
  22. PrintMini( x + i*4 , y ,(const unsigned char *) buffer, 0);
  23. ML_display_vram();
  24. Sleep(delay);
  25. }
  26. }
  27. int Intro()
  28. {
  29. const unsigned char Bateau[]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x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0xff, 0xff, 0xff, 0x80, 0x0, 0x81, 0x80, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x81, 0x80, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x81, 0x80, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x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1, 0x0, 0x0, 0x0, 0x1, 0x80, 0x7f, 0x0, 0x3, 0x0, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x1, 0x0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0, 0x1, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x1, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x1, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x1, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80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, 0x0, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x80, 0x1c, 0x0, 0x3, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, };
  31. for(int i=0 ; i < 258 ; i++)
  32. {
  33. ML_clear_vram();
  34. if( i > 124)
  35. {
  36. PrintXY( 4 , 15 , "L'invasion Seanchans" , 0);
  37. PrintMini(50 , 30 , "Par Fife86" , 0);
  38. PrintMini(0 , 40 , "Cree a l'occasion des 7 Days CPC" , 0);
  39. }
  40. if(i < 150)
  41. {
  42. ML_rectangle(90,10,127,50,1,ML_WHITE , ML_WHITE);
  43. }
  44. ML_bmp_or_cl(BateauN , i - 127 , 0 , 127 , 63);
  45. ML_bmp_and_cl(Bateau , i - 127 , 0 , 127 , 63);
  46. Sleep(20);
  47. ML_display_vram();
  48. }
  49. Sleep(1000);
  50. return 1;
  51. }
  52. int Menu()
  53. {
  54. bool end = false;
  55. int choix = 0;
  56. int cx = 40;
  57. int cy = 20;
  58. const unsigned char Curseur[]={0x9f, 0xdf, 0xff, 0xff, 0xff, 0xdf, 0x9f, };
  59. const unsigned char CurseurM[]={0xbf, 0xff, 0xff, 0xbf, };
  60. Intro();
  61. while(end == false)
  62. {
  63. ML_clear_vram();
  64. input_update();
  65. PrintXY( 4 , 5 , "L'invasion Seanhans" , 0);
  66. PrintXY(45,20,"Stage 1" , 0);
  67. PrintXY(45,32,"Stage 2" , 0);
  68. PrintXY(45,44,"Stage 3" , 0);
  69. PrintMini(53,57,"Quitter" , 0);
  70. const unsigned char Deco[]={0x0,0xd0,0x0,0x0,0x30,0x0,0x0,0x10,0x0,0x0,0x10,0x0,0x0,0x10,0x0,0x4,0x71,0x0,0x4,0xf8,0x80,0x4,0xfb,0x80,0x1d,0xfb,0x80,0x3e,0x17,0xc4,0x3e,0x7f,0xcc,0x7e,0xf0,0x9e,0x5,0xff,0xbe,0x1d,0xfb,0xff,0x3e,0x71,0xff,0x7c,0x10,0xff,0x4,0xff,0xfe,0x1f,0x7e,0xf8,0x8e,0x38,0xc0,0x44,0x10,0x8e,0x24,0x11,0xfe,0x14,0xff,0xfe,0xf,0xff,0xfc,0x7,0xff,0xf8};
  71. ML_bmp_or(Deco ,8,30,24,24);
  72. ML_bmp_or(Deco ,95,30,24,24);
  73. if(input_any_key())
  74. {
  75. if(input_trigger(K_DOWN))choix ++;
  76. if(input_trigger(K_UP))choix --;
  77. if(choix < 0)choix = 0;
  78. if(choix > 3)choix = 3;
  79. switch(choix)
  80. {
  81. case 0: cx = 40; cy = 20; break;
  82. case 1: cx = 40; cy = 32; break;
  83. case 2: cx = 40; cy = 44; break;
  84. case 3: cx = 47; cy = 57; break;
  85. }
  86. if(input_trigger(K_EXE))
  87. {
  88. switch(choix)
  89. {
  90. case 0: Jeu(1); break;
  91. case 1: Jeu(2); break;
  92. case 2: Jeu(3); break;
  93. case 3: end = true; break;
  94. }
  95. }
  96. }
  97. if(choix != 3)
  98. {
  99. ML_bmp_or(Curseur , cx , cy , 3 , 7);
  100. ML_bmp_or_rotate(Curseur , cx + 49 , cy , 3 , 7 , 180);
  101. }
  102. else
  103. {
  104. ML_bmp_or(CurseurM , cx , cy , 2 , 4);
  105. ML_bmp_or_rotate(CurseurM , cx + 37 , cy -1 , 2 , 4 , 180);
  106. }
  107. ML_display_vram();
  108. }
  109. return 1;
  110. }
  111. int HistoireStage1()
  112. {
  113. ML_clear_vram();
  114. ML_rectangle(30,20,97,35,1,ML_BLACK,ML_WHITE);
  115. PrintXY(45,23, "Stage 1" , 0);
  116. ML_display_vram();
  117. Sleep(2000);
  118. ML_clear_vram();
  119. PrintMini(80,58,"Skip : SHIFT",0);
  120. PrintTextDelay(15,10,100,"Bienvenue Capitaine,", 20);
  121. if(input_trigger(K_SHIFT) == false)Sleep(500);
  122. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,20,100,"Le Dragon Reincarne vient", 25);
  123. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,30,100,"de vous envoyer un message.", 27);
  124. if(input_trigger(K_SHIFT) == false)Sleep(1000);
  125. ML_clear_vram();
  126. PrintMini(80,58,"Skip : SHIFT",0);
  127. PrintTextDelay(15,10,100,"Votre mission est de", 20);
  128. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,20,100,"detruire des eclaireurs", 23);
  129. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,30,100,"Seanchans.", 10);
  130. if(input_trigger(K_SHIFT) == false)Sleep(1000);
  131. ML_clear_vram();
  132. PrintMini(80,58,"Skip : SHIFT",0);
  133. PrintTextDelay(15,10,100,"Ils sont aux nombres de 3.", 26);
  134. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,20,100,"Le Seigneur Dragon compte", 25);
  135. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,30,100,"sur vous.", 9);
  136. if(input_trigger(K_SHIFT) == false)Sleep(1000);
  137. ML_clear_vram();
  138. PrintTextDelay(30,28,100,"Bonne chance", 13);
  139. Sleep(2000);
  140. return 1;
  141. }
  142. int HistoireStage2()
  143. {
  144. ML_clear_vram();
  145. ML_rectangle(30,20,97,35,1,ML_BLACK,ML_WHITE);
  146. PrintXY(45,23, "Stage 2" , 0);
  147. ML_display_vram();
  148. Sleep(2000);
  149. ML_clear_vram();
  150. PrintMini(80,58,"Skip : SHIFT",0);
  151. PrintTextDelay(5,10,100,"Chef, nos cotes sont attaquees", 30);
  152. if(input_trigger(K_SHIFT) == false)Sleep(500);
  153. if(input_trigger(K_SHIFT) == false)PrintTextDelay(10,20,100,"Il faut defendre nos terres", 27);
  154. if(input_trigger(K_SHIFT) == false)PrintTextDelay(10,30,100,"contre les Seanchans.", 21);
  155. if(input_trigger(K_SHIFT) == false)Sleep(500);
  156. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,40,100,"Ils y a 6 envahisseurs.", 23);
  157. if(input_trigger(K_SHIFT) == false)Sleep(1000);
  158. return 1;
  159. }
  160. int HistoireStage3()
  161. {
  162. ML_clear_vram();
  163. ML_rectangle(30,20,97,35,1,ML_BLACK,ML_WHITE);
  164. PrintXY(45,23, "Stage 3" , 0);
  165. ML_display_vram();
  166. Sleep(2000);
  167. ML_clear_vram();
  168. PrintMini(80,58,"Skip : SHIFT",0);
  169. PrintTextDelay(5,10,100,"C est la derniere bataille", 26);
  170. if(input_trigger(K_SHIFT) == false)Sleep(500);
  171. if(input_trigger(K_SHIFT) == false)PrintTextDelay(10,20,100,"Ils ont perdus, il ne reste", 27);
  172. if(input_trigger(K_SHIFT) == false)PrintTextDelay(10,30,100,"qu'une dizaine de bateaux", 25);
  173. if(input_trigger(K_SHIFT) == false)Sleep(500);
  174. if(input_trigger(K_SHIFT) == false)PrintTextDelay(15,40,100,"a couler. Tenez bon.", 20);
  175. if(input_trigger(K_SHIFT) == false)Sleep(1000);
  176. return 1;
  177. }
  178. int Jeu( int stage)
  179. {
  180. // Les différents sprites utilisé.
  181. const unsigned char Grade1[]={0x1,0xc0,0x0,0x2,0x20,0x0,0x4,0x10,0x0,0x8,0x88,0x0,0x9,0x48,0x0,0x8,0x8,0x0,0x38,0xe,0x0,0x38,0x8e,0x0,0x9,0xc8,0x0,0x8,0x8,0x0,0x8,0x8,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0xc,0x18,0x0,0x7,0xf0,0x0};
  182. const unsigned char Grade2[]={0x1,0xc0,0x0,0x2,0x20,0x0,0x4,0x10,0x0,0x8,0x88,0x0,0x9,0x48,0x0,0xa,0x28,0x0,0x38,0xe,0x0,0x38,0xe,0x0,0x8,0x88,0x0,0x39,0xce,0x0,0x38,0xe,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0xc,0x18,0x0,0x7,0xf0,0x0};
  183. const unsigned char Grade3[]={0x1,0xc0,0x0,0x2,0x20,0x0,0x4,0x90,0x0,0x9,0x48,0x0,0x8,0x8,0x0,0x38,0xe,0x0,0x38,0xe,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0xd,0x58,0x0,0x7,0xf0,0x0};
  184. const unsigned char Grade4[]={0x1,0xc0,0x0,0x1a,0x2c,0x0,0x1c,0x9c,0x0,0x9,0x48,0x0,0xa,0xa8,0x0,0x38,0xe,0x0,0x38,0xe,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0x8,0x88,0x0,0x1f,0x7c,0x0,0x3c,0x9e,0x0,0x8,0x8,0x0,0xd,0x58,0x0,0x7,0xf0,0x0};
  185. const unsigned char Grade5[]={0x0,0x70,0x0,0x0,0x88,0x0,0xd,0x5,0x80,0xe,0x23,0x80,0x4,0xf9,0x0,0x5,0x25,0x0,0x1c,0x51,0xc0,0x1c,0x1,0xc0,0x4,0x21,0x0,0xf,0xdf,0x80,0x1e,0x23,0xc0,0x4,0x1,0x0,0x4,0x1,0x0,0x1c,0x71,0xc0,0x1c,0x1,0xc0,0x4,0x21,0x0,0xf,0xdf,0x80,0x1e,0x23,0xc0,0x4,0x1,0x0,0x6,0xdb,0x0,0x3,0xfe,0x0};
  186. Sprite Sprite_Bateau_Grade1( Grade1 , 17 , 17 ); Sprite_Bateau_Grade1.CreateReverse();
  187. Sprite Sprite_Bateau_Grade2( Grade2 , 17 , 17 ); Sprite_Bateau_Grade2.CreateReverse();
  188. Sprite Sprite_Bateau_Grade3( Grade3 , 17 , 17 ); Sprite_Bateau_Grade3.CreateReverse();
  189. Sprite Sprite_Bateau_Grade4( Grade4 , 17 , 17 ); Sprite_Bateau_Grade4.CreateReverse();
  190. Sprite Sprite_Bateau_Grade5( Grade5 , 21 , 21 ); Sprite_Bateau_Grade5.CreateReverse();
  191. Animation A_Bateau_Grade1( Sprite_Bateau_Grade1);
  192. Animation A_Bateau_Grade2( Sprite_Bateau_Grade2);
  193. Animation A_Bateau_Grade3( Sprite_Bateau_Grade3);
  194. Animation A_Bateau_Grade4( Sprite_Bateau_Grade4);
  195. Animation A_Bateau_Grade5( Sprite_Bateau_Grade5);
  196. const unsigned char I_Boulet[]={ 0xff , 0xff};
  197. Sprite Sprite_Boulet( I_Boulet , 2 ,2);
  198. Animation A_Boulet( Sprite_Boulet);
  199. const unsigned char TileSetMer[]={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0xf0,0x7f,0x0,0x40,0x0,0x70,0x0,0x10,0x0,0x30,0x0,0x60,0x0,0x40,0x0,0x40,0x0,0x40,0x0,0x80,0x0,0x80,0x0,0xf0,0x0,0x10,0x0,0x1f,0x80,0x0,0x80,0x0,0x80,0x0,0xc0,0x0,0x40,0x0,0x40,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x30,0x0,0x10,0x0,0x10,0x0,0x30,0x0,0x20,0x0,0x60,0x0,0x40,0x7,0x40,0x5,0xc0,0x4,0xc0,0x3c,0xc0,0x20,0x0,0xc0,0x0,0x80,0x0,0x80,0x0,0xc0,0x0,0x60,0x0,0x20,0x0,0x20,0x0,0x30,0x0,0xe,0x0,0x3,0xc0,0x0,0x60,0x0,0x20,0x0,0x30,0xc1,0xf0,0x7b,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x7f,0x10,0xc1,0xe0};
  200. bool TileProp[]= { false , true , true, true, true, true, true}; //, true , true , true , true , true , true , true , true , true , true , true , true , true , true, true , true , true , true , true , true , true , true };
  201. const unsigned char * map1[]={
  202. "0000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000",
  203. "0000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000",
  204. "0000000000000000000000000000000000000000000000000000000000000000000000000520000000000000000000000000",
  205. "0000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000",
  206. "0000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000",
  207. "0000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000",
  208. "0000000000000000000000000000000000120000000000000012000000000000000000000052000000000000000000000000",
  209. "0000001200000000000000000000000000430000000000000040200000000000000000000000200000000000000000000000",
  210. "0000004300000000000000000000000000000000000000000010020000000000000000000000100000000000000000000000",
  211. "0000000000000000000000000000000000000000000000000300004000000000000000000001000000000000000000000000",
  212. "0000000000000000000000000000000000000000000000000400000460000000000000000030000000000000000000000000",
  213. "0000000000000000000000000000000000000000000000000020000304000000000000000100000000000000000000000000",
  214. "0000000000000000001200000000000000000000000000000034000000200000000000000400000000000000000000000000",
  215. "0000000000000000002040000000000000000000000000000300000000100000000000000040000000000000000000000000",
  216. "0000000000000000000230000000000000000000000000003000000003000000000000000002000000000000000000000000",
  217. "0000000000000000000000000000000000000000000000002000000010000000000000000000200000000000000000000000",
  218. "0000000000000000000000000000000000000000000000000400000300000000000000000000100000000000000000000000",
  219. "0000000000000000000000000000000000000000000000000020001000000000000000000003000000000000000000000000",
  220. "0000000000000000000000000000000000000000000000000004034000000000000000000005200600000000000000000000",
  221. "0000000000000000000000000000000000000000000000000001060200000000000000000000055020000000000000000000",
  222. "0000000000000000000000000000000000000000000000000004104300000000000000000000000030000000000000000000",
  223. "0000000000000000000000000000012140600000000000000000000000000000000000000000000100000000000000000000",
  224. "0000000000000000000000000000020205300000000000000000000000000000000000000000001000000000000000000000",
  225. "0000000000000000000000000000004001000000000000000000000000000000000000000000005200000000000000000000",
  226. "0000000000000000000000000000003030000000000000000000000000000000000000000000000300000000000000000000",
  227. "0000000000000000000000000000010100000000000000000000000000000000000000000000001000000000000000000000",
  228. "0000000000000000000000000000023000000000000000000000000000000000000000000000004000000000000000000000",
  229. "0000014000000000000000000000000000000000000000000000000000000000000000000000000520000000000000000000",
  230. "0000335000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000",
  231. "0012226000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000",
  232. "0040503000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000",
  233. "0034010000000000000000000000000000000000000000000000000000001400000000000000000300000000000000000000",
  234. "0054020000000000000000000000000000000000000000000000000000002020000000000000001000000000000000000000",
  235. "0000210000000000000000000000000000000000000000000000000000343004000000000000004000000000000000000000",
  236. "0000000000000000000000000000000000000000000000000000000001000000400000000000000400000000000000000000",
  237. "0000000000000000000000000000000000000000000000000000340030000003500000000000000020000000000000000000",
  238. "0000000000000000000000000000000000000000000000000000202100000004000000000000000002000000000000000000",
  239. "0000000000000000000000000000000000000000000000000000100000000015000000000000000001000000000000000000",
  240. "0000000000000000000000000000000000000000000000000000400000000020000000000000000030000000000000000000",
  241. "0000000000000000000000000000000000000000000000000000020000000030000000000000000052006000000000000000",
  242. "0000000000000000000000000000000000000000000000000000010000003440000000000000000000550200000000000000",
  243. "0000000000000000000000000000000000000000000000000000052143210050000000000000000000000300000000000000",
  244. "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000",
  245. "0000000000000000000000000000000000000000000000000000000000000000000000000000001552003000000000000000",
  246. "0000000000000000000000000000000000000000000000000000000000000000000000000000010000430000000000000000",
  247. "0000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000",
  248. "0000000000000000000000000000000000000000000000000000000000000000000000000000520000000000000000000000",
  249. "0000000000000000000000000000000000006000000000000000000000000000000000000000030000000000000000000000",
  250. "0000000000000000000000000000000000630200000000000000000000000000000000000000100000000000000000000000",
  251. "0000000606000000000000000000000003000300000000000000000000000000000000000000403552000000000000000000",
  252. "0000001054260000000000000000000002601000000000000000000000000000000000000000050000414000000000000000",
  253. "0000030000005200000000000000000001030000000000000000000000000000000000000000000000000200000000000000",
  254. "0000020000000120000000000000000030041200000000000000000000000000000000000000000000000046060000000000",
  255. "0000030000000010000000000000000021400300000000000000000000000000000000000000000000000000502000000000",
  256. "0001500003520300000000000000000000023000000000000000000000000000000000000000000000000000000400000000",
  257. "0004000002005000000000000000000000000000000000000000000000000000000000000000000000000000000020000000",
  258. "0000200000400000000000000000000000000000000000000000000000000000000000000000000000000000000004000000",
  259. "0000054000020001400000000000000000000000000000000000000000000000000000000000000000000060000003000000",
  260. "0000003000004350020000000000000000000000000000000000000000000000000000000000000340663504120010000000",
  261. "0000002000000000030000000000000000000000000000000000000000000000000000000000000205000000005500000000",
  262. "0000000460000001500000000000000000000000000000000000000000000000000000000000000100000000000000000000",
  263. "0000000005200030000000000000000000000000000000000000000000000000000000000000003000000000000000000000",
  264. "0000000000040300000000000000000000000000000000000000000000000000000000000000005200600000000000000000",
  265. "0000000000005000000000000000000000000000012000000000000000000000000000000000000055020000000000000000",
  266. "0000000000000000000000000000000000000000020400000000000000000000000000000000000000030000000000000000",
  267. "0000000000000000000000000000000000000000002300000000000000000000000000000000000000100000000000000000",
  268. "0000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000",
  269. "0000000000000000000000000000000000000000000000000000000000000000000000000000000005200000000000000000",
  270. "0000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000",
  271. "0000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000",
  272. "0000000000000000000000000000000000000000000000000000000000000000000006000000000004000000000000000000",
  273. "0000000000000000000000000000000000000000000000000000000000000120001550512000000000520000000000000000",
  274. "0000000000000000000000000000000000000000000000000000000000000205550000000200000000002000000000000000",
  275. "0000000000000000000000000000000000000000000000000000000000000040000000000020000000001000000000000000",
  276. "0000000000000000000000000000000000000001200000000000000000000030000120000030000000010000000000000000",
  277. "0000000000000000000000000000000000000010040000000000000000001500001002060300000000300000000000000000",
  278. "0000000000000000000000000000000000000020002600000000000000030000004000505000000001000000000000000000",
  279. "0000000000000000000000000000000000006010001040000000000000046600000200000000000004000000000000000000",
  280. "0000000000000000000000000000000000004500000030000000000000000055400020000000000000400000000000000000",
  281. "0000000000000000000000000000000000000200000300000000000000000000020030000000000000020000000000000000",
  282. "0000000000000000000000000000000000000100015000000000000000000000004100000000000000002000000000000000",
  283. "0000000000000000000000000000000000000460020000000000000000000000000000000000000000001000000000000000",
  284. "0000000000000000000000000000000000000002004000000000000000000000000000000000000000030000000000000000",
  285. "0000000000000000000000000000000000000001503000000000000000000000000000000000000000100000000000000000",
  286. "0000000000000000000000000000000000000004630000000000000000000000000000000000000001000000000000000000",
  287. "0000000000000000000000000000000000000000000000000000000000000000000000000000000005200000000000000000",
  288. "0000000000000000000612000000000000000000000000000000000000000000000000000000000000300000000000000000",
  289. "0000000000120000000400400000000000000000000000000000000000000000000000000000000001000000000000000000",
  290. "0000000000430000000350300000000000000000000000000000000000000000000000000000000004000000000000000000",
  291. "0000000000000000000401000000000000000000000000000000000000000000012000000000000000520000000000000000",
  292. "0000000000000000000304000000000000000000000000000000000000000000103000000000000000002000000000000000",
  293. "0000000000000000001600200000000000000000000000000000000000000000404000000000000000001000000000000000",
  294. "0000000000000000005020520000000000000000000000000000000000000000020200000000000000010000000000000000",
  295. "0000000000000000000010030000000000000000000000000000000000000000004620000000000000300000000000000000",
  296. "0000000000000000000300100000000000000000000000000000000000000000000042000000000001000000000000000000",
  297. "0000000000000000000403000000000000000000000000000000000000000000000004460000000004000000000000000000",
  298. "0000000000000000000050000000000000000000000000000000000000000000000000210000000000400000000000000000",
  299. "0000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000",
  300. "0000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000",
  301. "0000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000",
  302. };
  303. //*******************Commun*****************//
  304. Engine Game;// Création du moteur
  305. Vent VentJeu;// Création de la météo.
  306. Boat Bateau_Joueur; // Création du bateau du joueur.
  307. Object * Bateau = new Object; // Création de l'object Joueur
  308. Bateau->GetTransforms()->SetXY(88 * 12,( 100 - 56) * 12);// Placement du joueur sur la map.
  309. Bateau->GetRender()->SetRender(A_Bateau_Grade4 );// Affection de l'image du bateau au joueur.
  310. Bateau->AddRigibody();
  311. Bateau->GetRigibody()->SetMass(500);
  312. Bateau->AffectTag("Bateau");
  313. BoatControlPerso * Bateau_Script = new BoatControlPerso;// Création du script du joueur.
  314. Bateau->AffectScript(Bateau_Script);
  315. Bateau_Script->Initialisation(& VentJeu , & Bateau_Joueur , & A_Boulet);//Initialisation des pointeurs utilisé dans le script.
  316. Map Niveau1;//Création de la map
  317. Niveau1.SetMap(TileSetMer , map1 , TileProp , 12 , 12 , 100 ,100);// Paramètrage de la map.
  318. Game.AffectMap( &Niveau1);//Affection de la map au moteur.
  319. Niveau1.AffectEngine( &Game);
  320. EngineGUI Game_GUI;//Création de la GUI.
  321. Game.AffectScript(Game_GUI);
  322. Game_GUI.Initialisation(& VentJeu , & Bateau_Joueur );
  323. Game.SetFpsWish(26);//Limite des FPS voulut.
  324. Game.AddObject( Bateau);//Ajout du joueur au moteur.
  325. //***************Stage*************//
  326. Boat Bateau_Pirate1;//Création de tout les pirates.
  327. Object * Pirate1 = new Object;
  328. Pirate1->GetRender()->SetRender(A_Bateau_Grade1 );
  329. BoatControlPirate * Pirate1_Script = new BoatControlPirate;
  330. Pirate1->AffectScript(Pirate1_Script);
  331. Pirate1_Script->Initialisation(& VentJeu , & Bateau_Pirate1, & A_Boulet);
  332. Boat Bateau_Pirate2;
  333. Object * Pirate2 = new Object();
  334. Pirate2->GetRender()->SetRender(A_Bateau_Grade1 );
  335. BoatControlPirate * Pirate2_Script = new BoatControlPirate;
  336. Pirate2->AffectScript(Pirate2_Script);
  337. Pirate2_Script->Initialisation(& VentJeu , & Bateau_Pirate2, & A_Boulet);
  338. Boat Bateau_Pirate3;
  339. Object * Pirate3 = new Object;;
  340. Pirate3->GetRender()->SetRender(A_Bateau_Grade1 );
  341. BoatControlPirate * Pirate3_Script = new BoatControlPirate;
  342. Pirate3->AffectScript(Pirate3_Script);
  343. Pirate3_Script->Initialisation(& VentJeu , & Bateau_Pirate3, & A_Boulet);
  344. Boat Bateau_Pirate4;
  345. Object * Pirate4 = new Object;;
  346. Pirate4->GetRender()->SetRender(A_Bateau_Grade2 );
  347. BoatControlPirate * Pirate4_Script = new BoatControlPirate;
  348. Pirate4->AffectScript(Pirate4_Script);
  349. Pirate4_Script->Initialisation(& VentJeu , & Bateau_Pirate4, & A_Boulet);
  350. Boat Bateau_Pirate5;
  351. Object * Pirate5 = new Object;;
  352. Pirate5->GetRender()->SetRender(A_Bateau_Grade2 );
  353. BoatControlPirate * Pirate5_Script = new BoatControlPirate;
  354. Pirate5->AffectScript(Pirate5_Script);
  355. Pirate5_Script->Initialisation(& VentJeu , & Bateau_Pirate5, & A_Boulet);
  356. Boat Bateau_Pirate6;
  357. Object * Pirate6 = new Object;;
  358. Pirate6->GetRender()->SetRender(A_Bateau_Grade3 );
  359. BoatControlPirate * Pirate6_Script = new BoatControlPirate;
  360. Pirate6->AffectScript(Pirate6_Script);
  361. Pirate6_Script->Initialisation(& VentJeu , & Bateau_Pirate6, & A_Boulet);
  362. Boat Bateau_Pirate7;
  363. Object * Pirate7 = new Object;;
  364. Pirate7->GetRender()->SetRender(A_Bateau_Grade3 );
  365. BoatControlPirate * Pirate7_Script = new BoatControlPirate;
  366. Pirate7->AffectScript(Pirate7_Script);
  367. Pirate7_Script->Initialisation(& VentJeu , & Bateau_Pirate7, & A_Boulet);
  368. Boat Bateau_Pirate8;
  369. Object * Pirate8 = new Object;;
  370. Pirate8->GetRender()->SetRender(A_Bateau_Grade3 );
  371. BoatControlPirate * Pirate8_Script = new BoatControlPirate;
  372. Pirate8->AffectScript(Pirate8_Script);
  373. Pirate8_Script->Initialisation(& VentJeu , & Bateau_Pirate8, & A_Boulet);
  374. Boat Bateau_Pirate9;
  375. Object * Pirate9 = new Object;;
  376. Pirate9->GetRender()->SetRender(A_Bateau_Grade4 );
  377. BoatControlPirate * Pirate9_Script = new BoatControlPirate;
  378. Pirate9->AffectScript(Pirate9_Script);
  379. Pirate9_Script->Initialisation(& VentJeu , & Bateau_Pirate9, & A_Boulet);
  380. switch(stage)
  381. {
  382. case 1:
  383. Pirate1->GetTransforms()->SetXY(50 * 12,( 100 - 54) * 12);//Placement des pirates sur la map.
  384. Pirate2->GetTransforms()->SetXY(17 * 12,( 100 - 72) * 12);
  385. Pirate3->GetTransforms()->SetXY(16 * 12,( 100 - 34) * 12 );
  386. Game.AddObject( Pirate1);//Ajout des pirates au moteur.
  387. Game.AddObject( Pirate2);
  388. Game.AddObject( Pirate3);
  389. Bateau_Script->objectifmax = 3;
  390. HistoireStage1();
  391. break;
  392. case 2:
  393. Pirate1->GetTransforms()->SetXY(50 * 12,( 100 - 54) * 12);
  394. Pirate2->GetTransforms()->SetXY(17 * 12,( 100 - 72) * 12);
  395. Pirate3->GetTransforms()->SetXY(16 * 12,( 100 - 34) * 12 );
  396. Pirate4->GetTransforms()->SetXY(30 * 12,( 100 - 20) * 12);
  397. Pirate5->GetTransforms()->SetXY(60 * 12,( 100 - 70) * 12);
  398. Pirate6->GetTransforms()->SetXY(0 * 12,( 100 - 80) * 12 );
  399. Game.AddObject( Pirate1);
  400. Game.AddObject( Pirate2);
  401. Game.AddObject( Pirate3);
  402. Game.AddObject( Pirate4);
  403. Game.AddObject( Pirate5);
  404. Game.AddObject( Pirate6);
  405. Bateau_Script->objectifmax = 6;
  406. HistoireStage2();
  407. break;
  408. case 3:
  409. Pirate1->GetTransforms()->SetXY(54 * 12,( 100 - 54) * 12);
  410. Pirate2->GetTransforms()->SetXY(24 * 12,( 100 - 72) * 12);
  411. Pirate3->GetTransforms()->SetXY(39 * 12,( 100 - 23) * 12 );
  412. Pirate4->GetTransforms()->SetXY(8 * 12,( 100 - 40) * 12);
  413. Pirate5->GetTransforms()->SetXY(68 * 12,( 100 - 26) * 12);
  414. Pirate6->GetTransforms()->SetXY(49* 12,( 100 - 93) * 12 );
  415. Pirate7->GetTransforms()->SetXY(4 * 12,( 100 - 43) * 12);
  416. Pirate8->GetTransforms()->SetXY(13 * 12,( 100 - 4) * 12);
  417. Pirate9->GetTransforms()->SetXY(40 * 12,( 100 - 95) * 12 );
  418. Pirate9->GetTransforms()->SetXY(40 * 12,( 100 - 95) * 12 );
  419. Game.AddObject( Pirate1);
  420. Game.AddObject( Pirate2);
  421. Game.AddObject( Pirate3);
  422. Game.AddObject( Pirate4);
  423. Game.AddObject( Pirate5);
  424. Game.AddObject( Pirate6);
  425. Game.AddObject( Pirate7);
  426. Game.AddObject( Pirate8);
  427. Game.AddObject( Pirate9);
  428. Bateau_Script->objectifmax = 9;
  429. HistoireStage3();
  430. break;
  431. }
  432. //************Lancement du jeu************//
  433. Game.Game(); // Lancement du jeu.
  434. return 1;
  435. }
  436. extern "C"
  437. {
  438. int AddIn_main(int isAppli, unsigned short OptionNum)
  439. {
  440. Menu();
  441. return 1;
  442. }
  443. #pragma section _BR_Size
  444. unsigned long BR_Size;
  445. #pragma section
  446. #pragma section _TOP
  447. int InitializeSystem(int isAppli, unsigned short OptionNum)
  448. {
  449. return INIT_ADDIN_APPLICATION(isAppli, OptionNum);
  450. }
  451. #pragma section
  452. }