annotate Renderer/Engine/viewer.h @ 1211:7763f03a94e1 draft before-dma-manager

const char fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 22 Jul 2011 08:46:29 +0900
parents 0ee23180d301
children fe598e9b7f0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
1 #ifndef INCLUDED_VIEWER
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
2 #define INCLUDED_VIEWER
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
3
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
4 #include <SDL.h>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
5
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
6 #include "viewer_types.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
7 #include "TaskManager.h"
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
8 #include "KeyStat.h"
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
9 #include "MainLoop.h"
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
10 #include "Application.h"
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
11 #include "SceneGraphRoot.h"
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
12 #include "ViewerDevice.h"
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
13
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
14 class SceneGraphRoot;
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
15
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
16 class Application;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
17
1035
2403d545abd8 bledenr script
tkaito
parents: 1033
diff changeset
18
986
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
19 typedef struct rendering_data {
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
20 PolygonPack *ppack;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
21 SpanPackPtr spackList;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
22 SpanPackPtr *spackList_ptr;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
23
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
24 int spackList_length;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
25 int spackList_length_align;
1160
Yutaka_Kinjyo
parents: 1131
diff changeset
26 } RenderingData ;
986
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
27
1160
Yutaka_Kinjyo
parents: 1131
diff changeset
28 extern RenderingData r[2];
986
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
29
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
30 extern int ppi, spi;
b3a8545eb2fa double buffering of spanpack/polgonpack
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 969
diff changeset
31
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
32 class Viewer : public MainLoop {
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
33
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
34 public:
925
292bb8c79cdb add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
35 Viewer(){ profile = 0;};
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
36 Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
37
542
109a33b72b10 continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 541
diff changeset
38 virtual ~Viewer() {}
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
39 BASE_NEW_DELETE(Viewer);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
40
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
41 ViewerDevice *dev;
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
42 Application *app;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
43
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
44 TaskManager *manager;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
45 key_stat *keyPtr;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
46 HTaskPtr draw_dummy;
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
47
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
48 /* screen info */
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
49 int bpp;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
50
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
51 int rgb_size[3];
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
52 int spe_num;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
53 int width;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
54 int height;
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
55
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
56 float *light_xyz;
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
57 float *light_xyz_stock;
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
58 int *light_switch;
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
59 int *light_switch_stock;
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
60 int *light_sysswitch;
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
61 int light_sysswitch_stock;
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
62
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
63 Uint32 video_flags;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
64 Uint32 *pixels;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
65
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
66 int mem_flag;
925
292bb8c79cdb add profile in Redering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
67 int profile;
914
6286b3baf744 0 is filled on the spe side.
yutaka@localhost.localdomain
parents: 909
diff changeset
68
1160
Yutaka_Kinjyo
parents: 1131
diff changeset
69 int pp_sum_num;
Yutaka_Kinjyo
parents: 1131
diff changeset
70
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
71 SceneGraphRoot *sgroot;
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
72
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
73 //Uint32 *video_init(TaskManager *manager, int bpp, int width, int height);
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
74 void init();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
75
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
76 int get_ticks();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
77 bool quit_check();
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
78 void quit();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
79 HTaskPtr initLoop();
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
80
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
81 void clean_pixels() {}
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
82
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
83 void run_init(TaskManager *manager, Application *app);
1112
fa1f4a1c47bf fix viewer for non screen mode.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1095
diff changeset
84 bool main_exec(HTaskPtr task_next);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
85 void run_loop(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
86 void run_draw(HTaskPtr task_next);
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
87 virtual void run_finish();
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
88 void run_move(HTaskPtr task_next);
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
89 void run_collision();
1131
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
90 void create_pp(HTaskPtr task_next);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
91 void create_sp(HTaskPtr task_next);
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
92 void common_draw(HTaskPtr task_next);
1131
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
93 void rendering_pp(HTaskPtr task_next, SceneGraphRoot *sgroot);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
94 void rendering_sp(HTaskPtr task_next, SceneGraphRoot *sgroot);
220f9032d2d2 RENDERING_TASK was divided into CREATE_PP_TASK and CREATE_SP_TASK.
root@dolphins.cr.ie.u-ryukyu.ac.jp
parents: 1125
diff changeset
95 //void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
96
747
18d31d18a6b2 TaskManager changeset 683, Renderer changeset 746
hiroki
parents: 671
diff changeset
97 // void exchange_sgroot(TaskManager *manager);
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
98
792
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
99 HTaskPtr update_task_create(void *data, int size,
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
100 int load_id, int spe_id, HTaskPtr wait);
b480fc04206f add light switch
yutaka@localhost.localdomain
parents: 779
diff changeset
101
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
102 void getKey();
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
103 void get_send_controll();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
104
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
105 // void createFromXMLfile(const char *file);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
106 // SceneGraph *createSceneGraph(int id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
107 // SceneGraph *createSceneGraph();
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
108 // void setSceneData(SceneGraph *g);
927
fada580e4604 remove garbage codes from viewerGL
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 922
diff changeset
109 virtual void mainLoop();
543
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 542
diff changeset
110
1211
7763f03a94e1 const char fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1210
diff changeset
111 void createStringFont(SceneGraphPtr root, const char *string, int pixels, int screen_w, int screen_h, Uint32 color)
1205
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
112 {
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
113 sgroot -> createStringFont(manager, root, string, pixels, screen_w, screen_h, color);
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
114 }
1211
7763f03a94e1 const char fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1210
diff changeset
115 void createFont(const char *font,int pixels,Uint32 color, const char *filename, int len, char **obj_name)
1205
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
116 {
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
117 sgroot -> createFont(manager,font,pixels,color,filename, len, obj_name);
b8adf4e95e96 add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents: 1160
diff changeset
118 }
1002
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
119 void task_array_init(int id, int task_num, int param, int inData_num, int outData_num)
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
120 {
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
121 sgroot->task_array_init(id, task_num, param, inData_num, outData_num);
ceca625af064 many changes.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 986
diff changeset
122 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
123 void set_move_task(SceneGraphPtr node, int move, void *titlep, int size)
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
124 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
125 sgroot->set_move_task(node, move, titlep, size);
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
126 }
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
127 void set_pad_task(SceneGraphPtr node, int move, void *property, int size)
886
fb6f9a0aa587 set_move_task add.
tkaito
parents: 869
diff changeset
128 {
1033
a9581a9df440 add application main method and task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1003
diff changeset
129 sgroot->set_pad_task(node, move, property, size);
869
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
130 }
a215927a9885 set_game_task add to SceneGraphRoot.
tkaito
parents: 860
diff changeset
131
671
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
132 void createFromXMLmemory(SceneGraph * node, char *data, int len)
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
133 {
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
134 sgroot->createFromXMLmemory(manager, node, data, len);
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
135 }
7761ebf9c62a fix several Renderer/Test with (void*)sgroot.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 589
diff changeset
136
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
137 void createFromXMLfile(const char *file)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
138 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
139 sgroot->createFromXMLfile(manager, file);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
140 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
141
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
142 Pad * getController()
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
143 {
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
144 return sgroot->getController();
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
145 }
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
146
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
147 SceneGraph * createSceneGraph(int id)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
148 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
149 return sgroot->createSceneGraph(id);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
150 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
151
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
152 SceneGraph * createSceneGraph(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
153 {
969
52c4353308e7 add new function for dandy.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 928
diff changeset
154 return sgroot->createSceneGraph(id);
562
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
155 }
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
156
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
157 int getSgid(const char *id)
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
158 {
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
159 return sgroot->getSgid(id);
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
160 }
d65f21b18165 name search
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 558
diff changeset
161
558
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
162 SceneGraph * createSceneGraph()
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
163 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
164 return sgroot->createSceneGraph();
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
165 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
166
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
167 void setSceneData(SceneGraph *g)
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
168 {
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
169 sgroot->setSceneData(g);
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
170 }
00428ba0ba03 boss1_action
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 544
diff changeset
171
589
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
172 int getLast()
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
173 {
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
174 return sgroot->getLast();
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
175 }
e112f38275d5 add viwer.cc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 562
diff changeset
176
793
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
177 SceneGraphPtr getLight(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
178 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
179 return sgroot->getLight(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
180 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
181
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
182 void OnLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
183 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
184 sgroot->OnLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
185 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
186
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
187 void OffLightSwitch(int id)
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
188 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
189 sgroot->OffLightSwitch(id);
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
190 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
191
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
192 void OnLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
193 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
194 sgroot->OnLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
195 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
196
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
197 void OffLightSysSwitch()
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
198 {
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
199 sgroot->OffLightSysSwitch();
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
200 }
66497087393d add light switch api
yutaka@localhost.localdomain
parents: 792
diff changeset
201
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
202 };
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
203
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
204 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
205
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
206
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
207 #endif
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
208