Package org.moparscape.msc.gs.model.landscape

Examples of org.moparscape.msc.gs.model.landscape.MutableTileValue


    if (o.getDoorDef().getDoorType() != 1) {
      return;
    }
    int dir = o.getDirection();
    int x = o.getX(), y = o.getY();
    MutableTileValue t = new MutableTileValue(getTileValue(x, y));
    if (dir == 0) {
      t.objectValue |= 1;
      MutableTileValue t1 = new MutableTileValue(getTileValue(x, y - 1));
      t1.objectValue |= 4;
      setTileValue(x, y - 1, t1.toTileValue());
    } else if (dir == 1) {
      t.objectValue |= 2;
      MutableTileValue t1 = new MutableTileValue(getTileValue(x - 1, y));
      t1.objectValue |= 8;
      setTileValue(x - 1, y, t1.toTileValue());
    } else if (dir == 2) {
      t.objectValue |= 0x10;
    } else if (dir == 3) {
      t.objectValue |= 0x20;
    }
View Full Code Here


      height = o.getGameObjectDef().getWidth();
      width = o.getGameObjectDef().getHeight();
    }
    for (int x = o.getX(); x < o.getX() + width; x++) {
      for (int y = o.getY(); y < o.getY() + height; y++) {
        MutableTileValue t = new MutableTileValue(getTileValue(x, y));
        if (o.getGameObjectDef().getType() == 1) {
          t.objectValue |= 0x40;
        } else if (dir == 0) {
          t.objectValue |= 2;
          MutableTileValue t1 = new MutableTileValue(getTileValue(
              x - 1, y));
          t1.objectValue |= 8;
          setTileValue(x - 1, y, t1.toTileValue());
        } else if (dir == 2) {
          t.objectValue |= 4;
          MutableTileValue t1 = new MutableTileValue(getTileValue(x,
              y + 1));
          t1.objectValue |= 1;
          setTileValue(x, y + 1, t1.toTileValue());
        } else if (dir == 4) {
          t.objectValue |= 8;
          MutableTileValue t1 = new MutableTileValue(getTileValue(
              x + 1, y));
          t1.objectValue |= 2;
          setTileValue(x + 1, y, t1.toTileValue());
        } else if (dir == 6) {
          t.objectValue |= 1;
          MutableTileValue t1 = new MutableTileValue(getTileValue(x,
              y - 1));
          t1.objectValue |= 4;
          setTileValue(x, y - 1, t1.toTileValue());
        }
        setTileValue(x, y, t.toTileValue());
      }
    }
View Full Code Here

    if (o.getDoorDef().getDoorType() != 1) {
      return;
    }
    int dir = o.getDirection();
    int x = o.getX(), y = o.getY();
    MutableTileValue t = new MutableTileValue(getTileValue(x, y));

    if (dir == 0) {
      t.objectValue &= 0xfffe;
      MutableTileValue t1 = new MutableTileValue(getTileValue(x, y - 1));
      t1.objectValue &= 65535 - 4;
      setTileValue(x, y - 1, t1.toTileValue());
    } else if (dir == 1) {
      t.objectValue &= 0xfffd;
      MutableTileValue t1 = new MutableTileValue(getTileValue(x - 1, y));
      t1.objectValue &= 65535 - 8;
      setTileValue(x - 1, y, t1.toTileValue());
    } else if (dir == 2) {
      t.objectValue &= 0xffef;
    } else if (dir == 3) {
      t.objectValue &= 0xffdf;
    }
View Full Code Here

      height = o.getGameObjectDef().getWidth();
      width = o.getGameObjectDef().getHeight();
    }
    for (int x = o.getX(); x < o.getX() + width; x++) {
      for (int y = o.getY(); y < o.getY() + height; y++) {
        MutableTileValue t = new MutableTileValue(getTileValue(x, y));

        if (o.getGameObjectDef().getType() == 1) {
          t.objectValue &= 0xffbf;
        } else if (dir == 0) {
          t.objectValue &= 0xfffd;
          MutableTileValue t1 = new MutableTileValue(getTileValue(
              x - 1, y));
          t1.objectValue &= 65535 - 8;
          setTileValue(x - 1, y, t1.toTileValue());
        } else if (dir == 2) {
          t.objectValue &= 0xfffb;
          MutableTileValue t1 = new MutableTileValue(getTileValue(x,
              y + 1));
          t1.objectValue &= 65535 - 1;
          setTileValue(x, y + 1, t1.toTileValue());
        } else if (dir == 4) {
          t.objectValue &= 0xfff7;
          MutableTileValue t1 = new MutableTileValue(getTileValue(
              x + 1, y));
          t1.objectValue &= 65535 - 2;
          setTileValue(x + 1, y, t1.toTileValue());
        } else if (dir == 6) {
          t.objectValue &= 0xfffe;
          MutableTileValue t1 = new MutableTileValue(getTileValue(x,
              y - 1));
          t1.objectValue &= 65535 - 4;
          setTileValue(x, y - 1, t1.toTileValue());
        }
        setTileValue(x, y, t.toTileValue());
      }
    }
  }
View Full Code Here

        int by = bigY + y;
        if (!world.withinWorld(bx, by)) {
          continue;
        }

        MutableTileValue t = new MutableTileValue(world.getTileValue(
            bx, by));
        t.overlay = s.getTile(x, y).groundOverlay;
        t.diagWallVal = s.getTile(x, y).diagonalWalls;
        t.horizontalWallVal = s.getTile(x, y).horizontalWall;
        t.verticalWallVal = s.getTile(x, y).verticalWall;
        t.elevation = s.getTile(x, y).groundElevation;
        /** start of shit **/
        if ((s.getTile(x, y).groundOverlay & 0xff) == 250) {
          s.getTile(x, y).groundOverlay = (byte) 2;
        }
        /** break in shit **/
        int groundOverlay = s.getTile(x, y).groundOverlay & 0xFF;
        if (groundOverlay > 0
            && EntityHandler.getTileDef(groundOverlay - 1)
                .getObjectType() != 0) {
          t.mapValue |= 0x40; // 64
        }

        int verticalWall = s.getTile(x, y).verticalWall & 0xFF;
        if (verticalWall > 0
            && EntityHandler.getDoorDef(verticalWall - 1)
                .getUnknown() == 0
            && EntityHandler.getDoorDef(verticalWall - 1)
                .getDoorType() != 0) {
          t.mapValue |= 1; // 1
          MutableTileValue t1 = new MutableTileValue(
              world.getTileValue(bx, by - 1));
          t1.mapValue |= 4; // 4
          world.setTileValue(bx, by - 1, t1.toTileValue());
        }

        int horizontalWall = s.getTile(x, y).horizontalWall & 0xFF;
        if (horizontalWall > 0
            && EntityHandler.getDoorDef(horizontalWall - 1)
                .getUnknown() == 0
            && EntityHandler.getDoorDef(horizontalWall - 1)
                .getDoorType() != 0) {
          t.mapValue |= 2; // 2
          MutableTileValue t1 = new MutableTileValue(
              world.getTileValue(bx - 1, by));
          t1.mapValue |= 8;
          world.setTileValue(bx - 1, by, t1.toTileValue());
        }

        int diagonalWalls = s.getTile(x, y).diagonalWalls;
        if (diagonalWalls > 0
            && diagonalWalls < 12000
View Full Code Here

TOP

Related Classes of org.moparscape.msc.gs.model.landscape.MutableTileValue

Copyright © 2018 www.massapicom. 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.