SRL Archive - SRL Archives

[Suggestion]


Iamadam

2011-04-22 03:25:33

Delete this (Simba.simba)
function IntToPoint(x,y : integer) : TPoint;
begin
result := Point(x,y);
end;

I mean…really?

Wizzup?

2011-04-22 04:24:10

It was probably there for SCAR compatibility. Aren't you happy we didn't just include it in Simba but did it like this? ;)
Does the include (SRL) use it at all?

Iamadam

2011-04-22 04:35:57

Haha yes very happy it can be deleted :P
Not used as far as I could find.

i luffs yeww

2011-04-22 04:55:27


ian@ubuntu:~/mahsheet/mySimba/srl-opendev$ grep -ri IntToPoint *
SRL/misc/users.scar: MousePosPoint := srlpf_PlayerPageControl[ArmyIndex].ClientToScreen(IntToPoint(x, y));
SRL/misc/users.scar: MousePosPoint := srlpf_ArmyPageControl.ClientToScreen(IntToPoint(x, y));
SRL/misc/.svn/text-base/users.scar.svn-base: MousePosPoint := srlpf_PlayerPageControl[ArmyIndex].ClientToScreen(IntToPoint(x, y));
SRL/misc/.svn/text-base/users.scar.svn-base: MousePosPoint := srlpf_ArmyPageControl.ClientToScreen(IntToPoint(x, y));
SRL/core/simba.simba:function IntToPoint(x,y : integer) : TPoint;
SRL/core/.svn/text-base/simba.simba.svn-base:function IntToPoint(x,y : integer) : TPoint;
ian@ubuntu:~/mahsheet/mySimba/srl-opendev$

Iamadam

2011-04-22 05:03:05

Grep is amazing.
Ok, so its used twice in users.scar. No problem, just delete for next SRL version :)

i luffs yeww

2011-04-22 05:08:16

g/re/p is quite amazing.

By the way, a quick search for IntToPoint in SRL5 showed no use of IntToPoint. ;)

Troll

2011-04-22 08:16:09

To use of it is quite lazy in my mind :p

Kasi

2011-04-22 10:52:55

hm iv seen similar things such as point; and tile; whats the difference imo tile should be deleted?

TomTuff

2011-04-22 14:20:33

From: pur3b100d
hm iv seen similar things such as point; and tile; whats the difference imo tile should be deleted?


It can be better for readability to define something as a tile rather than a point, since although they store the same thing are conceptually different.

Markus

2011-04-22 16:21:19

Quite useful function actually
FunctionWhichWantsTPoint(IntToPoint(x, y));
Saves a few lines and a variable.

TomTuff

2011-04-22 16:26:51

From: Markus
Quite useful function actually
FunctionWhichWantsTPoint(IntToPoint(x, y));
Saves a few lines and a variable.


Point() does the same thing, shorter function name (less typing pl0x), and IntToPoint is pretty much unused.

Request:

Box(x1, y1, x2, y2): TBox rather than IntToBox()?