Final palette adjustments and implementations
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
0fb9bf3d52
commit
bf52570b25
BIN
1x.gif
BIN
1x.gif
Binary file not shown.
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 566 B |
34
gamepalette.css
Normal file
34
gamepalette.css
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/* Generated with GIMP Palette Export */
|
||||||
|
.Untitled { color: rgb(91, 166, 117) }
|
||||||
|
.Untitled { color: rgb(107, 201, 108) }
|
||||||
|
.Untitled { color: rgb(171, 221, 100) }
|
||||||
|
.Untitled { color: rgb(252, 239, 141) }
|
||||||
|
.Untitled { color: rgb(255, 184, 121) }
|
||||||
|
.Untitled { color: rgb(234, 98, 98) }
|
||||||
|
.Untitled { color: rgb(204, 66, 94) }
|
||||||
|
.Untitled { color: rgb(163, 40, 88) }
|
||||||
|
.Untitled { color: rgb(117, 23, 86) }
|
||||||
|
.Untitled { color: rgb(57, 9, 71) }
|
||||||
|
.Untitled { color: rgb(97, 24, 81) }
|
||||||
|
.Untitled { color: rgb(135, 53, 85) }
|
||||||
|
.Untitled { color: rgb(166, 85, 95) }
|
||||||
|
.Untitled { color: rgb(201, 115, 115) }
|
||||||
|
.Untitled { color: rgb(242, 174, 153) }
|
||||||
|
.Untitled { color: rgb(255, 195, 242) }
|
||||||
|
.Untitled { color: rgb(238, 143, 203) }
|
||||||
|
.Untitled { color: rgb(212, 110, 179) }
|
||||||
|
.Untitled { color: rgb(135, 62, 132) }
|
||||||
|
.Untitled { color: rgb(31, 16, 42) }
|
||||||
|
.Untitled { color: rgb(74, 48, 82) }
|
||||||
|
.Untitled { color: rgb(74, 48, 82) }
|
||||||
|
.Untitled { color: rgb(166, 133, 159) }
|
||||||
|
.Untitled { color: rgb(217, 189, 200) }
|
||||||
|
.Untitled { color: rgb(255, 255, 255) }
|
||||||
|
.Untitled { color: rgb(174, 226, 255) }
|
||||||
|
.Untitled { color: rgb(141, 183, 255) }
|
||||||
|
.Untitled { color: rgb(109, 128, 250) }
|
||||||
|
.Untitled { color: rgb(132, 101, 236) }
|
||||||
|
.Untitled { color: rgb(131, 77, 196) }
|
||||||
|
.Untitled { color: rgb(125, 45, 160) }
|
||||||
|
.Untitled { color: rgb(78, 24, 124) }
|
||||||
|
.Untitled { color: rgb(255, 0, 255) }
|
@ -37,7 +37,7 @@ public class DrawLoop {
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
int index = (Y-(int)yOffset+(int)y)*RabiClone.BASE_WIDTH+X-(int)xOffset+(int)x;
|
int index = (Y-(int)yOffset+(int)y)*RabiClone.BASE_WIDTH+X-(int)xOffset+(int)x;
|
||||||
if (index<0||index>=p.length||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
if (index<0||index>=p.length||sprite.getBi_array()[Y*sprite.getWidth()+X]==32||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],Alpha.ALPHA0);
|
Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],Alpha.ALPHA0);
|
||||||
@ -56,7 +56,7 @@ public class DrawLoop {
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
int index = (Y-(int)yOffset+(int)y)*RabiClone.BASE_WIDTH+X-(int)xOffset+(int)x;
|
int index = (Y-(int)yOffset+(int)y)*RabiClone.BASE_WIDTH+X-(int)xOffset+(int)x;
|
||||||
if (index<0||index>=p.length||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
if (index<0||index>=p.length||sprite.getBi_array()[Y*sprite.getWidth()+X]==32||p[index]==sprite.getBi_array()[Y*sprite.getWidth()+X]) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],alpha);
|
Draw(p,index,sprite.getBi_array()[Y*sprite.getWidth()+X],alpha);
|
||||||
|
@ -144,6 +144,7 @@ public class Panel extends JPanel implements Runnable,KeyListener {
|
|||||||
for(int i=0; i<RabiClone.OBJ.size();i++){
|
for(int i=0; i<RabiClone.OBJ.size();i++){
|
||||||
Object current_obj = RabiClone.OBJ.get(i);
|
Object current_obj = RabiClone.OBJ.get(i);
|
||||||
current_obj.MouseScrolled(MouseScrollValue.getValue(e.getWheelRotation()));
|
current_obj.MouseScrolled(MouseScrollValue.getValue(e.getWheelRotation()));
|
||||||
|
//System.out.println(Panel.col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -162,15 +163,18 @@ public class Panel extends JPanel implements Runnable,KeyListener {
|
|||||||
protected static ColorModel getCustomPalette(){
|
protected static ColorModel getCustomPalette(){
|
||||||
byte[] finalPalette = new byte[32*4*8];
|
byte[] finalPalette = new byte[32*4*8];
|
||||||
for (int i=0;i<8;i++) {
|
for (int i=0;i<8;i++) {
|
||||||
|
int k=0;
|
||||||
for (int j=0;j<generalPalette.length;j+=3) {
|
for (int j=0;j<generalPalette.length;j+=3) {
|
||||||
finalPalette[(32*3*i)+j+0]=(byte)generalPalette[j+0];
|
finalPalette[(32*4*i)+k+0]=(byte)generalPalette[j+0];
|
||||||
finalPalette[(32*3*i)+j+1]=(byte)generalPalette[j+1];
|
finalPalette[(32*4*i)+k+1]=(byte)generalPalette[j+1];
|
||||||
finalPalette[(32*3*i)+j+2]=(byte)generalPalette[j+2];
|
finalPalette[(32*4*i)+k+2]=(byte)generalPalette[j+2];
|
||||||
finalPalette[(32*3*i)+j+3]=(byte)(256-(i*(256/8)));
|
finalPalette[(32*4*i)+k+3]=(byte)(255-(i*(256/8)));
|
||||||
|
//System.out.println("Color "+(k/4)+": "+finalPalette[(32*4*i)+k+0]+"/"+finalPalette[(32*4*i)+k+1]+"/"+finalPalette[(32*4*i)+k+2]+"/"+finalPalette[(32*4*i)+k+3]);
|
||||||
|
k+=4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexColorModel model = new IndexColorModel(8,256,finalPalette,0,true);
|
IndexColorModel model = new IndexColorModel(8,256,finalPalette,0,true,32);
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public enum Sprite{
|
|||||||
|
|
||||||
NANA(new File("..","3x.png")),
|
NANA(new File("..","3x.png")),
|
||||||
NANA_SMALL(new File("..","1x.gif")),
|
NANA_SMALL(new File("..","1x.gif")),
|
||||||
TILE_SHEET(new File("..","tiles.png")),
|
TILE_SHEET(new File("..","tiles.gif")),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user