author | unc0rr |
Mon, 07 Dec 2015 00:05:41 +0300 | |
branch | qmlfrontend |
changeset 11454 | 2bf0491d5e88 |
parent 11448 | 5182d44fb733 |
child 11455 | 0c75fa9ce340 |
permissions | -rw-r--r-- |
10406 | 1 |
unit uFLTypes; |
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
2 |
interface |
10406 | 3 |
|
11439 | 4 |
const |
5 |
MAXARGS = 32; |
|
6 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10420
diff
changeset
|
7 |
type |
11448 | 8 |
TMessageType = (mtRenderingPreview, mtPreview, mtAddPlayingTeam, mtRemovePlayingTeam |
9 |
, mtAddTeam, mtRemoveTeam, mtTeamColor, mtHedgehogsNumber, mtNetData |
|
10 |
, mtFlibEvent, mtConnected, mtDisconnected, mtAddLobbyClient |
|
11429 | 11 |
, mtRemoveLobbyClient, mtLobbyChatLine, mtAddRoomClient |
12 |
, mtRemoveRoomClient, mtRoomChatLine, mtAddRoom, mtUpdateRoom |
|
11435 | 13 |
, mtRemoveRoom, mtError, mtWarning, mtMoveToLobby, mtMoveToRoom |
11438 | 14 |
, mtNickname, mtSeed, mtTheme, mtScript, mtFeatureSize, mtMapGen |
11445 | 15 |
, mtMap, mtMazeSize, mtTemplate, mtAmmo, mtScheme); |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10420
diff
changeset
|
16 |
|
11439 | 17 |
TFLIBEvent = (flibGameFinished); |
18 |
||
11454 | 19 |
TClientFlag = (cfReady, cfRegistered, cfInRoom, cfContributor, cfInGame, cfRoomAdmin, cfServerAdmin); |
20 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10420
diff
changeset
|
21 |
TIPCMessage = record |
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
22 |
str: shortstring; |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
23 |
len: Longword; |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
24 |
buf: Pointer |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
25 |
end; |
10432 | 26 |
|
10420 | 27 |
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
|
28 |
TUICallback = procedure (p: pointer; msgType: TMessageType; msg: PChar; len: Longword); cdecl; |
10406 | 29 |
|
10432 | 30 |
TGameType = (gtPreview, gtLocal); |
31 |
THedgehog = record |
|
32 |
name: shortstring; |
|
33 |
hat: shortstring; |
|
34 |
end; |
|
35 |
TTeam = record |
|
11447 | 36 |
teamName |
37 |
, flag |
|
38 |
, grave |
|
39 |
, fort |
|
40 |
, voice |
|
41 |
, owner: shortstring; |
|
10450 | 42 |
color: Longword; |
10432 | 43 |
extDriven: boolean; |
44 |
botLevel: Longword; |
|
45 |
hedgehogs: array[0..7] of THedgehog; |
|
46 |
hogsNumber: Longword; |
|
10440 | 47 |
end; |
48 |
PTeam = ^TTeam; |
|
10432 | 49 |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
50 |
TScheme = record |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
51 |
schemeName |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
52 |
, scriptparam : shortstring; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
53 |
fortsmode |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
54 |
, divteams |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
55 |
, solidland |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
56 |
, border |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
57 |
, lowgrav |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
58 |
, laser |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
59 |
, invulnerability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
60 |
, mines |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
61 |
, vampiric |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
62 |
, karma |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
63 |
, artillery |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
64 |
, randomorder |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
65 |
, king |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
66 |
, placehog |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
67 |
, sharedammo |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
68 |
, disablegirders |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
69 |
, disablewind |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
70 |
, morewind |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
71 |
, tagteam |
11445 | 72 |
, resethealth |
73 |
, disablelandobjects |
|
74 |
, aisurvival |
|
75 |
, infattack |
|
76 |
, resetweps |
|
77 |
, perhogammo |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
78 |
, bottomborder: boolean; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
79 |
damagefactor |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
80 |
, turntime |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
81 |
, health |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
82 |
, suddendeath |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
83 |
, caseprobability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
84 |
, minestime |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
85 |
, landadds |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
86 |
, minedudpct |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
87 |
, explosives |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
88 |
, minesnum |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
89 |
, healthprobability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
90 |
, healthcaseamount |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
91 |
, waterrise |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
92 |
, healthdecrease |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
93 |
, ropepct |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
94 |
, getawaytime |
11445 | 95 |
, airmines |
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
96 |
, worldedge: LongInt |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
97 |
end; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
98 |
PScheme = ^TScheme; |
10888 | 99 |
TAmmo = record |
100 |
ammoName: shortstring; |
|
10892 | 101 |
a, b, c, d: shortstring; |
10888 | 102 |
end; |
103 |
PAmmo = ^TAmmo; |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
104 |
|
11439 | 105 |
PGameConfig = ^TGameConfig; |
106 |
TGameConfig = record |
|
107 |
seed: shortstring; |
|
108 |
theme: shortstring; |
|
109 |
script: shortstring; |
|
110 |
map: shortstring; |
|
111 |
scheme: TScheme; |
|
112 |
ammo: TAmmo; |
|
113 |
mapgen: LongInt; |
|
114 |
featureSize: LongInt; |
|
115 |
mazesize: LongInt; |
|
116 |
template: LongInt; |
|
117 |
gameType: TGameType; |
|
118 |
teams: array[0..7] of TTeam; |
|
119 |
arguments: array[0..Pred(MAXARGS)] of shortstring; |
|
120 |
argv: array[0..Pred(MAXARGS)] of PChar; |
|
121 |
argumentsNumber: Longword; |
|
122 |
nextConfig: PGameConfig; |
|
123 |
end; |
|
124 |
||
10406 | 125 |
implementation |
126 |
||
127 |
end. |