author | unc0rr |
Wed, 10 Jan 2018 23:49:47 +0100 | |
branch | qmlfrontend |
changeset 12890 | 9c259fb4d405 |
parent 12883 | adb1fccc706a |
permissions | -rw-r--r-- |
4930 | 1 |
(* |
2 |
* Hedgewars, a free turn based strategy game |
|
11046 | 3 |
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
4930 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
10017
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
4930 | 17 |
*) |
2698 | 18 |
|
6033
6bcc36225162
fix compiling for android, strip out all delphi code, objfpc ftw
koda
parents:
6027
diff
changeset
|
19 |
{$INCLUDE "options.inc"} |
5452
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
20 |
|
7048
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
21 |
(* |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
22 |
* When engine is compiled as library this unit will export functions |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
23 |
* as C declarations for convenient library usage in your application |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
24 |
* and language of choice. |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
25 |
* |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
26 |
* See also: C declarations on Wikipedia |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
27 |
* http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
28 |
*) |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
29 |
|
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
30 |
Library hwLibrary; |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
31 |
|
10414 | 32 |
uses hwengine |
33 |
, uTypes |
|
34 |
, uConsts |
|
35 |
, uVariables |
|
36 |
, uSound |
|
37 |
, uCommands |
|
10406 | 38 |
, uFLTypes |
10416 | 39 |
, uFLIPC |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
40 |
, uPhysFSLayer |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
41 |
, uFLUICallback |
12890
9c259fb4d405
Pass mouse movements to engine, warp cursor in frontend
unc0rr
parents:
12883
diff
changeset
|
42 |
, uCursor |
10416 | 43 |
; |
7048
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
44 |
|
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
45 |
{$INCLUDE "config.inc"} |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
46 |
|
10430 | 47 |
procedure flibInit(localPrefix, userPrefix: PChar); cdecl; |
10416 | 48 |
begin |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
49 |
initIPC; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
50 |
uPhysFSLayer.initModule(localPrefix, userPrefix); |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
51 |
end; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
52 |
|
10430 | 53 |
procedure flibFree; cdecl; |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
54 |
begin |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
55 |
uPhysFSLayer.freemodule; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
56 |
freeIPC; |
10416 | 57 |
end; |
58 |
||
7048
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
59 |
exports |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
60 |
registerUIMessagesCallback, |
10416 | 61 |
flibInit, |
12858
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12857
diff
changeset
|
62 |
flibFree, |
12859 | 63 |
ipcToEngineRaw, |
64 |
ipcSetEngineBarrier, |
|
65 |
ipcRemoveBarrierFromEngineQueue, |
|
12876
b544bbbd0696
Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents:
12861
diff
changeset
|
66 |
RunEngine, |
12883
adb1fccc706a
- ResizeWindow function to pass engine new window size
unc0rr
parents:
12876
diff
changeset
|
67 |
GameTick, |
12890
9c259fb4d405
Pass mouse movements to engine, warp cursor in frontend
unc0rr
parents:
12883
diff
changeset
|
68 |
ResizeWindow, |
9c259fb4d405
Pass mouse movements to engine, warp cursor in frontend
unc0rr
parents:
12883
diff
changeset
|
69 |
updateMousePosition |
12856 | 70 |
; |
5452
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
71 |
|
4187 | 72 |
begin |
2698 | 73 |
end. |