99 |
99 |
100 // frontlib.h |
100 // frontlib.h |
101 int flib_init(); |
101 int flib_init(); |
102 void flib_quit(); |
102 void flib_quit(); |
103 |
103 |
|
104 // hwconsts.h |
|
105 int flib_get_teamcolor_count(); |
|
106 int flib_get_hedgehogs_per_team(); |
|
107 int flib_get_weapons_count(); |
|
108 |
104 // net/netconn.h |
109 // net/netconn.h |
105 NetconnPtr flib_netconn_create(String playerName, MetaschemePtr meta, String dataDirPath, String host, int port); |
110 NetconnPtr flib_netconn_create(String playerName, String dataDirPath, String host, int port); |
106 void flib_netconn_destroy(NetconnPtr conn); |
111 void flib_netconn_destroy(NetconnPtr conn); |
107 |
112 |
108 void flib_netconn_tick(NetconnPtr conn); |
113 void flib_netconn_tick(NetconnPtr conn); |
109 boolean flib_netconn_is_chief(NetconnPtr conn); |
114 boolean flib_netconn_is_chief(NetconnPtr conn); |
110 String flib_netconn_get_playername(NetconnPtr conn); |
115 String flib_netconn_get_playername(NetconnPtr conn); |
120 int flib_netconn_send_renameRoom(NetconnPtr conn, String roomName); |
125 int flib_netconn_send_renameRoom(NetconnPtr conn, String roomName); |
121 int flib_netconn_send_leaveRoom(NetconnPtr conn, String msg); |
126 int flib_netconn_send_leaveRoom(NetconnPtr conn, String msg); |
122 int flib_netconn_send_toggleReady(NetconnPtr conn); |
127 int flib_netconn_send_toggleReady(NetconnPtr conn); |
123 int flib_netconn_send_addTeam(NetconnPtr conn, TeamPtr team); |
128 int flib_netconn_send_addTeam(NetconnPtr conn, TeamPtr team); |
124 int flib_netconn_send_removeTeam(NetconnPtr conn, String teamname); |
129 int flib_netconn_send_removeTeam(NetconnPtr conn, String teamname); |
125 int flib_netconn_send_engineMessage(NetconnPtr conn, Buffer message, NativeLong size); |
|
126 int flib_netconn_send_teamHogCount(NetconnPtr conn, String teamname, int hogcount); |
130 int flib_netconn_send_teamHogCount(NetconnPtr conn, String teamname, int hogcount); |
127 int flib_netconn_send_teamColor(NetconnPtr conn, String teamname, int colorIndex); |
131 int flib_netconn_send_teamColor(NetconnPtr conn, String teamname, int colorIndex); |
128 int flib_netconn_send_weaponset(NetconnPtr conn, WeaponsetPtr weaponset); |
132 int flib_netconn_send_weaponset(NetconnPtr conn, WeaponsetPtr weaponset); |
129 int flib_netconn_send_map(NetconnPtr conn, MapRecipePtr map); |
133 int flib_netconn_send_map(NetconnPtr conn, MapRecipePtr map); |
130 int flib_netconn_send_mapName(NetconnPtr conn, String mapName); |
134 int flib_netconn_send_mapName(NetconnPtr conn, String mapName); |
131 int flib_netconn_send_mapGen(NetconnPtr conn, int mapGen); |
135 int flib_netconn_send_mapGen(NetconnPtr conn, int mapGen); |
132 int flib_netconn_send_mapTemplate(NetconnPtr conn, int templateFilter); |
136 int flib_netconn_send_mapTemplate(NetconnPtr conn, int templateFilter); |
133 int flib_netconn_send_mapMazeSize(NetconnPtr conn, int mazeSize); |
137 int flib_netconn_send_mapMazeSize(NetconnPtr conn, int mazeSize); |
134 int flib_netconn_send_mapSeed(NetconnPtr conn, String seed); |
138 int flib_netconn_send_mapSeed(NetconnPtr conn, String seed); |
135 int flib_netconn_send_mapTheme(NetconnPtr conn, String theme); |
139 int flib_netconn_send_mapTheme(NetconnPtr conn, String theme); |
136 int flib_netconn_send_mapDrawdata(NetconnPtr conn, Buffer drawData, NativeLong size); |
|
137 int flib_netconn_send_script(NetconnPtr conn, String scriptName); |
140 int flib_netconn_send_script(NetconnPtr conn, String scriptName); |
138 int flib_netconn_send_scheme(NetconnPtr conn, SchemePtr scheme); |
141 int flib_netconn_send_scheme(NetconnPtr conn, SchemePtr scheme); |
139 int flib_netconn_send_roundfinished(NetconnPtr conn, boolean withoutError); |
142 int flib_netconn_send_roundfinished(NetconnPtr conn, boolean withoutError); |
140 int flib_netconn_send_ban(NetconnPtr conn, String playerName); |
143 int flib_netconn_send_ban(NetconnPtr conn, String playerName); |
141 int flib_netconn_send_kick(NetconnPtr conn, String playerName); |
144 int flib_netconn_send_kick(NetconnPtr conn, String playerName); |
188 |
191 |
189 void flib_gameconn_destroy(GameconnPtr conn); |
192 void flib_gameconn_destroy(GameconnPtr conn); |
190 int flib_gameconn_getport(GameconnPtr conn); |
193 int flib_gameconn_getport(GameconnPtr conn); |
191 void flib_gameconn_tick(GameconnPtr conn); |
194 void flib_gameconn_tick(GameconnPtr conn); |
192 |
195 |
193 int flib_gameconn_send_enginemsg(GameconnPtr conn, Buffer data, NativeLong len); |
|
194 int flib_gameconn_send_textmsg(GameconnPtr conn, int msgtype, String msg); |
196 int flib_gameconn_send_textmsg(GameconnPtr conn, int msgtype, String msg); |
195 int flib_gameconn_send_chatmsg(GameconnPtr conn, String playername, String msg); |
197 int flib_gameconn_send_chatmsg(GameconnPtr conn, String playername, String msg); |
196 int flib_gameconn_send_quit(GameconnPtr conn); |
198 int flib_gameconn_send_quit(GameconnPtr conn); |
197 |
199 |
198 void flib_gameconn_onConnect(GameconnPtr conn, VoidCallback callback, Pointer context); |
200 void flib_gameconn_onConnect(GameconnPtr conn, VoidCallback callback, Pointer context); |
208 int flib_mapconn_getport(MapconnPtr conn); |
210 int flib_mapconn_getport(MapconnPtr conn); |
209 void flib_mapconn_onSuccess(MapconnPtr conn, MapimageCallback callback, Pointer context); |
211 void flib_mapconn_onSuccess(MapconnPtr conn, MapimageCallback callback, Pointer context); |
210 void flib_mapconn_onFailure(MapconnPtr conn, StrCallback callback, Pointer context); |
212 void flib_mapconn_onFailure(MapconnPtr conn, StrCallback callback, Pointer context); |
211 void flib_mapconn_tick(MapconnPtr conn); |
213 void flib_mapconn_tick(MapconnPtr conn); |
212 |
214 |
213 // model/scheme.h |
215 MetaschemePtr flib_get_metascheme(); |
214 MetaschemePtr flib_metascheme_from_ini(String filename); |
|
215 MetaschemePtr flib_metascheme_retain(MetaschemePtr metainfo); |
|
216 void flib_metascheme_release(MetaschemePtr metainfo); |
|
217 |
216 |
218 // model/schemelist.h |
217 // model/schemelist.h |
219 SchemelistPtr flib_schemelist_from_ini(MetaschemePtr meta, String filename); |
218 SchemelistPtr flib_schemelist_from_ini(String filename); |
220 int flib_schemelist_to_ini(String filename, SchemelistPtr list); |
219 int flib_schemelist_to_ini(String filename, SchemelistPtr list); |
221 void flib_schemelist_destroy(SchemelistPtr list); |
220 void flib_schemelist_destroy(SchemelistPtr list); |
222 |
221 |
223 // model/team.h |
222 // model/team.h |
224 TeamPtr flib_team_from_ini(String filename); |
223 TeamPtr flib_team_from_ini(String filename); |