automated snapshot

This commit is contained in:
sumi
2025-12-23 00:30:13 -06:00
parent c29e08bb98
commit f37bdf0604
5 changed files with 117 additions and 107 deletions

View File

@@ -28,7 +28,7 @@ type TranslateField struct {
x, y float32
}
func (f *TranslateField) Get(x, y float32) float32 {
func (f TranslateField) Get(x float32, y float32) float32 {
return f.field.Get(x+f.x, y+f.y)
}
@@ -65,7 +65,7 @@ func (p *ImagePixels) Get(x, y int) rl.Color {
return p.colors[x+y*p.w]
}
func NewImageField(path string) ImageField {
func NewImageField(path string) *ImageField {
image := rl.LoadImage(path)
fmt.Printf("loaded image from %s\n", path)
colors := rl.LoadImageColors(image)
@@ -76,7 +76,7 @@ func NewImageField(path string) ImageField {
}
offsetX := int(image.Width)/2
offsetY := int(image.Height)/2
return ImageField{
return &ImageField {
image: image,
pixels: pixels,
offsetX: offsetX,