Project

General

Profile

Download (16.7 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyIvy.java @ 57ef6378

1 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20
package org.distorted.objectlib.objects;
21
22 c9c71c3f Leszek Koltunski
import static org.distorted.objectlib.touchcontrol.TouchControl.TYPE_SPLIT_CORNER;
23
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_HEXAHEDRON;
24 29b82486 Leszek Koltunski
25 82eb152a Leszek Koltunski
import java.io.InputStream;
26 29b82486 Leszek Koltunski
27
import org.distorted.library.type.Static3D;
28
import org.distorted.library.type.Static4D;
29
30 c9c71c3f Leszek Koltunski
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
31 8592461c Leszek Koltunski
import org.distorted.objectlib.main.ObjectControl;
32 8005e762 Leszek Koltunski
import org.distorted.objectlib.main.ObjectType;
33 198c5bf0 Leszek Koltunski
import org.distorted.objectlib.helpers.ObjectShape;
34
import org.distorted.objectlib.helpers.ObjectSticker;
35
import org.distorted.objectlib.helpers.ScrambleState;
36 386af988 Leszek Koltunski
import org.distorted.objectlib.main.ShapeHexahedron;
37 29b82486 Leszek Koltunski
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39
40 386af988 Leszek Koltunski
public class TwistyIvy extends ShapeHexahedron
41 29b82486 Leszek Koltunski
{
42
  static final Static3D[] ROT_AXIS = new Static3D[]
43
         {
44
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
45
           new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
46
           new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
47
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
48
         };
49
50
  private static final int NUM_STICKERS = 2;
51
  public static final float IVY_D = 0.006f;
52
  private static final int  IVY_N = 8;
53
54
  private ScrambleState[] mStates;
55
  private int[] mBasicAngle;
56
  private Static4D[] mQuats;
57
  private float[][] mCuts;
58
  private int[][] mFaceMap;
59
  private ObjectSticker[] mStickers;
60
61
///////////////////////////////////////////////////////////////////////////////////////////////////
62
63 64c209f5 Leszek Koltunski
  public TwistyIvy(int[] numL, Static4D quat, Static3D move, float scale, InputStream stream)
64 29b82486 Leszek Koltunski
    {
65 64c209f5 Leszek Koltunski
    super(numL, numL[0], quat, move, scale, stream);
66 29b82486 Leszek Koltunski
    }
67
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69
70 f9a81f52 Leszek Koltunski
  public ScrambleState[] getScrambleStates()
71 29b82486 Leszek Koltunski
    {
72
    if( mStates==null )
73
      {
74
      int[] tmp = {0,-1,0, 0,1,0, 1,-1,0, 1,1,0 };
75
76
      mStates = new ScrambleState[]
77
        {
78
        new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} )
79
        };
80
      }
81
82
    return mStates;
83
    }
84
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86
87
  private void initializeQuats()
88
    {
89
    mQuats = new Static4D[]
90
         {
91
         new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
92
         new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
93
         new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
94
         new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
95
96
         new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
97
         new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
98
         new Static4D(  0.5f,  0.5f, -0.5f,  0.5f ),
99
         new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
100
         new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
101
         new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
102
         new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
103
         new Static4D(  0.5f, -0.5f, -0.5f, -0.5f )
104
         };
105
    }
106
107
///////////////////////////////////////////////////////////////////////////////////////////////////
108
109 7b832206 Leszek Koltunski
  public int[] getSolvedQuats(int cubit, int[] numLayers)
110 29b82486 Leszek Koltunski
    {
111
    if( mQuats==null ) initializeQuats();
112
    int status = retCubitSolvedStatus(cubit,numLayers);
113 c9c71c3f Leszek Koltunski
    return status<0 ? null : buildSolvedQuats(TouchControlHexahedron.FACE_AXIS[status],mQuats);
114 29b82486 Leszek Koltunski
    }
115
116
///////////////////////////////////////////////////////////////////////////////////////////////////
117
118 1bb09f88 Leszek Koltunski
  public Static4D[] getQuats()
119 29b82486 Leszek Koltunski
    {
120
    if( mQuats==null ) initializeQuats();
121
    return mQuats;
122
    }
123
124
///////////////////////////////////////////////////////////////////////////////////////////////////
125
126 59c20632 Leszek Koltunski
  public int getSolvedFunctionIndex()
127 29b82486 Leszek Koltunski
    {
128
    return 0;
129
    }
130
131
///////////////////////////////////////////////////////////////////////////////////////////////////
132
133 1bb09f88 Leszek Koltunski
  public int getNumStickerTypes(int[] numLayers)
134 29b82486 Leszek Koltunski
    {
135
    return NUM_STICKERS;
136
    }
137
138
///////////////////////////////////////////////////////////////////////////////////////////////////
139
140 7bbfc84f Leszek Koltunski
  public float[][] getCuts(int[] numLayers)
141 29b82486 Leszek Koltunski
    {
142
    if( mCuts==null )
143
      {
144
      float[] cut = new float[] {0.0f};
145
      mCuts = new float[][] { cut,cut,cut,cut };
146
      }
147
148
    return mCuts;
149
    }
150
151
///////////////////////////////////////////////////////////////////////////////////////////////////
152
153 59c20632 Leszek Koltunski
  public boolean[][] getLayerRotatable(int[] numLayers)
154 29b82486 Leszek Koltunski
    {
155 59c20632 Leszek Koltunski
    int numAxis = ROT_AXIS.length;
156
    boolean[][] layerRotatable = new boolean[numAxis][];
157 a57e6870 Leszek Koltunski
158 59c20632 Leszek Koltunski
    for(int i=0; i<numAxis; i++)
159
      {
160
      layerRotatable[i] = new boolean[numLayers[i]];
161
      for(int j=0; j<numLayers[i]; j++) layerRotatable[i][j] = true;
162 29b82486 Leszek Koltunski
      }
163 59c20632 Leszek Koltunski
164
    return layerRotatable;
165
    }
166
167
///////////////////////////////////////////////////////////////////////////////////////////////////
168
169
  public int getMovementType()
170
    {
171 c9c71c3f Leszek Koltunski
    return TC_HEXAHEDRON;
172 59c20632 Leszek Koltunski
    }
173
174
///////////////////////////////////////////////////////////////////////////////////////////////////
175
176
  public int getMovementSplit()
177
    {
178
    return TYPE_SPLIT_CORNER;
179
    }
180
181
///////////////////////////////////////////////////////////////////////////////////////////////////
182
183
  public int[][][] getEnabled()
184
    {
185
    return new int[][][]
186
      {
187
          {{0},{3},{3},{0}},
188
          {{2},{1},{1},{2}},
189
          {{2},{0},{0},{2}},
190
          {{1},{3},{3},{1}},
191
          {{0},{0},{1},{1}},
192
          {{2},{2},{3},{3}},
193
      };
194
    }
195
196
///////////////////////////////////////////////////////////////////////////////////////////////////
197
198
  public float[] getDist3D(int[] numLayers)
199
    {
200
    return null;
201 29b82486 Leszek Koltunski
    }
202
203
///////////////////////////////////////////////////////////////////////////////////////////////////
204
205 a75ae1ee Leszek Koltunski
  public int getNumCubitFaces()
206 29b82486 Leszek Koltunski
    {
207
    return 6;
208
    }
209
210
///////////////////////////////////////////////////////////////////////////////////////////////////
211
212 7b832206 Leszek Koltunski
  public float[][] getCubitPositions(int[] numLayers)
213 29b82486 Leszek Koltunski
    {
214 a57e6870 Leszek Koltunski
    final float DIST_CORNER = numLayers[0]-1;
215
    final float DIST_CENTER = numLayers[0]-1;
216 29b82486 Leszek Koltunski
217
    final float[][] CENTERS = new float[10][];
218
219
    CENTERS[0] = new float[] { DIST_CORNER, DIST_CORNER, DIST_CORNER };
220
    CENTERS[1] = new float[] {-DIST_CORNER, DIST_CORNER,-DIST_CORNER };
221
    CENTERS[2] = new float[] {-DIST_CORNER,-DIST_CORNER, DIST_CORNER };
222
    CENTERS[3] = new float[] { DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
223
    CENTERS[4] = new float[] { DIST_CENTER,           0,           0 };
224
    CENTERS[5] = new float[] {-DIST_CENTER,           0,           0 };
225
    CENTERS[6] = new float[] {           0, DIST_CENTER,           0 };
226
    CENTERS[7] = new float[] {           0,-DIST_CENTER,           0 };
227
    CENTERS[8] = new float[] {           0,           0, DIST_CENTER };
228
    CENTERS[9] = new float[] {           0,           0,-DIST_CENTER };
229
230
    return CENTERS;
231
    }
232
233
///////////////////////////////////////////////////////////////////////////////////////////////////
234
235 e30c522a Leszek Koltunski
  public ObjectShape getObjectShape(int variant)
236 29b82486 Leszek Koltunski
    {
237
    if( variant==0 )
238
      {
239
      final float angle = (float)Math.PI/(2*IVY_N);
240 57ef6378 Leszek Koltunski
      final float CORR  = 1-2*IVY_D;
241 29b82486 Leszek Koltunski
242 57ef6378 Leszek Koltunski
      float[][] centers  = new float[][] { {-1.0f,-1.0f,-1.0f} };
243
      float[][] corners  = new float[][] { {0.05f,0.20f}, {0.04f,0.20f} };
244
      float[][] vertices = new float[3*(IVY_N+1)+4][3];
245 29b82486 Leszek Koltunski
      int[] cornerIndices= new int[3*(IVY_N+1)+4];
246
      int[] centerIndices= new int[3*(IVY_N+1)+4];
247
      int[][] vertIndices= new int[6][IVY_N+4];
248
      int[] bandIndices  = new int[] { 0,0,0,1,1,1 };
249
250
      float[][] bands =
251
        {
252
          {+0.015f,20,0.2f,0.5f,7,1,2},
253
          {-0.100f,20,0.2f,0.0f,2,1,2}
254
        };
255
256
      for(int i=0; i<3*(IVY_N+1); i++)
257
        {
258
        cornerIndices[i+4] = -1;
259
        centerIndices[i+4] = -1;
260
        }
261
262
      cornerIndices[0] = 1;
263
      cornerIndices[1] = 0;
264
      cornerIndices[2] = 0;
265
      cornerIndices[3] = 0;
266
267
      centerIndices[0] = 0;
268
      centerIndices[1] = 0;
269
      centerIndices[2] = 0;
270
      centerIndices[3] = 0;
271
272 57ef6378 Leszek Koltunski
      vertices[0][0] = 0;
273
      vertices[0][1] = 0;
274
      vertices[0][2] = 0;
275
      vertices[1][0] =-2;
276
      vertices[1][1] = 0;
277
      vertices[1][2] = 0;
278
      vertices[2][0] = 0;
279
      vertices[2][1] =-2;
280
      vertices[2][2] = 0;
281
      vertices[3][0] = 0;
282
      vertices[3][1] = 0;
283
      vertices[3][2] =-2;
284 29b82486 Leszek Koltunski
285
      vertIndices[0][0] = 2;
286
      vertIndices[0][1] = 0;
287
      vertIndices[0][2] = 1;
288
      vertIndices[3][0] = 2;
289
      vertIndices[3][1] = 0;
290
      vertIndices[3][2] = 1;
291
292
      vertIndices[1][0] = 3;
293
      vertIndices[1][1] = 0;
294
      vertIndices[1][2] = 2;
295
      vertIndices[4][0] = 3;
296
      vertIndices[4][1] = 0;
297
      vertIndices[4][2] = 2;
298
299
      vertIndices[2][0] = 1;
300
      vertIndices[2][1] = 0;
301
      vertIndices[2][2] = 3;
302
      vertIndices[5][0] = 1;
303
      vertIndices[5][1] = 0;
304
      vertIndices[5][2] = 3;
305
306
      int N1 = 4;
307
      int N2 = N1 + IVY_N + 1;
308
      int N3 = N2 + IVY_N + 1;
309
310
      for(int i=0; i<=IVY_N; i++)
311
        {
312 57ef6378 Leszek Koltunski
        float cos1 = (float)Math.cos((IVY_N-i)*angle);
313
        float sin1 = (float)Math.sin((IVY_N-i)*angle);
314
        float cos2 = (float)Math.cos((      i)*angle);
315
        float sin2 = (float)Math.sin((      i)*angle);
316 29b82486 Leszek Koltunski
317 57ef6378 Leszek Koltunski
        vertices[N1+i][0] = CORR*(2*cos1-1) - 1;
318
        vertices[N1+i][1] = CORR*(2*sin1-1) - 1;
319
        vertices[N1+i][2] = 0;
320 29b82486 Leszek Koltunski
321 57ef6378 Leszek Koltunski
        vertices[N2+i][0] = 0;
322
        vertices[N2+i][1] = CORR*(2*sin2-1) - 1;
323
        vertices[N2+i][2] = CORR*(2*cos2-1) - 1;
324 29b82486 Leszek Koltunski
325 57ef6378 Leszek Koltunski
        vertices[N3+i][0] = CORR*(2*cos2-1) - 1;
326
        vertices[N3+i][1] = 0;
327
        vertices[N3+i][2] = CORR*(2*sin2-1) - 1;
328 29b82486 Leszek Koltunski
329
        vertIndices[0][i+3] = N1 + i;
330
        vertIndices[1][i+3] = N2 + i;
331
        vertIndices[2][i+3] = N3 + i;
332
        vertIndices[3][i+3] = N1 + i;
333
        vertIndices[4][i+3] = N2 + i;
334
        vertIndices[5][i+3] = N3 + i;
335
        }
336
337 57ef6378 Leszek Koltunski
      float C = 1-SQ2/2;
338 29b82486 Leszek Koltunski
      float[] convexCenter = new float[] {-C,-C,-C};
339
      return new ObjectShape(vertices,vertIndices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), convexCenter);
340
      }
341
    else
342
      {
343
      final float angle = (float)Math.PI/(2*IVY_N);
344 57ef6378 Leszek Koltunski
      final float CORR  = 1-2*IVY_D;
345
      float[][] vertices = new float[2*IVY_N][3];
346 29b82486 Leszek Koltunski
      int[][] vert_indices = new int[2][2*IVY_N];
347
348
      int[] bandIndices= new int[] { 0,1 };
349
      int[] indexes    = new int[2*IVY_N];
350
      float[][] corners= new float[][] { {0.05f,0.20f} };
351
      float[][] centers= new float[][] { {-0.0f,-0.0f,-1.0f} };
352
353
      for(int i=0; i<IVY_N; i++)
354
        {
355 57ef6378 Leszek Koltunski
        float sin = (float)Math.sin(i*angle);
356
        float cos = (float)Math.cos(i*angle);
357 29b82486 Leszek Koltunski
358 57ef6378 Leszek Koltunski
        vertices[i      ][0] = CORR*(1-2*cos);
359
        vertices[i      ][1] = CORR*(1-2*sin);
360 29b82486 Leszek Koltunski
        vertices[i      ][2] = 0;
361 57ef6378 Leszek Koltunski
        vertices[i+IVY_N][0] = CORR*(2*cos-1);
362
        vertices[i+IVY_N][1] = CORR*(2*sin-1);
363 29b82486 Leszek Koltunski
        vertices[i+IVY_N][2] = 0;
364
        }
365
366
      for(int i=0; i<2*IVY_N; i++)
367
        {
368
        vert_indices[0][i] = i;
369
        vert_indices[1][i] = 2*IVY_N-1-i;
370
        }
371
372
      for(int i=0; i<2*IVY_N; i++)
373
        {
374
        indexes[i] = -1;
375
        }
376
      indexes[0] = indexes[IVY_N] = 0;
377
378
      float[][] bands =
379
        {
380
          {+0.03f,35,0.5f,0.5f,5,0,0},
381
          {+0.10f,45,0.5f,0.0f,2,0,0}
382
        };
383
384
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,indexes,centers,indexes,getNumCubitFaces(), null);
385
      }
386
    }
387
388
///////////////////////////////////////////////////////////////////////////////////////////////////
389
390 7b832206 Leszek Koltunski
  public Static4D getQuat(int cubit, int[] numLayers)
391 29b82486 Leszek Koltunski
    {
392
    if( mQuats==null ) initializeQuats();
393
394
    switch(cubit)
395
      {
396
      case  0: return mQuats[0];
397
      case  1: return mQuats[2];
398
      case  2: return mQuats[3];
399
      case  3: return mQuats[1];
400
401
      case  4: return mQuats[8];
402
      case  5: return mQuats[11];
403
      case  6: return mQuats[10];
404
      case  7: return mQuats[9];
405
      case  8: return mQuats[0];
406
      case  9: return mQuats[2];
407
      }
408
409
    return mQuats[0];
410
    }
411
412
///////////////////////////////////////////////////////////////////////////////////////////////////
413
414 e30c522a Leszek Koltunski
  public int getNumCubitVariants(int[] numLayers)
415 29b82486 Leszek Koltunski
    {
416
    return 2;
417
    }
418
419
///////////////////////////////////////////////////////////////////////////////////////////////////
420
421 e30c522a Leszek Koltunski
  public int getCubitVariant(int cubit, int[] numLayers)
422 29b82486 Leszek Koltunski
    {
423
    return cubit<4 ? 0:1;
424
    }
425
426
///////////////////////////////////////////////////////////////////////////////////////////////////
427
428 a75ae1ee Leszek Koltunski
  public int getVariantFaceColor(int variant, int face, int[] numLayers)
429
    {
430
    if( variant==0 ) return face<3 ? 0 : -1;
431
    else             return face<1 ? 1 : -1;
432
    }
433
434
///////////////////////////////////////////////////////////////////////////////////////////////////
435
436
  public int getCubitFaceColor(int cubit, int face, int[] numLayers)
437 29b82486 Leszek Koltunski
    {
438
    if( mFaceMap==null )
439
      {
440
      mFaceMap = new int[][]
441
         {
442 a75ae1ee Leszek Koltunski
           { 4, 0, 2, -1,-1,-1 },
443
           { 5, 1, 2, -1,-1,-1 },
444
           { 4, 1, 3, -1,-1,-1 },
445
           { 5, 0, 3, -1,-1,-1 },
446
447
           { 0, -1,-1,-1,-1,-1 },
448
           { 1, -1,-1,-1,-1,-1 },
449
           { 2, -1,-1,-1,-1,-1 },
450
           { 3, -1,-1,-1,-1,-1 },
451
           { 4, -1,-1,-1,-1,-1 },
452
           { 5, -1,-1,-1,-1,-1 },
453 29b82486 Leszek Koltunski
         };
454
      }
455
456 a75ae1ee Leszek Koltunski
    return mFaceMap[cubit][face];
457 29b82486 Leszek Koltunski
    }
458
459
///////////////////////////////////////////////////////////////////////////////////////////////////
460
461 1bb09f88 Leszek Koltunski
  public ObjectSticker retSticker(int sticker)
462 29b82486 Leszek Koltunski
    {
463
    if( mStickers==null )
464
      {
465
      float[][] STICKERS = new float[][] { { 0.29258922f, -0.5f, 0.29258922f, 0.29258922f, -0.5f, 0.29258922f }, { -0.5f, 0.5f, 0.5f, -0.5f } };
466
      mStickers = new ObjectSticker[NUM_STICKERS];
467
      float D = (float)(Math.PI/4);
468
      final float[][] angles = { { 0,0,D },{ D,D } };
469
      final float[][] radii  = { { 0,0.04f,0 },{ 0.06f,0.06f } };
470
      final float[] strokes = { 0.03f, 0.08f };
471 8592461c Leszek Koltunski
472
      if( ObjectControl.isInIconMode() )
473
        {
474
        float mult = 1.5f;
475
        strokes[0]*=mult;
476
        strokes[1]*=mult;
477
        }
478
479 29b82486 Leszek Koltunski
      for(int s=0; s<NUM_STICKERS; s++) mStickers[s] = new ObjectSticker(STICKERS[s], angles[s],radii[s],strokes[s]);
480
      }
481
482 1bb09f88 Leszek Koltunski
    return mStickers[sticker];
483
    }
484
485 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
486
// PUBLIC API
487
488
  public Static3D[] getRotationAxis()
489
    {
490
    return ROT_AXIS;
491
    }
492
493
///////////////////////////////////////////////////////////////////////////////////////////////////
494
495
  public int[] getBasicAngle()
496
    {
497
    if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
498
    return mBasicAngle;
499
    }
500
501 61aa85e4 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
502
503 a57e6870 Leszek Koltunski
  public ObjectType intGetObjectType(int[] numLayers)
504 61aa85e4 Leszek Koltunski
    {
505 8005e762 Leszek Koltunski
    return ObjectType.IVY_2;
506 61aa85e4 Leszek Koltunski
    }
507
508 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
509
510 e26eb4e7 Leszek Koltunski
  public String getObjectName()
511 29b82486 Leszek Koltunski
    {
512 e26eb4e7 Leszek Koltunski
    return "Ivy Cube";
513 29b82486 Leszek Koltunski
    }
514
515
///////////////////////////////////////////////////////////////////////////////////////////////////
516
517 e26eb4e7 Leszek Koltunski
  public String getInventor()
518 29b82486 Leszek Koltunski
    {
519 e26eb4e7 Leszek Koltunski
    return "Eitan Cher";
520 29b82486 Leszek Koltunski
    }
521
522 59c20632 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
523
524 e26eb4e7 Leszek Koltunski
  public int getYearOfInvention()
525 59c20632 Leszek Koltunski
    {
526
    return 2009;
527
    }
528
529 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
530
531 e26eb4e7 Leszek Koltunski
  public int getComplexity()
532 29b82486 Leszek Koltunski
    {
533
    return 1;
534
    }
535
}