hedgewars/uFLTeams.pas
author unc0rr
Sat, 01 Nov 2014 00:23:22 +0300
branchqmlfrontend
changeset 10448 4cb727e029fa
parent 10446 7ae44f42a689
child 10450 bf9e30b4ef9b
permissions -rw-r--r--
- Allow to delete teams from config - Manage team colors (internally, no gui so far) - 'Play' button on local game page (works!)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     1
unit uFLTeams;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     2
interface
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     3
uses uFLTypes;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     4
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     5
function createRandomTeam: TTeam;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     6
procedure sendTeamConfig(var team: TTeam);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
     7
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
     8
function getTeamsList: PPChar; cdecl;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
     9
procedure freeTeamsList;
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    10
10446
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
    11
function teamByName(s: shortstring): PTeam;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
    12
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    13
implementation
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    14
uses uFLUtils, uFLIPC, uPhysFSLayer;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    15
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    16
const MAX_TEAM_NAMES = 128;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    17
var
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    18
    teamsList: PTeam;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    19
    teamsNumber: Longword;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    20
    listOfTeamNames: array[0..MAX_TEAM_NAMES] of PChar;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    21
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    22
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    23
function createRandomTeam: TTeam;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    24
var t: TTeam;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    25
    i: Longword;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    26
begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    27
    with t do
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    28
    begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    29
        teamName:= 'team' + inttostr(random(100));
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    30
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    31
        for i:= 0 to 7 do
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    32
            with hedgehogs[i] do
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    33
            begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    34
                name:= 'hedgehog ' + inttostr(i);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    35
                hat:= 'NoHat'
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    36
            end;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    37
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    38
        botLevel:= 0;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    39
        hogsNumber:= 4
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    40
    end;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    41
    createRandomTeam:= t
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    42
end;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    43
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    44
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    45
procedure sendTeamConfig(var team: TTeam);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    46
var i: Longword;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    47
begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    48
    with team do
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    49
    begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    50
        ipcToEngine('eaddteam <hash> ' + color + ' ' + teamName);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    51
        for i:= 0 to Pred(hogsNumber) do
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    52
        begin
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    53
            ipcToEngine('eaddhh ' + inttostr(botLevel) + ' 100 ' + hedgehogs[i].name);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    54
            ipcToEngine('ehat ' + hedgehogs[i].hat);
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    55
        end;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    56
    end
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    57
end;
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
    58
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    59
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    60
procedure loadTeam(var team: TTeam; fileName: shortstring);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    61
var f: PFSFile;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    62
    section: LongInt;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    63
    l: shortstring;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    64
begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    65
    section:= -1;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    66
    f:= pfsOpenRead(fileName);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    67
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    68
    while (not pfsEOF(f)) do
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    69
    begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    70
        pfsReadLn(f, l);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    71
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    72
        if l = '' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    73
        else if l = '[Team]' then 
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    74
            section:= 0
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    75
        else if l[1] = '[' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    76
            section:= -1
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    77
        else if section = 0 then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    78
        begin // [Team]
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    79
            if copy(l, 1, 5) = 'Name=' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    80
                team.teamName:= midStr(l, 6)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    81
            else if copy(l, 1, 6) = 'Grave=' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    82
                team.graveName:= midStr(l, 7)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    83
            else if copy(l, 1, 5) = 'Fort=' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    84
                team.fortName:= midStr(l, 6)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    85
            else if copy(l, 1, 5) = 'Flag=' then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    86
                team.flag:= midStr(l, 6)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    87
        end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    88
        // TODO: load hedgehogs and other stuff
10448
4cb727e029fa - Allow to delete teams from config
unc0rr
parents: 10446
diff changeset
    89
        team.botLevel:= 1
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    90
    end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    91
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    92
    pfsClose(f)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    93
end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    94
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    95
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    96
procedure loadTeams;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    97
var filesList, tmp: PPChar;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    98
    team: PTeam;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
    99
    s: shortstring;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   100
    l: Longword;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   101
begin
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   102
    filesList:= pfsEnumerateFiles('/Config/Teams');
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   103
    teamsNumber:= 0;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   104
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   105
    tmp:= filesList;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   106
    while tmp^ <> nil do
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   107
    begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   108
        s:= shortstring(tmp^);
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   109
        writeln(stderr, '> ', s);
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   110
        l:= length(s);
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   111
        if (l > 4) and (copy(s, l - 3, 4) = '.hwt') then inc(teamsNumber);
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   112
        inc(tmp)
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   113
    end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   114
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   115
    // TODO: no teams at all?
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   116
    teamsList:= GetMem(sizeof(teamsList^) * teamsNumber);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   117
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   118
    team:= teamsList;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   119
    tmp:= filesList;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   120
    while tmp^ <> nil do
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   121
    begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   122
        s:= shortstring(tmp^);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   123
        l:= length(s);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   124
        if (l > 4) and (copy(s, l - 3, 4) = '.hwt') then 
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   125
            begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   126
                loadTeam(team^, '/Config/Teams/' + s);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   127
                inc(team)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   128
            end;
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   129
        inc(tmp)
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   130
    end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   131
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   132
    pfsFreeList(filesList)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   133
end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   134
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   135
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   136
function getTeamsList: PPChar; cdecl;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   137
var i, t, l: Longword;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   138
    team: PTeam;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   139
begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   140
    if teamsList = nil then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   141
        loadTeams;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   142
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   143
    t:= teamsNumber;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   144
    if t >= MAX_TEAM_NAMES then 
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   145
        t:= MAX_TEAM_NAMES;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   146
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   147
    team:= teamsList;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   148
    for i:= 0 to Pred(t) do
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   149
    begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   150
        l:= length(team^.teamName);
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   151
        if l >= 255 then l:= 254;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   152
        team^.teamName[l + 1]:= #0;
10442
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   153
        listOfTeamNames[i]:= @team^.teamName[1];
c58db813240b Load and show local teams list
unc0rr
parents: 10440
diff changeset
   154
        inc(team)
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   155
    end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   156
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   157
    listOfTeamNames[t]:= nil;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   158
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   159
    getTeamsList:= listOfTeamNames
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   160
end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   161
10446
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   162
function teamByName(s: shortstring): PTeam;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   163
var i: Longword;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   164
    team: PTeam;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   165
begin
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   166
    team:= teamsList;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   167
    i:= 0;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   168
    while (i < teamsNumber) and (team^.teamName <> s) do
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   169
    begin
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   170
        inc(team);
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   171
        inc(i)
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   172
    end;
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   173
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   174
    if i < teamsNumber then teamByName:= team else teamByName:= nil
7ae44f42a689 Perform some checks on team add
unc0rr
parents: 10442
diff changeset
   175
end;
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   176
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   177
procedure freeTeamsList;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   178
begin
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   179
    if teamsList <> nil then
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   180
        FreeMem(teamsList, sizeof(teamsList^) * teamsNumber)
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   181
end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10434
diff changeset
   182
10434
1614b13ad35e Themes model, also add some files I forgot to add previously
unc0rr
parents:
diff changeset
   183
end.