hedgewars/uLandObjects.pas
changeset 74 42257fee61ae
parent 70 82d93eeecebe
child 80 3c3dc6a148ca
equal deleted inserted replaced
73:fe1c62875a19 74:42257fee61ae
   198 x1:= 0;
   198 x1:= 0;
   199 until y > 900;
   199 until y > 900;
   200 if x1 > 0 then
   200 if x1 > 0 then
   201    begin
   201    begin
   202    Result:= true;
   202    Result:= true;
   203    tmpsurf:= LoadImage(Pathz[ptGraphics] + '/Girder.png', false);
   203    tmpsurf:= LoadImage(Pathz[ptGraphics] + '/Girder', false);
   204    rr.x:= x1;
   204    rr.x:= x1;
   205    rr.y:= y;
   205    rr.y:= y;
   206    while rr.x + 100 < x2 do
   206    while rr.x + 100 < x2 do
   207          begin
   207          begin
   208          SDL_UpperBlit(tmpsurf, nil, Surface, @rr);
   208          SDL_UpperBlit(tmpsurf, nil, Surface, @rr);
   374 for i:= 0 to Pred(ThemeObjects.Count) do
   374 for i:= 0 to Pred(ThemeObjects.Count) do
   375     begin
   375     begin
   376     Readln(f, s); // filename
   376     Readln(f, s); // filename
   377     with ThemeObjects.objs[i] do
   377     with ThemeObjects.objs[i] do
   378          begin
   378          begin
   379          Surf:= LoadImage(Pathz[ptThemeCurrent] + '/' + s + '.png', false);
   379          Surf:= LoadImage(Pathz[ptThemeCurrent] + '/' + s, false);
   380          Read(f, Width, Height);
   380          Read(f, Width, Height);
   381          with inland do Read(f, x, y, w, h);
   381          with inland do Read(f, x, y, w, h);
   382          Read(f, rectcnt);
   382          Read(f, rectcnt);
   383          for ii:= 1 to rectcnt do
   383          for ii:= 1 to rectcnt do
   384              with outland[ii] do Read(f, x, y, w, h);
   384              with outland[ii] do Read(f, x, y, w, h);
   391 for i:= 0 to Pred(SprayObjects.Count) do
   391 for i:= 0 to Pred(SprayObjects.Count) do
   392     begin
   392     begin
   393     Readln(f, s); // filename
   393     Readln(f, s); // filename
   394     with SprayObjects.objs[i] do
   394     with SprayObjects.objs[i] do
   395          begin
   395          begin
   396          Surf:= LoadImage(Pathz[ptThemeCurrent] + '/' + s + '.png', false);
   396          Surf:= LoadImage(Pathz[ptThemeCurrent] + '/' + s, false);
   397          Width:= Surf.w;
   397          Width:= Surf.w;
   398          Height:= Surf.h;
   398          Height:= Surf.h;
   399          ReadLn(f, Maxcnt)
   399          ReadLn(f, Maxcnt)
   400          end;
   400          end;
   401     end;
   401     end;