-
Notifications
You must be signed in to change notification settings - Fork 4
/
bindings.pkg
44 lines (43 loc) · 1.33 KB
/
bindings.pkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$#include "luabind.h"
$#include "atlantis.h"
$#include "faction.h"
$#include "unit.h"
$#include "region.h"
$#include "game.h"
module atlantis {
struct unit {
int no @ id;
tolua_readonly faction *faction;
tolua_readonly region *region;
tolua_outside tolua_property char * unit_name @ name;
};
struct faction {
int no @ id;
tolua_outside tolua_property char * faction_name @ name;
tolua_outside tolua_property char * faction_addr @ email;
};
struct region {
int uid @ id;
int x, y;
tolua_outside tolua_property char * region_name @ name;
tolua_outside tolua_property char * region_terrain @ terrain;
};
module regions {
// list(region *) all;
region *regions_create @ create(int x, int y, const char *terrain);
region *findregion @ get(int x, int y);
}
module factions {
// list(faction *) all;
faction *create_faction @ create(int no);
faction *findfaction @ get(int id);
}
int turn;
void cleargame @ free_game(bool conf);
int read_config(const char *filename);
int read_game(const char *filename);
int write_game(const char *filename);
void write_reports(faction *f);
int readorders @ read_orders(const char *filename);
void processorders @ process(void);
}