hedgewars/uStore.pas
changeset 2019 b3f1eda8865f
parent 2017 7845c77c8d31
child 2022 9bbf8af42ace
equal deleted inserted replaced
2018:aec48276cced 2019:b3f1eda8865f
   735     else if numlines > 2 then textWidth:= w div (numLines-1);
   735     else if numlines > 2 then textWidth:= w div (numLines-1);
   736     end;
   736     end;
   737 
   737 
   738 textWidth:=((textWidth-(cornerWidth-edgeWidth)*2) div edgeWidth)*edgeWidth+edgeWidth;
   738 textWidth:=((textWidth-(cornerWidth-edgeWidth)*2) div edgeWidth)*edgeWidth+edgeWidth;
   739 textHeight:=(((numlines * h)-((cornerHeight-edgeWidth)*2)) div edgeWidth)*edgeWidth+edgeWidth;
   739 textHeight:=(((numlines * h)-((cornerHeight-edgeWidth)*2)) div edgeWidth)*edgeWidth+edgeWidth;
   740 addfilelog(inttostr(textHeight)+'=========== '+inttostr(numlines)+' x '+inttostr(h));
   740 
   741 //textWidth:=max(textWidth,SpritesData[tail].Width);
   741 //textWidth:=max(textWidth,SpritesData[tail].Width);
   742 rect.x:= 0;
   742 rect.x:= 0;
   743 rect.y:= 0;
   743 rect.y:= 0;
   744 rect.w:= textWidth + cornerWidth * 2;
   744 rect.w:= textWidth + cornerWidth * 2;
   745 rect.h:= textHeight + cornerHeight * 2 - edgeHeight + SpritesData[tail].Height;
   745 rect.h:= textHeight + cornerHeight * 2 - edgeHeight + SpritesData[tail].Height;
   961 
   961 
   962 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: Integer);
   962 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: Integer);
   963 var srcX, srcY, i, j, maxDest: LongInt;
   963 var srcX, srcY, i, j, maxDest: LongInt;
   964     srcPixels, destPixels: PLongWordArray;
   964     srcPixels, destPixels: PLongWordArray;
   965 begin
   965 begin
   966 addfilelog('copyToXY: src surf (w, h) = ('+inttostr(src^.w)+', '+inttostr(src^.h)+')');
       
   967 addfilelog('copyToXY: dest(X, Y) = ('+inttostr(destX)+', '+inttostr(destY)+')');
       
   968 maxDest:= (dest^.pitch div 4) * dest^.h;
   966 maxDest:= (dest^.pitch div 4) * dest^.h;
   969 srcPixels:= src^.pixels;
   967 srcPixels:= src^.pixels;
   970 destPixels:= dest^.pixels;
   968 destPixels:= dest^.pixels;
   971 
   969 
   972 for srcX:= 0 to src^.w - 1 do
   970 for srcX:= 0 to src^.w - 1 do