Project

General

Profile

« Previous | Next » 

Revision b7ae2292

Added by Leszek Koltunski 2 months ago

Beginnings of color unification

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
65 65
  public static final int MODE_ICON = 0;
66 66
  public static final int MODE_NORM = 1;
67 67

  
68
  public static final int COLOR_YELLOW   = 0xffffff00;
69
  public static final int COLOR_WHITE    = 0xffffffff;
70
  public static final int COLOR_BLUE     = 0xff0000ff;
71
  public static final int COLOR_GREEN    = 0xff00bb00;
72
  public static final int COLOR_RED      = 0xff990000;
73
  public static final int COLOR_ORANGE   = 0xffff6200;
74
  public static final int COLOR_GREY     = 0xff727c7b;
75
  public static final int COLOR_VIOLET   = 0xff7700bb;
76 68
  public static final int COLOR_STROKE   = 0xff000000;
77 69
  public static final int COLOR_INTERNAL = 0xff000000;
78 70

  
79
  public static final int COLOR_RED_TET  = 0xffff1111;
80
  public static final int COLOR_BLUE_TET = 0xff4444ff;
81

  
82 71
  private static final int DEFAULT_TEXTURE_HEIGHT = 256;
83 72
  private static final int DEFAULT_TEXTURE_ROWS   = 8;
84 73

  
src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
23 23
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator;
24 24
import org.distorted.objectlib.metadata.ListObjects;
25 25
import org.distorted.objectlib.helpers.ObjectShape;
26
import org.distorted.objectlib.shape.ShapeColors;
26 27
import org.distorted.objectlib.shape.ShapeHexahedron;
27 28
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
28 29

  
......
37 38
           new Static3D(0,0,1)
38 39
         };
39 40

  
40
  private static final int[] FACE_COLORS = new int[] { COLOR_WHITE };
41
  private static final int[] FACE_COLORS = new int[] { ShapeColors.COLOR_WHITE };
41 42
  private static final float[] MIRROR_VEC = { 0.10f, 0.25f, 0.40f };
42 43

  
43 44
  private int[][] mEdges;
src/main/java/org/distorted/objectlib/objects/TwistyMirrorJing.java
23 23
import org.distorted.objectlib.metadata.ListObjects;
24 24
import org.distorted.objectlib.metadata.Metadata;
25 25
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator;
26
import org.distorted.objectlib.shape.ShapeColors;
26 27
import org.distorted.objectlib.shape.ShapeTetrahedron;
27 28
import org.distorted.objectlib.touchcontrol.TouchControlTetrahedron;
28 29

  
......
40 41

  
41 42
  private static final float JING_F = 0.48f;
42 43

  
43
  private static final int[] FACE_COLORS = new int[] { COLOR_WHITE };
44
  private static final int[] FACE_COLORS = new int[] { ShapeColors.COLOR_WHITE };
44 45
  private static final float[] MIRROR_VEC = { 0.06f, 0.07f, 0.08f };
45 46

  
46 47
  private int[][] mEdges;
src/main/java/org/distorted/objectlib/objects/TwistyMirrorPyraminx.java
22 22
import org.distorted.objectlib.main.InitAssets;
23 23
import org.distorted.objectlib.metadata.ListObjects;
24 24
import org.distorted.objectlib.metadata.Metadata;
25
import org.distorted.objectlib.shape.ShapeColors;
25 26
import org.distorted.objectlib.shape.ShapeTetrahedron;
26 27
import org.distorted.objectlib.touchcontrol.TouchControlTetrahedron;
27 28

  
......
37 38
      new Static3D(-SQ6/3, SQ3/3,     0),
38 39
    };
39 40

  
40
  private static final int[] FACE_COLORS = new int[] { COLOR_WHITE };
41
  private static final int[] FACE_COLORS = new int[] { ShapeColors.COLOR_WHITE };
41 42
  private static final float[] MIRROR_VEC = { 0.06f, 0.15f, 0.02f };
42 43

  
43 44
  private int[][] mEdges;
src/main/java/org/distorted/objectlib/objects/TwistyMirrorSkewb.java
23 23
import org.distorted.objectlib.metadata.ListObjects;
24 24
import org.distorted.objectlib.metadata.Metadata;
25 25
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator;
26
import org.distorted.objectlib.shape.ShapeColors;
26 27
import org.distorted.objectlib.shape.ShapeHexahedron;
27 28
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
28 29

  
......
38 39
           new Static3D( SQ3/3,-SQ3/3,-SQ3/3)
39 40
         };
40 41

  
41
  private static final int[] FACE_COLORS = new int[] { COLOR_WHITE };
42
  private static final int[] FACE_COLORS = new int[] { ShapeColors.COLOR_WHITE };
42 43
  private static final float[] MIRROR_VEC = { 0.10f, 0.15f, 0.20f };
43 44

  
44 45
  private int[][] mEdges;
src/main/java/org/distorted/objectlib/shape/ShapeColors.java
1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2024 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

  
10
package org.distorted.objectlib.shape;
11

  
12
///////////////////////////////////////////////////////////////////////////////////////////////////
13

  
14
public class ShapeColors {
15
  public static final int COLOR_YELLOW   = 0xffffff00;
16
  public static final int COLOR_WHITE    = 0xffffffff;
17
  public static final int COLOR_BLUE     = 0xff0000ff;
18
  public static final int COLOR_GREEN    = 0xff00bb00;
19
  public static final int COLOR_RED      = 0xff990000;
20
  public static final int COLOR_ORANGE   = 0xffff6200;
21
  public static final int COLOR_GREY     = 0xff727c7b;
22
  public static final int COLOR_VIOLET   = 0xff7700bb;
23

  
24
  public static final int COLOR_BALL_1 = 0xffcc0000;
25
  public static final int COLOR_BALL_2 = 0xffcb2d6a;
26
  public static final int COLOR_BALL_3 = 0xff4ec9d0;
27
  public static final int COLOR_BALL_4 = 0xff4678ab;
28
  public static final int COLOR_BALL_5 = 0xff057350;
29
  public static final int COLOR_BALL_6 = 0xff48ad62;
30
  public static final int COLOR_BALL_7 = 0xffedca54;
31
  public static final int COLOR_BALL_8 = 0xfffe5740;
32

  
33
  public static final int MINX_LGREEN = 0xff53aa00;
34
  public static final int MINX_PINK   = 0xfffd7ab7;
35
  public static final int MINX_SANDY  = 0xffefd48b;
36
  public static final int MINX_LBLUE  = 0xff00a2d7;
37
  public static final int MINX_ORANGE = 0xffff6200;
38
  public static final int MINX_VIOLET = 0xff7d59a4;
39
  public static final int MINX_DGREEN = 0xff007a47;
40
  public static final int MINX_DRED   = 0xffbd0000;
41
  public static final int MINX_DBLUE  = 0xff1a29b2;
42
  public static final int MINX_DYELLOW= 0xffffc400;
43
  public static final int MINX_WHITE  = 0xffffffff;
44
  public static final int MINX_GREY   = 0xff727c7b;
45

  
46
  public static final int COLOR_ICO_1 = 0xffe191b4;
47
  public static final int COLOR_ICO_2 = 0xff604c94;
48
  public static final int COLOR_ICO_3 = 0xff472258;
49
  public static final int COLOR_ICO_4 = 0xff591218;
50
  public static final int COLOR_ICO_5 = 0xffba365b;
51
  public static final int COLOR_ICO_6 = 0xffe4d031;
52
  public static final int COLOR_ICO_7 = 0xff4a90d5;
53
  public static final int COLOR_ICO_8 = 0xff0e28a3;
54
  public static final int COLOR_ICO_9 = 0xff566069;
55
  public static final int COLOR_ICO_10= 0xffd7660a;
56
  public static final int COLOR_ICO_11= 0xff092d2b;
57
  public static final int COLOR_ICO_12= 0xff034d3e;
58
  public static final int COLOR_ICO_13= 0xff1a7516;
59
  public static final int COLOR_ICO_14= 0xff58b6be;
60
  public static final int COLOR_ICO_15= 0xffd3c49b;
61
  public static final int COLOR_ICO_16= 0xff0a1662;
62
  public static final int COLOR_ICO_17= 0xffa21a1c;
63
  public static final int COLOR_ICO_18= 0xffe1b410;
64
  public static final int COLOR_ICO_19= 0xffdadeea;
65
  public static final int COLOR_ICO_20= 0xff0157ba;
66
}
src/main/java/org/distorted/objectlib/shape/ShapeDiamond.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeDiamond extends TwistyObject
21 23
{
22 24
  public static final Static4D DEFAULT_ROT = new Static4D(-0.09848663f, 0.6306283f, 0.67572856f, 0.36878252f);
23 25

  
24
  public static final int COLOR_BALL_1 = 0xffcc0000;
25
  public static final int COLOR_BALL_2 = 0xffcb2d6a;
26
  public static final int COLOR_BALL_3 = 0xff4ec9d0;
27
  public static final int COLOR_BALL_4 = 0xff4678ab;
28
  public static final int COLOR_BALL_5 = 0xff057350;
29
  public static final int COLOR_BALL_6 = 0xff48ad62;
30
  public static final int COLOR_BALL_7 = 0xffedca54;
31
  public static final int COLOR_BALL_8 = 0xfffe5740;
32

  
33 26
  public static final int[] FACE_COLORS = new int[]
34 27
         {
35 28
           COLOR_BALL_1, COLOR_BALL_1,
src/main/java/org/distorted/objectlib/shape/ShapeDodecahedron.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeDodecahedron extends TwistyObject
21 23
{
22 24
  public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
23 25

  
24
  static final int MINX_LGREEN = 0xff53aa00;
25
  static final int MINX_PINK   = 0xfffd7ab7;
26
  static final int MINX_SANDY  = 0xffefd48b;
27
  static final int MINX_LBLUE  = 0xff00a2d7;
28
  static final int MINX_ORANGE = 0xffff6200;
29
  static final int MINX_VIOLET = 0xff7d59a4;
30
  static final int MINX_DGREEN = 0xff007a47;
31
  static final int MINX_DRED   = 0xffbd0000;
32
  static final int MINX_DBLUE  = 0xff1a29b2;
33
  static final int MINX_DYELLOW= 0xffffc400;
34
  static final int MINX_WHITE  = 0xffffffff;
35
  static final int MINX_GREY   = 0xff727c7b;
36

  
37 26
  public static final int[] FACE_COLORS = new int[]
38 27
         {
39 28
           MINX_DYELLOW, MINX_ORANGE , MINX_DRED  , MINX_SANDY,
src/main/java/org/distorted/objectlib/shape/ShapeHexahedron.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeHexahedron extends TwistyObject
src/main/java/org/distorted/objectlib/shape/ShapeIcosahedron.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeIcosahedron extends TwistyObject
21 23
{
22 24
  public static final Static4D DEFAULT_ROT = new Static4D(0.44624275f, -0.38811404f, 0.12537706f, 0.79656535f);
23 25

  
24
  static final int ICO_1 = 0xffe191b4;
25
  static final int ICO_2 = 0xff604c94;
26
  static final int ICO_3 = 0xff472258;
27
  static final int ICO_4 = 0xff591218;
28
  static final int ICO_5 = 0xffba365b;
29
  static final int ICO_6 = 0xffe4d031;
30
  static final int ICO_7 = 0xff4a90d5;
31
  static final int ICO_8 = 0xff0e28a3;
32
  static final int ICO_9 = 0xff566069;
33
  static final int ICO_10= 0xffd7660a;
34
  static final int ICO_11= 0xff092d2b;
35
  static final int ICO_12= 0xff034d3e;
36
  static final int ICO_13= 0xff1a7516;
37
  static final int ICO_14= 0xff58b6be;
38
  static final int ICO_15= 0xffd3c49b;
39
  static final int ICO_16= 0xff0a1662;
40
  static final int ICO_17= 0xffa21a1c;
41
  static final int ICO_18= 0xffe1b410;
42
  static final int ICO_19= 0xffdadeea;
43
  static final int ICO_20= 0xff0157ba;
44

  
45 26
  public static final int[] FACE_COLORS = new int[]
46 27
         {
47
           ICO_1 , ICO_2 , ICO_3 , ICO_4 , ICO_5 ,
48
           ICO_6 , ICO_7 , ICO_8 , ICO_9 , ICO_10,
49
           ICO_11, ICO_12, ICO_13, ICO_14, ICO_15,
50
           ICO_16, ICO_17, ICO_18, ICO_19, ICO_20,
28
           COLOR_ICO_1 , COLOR_ICO_2 , COLOR_ICO_3 , COLOR_ICO_4 , COLOR_ICO_5 ,
29
           COLOR_ICO_6 , COLOR_ICO_7 , COLOR_ICO_8 , COLOR_ICO_9 , COLOR_ICO_10,
30
           COLOR_ICO_11, COLOR_ICO_12, COLOR_ICO_13, COLOR_ICO_14, COLOR_ICO_15,
31
           COLOR_ICO_16, COLOR_ICO_17, COLOR_ICO_18, COLOR_ICO_19, COLOR_ICO_20,
51 32
         };
52 33

  
53 34
  public static final int NUM_FACES = 20;
src/main/java/org/distorted/objectlib/shape/ShapeOctahedron.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeOctahedron extends TwistyObject
src/main/java/org/distorted/objectlib/shape/ShapeTetrahedron.java
15 15
import org.distorted.objectlib.main.TwistyObject;
16 16
import org.distorted.objectlib.metadata.Metadata;
17 17

  
18
import static org.distorted.objectlib.shape.ShapeColors.*;
19

  
18 20
///////////////////////////////////////////////////////////////////////////////////////////////////
19 21

  
20 22
public abstract class ShapeTetrahedron extends TwistyObject
......
23 25

  
24 26
  public static final int[] FACE_COLORS = new int[]
25 27
         {
26
           COLOR_GREEN   , COLOR_YELLOW,
27
           COLOR_BLUE_TET, COLOR_RED_TET
28
           COLOR_GREEN, COLOR_YELLOW,
29
           COLOR_BLUE , COLOR_RED
28 30
         };
29 31

  
30 32
  public static final int NUM_FACES = 4;

Also available in: Unified diff