Package _api.alienfactory.javamappy

Examples of _api.alienfactory.javamappy.Colour


    mapHeader.setColourDepth  (colourDepth);
    mapHeader.setBlockSize    (blockSize);
    mapHeader.setNoOfBlocks    (noOfBlocks);
    mapHeader.setNoOfImages    (noOfImages);
    mapHeader.setChromeKeyIndex  (cKey8Bit);
    mapHeader.setChromeKey    (new Colour(cKeyRed, cKeyGreen, cKeyBlue));
    mapHeader.setBlockGapX    (blockGapX);
    mapHeader.setBlockGapY    (blockGapY);
    mapHeader.setBlockStaggerX  (blockStaggerX)
    mapHeader.setBlockStaggerY  (blockStaggerY);
    mapHeader.setClickMask    (clickMask);
View Full Code Here


  public void loadChunk(Map map) throws ChunkLoadException {

    int       noOfEntries  = super.getBytesRemaining() / 3;
    Colour[]    colours   = new Colour[noOfEntries];
    StringBuffer  hex     = new StringBuffer();
    Colour colour;
   
    log.info("Reading " + noOfEntries + " CMAP entries.");
    for (int i=0; i<noOfEntries; i++) {
     
      colour = new Colour(super.readUByte(), super.readUByte(), super.readUByte());
      colours[i] = colour;

      hex.append(colour.toString());
      hex.append(" ");
      if (((i+1)%8) == 0) {
        log.debug(hex.toString());
        hex = new StringBuffer();
      }
View Full Code Here

    int blockHeight = mapHeader.getBlockHeight();
    int blockWidth   = mapHeader.getBlockWidth();
   
   
    // grab the transparent colour
    Colour chromeKey = null;
    if (mapHeader.getColourDepth() == 8) {
      colourIndex = mapHeader.getChromeKeyIndex();
      chromeKey  = colours[colourIndex];
    } else {
      chromeKey  = mapHeader.getChromeKey();
    }
    int transparent  = chromeKey.toInt();


        PixelData pixelData;
    log.info("Reading [" + mapHeader.getNoOfImages() + "] images...");
    for (int i=0; i < mapHeader.getNoOfImages(); i++) {
View Full Code Here

TOP

Related Classes of _api.alienfactory.javamappy.Colour

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.