util

package
v0.0.0-...-155ab08 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BIT_SPRINT bit = 0b0000_0001
	BIT_SNEAK  bit = 0b0000_0010
	BIT_CROUCH bit = 0b0000_0100
	BIT_JUMP   bit = 0b0000_1000
	BIT_RIGHT  bit = 0b0001_0000
	BIT_LEFT   bit = 0b0010_0000
	BIT_DOWN   bit = 0b0100_0000
	BIT_UP     bit = 0b1000_0000

	BIT_WEAPON_PRIMARY   bit = 0b0000_0001
	BIT_WEAPON_SECONDARY bit = 0b0000_0010
)

Variables

This section is empty.

Functions

func CompressMap

func CompressMap(data []byte) []byte

func Float32FromBytes

func Float32FromBytes(bytes []byte) float32

func Float32ToBytes

func Float32ToBytes(float float32) []byte

func GetBit

func GetBit(b byte, n bit) bool

func GetMapAndSize

func GetMapAndSize(path string) ([]byte, []byte, int, error)

func ReadMapFromFile

func ReadMapFromFile(path string) ([]byte, int, error)

func ReverseBytes

func ReverseBytes(b []byte) []byte

Types

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
}

func NewColor

func NewColor(r uint8, g uint8, b uint8) Color

type Vec3

type Vec3 struct {
	X uint8
	Y uint8
	Z uint8
}

func NewVec3

func NewVec3(x uint8, y uint8, z uint8) Vec3

type Vec3Float

type Vec3Float struct {
	X float32
	Y float32
	Z float32
}

func NewVec3Float

func NewVec3Float(x float32, y float32, z float32) Vec3Float

Jump to

Keyboard shortcuts

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