[CF-Devel] Patch submission: weather.c for Windows32

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Sep 26 01:09:26 CDT 2003


Nicolas Weeger wrote:
>
     
      Hello.
     
     >
     
     
     >
     
      Compiling the server under Windows, i had to fix some things in weather.c
     
     >
     
     
     >
     
      Here's the patch.
     
     >
     
     
     >
     
      It changes long long to sint64 (that's what the typedef is for :))
     
     >
     
      And instead of int64 * 1.5, it does int64 * 3 / 2
     
     >
     
      (since windows can't figure how to do *1.5.....)
     
     >
     
     
     >
     
      I believe it'll work under Linux too...
     
     
  Applied to CVS.


>
     
     
     >
     
      Nicolas 'Ryo'
     
     >
     
     
     >
     
     
     >
     
      ------------------------------------------------------------------------
     
     >
     
     
     >
     
      Index: weather.c
     
     >
     
      ===================================================================
     
     >
     
      RCS file: /cvsroot/crossfire/crossfire/server/weather.c,v
     
     >
     
      retrieving revision 1.34
     
     >
     
      diff -r1.34 weather.c
     
     >
     
      2886,2887c2886,2887
     
     >
     
      <     long long total_rainfall = 0;
     
     >
     
      <     long long total_wind = 0;
     
     >
     
      ---
     
     >
     
     
     >>
     
         sint64 total_rainfall = 0;
     
     >>
     
         sint64 total_wind = 0;
     
     >
     
     
     >
     
      2927c2927
     
     >
     
      <     avgwind = (total_wind    / (WEATHERMAPTILESX * WEATHERMAPTILESY) * 1.5);
     
     >
     
      ---
     
     >
     
     
     >>
     
         avgwind = (total_wind    / ((WEATHERMAPTILESX * WEATHERMAPTILESY) * 3 / 2));
     
     >
     
     
     >
     
     
     


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list