author | unc0rr |
Sun, 07 Jan 2018 01:21:42 +0100 | |
branch | qmlfrontend |
changeset 12888 | adb1fccc706a |
parent 12881 | b544bbbd0696 |
child 12895 | 9c259fb4d405 |
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 |
10416 | 42 |
; |
7048
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
43 |
|
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
44 |
{$INCLUDE "config.inc"} |
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
45 |
|
10430 | 46 |
procedure flibInit(localPrefix, userPrefix: PChar); cdecl; |
10416 | 47 |
begin |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
48 |
initIPC; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
49 |
uPhysFSLayer.initModule(localPrefix, userPrefix); |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
50 |
end; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
51 |
|
10430 | 52 |
procedure flibFree; cdecl; |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
53 |
begin |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
54 |
uPhysFSLayer.freemodule; |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10416
diff
changeset
|
55 |
freeIPC; |
10416 | 56 |
end; |
57 |
||
7048
0a4c88935902
the ios port runs again, although with a few things to sort out
koda
parents:
6700
diff
changeset
|
58 |
exports |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
59 |
registerUIMessagesCallback, |
10416 | 60 |
flibInit, |
12863
0c6fb706f747
More refactoring in attempt to move away from frontlib
unc0rr
parents:
12862
diff
changeset
|
61 |
flibFree, |
12864 | 62 |
ipcToEngineRaw, |
63 |
ipcSetEngineBarrier, |
|
64 |
ipcRemoveBarrierFromEngineQueue, |
|
12881
b544bbbd0696
Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents:
12866
diff
changeset
|
65 |
RunEngine, |
12888
adb1fccc706a
- ResizeWindow function to pass engine new window size
unc0rr
parents:
12881
diff
changeset
|
66 |
GameTick, |
adb1fccc706a
- ResizeWindow function to pass engine new window size
unc0rr
parents:
12881
diff
changeset
|
67 |
ResizeWindow |
12861 | 68 |
; |
5452
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
69 |
|
4187 | 70 |
begin |
2698 | 71 |
end. |