Examples of Tile


Examples of csa.jmom.tiles.Tile

    private csa.jmom.map.MapPanel mapPanel;
    // End of variables declaration//GEN-END:variables

    private void addTile(TileData tile, String tileFile,  int x, int y)
    {
        Tile t = currentLayer.addTile(tile, tileFile, x, y);
        mapPanel.setMapChanged(true);
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.videosharing.encode.ImageTileEncoder.Tile

    public void run() {

        while (!Thread.interrupted()) {
            try {
                Tile tile = (Tile) objectInput.readObject();

                if (tile.imageData.length != 0) {
                    BufferedImage subImage = ImageIO
                        .read(new ByteArrayInputStream(tile.imageData));
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.core.Tile

    // (endY +2 for high tiles, could be done more properly)

    // Draw this map layer
    for (int y = startY, gy = (startY + 1) * tsize.height; y < endY; y++, gy += tsize.height) {
      for (int x = startX, gx = startX * tsize.width; x < endX; x++, gx += tsize.width) {
        Tile tile = layer.getTileAt(x, y);

        if (tile != null) {
          if (layer instanceof SelectionLayer) {
            gridPoly.translate(gx, gy);
            g2d.fillPolygon(gridPoly);
            gridPoly.translate(-gx, -gy);
            // paintEdge(g, layer, gx, gy);
          } else {
            tile.draw(g2d, gx, gy, zoom);
          }
        }
      }
    }
  }
View Full Code Here

Examples of de.zelosfan.timedstrategy.world.Tile

    }

    public void onClickTile(int x, int y) {
        if (x < 0 || y < 0 || x > world.WORLD_WIDTH - 1 || y > world.WORLD_HEIGHT - 1) return;

        Tile tile = world.tiles[x][y];

        if (tile instanceof Building && tile.entity == null) {
            ((BuildingTyp) tile.tiletyp).onClick((Building) tile);
        }
View Full Code Here

Examples of edu.byu.ece.rapidSmith.device.Tile

*/
public class BrowseDevice{

  public static void run(Device dev, WireEnumerator we){
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    Tile t = null;
    while(true){
      System.out.println("Commands: ");
      System.out.println(" 1: Get wire connections in tile");
      System.out.println(" 2: Check if wire is a PIP wire");
      System.out.println(" 3: List RouteThrough wires");
      System.out.println(" 4: Follow wire connections");
      System.out.println(" 5: List primitives of a tile");
      System.out.println(" 6: Get tile of a primitive site");
      System.out.println(" 7: Exit");
      try {
        Integer cmd = Integer.parseInt(br.readLine().trim());
        switch(cmd){
          case 1:
            System.out.println("Enter tile name: ");
            t = dev.getTile(br.readLine().trim());
            System.out.println("Choosen Tile: " + t.getName());

            System.out.println("Enter wire name: ");
            String wire = br.readLine().trim();
            WireConnection[] wires = t.getWireConnections(we.getWireEnum(wire));
            if(wires != null){
              for(WireConnection w : wires){
                System.out.println("  " + w.toString(we));
              }
            }
            else{
              System.out.println(" No Connections");
            }
            break;
          case 2:
            System.out.println("Enter wire name:");
            String wire1 = br.readLine().trim();
            System.out.println("isPIP? " + we.isPIPWire(wire1));
            break;
          case 3:
            System.out.println("PIPRouteThroughs");
            for(WireConnection w : dev.getRouteThroughMap().keySet()){
              System.out.println("  " + w.toString(we) + " " + dev.getRouteThroughMap().get(w).toString(we));
            }
            break;
          case 4:
            System.out.println("Enter start tile name: ");
            t = dev.getTile(br.readLine().trim());
            System.out.println("Choosen start tile: " + t.getName());

            System.out.println("Enter start wire name: ");
            String startWire = br.readLine().trim();
           
            while(true){
              if(t.getWireHashMap() == null){
                System.out.println("This tile has no wires.");
                break;
              }
              if(t.getWireConnections(we.getWireEnum(startWire)) == null){
                System.out.println("This wire has no connections, it may be a sink");
                break;
              }
              WireConnection[] wireConnections = t.getWireConnections(we.getWireEnum(startWire));
              System.out.println(t.getName() + " " + startWire + ":");
              for (int i = 0; i < wireConnections.length; i++) {
                System.out.println("  " + i + ". " + wireConnections[i].getTile(t) +" " + we.getWireName(wireConnections[i].getWire()));
              }
              System.out.print("Choose a wire: ");
              int ndx;
              try{
                ndx = Integer.parseInt(br.readLine().trim());
                t = wireConnections[ndx].getTile(t);
                startWire = we.getWireName(wireConnections[ndx].getWire());
              }
              catch(Exception e){
                System.out.println("Did not understand, try again.");
                continue;
              }
             
            }
            break;
          case 5:
            System.out.println("Enter tile name: ");
            t = dev.getTile(br.readLine().trim());
            System.out.println("Choosen Tile: " + t.getName());

            if(t.getPrimitiveSites() == null){
              System.out.println(t.getName() + " has no primitive sites.");
            }
            else{
              for(PrimitiveSite p : t.getPrimitiveSites()){
                System.out.println("  " + p.getName());
              }
            }
         
            break;
View Full Code Here

Examples of fm.ak.client.object.Tile

                Local.Self.mx)) + "," + ((int) ((double) ((double)
                (y - centerY) / 40) + Local.Self.my));
        //String xy = ((Main.mousex - centerx) / 40) + Local.Self.mx + "," + ((Main.mousey - centery) / 40) + Local.Self.my;

        if (Local.TilesByPos.containsKey(xy)) {
            Tile t = marked = Local.TilesByPos.get(xy);

            marker.position(t.onscreenx(), t.onscreeny(), marker.w(), marker.h());
        } else {
            marked = null;
            marker.position(-40, -40, marker.w(), marker.h());
        }
    }
View Full Code Here

Examples of game.level.tile.Tile

  public boolean isSolidTile(int xa, int ya, int x, int y) {
    if (level == null) {
      return false;
    }
    Tile lastTile = level.getTile((this.x + x) >> 3, (this.y + y) >> 3);
    Tile newTile = level.getTile((this.x + x + xa) >> 3,
        (this.y + y + ya) >> 3);
    if (!lastTile.equals(newTile) && newTile.isSolid()) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of iryrwarosh.Tile

     
    });

    Creature creature = world.creature(startX + lookX, startY + lookY);
    Item item = world.item(startX + lookX, startY + lookY);
    Tile tile = world.tile(startX + lookX, startY + lookY);
   
    String text = null;
   
    if (creature != null && player.canSee(creature))
      text = creature.description();
    else if (item != null)
      text = item.name();
    else
      text = tile.description();

    if (text.length() > 78)
      text = text.substring(0, 75) + "...";
   
    terminal.write(text, 1, 23);
View Full Code Here

Examples of map.Tile

     
      Tile[][] tiles = new Tile[charset[0].length][charset[0][0].length];
     
      for(int y = 0; y < charset[0].length; y++){
        for(int x = 0; x < charset[0][y].length; x++){
          tiles[y][x] = new Tile(charset[3][y][x], charset[2][y][x], charset[1][y][x], 0, false, false);
        }
      }
     
      maps[i] = new Map(name, tiles);
     
View Full Code Here

Examples of net.sertik.genesia.entity.Tile

      @Override
      public void handle(MouseEvent me) {
        if (me.isStillSincePress()) {
          Coords mapCoords = calcMapCoordFromMouseCoord(me.getX(), me.getY());
          if (renderer.getWorld().isPointWithinBounds(mapCoords)) {
            Tile selectedTile = renderer.getWorld().getTile(mapCoords.getX(), mapCoords.getY());
            if (selectedTileInfo.getTileNode() == null
                    || !selectedTile.equals(selectedTileInfo.getTileNode().getTile())) {
              selectedTileInfo.setTileNode(renderer.getResourceLoader().createResource(selectedTile));
            }
          }
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.