Documentation ¶
Index ¶
- Constants
- type Loader
- func (loader *Loader) AddExtra(x, y, z int, shapeIndex int) bool
- func (loader *Loader) ClearEdge(x, y int)
- func (loader *Loader) EraseAllExtras(x, y, z int) bool
- func (loader *Loader) EraseExtra(x, y, z, shapeIndex int) bool
- func (loader *Loader) EraseShape(x, y, z int) bool
- func (loader *Loader) GetEdge(x, y int) (int, bool)
- func (loader *Loader) GetExtra(worldX, worldY, worldZ, i int) (int, bool)
- func (loader *Loader) GetExtras(worldX, worldY, worldZ int) []int
- func (loader *Loader) GetPos(worldX, worldY, worldZ int) *SectionPosition
- func (loader *Loader) GetSectionPos() (int, int)
- func (loader *Loader) GetShape(worldX, worldY, worldZ int) (int, bool)
- func (loader *Loader) IsEditorMode() bool
- func (loader *Loader) MoveTo(x, y int) bool
- func (loader *Loader) SaveAll() error
- func (loader *Loader) SetEdge(x, y int, shapeIndex int)
- func (loader *Loader) SetIoMode(mode int)
- func (loader *Loader) SetShape(x, y, z int, shapeIndex int) bool
- type Section
- type SectionCache
- type SectionPosition
- type WorldObserver
Constants ¶
View Source
const ( CHUNK = 16 SECTION_SIZE = CHUNK * 15 SECTION_Z_SIZE = 48 OLD_SECTION_Z_SIZE = 24 VERSION = 6 EDITOR_MODE = 0 RUNNER_MODE = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
func NewLoader ¶
func NewLoader(observer WorldObserver, userDir, gameDir string) *Loader
func (*Loader) EraseAllExtras ¶
func (*Loader) EraseExtra ¶
func (*Loader) EraseShape ¶
func (*Loader) GetPos ¶
func (loader *Loader) GetPos(worldX, worldY, worldZ int) *SectionPosition
func (*Loader) GetSectionPos ¶
func (*Loader) IsEditorMode ¶
type Section ¶
type Section struct {
X, Y int
Pos [SECTION_SIZE][SECTION_SIZE][SECTION_Z_SIZE]SectionPosition
// contains filtered or unexported fields
}
type SectionCache ¶
type SectionCache struct {
// contains filtered or unexported fields
}
func NewSectionCache ¶
func NewSectionCache() *SectionCache
type SectionPosition ¶
type SectionPosition struct { Block int Edge int // extra non blocking shapes: plants, items, etc. Extras []int Under int }
func (*SectionPosition) Clone ¶
func (p *SectionPosition) Clone() *SectionPosition
Click to show internal directories.
Click to hide internal directories.