hedgewars/uFLNetTypes.pas
author unc0rr
Tue, 09 Feb 2016 21:11:16 +0300
branchqmlfrontend
changeset 11544 b69f5f22a3ba
parent 11462 33a0e3a14ddc
permissions -rw-r--r--
Merge default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10953
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
     1
unit uFLNetTypes;
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
     2
interface
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
     3
11429
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     4
type TCmdType = (cmd_ADD_TEAM, cmd_ADD_TEAM_s, cmd_ASKPASSWORD, cmd_BANLIST,
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     5
    cmd_BANLIST_s, cmd_BYE, cmd_CFG_AMMO, cmd_CFG_DRAWNMAP, cmd_CFG_FEATURE_SIZE,
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     6
    cmd_CFG_FULLMAPCONFIG, cmd_CFG_FULLMAPCONFIG_s, cmd_CFG_MAP, cmd_CFG_MAPGEN,
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     7
    cmd_CFG_MAZE_SIZE, cmd_CFG_SCHEME, cmd_CFG_SCHEME_s, cmd_CFG_SCRIPT,
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     8
    cmd_CFG_SEED, cmd_CFG_TEMPLATE, cmd_CFG_THEME, cmd_CHAT, cmd_CLIENT_FLAGS,
d96a37de1076 Apply generated code to .pas files, fix FULLMAPCONFIG handling
unc0rr
parents: 11425
diff changeset
     9
    cmd_CLIENT_FLAGS_s, cmd_CONNECTED, cmd_EM, cmd_EM_s, cmd_ERROR, cmd_HH_NUM,
11442
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    10
    cmd_INFO, cmd_INFO_s, cmd_JOINED, cmd_JOINED_s, cmd_JOINING, cmd_KICKED,
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    11
    cmd_LEFT, cmd_LOBBY_JOINED, cmd_LOBBY_JOINED_s, cmd_LOBBY_LEFT, cmd_NICK,
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    12
    cmd_NOTICE, cmd_PING, cmd_PING_s, cmd_PROTO, cmd_REMOVE_TEAM, cmd_ROOMS,
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    13
    cmd_ROOMS_s, cmd_ROOM_ADD, cmd_ROOM_ADD_s, cmd_ROOM_DEL, cmd_ROOM_UPD,
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    14
    cmd_ROOM_UPD_s, cmd_ROUND_FINISHED, cmd_RUN_GAME, cmd_SERVER_AUTH,
11441
908aed8525f9 Fix LEFT command handling
unc0rr
parents: 11429
diff changeset
    15
    cmd_SERVER_MESSAGE, cmd_SERVER_VARS, cmd_TEAM_ACCEPTED, cmd_TEAM_COLOR,
11442
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    16
    cmd_WARNING);
11413
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    17
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    18
    type TCmdParam = packed record
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    19
        cmd: TCmdType;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    20
        end;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    21
    type TCmdParamL = packed record
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    22
        cmd: TCmdType;
11462
33a0e3a14ddc - Fix passing of ansistrings via ipc
unc0rr
parents: 11442
diff changeset
    23
        str1len: Longword;
33a0e3a14ddc - Fix passing of ansistrings via ipc
unc0rr
parents: 11442
diff changeset
    24
        str1: array[word] of char;
11413
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    25
        end;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    26
    type TCmdParamS = packed record
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    27
        cmd: TCmdType;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    28
        str1: shortstring;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    29
        end;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    30
    type TCmdParamSL = packed record
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    31
        cmd: TCmdType;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    32
        str1: shortstring;
11462
33a0e3a14ddc - Fix passing of ansistrings via ipc
unc0rr
parents: 11442
diff changeset
    33
        str2len: Longword;
33a0e3a14ddc - Fix passing of ansistrings via ipc
unc0rr
parents: 11442
diff changeset
    34
        str2: array[word] of char;
11413
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    35
        end;
11442
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    36
    type TCmdParamSS = packed record
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    37
        cmd: TCmdType;
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    38
        str1: shortstring;
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    39
        str2: shortstring;
6b04a266feee - Accept team and team color from net
unc0rr
parents: 11441
diff changeset
    40
        end;
11413
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    41
    type TCmdParami = packed record
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    42
        cmd: TCmdType;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    43
        param1: LongInt;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    44
        end;
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    45
10953
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    46
    TCmdData = record
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    47
                   case byte of
11413
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    48
                       0: (cmd: TCmdParam);
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    49
                       1: (cpl: TCmdParamL);
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    50
                       2: (cps: TCmdParamS);
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    51
                       3: (cpsl: TCmdParamSL);
ffff8a0d1a76 Implement processing net commands in the main thread
unc0rr
parents: 10953
diff changeset
    52
                       4: (cpi: TCmdParami);
10953
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    53
               end;
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    54
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    55
implementation
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    56
360e57620df3 Put types into a separate file
unc0rr
parents:
diff changeset
    57
end.