hedgewars/uLand.pas
changeset 2154 3d2917be12c3
parent 2152 a2811690da1b
child 2157 a2fa7f594842
equal deleted inserted replaced
2153:e41fdfaa8edd 2154:3d2917be12c3
    76 {$ENDIF}
    76 {$ENDIF}
    77 if digest = '' then
    77 if digest = '' then
    78    digest:= s
    78    digest:= s
    79 else
    79 else
    80 {$IFDEF IPHONEOS}
    80 {$IFDEF IPHONEOS}
    81    //TryDo(s = digest, 'Different maps generated, sorry', false)
    81    //TryDo(s = digest, 'Different maps generated, sorry', false)  FIXME - digest calc needs endian handling
    82 {$ELSE}
    82 {$ELSE}
    83    TryDo(s = digest, 'Different maps generated, sorry', true)
    83    TryDo(s = digest, 'Different maps generated, sorry', true)
    84 {$ENDIF}
    84 {$ENDIF}
    85 end;
    85 end;
    86 
    86 
   630 end;
   630 end;
   631 
   631 
   632 // Hi unC0Rr.
   632 // Hi unC0Rr.
   633 // This is a function that Tiy assures me would not be good for gameplay.
   633 // This is a function that Tiy assures me would not be good for gameplay.
   634 // It allows the setting of arbitrary portions of landscape as indestructible, or regular, or even blank.
   634 // It allows the setting of arbitrary portions of landscape as indestructible, or regular, or even blank.
   635 // He said I could add it here only when I swore it wouldn't impact gameplay.  Which, as far as I can tell, is true.
   635 // He said I could add it here only when I swore it would not impact gameplay.  Which, as far as I can tell, is true.
   636 // I'd just like to play with it with my friends if you don't mind.
   636 // I would just like to play with it with my friends if you do not mind.
   637 // Can allow for amusing maps.
   637 // Can allow for amusing maps.
   638 procedure LoadMask;
   638 procedure LoadMask;
   639 var tmpsurf: PSDL_Surface;
   639 var tmpsurf: PSDL_Surface;
   640     p: PLongwordArray;
   640     p: PLongwordArray;
   641     x, y, cpX, cpY: Longword;
   641     x, y, cpX, cpY: Longword;
   675 WriteLnToConsole('Loading land from file...');
   675 WriteLnToConsole('Loading land from file...');
   676 AddProgress;
   676 AddProgress;
   677 tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/map', true, true, true);
   677 tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/map', true, true, true);
   678 TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true);
   678 TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true);
   679 
   679 
   680 // unC0Rr - should this be passed from the GUI? I'm not sure which layer does what
   680 // unC0Rr - should this be passed from the GUI? I am not sure which layer does what
   681 s:= Pathz[ptMapCurrent] + '/map.cfg';
   681 s:= Pathz[ptMapCurrent] + '/map.cfg';
   682 WriteLnToConsole('Fetching map HH limit');
   682 WriteLnToConsole('Fetching map HH limit');
   683 Assign(f, s);
   683 Assign(f, s);
   684 Reset(f);
   684 Reset(f);
   685 Readln(f);
   685 Readln(f);