internal

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultByteOrder = binary.LittleEndian

Functions

func LoadDATFile

func LoadDATFile(path string, obj interface{}) error

LoadDATFile loads binary file found at path and populates obj instance.

func Marshall

func Marshall(obj interface{}) ([]byte, error)

Marshall encodes a struct into binary data.

func SaveDATFile

func SaveDATFile(path string, obj interface{}) error

SaveDATFile saves a single data to its original location on disk file if the content has changed. name is the path inside the game directory.

func Unmarshall

func Unmarshall(buffer []byte, obj interface{}) error

Unmarshall decodes binary data from a buffer into a struct.

Types

type NullString

type NullString string

NullString is a null byte terminated string. When read from binary data via restruct, the full fixed-size byte field (including null bytes) is stored. Use String() to get the value truncated at the first null byte.

func (NullString) String

func (s NullString) String() string

String returns the string value, truncated at the first null byte.

Directories

Path Synopsis
Package geodata
Package geodata
Package geoscape
Package geoscape

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL