EURO_CMD.CPP 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include "defines.h"
  5. #include "data.equ"
  6. #include "3deng.h"
  7. #include "intronet.h"
  8. #include "sos.h"
  9. #include "audio.h"
  10. #include "digi.h"
  11. #include "midi.h"
  12. #include "config.h"
  13. #include "timer.h"
  14. #include "mallocx.h"
  15. #include "unmangle.h"
  16. #include "gamedata.h"
  17. #include "eurodefs.h"
  18. #include "euro_fxd.h"
  19. #include "mallocx.h"
  20. #include "euro_sym.h"
  21. #include "euro_def.h"
  22. #include "euro_var.h"
  23. #include "euro_dsk.h"
  24. #include "euro_grf.h"
  25. void EuroHelp();
  26. //********************************************************************************************************************************
  27. void ProcessCommandLine(int argc, char **argv)
  28. {
  29. char command[127];
  30. char setting[127];
  31. signed char CommandLineTEAM;
  32. EUROverbose = 0;
  33. EUROconsole = 0;
  34. EUROcommOVERIDE = 128;
  35. for (int i=1; i<argc; i++)
  36. // Inputs...
  37. {
  38. strcpy( command, argv[i] );
  39. strupr( command );
  40. if ( i < (argc-1) )
  41. {
  42. strcpy( setting, argv[i+1] );
  43. strupr( setting );
  44. setting[3] = 0;
  45. CommandLineTEAM = -1;
  46. if (!strcmp( setting, "BUL"))
  47. CommandLineTEAM = Bulgaria;
  48. if (!strcmp( setting, "CRO"))
  49. CommandLineTEAM = Croatia;
  50. if (!strcmp( setting, "CZE"))
  51. CommandLineTEAM = Czech;
  52. if (!strcmp( setting, "DEN"))
  53. CommandLineTEAM = Denmark;
  54. if (!strcmp( setting, "ENG"))
  55. CommandLineTEAM = England;
  56. if (!strcmp( setting, "FRA"))
  57. CommandLineTEAM = France;
  58. if (!strcmp( setting, "GER"))
  59. CommandLineTEAM = Germany;
  60. if (!strcmp( setting, "HOL"))
  61. CommandLineTEAM = Holland;
  62. if (!strcmp( setting, "ITA"))
  63. CommandLineTEAM = Italy;
  64. if (!strcmp( setting, "POR"))
  65. CommandLineTEAM = Portugal;
  66. if (!strcmp( setting, "ROM"))
  67. CommandLineTEAM = Romania;
  68. if (!strcmp( setting, "RUS"))
  69. CommandLineTEAM = Russia;
  70. if (!strcmp( setting, "SCO"))
  71. CommandLineTEAM = Scotland;
  72. if (!strcmp( setting, "SPA"))
  73. CommandLineTEAM = Spain;
  74. if (!strcmp( setting, "SWI"))
  75. CommandLineTEAM = Switzerland;
  76. if (!strcmp( setting, "TUR"))
  77. CommandLineTEAM = Turkey;
  78. }
  79. //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  80. //º º
  81. //º WIREPLAY COMMANDS º
  82. //º º
  83. //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  84. if (!strcmp( command, "-WIREPLAY"))
  85. {
  86. printf ("þ Attempting WIREPLAY game.\n");
  87. EUROgameType = EURO_wireplay;
  88. }
  89. if (!strcmp( command, "-NETWORK"))
  90. {
  91. printf ("þ Attempting NETWORK game.\n");
  92. EUROgameType = EURO_network_game;
  93. }
  94. if (!strcmp( command, "-FRIENDLY"))
  95. {
  96. printf ("þ Attempting FRIENDLY game.\n");
  97. EUROgameType = EURO_friendly;
  98. }
  99. if ( EUROgameType == EURO_wireplay )
  100. {
  101. if (!strcmp( command, "-HOME"))
  102. {
  103. if ( CommandLineTEAM != -1 )
  104. EUROteamA = CommandLineTEAM;
  105. }
  106. if (!strcmp( command, "-AWAY"))
  107. {
  108. if ( CommandLineTEAM != -1 )
  109. EUROteamB = CommandLineTEAM;
  110. }
  111. }
  112. //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  113. //º º
  114. //º GENERAL COMMANDS º
  115. //º º
  116. //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  117. if (!strcmp( command, "-1PLAYER"))
  118. EUROnoOfMatchPlyrs = 1;
  119. if (!strcmp( command, "-2PLAYERS"))
  120. EUROnoOfMatchPlyrs = 2;
  121. if (!strcmp( command, "-3PLAYERS"))
  122. EUROnoOfMatchPlyrs = 3;
  123. if (!strcmp( command, "-4PLAYERS"))
  124. EUROnoOfMatchPlyrs = 4;
  125. if ( EUROgameType == EURO_championship )
  126. {
  127. if (!strcmp( command, "-5PLAYER"))
  128. EUROnoOfMatchPlyrs = 5;
  129. if (!strcmp( command, "-6PLAYERS"))
  130. EUROnoOfMatchPlyrs = 6;
  131. if (!strcmp( command, "-7PLAYERS"))
  132. EUROnoOfMatchPlyrs = 7;
  133. if (!strcmp( command, "-8PLAYERS"))
  134. EUROnoOfMatchPlyrs = 8;
  135. if (!strcmp( command, "-9PLAYER"))
  136. EUROnoOfMatchPlyrs = 9;
  137. if (!strcmp( command, "-10PLAYERS"))
  138. EUROnoOfMatchPlyrs = 10;
  139. if (!strcmp( command, "-11PLAYERS"))
  140. EUROnoOfMatchPlyrs = 11;
  141. if (!strcmp( command, "-12PLAYERS"))
  142. EUROnoOfMatchPlyrs = 12;
  143. if (!strcmp( command, "-13PLAYER"))
  144. EUROnoOfMatchPlyrs = 13;
  145. if (!strcmp( command, "-14PLAYERS"))
  146. EUROnoOfMatchPlyrs = 14;
  147. if (!strcmp( command, "-15PLAYERS"))
  148. EUROnoOfMatchPlyrs = 15;
  149. if (!strcmp( command, "-16PLAYERS"))
  150. EUROnoOfMatchPlyrs = 16;
  151. }
  152. if (!strcmp( command, "-GROUPS"))
  153. Menu = GROUP_FIXTURES;
  154. if (!strcmp( command, "-WEMBLEY"))
  155. Menu = VENUE_FLYTHRU;
  156. if (!strcmp( command, "-MODEM"))
  157. Menu = MODEM_SETUP;
  158. if (!strcmp( command, "-SYMBOLS"))
  159. EUROsymbol = 1;
  160. if (!strcmp( command, "-V1"))
  161. EUROverbose = 1;
  162. if (!strcmp( command, "-CONSOLE"))
  163. EUROconsole = 1;
  164. if (!strcmp( command, "-COMMTYPE0"))
  165. EUROcommOVERIDE = 0;
  166. if (!strcmp( command, "-COMMTYPE1"))
  167. EUROcommOVERIDE = 1;
  168. if (!strcmp( command, "-COMMTYPE2"))
  169. EUROcommOVERIDE = 2;
  170. if (!strcmp( command, "-COMMTYPE3"))
  171. EUROcommOVERIDE = 3;
  172. if (!strcmp( command, "?"))
  173. EuroHelp();
  174. }
  175. setup.verbose = EUROverbose;
  176. if ( EUROverbose != 0 )
  177. {
  178. printf ("þ Outputting VERBOSE information.\n");
  179. }
  180. }
  181. //********************************************************************************************************************************
  182. void EuroHelp()
  183. {
  184. printf (" -friendly Defaults to friendly game on execution.\n");
  185. printf (" -network Defaults to network game on execution.\n\n");
  186. printf (" -wireplay Defaults to wireplay game on execution.\n");
  187. }
  188. //********************************************************************************************************************************