Package com.coyotegulch.itzam

Examples of com.coyotegulch.itzam.Datafile$FileHeader


import java.io.RandomAccessFile;
import java.util.LinkedList;

public class FloorRender {
    public static void main(String... args) throws IOException {
        FileHeader floorHeader = Extract.read(
                new RandomAccessFile("tiles/ACT1/BARRACKS/floor.dt1", "r"),
                new RandomAccessFile("palette/ACT1/pal.dat", "r")
        );
        FileHeader basewallHeader = Extract.read(
                new RandomAccessFile("tiles/ACT1/BARRACKS/basewall.dt1", "r"),
                new RandomAccessFile("palette/ACT1/pal.dat", "r")
        );
        FileHeader objectsHeader = Extract.read(
                new RandomAccessFile("tiles/ACT1/BARRACKS/objects.dt1", "r"),
                new RandomAccessFile("palette/ACT1/pal.dat", "r")
        );
        FileHeader merged = merge(floorHeader,basewallHeader,objectsHeader);
        DsInfo dsInfo = DsReader.read(
                new RandomAccessFile("tiles/ACT1/BARRACKS/barE.ds1", "r")
        );
        System.out.println("width="+dsInfo.width+" height="+dsInfo.height);
View Full Code Here


        renderLayer(dsInfo.floor_buff[0], floorHeader,0);
        renderLayer(dsInfo.wall_buff[0], objectsHeader,1);
    }

    public static FileHeader merge(FileHeader... headers){
        FileHeader merged=new FileHeader();
        merged.blockHeaderList=new LinkedList<BlockHeader>();
        for(FileHeader header: headers){
            for(BlockHeader blockHeader: header.blockHeaderList){
                merged.blockHeaderList.add(blockHeader);
            }
View Full Code Here

TOP

Related Classes of com.coyotegulch.itzam.Datafile$FileHeader

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.