comparison TaskManager/Test/test_render/main.cc @ 537:577043af6684 draft

get linda server addr from command line arg
author kazz@e065701.local
date Fri, 23 Oct 2009 14:13:03 +0900
parents 0d2dc1869cbe
children
comparison
equal deleted inserted replaced
536:8391a1172186 537:577043af6684
33 int bpp = 32; 33 int bpp = 32;
34 int width = 640; 34 int width = 640;
35 int height = 480; 35 int height = 480;
36 int spenum = 1; 36 int spenum = 1;
37 const char *xml = "xml_file/cube.xml"; 37 const char *xml = "xml_file/cube.xml";
38 const char *linda_serv = "localhost";
38 video_type vtype = VTYPE_SDL; 39 video_type vtype = VTYPE_SDL;
39 40
40 for(int i = 1; argv[i]; ++i) 41 for(int i = 1; argv[i]; ++i)
41 { 42 {
42 if (strcmp(argv[i], "-bpp") == 0) { 43 if (strcmp(argv[i], "-bpp") == 0) {
48 if (strcmp(argv[i], "-height") == 0) { 49 if (strcmp(argv[i], "-height") == 0) {
49 height = atoi(argv[++i]); 50 height = atoi(argv[++i]);
50 } 51 }
51 if (strcmp(argv[i], "-xml") == 0) { 52 if (strcmp(argv[i], "-xml") == 0) {
52 xml = argv[++i]; 53 xml = argv[++i];
54 }
55 if (strcmp(argv[i], "-linda") == 0) {
56 linda_serv = argv[++i];
53 } 57 }
54 if (strcmp(argv[i], "-sg") == 0) { 58 if (strcmp(argv[i], "-sg") == 0) {
55 sg_number = (atoi)(argv[++i]); 59 sg_number = (atoi)(argv[++i]);
56 } 60 }
57 if (strcmp(argv[i], "-cpu") == 0) { 61 if (strcmp(argv[i], "-cpu") == 0) {
75 }else{ 79 }else{
76 screen = new ViewerSDL(manager, bpp, width, height, spenum); 80 screen = new ViewerSDL(manager, bpp, width, height, spenum);
77 } 81 }
78 82
79 screen->video_init(manager); 83 screen->video_init(manager);
80 screen->run_init(manager, xml, sg_number); 84 screen->run_init(manager, xml, sg_number, linda_serv);
81 85
82 manager->set_TMend(TMend); 86 manager->set_TMend(TMend);
83 87
84 return 0; 88 return 0;
85 } 89 }