42 quadsquare::camerapos = camvec;
47 vecTextureIndex::iterator
i = indices.begin();
48 vecTextureStar::iterator
k;
49 for (k = textures->begin(); k != textures->end(); i++, k++) {
51 unsigned int isize = (*i).q.size();
53 vertices->
Draw(
GFXTRI, isize, (*i).q.begin() );
59 for (k = textures->begin(); k != textures->end(); i++, j++, k++) {
60 if ( (*i).c.size() > 2 ) {
67 blendVertices->
EndMutate( (*i).c.size() );
131 void quadsquare::tri(
unsigned int aa,
139 #ifdef DONOTDRAWBLENDEDQUADS
140 if (ta == tb && tb == tc) {
141 indices[ta]->q.push_back( aa, bb, cc );
147 if ( !(ta == tb && tb == tc) ) {
148 if ( ( (*textures)[ta].blendDst ==
ZERO ) && ( (*textures)[tb].blendDst !=
ZERO ) )
150 else if ( ( (*textures)[ta].blendDst ==
ZERO ) && ( (*textures)[tc].blendDst !=
ZERO ) )
165 indices[tb].c.push_back3( cv );
171 indices[tb].c.push_back3( cv );
177 indices[tc].c.push_back3( cv );
181 indices[ta].q.push_back( aa, bb, cc );
194 unsigned int whole = 2<<cd.
Level;
202 max.i = cd.
xorg+whole;
204 max.k = cd.
zorg+whole;
205 vis = nonlinear_trans->
BoxInFrustum( min, max, quadsquare::camerapos );
217 for (i = 0; i < 4; i++, mask <<= 1) {
219 SetupCornerData( &q, cd, i );
220 Child[i]->RenderAux( q, vis );
230 #define V0 (Vertex[0].vertindex)
231 #define T0 ( Vertex[0].GetTex() )
232 #define V1 (Vertex[1].vertindex)
233 #define T1 ( Vertex[1].GetTex() )
234 #define V2 (cd.Verts[0].vertindex)
235 #define T2 ( cd.Verts[0].GetTex() )
236 #define V3 (Vertex[2].vertindex)
237 #define T3 ( Vertex[2].GetTex() )
238 #define V4 (cd.Verts[1].vertindex)
239 #define T4 ( cd.Verts[1].GetTex() )
240 #define V5 (Vertex[3].vertindex)
241 #define T5 ( Vertex[3].GetTex() )
242 #define V6 (cd.Verts[2].vertindex)
243 #define T6 ( cd.Verts[2].GetTex() )
244 #define V7 (Vertex[4].vertindex)
245 #define T7 ( Vertex[4].GetTex() )
246 #define V8 (cd.Verts[3].vertindex)
247 #define T8 ( cd.Verts[3].GetTex() )
249 if ( (
EnabledFlags&1) == 0 ) {tri( V0, T0, V8, T8, V2, T2 ); }
else {
250 if (flags&8) tri( V0, T0, V8, T8, V1, T1 );
251 if (flags&1) tri( V0, T0, V1, T1, V2, T2 );
253 if ( (
EnabledFlags&2) == 0 ) {tri( V0, T0, V2, T2, V4, T4 ); }
else {
254 if (flags&1) tri( V0, T0, V2, T2, V3, T3 );
255 if (flags&2) tri( V0, T0, V3, T3, V4, T4 );
257 if ( (
EnabledFlags&4) == 0 ) {tri( V0, T0, V4, T4, V6, T6 ); }
else {
258 if (flags&2) tri( V0, T0, V4, T4, V5, T5 );
259 if (flags&4) tri( V0, T0, V5, T5, V6, T6 );
261 if ( (
EnabledFlags&8) == 0 ) {tri( V0, T0, V6, T6, V8, T8 ); }
else {
262 if (flags&4) tri( V0, T0, V6, T6, V7, T7 );
263 if (flags&8) tri( V0, T0, V7, T7, V8, T8 );
307 int half = 1<<cd.
Level;