Map Editing features

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
unknown 3 years ago
parent f9b0aadd30
commit 64a12df0b8
  1. 8
      Java/scripts/md5
  2. BIN
      maps/world1.map
  3. 2
      src/sig/DrawLoop.java
  4. 1
      src/sig/engine/Object.java
  5. 12
      src/sig/objects/LevelRenderer.java
  6. 2
      utils/filelist
  7. 8
      utils/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 *-

Binary file not shown.

@ -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);
}
}

@ -71,7 +71,6 @@ public abstract class Object implements GameEntity{
}
/**
*
* @param scrolled -1 is UP, 1 is DOWN
* @return
*/

@ -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);
}

@ -1,5 +1,5 @@
.coauthors
.updateDirectories
define.sh
main.sh
search.sh
.updateDirectories

@ -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 *-

Loading…
Cancel
Save