hedgewars/hwLibrary.pas
author unc0rr
Fri, 05 Jan 2018 22:32:11 +0100
branchqmlfrontend
changeset 12885 590c7f324292
parent 12881 b544bbbd0696
child 12888 adb1fccc706a
permissions -rw-r--r--
Fix missing default values
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4930
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     1
(*
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     2
 * Hedgewars, a free turn based strategy game
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10175
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
4930
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     4
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     8
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    12
 * GNU General Public License for more details.
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    13
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    14
 * You should have received a copy of the GNU General Public License
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    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
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    17
 *)
2698
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    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
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    32
uses hwengine
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    33
    , uTypes
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    34
    , uConsts
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    35
    , uVariables
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    36
    , uSound
50bcefec5bf6 Strip some HWLIBRARY ifdefs
unc0rr
parents: 10406
diff changeset
    37
    , uCommands
10406
b5fd52ac760f Basic layout of frontlib, some more sdl bindings
unc0rr
parents: 10175
diff changeset
    38
    , uFLTypes
10416
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    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
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    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
899a30018ede Getter and setter for seed
unc0rr
parents: 10428
diff changeset
    46
procedure flibInit(localPrefix, userPrefix: PChar); cdecl;
10416
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    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
899a30018ede Getter and setter for seed
unc0rr
parents: 10428
diff changeset
    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
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    56
end;
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    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
1c301054694d - Remove --port command
unc0rr
parents: 10414
diff changeset
    60
    flibInit,
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12862
diff changeset
    61
    flibFree,
12864
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    62
    ipcToEngineRaw,
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    63
    ipcSetEngineBarrier,
a03f245243b0 And more refactoring...
unc0rr
parents: 12863
diff changeset
    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,
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12866
diff changeset
    66
    GameTick
12861
95d903b976d0 Start removing flib functionality
unc0rr
parents: 11848
diff changeset
    67
    ;
5452
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    68
4187
adb144a907aa remove last warnings from xcodeproj
koda
parents: 3464
diff changeset
    69
begin
2698
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    70
end.