hedgewars/uFLTypes.pas
author unc0rr
Sat, 21 Nov 2015 23:56:41 +0300
branchqmlfrontend
changeset 11429 86c13e5662f1
parent 11428 e045dc60c37e
child 11435 f88b3948adf3
permissions -rw-r--r--
- Some refactoring - Room page, handle room join/part, room chat
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
86c13e5662f1 - Some refactoring
unc0rr
parents: 11428
diff changeset
     9
                    , mtRemoveRoom, mtError, mtWarning, mtMoveToLobby, mtMoveToRoom);
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
    10
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10420
diff changeset
    11
    TIPCMessage = record
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    12
                   str: shortstring;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    13
                   len: Longword;
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    14
                   buf: Pointer
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10406
diff changeset
    15
               end;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    16
10420
unc0rr
parents: 10418
diff changeset
    17
    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
    18
    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
    19
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    20
    TGameType = (gtPreview, gtLocal);
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    21
    THedgehog = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    22
            name: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    23
            hat: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    24
            end;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    25
    TTeam = record
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    26
            teamName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    27
            flag: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    28
            graveName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    29
            fortName: shortstring;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    30
            owner: shortstring;
10450
bf9e30b4ef9b - Store index of color instead of its value
unc0rr
parents: 10444
diff changeset
    31
            color: Longword;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    32
            extDriven: boolean;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    33
            botLevel: Longword;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    34
            hedgehogs: array[0..7] of THedgehog;
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    35
            hogsNumber: Longword;
10440
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    36
        end;
b74a7bbe224e - Implement getTeamsList (not tested)
unc0rr
parents: 10432
diff changeset
    37
    PTeam = ^TTeam;
10432
b0abef0ee78c Quick Game PoC
unc0rr
parents: 10430
diff changeset
    38
10819
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    39
    TScheme = record
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    40
            schemeName
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    41
            , scriptparam : shortstring;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    42
            fortsmode
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    43
            , divteams
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    44
            , solidland
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    45
            , border
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    46
            , lowgrav
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    47
            , laser
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    48
            , invulnerability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    49
            , mines
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    50
            , vampiric
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    51
            , karma
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    52
            , artillery
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    53
            , randomorder
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    54
            , king
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    55
            , placehog
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    56
            , sharedammo
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    57
            , disablegirders
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    58
            , disablewind
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    59
            , morewind
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    60
            , tagteam
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    61
            , bottomborder: boolean;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    62
            damagefactor
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    63
            , turntime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    64
            , health
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    65
            , suddendeath
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    66
            , caseprobability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    67
            , minestime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    68
            , landadds
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    69
            , minedudpct
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    70
            , explosives
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    71
            , minesnum
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    72
            , healthprobability
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    73
            , healthcaseamount
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    74
            , waterrise
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    75
            , healthdecrease
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    76
            , ropepct
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    77
            , getawaytime
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    78
            , worldedge: LongInt
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    79
        end;
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    80
    PScheme = ^TScheme;
10888
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    81
    TAmmo = record
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    82
            ammoName: shortstring;
10892
83a99e2f8b00 Make ammo scheme work
unc0rr
parents: 10888
diff changeset
    83
            a, b, c, d: shortstring;
10888
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    84
        end;
a04e04aaf599 Ammo schemes list, almost works
unc0rr
parents: 10819
diff changeset
    85
    PAmmo = ^TAmmo;
10819
57e21f7621b0 Send selected scheme config on engine initialization (WIP)
unc0rr
parents: 10452
diff changeset
    86
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    87
implementation
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    88
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents:
diff changeset
    89
end.