diff --git a/example/blocks/field.go b/example/blocks/field.go index 7e43531eb..6a7b4ee35 100644 --- a/example/blocks/field.go +++ b/example/blocks/field.go @@ -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 { diff --git a/example/blocks/font.go b/example/blocks/font.go index 5acb1dc98..c6db86bdb 100644 --- a/example/blocks/font.go +++ b/example/blocks/font.go @@ -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" ) diff --git a/example/blocks/game.go b/example/blocks/game.go index 8c7a45101..7a19698ed 100644 --- a/example/blocks/game.go +++ b/example/blocks/game.go @@ -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" ) diff --git a/example/blocks/game_scene.go b/example/blocks/game_scene.go index c919b2074..38691b2af 100644 --- a/example/blocks/game_scene.go +++ b/example/blocks/game_scene.go @@ -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" diff --git a/example/blocks/input.go b/example/blocks/input.go index ecc106828..46c6f459a 100644 --- a/example/blocks/input.go +++ b/example/blocks/input.go @@ -1,7 +1,7 @@ package blocks import ( - "github.com/hajimehoshi/go-ebiten/ui" + "github.com/hajimehoshi/ebiten/ui" ) type Input struct { diff --git a/example/blocks/piece.go b/example/blocks/piece.go index 613a741fd..818ad12f3 100644 --- a/example/blocks/piece.go +++ b/example/blocks/piece.go @@ -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() { diff --git a/example/blocks/scene_manager.go b/example/blocks/scene_manager.go index ad288ee90..e12118a09 100644 --- a/example/blocks/scene_manager.go +++ b/example/blocks/scene_manager.go @@ -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() { diff --git a/example/blocks/title_scene.go b/example/blocks/title_scene.go index 87d2a5921..0512b6062 100644 --- a/example/blocks/title_scene.go +++ b/example/blocks/title_scene.go @@ -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" ) diff --git a/example/main.go b/example/main.go index f9fd63f66..ae0542e68 100644 --- a/example/main.go +++ b/example/main.go @@ -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) diff --git a/example/textures.go b/example/textures.go index cf7f0f6f0..41ddc340f 100644 --- a/example/textures.go +++ b/example/textures.go @@ -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" diff --git a/graphics/context.go b/graphics/context.go index 5a04a2841..60698a2ea 100644 --- a/graphics/context.go +++ b/graphics/context.go @@ -1,7 +1,7 @@ package graphics import ( - "github.com/hajimehoshi/go-ebiten/graphics/matrix" + "github.com/hajimehoshi/ebiten/graphics/matrix" ) type Rect struct { diff --git a/graphics/opengl/context.go b/graphics/opengl/context.go index 29ae612b9..5d156419b 100644 --- a/graphics/opengl/context.go +++ b/graphics/opengl/context.go @@ -6,8 +6,8 @@ package opengl // #include 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() { diff --git a/graphics/opengl/ids.go b/graphics/opengl/ids.go index 400e073b7..c93c215b0 100644 --- a/graphics/opengl/ids.go +++ b/graphics/opengl/ids.go @@ -5,9 +5,9 @@ package opengl // #include 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" diff --git a/graphics/opengl/render_target.go b/graphics/opengl/render_target.go index e028a730f..df9e29476 100644 --- a/graphics/opengl/render_target.go +++ b/graphics/opengl/render_target.go @@ -6,7 +6,7 @@ package opengl import "C" import ( "fmt" - "github.com/hajimehoshi/go-ebiten/graphics" + "github.com/hajimehoshi/ebiten/graphics" ) type RenderTarget struct { diff --git a/graphics/opengl/shader/draw_texture.go b/graphics/opengl/shader/draw_texture.go index 77608c578..9d82813b5 100644 --- a/graphics/opengl/shader/draw_texture.go +++ b/graphics/opengl/shader/draw_texture.go @@ -6,8 +6,8 @@ package shader // #include 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" ) diff --git a/graphics/opengl/shader/program.go b/graphics/opengl/shader/program.go index fde2c4e1b..41800d8e2 100644 --- a/graphics/opengl/shader/program.go +++ b/graphics/opengl/shader/program.go @@ -6,7 +6,7 @@ package shader // #include import "C" import ( - "github.com/hajimehoshi/go-ebiten/graphics/matrix" + "github.com/hajimehoshi/ebiten/graphics/matrix" "unsafe" ) diff --git a/graphics/opengl/texture.go b/graphics/opengl/texture.go index 25b0679ae..1f5f07607 100644 --- a/graphics/opengl/texture.go +++ b/graphics/opengl/texture.go @@ -5,7 +5,7 @@ package opengl // #include import "C" import ( - "github.com/hajimehoshi/go-ebiten/graphics" + "github.com/hajimehoshi/ebiten/graphics" "image" "unsafe" ) diff --git a/ui/cocoa/game_window.go b/ui/cocoa/game_window.go index 4eba435f6..620e1c3e9 100644 --- a/ui/cocoa/game_window.go +++ b/ui/cocoa/game_window.go @@ -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" diff --git a/ui/cocoa/shared_context.go b/ui/cocoa/shared_context.go index a56b0e407..8e404ac07 100644 --- a/ui/cocoa/shared_context.go +++ b/ui/cocoa/shared_context.go @@ -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" ) diff --git a/ui/cocoa/ui.go b/ui/cocoa/ui.go index f226833d5..d31da9748 100644 --- a/ui/cocoa/ui.go +++ b/ui/cocoa/ui.go @@ -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 { diff --git a/ui/dummy/dummy.go b/ui/dummy/dummy.go new file mode 100644 index 000000000..f48273a24 --- /dev/null +++ b/ui/dummy/dummy.go @@ -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{} +} diff --git a/ui/ui.go b/ui/ui.go index 8431ec0db..dc9feddfc 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -1,7 +1,7 @@ package ui import ( - "github.com/hajimehoshi/go-ebiten/graphics" + "github.com/hajimehoshi/ebiten/graphics" ) type Key int