Lighting experiments

This commit is contained in:
2025-12-16 00:44:52 -07:00
parent c70f85abe5
commit de5f47f47b
12 changed files with 664 additions and 17 deletions

View File

@@ -3,9 +3,16 @@ package maps
import (
"image/color"
"github.com/hajimehoshi/ebiten/v2"
"github.com/atridad/LilGuy/internal/portal"
"github.com/atridad/LilGuy/internal/world"
"github.com/hajimehoshi/ebiten/v2"
)
type TimeOfDay string
const (
Daytime TimeOfDay = "day"
Nighttime TimeOfDay = "night"
)
type Map struct {
@@ -17,6 +24,7 @@ type Map struct {
World *world.World
Portals []*portal.Portal
BackgroundColor color.NRGBA
TimeOfDay TimeOfDay // Day or Night tag
bakedImage *ebiten.Image
}
@@ -31,6 +39,7 @@ func NewMap(id string, number int, displayName string, width, height float64) *M
World: world.NewWorld(),
Portals: make([]*portal.Portal, 0),
BackgroundColor: color.NRGBA{R: 135, G: 206, B: 235, A: 255},
TimeOfDay: Daytime, // Default to daytime
}
}