Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Wed Feb 25, 2004 2:11 am Post subject:
Stu... suggestions of things to do when fixing the shadows
I know that in the hope to make image loads faster (and they really loaded much faster), I did some crap which affected the shadows that refuses to appear sometimes. You will probably restore the old code, but listen to the folowing suggestions to make it faster:
This code is only needed when the image size changes, otherwise it's a waste of time. Move it to the procedure I created in FrmMain, the TFrmMain.ResizePaintArea.
Second, avoid using the method .FillRect to make squares because that code contains a load of useless code for us, which also waste time from user. This could be replaced by something like:
Code:
Procedure MakeSquare(Start:TPoint2D; Multiplier:byte; colour:TColor);
var
x,y:smallint;
begin
for y := (Start.Y * Multiplier) to (((Start.Y + 1) * Multiplier) - 1) do
for x: = (Start.X * Multiplier) to (((Start.X + 1) * Multiplier) - 1) do
image1.Picture.Bitmap.Canvas.Pixels[x,y]:= colour;
end;
And, finally... if you can make the act of changing colours a way faster, it will also help, since it's useless to rewrite all set of palettes just to change the X from one colour to another...
That's all for now. I will try to mess up with colour replacement QUICK_EDIT
I'll let u break shp builder when i give u the source. (still not added IMAGE -> SHP to the batch yet...) _________________ Free Map Editor - Game Requirements - Stucuk.Net QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum