From c5db6a25857c6ea3906d16e915acbe010617ae67 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Tue, 28 Jun 2022 16:00:23 -0500 Subject: [PATCH 1/2] Remove extraneous old alpha calculations now that proper transparency is incorporated. Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 --- src/sig/DrawLoop.java | 16 ++++++++-------- src/sig/engine/objects/Object.java | 6 +++--- src/sig/objects/BunnyGirls.java | 1 + src/sig/objects/EditorRenderer.java | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/sig/DrawLoop.java b/src/sig/DrawLoop.java index 56aa752..ee28ca5 100644 --- a/src/sig/DrawLoop.java +++ b/src/sig/DrawLoop.java @@ -80,7 +80,7 @@ public class DrawLoop { } else { x=x2-1;y=y2-1;xe=x1; } - Draw(canvas,y*RabiClone.BASE_WIDTH+x,col,alpha); + Draw(canvas,y*RabiClone.BASE_WIDTH+x,col); while (x=0) { @@ -101,7 +101,7 @@ public class DrawLoop { } else { x=x2-1;y=y2-1;ye=y1; } - Draw(canvas,y*RabiClone.BASE_WIDTH+x,col,alpha); + Draw(canvas,y*RabiClone.BASE_WIDTH+x,col); while (y=0&&y+yy>=0&&x+xx=p.length) { continue; } else { - Draw(p,index,(col==PaletteColor.NORMAL)?sprite.getBi_array()[Y*sprite.getCanvasWidth()+X]:(byte)col.ordinal(),alpha); + Draw(p,index,(col==PaletteColor.NORMAL)?sprite.getBi_array()[Y*sprite.getCanvasWidth()+X]:(byte)col.ordinal()); } } } @@ -201,7 +201,7 @@ public class DrawLoop { } } - public static void Draw(byte[] canvas,int index, byte col, Alpha alpha) { - canvas[index]=(byte)(((int)(col)&0xff)+(alpha.ordinal()*(32))); + public static void Draw(byte[] canvas,int index, byte col) { + canvas[index]=(byte)((int)(col)&0xff); } } diff --git a/src/sig/engine/objects/Object.java b/src/sig/engine/objects/Object.java index 7094f88..d175c5b 100644 --- a/src/sig/engine/objects/Object.java +++ b/src/sig/engine/objects/Object.java @@ -64,7 +64,7 @@ public abstract class Object implements GameEntity{ this.spr = spr; } public Alpha getTransparency() { - return getTransparency(); + return transparency; } public void setTransparency(Alpha alpha) { this.transparency=alpha; @@ -75,8 +75,8 @@ public abstract class Object implements GameEntity{ public void drawOverlay(byte[] p) { } - protected void Draw(byte[] canvas, int index, PaletteColor col, Alpha alpha) { - DrawLoop.Draw(canvas, index, (byte)col.ordinal(), alpha); + protected void Draw(byte[] canvas, int index, PaletteColor col) { + DrawLoop.Draw(canvas, index, (byte)col.ordinal()); } protected void Draw_Rect(byte[] p,PaletteColor col,double x,double y,double w,double h) { diff --git a/src/sig/objects/BunnyGirls.java b/src/sig/objects/BunnyGirls.java index ab7b0e3..b53c8b8 100644 --- a/src/sig/objects/BunnyGirls.java +++ b/src/sig/objects/BunnyGirls.java @@ -1,5 +1,6 @@ package sig.objects; +import sig.engine.Alpha; import sig.engine.AnimatedSprite; import sig.engine.Panel; import sig.engine.Rectangle; diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index 42584ed..6eb79a8 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -194,7 +194,7 @@ public class EditorRenderer extends LevelRenderer{ if (index<0||index>=p.length) { continue; } - Draw(p,index,PaletteColor.BLACK,Alpha.ALPHA0); + Draw(p,index,PaletteColor.BLACK); } } if (y%Tile.TILE_SCREEN_COUNT_Y==0) { @@ -205,7 +205,7 @@ public class EditorRenderer extends LevelRenderer{ if (xpos<0||xpos>=Map.MAP_WIDTH||ypos<0||ypos>=Map.MAP_HEIGHT||index<0||index>=p.length) { continue; } - Draw(p,index,PaletteColor.BLACK,Alpha.ALPHA0); + Draw(p,index,PaletteColor.BLACK); } } } From 9b11375c513b8587d45df8a6d801b828ee516b83 Mon Sep 17 00:00:00 2001 From: unknown <45179536+r3cp3ct@users.noreply.github.com> Date: Wed, 29 Jun 2022 09:03:47 +0300 Subject: [PATCH 2/2] New underwater color palette Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 --- UpdatedPallete.css | 66 +++++++++++++++++++++++++++ maps/world1.map | Bin 299092 -> 299096 bytes mulfok32-1x.png-palette.gpl.gpl | 69 +++++++++++++++++++++++++++++ src/sig/DrawLoop.java | 9 +++- src/sig/engine/Panel.java | 49 +++++++++++++------- src/sig/objects/LevelRenderer.java | 13 ++++-- src/sig/objects/Player.java | 1 - 7 files changed, 187 insertions(+), 20 deletions(-) create mode 100644 UpdatedPallete.css create mode 100644 mulfok32-1x.png-palette.gpl.gpl diff --git a/UpdatedPallete.css b/UpdatedPallete.css new file mode 100644 index 0000000..408368f --- /dev/null +++ b/UpdatedPallete.css @@ -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) } \ No newline at end of file diff --git a/maps/world1.map b/maps/world1.map index b2264029001aef375331a4161b7da0c8d48b2c3e..204393b4bf963f907306d03fdf3f504f38d2cd98 100644 GIT binary patch delta 40 tcmcbzKFEiB9v7)7VEOki>4XW(IDkl>RCVg(>p1OWUj2p@tU57N!>FEiB9v7)7SDOki>4mf(|Tkl<4QVnqPj