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