delete GeoMDef - not needed anymore/yet

This commit is contained in:
Josh Deprez 2021-08-12 11:48:04 +10:00
parent 1ff2aa1fcf
commit 238286289e

View file

@ -1,11 +1,5 @@
package engine package engine
import (
"unsafe"
"github.com/hajimehoshi/ebiten/v2"
)
// ID implements Identifier directly (as a string value). // ID implements Identifier directly (as a string value).
type ID string type ID string
@ -17,16 +11,3 @@ type ZPos float64
// Z returns z as a float64. // Z returns z as a float64.
func (z ZPos) Z() float64 { return float64(z) } func (z ZPos) Z() float64 { return float64(z) }
// GeoMDef is a serialisable form of ebiten.GeoM.
type GeoMDef [6]float64 // Assumption: this has identical memory layout to GeoM
// ToGeoMDef translates a GeoM to a GeoMDef using unsafe.Pointer.
func ToGeoMDef(m *ebiten.GeoM) *GeoMDef {
return (*GeoMDef)(unsafe.Pointer(m))
}
// GeoM translates a GeoMDef to a GeoM using unsafe.Pointer.
func (d *GeoMDef) GeoM() *ebiten.GeoM {
return (*ebiten.GeoM)(unsafe.Pointer(d))
}