annotate TaskManager/Test/test_render/ChangeLog @ 236:c7abab87697a

fix
author gongo@localhost.localdomain
date Sun, 29 Mar 2009 22:03:16 +0900
parents c254a2bd1b34
children 5e2d30bfbf23
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
gongo@localhost.localdomain
parents: 228
diff changeset
1 2009-03-29 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
gongo@localhost.localdomain
parents: 228
diff changeset
2
gongo@localhost.localdomain
parents: 228
diff changeset
3 * Makefile
gongo@localhost.localdomain
parents: 228
diff changeset
4 SGlist.{cpp,h} を make clean で消去し、
gongo@localhost.localdomain
parents: 228
diff changeset
5 make で自動生成するようにしました。
gongo@localhost.localdomain
parents: 228
diff changeset
6 けどなんか他のファイルと同じ書きかたしても
gongo@localhost.localdomain
parents: 228
diff changeset
7 上手く行かなかった。何か見落としてるかもしれない。誰か直(ry
gongo@localhost.localdomain
parents: 228
diff changeset
8
228
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
9 2009-02-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
10
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
11 * task/CreatePolygonFromSceneGraph.cpp (CreatePolygonFromSceneGraph::run): fix
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
12 下にあわせる様に
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
13
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
14 * SceneGraph.cpp (SceneGraph::SceneGraph, SceneGraph::init)
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
15 (SceneGraph::finalize_original): fix
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
16 今まで、Polygon が持つ vertex, normal, texture coordinate ってのが
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
17
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
18 ---------------------------------------
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
19 data = | vertex | normal | texture | sizeof(data) = size*3
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
20 ---------------------------------------
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
21 \ size / \ size / \ size /
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
22
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
23 てな感じで、SceneGraph->data の中に 3 つ入ってたわけです。
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
24 これだと、アクセスする時にどれがどれかわからんくなるし、
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
25 ソース読む時に迷う(経験談)ので、data を消して、代わりに
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
26 coord_xyz, normal, coord_tex を作りました。
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
27
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
28 * polygon.cpp (Polygon::pickup_coordinate)
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
29 (Polygon::pickup_normal, Polygon::pickup_texture):
c254a2bd1b34 remove SceneGraph::data, add SceneGraph::coord_xyz, coord_tex, normal
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 221
diff changeset
30
221
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
31 2009-02-10 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
32
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
33 * Makefile.macosx (depend): fix
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
34 depend.inc とかを吐き出す様にしました
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
35
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
36 * Camera.cpp (Camera::Camera, Camera::updateView)
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
37 (Camera::updatePerspective, Camera::updateScreen)
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
38 (Camera::update): fix
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
39 なんとかカメラできてるっぽいです。
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
40 Perspective とかも聞いてるし、中心に向かって遠くなってる。
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
41 あとは行列演算をもうちょいこぎれいにすればいい感じかなー。
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
42
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
43 残りは、ユーザ側からの設定。例えば
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
44 1. 車の運転席目線(FPS)
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
45 2. 車の後ろから(TPS)
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
46 3. 車の前から(SPS)
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
47
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
48 的なのを、ユーザが CameraData みたいな構造体に
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
49 zd とか yd とかを設定して camera->set(data) とかやれば
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
50 反映するみたいな!みたいな!
d61fded0729e Cameraの設定、Makefile 修正
gongo@gendarme.local
parents: 219
diff changeset
51
219
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
52 2009-02-09 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
53
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
54 * SceneGraphRoot.cpp (SceneGraphRoot::allExecute)
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
55 (SceneGraphRoot): fix
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
56 SceneGraph を root から走査していきながら
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
57 その都度コピーしていき、最終的に全体の新しい SceneGraph ができる。
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
58 削除されていればコピーしない、っていうのは簡単だけど
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
59 追加された場合、コピー元に追加されるのは困るので
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
60 コピーしたやつに追加って形にしたら今のコードになった。
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
61 めんどくさいっちゃめんどくさい。もっと綺麗な書き方あるかね
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
62
0f1ff7b06157 allExecute する度に SceneGraph をコピーしていく様に変更
gongo@gendarme.local
parents: 215
diff changeset
63
215
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
64 2009-02-01 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
65
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
66 * SceneGraph.cpp (SceneGraph::SceneGraph)
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
67 (SceneGraph::SceneGraph, SceneGraph::SceneGraph)
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
68 (SceneGraph::finalize_original, SceneGraph)
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
69 (SceneGraph::finalize_copy): add, fix
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
70 今のところ、SceneGraph の作られ方は
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
71
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
72 a1. xml ファイルから生成 (sgid 毎、sg_src[] に格納)
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
73 a2. ID を指定し、sg_src[id] の SceneGraph を複製
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
74 a3. xml も ID も指定しない、何も表示しない SceneGraph
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
75
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
76 a1 の時はポリゴンデータ(data[])を生成するわけだけど、
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
77 a2 でも、オリジナルと同じ data[] を持つ必要は(今は)ない。
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
78 なので、a2 の場合、data[] は a1 と同じ場所を指せば良い。
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
79 しかし、今までは、SceneGraph::~SceneGraph では
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
80 どんな SceneGraph でも
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
81
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
82 delete [] data;
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
83
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
84 とかやってたので、それならということで
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
85
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
86 b1. a1 用の、Desturctor で data[] を delete する finalize_original()
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
87 b2. a2,a3 用の、data[] を削除しない finalize_copy()
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
88
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
89 を用意し、a1,a2,a3 の Consturoctor で、どっちかを設定する。
7ca6a2ef5be9 fix SceneGraph Constructor, Destructor
gongo@gendarme.local
parents: 210
diff changeset
90
210
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
91 2009-01-30 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
92
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
93 * spe/DrawSpan.cpp (DrawSpan::drawDot1): add
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
94 span->length_x == 1 の処理。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
95
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
96 (DrawSpan::drawDot2): add
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
97 Dot1 の続き。要は Dot1 で load して、Dot2 で wait->書き込みって感じ
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
98 しかし、1ドットだとそこまで待つ必要もないかなって感じなので
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
99 今は Dot 2には何も書いてない。ちゃんとしらべて、必要そうだったら
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
100 ここで書き込みを行う
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
101
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
102 (DrawSpan::drawLine1): add
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
103 span->length_x > 1 の処理。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
104 いくつか Load パターンを考えてる途中
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
105
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
106 1. 全部 load
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
107 1. z buf で描きこむと判断したとき、その pixel の texture tile を
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
108 load する。(すでにある、ないに関わらず。ある場合は、実際には
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
109 Load の処理は行われないが)
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
110 2. Line2 で描画する(ここで使う tile はすでに全部読み込まれてるとする
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
111
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
112 2. 無い物だけload
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
113 1. 書き込むと判断したとき、tile があるかどうかを調べ
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
114 あればそのまま linebuf に、無ければ load を掛けて continue;
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
115 このとき、load した(つまりまだ書き込まれてない) 場所を覚えておく
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
116 2. Line2 で、1. で覚えた場所から再び計算して描画する。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
117 tile はすでに全部読み込まれているとする
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
118
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
119 まだあったけど忘れた。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
120 今のところ描画領域が 256x8、もしくは512x8 で、
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
121 単純に考えて、領域pixel と texture pixel が一緒だと考えると
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
122 一個の Span で最大 64 (512/8) 個の tile があればいいと考えられる。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
123 一個の SPE には Tile を 128 個持っておけるし、
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
124 今は Span を二つ平行して処理しているので、
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
125 途中で Tile が足りなくなる!ってことはないはず。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
126 とまあ、いろいろ考えてたんだけど、何書けばいいのか忘れた。。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
127 思い出したらまた書きます。
204b03ca98f8 fix DrawSpan
gongo@localhost.localdomain
parents: 203
diff changeset
128
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
129 2009-01-26 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
130
203
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
131 * spe/CreateSpan.cpp (CreateSpan::run): fix
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
132 ポリゴンをx軸に水平に分割し、その二つを計算するってのが
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
133 half_triangelで、上としたで、何故か渡すテクスチャの情報が違う。
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
134 なんでだろうと思いつつも、今まで特に問題が出なかったから無視してたが、
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
135 今回、三つのSceneGraph を動かしてる時に問題発生。
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
136 それぞれ違うテクスチャを貼ってるのに、なぜかそれらのうちの半分が
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
137 別のテクスチャが貼られていた。簡単に言うと、A,B,C の SG があった。
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
138
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
139 A: 正常
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
140 B: 右上だけ A のテクスチャ
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
141 C: 右上だけ A のテクスチャ
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
142
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
143 といった具合。わけがわからなかったんだが、
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
144 half_triangle に渡すやつの所為だと気づきました
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
145 なんでここだけ pp->tri[0].tex_info.addr とか渡してんのか未だに謎。
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
146 単なる書き間違いか直し間違いか。微妙なところ。
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
147 これ書いた後輩はもう居ない
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
148
5c6c9667ac61 fix CreateSpan::run
gongo@localhost.localdomain
parents: 202
diff changeset
149
202
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
150 * SceneGraphIterator.cpp (SceneGraphIterator::hasNext)
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
151 (SceneGraphIterator::next): fix
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
152 検索する引数を int id に変更。
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
153
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
154 * SceneGraph.h (class SceneGraph): add variable
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
155 int flag_drawbale : この SceneGraph は描画する物かどうか
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
156 int sgid : SceneGraph の ID 。ID は SGList.h にあるものを使う
3f4c6a75d7e0 fix SceneGraphIterator::hasNext(), next()
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 201
diff changeset
157
201
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
158 * SceneGraphIterator.cpp : add file
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
159 SceneGraph を走査する用。
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
160 基本、Java の Iterator を参考にしてます。
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
161 追加機能としては
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
162
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
163 - hasNext(const char* name);
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
164 名前が name の SceneGraph があるかどうか
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
165
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
166 - next(const char* name);
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
167 名前が name の SceneGraph まで進ませる
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
168
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
169 * SceneGraphIterator.cpp : TODO
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
170 hasNext とかは名前じゃなくて ID が良いかなーとも思うけどね。
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
171 てかその方がいいな。あとで直します
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
172
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
173 * ieshoot.cpp (ieboss_move): add
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
174 (ieboss_collision): add
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
175 BOSSの動きを追加。
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
176 IETAMA が数回衝突したら BOSS を消すって処理。
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
177
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
178 * SceneGraphIterator.cpp (SceneGraphIterator::next): fix
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
179 break してなかった。そりゃ取れないわ
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
180
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
181 * SceneGraph.cpp (SceneGraph::realRemoveFromTree): fix
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
182
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
183 < p1 = p1->next;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
184 < p = p->next;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
185 =====
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
186 > p1 = p1->brother;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
187 > p = p->brother;
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
188
b257e27d995c add SceneGraphIterator
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 200
diff changeset
189
200
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
190 * viewer.cpp (Viewer::run_draw): fix
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
191 Spanの無い部分を塗りつぶす処理はタスクを走らせず、
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
192 そのまま memset とかの方が早い。
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
193 まとめてするタスクを立ち上げるってのもいいかもしれない。
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
194 あと、memsetで指定する値が、0xFF と 0x00 とで速度が違う。
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
195 universe だと、
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
196
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
197 0xFF 24fps
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
198 0x00 30fps
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
199
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
200 なんだろう。0x00 だと、ただのクリアになるから速いってことかな。
10ad99550ee8 fix run_draw
gongo@localhost.localdomain
parents: 199
diff changeset
201
199
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
202 * Camera.h (class Camera): add
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
203 とりあえず Camera を作って、これを SceneGraph の Top にした。
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
204
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
205 * SceneGraph.cpp (SceneGraph::realRemoveFromTree): add
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
206 realRemove() の Tree構造用。削除後の tree top を返す様にしている。
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
207 まあ top が消えなければ返す必要も無いし、top が消えるってことは
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
208 SceneGraph そのものが消えるってことでそうは無い・・はずだけどね。
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
209 (SceneGraph::realRemoveFromList): add
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
210 realRemove() の list用。削除後の list top を返す様にしている。
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
211 (SceneGraph::realRemoveFromTree): fix
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
212 < p->next = p1->next;
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
213 ===
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
214 > p->brother = p1->brother;
eb20274baa7c add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 196
diff changeset
215
195
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
216 2009-01-25 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
217
196
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 195
diff changeset
218 * add (tools/create_sglist): new
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 195
diff changeset
219 必要な SceneGraph xml file から SceneGraph を抽出し、
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 195
diff changeset
220 名前と対応する ID を SGList.h に出力する。
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 195
diff changeset
221 また、名前から ID を求める sglist_table を SGList.cpp に出力する。
932a05a7a1db add SceneGraphRoot, tools/create_sglist.pl
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 195
diff changeset
222
195
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
223 * SceneGraph.cpp (SceneGraph::remove): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
224 User API。ここで削除するのではなく、まずはフラグを立てるだけ
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
225 ここですぐに消すと、allExecute() の走査で何気に困る
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
226
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
227 (SceneGraph::isRemoved): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
228 この SceneGraph 削除フラグが立っているかどうか
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
229
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
230 (SceneGraph::realRemove): TODO
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
231 子を持つ SceneGraph が消された場合、
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
232 その子孫を全て削除するかどうか。まあ削除するのかな。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
233
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
234 (SceneGraph::realRemove): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
235 Cerium System で呼ばれる。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
236 remove flag の立った SceneGraph を削除する。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
237 parentやbrother、next は繋ぎ直す。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
238
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
239 * SceneGraphRoot.cpp (SceneGraphRoot::addNext): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
240 sg_available_list に追加していく
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
241 木の操作が要らないアクセスの際にはこっちの方がいい。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
242
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
243 (SceneGraphRoot::setSceneData): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
244 Cerium に SceneGraph の tree を渡す。Cerium はこの tree を辿って
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
245 処理を行う
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
246
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
247 (SceneGraphRoot::createFromXMLfile): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
248 xml file を指定して、そこから SceneGraph を生成し、
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
249 sg_src に格納する。ユーザはこの SceneGraph を直接は扱えない。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
250 以下に示す createSceneGraph の、読み込み元データとして保存しておく。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
251
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
252 (SceneGraphRoot::createSceneGraph): add
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
253 オリジナルの SceneGraph を clone してユーザに返す。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
254 この SceneGraph をユーザが操作する。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
255
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
256 * SceneGraphRoot.h (class SceneGraphRoot): new variables
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
257 sg_src, sg_exec_list, sg_draw_list, sg_available_list
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
258
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
259 * addfile (SceneGraphRoot.cpp)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
260 SceneGraph を管理するクラス、ってところか。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
261 Root ってのは SceneGraph という名前からすると
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
262 一番親と思われそうで微妙です。変えるかも。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 191
diff changeset
263
191
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
264 2009-01-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
265
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
266 * Joystick.cpp: TODO
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
267 使用している Joystick が
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
268
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
269 1. PS3 コントローラ
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
270 2. PS2 コントローラにUSB変換をかましたやつ
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
271
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
272 によってボタンの番号配置が違うので
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
273 そこを自動的に取得して割り振りたい
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
274
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
275 SDL_JoystickName() で名前取れるんだけど
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
276 全部共通なのかなー。「PS3って文字列があるか否か」でわけてもいいけど
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
277
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
278 * Joystick.cpp: fix
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
279 コントローラボタンの番号を PS3 コントローラに合わせました。
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
280
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
281 - 参考
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
282 PS3 Linux SDLでプログラミング -コントローラを使う-
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
283 http://yun.cup.com/ps3sdl007.html
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
284
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
285 アナログスティックの方はまだです
5e3b0405a44b fix Joystick Button
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 188
diff changeset
286
188
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
287 2009-01-08 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
288
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
289 * spe/DrawSpanRenew.cpp (DrawSpanRenew::run): fix
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
290 next_spack を free() していたが、do-while の最初で
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
291 next_spack = NULL とかやっている。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
292 DrawSpan だと、free するのは free_spack ってやつなので
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
293 問題なかったが、なぜここは free(next_spack) とかやってるのか。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
294 というわけで、next_spack,spack 両方用の
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
295 free_spack1, free_spack2 を生成して、これを free させることに。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
296 これで、ようやくまともに動くようになった。けど微妙です。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
297 遅いですね。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
298
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
299 * addFile : DrawSpanRenew.cpp
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
300 DrawSpan の再起動 ver。
06f39635a9b0 メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
gongo@localhost.localdomain
parents: 180
diff changeset
301
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
302 2008-12-22 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
303
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
304 * fix
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
305 charles を Fedora 10 に上げて、コンパイラが新しくなったせいか、
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
306 以下のような warning が出始めた
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
307
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
308 warning: deprecated conversion from string constant to 'char *'
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
309
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
310 まあよくわからんが、例えば
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
311
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
312 char *str = "hoge";
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
313
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
314 みたいな所だとこの warning が出る。これを
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
315
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
316 const char *str = "hoge";
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
317
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
318 にすると消えた。
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
319 以後こういう形に統一しろよ的なやつなのかな。
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
320
179
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
321 2008-12-19 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
322
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
323 * viewer.cpp (Viewer::run_draw): fix
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
324 startx, endx に対して、start_y, end_y って名前は統一されてなくて
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
325 わかりづらいので、starty, endy に変更
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 179
diff changeset
326
179
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
327 * main.cpp (init): fix
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
328 bpp (BitsPerPixel) の値がデフォルトで 0 になっていた。
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
329 今のレンダリング方式では 32 がデフォルトなので、間違ってた。
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
330 今まで気づかなかったのは
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
331
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
332 1. SDL_SetVideoMode に bpp = 0 で渡される
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
333 2. SDL が開発・実行環境に合わせて bpp を設定
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
334 3. 今までそれが 32 になってた
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
335
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
336 しかし、ゲーム班の環境では bpp = 16 になってしまったため、
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
337 その次の bitmap の allocate の時に
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
338 screen->pitch*height = 16*width*height となり、
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
339 DrawSpan では 32 のつもりで書き込んでいたため領域外への
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
340 メモリ書き込み->エラー
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
341
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
342 ゲーム班ありがとう
434846aef389 SDL_SetVideoMode に渡す bpp が 0 になってた (環境依存になってしまう)
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 178
diff changeset
343
176
gongo@localhost.localdomain
parents: 175
diff changeset
344 2008-12-16 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
gongo@localhost.localdomain
parents: 175
diff changeset
345
178
5d1b82945b0d add makeTapestry in SceneGraph.cpp
gongo@localhost.localdomain
parents: 177
diff changeset
346 * SceneGraph.cpp (makeTapestry): add
5d1b82945b0d add makeTapestry in SceneGraph.cpp
gongo@localhost.localdomain
parents: 177
diff changeset
347 SceneGraph::get_data にあったけど、ごちゃごちゃしてたので
5d1b82945b0d add makeTapestry in SceneGraph.cpp
gongo@localhost.localdomain
parents: 177
diff changeset
348 関数として生成
5d1b82945b0d add makeTapestry in SceneGraph.cpp
gongo@localhost.localdomain
parents: 177
diff changeset
349
177
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
350 * viewer.cpp (Viewer::run_init, Viewer::run_draw): fix
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
351 * spe/DrawSpan.cpp (DrawSpan::zRow_init): delete
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
352
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
353 Z Buffering に使う zRow は DrawSpan で毎回生成、初期化するのではなく、
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
354 PPE で生成、初期化を行っておき、DrawSpan に add_inData で
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
355 DMA で渡すという方法に変更。速度的にはほんのちょっとしか(ry
e742053c4c87 zRow の生成、初期化の変更
gongo@localhost.localdomain
parents: 176
diff changeset
356
176
gongo@localhost.localdomain
parents: 175
diff changeset
357 * spe/CreateSpan.cpp (CreateSpan::half_triangle): fix
gongo@localhost.localdomain
parents: 175
diff changeset
358 getScale に渡す tex_width,tex_height を修正。
gongo@localhost.localdomain
parents: 175
diff changeset
359 比較にそのまま tex_width, tex_height を使うと、
gongo@localhost.localdomain
parents: 175
diff changeset
360 Span が持つテクスチャが全体の一部分だったとしても
gongo@localhost.localdomain
parents: 175
diff changeset
361 比較結果で縮小が行われてしまうため。
gongo@localhost.localdomain
parents: 175
diff changeset
362
gongo@localhost.localdomain
parents: 175
diff changeset
363 - 例
gongo@localhost.localdomain
parents: 175
diff changeset
364 span->length_x = 32;
gongo@localhost.localdomain
parents: 175
diff changeset
365 tex_width = 128;
gongo@localhost.localdomain
parents: 175
diff changeset
366 tex_x_len = (span->tex_x2 - span->tex_x1) = (0.5 - 0.3) = 0.2;
gongo@localhost.localdomain
parents: 175
diff changeset
367
gongo@localhost.localdomain
parents: 175
diff changeset
368 今までの処理だと、span->length_x < tex_width の結果により
gongo@localhost.localdomain
parents: 175
diff changeset
369 縮小されたテクスチャを使うことになる。
gongo@localhost.localdomain
parents: 175
diff changeset
370 しかし、実際に Span が使う Texture の長さは
gongo@localhost.localdomain
parents: 175
diff changeset
371
gongo@localhost.localdomain
parents: 175
diff changeset
372 tex_width*tex_x_len = 24
gongo@localhost.localdomain
parents: 175
diff changeset
373
gongo@localhost.localdomain
parents: 175
diff changeset
374 なので、縮小を行う必要は無い
gongo@localhost.localdomain
parents: 175
diff changeset
375
gongo@localhost.localdomain
parents: 175
diff changeset
376
175
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
377 2008-12-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
378
176
gongo@localhost.localdomain
parents: 175
diff changeset
379 * SceneGraph.cpp (SceneGraph::get_data): Todo
gongo@localhost.localdomain
parents: 175
diff changeset
380 テクスチャの縦横が 8 の倍数でなければ弾く処理を入れる。
gongo@localhost.localdomain
parents: 175
diff changeset
381
175
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
382 * spe/DrawSpan.cpp (DrawSpan::run): Todo
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
383 テクスチャの座標計算と、そこから取得できる Tile の DMA を
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
384 一スレッドで処理しているのでそれを分けないといけない
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
385
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
386 * spe/CreateSpan.cpp (getTapestry): Add
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
387 (getScale): Add
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
388
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
389 * memo: 雑記
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
390 ようやくこいつに ChangeLog を加えました。
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
391 なんか emacs で「C-x 4 a」とかすると、ChangeLog の entry が
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
392 加えれられるんだけど、上の階層のを探しにいくので、TaskManager/ のに
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
393 加えようとしてたわけさ。まあそういう仕様なんだけど。
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
394 で、だからといって不可能ってわけじゃないから書けばよかったんだが。
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
395
3cc5f0000e29 add file "ChangeLog"
gongo@localhost.localdomain
parents:
diff changeset
396 要するに、これからはちゃんと書いていこうと思います。