author | unc0rr |
Sun, 06 Dec 2015 20:20:09 +0300 | |
branch | qmlfrontend |
changeset 11451 | 321d0ce43568 |
parent 11448 | 5182d44fb733 |
child 11454 | 2bf0491d5e88 |
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 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10420
diff
changeset
|
19 |
TIPCMessage = record |
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
20 |
str: shortstring; |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
21 |
len: Longword; |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
22 |
buf: Pointer |
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10406
diff
changeset
|
23 |
end; |
10432 | 24 |
|
10420 | 25 |
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
|
26 |
TUICallback = procedure (p: pointer; msgType: TMessageType; msg: PChar; len: Longword); cdecl; |
10406 | 27 |
|
10432 | 28 |
TGameType = (gtPreview, gtLocal); |
29 |
THedgehog = record |
|
30 |
name: shortstring; |
|
31 |
hat: shortstring; |
|
32 |
end; |
|
33 |
TTeam = record |
|
11447 | 34 |
teamName |
35 |
, flag |
|
36 |
, grave |
|
37 |
, fort |
|
38 |
, voice |
|
39 |
, owner: shortstring; |
|
10450 | 40 |
color: Longword; |
10432 | 41 |
extDriven: boolean; |
42 |
botLevel: Longword; |
|
43 |
hedgehogs: array[0..7] of THedgehog; |
|
44 |
hogsNumber: Longword; |
|
10440 | 45 |
end; |
46 |
PTeam = ^TTeam; |
|
10432 | 47 |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
48 |
TScheme = record |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
49 |
schemeName |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
50 |
, scriptparam : shortstring; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
51 |
fortsmode |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
52 |
, divteams |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
53 |
, solidland |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
54 |
, border |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
55 |
, lowgrav |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
56 |
, laser |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
57 |
, invulnerability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
58 |
, mines |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
59 |
, vampiric |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
60 |
, karma |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
61 |
, artillery |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
62 |
, randomorder |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
63 |
, king |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
64 |
, placehog |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
65 |
, sharedammo |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
66 |
, disablegirders |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
67 |
, disablewind |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
68 |
, morewind |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
69 |
, tagteam |
11445 | 70 |
, resethealth |
71 |
, disablelandobjects |
|
72 |
, aisurvival |
|
73 |
, infattack |
|
74 |
, resetweps |
|
75 |
, perhogammo |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
76 |
, bottomborder: boolean; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
77 |
damagefactor |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
78 |
, turntime |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
79 |
, health |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
80 |
, suddendeath |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
81 |
, caseprobability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
82 |
, minestime |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
83 |
, landadds |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
84 |
, minedudpct |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
85 |
, explosives |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
86 |
, minesnum |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
87 |
, healthprobability |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
88 |
, healthcaseamount |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
89 |
, waterrise |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
90 |
, healthdecrease |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
91 |
, ropepct |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
92 |
, getawaytime |
11445 | 93 |
, airmines |
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
94 |
, worldedge: LongInt |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
95 |
end; |
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
96 |
PScheme = ^TScheme; |
10888 | 97 |
TAmmo = record |
98 |
ammoName: shortstring; |
|
10892 | 99 |
a, b, c, d: shortstring; |
10888 | 100 |
end; |
101 |
PAmmo = ^TAmmo; |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10452
diff
changeset
|
102 |
|
11439 | 103 |
PGameConfig = ^TGameConfig; |
104 |
TGameConfig = record |
|
105 |
seed: shortstring; |
|
106 |
theme: shortstring; |
|
107 |
script: shortstring; |
|
108 |
map: shortstring; |
|
109 |
scheme: TScheme; |
|
110 |
ammo: TAmmo; |
|
111 |
mapgen: LongInt; |
|
112 |
featureSize: LongInt; |
|
113 |
mazesize: LongInt; |
|
114 |
template: LongInt; |
|
115 |
gameType: TGameType; |
|
116 |
teams: array[0..7] of TTeam; |
|
117 |
arguments: array[0..Pred(MAXARGS)] of shortstring; |
|
118 |
argv: array[0..Pred(MAXARGS)] of PChar; |
|
119 |
argumentsNumber: Longword; |
|
120 |
nextConfig: PGameConfig; |
|
121 |
end; |
|
122 |
||
10406 | 123 |
implementation |
124 |
||
125 |
end. |