hedgewars/uFLTypes.pas
author unc0rr
Wed, 25 Nov 2015 21:31:30 +0300
branchqmlfrontend
changeset 11435 f88b3948adf3
parent 11429 86c13e5662f1
child 11436 80a9b14bb8d3
permissions -rw-r--r--
UI knowns local player nickname
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
10452
03519fd9f98d Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents: 10450
diff changeset
     5
    TMessageType = (mtPreview, mtAddPlayingTeam, mtRemovePlayingTeam, mtAddTeam, mtRemoveTeam
11420
05cf35103206 Lobby page with chat widget(readonly)
unc0rr
parents: 10951
diff changeset
     6
                    , mtTeamColor, mtNetData, mtConnected, mtDisconnected, mtAddLobbyClient
11429
86c13e5662f1 - Some refactoring
unc0rr
parents: 11428
diff changeset
     7
                    , mtRemoveLobbyClient, mtLobbyChatLine, mtAddRoomClient
86c13e5662f1 - Some refactoring
unc0rr
parents: 11428
diff changeset
     8
                    , mtRemoveRoomClient, mtRoomChatLine, mtAddRoom, mtUpdateRoom
11435
f88b3948adf3 UI knowns local player nickname
unc0rr
parents: 11429
diff changeset
     9
                    , mtRemoveRoom, mtError, mtWarning, mtMoveToLobby, mtMoveToRoom
f88b3948adf3 UI knowns local player nickname
unc0rr
parents: 11429
diff changeset
    10
                    , mtNickname);
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
    11
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
    12
    TIPCMessage = record
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    13
                   str: shortstring;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    14
                   len: Longword;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    15
                   buf: Pointer
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    16
               end;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    17
10420
unc0rr
parents: 10418
diff changeset
    18
    TIPCCallback = procedure (p: pointer; msg: PChar; len: Longword);
10951
89a7f617e091 - Move protocol handling events to main thread through qt's main loop
unc0rr
parents: 10892
diff changeset
    19
    TUICallback = procedure (p: pointer; msgType: TMessageType; msg: PChar; len: Longword); cdecl;
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    20
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    21
    TGameType = (gtPreview, gtLocal);
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    22
    THedgehog = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    23
            name: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    24
            hat: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    25
            end;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    26
    TTeam = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    27
            teamName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    28
            flag: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    29
            graveName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    30
            fortName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    31
            owner: shortstring;
10450
bf9e30b4ef9b - Store index of color instead of its value
unc0rr
parents: 10444
diff changeset
    32
            color: Longword;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    33
            extDriven: boolean;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    34
            botLevel: Longword;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    35
            hedgehogs: array[0..7] of THedgehog;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    36
            hogsNumber: Longword;
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    37
        end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    38
    PTeam = ^TTeam;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    39
10819
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    40
    TScheme = record
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    41
            schemeName
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    42
            , scriptparam : shortstring;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    43
            fortsmode
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    44
            , divteams
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    45
            , solidland
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    46
            , border
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    47
            , lowgrav
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    48
            , laser
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    49
            , invulnerability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    50
            , mines
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    51
            , vampiric
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    52
            , karma
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    53
            , artillery
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    54
            , randomorder
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    55
            , king
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    56
            , placehog
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    57
            , sharedammo
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    58
            , disablegirders
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    59
            , disablewind
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    60
            , morewind
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    61
            , tagteam
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    62
            , bottomborder: boolean;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    63
            damagefactor
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    64
            , turntime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    65
            , health
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    66
            , suddendeath
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    67
            , caseprobability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    68
            , minestime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    69
            , landadds
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    70
            , minedudpct
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    71
            , explosives
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    72
            , minesnum
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    73
            , healthprobability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    74
            , healthcaseamount
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    75
            , waterrise
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    76
            , healthdecrease
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    77
            , ropepct
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    78
            , getawaytime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    79
            , worldedge: LongInt
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    80
        end;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    81
    PScheme = ^TScheme;
10888
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    82
    TAmmo = record
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    83
            ammoName: shortstring;
10892
83a99e2f8b00 Make ammo scheme work
unc0rr
parents: 10888
diff changeset
    84
            a, b, c, d: shortstring;
10888
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    85
        end;
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    86
    PAmmo = ^TAmmo;
10819
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    87
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    88
implementation
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    89
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    90
end.