lib/cel_decode.js
function DecodeFrameType0(frameData, width, height, palFile) {
    var colors = new Uint8Array(width * height * BYTES_PER_PIXEL);
    var setPixel = getPixelSetter();
    for (var i = 0; i < frameData.length; i++) {
        setPixel(colors, palFile.colors[frameData[i]]);
    }

    return {
        width: width,
        height: height,
        colors: colors
    };
}
function DecodeFrameType0(frameData, width, height, palFile) {
    var colors = new Uint8Array(width * height * BYTES_PER_PIXEL);
    var setPixel = getPixelSetter();
    for (var i = 0; i < frameData.length; i++) {
        setPixel(colors, palFile.colors[frameData[i]]);
    }

    return {
        width: width,
        height: height,
        colors: colors
    };
}
function DecodeFrameType0 ( frameData , width , height , palFile ) { var colors = new Uint8Array ( width * height * BYTES_PER_PIXEL ) ; var setPixel = getPixelSetter ( ) ; for ( var i = 0 ; i < frameData . length ; i ++ ) { setPixel ( colors , palFile . colors [ frameData [ i ] ] ) ; } return { width : width , height : height , colors : colors } ; }
Type0 corresponds to plain 32x32 images with no transparency.

1) Range through the frame, one byte at the time.
- Each byte corresponds to a color index of the palette.
- Set one regular pixel per byte, using the color index to locate the
color in the palette.
Type0 corresponds to plain 32x32 images with no transparency .