New underwater color palette

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
unknown 2 years ago
parent c5db6a2585
commit 9b11375c51
  1. 66
      UpdatedPallete.css
  2. BIN
      maps/world1.map
  3. 69
      mulfok32-1x.png-palette.gpl.gpl
  4. 7
      src/sig/DrawLoop.java
  5. 49
      src/sig/engine/Panel.java
  6. 7
      src/sig/objects/LevelRenderer.java
  7. 1
      src/sig/objects/Player.java

@ -0,0 +1,66 @@
/* 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(123, 84, 128) }
.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) }
.Untitled { color: rgb(87, 157, 147) }
.Untitled { color: rgb(101, 188, 141) }
.Untitled { color: rgb(158, 206, 137) }
.Untitled { color: rgb(232, 222, 162) }
.Untitled { color: rgb(234, 173, 149) }
.Untitled { color: rgb(215, 99, 136) }
.Untitled { color: rgb(188, 74, 134) }
.Untitled { color: rgb(151, 58, 131) }
.Untitled { color: rgb(109, 50, 130) }
.Untitled { color: rgb(58, 45, 123) }
.Untitled { color: rgb(92, 50, 127) }
.Untitled { color: rgb(125, 65, 129) }
.Untitled { color: rgb(153, 88, 134) }
.Untitled { color: rgb(185, 113, 146) }
.Untitled { color: rgb(222, 164, 171) }
.Untitled { color: rgb(234, 182, 240) }
.Untitled { color: rgb(219, 137, 208) }
.Untitled { color: rgb(195, 109, 190) }
.Untitled { color: rgb(125, 71, 156) }
.Untitled { color: rgb(39, 47, 113) }
.Untitled { color: rgb(72, 62, 128) }
.Untitled { color: rgb(115, 88, 154) }
.Untitled { color: rgb(153, 128, 175) }
.Untitled { color: rgb(200, 177, 206) }
.Untitled { color: rgb(234, 236, 251) }
.Untitled { color: rgb(161, 210, 251) }
.Untitled { color: rgb(131, 172, 251) }
.Untitled { color: rgb(102, 124, 246) }
.Untitled { color: rgb(123, 101, 235) }
.Untitled { color: rgb(122, 82, 203) }
.Untitled { color: rgb(116, 60, 176) }
.Untitled { color: rgb(75, 50, 151) }

Binary file not shown.

@ -0,0 +1,69 @@
GIMP Palette
Name: mulfok32-1x.png palette.gpl
Columns: 16
#
91 166 117 Untitled
107 201 108 Untitled
171 221 100 Untitled
252 239 141 Untitled
255 184 121 Untitled
234 98 98 Untitled
204 66 94 Untitled
163 40 88 Untitled
117 23 86 Untitled
57 9 71 Untitled
97 24 81 Untitled
135 53 85 Untitled
166 85 95 Untitled
201 115 115 Untitled
242 174 153 Untitled
255 195 242 Untitled
238 143 203 Untitled
212 110 179 Untitled
135 62 132 Untitled
31 16 42 Untitled
74 48 82 Untitled
123 84 128 Untitled
166 133 159 Untitled
217 189 200 Untitled
255 255 255 Untitled
174 226 255 Untitled
141 183 255 Untitled
109 128 250 Untitled
132 101 236 Untitled
131 77 196 Untitled
125 45 160 Untitled
78 24 124 Untitled
255 0 255 Untitled
87 157 147 Untitled
101 188 141 Untitled
158 206 137 Untitled
232 222 162 Untitled
234 173 149 Untitled
215 99 136 Untitled
188 74 134 Untitled
151 58 131 Untitled
109 50 130 Untitled
58 45 123 Untitled
92 50 127 Untitled
125 65 129 Untitled
153 88 134 Untitled
185 113 146 Untitled
222 164 171 Untitled
234 182 240 Untitled
219 137 208 Untitled
195 109 190 Untitled
125 71 156 Untitled
39 47 113 Untitled
72 62 128 Untitled
115 88 154 Untitled
153 128 175 Untitled
200 177 206 Untitled
234 236 251 Untitled
161 210 251 Untitled
131 172 251 Untitled
102 124 246 Untitled
123 101 235 Untitled
122 82 203 Untitled
116 60 176 Untitled
75 50 151 Untitled

@ -201,7 +201,14 @@ public class DrawLoop {
}
}
public static void Draw(byte[] canvas,int index, byte col) {
if(RabiClone.player!=null && RabiClone.player.isUnderwater()){
canvas[index]=(byte)((int)(col+33)&0xff);
}
else{
canvas[index]=(byte)((int)(col)&0xff);
}
}
}

@ -81,6 +81,39 @@ public class Panel extends JPanel implements Runnable,KeyListener {
(byte)0x83,(byte)0x4d,(byte)0xc4,
(byte)0x7d,(byte)0x2d,(byte)0xa0,
(byte)0x4e,(byte)0x18,(byte)0x7c,
(byte)255,(byte) 0,(byte)255,
(byte) 87,(byte)157,(byte)147,
(byte)101,(byte)188,(byte)141,
(byte)158,(byte)206,(byte)137,
(byte)232,(byte)222,(byte)162,
(byte)234,(byte)173,(byte)149,
(byte)215,(byte) 99,(byte)136,
(byte)188,(byte) 74,(byte)134,
(byte)151,(byte) 58,(byte)131,
(byte)109,(byte) 50,(byte)130,
(byte) 58,(byte) 45,(byte)123,
(byte) 92,(byte) 50,(byte)127,
(byte)125,(byte) 65,(byte)129,
(byte)153,(byte) 88,(byte)134,
(byte)185,(byte)113,(byte)146,
(byte)222,(byte)164,(byte)171,
(byte)234,(byte)182,(byte)240,
(byte)219,(byte)137,(byte)208,
(byte)195,(byte)109,(byte)190,
(byte)125,(byte) 71,(byte)156,
(byte) 39,(byte) 47,(byte)113,
(byte) 72,(byte) 62,(byte)128,
(byte)115,(byte) 88,(byte)154,
(byte)153,(byte)128,(byte)175,
(byte)200,(byte)177,(byte)206,
(byte)234,(byte)236,(byte)251,
(byte)161,(byte)210,(byte)251,
(byte)131,(byte)172,(byte)251,
(byte)102,(byte)124,(byte)246,
(byte)123,(byte)101,(byte)235,
(byte)122,(byte) 82,(byte)203,
(byte)116,(byte) 60,(byte)176,
(byte) 75,(byte) 50,(byte)151,
};
public Panel(JFrame f) {
@ -159,21 +192,7 @@ public class Panel extends JPanel implements Runnable,KeyListener {
* @return color model
*/
protected static ColorModel getCustomPalette(){
byte[] finalPalette = new byte[32*4*8];
for (int i=0;i<8;i++) {
int k=0;
for (int j=0;j<generalPalette.length;j+=3) {
finalPalette[(32*4*i)+k+0]=(byte)generalPalette[j+0];
finalPalette[(32*4*i)+k+1]=(byte)generalPalette[j+1];
finalPalette[(32*4*i)+k+2]=(byte)generalPalette[j+2];
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,32);
return model;
return new IndexColorModel(8,65,generalPalette,0,false,32);
}
/**

@ -168,12 +168,19 @@ public class LevelRenderer extends Object{
for (int y=0;y<RabiClone.BASE_HEIGHT;y++) {
for (int x=0;x<RabiClone.BASE_WIDTH;x++) {
int index = y*RabiClone.BASE_WIDTH+x;
if(RabiClone.player!=null && RabiClone.player.isUnderwater()){
p[index] = (byte)(targetBackground.getPixels()[
((y+(int)(getY()*targetBackground.getScrollSpeed()))%targetBackground.getHeight())*targetBackground.getWidth()+((x+(int)(getX()*targetBackground.getScrollSpeed()))%targetBackground.getWidth())
]+33);
}
else{
p[index] = targetBackground.getPixels()[
((y+(int)(getY()*targetBackground.getScrollSpeed()))%targetBackground.getHeight())*targetBackground.getWidth()+((x+(int)(getX()*targetBackground.getScrollSpeed()))%targetBackground.getWidth())
];
}
}
}
}
@Override
public void drawOverlay(byte[] p) {

@ -70,7 +70,6 @@ public class Player extends PhysicsObject{
setJumpVelocity_UseDefaultStrategy();
setMaxJumpCount_UseDefaultStrategy();
setGravity_UseDefaultStrategy();
setTransparency(Alpha.ALPHA128);
}
@Override

Loading…
Cancel
Save