hedgewars/uFLTypes.pas
author unc0rr
Sat, 25 Oct 2014 00:31:10 +0400
branchqmlfrontend
changeset 10444 47a6231f1fc1
parent 10440 b74a7bbe224e
child 10450 bf9e30b4ef9b
permissions -rw-r--r--
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
     1
unit uFLTypes;
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
     2
interface
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
     3
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
     4
type
10444
47a6231f1fc1 Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents: 10440
diff changeset
     5
    TMessageType = (mtPreview, mtAddPlayingTeam, mtRemovePlayingTeam, mtAddTeam, mtRemoveTeam);
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
     6
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
     7
    TIPCMessage = record
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
     8
                   str: shortstring;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
     9
                   len: Longword;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    10
                   buf: Pointer
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    11
               end;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    12
10420
unc0rr
parents: 10418
diff changeset
    13
    TIPCCallback = procedure (p: pointer; msg: PChar; len: Longword);
10430
899a30018ede Getter and setter for seed
unc0rr
parents: 10428
diff changeset
    14
    TGUICallback = procedure (p: pointer; msgType: TMessageType; msg: PChar; len: Longword); cdecl;
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    15
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    16
    TGameType = (gtPreview, gtLocal);
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    17
    THedgehog = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    18
            name: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    19
            hat: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    20
            end;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    21
    TTeam = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    22
            teamName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    23
            flag: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    24
            graveName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    25
            fortName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    26
            owner: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    27
            color: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    28
            extDriven: boolean;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    29
            botLevel: Longword;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    30
            hedgehogs: array[0..7] of THedgehog;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    31
            hogsNumber: Longword;
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    32
        end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    33
    PTeam = ^TTeam;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    34
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    35
implementation
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    36
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    37
end.