hedgewars/uTextures.pas
changeset 7151 ec15d9e1a7e3
parent 6982 8d41d22a291d
child 7186 013deb83086b
child 8027 e5ba3dd12531
equal deleted inserted replaced
7148:c7ee9592c9a1 7151:ec15d9e1a7e3
   165     th:= toPowerOf2(Surf^.h);
   165     th:= toPowerOf2(Surf^.h);
   166 
   166 
   167     Surface2Tex^.rx:= Surf^.w / tw;
   167     Surface2Tex^.rx:= Surf^.w / tw;
   168     Surface2Tex^.ry:= Surf^.h / th;
   168     Surface2Tex^.ry:= Surf^.h / th;
   169 
   169 
   170     GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel);
   170     tmpp:= GetMem(tw * th * surf^.format^.BytesPerPixel);
   171 
   171 
   172     fromP4:= Surf^.pixels;
   172     fromP4:= Surf^.pixels;
   173     toP4:= tmpp;
   173     toP4:= tmpp;
   174 
   174 
   175     for y:= 0 to Pred(Surf^.h) do
   175     for y:= 0 to Pred(Surf^.h) do