SAIL - HexInArea

Gotowe kody SAIL'a, informacje na temat moddingu, itd.

Moderator: zoNE

Post Reply
User avatar
zoNE
The Great Uniter & Site Administrator
The Great Uniter & Site Administrator
Posts: 2059
Joined: Fri Feb 17, 2006 3:44 pm
Location: Poland
Contact:

SAIL - HexInArea

Post by zoNE »

Serpent wrote:Funkcja zwraca prawdę jeśli dane koordynaty x,y należą do danej arei.

Code: Select all

Export Function HexInArea(x, y, area);
var i, tmp, list;
begin
tmp := false;
list := AreaToList(area, 0);

for i = 1 to list[1] do
    begin
    if list[1][i] = x and list[2][i] = y then
       begin
       tmp := true;
        break;
       end;
    end;

result := tmp;
End;

Notka:
Funkcja InArea(x, y, area) ma takie samo zastosowanie :)
Author: Serpent
Topic: https://forum.original-war.net/viewtopi ... =42&t=4544
Post Reply