home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / COSEmulator / COSEmulator- SRC / src / GameUtilities.cpp < prev    next >
Encoding:
Text File  |  1998-06-21  |  1.4 KB  |  61 lines  |  [TEXT/CWIE]

  1. //===================================================================
  2. //=======================  Headers        =============================
  3.  
  4. #include "GameUtilities.h"
  5. #include <string.h>
  6.  
  7. //===================================================================
  8. //=======================  Globals        =============================
  9.  
  10.  
  11. //===================================================================
  12. //=======================  #define        =============================
  13.  
  14.  
  15. //===================================================================
  16. //=======================  Function Prototypes    =====================
  17.  
  18.  
  19. /*----------------------------------------------------------------------------\
  20.  
  21.     SetOwner
  22.  
  23. \----------------------------------------------------------------------------*/
  24. /*
  25. tOwnership SetOwner( char individual, char team )
  26. {
  27. tOwnership temp;
  28.  
  29. temp.individual = individual;
  30. temp.team        = team;
  31.  
  32. return( temp);
  33.  
  34. }
  35. */
  36.  
  37. /*----------------------------------------------------------------------------\
  38.  
  39.     CStrEqual
  40.  
  41. - checks to see if two c strings are exactly equal up the the null char
  42.  
  43. \----------------------------------------------------------------------------*/
  44.  
  45.  
  46. Boolean    CStrEqual( char *str1 , char *str2 )
  47. {
  48.     short    end = strlen( str1 );
  49.     short    counter;
  50.     
  51.     if( end != strlen( str2) )
  52.         return false;
  53.         
  54.     for( counter = 0; counter < end; counter++ )
  55.     {
  56.         if( str1[ counter ] != str2[ counter ] )
  57.             return false;
  58.     }
  59.     
  60.     return true;
  61. }