jace/src/main/java/jace/core/Palette.java
Brendan Robert 0ccb63558f A lot of things have been deactivated to sever the link to the old Swing UI. Indicators, namely, have been commented out in many places. Ultimately the emulator is wholly unusable in this state.
The video rendering was re-written to use writableImages and is displaying (something) but keyboard input and configurations are broken so nothing much happens after the inital boot.  Basically the underlying part to make this show up in JavaFX is starting to take shape.
2015-02-03 00:55:25 -06:00

57 lines
2.2 KiB
Java

/*
* Copyright (C) 2012 Brendan Robert (BLuRry) brendan.robert@gmail.com.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package jace.core;
import javafx.scene.paint.Color;
/**
* Fixed color palette -- only used for the older DHGR renderer (the new NTSC renderer uses its own YUV conversion and builds its own palettes)
* @author Brendan Robert (BLuRry) brendan.robert@gmail.com
*/
public class Palette {
private Palette() {}
static public final int BLACK = 0;
static public final int VIOLET = 3;
static public final int BLUE = 6;
static public final int ORANGE = 9;
static public final int GREEN = 12;
static public final int WHITE = 15;
static public Color[] color;
static {
color = new Color[16];
color[ 0] = new Color( 0, 0, 0, 1);
color[ 1] = new Color(208, 0, 48, 1);
color[ 2] = new Color( 0, 0,128, 1);
color[ 3] = new Color(255, 0,255, 1);
color[ 4] = new Color( 0,128, 0, 1);
color[ 5] = new Color(128,128,128, 1);
color[ 6] = new Color( 0, 0,255, 1);
color[ 7] = new Color( 96,160,255, 1);
color[ 8] = new Color(128, 80, 0, 1);
color[ 9] = new Color(255,128, 0, 1);
color[10] = new Color(192,192,192, 1);
color[11] = new Color(255,144,128, 1);
color[12] = new Color( 0,255, 0, 1);
color[13] = new Color(255,255, 0, 1);
color[14] = new Color( 64,255,144, 1);
color[15] = new Color(255,255,255, 1);
}
}