SRL Archive - Reflection Development

Tile(x,y) and Other Assorted Updates.


Drakan

2010-05-30 21:07:42

Due to popular demand, good coding practice, and other various reasons, I went through the trouble of change PointToTile back to just Tile(x, y: integer). PointToTile now does what it says it does (converting a TPoint to a TTile) and if you have ANY var names named Tile, they will need to be changed. Suggested name: T, TheTile, etc…

In other news, I have really went through and stabilized the reflection include. I looked over virtually every function, found memory leaks, and upped my standards a bit. There are more useful functions in many of the files now, there is now a Constants.simba, and more documentation was added. I feel very confident about the include at this point.

Thanks for everyone's help and support! Please post if you have comments or concerns. Thanks for nava2 for beating standards into my head.

Gu3st...

2010-05-31 05:37:15

Why is Tile() better than PointToTile() ? :confused:

Naike

2010-05-31 05:42:22

From: Zyt3x
Why is Tile() better than PointToTile() ? :confused:


Ask Narcle :p

masterBB

2010-05-31 07:33:01

PointToTile(arg:TPoint)
Tile(x,y:Integer)

Much better standards!

Drakan

2010-05-31 08:03:24

From: Zyt3x
Why is Tile() better than PointToTile() ? :confused:


Standards i guess. Just like its Point(x, y). PointToTile should do what it says, and that is convert a TPoint to a TTIle. But also, Tile is shorter, and over the last night, I came to really like Tile(x, y).

3Garrett3

2010-05-31 11:23:27

From: drags111
Standards i guess. Just like its Point(x, y). PointToTile should do what it says, and that is convert a TPoint to a TTIle. But also, Tile is shorter, and over the last night, I came to really like Tile(x, y).


Isn't it because usually the argument for PointToTile was (Point(x,y)) anyway?

I thought that it was the reasoning. Now you can just say Tile(x,y) and it makes a tile, instead of the whole Point() thing.

Drakan

2010-05-31 13:32:56

From: 3Garrett3
Isn't it because usually the argument for PointToTile was (Point(x,y)) anyway?

I thought that it was the reasoning. Now you can just say Tile(x,y) and it makes a tile, instead of the whole Point() thing.


Eh, whatever the reason, it's done now. :P

Narcle

2010-05-31 15:45:13

What does PointToTile imply to you? TPoint to TTile yes or no? This concept is largely based on the TPoint system that has always been in SRL. The easy conversion for TPoint in SRL is Point(x, y), so why not have Tile(x, y) for TTiles. The Tile(x, y) was also the original setup in the old reflection, why change it now?

I'd like the conversions to make sense. PointToTile does NOT imply integers to TTile to me, it implies TPoint to TTile.

We've been pushing for standards to make things easier to read. I'm trying to continue that for Reflection include.


Message I sent someone in reply to the question. Think about it, makes way more sense with this setup.

Gu3st...

2010-05-31 15:51:51

I though PointToTile was like this:
PointToTile(P : TPoint): TTile;

Narcle

2010-05-31 15:52:46

From: Zyt3x
I though PointToTile was like this:
PointToTile(P : TPoint): TTile;


It is now, but wasn't before.