diff --git a/internal/chunks/handle_8svx.go b/internal/chunks/handle_8svx.go index 3671fc0..bf77700 100644 --- a/internal/chunks/handle_8svx.go +++ b/internal/chunks/handle_8svx.go @@ -25,36 +25,42 @@ func handle8svxVhdr(data []byte) (StructResult, error) { var offset uint32 var result StructResult + // handle oneShotHiSamples oneShotHiSamples, err := getBeUlong(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"One Shot Hi Samples", fmt.Sprintf("%d", oneShotHiSamples)}) + // handle repeatHiSamples repeatHiSamples, err := getBeUlong(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Repeat Hi Samples", fmt.Sprintf("%d", repeatHiSamples)}) + // handle samplesPerHiCycle samplesPerHiCycle, err := getBeUlong(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Samples Per Hi Cycle", fmt.Sprintf("%d", samplesPerHiCycle)}) + // handle samplesPerSec samplesPerSec, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Samples Per Sec", fmt.Sprintf("%d", samplesPerSec)}) + // handle ctOctave ctOctave, err := getUbyte(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Octave", fmt.Sprintf("%d", ctOctave)}) + // handle sCompression sCompression, err := getUbyte(data, &offset) if err != nil { return result, err @@ -66,6 +72,7 @@ func handle8svxVhdr(data []byte) (StructResult, error) { result = append(result, [2]string{"Compression", "Fibonacci-Delta-Encoded"}) } + // handle volume volume, err := getBeLong(data, &offset) // TODO: handle Fixed type (16 bit left, 16 bit right) if err != nil { return result, err @@ -87,12 +94,14 @@ func handle8svxAtakRlse(data []byte) (StructResult, error) { var offset uint32 var result StructResult + // handle duration duration, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Duration", fmt.Sprintf("%d", duration)}) + // handle dest dest, err := getBeLong(data, &offset) // TODO: handle Fixed type (16 bit left, 16 bit right) if err != nil { return result, err diff --git a/internal/chunks/handle_anim.go b/internal/chunks/handle_anim.go index f8c6097..b99455e 100644 --- a/internal/chunks/handle_anim.go +++ b/internal/chunks/handle_anim.go @@ -29,6 +29,7 @@ func handleAnimAnhd(data []byte) (StructResult, error) { var offset uint32 var result StructResult + // handle operation operation, err := getUbyte(data, &offset) if err != nil { return result, nil @@ -59,6 +60,7 @@ func handleAnimAnhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Mask", fmt.Sprintf("%d", mask)}) + // handle w,h w, err := getBeUword(data, &offset) if err != nil { return result, err @@ -69,6 +71,7 @@ func handleAnimAnhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Width : Height", fmt.Sprintf("%d : %d", w, h)}) + // handle x,y x, err := getBeWord(data, &offset) if err != nil { return result, err @@ -79,18 +82,21 @@ func handleAnimAnhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Position x : y", fmt.Sprintf("%d : %d", x, y)}) + // handle abstime abstime, err := getBeUlong(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Absolute Time", fmt.Sprintf("%d", abstime)}) + // handle reltime reltime, err := getBeUlong(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Relative Time", fmt.Sprintf("%d", reltime)}) + // handle interleave interleave, err := getUbyte(data, &offset) if err != nil { return result, err @@ -99,6 +105,7 @@ func handleAnimAnhd(data []byte) (StructResult, error) { offset++ // ignore pad0 + // handle bits bits, err := getBeUlong(data, &offset) if err != nil { return result, err @@ -165,18 +172,21 @@ func handleAnimDpan(data []byte) (StructResult, error) { var offset uint32 var result StructResult + // version, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Version", fmt.Sprintf("%d", version)}) + // handle nframes nframes, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Number of Frames", fmt.Sprintf("%d", nframes)}) + // handle flags flags, err := getBeUlong(data, &offset) if err != nil { return result, err diff --git a/internal/chunks/handle_ilbm.go b/internal/chunks/handle_ilbm.go index 94f17e1..f4de591 100644 --- a/internal/chunks/handle_ilbm.go +++ b/internal/chunks/handle_ilbm.go @@ -27,6 +27,7 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { var offset uint32 var result StructResult + // handle w, h w, err := getBeUword(data, &offset) if err != nil { return result, err @@ -37,6 +38,7 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Width : Height", fmt.Sprintf("%d : %d", w, h)}) + // handle x, y x, err := getBeWord(data, &offset) if err != nil { return result, err @@ -47,12 +49,14 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Position x : y", fmt.Sprintf("%d : %d", x, y)}) + // handle nPlanes nPlanes, err := getUbyte(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Number of planes", fmt.Sprintf("%d", nPlanes)}) + // handle masking masking, err := getUbyte(data, &offset) if err != nil { return result, err @@ -68,6 +72,7 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { result = append(result, [2]string{"Masking", "Lasso"}) } + // handle compression compression, err := getUbyte(data, &offset) if err != nil { return result, err @@ -81,12 +86,14 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { offset++ // ignore pad1 + // handle transparentColor transparentColor, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Transparent Color", fmt.Sprintf("%d", transparentColor)}) + // handle xAspect, yAspect xAspect, err := getUbyte(data, &offset) if err != nil { return result, err @@ -97,6 +104,7 @@ func handleIlbmBmhd(data []byte) (StructResult, error) { } result = append(result, [2]string{"Aspect Ratio x : y", fmt.Sprintf("%d : %d", xAspect, yAspect)}) + // handle pageWidth, pageHeight pageWidth, err := getBeWord(data, &offset) if err != nil { return result, err @@ -227,18 +235,21 @@ func handleIlbmDest(data []byte) (StructResult, error) { offset++ // ignore pad1 + // handle planePick planePick, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Plane Pick", fmt.Sprintf("%032b", planePick)}) + // handle planeOnOff planeOnOff, err := getBeUword(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Plane On/Off", fmt.Sprintf("%032b", planeOnOff)}) + // handle planeMask planeMask, err := getBeUword(data, &offset) if err != nil { return result, err @@ -282,12 +293,14 @@ func handleIlbmCrng(data []byte) (StructResult, error) { offset += 2 // ignore pad1 + // handle rate rate, err := getBeWord(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Rate", fmt.Sprintf("%d", rate)}) + // handle flags flags, err := getBeWord(data, &offset) if err != nil { return result, err @@ -299,12 +312,14 @@ func handleIlbmCrng(data []byte) (StructResult, error) { result = append(result, [2]string{"Flags", "Reverse"}) } + // handle low low, err := getUbyte(data, &offset) if err != nil { return result, err } result = append(result, [2]string{"Low", fmt.Sprintf("%d", low)}) + // handle high high, err := getUbyte(data, &offset) if err != nil { return result, err