annotate TaskManager/Test/test_render/ChangeLog @ 236:dd24efac4519 draft

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