SRL Archive - General S.M.A.R.T.

Smart.scar should use TPoint's.


Wizzup?

2007-12-29 05:53:24

Personally, I'd rather have Smart-Scar side use TPoint's.
A path is a TPointArray. A Tile is a TPoint.
Like GetMyPos. Should return a TPoint. TileToMinimap. Same thing.
I think we should quickly jump to TPoints?

Like this..

function GetMyPos: tpoint;
var
me: Integer;
begin
me:= SmartGetFieldObject(0,MyPlayer);
result.x:= SmartGetFieldInt(0,BaseX) + SmartGetFieldInt(me,CurrentX) shr 7;
result.y:= SmartGetFieldInt(0,BaseY) + SmartGetFieldInt(me,CurrentY) shr 7;
SmartFreeObject(me);
end;

mastaraymond

2007-12-29 07:49:40

From: Wizzup?
Personally, I'd rather have Smart-Scar side use TPoint's.
A path is a TPointArray. A Tile is a TPoint.
Like GetMyPos. Should return a TPoint. TileToMinimap. Same thing.
I think we should quickly jump to TPoints?

Like this..

function GetMyPos: tpoint;
var
me: Integer;
begin
me:= SmartGetFieldObject(0,MyPlayer);
result.x:= SmartGetFieldInt(0,BaseX) + SmartGetFieldInt(me,CurrentX) shr 7;
result.y:= SmartGetFieldInt(0,BaseY) + SmartGetFieldInt(me,CurrentY) shr 7;
SmartFreeObject(me);
end;


Your decision lol..

BenLand100

2007-12-29 19:52:23

Just because it fits in a point does not mean it should be in one ;) Really, if you are just trying to get it in a position, why put it in a point? A TPoint should only be used for [longer-term] storing (TPointArray of a path for instance) imo, but w/e you do is fine with me ;)

Smartzkid

2007-12-29 21:02:39

Alright then…lets just make TTile and TTileArray then? Could even have TTileArrayTol with per tile tolerance/randomness, etc, etc if we wanted to have some really accurate/undetectable walking…

BenLand100

2007-12-30 01:02:38

From: Smartzkid
Alright then…lets just make TTile and TTileArray then? Could even have TTileArrayTol with per tile tolerance/randomness, etc, etc if we wanted to have some really accurate/undetectable walking…

You missed the point apparently…

The Claw

2007-12-30 03:15:14

having it in a tpoint makes more sense to me. but they both do the same things, so doesnt really make much difference i guess

Wizzup?

2007-12-30 05:26:30

From: Smartzkid
Alright then…lets just make TTile and TTileArray then? Could even have TTileArrayTol with per tile tolerance/randomness, etc, etc if we wanted to have some really accurate/undetectable walking…


Thats totally useless. As a TPoint = Tile.
I was talking about the functions in smart.scar…


Alright. As long as the non basic functions stick to TPoint's. ;)