Adding modding folder with a hacked build.

This commit is contained in:
ml
2026-09-26 08:53:08 +02:00
parent cdb960dc71
commit c91080aba7
755 changed files with 50424 additions and 0 deletions
@@ -0,0 +1,27 @@
package serial
import "io"
// PositioningDecoder is a Decoder with positioning capabilities.
type PositioningDecoder struct {
Decoder
seeker io.Seeker
}
// NewPositioningDecoder creates a new PositioningDecoder from given reader.
func NewPositioningDecoder(source io.ReadSeeker) *PositioningDecoder {
return &PositioningDecoder{Decoder: Decoder{source: source, offset: 0}, seeker: source}
}
// SetCurPos changes the encoding position to the specified absolute offset.
func (coder *PositioningDecoder) SetCurPos(offset uint32) {
if coder.firstError != nil {
return
}
_, coder.firstError = coder.seeker.Seek(int64(offset), io.SeekStart)
if coder.firstError != nil {
return
}
coder.offset = offset
}