VERSION.CPP (34490B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* $Header: /CounterStrike/VERSION.CPP 14 3/16/97 10:16p Joe_b $ */ 17 /*************************************************************************** 18 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** 19 * * 20 * Project Name : Command & Conquer * 21 * * 22 * File Name : VERSION.CPP * 23 * * 24 * Programmer : Bill R. Randolph * 25 * * 26 * Start Date : 10/26/95 * 27 * * 28 * Last Update : September 17, 1996 [JLB] * 29 * * 30 *-------------------------------------------------------------------------* 31 * Functions: * 32 * VersionClass::VersionClass -- Class constructor * 33 * VersionClass::Version_Number -- Returns program version number * 34 * VersionClass::Major_Version -- returns major version # * 35 * VersionClass::Minor_Version -- returns minor version (revision) number* 36 * VersionClass::Version_Name -- returns version # as char string * 37 * VersionClass::Read_Text_String -- reads version text string from disk * 38 * VersionClass::Version_Protocol -- returns default protocol for version* 39 * VersionClass::Init_Clipping -- Initializes version clipping * 40 * VersionClass::Clip_Version -- "clips" the given version range * 41 * VersionClass::Min_Version -- returns lowest version # to connect to * 42 * VersionClass::Max_Version -- returns highest version # to connect to * 43 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 44 #if (0)//PG 45 #include "function.h" 46 47 #ifdef FIXIT_VERSION_3 48 #include "rawolapi.h" // For version number. 49 #endif 50 51 /****************************** Globals ************************************/ 52 //--------------------------------------------------------------------------- 53 // This is a table of version numbers # the communications protocol used for 54 // that version number. It's used by the game owner to determine the 55 // protocol to be used for a given session. 56 // 57 // This table needs to be updated every time a new communications protocol 58 // is implemented, not every time a new version is created. 59 // 60 // A given protocol is used from its corresponding version #, up to (but not 61 // including) the next version number in the table. The last protocol in 62 // the table is the default protocol for this version. 63 //--------------------------------------------------------------------------- 64 static VersionProtocolType VersionProtocol[] = { 65 {0x00001000,COMM_PROTOCOL_SINGLE_NO_COMP}, // (obsolete) 66 {0x00002000,COMM_PROTOCOL_SINGLE_E_COMP}, // (obsolete) 67 {0x00010000,COMM_PROTOCOL_MULTI_E_COMP}, 68 }; 69 70 71 /*************************************************************************** 72 * VersionClass::VersionClass -- Class constructor * 73 * * 74 * INPUT: * 75 * none. * 76 * * 77 * OUTPUT: * 78 * none. * 79 * * 80 * WARNINGS: * 81 * none. * 82 * * 83 * HISTORY: * 84 * 10/26/1995 BRR : Created. * 85 * 09/17/1996 JLB : Converted to used initializer list. * 86 *=========================================================================*/ 87 VersionClass::VersionClass(void) : 88 Version(0), 89 MajorVer(0), 90 MinorVer(0), 91 MinClipVer(0), 92 MaxClipVer(0), 93 VersionInit(false), 94 MajorInit(false), 95 MinorInit(false), 96 TextInit(false) 97 { 98 VersionText[0] = '\0'; 99 VersionName[0] = '\0'; 100 } 101 102 103 /*************************************************************************** 104 * VersionClass::Version_Number -- Returns program version number * 105 * * 106 * Version Number Format: * 107 * Non-CHEAT format: * 108 * Byte 3,2: major version (printed to the left of a decimal) * 109 * Byte 1,0: minor version (printed to the right of a decimal) * 110 * Thus, version 1.07 would appear as 0x0001 0700 * 111 * * 112 * This format guarantees that a greater-than or less-than comparison * 113 * will work on version numbers. * 114 * * 115 * CHEAT format: * 116 * Byte 3: Month # * 117 * Byte 2: Day # * 118 * Byte 1: Hour # * 119 * Byte 0: Minute # * 120 * * 121 * This format guarantees a unique version number for each compile (as * 122 * long as they're a minute or more apart), with increasing version #'s * 123 * for later times. * 124 * * 125 * Either format should be printed in hex. * 126 * * 127 * This routine also fills in a text string (retrieved with Version_Text), * 128 * which may contain a custom string (such as "Beta"); this string is * 129 * read from the file VERSION.TXT. * 130 * * 131 * INPUT: * 132 * none. * 133 * * 134 * OUTPUT: * 135 * Version number * 136 * * 137 * WARNINGS: * 138 * Don't call this function until the file system has been init'd! * 139 * * 140 * HISTORY: * 141 * 10/26/1995 BRR : Created. * 142 *=========================================================================*/ 143 144 //ajw Note: This function is no longer called. MIN_VERSION is now incorrect, but I don't have time 145 // for a full rebuild (3 hrs!), and as MIN_VERSION is no longer referred to, I'm going to leave it. 146 // Really, it should be deleted or commented out. 147 // Version number used is now GAME_VERSION. 148 // Note also that VERSION_RA_300 is wrong, but not used. 149 150 unsigned long VersionClass::Version_Number(void) 151 { 152 //------------------------------------------------------------------------ 153 // Read the text description, if there is one 154 //------------------------------------------------------------------------ 155 if (!TextInit) { 156 Read_Text_String(); 157 TextInit = 1; 158 } 159 160 //------------------------------------------------------------------------ 161 // If the version has already been set, just return it. 162 //------------------------------------------------------------------------ 163 if (VersionInit) { 164 return (Version); 165 } 166 167 //------------------------------------------------------------------------ 168 // Generate the version # 169 //------------------------------------------------------------------------ 170 Version = ((Major_Version() << 16) | Minor_Version()); 171 VersionInit = 1; 172 173 return (Version); 174 175 } /* end of Version_Number */ 176 177 178 /*************************************************************************** 179 * VersionClass::Major_Version -- returns major version # * 180 * * 181 * INPUT: * 182 * none. * 183 * * 184 * OUTPUT: * 185 * Major Version number * 186 * * 187 * WARNINGS: * 188 * Don't call this function until the file system has been init'd! * 189 * * 190 * HISTORY: * 191 * 10/26/1995 BRR : Created. * 192 *=========================================================================*/ 193 unsigned short VersionClass::Major_Version(void) 194 { 195 #ifdef DEV_VERSION 196 static char * date = __DATE__; // format: Mmm dd yyyy 197 static char const * months = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"; 198 char buf[10]; 199 char * ptr; 200 char * tok; 201 int monthnum; 202 int daynum; 203 #endif 204 205 //------------------------------------------------------------------------ 206 // Read the text description, if there is one 207 //------------------------------------------------------------------------ 208 if (!TextInit) { 209 Read_Text_String(); 210 TextInit = 1; 211 } 212 213 //------------------------------------------------------------------------ 214 // If the major version # is already set, just return it. 215 //------------------------------------------------------------------------ 216 if (MajorInit) { 217 return (MajorVer); 218 } 219 220 //------------------------------------------------------------------------ 221 // For a development version, use the date (month & day) as the major 222 // version number. 223 //------------------------------------------------------------------------ 224 #ifdef DEV_VERSION 225 //........................................................................ 226 // Fetch the month and place in the high byte. 227 //........................................................................ 228 strupr(date); 229 tok = strtok(date, " "); 230 ptr = strstr(months, tok); 231 if (ptr) { 232 monthnum = (((ptr - months) / 3) + 1); 233 } else { 234 monthnum = 0; 235 } 236 237 //........................................................................ 238 // Convert the month number to a hex counterpart (so, when it's printed 239 // in hex, it will read correctly.) 240 //........................................................................ 241 sprintf(buf,"%d",monthnum); 242 sscanf(buf,"%x",&monthnum); 243 244 //........................................................................ 245 // Fetch the date and place that in the low byte. 246 //........................................................................ 247 tok = strtok(NULL, " "); 248 if (tok) { 249 daynum = atoi(tok); 250 } else { 251 daynum = 0; 252 } 253 254 //........................................................................ 255 // Convert the day number to a hex counterpart 256 //........................................................................ 257 sprintf(buf,"%d",daynum); 258 sscanf(buf,"%x",&daynum); 259 260 MajorVer = ((monthnum << 8) | daynum); 261 262 //------------------------------------------------------------------------ 263 // For a non-development version, use the hard-coded minor version number. 264 //------------------------------------------------------------------------ 265 #else 266 MajorVer = MAJOR_VERSION; 267 #endif 268 269 MajorInit = 1; 270 271 return (MajorVer); 272 273 } /* end of Major_Version */ 274 275 276 /*************************************************************************** 277 * VersionClass::Minor_Version -- returns minor version (revision) number * 278 * * 279 * INPUT: * 280 * none. * 281 * * 282 * OUTPUT: * 283 * Minor Version number * 284 * * 285 * WARNINGS: * 286 * Don't call this function until the file system has been init'd! * 287 * * 288 * HISTORY: * 289 * 10/26/1995 BRR : Created. * 290 *=========================================================================*/ 291 unsigned short VersionClass::Minor_Version(void) 292 { 293 #ifdef DEV_VERSION 294 static char * time = __TIME__; // format: hh:mm:ss 295 char * tok; 296 char buf[10]; 297 int hournum; 298 int minnum; 299 #endif 300 301 //------------------------------------------------------------------------ 302 // Read the text description, if there is one 303 //------------------------------------------------------------------------ 304 if (!TextInit) { 305 Read_Text_String(); 306 TextInit = 1; 307 } 308 309 //------------------------------------------------------------------------ 310 // If the minor version # is already set, just return it. 311 //------------------------------------------------------------------------ 312 if (MinorInit) { 313 return (MinorVer); 314 } 315 316 //------------------------------------------------------------------------ 317 // For in-development versions, use the time (hour & min) as the minor 318 // version 319 //------------------------------------------------------------------------ 320 #ifdef DEV_VERSION 321 //........................................................................ 322 // Fetch the hour and place that in the last two digit positions. 323 //........................................................................ 324 tok = strtok(time, ": "); 325 if (tok) { 326 hournum = atoi(tok); 327 } else { 328 hournum = 0; 329 } 330 331 //........................................................................ 332 // Convert the hour number to a hex counterpart (so, when it's printed 333 // in hex, it will read correctly.) 334 //........................................................................ 335 sprintf(buf,"%d",hournum); 336 sscanf(buf,"%x",&hournum); 337 338 //........................................................................ 339 // Fetch the minute and place that in the last two digit positions. 340 //........................................................................ 341 tok = strtok(NULL, ": "); 342 if (tok) { 343 minnum = atoi(tok); 344 } else { 345 minnum = 0; 346 } 347 348 //........................................................................ 349 // Convert the minute number to a hex counterpart 350 //........................................................................ 351 sprintf(buf,"%d",minnum); 352 sscanf(buf,"%x",&minnum); 353 354 MinorVer = ((hournum << 8) | minnum); 355 356 //------------------------------------------------------------------------ 357 // For a non-development version, use the hard-coded minor revision number. 358 //------------------------------------------------------------------------ 359 #else 360 361 #ifdef FIXIT_VERSION_3 // Insanity. CS installation should not have affected version number. ajw 362 363 MinorVer = MINOR_VERSION; 364 365 #else // FIXIT_VERSION_3 366 367 #ifdef FIXIT_CSII 368 MinorVer = MINOR_VERSION; 369 if (Is_Counterstrike_Installed()) { 370 MinorVer = MINOR_VERSION - 1; 371 } 372 #else 373 #ifdef FIXIT_VERSION 374 /* If counterstrike is not installed then we report version 1.06 375 * otherwise we report ourselves as 1.08 376 */ 377 if (Is_Counterstrike_Installed() == false) { 378 MinorVer = (MINOR_VERSION - CS_MINOR_VERSION_MODIFIER); 379 } else { 380 MinorVer = MINOR_VERSION; 381 } 382 #else 383 MinorVer = MINOR_VERSION; 384 #endif 385 #endif 386 387 #endif // FIXIT_VERSION_3 388 389 #endif 390 391 MinorInit = 1; 392 393 return (MinorVer); 394 395 } /* end of Minor_Version */ 396 397 398 /*************************************************************************** 399 * VersionClass::Version_Name -- returns version # as char string * 400 * * 401 * INPUT: * 402 * none. * 403 * * 404 * OUTPUT: * 405 * ptr to name * 406 * * 407 * WARNINGS: * 408 * none. * 409 * * 410 * HISTORY: * 411 * 10/30/1995 BRR : Created. * 412 *=========================================================================*/ 413 char * VersionClass::Version_Name(void) 414 { 415 //------------------------------------------------------------------------ 416 // For developmental versions, just use the major & minor version #'s 417 //------------------------------------------------------------------------ 418 #ifdef DEV_VERSION 419 sprintf(VersionName, "%x.%x", VerNum.Major_Version(), VerNum.Minor_Version()); 420 421 //------------------------------------------------------------------------ 422 // For final versions, trim 0's off the minor version 423 //------------------------------------------------------------------------ 424 #else 425 unsigned short adjusted_minor; 426 int i; 427 428 adjusted_minor = Minor_Version(); 429 for (i = 0; i < 4; i++) { 430 if ( (adjusted_minor & 0x000f) != 0) { 431 break; 432 } 433 adjusted_minor >>= 4; 434 } 435 436 sprintf(VersionName, "%x.%x", VerNum.Major_Version(), adjusted_minor); 437 #endif 438 439 return (VersionName); 440 441 } /* end of Version_Name */ 442 443 444 /*************************************************************************** 445 * VersionClass::Read_Text_String -- reads version # text string from disk * 446 * * 447 * INPUT: * 448 * none. * 449 * * 450 * OUTPUT: * 451 * none. * 452 * * 453 * WARNINGS: * 454 * Don't call this function until the file system has been init'd! * 455 * * 456 * HISTORY: * 457 * 10/26/1995 BRR : Created. * 458 *=========================================================================*/ 459 void VersionClass::Read_Text_String(void) 460 { 461 RawFileClass file("VERSION.TXT"); 462 463 if (file.Is_Available()) { 464 file.Read(VersionText, sizeof(VersionText)); 465 VersionText[sizeof(VersionText)-1] = '\0'; 466 while (VersionText[strlen(VersionText)-1] == '\r') { 467 VersionText[strlen(VersionText)-1] = '\0'; 468 } 469 } else { 470 VersionText[0] = '\0'; 471 } 472 473 } /* end of Read_Text_String */ 474 475 476 /*************************************************************************** 477 * VersionClass::Version_Protocol -- returns default protocol for version * 478 * * 479 * INPUT: * 480 * version version # to look up * 481 * * 482 * OUTPUT: * 483 * protocol value to use for that version # * 484 * * 485 * WARNINGS: * 486 * none. * 487 * * 488 * HISTORY: * 489 * 10/26/1995 BRR : Created. * 490 *=========================================================================*/ 491 CommProtocolType VersionClass::Version_Protocol(unsigned long version) 492 { 493 int i,j; 494 495 //------------------------------------------------------------------------ 496 // Compute # entries in the VersionProtocol table 497 //------------------------------------------------------------------------ 498 j = sizeof (VersionProtocol) / sizeof(VersionProtocolType); 499 500 //------------------------------------------------------------------------ 501 // Search backwards through the table, finding the first entry for which 502 // the given version # is >= the table's; this is the range containing 503 // the given version number. 504 //------------------------------------------------------------------------ 505 for (i = j - 1; i >= 0; i--) { 506 if (version >= VersionProtocol[i].Version) { 507 return (VersionProtocol[i].Protocol); 508 } 509 } 510 511 //------------------------------------------------------------------------ 512 // If no range was found for the given version, return the highest 513 // possible protocol. (If version clipping is being done properly, this 514 // case should never happen, but never say never.) 515 //------------------------------------------------------------------------ 516 return (VersionProtocol[j-1].Protocol); 517 518 } /* end of Version_Protocol */ 519 520 521 /*************************************************************************** 522 * VersionClass::Init_Clipping -- Initializes version clipping * 523 * * 524 * Initializes the Min & Max clip version #'s to the min & max values * 525 * defined for this program. This sets the initial range for use by * 526 * the Clip_Version routine. * 527 * * 528 * INPUT: * 529 * none. * 530 * * 531 * OUTPUT: * 532 * none. * 533 * * 534 * WARNINGS: * 535 * The DEV_VERSION version of this routine calls Version_Number(), so * 536 * don't call this routine until the file system has been initialized! * 537 * * 538 * HISTORY: * 539 * 10/26/1995 BRR : Created. * 540 *=========================================================================*/ 541 void VersionClass::Init_Clipping(void) 542 { 543 MinClipVer = Min_Version(); 544 MaxClipVer = Max_Version(); 545 546 } /* end of Init_Clipping */ 547 548 549 /*************************************************************************** 550 * VersionClass::Clip_Version -- "clips" the given version range * 551 * * 552 * This routine compares another program's supported min/max version * 553 * range with the range currently defined by 'MinClipVer' and 'MaxClipVer'.* 554 * If there is overlap in the two ranges, Min & MaxClipVer are adjusted * 555 * to the bounds of the overlap. The routine returns the largest version * 556 * number shared by the ranges (MaxClipVer). * 557 * * 558 * Thus, by calling Init_Clipping(), then a series of Clip_Version() calls,* 559 * a mutually-acceptable range of version #'s may be negotiated between * 560 * different versions of this program. The max shared version may then * 561 * be used to decide upon a communications protocol that all programs * 562 * support. * 563 * * 564 * INPUT: * 565 * minver min version to clip to * 566 * maxver max version to clip to * 567 * * 568 * OUTPUT: * 569 * highest clipped version # * 570 * 0 = given range is below our current range * 571 * 0xFFFFFFFF = given range is above our current range * 572 * * 573 * WARNINGS: * 574 * Be sure Init_Clipping() was called before performing a clipping * 575 * session. * 576 * * 577 * HISTORY: * 578 * 10/26/1995 BRR : Created. * 579 *=========================================================================*/ 580 unsigned long VersionClass::Clip_Version(unsigned long minver, 581 unsigned long maxver) 582 { 583 //------------------------------------------------------------------------ 584 // If the given range is outside & above our own, return an error. 585 //------------------------------------------------------------------------ 586 if (minver > MaxClipVer) 587 return (0xffffffff); 588 589 //------------------------------------------------------------------------ 590 // If the given range is outside & below our own, return an error. 591 //------------------------------------------------------------------------ 592 if (maxver < MinClipVer) 593 return (0); 594 595 //------------------------------------------------------------------------ 596 // Clip the lower range value 597 //------------------------------------------------------------------------ 598 if (minver > MinClipVer) 599 MinClipVer = minver; 600 601 //------------------------------------------------------------------------ 602 // Clip the upper range value 603 //------------------------------------------------------------------------ 604 if (maxver < MaxClipVer) 605 MaxClipVer = maxver; 606 607 //------------------------------------------------------------------------ 608 // Return the highest version supported by the newly-adjusted range. 609 //------------------------------------------------------------------------ 610 return (MaxClipVer); 611 612 } /* end of Clip_Version */ 613 614 615 /*************************************************************************** 616 * VersionClass::Min_Version -- returns lowest version # to connect to * 617 * * 618 * Returns the minimum version # this program will connect to. * 619 * * 620 * If DEV_VERSION is defined, this routine returns the current version, so * 621 * this program will only connect to an exact copy of itself. * 622 * * 623 * INPUT: * 624 * none. * 625 * * 626 * OUTPUT: * 627 * min version # * 628 * * 629 * WARNINGS: * 630 * The DEV_VERSION version of this routine calls Version_Number(), so * 631 * don't call this routine until the file system has been initialized! * 632 * * 633 * HISTORY: * 634 * 10/26/1995 BRR : Created. * 635 *=========================================================================*/ 636 unsigned long VersionClass::Min_Version(void) 637 { 638 #ifdef DEV_VERSION 639 return (Version_Number()); 640 #else 641 642 #ifdef FIXIT_VERSION_3 643 644 // Note! I'm no longer using MIN_VERSION, MAX_VERSION, or VERSION_RA_300! 645 // But no time to do three full rebuilds right now, so I'm not deleting them from the header file... ajw 646 return GAME_VERSION; 647 648 #else // FIXIT_VERSION_3 649 650 #ifdef FIXIT_VERSION 651 if ( Is_Counterstrike_Installed() ) { 652 return (MIN_VERSION - 1); 653 } 654 return (MIN_VERSION); 655 #else 656 if ( Is_Counterstrike_Installed() ){ 657 return (MIN_VERSION - CS_MINOR_VERSION_MODIFIER); 658 }else{ 659 return (MIN_VERSION); 660 } 661 #endif 662 663 #endif // FIXIT_VERSION_3 664 665 #endif 666 667 } /* end of Min_Version */ 668 669 670 /*************************************************************************** 671 * VersionClass::Max_Version -- returns highest version # to connect to * 672 * * 673 * Returns the maximum version # this program will connect to. * 674 * * 675 * If DEV_VERSION is defined, this routine returns the current version, so * 676 * this program will only connect to an exact copy of itself. * 677 * * 678 * INPUT: * 679 * none. * 680 * * 681 * OUTPUT: * 682 * max version # * 683 * * 684 * WARNINGS: * 685 * The DEV_VERSION version of this routine calls Version_Number(), so * 686 * don't call this routine until the file system has been initialized! * 687 * * 688 * HISTORY: * 689 * 10/26/1995 BRR : Created. * 690 *=========================================================================*/ 691 unsigned long VersionClass::Max_Version(void) 692 { 693 #ifdef DEV_VERSION 694 return (Version_Number()); 695 #else 696 697 #ifdef FIXIT_VERSION_3 698 699 // Note! I'm no longer using MIN_VERSION, MAX_VERSION, or VERSION_RA_300! 700 // But no time to do three full rebuilds right now, so I'm not deleting them from the header file... ajw 701 return GAME_VERSION; 702 703 #else 704 705 #ifdef FIXIT_CSII // checked - ajw 706 return (MAX_VERSION); 707 #else 708 #ifdef FIXIT_VERSION 709 if (Is_Counterstrike_Installed() == false) { 710 return (MAX_VERSION - CS_MINOR_VERSION_MODIFIER); 711 } else { 712 return (MAX_VERSION); 713 } 714 #else 715 if ( Is_Counterstrike_Installed() ){ 716 return (MAX_VERSION + CS_MINOR_VERSION_MODIFIER); 717 }else{ 718 return (MAX_VERSION); 719 } 720 #endif 721 #endif 722 #endif 723 724 #endif // FIXIT_VERSION_3 725 726 } /* end of Max_Version */ 727 728 729 char const * Version_Name(void) 730 { 731 #ifdef NEVER 732 static char buffer[32]; 733 734 /* 735 ** Fetch the day and month components from the current 736 ** build date. 737 */ 738 static char * date = __DATE__; // format: Mmm dd yyyy 739 strupr(date); 740 char const * tok = strtok(date, " "); 741 static char const * months = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"; 742 char const * ptr = strstr(months, tok); 743 int monthnum = 0; 744 if (ptr != NULL) { 745 monthnum = (((ptr - months) / 3) + 1); 746 } 747 748 tok = strtok(NULL, " "); 749 int daynum = 0; 750 if (tok != NULL) { 751 daynum = atoi(tok); 752 } 753 754 /* 755 ** Fetch the time components from the current build time. 756 */ 757 static char * time = __TIME__; // format: hh:mm:ss 758 tok = strtok(time, ": "); 759 int hournum = 0; 760 if (tok != NULL) { 761 hournum = atoi(tok); 762 } 763 764 tok = strtok(NULL, ": "); 765 int minnum = 0; 766 if (tok != NULL) { 767 minnum = atoi(tok); 768 } 769 770 sprintf(buffer, "%02d%02d%02d", monthnum, daynum, (hournum*4) + (minnum / 15)); 771 return(buffer); 772 #else 773 774 static char buffer[128]; 775 776 memset(buffer, '\0', sizeof(buffer)); 777 778 #ifdef FIXIT_VERSION_3 779 strcpy( buffer, "3.03" ); 780 781 #ifdef ENGLISH 782 strcat(buffer, "E"); 783 #else 784 #ifdef GERMAN 785 strcat(buffer, "G"); 786 #else 787 #ifdef FRENCH 788 strcat(buffer, "F"); 789 #endif 790 #endif 791 #endif 792 793 #else // FIXIT_VERSION_3 794 795 #ifdef FIXIT_PATCH_108 796 //strcpy(buffer, "1.08PE"); 797 strcpy(buffer, "1.08P"); 798 799 #ifdef FIXIT_CSII 800 strcpy(buffer,"2.00"); 801 #ifdef DEV_VERSION 802 strcpy(buffer,VerNum.Version_Name()); 803 #endif 804 #ifdef DEV_VER_NAME 805 strcpy(buffer,__DATE__); // format: Mmm dd yyyy 806 #endif 807 #endif 808 809 #ifdef ENGLISH 810 strcat(buffer, "E"); 811 #else 812 #ifdef GERMAN 813 strcat(buffer, "G"); 814 #else 815 #ifdef FRENCH 816 strcat(buffer, "F"); 817 #endif 818 #endif 819 #endif 820 821 #else 822 strcpy(buffer, "1.07E"); 823 #endif 824 825 #endif // FIXIT_VERSION_3 826 827 if (Is_Counterstrike_Installed ()){ 828 strcat (buffer, "CS"); 829 } 830 if (Is_Aftermath_Installed()) { 831 strcat (buffer, "AM"); 832 } 833 834 #if(TEN) 835 strcat(buffer, "Ten"); // Ten version 836 #endif 837 838 #if(MPATH) 839 strcat(buffer, "MPath"); // MPath version 840 #endif 841 842 RawFileClass file("VERSION.TXT"); 843 if (file.Is_Available()) { 844 strcat(buffer, "\r"); 845 file.Read(&buffer[strlen(buffer)], 25); 846 } 847 return(buffer); 848 #endif 849 } 850 #endif