Documentation ¶
Index ¶
- func RegisterPrinter(ext string, p Printer)
- func WriteTiledData(g *Globals, bf *Stream, patterns ...string)
- type EditorMap
- type GameMap
- type Globals
- func (self *Globals) AddContent(tab *model.Table) bool
- func (self *Globals) AddOutputType(name string, outfile string)
- func (self *Globals) AddTypes(localFD *model.FileDescriptor) bool
- func (self *Globals) PreExport() bool
- func (self *Globals) Print() bool
- func (self *Globals) PrintCodeFile() bool
- func (self *Globals) PrintDataFile() bool
- type Printer
- type PrinterContext
- type Stream
- func (self *Stream) Buffer() *bytes.Buffer
- func (self *Stream) Len() int
- func (self *Stream) Printf(format string, args ...interface{})
- func (self *Stream) WriteBytes(v []byte)
- func (self *Stream) WriteFile(outfile string) error
- func (self *Stream) WriteInt32(v int32)
- func (self *Stream) WriteNodeValue(ft model.FieldType, value *model.Node)
- func (self *Stream) WriteRawBytes(b []byte)
- func (self *Stream) WriteString(v string)
- type TableIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPrinter ¶
func WriteTiledData ¶
Types ¶
type EditorMap ¶
type EditorMap struct { XMLName xml.Name `xml:"tileset"` Text string `xml:",chardata"` Version string `xml:"version,attr"` Tiledversion string `xml:"tiledversion,attr"` Name string `xml:"name,attr"` Tilewidth string `xml:"tilewidth,attr"` Tileheight string `xml:"tileheight,attr"` Tilecount string `xml:"tilecount,attr"` Columns string `xml:"columns,attr"` Image struct { Source string `xml:"source,attr"` } `xml:"image"` Tile []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Type string `xml:"type,attr"` } `xml:"tile"` }
type Globals ¶
type Globals struct { Version string InputFileList []interface{} ParaMode bool CacheDir string UseCache bool ProtoVersion int LuaEnumIntValue bool LuaTabHeader string GenCSSerailizeCode bool PackageName string ModList []string FieldMark string TiledFileDir string Printers []*PrinterContext CombineStructName string // 不包含路径, 用作 *model.FileDescriptor // 类型信息.用于添加各种导出结构 Tables []*model.Table // 数据信息.表格数据 GlobalIndexes []TableIndex // 类型信息.全局索引 CombineStruct *model.Descriptor // 类型信息.Combine结构体 BuildID string // contains filtered or unexported fields }
func NewGlobals ¶
func NewGlobals() *Globals
func (*Globals) AddOutputType ¶
func (*Globals) PrintCodeFile ¶
func (*Globals) PrintDataFile ¶
type PrinterContext ¶
type PrinterContext struct {
// contains filtered or unexported fields
}
func (*PrinterContext) Start ¶
func (self *PrinterContext) Start(g *Globals) bool
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) WriteBytes ¶
func (*Stream) WriteInt32 ¶
func (*Stream) WriteNodeValue ¶
func (*Stream) WriteRawBytes ¶
func (*Stream) WriteString ¶
type TableIndex ¶
type TableIndex struct { Index *model.FieldDescriptor // 表头里的索引 Row *model.FieldDescriptor // 索引的数据 }
Click to show internal directories.
Click to hide internal directories.