本文整理匯總了Golang中github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver.LoadByte方法的典型用法代碼示例。如果您正苦於以下問題:Golang LoadSaver.LoadByte方法的具體用法?Golang LoadSaver.LoadByte怎麽用?Golang LoadSaver.LoadByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver
的用法示例。
在下文中一共展示了LoadSaver.LoadByte方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: loadWildMin
func loadWildMin(ls *persist.LoadSaver) Frame {
return WildMin{
OffType(ls.LoadByte()),
ls.LoadInt(),
patterns.Load(ls),
}
}
示例2: loadFixed
func loadFixed(ls *persist.LoadSaver) Frame {
return Fixed{
OffType(ls.LoadByte()),
ls.LoadInt(),
patterns.Load(ls),
}
}
示例3: Load
// Load a frame from a persist.LoadSaver
func Load(ls *persist.LoadSaver) Frame {
id := ls.LoadByte()
l := loaders[int(id)]
if l == nil {
if ls.Err == nil {
ls.Err = errors.New("bad frame loader")
}
return nil
}
return l(ls)
}
示例4: LoadIdentifier
// LoadIdentifier applies the appropriate IdentifierLoader to load an identifier.
func LoadIdentifier(ls *persist.LoadSaver) Identifier {
id := ls.LoadByte()
l := loaders[int(id)]
if l == nil {
if ls.Err == nil {
ls.Err = errors.New("bad identifier loader")
}
return nil
}
return l(ls)
}
示例5: loadKeyFrames
func loadKeyFrames(ls *persist.LoadSaver) [][]keyFrame {
kfs := make([][]keyFrame, ls.LoadSmallInt())
for i := range kfs {
kfs[i] = make([]keyFrame, ls.LoadSmallInt())
for j := range kfs[i] {
kfs[i][j].typ = frames.OffType(ls.LoadByte())
kfs[i][j].seg.pMin = int64(ls.LoadInt())
kfs[i][j].seg.pMax = int64(ls.LoadInt())
kfs[i][j].seg.lMin = ls.LoadSmallInt()
kfs[i][j].seg.lMax = ls.LoadSmallInt()
kfs[i][j].key.pMin = int64(ls.LoadInt())
kfs[i][j].key.pMax = int64(ls.LoadInt())
kfs[i][j].key.lMin = ls.LoadSmallInt()
kfs[i][j].key.lMax = ls.LoadSmallInt()
}
}
return kfs
}
示例6: loadAnyMask
func loadAnyMask(ls *persist.LoadSaver) patterns.Pattern {
return AnyMask(ls.LoadByte())
}