mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-24 18:02:02 +01:00
Fix the module paths (#12)
This commit is contained in:
parent
69a3dfed40
commit
a32973a33e
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
)
|
||||
|
||||
type Field struct {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"image/color"
|
||||
)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
_ "image/png"
|
||||
)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
"image/color"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
)
|
||||
|
||||
type Input struct {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
"image/color"
|
||||
)
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/example/blocks"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/go-ebiten/ui/cocoa"
|
||||
"github.com/hajimehoshi/ebiten/example/blocks"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/ui/dummy"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
@ -29,10 +29,10 @@ func main() {
|
||||
const frameTime = time.Duration(int64(time.Second) / int64(fps))
|
||||
const title = "Ebiten Demo"
|
||||
|
||||
u := cocoa.UI()
|
||||
u := new(dummy.UI)
|
||||
canvas := u.CreateCanvas(screenWidth, screenHeight, screenScale, title)
|
||||
|
||||
textureFactory := cocoa.TextureFactory()
|
||||
textureFactory := new(dummy.TextureFactory)
|
||||
var game Game = blocks.NewGame(NewTextures(textureFactory))
|
||||
tick := time.Tick(frameTime)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/example/blocks"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/example/blocks"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"image"
|
||||
"os"
|
||||
"sync"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package graphics
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
)
|
||||
|
||||
type Rect struct {
|
||||
|
@ -6,8 +6,8 @@ package opengl
|
||||
// #include <OpenGL/gl.h>
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
)
|
||||
|
||||
func enableAlphaBlending() {
|
||||
|
@ -5,9 +5,9 @@ package opengl
|
||||
// #include <OpenGL/gl.h>
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/opengl/shader"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics/opengl/shader"
|
||||
"image"
|
||||
"math"
|
||||
"sync"
|
||||
|
@ -6,7 +6,7 @@ package opengl
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
)
|
||||
|
||||
type RenderTarget struct {
|
||||
|
@ -6,8 +6,8 @@ package shader
|
||||
// #include <stdlib.h>
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"sync"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ package shader
|
||||
// #include <stdlib.h>
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
|
||||
"github.com/hajimehoshi/ebiten/graphics/matrix"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ package opengl
|
||||
// #include <OpenGL/gl.h>
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"image"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -17,9 +17,9 @@ package cocoa
|
||||
//
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/opengl"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/opengl"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
"runtime"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -8,8 +8,8 @@ package cocoa
|
||||
//
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/graphics/opengl"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/graphics/opengl"
|
||||
"image"
|
||||
"runtime"
|
||||
)
|
||||
|
@ -9,8 +9,8 @@ package cocoa
|
||||
//
|
||||
import "C"
|
||||
import (
|
||||
"github.com/hajimehoshi/go-ebiten/graphics"
|
||||
"github.com/hajimehoshi/go-ebiten/ui"
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
)
|
||||
|
||||
type cocoaUI struct {
|
||||
|
65
ui/dummy/dummy.go
Normal file
65
ui/dummy/dummy.go
Normal file
@ -0,0 +1,65 @@
|
||||
package dummy
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten/graphics"
|
||||
"github.com/hajimehoshi/ebiten/ui"
|
||||
"image"
|
||||
)
|
||||
|
||||
type TextureFactory struct{}
|
||||
|
||||
func (t *TextureFactory) CreateRenderTarget(width, height int, filter graphics.Filter) (graphics.RenderTargetId, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func (t *TextureFactory) CreateTexture(img image.Image, filter graphics.Filter) (graphics.TextureId, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
type UI struct{}
|
||||
|
||||
func (u *UI) CreateCanvas(widht, height, scale int, title string) ui.Canvas {
|
||||
return &Canvas{}
|
||||
}
|
||||
|
||||
func (u *UI) Start() {
|
||||
}
|
||||
|
||||
func (u *UI) DoEvents() {
|
||||
}
|
||||
|
||||
func (u *UI)Terminate() {
|
||||
}
|
||||
|
||||
type Keys struct{}
|
||||
|
||||
func (k *Keys) Includes(key ui.Key) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type InputState struct{}
|
||||
|
||||
func (i *InputState) PressedKeys() ui.Keys {
|
||||
return &Keys{}
|
||||
}
|
||||
|
||||
func (i *InputState) MouseX() int {
|
||||
return -1
|
||||
}
|
||||
|
||||
func (i *InputState) MouseY() int {
|
||||
return -1
|
||||
}
|
||||
|
||||
type Canvas struct{}
|
||||
|
||||
func (c *Canvas) Draw(func(graphics.Context)) {
|
||||
}
|
||||
|
||||
func (c *Canvas) IsClosed() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *Canvas) InputState() ui.InputState {
|
||||
return &InputState{}
|
||||
}
|
Loading…
Reference in New Issue
Block a user