diff --git a/Java/scripts/md5 b/Java/scripts/md5 index d4665a7..22a476c 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -1,4 +1,4 @@ -build.sh:55f0208b07ba384f45009d6f92fe88fe - -clean.sh:96ce35f2d2dcb555421e00a6afda23ca - -commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - -jar.sh:56f9b7c6dc8e85f28ffefe9ce82b1f07 - +build.sh:55f0208b07ba384f45009d6f92fe88fe *- +clean.sh:96ce35f2d2dcb555421e00a6afda23ca *- +commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 *- +jar.sh:56f9b7c6dc8e85f28ffefe9ce82b1f07 *- diff --git a/maps/world1.map b/maps/world1.map index ccb095b..0b245c2 100644 Binary files a/maps/world1.map and b/maps/world1.map differ diff --git a/src/sig/DrawLoop.java b/src/sig/DrawLoop.java index a169878..6cd4247 100644 --- a/src/sig/DrawLoop.java +++ b/src/sig/DrawLoop.java @@ -67,7 +67,7 @@ public class DrawLoop { } else if (oldAlpha==255) { Draw(p,index,(sprite.getBi_array()[Y*sprite.getWidth()+X]&0x00FFFFFF)|(alpha<<24),true); - } { + } else { Draw(p,index,(sprite.getBi_array()[Y*sprite.getWidth()+X]&0x00FFFFFF)|((int)((alpha/255d)*oldAlpha)<<24),true); } } diff --git a/src/sig/engine/Object.java b/src/sig/engine/Object.java index 60a915b..ac86c42 100644 --- a/src/sig/engine/Object.java +++ b/src/sig/engine/Object.java @@ -71,7 +71,6 @@ public abstract class Object implements GameEntity{ } /** - * * @param scrolled -1 is UP, 1 is DOWN * @return */ diff --git a/src/sig/objects/LevelRenderer.java b/src/sig/objects/LevelRenderer.java index 2ad71d2..53f2c61 100644 --- a/src/sig/objects/LevelRenderer.java +++ b/src/sig/objects/LevelRenderer.java @@ -9,6 +9,7 @@ import sig.engine.Object; import sig.engine.Panel; import sig.engine.Sprite; import sig.map.Map; +import sig.map.Maps; import sig.map.Tile; public class LevelRenderer extends Object{ @@ -35,6 +36,15 @@ public class LevelRenderer extends Object{ boolean left_mb = MouseHeld(MouseEvent.BUTTON1); boolean middle_mb = MouseHeld(MouseEvent.BUTTON2); boolean right_mb = MouseHeld(MouseEvent.BUTTON3); + + if(left_mb){ + RabiClone.CURRENT_MAP.ModifyTile(RabiClone.p.highlightedSquare.getX(), RabiClone.p.highlightedSquare.getY(), selectedTile); + } + if(KeyHeld(KeyEvent.VK_CONTROL)&&KeyHeld(KeyEvent.VK_S)){ + System.out.println("Saving map"); + Map.SaveMap(RabiClone.CURRENT_MAP); + System.out.println("Map saved"); + } } @Override @@ -42,7 +52,7 @@ public class LevelRenderer extends Object{ int up = scrolled==MouseScrollValue.UP?1:0; int down = scrolled==MouseScrollValue.DOWN?1:0; int tempIndex = selectedTile.ordinal()+down-up; - int selectedIndex = tempIndex<0?Tile.values().length-Math.abs(tempIndex):tempIndex%Tile.values().length; + int selectedIndex = tempIndex<0?Tile.values().length-1:tempIndex%Tile.values().length; selectedTile = Tile.values()[selectedIndex]; System.out.println(selectedTile); } diff --git a/utils/filelist b/utils/filelist index 95ad5ff..8a9f471 100644 --- a/utils/filelist +++ b/utils/filelist @@ -1,5 +1,5 @@ .coauthors +.updateDirectories define.sh main.sh search.sh -.updateDirectories diff --git a/utils/md5 b/utils/md5 index a47b4f9..529ddc7 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,4 +1,4 @@ -define.sh:883c4033be11b6d1268b852beada5463 - -main.sh:663ac9bb9ee46eb8cd1d717e8eb5e486 - -search.sh:2a471ffc3daa12f96157e613873f589d - -.updateDirectories:0ede00461e947494545e694040787b3f - +.updateDirectories:0ede00461e947494545e694040787b3f *- +define.sh:883c4033be11b6d1268b852beada5463 *- +main.sh:663ac9bb9ee46eb8cd1d717e8eb5e486 *- +search.sh:2a471ffc3daa12f96157e613873f589d *-