author | Medo <smaxein@googlemail.com> |
Sat, 21 Jul 2012 14:56:52 +0200 | |
changeset 7349 | 12fdfd2038d4 |
parent 7342 | 0e29eec2df5c |
child 7358 | 57a508884052 |
permissions | -rw-r--r-- |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
1 |
package org.hedgewars.hedgeroid.netplay; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
2 |
import java.nio.Buffer; |
7332
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
3 |
import java.util.Collections; |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
4 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
5 |
import android.util.Log; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
6 |
|
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
7 |
import com.sun.jna.Callback; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
8 |
import com.sun.jna.Library; |
7332
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
9 |
import com.sun.jna.Native; |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
10 |
import com.sun.jna.NativeLong; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
11 |
import com.sun.jna.Pointer; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
12 |
import com.sun.jna.PointerType; |
7332
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
13 |
import com.sun.jna.Structure; |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
14 |
|
7332
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
15 |
class Flib { |
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
16 |
static { |
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
17 |
System.loadLibrary("SDL_net"); |
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
18 |
} |
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
19 |
public static final JnaFrontlib INSTANCE = (JnaFrontlib)Native.loadLibrary("frontlib", JnaFrontlib.class, Collections.singletonMap(Library.OPTION_TYPE_MAPPER, FrontlibTypeMapper.INSTANCE)); |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
20 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
21 |
// Hook frontlib logging into Android logging |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
22 |
private static final JnaFrontlib.LogCallback logCb = new JnaFrontlib.LogCallback() { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
23 |
public void callback(int level, String message) { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
24 |
if(level >= JnaFrontlib.FLIB_LOGLEVEL_ERROR) { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
25 |
Log.e("Frontlib", message); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
26 |
} else if(level == JnaFrontlib.FLIB_LOGLEVEL_WARNING){ |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
27 |
Log.w("Frontlib", message); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
28 |
} else if(level == JnaFrontlib.FLIB_LOGLEVEL_INFO){ |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
29 |
Log.i("Frontlib", message); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
30 |
} else if(level <= JnaFrontlib.FLIB_LOGLEVEL_DEBUG){ |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
31 |
Log.d("Frontlib", message); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
32 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
33 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
34 |
}; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
35 |
static { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
36 |
INSTANCE.flib_log_setLevel(JnaFrontlib.FLIB_LOGLEVEL_WARNING); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
37 |
INSTANCE.flib_log_setCallback(logCb); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
38 |
} |
7332
3f2e130f9715
Hedgeroid: Chat and player list work now, but everything is very much WIP
Medo <smaxein@googlemail.com>
parents:
7328
diff
changeset
|
39 |
} |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
40 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
41 |
public interface JnaFrontlib extends Library { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
42 |
static final int NETCONN_STATE_CONNECTING = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
43 |
static final int NETCONN_STATE_LOBBY = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
44 |
static final int NETCONN_STATE_ROOM = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
45 |
static final int NETCONN_STATE_INGAME = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
46 |
static final int NETCONN_STATE_DISCONNECTED = 10; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
47 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
48 |
static final int NETCONN_DISCONNECT_NORMAL = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
49 |
static final int NETCONN_DISCONNECT_SERVER_TOO_OLD = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
50 |
static final int NETCONN_DISCONNECT_AUTH_FAILED = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
51 |
static final int NETCONN_DISCONNECT_CONNLOST = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
52 |
static final int NETCONN_DISCONNECT_INTERNAL_ERROR = 100; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
53 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
54 |
static final int NETCONN_ROOMLEAVE_ABANDONED = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
55 |
static final int NETCONN_ROOMLEAVE_KICKED = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
56 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
57 |
static final int NETCONN_MSG_TYPE_PLAYERINFO = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
58 |
static final int NETCONN_MSG_TYPE_SERVERMESSAGE = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
59 |
static final int NETCONN_MSG_TYPE_WARNING = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
60 |
static final int NETCONN_MSG_TYPE_ERROR = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
61 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
62 |
static final int NETCONN_MAPCHANGE_FULL = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
63 |
static final int NETCONN_MAPCHANGE_MAP = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
64 |
static final int NETCONN_MAPCHANGE_MAPGEN = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
65 |
static final int NETCONN_MAPCHANGE_DRAWNMAP = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
66 |
static final int NETCONN_MAPCHANGE_MAZE_SIZE = 4; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
67 |
static final int NETCONN_MAPCHANGE_TEMPLATE = 5; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
68 |
static final int NETCONN_MAPCHANGE_THEME = 6; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
69 |
static final int NETCONN_MAPCHANGE_SEED = 7; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
70 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
71 |
static final int GAME_END_FINISHED = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
72 |
static final int GAME_END_INTERRUPTED = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
73 |
static final int GAME_END_HALTED = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
74 |
static final int GAME_END_ERROR = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
75 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
76 |
static class NetconnPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
77 |
static class MapconnPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
78 |
static class GameconnPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
79 |
static class MetaschemePtr extends PointerType { } |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
80 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
81 |
static class RoomArrayPtr extends PointerType { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
82 |
/** |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
83 |
* Returns the (native-owned) rooms in this list |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
84 |
*/ |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
85 |
public RoomPtr[] getRooms(int count) { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
86 |
Pointer ptr = getPointer(); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
87 |
if(ptr == null) { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
88 |
return new RoomPtr[0]; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
89 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
90 |
Pointer[] untypedPtrs = ptr.getPointerArray(0, count); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
91 |
RoomPtr[] typedPtrs = new RoomPtr[count]; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
92 |
for(int i=0; i<count; i++) { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
93 |
typedPtrs[i] = new RoomPtr(untypedPtrs[i]); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
94 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
95 |
return typedPtrs; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
96 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
97 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
98 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
99 |
static class RoomPtr extends PointerType { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
100 |
public RoomPtr() { super(); } |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
101 |
public RoomPtr(Pointer ptr) { super(ptr); } |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
102 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
103 |
public Room deref() { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
104 |
Room result = new Room(getPointer()); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
105 |
result.read(); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
106 |
return result; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
107 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
108 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
109 |
|
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
110 |
static class TeamPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
111 |
static class WeaponsetPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
112 |
static class MapRecipePtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
113 |
static class SchemePtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
114 |
static class GameSetupPtr extends PointerType { } |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
115 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
116 |
static class Room extends Structure { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
117 |
public static class byVal extends Room implements Structure.ByValue {} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
118 |
public static class byRef extends Room implements Structure.ByReference {} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
119 |
private static String[] FIELD_ORDER = new String[] {"inProgress", "name", "playerCount", "teamCount", "owner", "map", "scheme", "weapons"}; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
120 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
121 |
public Room() { super(); setFieldOrder(FIELD_ORDER); } |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
122 |
public Room(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
123 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
124 |
public boolean inProgress; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
125 |
public String name; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
126 |
public int playerCount; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
127 |
public int teamCount; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
128 |
public String owner; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
129 |
public String map; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
130 |
public String scheme; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
131 |
public String weapons; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
132 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
133 |
|
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
134 |
public static interface VoidCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
135 |
void callback(Pointer context); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
136 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
137 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
138 |
public static interface StrCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
139 |
void callback(Pointer context, String arg1); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
140 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
141 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
142 |
public static interface IntCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
143 |
void callback(Pointer context, int arg1); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
144 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
145 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
146 |
public static interface IntStrCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
147 |
void callback(Pointer context, int arg1, String arg2); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
148 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
149 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
150 |
public static interface StrIntCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
151 |
void callback(Pointer context, String arg1, int arg2); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
152 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
153 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
154 |
public static interface StrStrCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
155 |
void callback(Pointer context, String arg1, String arg2); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
156 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
157 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
158 |
public static interface RoomCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
159 |
void callback(Pointer context, RoomPtr arg1); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
160 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
161 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
162 |
public static interface RoomListCallback extends Callback { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
163 |
void callback(Pointer context, RoomArrayPtr arg1, int count); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
164 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
165 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
166 |
public static interface StrRoomCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
167 |
void callback(Pointer context, String arg1, RoomPtr arg2); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
168 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
169 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
170 |
public static interface BoolCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
171 |
void callback(Pointer context, boolean arg1); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
172 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
173 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
174 |
public static interface StrBoolCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
175 |
void callback(Pointer context, String arg1, boolean arg2); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
176 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
177 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
178 |
public static interface TeamCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
179 |
void callback(Pointer context, TeamPtr arg1); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
180 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
181 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
182 |
public static interface BytesCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
183 |
void callback(Pointer context, Pointer buffer, NativeLong size); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
184 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
185 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
186 |
public static interface BytesBoolCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
187 |
void callback(Pointer context, Pointer buffer, NativeLong size, boolean arg3); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
188 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
189 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
190 |
public static interface SchemeCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
191 |
void callback(Pointer context, SchemePtr arg1); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
192 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
193 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
194 |
public static interface MapIntCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
195 |
void callback(Pointer context, MapRecipePtr arg1, int arg2); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
196 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
197 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
198 |
public static interface WeaponsetCallback extends Callback { |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
199 |
void callback(Pointer context, WeaponsetPtr arg1); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
200 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
201 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
202 |
public static interface MapimageCallback extends Callback { |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
203 |
void callback(Pointer context, Pointer buffer, int hedgehogCount); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
204 |
} |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
205 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
206 |
public static interface LogCallback extends Callback { |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
207 |
void callback(int level, String logMessage); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
208 |
} |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
209 |
|
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
210 |
int flib_init(); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
211 |
void flib_quit(); |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
212 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
213 |
NetconnPtr flib_netconn_create(String playerName, MetaschemePtr meta, String dataDirPath, String host, int port); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
214 |
void flib_netconn_destroy(NetconnPtr conn); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
215 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
216 |
void flib_netconn_tick(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
217 |
boolean flib_netconn_is_chief(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
218 |
boolean flib_netconn_is_in_room_context(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
219 |
String flib_netconn_get_playername(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
220 |
GameSetupPtr flib_netconn_create_gamesetup(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
221 |
int flib_netconn_send_quit(NetconnPtr conn, String quitmsg); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
222 |
int flib_netconn_send_chat(NetconnPtr conn, String chat); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
223 |
int flib_netconn_send_teamchat(NetconnPtr conn, String msg); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
224 |
int flib_netconn_send_password(NetconnPtr conn, String passwd); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
225 |
int flib_netconn_send_nick(NetconnPtr conn, String nick); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
226 |
int flib_netconn_send_request_roomlist(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
227 |
int flib_netconn_send_joinRoom(NetconnPtr conn, String room); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
228 |
int flib_netconn_send_createRoom(NetconnPtr conn, String room); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
229 |
int flib_netconn_send_renameRoom(NetconnPtr conn, String roomName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
230 |
int flib_netconn_send_leaveRoom(NetconnPtr conn, String msg); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
231 |
int flib_netconn_send_toggleReady(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
232 |
int flib_netconn_send_addTeam(NetconnPtr conn, TeamPtr team); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
233 |
int flib_netconn_send_removeTeam(NetconnPtr conn, String teamname); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
234 |
int flib_netconn_send_engineMessage(NetconnPtr conn, Buffer message, NativeLong size); // TODO check if NativeLong==size_t |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
235 |
int flib_netconn_send_teamHogCount(NetconnPtr conn, String teamname, int hogcount); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
236 |
int flib_netconn_send_teamColor(NetconnPtr conn, String teamname, int colorIndex); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
237 |
int flib_netconn_send_weaponset(NetconnPtr conn, WeaponsetPtr weaponset); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
238 |
int flib_netconn_send_map(NetconnPtr conn, MapRecipePtr map); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
239 |
int flib_netconn_send_mapName(NetconnPtr conn, String mapName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
240 |
int flib_netconn_send_mapGen(NetconnPtr conn, int mapGen); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
241 |
int flib_netconn_send_mapTemplate(NetconnPtr conn, int templateFilter); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
242 |
int flib_netconn_send_mapMazeSize(NetconnPtr conn, int mazeSize); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
243 |
int flib_netconn_send_mapSeed(NetconnPtr conn, String seed); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
244 |
int flib_netconn_send_mapTheme(NetconnPtr conn, String theme); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
245 |
int flib_netconn_send_mapDrawdata(NetconnPtr conn, Buffer drawData, NativeLong size); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
246 |
int flib_netconn_send_script(NetconnPtr conn, String scriptName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
247 |
int flib_netconn_send_scheme(NetconnPtr conn, SchemePtr scheme); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
248 |
int flib_netconn_send_roundfinished(NetconnPtr conn, boolean withoutError); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
249 |
int flib_netconn_send_ban(NetconnPtr conn, String playerName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
250 |
int flib_netconn_send_kick(NetconnPtr conn, String playerName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
251 |
int flib_netconn_send_playerInfo(NetconnPtr conn, String playerName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
252 |
int flib_netconn_send_playerFollow(NetconnPtr conn, String playerName); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
253 |
int flib_netconn_send_startGame(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
254 |
int flib_netconn_send_toggleRestrictJoins(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
255 |
int flib_netconn_send_toggleRestrictTeams(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
256 |
int flib_netconn_send_clearAccountsCache(NetconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
257 |
int flib_netconn_send_setServerVar(NetconnPtr conn, String name, String value); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
258 |
int flib_netconn_send_getServerVars(NetconnPtr conn); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
259 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
260 |
void flib_netconn_onMessage(NetconnPtr conn, IntStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
261 |
void flib_netconn_onChat(NetconnPtr conn, StrStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
262 |
void flib_netconn_onConnected(NetconnPtr conn, VoidCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
263 |
void flib_netconn_onDisconnected(NetconnPtr conn, IntStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
264 |
void flib_netconn_onRoomlist(NetconnPtr conn, RoomListCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
265 |
void flib_netconn_onRoomAdd(NetconnPtr conn, RoomCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
266 |
void flib_netconn_onRoomDelete(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
267 |
void flib_netconn_onRoomUpdate(NetconnPtr conn, StrRoomCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
268 |
void flib_netconn_onLobbyJoin(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
269 |
void flib_netconn_onLobbyLeave(NetconnPtr conn, StrStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
270 |
void flib_netconn_onNickTaken(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
271 |
void flib_netconn_onPasswordRequest(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
272 |
void flib_netconn_onEnterRoom(NetconnPtr conn, BoolCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
273 |
void flib_netconn_onRoomChiefStatus(NetconnPtr conn, BoolCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
274 |
void flib_netconn_onReadyState(NetconnPtr conn, StrBoolCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
275 |
void flib_netconn_onLeaveRoom(NetconnPtr conn, IntStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
276 |
void flib_netconn_onTeamAdd(NetconnPtr conn, TeamCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
277 |
void flib_netconn_onTeamDelete(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
278 |
void flib_netconn_onRoomJoin(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
279 |
void flib_netconn_onRoomLeave(NetconnPtr conn, StrStrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
280 |
void flib_netconn_onRunGame(NetconnPtr conn, VoidCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
281 |
void flib_netconn_onTeamAccepted(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
282 |
void flib_netconn_onHogCountChanged(NetconnPtr conn, StrIntCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
283 |
void flib_netconn_onTeamColorChanged(NetconnPtr conn, StrIntCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
284 |
void flib_netconn_onEngineMessage(NetconnPtr conn, BytesCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
285 |
void flib_netconn_onCfgScheme(NetconnPtr conn, SchemeCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
286 |
void flib_netconn_onMapChanged(NetconnPtr conn, MapIntCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
287 |
void flib_netconn_onScriptChanged(NetconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
288 |
void flib_netconn_onWeaponsetChanged(NetconnPtr conn, WeaponsetCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
289 |
void flib_netconn_onAdminAccess(NetconnPtr conn, VoidCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
290 |
void flib_netconn_onServerVar(NetconnPtr conn, StrStrCallback callback, Pointer context); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
291 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
292 |
// Gameconn |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
293 |
GameconnPtr flib_gameconn_create(String playerName, GameSetupPtr setup, boolean netgame); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
294 |
GameconnPtr flib_gameconn_create_playdemo(Buffer demo, NativeLong size); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
295 |
GameconnPtr flib_gameconn_create_loadgame(String playerName, Buffer save, NativeLong size); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
296 |
GameconnPtr flib_gameconn_create_campaign(String playerName, String seed, String script); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
297 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
298 |
void flib_gameconn_destroy(GameconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
299 |
int flib_gameconn_getport(GameconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
300 |
void flib_gameconn_tick(GameconnPtr conn); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
301 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
302 |
int flib_gameconn_send_enginemsg(GameconnPtr conn, Buffer data, NativeLong len); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
303 |
int flib_gameconn_send_textmsg(GameconnPtr conn, int msgtype, String msg); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
304 |
int flib_gameconn_send_chatmsg(GameconnPtr conn, String playername, String msg); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
305 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
306 |
void flib_gameconn_onConnect(GameconnPtr conn, VoidCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
307 |
void flib_gameconn_onDisconnect(GameconnPtr conn, IntCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
308 |
void flib_gameconn_onErrorMessage(GameconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
309 |
void flib_gameconn_onChat(GameconnPtr conn, StrBoolCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
310 |
void flib_gameconn_onGameRecorded(GameconnPtr conn, BytesBoolCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
311 |
void flib_gameconn_onEngineMessage(GameconnPtr conn, BytesCallback callback, Pointer context); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
312 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
313 |
// MapConn |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
314 |
MapconnPtr flib_mapconn_create(MapRecipePtr mapdesc); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
315 |
void flib_mapconn_destroy(MapconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
316 |
int flib_mapconn_getport(MapconnPtr conn); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
317 |
void flib_mapconn_onSuccess(MapconnPtr conn, MapimageCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
318 |
void flib_mapconn_onFailure(MapconnPtr conn, StrCallback callback, Pointer context); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
319 |
void flib_mapconn_tick(MapconnPtr conn); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
320 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
321 |
// GameSetup |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
322 |
void flib_gamesetup_destroy(GameSetupPtr gamesetup); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
323 |
GameSetupPtr flib_gamesetup_copy(GameSetupPtr gamesetup); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
324 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
325 |
// MapRecipe |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
326 |
public static final int MAPGEN_REGULAR = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
327 |
public static final int MAPGEN_MAZE = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
328 |
public static final int MAPGEN_DRAWN = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
329 |
public static final int MAPGEN_NAMED = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
330 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
331 |
public static final int TEMPLATEFILTER_ALL = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
332 |
public static final int TEMPLATEFILTER_SMALL = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
333 |
public static final int TEMPLATEFILTER_MEDIUM = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
334 |
public static final int TEMPLATEFILTER_LARGE = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
335 |
public static final int TEMPLATEFILTER_CAVERN = 4; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
336 |
public static final int TEMPLATEFILTER_WACKY = 5; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
337 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
338 |
public static final int MAZE_SIZE_SMALL_TUNNELS = 0; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
339 |
public static final int MAZE_SIZE_MEDIUM_TUNNELS = 1; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
340 |
public static final int MAZE_SIZE_LARGE_TUNNELS = 2; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
341 |
public static final int MAZE_SIZE_SMALL_ISLANDS = 3; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
342 |
public static final int MAZE_SIZE_MEDIUM_ISLANDS = 4; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
343 |
public static final int MAZE_SIZE_LARGE_ISLANDS = 5; |
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
344 |
|
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
345 |
MapRecipePtr flib_map_create_regular(String seed, String theme, int templateFilter); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
346 |
MapRecipePtr flib_map_create_maze(String seed, String theme, int mazeSize); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
347 |
MapRecipePtr flib_map_create_named(String seed, String name); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
348 |
MapRecipePtr flib_map_create_drawn(String seed, String theme, Buffer drawData, NativeLong drawDataSize); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
349 |
MapRecipePtr flib_map_copy(MapRecipePtr map); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
350 |
MapRecipePtr flib_map_retain(MapRecipePtr map); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
351 |
void flib_map_release(MapRecipePtr map); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
352 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
353 |
// Metascheme |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
354 |
MetaschemePtr flib_metascheme_from_ini(String filename); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
355 |
MetaschemePtr flib_metascheme_retain(MetaschemePtr metainfo); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
356 |
void flib_metascheme_release(MetaschemePtr metainfo); |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
357 |
|
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
358 |
public static final int FLIB_LOGLEVEL_ALL = -100; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
359 |
public static final int FLIB_LOGLEVEL_DEBUG = -1; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
360 |
public static final int FLIB_LOGLEVEL_INFO = 0; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
361 |
public static final int FLIB_LOGLEVEL_WARNING = 1; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
362 |
public static final int FLIB_LOGLEVEL_ERROR = 2; |
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
363 |
public static final int FLIB_LOGLEVEL_NONE = 100; |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
364 |
|
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
365 |
void flib_log_setLevel(int level); |
7342
0e29eec2df5c
Hedgeroid: Got the roomlist working... more or less.
Medo <smaxein@googlemail.com>
parents:
7332
diff
changeset
|
366 |
void flib_log_setCallback(LogCallback callback); |
7328
cd919a2ead4e
Hedgeroid: Added experimental lobby chat
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
367 |
} |