equal
deleted
inserted
replaced
113 { |
113 { |
114 for (TInt i = 0; i < aMaxQuads; i++) |
114 for (TInt i = 0; i < aMaxQuads; i++) |
115 { |
115 { |
116 TQuad* q = new (ELeave)TQuad; |
116 TQuad* q = new (ELeave)TQuad; |
117 q->iItemIndex = -1; |
117 q->iItemIndex = -1; |
118 iQuads.Append(q); |
118 CleanupStack::PushL(q); |
|
119 iQuads.AppendL(q); |
|
120 CleanupStack::Pop(q); |
119 } |
121 } |
120 CreateGround(); |
122 CreateGround(); |
121 } |
123 } |
122 |
124 |
123 // ----------------------------------------------------------------------------- |
125 // ----------------------------------------------------------------------------- |
198 // ----------------------------------------------------------------------------- |
200 // ----------------------------------------------------------------------------- |
199 // CHgVgScrollBar::SortQuads |
201 // CHgVgScrollBar::SortQuads |
200 // Sorts quads from iQuads to iSortedQuads. |
202 // Sorts quads from iQuads to iSortedQuads. |
201 // ----------------------------------------------------------------------------- |
203 // ----------------------------------------------------------------------------- |
202 // |
204 // |
203 void CHgVgMediaWallRenderer::SortQuads(TInt aNumQuads) |
205 void CHgVgMediaWallRenderer::SortQuadsL(TInt aNumQuads) |
204 { |
206 { |
205 |
207 |
206 iSortedQuads.Reset(); |
208 iSortedQuads.Reset(); |
207 |
209 |
208 for(TInt i = 0; i < aNumQuads; ++i) |
210 for(TInt i = 0; i < aNumQuads; ++i) |
209 { |
211 { |
210 iSortedQuads.Append(iQuads[i]); |
212 iSortedQuads.AppendL(iQuads[i]); |
211 } |
213 } |
212 |
214 |
213 for (TInt i = 1; i < aNumQuads; i++) |
215 for (TInt i = 1; i < aNumQuads; i++) |
214 { |
216 { |
215 for (int j = 0; j < aNumQuads; j++) |
217 for (int j = 0; j < aNumQuads; j++) |
221 iSortedQuads[i] = q2; |
223 iSortedQuads[i] = q2; |
222 iSortedQuads[j] = q1; |
224 iSortedQuads[j] = q1; |
223 } |
225 } |
224 } |
226 } |
225 } |
227 } |
226 |
228 } |
227 } |
|
228 |
|
229 |
229 |
230 // ----------------------------------------------------------------------------- |
230 // ----------------------------------------------------------------------------- |
231 // CHgVgScrollBar::GetItemIndex |
231 // CHgVgScrollBar::GetItemIndex |
232 // gets index of the item under pointer position. |
232 // gets index of the item under pointer position. |
233 // ----------------------------------------------------------------------------- |
233 // ----------------------------------------------------------------------------- |
1060 // draw reflections |
1060 // draw reflections |
1061 |
1061 |
1062 TransformQuads(itemsOnScreen, |
1062 TransformQuads(itemsOnScreen, |
1063 iReflectionsEnabled, iFov, aOpeningAnimationType); |
1063 iReflectionsEnabled, iFov, aOpeningAnimationType); |
1064 |
1064 |
1065 SortQuads(itemsOnScreen); |
1065 TRAP_IGNORE( SortQuadsL(itemsOnScreen); ) |
1066 |
1066 |
1067 if (iReflectionsEnabled) |
1067 if (iReflectionsEnabled) |
1068 DrawQuads(ETrue); |
1068 DrawQuads(ETrue); |
1069 |
1069 |
1070 DrawGround(iRect.Width(), iRect.Height() / KGroundHeightFactor); |
1070 DrawGround(iRect.Width(), iRect.Height() / KGroundHeightFactor); |