Polski Česky English Français Русский Español
Home Site Original War Support Community Forums Facebook YouTube Discord
Jste tu poprvé? Tohle musíte vidět!
» Obsah > Modding Archive > SAIL - HexInArea

SAIL - HexInArea

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

Kod:

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/viewtopic.php?f=42&t=4544

» Obsah > Modding Archive > SAIL - HexInArea