Mercurial > hg > Game > Cerium
comparison Renderer/Test/init_aquarium.cc @ 867:9b25de3bb8de draft
add init_aquarium with protobuf
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Jun 2010 12:52:25 +0900 |
parents | |
children | 08ed5e750d78 |
comparison
equal
deleted
inserted
replaced
866:d328690a6f8f | 867:9b25de3bb8de |
---|---|
1 #include <stdio.h> | |
2 #include "lindaapi.h" | |
3 #include "aquarium.pb.h" | |
4 | |
5 int main(int argc, char *argv[]) { | |
6 init_linda(); | |
7 aqua::Width *width = new aqua::Width(); | |
8 width->set_width(0); // 0 ¤Ç½é´ü²½ | |
9 int size = width->ByteSize(); | |
10 unsigned char *msg = (unsigned char *) malloc(sizeof(char) * size); | |
11 width->SerializeToArray(msg, size); | |
12 | |
13 int linda = open_linda_java("localhost", 10000); | |
14 psx_out(linda, 1, msg, size); | |
15 psx_sync_n(); | |
16 | |
17 return 0; | |
18 } |