Colliding Doodads #1
|
@ -14,7 +14,7 @@ import (
|
||||||
"git.kirsle.net/apps/doodle"
|
"git.kirsle.net/apps/doodle"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/doodads"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/level"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"golang.org/x/image/bmp"
|
"golang.org/x/image/bmp"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle"
|
"git.kirsle.net/apps/doodle/lib/render/sdl"
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/src"
|
||||||
"git.kirsle.net/apps/doodle/render/sdl"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
|
|
||||||
_ "image/png"
|
_ "image/png"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Engine is the interface for the rendering engine, keeping SDL-specific stuff
|
// Engine is the interface for the rendering engine, keeping SDL-specific stuff
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPointInside(t *testing.T) {
|
func TestPointInside(t *testing.T) {
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIntersection(t *testing.T) {
|
func TestIntersection(t *testing.T) {
|
|
@ -2,7 +2,7 @@
|
||||||
package sdl
|
package sdl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package sdl
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/src/events" // XXX: break it up
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ package sdl
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
"github.com/veandco/go-sdl2/ttf"
|
"github.com/veandco/go-sdl2/ttf"
|
||||||
)
|
)
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
"github.com/veandco/go-sdl2/ttf"
|
"github.com/veandco/go-sdl2/ttf"
|
||||||
)
|
)
|
|
@ -3,7 +3,7 @@ package sdl
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package sdl
|
package sdl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
)
|
)
|
||||||
|
|
8
lib/ui/README.md
Normal file
8
lib/ui/README.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Doodle UI
|
||||||
|
|
||||||
|
This is a UI toolkit designed for Doodle but made generally available.
|
||||||
|
|
||||||
|
## Ties to Break
|
||||||
|
|
||||||
|
lib/ui and lib/render both currently import doodle/src/events as their only
|
||||||
|
dependency on Doodle. This module should be moved to a better common location.
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/ui/theme"
|
"git.kirsle.net/apps/doodle/lib/ui/theme"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Button is a clickable button.
|
// Button is a clickable button.
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/ui/theme"
|
"git.kirsle.net/apps/doodle/lib/ui/theme"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CheckButton implements a checkbox and radiobox widget. It's based on a
|
// CheckButton implements a checkbox and radiobox widget. It's based on a
|
|
@ -1,6 +1,6 @@
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/render"
|
import "git.kirsle.net/apps/doodle/lib/render"
|
||||||
|
|
||||||
// Checkbox combines a CheckButton with a widget like a Label.
|
// Checkbox combines a CheckButton with a widget like a Label.
|
||||||
type Checkbox struct {
|
type Checkbox struct {
|
|
@ -3,7 +3,7 @@ package ui
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Frame is a widget that contains other widgets.
|
// Frame is a widget that contains other widgets.
|
|
@ -1,6 +1,8 @@
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/render"
|
import (
|
||||||
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
|
)
|
||||||
|
|
||||||
// Pack provides configuration fields for Frame.Pack().
|
// Pack provides configuration fields for Frame.Pack().
|
||||||
type Pack struct {
|
type Pack struct {
|
|
@ -1,6 +1,6 @@
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/render"
|
import "git.kirsle.net/apps/doodle/lib/render"
|
||||||
|
|
||||||
// AbsolutePosition computes a widget's absolute X,Y position on the
|
// AbsolutePosition computes a widget's absolute X,Y position on the
|
||||||
// window on screen by crawling its parent widget tree.
|
// window on screen by crawling its parent widget tree.
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ImageType for supported image formats.
|
// ImageType for supported image formats.
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultFont is the default font settings used for a Label.
|
// DefaultFont is the default font settings used for a Label.
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Event is a named event that the supervisor will send.
|
// Event is a named event that the supervisor will send.
|
|
@ -1,6 +1,6 @@
|
||||||
package theme
|
package theme
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/render"
|
import "git.kirsle.net/apps/doodle/lib/render"
|
||||||
|
|
||||||
// Color schemes.
|
// Color schemes.
|
||||||
var (
|
var (
|
|
@ -1,8 +1,8 @@
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/ui/theme"
|
"git.kirsle.net/apps/doodle/lib/ui/theme"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BorderStyle options for widget.SetBorderStyle()
|
// BorderStyle options for widget.SetBorderStyle()
|
|
@ -3,7 +3,7 @@ package ui
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Window is a frame with a title bar.
|
// Window is a frame with a title bar.
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"golang.org/x/image/bmp"
|
"golang.org/x/image/bmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Wallpaper is a repeatable background image to go behind levels.
|
// Wallpaper is a repeatable background image to go behind levels.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Debug related variables that can toggle on or off certain features and
|
// Debug related variables that can toggle on or off certain features and
|
|
@ -1,7 +1,7 @@
|
||||||
package balance
|
package balance
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Shell related variables.
|
// Shell related variables.
|
|
@ -1,8 +1,8 @@
|
||||||
package balance
|
package balance
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Theme and appearance variables.
|
// Theme and appearance variables.
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/enum"
|
"git.kirsle.net/apps/doodle/src/enum"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Command is a parsed shell command.
|
// Command is a parsed shell command.
|
|
@ -1,8 +1,8 @@
|
||||||
package doodads
|
package doodads
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Actor is a reusable run-time drawing component used in Doodle. Actors are an
|
// Actor is a reusable run-time drawing component used in Doodle. Actors are an
|
|
@ -1,8 +1,8 @@
|
||||||
package doodads
|
package doodads
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Collide describes how a collision occurred.
|
// Collide describes how a collision occurred.
|
|
@ -1,9 +1,9 @@
|
||||||
package doodads
|
package doodads
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Doodad is a reusable component for Levels that have scripts and graphics.
|
// Doodad is a reusable component for Levels that have scripts and graphics.
|
|
@ -1,7 +1,7 @@
|
||||||
package doodads
|
package doodads
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Package dummy implements a dummy doodads.Drawing.
|
// Package dummy implements a dummy doodads.Drawing.
|
||||||
package dummy
|
package dummy
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/doodads"
|
import "git.kirsle.net/apps/doodle/src/doodads"
|
||||||
|
|
||||||
// Drawing is a dummy doodads.Drawing that has no data.
|
// Drawing is a dummy doodads.Drawing that has no data.
|
||||||
type Drawing struct {
|
type Drawing struct {
|
|
@ -1,7 +1,7 @@
|
||||||
// Package dummy implements a dummy doodads.Drawing.
|
// Package dummy implements a dummy doodads.Drawing.
|
||||||
package dummy
|
package dummy
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/doodads"
|
import "git.kirsle.net/apps/doodle/src/doodads"
|
||||||
|
|
||||||
// NewPlayer creates a dummy player object.
|
// NewPlayer creates a dummy player object.
|
||||||
func NewPlayer() *Drawing {
|
func NewPlayer() *Drawing {
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/enum"
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
|
"git.kirsle.net/apps/doodle/src/enum"
|
||||||
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"github.com/kirsle/golog"
|
"github.com/kirsle/golog"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package draw
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Line is a generator that returns the X,Y coordinates to draw a line.
|
// Line is a generator that returns the X,Y coordinates to draw a line.
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/draw"
|
"git.kirsle.net/apps/doodle/draw"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLine(t *testing.T) {
|
func TestLine(t *testing.T) {
|
|
@ -7,12 +7,12 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/enum"
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
|
||||||
"git.kirsle.net/apps/doodle/level"
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
|
"git.kirsle.net/apps/doodle/src/enum"
|
||||||
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EditorScene manages the "Edit Level" game mode.
|
// EditorScene manages the "Edit Level" game mode.
|
|
@ -1,6 +1,6 @@
|
||||||
package doodle
|
package doodle
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/uix"
|
import "git.kirsle.net/apps/doodle/src/uix"
|
||||||
|
|
||||||
// TODO: build flags to not include this in production builds.
|
// TODO: build flags to not include this in production builds.
|
||||||
// This adds accessors for private variables from the dev console.
|
// This adds accessors for private variables from the dev console.
|
|
@ -5,15 +5,15 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/enum"
|
|
||||||
"git.kirsle.net/apps/doodle/events"
|
|
||||||
"git.kirsle.net/apps/doodle/level"
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
"git.kirsle.net/apps/doodle/uix"
|
"git.kirsle.net/apps/doodle/src/enum"
|
||||||
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
|
"git.kirsle.net/apps/doodle/src/uix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Width of the panel frame.
|
// Width of the panel frame.
|
|
@ -7,12 +7,12 @@ package doodle
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
"git.kirsle.net/apps/doodle/uix"
|
"git.kirsle.net/apps/doodle/src/uix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DraggableActor is a Doodad being dragged from the Doodad palette.
|
// DraggableActor is a Doodad being dragged from the Doodad palette.
|
|
@ -1,9 +1,9 @@
|
||||||
package doodle
|
package doodle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setupPaletteFrame configures the Color Palette tab for Edit Mode.
|
// setupPaletteFrame configures the Color Palette tab for Edit Mode.
|
|
@ -4,10 +4,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Frames to cache for FPS calculation.
|
// Frames to cache for FPS calculation.
|
|
@ -3,10 +3,10 @@ package doodle
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GUITestScene implements the main menu of Doodle.
|
// GUITestScene implements the main menu of Doodle.
|
|
@ -1,7 +1,7 @@
|
||||||
package level
|
package level
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"github.com/satori/go.uuid"
|
"github.com/satori/go.uuid"
|
||||||
"golang.org/x/image/bmp"
|
"golang.org/x/image/bmp"
|
||||||
)
|
)
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MapAccessor implements a chunk accessor by using a map of points to their
|
// MapAccessor implements a chunk accessor by using a map of points to their
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/level"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test the high level Chunker.
|
// Test the high level Chunker.
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Chunker is the data structure that manages the chunks of a level, and
|
// Chunker is the data structure that manages the chunks of a level, and
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/level"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWorldSize(t *testing.T) {
|
func TestWorldSize(t *testing.T) {
|
|
@ -1,7 +1,7 @@
|
||||||
package level
|
package level
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultPalette returns a sensible default palette.
|
// DefaultPalette returns a sensible default palette.
|
|
@ -3,7 +3,7 @@ package level
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Swatch holds details about a single value in the palette.
|
// Swatch holds details about a single value in the palette.
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Useful variables.
|
// Useful variables.
|
|
@ -1,10 +1,10 @@
|
||||||
package doodle
|
package doodle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MainScene implements the main menu of Doodle.
|
// MainScene implements the main menu of Doodle.
|
|
@ -4,13 +4,13 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/doodads/dummy"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/src/doodads/dummy"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
"git.kirsle.net/apps/doodle/uix"
|
"git.kirsle.net/apps/doodle/src/uix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PlayScene manages the "Edit Level" game mode.
|
// PlayScene manages the "Edit Level" game mode.
|
|
@ -1,6 +1,8 @@
|
||||||
package doodle
|
package doodle
|
||||||
|
|
||||||
import "git.kirsle.net/apps/doodle/events"
|
import (
|
||||||
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
|
)
|
||||||
|
|
||||||
// Scene is an abstraction for a game mode in Doodle. The app points to one
|
// Scene is an abstraction for a game mode in Doodle. The app points to one
|
||||||
// scene at a time and that scene has control over the main loop, and its own
|
// scene at a time and that scene has control over the main loop, and its own
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"github.com/robertkrimen/otto"
|
"github.com/robertkrimen/otto"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package uix
|
package uix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,13 +5,13 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
|
||||||
"git.kirsle.net/apps/doodle/level"
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/wallpaper"
|
"git.kirsle.net/apps/doodle/pkg/wallpaper"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Canvas is a custom ui.Widget that manages a single drawing.
|
// Canvas is a custom ui.Widget that manages a single drawing.
|
|
@ -3,10 +3,10 @@ package uix
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/doodads"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
|
||||||
"git.kirsle.net/apps/doodle/pkg/userdir"
|
"git.kirsle.net/apps/doodle/pkg/userdir"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/doodads"
|
||||||
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InstallActors adds external Actors to the canvas to be superimposed on top
|
// InstallActors adds external Actors to the canvas to be superimposed on top
|
|
@ -1,10 +1,10 @@
|
||||||
package uix
|
package uix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// loopEditable handles the Loop() part for editable canvases.
|
// loopEditable handles the Loop() part for editable canvases.
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Present the canvas.
|
// Present the canvas.
|
|
@ -4,11 +4,11 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kirsle.net/apps/doodle/balance"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/events"
|
"git.kirsle.net/apps/doodle/lib/ui"
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/src/balance"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/events"
|
||||||
"git.kirsle.net/apps/doodle/ui"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
|
@ -1,9 +1,9 @@
|
||||||
package uix
|
package uix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kirsle.net/apps/doodle/level"
|
"git.kirsle.net/apps/doodle/lib/render"
|
||||||
"git.kirsle.net/apps/doodle/pkg/wallpaper"
|
"git.kirsle.net/apps/doodle/pkg/wallpaper"
|
||||||
"git.kirsle.net/apps/doodle/render"
|
"git.kirsle.net/apps/doodle/src/level"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Wallpaper configures the wallpaper in a Canvas.
|
// Wallpaper configures the wallpaper in a Canvas.
|
Loading…
Reference in New Issue
Block a user