correct build errors
This commit is contained in:
parent
aebd34ec31
commit
7242a9c866
8 changed files with 675 additions and 196 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -19,4 +19,3 @@
|
||||||
/build/
|
/build/
|
||||||
/.rust/
|
/.rust/
|
||||||
rusti.sh
|
rusti.sh
|
||||||
|
|
||||||
|
|
|
||||||
778
Cargo.lock
generated
778
Cargo.lock
generated
|
|
@ -2,328 +2,816 @@
|
||||||
name = "rust-2048"
|
name = "rust-2048"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"piston 0.1.1 (git+https://github.com/pistondevelopers/piston)",
|
"piston2d-opengl_graphics 0.22.0 (git+https://github.com/PistonDevelopers/opengl_graphics.git)",
|
||||||
"piston2d-graphics 0.0.46 (git+https://github.com/pistondevelopers/graphics)",
|
"piston_window 0.33.0 (git+https://github.com/pistondevelopers/piston_window)",
|
||||||
"piston2d-opengl_graphics 0.0.16 (git+https://github.com/pistondevelopers/opengl_graphics)",
|
"pistoncore-sdl2_window 0.23.0 (git+https://github.com/pistondevelopers/sdl2_window)",
|
||||||
"pistoncore-sdl2_window 0.0.13 (git+https://github.com/pistondevelopers/sdl2_window)",
|
"rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "advapi32-sys"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "android_glue"
|
||||||
|
version = "0.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "0.1.1"
|
version = "0.3.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
version = "0.3.9"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clock_ticks"
|
name = "cgl"
|
||||||
version = "0.0.5"
|
version = "0.1.3"
|
||||||
source = "git+https://github.com/tomaka/clock_ticks#462848731d99ed2f800e2e5a19e2d8ca3b11c90c"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cocoa"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "color_quant"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "core-foundation"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"core-foundation-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "core-foundation-sys"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "core-graphics"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dlib"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libloading 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "draw_state"
|
name = "draw_state"
|
||||||
version = "0.0.7"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/gfx-rs/draw_state#44a0aed11abccbf970fc7efbe84b6482f0548248"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dwmapi-sys"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dylib"
|
||||||
|
version = "0.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "enum_primitive"
|
name = "enum_primitive"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "flate2"
|
||||||
|
version = "0.2.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "freetype-rs"
|
name = "freetype-rs"
|
||||||
version = "0.0.9"
|
version = "0.4.2"
|
||||||
source = "git+https://github.com/PistonDevelopers/freetype-rs.git#686a4d7ff99eddfc64fbe7d2c3a19832ee564614"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"freetype-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"freetype-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "freetype-sys"
|
name = "freetype-sys"
|
||||||
version = "0.0.5"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libz-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libz-sys 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gcc"
|
||||||
|
version = "0.3.21"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gdi32-sys"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gfx"
|
||||||
|
version = "0.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"draw_state 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gfx_device_gl"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gfx 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gfx_gl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gfx_gl"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gl_generator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gif"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lzw 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gl"
|
name = "gl"
|
||||||
version = "0.0.12"
|
version = "0.5.2"
|
||||||
source = "git+https://github.com/bjz/gl-rs#62b66a85e4c2c0d88fb916040bc462702c8e0346"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gl_common 0.0.4 (git+https://github.com/bjz/gl-rs)",
|
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gl_generator 0.0.25 (git+https://github.com/bjz/gl-rs)",
|
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"khronos_api 0.0.5 (git+https://github.com/bjz/gl-rs)",
|
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gl_common"
|
name = "gl_common"
|
||||||
version = "0.0.4"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/bjz/gl-rs#62b66a85e4c2c0d88fb916040bc462702c8e0346"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gl_generator"
|
name = "gl_generator"
|
||||||
version = "0.0.25"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/bjz/gl-rs#62b66a85e4c2c0d88fb916040bc462702c8e0346"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"khronos_api 0.0.5 (git+https://github.com/bjz/gl-rs)",
|
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xml-rs 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xml-rs 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gl_generator"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gleam"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "glob"
|
||||||
|
version = "0.2.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "glutin"
|
||||||
|
version = "0.4.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"shared_library 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-client 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-kbd 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-window 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"x11-dl 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "image"
|
name = "image"
|
||||||
version = "0.3.9"
|
version = "0.6.1"
|
||||||
source = "git+https://github.com/pistondevelopers/image#75f9b791d6b030bc975ec737e9a2d78de39331af"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"enum_primitive 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"enum_primitive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gif 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"png 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "inflate"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "interpolation"
|
name = "interpolation"
|
||||||
version = "0.0.5"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/PistonDevelopers/interpolation#c0c9e970e42a48402514285a5608e4729cf83298"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kernel32-sys"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "khronos_api"
|
name = "khronos_api"
|
||||||
version = "0.0.5"
|
version = "0.0.8"
|
||||||
source = "git+https://github.com/bjz/gl-rs#62b66a85e4c2c0d88fb916040bc462702c8e0346"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "khronos_api"
|
name = "khronos_api"
|
||||||
version = "0.0.5"
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazy_static"
|
||||||
|
version = "0.1.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.1.7"
|
version = "0.1.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libz-sys"
|
name = "libc"
|
||||||
version = "0.1.3"
|
version = "0.2.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libloading"
|
||||||
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libz-sys"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pkg-config 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.3.1"
|
version = "0.3.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lzw"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "malloc_buf"
|
||||||
|
version = "0.0.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miniz-sys"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mmap"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num"
|
name = "num"
|
||||||
version = "0.1.24"
|
version = "0.1.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "objc"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "osmesa-sys"
|
||||||
|
version = "0.0.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"shared_library 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston"
|
name = "piston"
|
||||||
version = "0.1.1"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/pistondevelopers/piston#e4b588cf22275acb230a4d6baace2567ea66391a"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pistoncore-event 0.1.3 (git+https://github.com/pistondevelopers/event)",
|
"pistoncore-event_loop 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-input 0.0.9 (git+https://github.com/pistondevelopers/input)",
|
"pistoncore-input 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-window 0.1.2 (git+https://github.com/pistondevelopers/window)",
|
"pistoncore-window 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston-float"
|
name = "piston-float"
|
||||||
version = "0.0.1"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/pistondevelopers/float#2c73a3e34c384c79e95b35c069d5a69dda3a0cc4"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "piston-gfx_texture"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gfx 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"image 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston-texture 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston-shaders_graphics2d"
|
name = "piston-shaders_graphics2d"
|
||||||
version = "0.0.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pistondevelopers/shaders#a2cbd6c63b5cb6852f2bef9e28e04301bca96efe"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston-texture"
|
name = "piston-texture"
|
||||||
version = "0.0.1"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/pistondevelopers/texture#3cc4cddc3f8c51c36ea11dd2f63d70aa887f53fb"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston-viewport"
|
name = "piston-viewport"
|
||||||
version = "0.0.2"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/pistondevelopers/viewport#3819edeb0982d2552669e03ad9c0317e75340510"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"piston-float 0.0.1 (git+https://github.com/pistondevelopers/float)",
|
"piston-float 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "piston2d-gfx_graphics"
|
||||||
|
version = "0.17.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"freetype-rs 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"gfx 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston-gfx_texture 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston-shaders_graphics2d 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston2d-graphics 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston2d-graphics"
|
name = "piston2d-graphics"
|
||||||
version = "0.0.46"
|
version = "0.13.1"
|
||||||
source = "git+https://github.com/pistondevelopers/graphics#e5885956fd49bafa968f85976b153b341a473389"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"draw_state 0.0.7 (git+https://github.com/gfx-rs/draw_state)",
|
"draw_state 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"interpolation 0.0.5 (git+https://github.com/PistonDevelopers/interpolation)",
|
"interpolation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston-texture 0.0.1 (git+https://github.com/pistondevelopers/texture)",
|
"piston-texture 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston-viewport 0.0.2 (git+https://github.com/pistondevelopers/viewport)",
|
"piston-viewport 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"read_color 0.0.2 (git+https://github.com/PistonDevelopers/read_color)",
|
"read_color 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"vecmath 0.0.22 (git+https://github.com/PistonDevelopers/vecmath)",
|
"vecmath 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "piston2d-opengl_graphics"
|
name = "piston2d-opengl_graphics"
|
||||||
version = "0.0.16"
|
version = "0.22.0"
|
||||||
source = "git+https://github.com/pistondevelopers/opengl_graphics#c5d22694c53d58290b9e58e3411053d39250da89"
|
source = "git+https://github.com/PistonDevelopers/opengl_graphics.git#34cd83d798d55beed0e9696c2b6b7343ae532b79"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"freetype-rs 0.0.9 (git+https://github.com/PistonDevelopers/freetype-rs.git)",
|
"freetype-rs 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gl 0.0.12 (git+https://github.com/bjz/gl-rs)",
|
"gl 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"image 0.3.9 (git+https://github.com/pistondevelopers/image)",
|
"image 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"khronos_api 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"piston-shaders_graphics2d 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston-shaders_graphics2d 0.0.0 (git+https://github.com/pistondevelopers/shaders)",
|
"piston-texture 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston-texture 0.0.1 (git+https://github.com/pistondevelopers/texture)",
|
"piston2d-graphics 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston2d-graphics 0.0.46 (git+https://github.com/pistondevelopers/graphics)",
|
"shader_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"shader_version 0.0.6 (git+https://github.com/pistondevelopers/shader_version)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pistoncore-event"
|
name = "piston_window"
|
||||||
version = "0.1.3"
|
version = "0.33.0"
|
||||||
source = "git+https://github.com/pistondevelopers/event#c51e721f4b346fe7cc8a4c0e2658a70d257202ce"
|
source = "git+https://github.com/pistondevelopers/piston_window#2174a533308b793f6936a5dd78f0218149c6f73f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pistoncore-event_loop 0.1.5 (git+https://github.com/PistonDevelopers/event_loop)",
|
"gfx 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-input 0.0.9 (git+https://github.com/pistondevelopers/input)",
|
"gfx_device_gl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-window 0.1.2 (git+https://github.com/pistondevelopers/window)",
|
"piston 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston2d-gfx_graphics 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"piston2d-graphics 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pistoncore-glutin_window 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"shader_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pistoncore-event_loop"
|
name = "pistoncore-event_loop"
|
||||||
version = "0.1.5"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/PistonDevelopers/event_loop#d7541e44e33016b0584579e800879120cf982639"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clock_ticks 0.0.5 (git+https://github.com/tomaka/clock_ticks)",
|
"piston-viewport 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston-viewport 0.0.2 (git+https://github.com/pistondevelopers/viewport)",
|
"pistoncore-input 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-window 0.1.2 (git+https://github.com/pistondevelopers/window)",
|
"pistoncore-window 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pistoncore-glutin_window"
|
||||||
|
version = "0.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"gl 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"glutin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pistoncore-input 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pistoncore-window 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"shader_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pistoncore-input"
|
name = "pistoncore-input"
|
||||||
version = "0.0.9"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/pistondevelopers/input#cb0615041f0dd1e4cd1cfc6d4e0e4bae0a575a8e"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"piston-viewport 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pistoncore-sdl2_window"
|
name = "pistoncore-sdl2_window"
|
||||||
version = "0.0.13"
|
version = "0.23.0"
|
||||||
source = "git+https://github.com/pistondevelopers/sdl2_window#d9dd95cadd5c8de09ddb163812761738b999b3f4"
|
source = "git+https://github.com/pistondevelopers/sdl2_window#e2fbd22dbd9ba03a5c33a276b134a92bb318dff9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gl 0.0.12 (git+https://github.com/bjz/gl-rs)",
|
"gl 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pistoncore-input 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"piston 0.1.1 (git+https://github.com/pistondevelopers/piston)",
|
"pistoncore-window 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sdl2 0.2.3 (git+https://github.com/AngryLawyer/rust-sdl2)",
|
"sdl2 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"shader_version 0.0.6 (git+https://github.com/pistondevelopers/shader_version)",
|
"shader_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pistoncore-window"
|
name = "pistoncore-window"
|
||||||
version = "0.1.2"
|
version = "0.14.0"
|
||||||
source = "git+https://github.com/pistondevelopers/window#73314c130ce0b8fc22e47fc636a4724b6e02a365"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pistoncore-input 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pistoncore-input 0.0.9 (git+https://github.com/pistondevelopers/input)",
|
"shader_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pkg-config"
|
name = "pkg-config"
|
||||||
version = "0.3.4"
|
version = "0.3.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "png"
|
||||||
version = "0.3.8"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"inflate 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand"
|
||||||
|
version = "0.3.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "read_color"
|
name = "read_color"
|
||||||
version = "0.0.2"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/PistonDevelopers/read_color#568723fb7d9a69833e1d5a5ec79ded8ce9562920"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-serialize"
|
name = "rustc-serialize"
|
||||||
version = "0.3.14"
|
version = "0.3.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sdl2"
|
name = "sdl2"
|
||||||
version = "0.2.3"
|
version = "0.13.0"
|
||||||
source = "git+https://github.com/AngryLawyer/rust-sdl2#f270e9879cd91324a3adc7c0367971e7cda27b9c"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sdl2-sys 0.2.2 (git+https://github.com/AngryLawyer/rust-sdl2)",
|
"sdl2-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sdl2-sys"
|
name = "sdl2-sys"
|
||||||
version = "0.2.2"
|
version = "0.8.0"
|
||||||
source = "git+https://github.com/AngryLawyer/rust-sdl2#f270e9879cd91324a3adc7c0367971e7cda27b9c"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "0.6.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"num 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shader_version"
|
name = "shader_version"
|
||||||
version = "0.0.6"
|
version = "0.2.1"
|
||||||
source = "git+https://github.com/pistondevelopers/shader_version#14aa73be33b6d23d6b3cb27f94426545372df287"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "shared_library"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "shell32-sys"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tempdir"
|
||||||
|
version = "0.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tempfile"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time"
|
||||||
|
version = "0.1.34"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "user32-sys"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vecmath"
|
name = "vecmath"
|
||||||
version = "0.0.22"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/PistonDevelopers/vecmath#d6bb5cf609b51cae8f296945e179bd42a74c9a51"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"piston-float 0.0.1 (git+https://github.com/pistondevelopers/float)",
|
"piston-float 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-client"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"crossbeam 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"dlib 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-scanner 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-sys 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-kbd"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"dlib 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"mmap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-client 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-scanner"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"xml-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-sys"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"dlib 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-window"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"tempfile 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"wayland-client 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi"
|
||||||
|
version = "0.2.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-build"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "x11-dl"
|
||||||
|
version = "2.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"dylib 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xml-rs"
|
name = "xml-rs"
|
||||||
version = "0.1.25"
|
version = "0.1.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xml-rs"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
10
Cargo.toml
10
Cargo.toml
|
|
@ -13,14 +13,12 @@ path = "src/main.rs"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
rand = "0.3.7"
|
rand = "0.3.7"
|
||||||
|
|
||||||
[dependencies.piston2d-graphics]
|
[dependencies.piston_window]
|
||||||
git = "https://github.com/pistondevelopers/graphics"
|
git = "https://github.com/pistondevelopers/piston_window"
|
||||||
|
|
||||||
[dependencies.piston]
|
|
||||||
git = "https://github.com/pistondevelopers/piston"
|
|
||||||
|
|
||||||
[dependencies.piston2d-opengl_graphics]
|
[dependencies.piston2d-opengl_graphics]
|
||||||
git = "https://github.com/pistondevelopers/opengl_graphics"
|
git = "https://github.com/PistonDevelopers/opengl_graphics.git"
|
||||||
|
|
||||||
[dependencies.pistoncore-sdl2_window]
|
[dependencies.pistoncore-sdl2_window]
|
||||||
git = "https://github.com/pistondevelopers/sdl2_window"
|
git = "https://github.com/pistondevelopers/sdl2_window"
|
||||||
|
|
||||||
|
|
|
||||||
34
src/app.rs
34
src/app.rs
|
|
@ -1,22 +1,20 @@
|
||||||
use std::path::{ Path, PathBuf };
|
use std::path::{ Path, PathBuf };
|
||||||
|
|
||||||
use graphics::*;
|
use piston_window::*;
|
||||||
use piston::input::Button;
|
use opengl_graphics::GlGraphics;
|
||||||
use piston::event::*;
|
use opengl_graphics::Texture as GlTexture;
|
||||||
|
|
||||||
use board::Board;
|
use board::Board;
|
||||||
use number_renderer::NumberRenderer;
|
use number_renderer::NumberRenderer;
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use opengl_graphics::{ GlGraphics, Texture };
|
|
||||||
|
|
||||||
pub struct App<'a> {
|
pub struct App<'a> {
|
||||||
board: Board<'a>,
|
board: Board<'a>,
|
||||||
number_renderer: Option<NumberRenderer>,
|
number_renderer: Option<NumberRenderer>,
|
||||||
settings: &'a Settings,
|
settings: &'a Settings,
|
||||||
|
|
||||||
logo: Option<Texture>,
|
logo: Option<GlTexture>,
|
||||||
comment1: Option<Texture>,
|
comment1: Option<GlTexture>,
|
||||||
comment2: Option<Texture>,
|
comment2: Option<GlTexture>,
|
||||||
window_background_color: [f32; 4],
|
window_background_color: [f32; 4],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,9 +35,7 @@ impl<'a> App<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_ui(&self, c: &Context, gl: &mut GlGraphics) {
|
fn render_ui(&self, c: &Context, gl: &mut GlGraphics) {
|
||||||
use graphics::*;
|
Image::new_color(rgb2rgba(self.settings.text_dark_color))
|
||||||
|
|
||||||
Image::new_colored(rgb2rgba(self.settings.text_dark_color))
|
|
||||||
.draw(self.logo.iter().next().unwrap(),
|
.draw(self.logo.iter().next().unwrap(),
|
||||||
default_draw_state(),
|
default_draw_state(),
|
||||||
c.trans(self.settings.board_padding,self.settings.board_padding).transform,
|
c.trans(self.settings.board_padding,self.settings.board_padding).transform,
|
||||||
|
|
@ -59,12 +55,12 @@ impl<'a> App<'a> {
|
||||||
App::render_comment(self.settings, comment2, comment2_offset_y, c, gl);
|
App::render_comment(self.settings, comment2, comment2_offset_y, c, gl);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_comment(settings: &Settings, comment: &Texture, y: f64, c: &Context, gl: &mut GlGraphics) {
|
fn render_comment(settings: &Settings, comment: &GlTexture, y: f64, c: &Context, gl: &mut GlGraphics) {
|
||||||
let (width, height) = comment.get_size();
|
let (width, height) = comment.get_size();
|
||||||
let w = settings.window_size[0] as f64 - 2.0 * settings.board_padding;
|
let w = settings.window_size[0] as f64 - 2.0 * settings.board_padding;
|
||||||
let h = height as f64 * w / width as f64;
|
let h = height as f64 * w / width as f64;
|
||||||
|
|
||||||
Image::new_colored(rgb2rgba(settings.text_dark_color))
|
Image::new_color(rgb2rgba(settings.text_dark_color))
|
||||||
.rect([settings.board_padding, y, w, h])
|
.rect([settings.board_padding, y, w, h])
|
||||||
.draw( comment,
|
.draw( comment,
|
||||||
default_draw_state(),
|
default_draw_state(),
|
||||||
|
|
@ -84,13 +80,13 @@ impl<'a> App<'a> {
|
||||||
comment2_path.push(Path::new("comment2.png"));
|
comment2_path.push(Path::new("comment2.png"));
|
||||||
|
|
||||||
self.number_renderer = Some(NumberRenderer::new());
|
self.number_renderer = Some(NumberRenderer::new());
|
||||||
self.logo = Some(Texture::from_path(&logo_path).unwrap());
|
self.logo = Some(GlTexture::from_path(&logo_path).unwrap());
|
||||||
self.comment1 = Some(Texture::from_path(&comment1_path).unwrap());
|
self.comment1 = Some(GlTexture::from_path(&comment1_path).unwrap());
|
||||||
self.comment2 = Some(Texture::from_path(&comment2_path).unwrap());
|
self.comment2 = Some(GlTexture::from_path(&comment2_path).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(&mut self, args: &RenderArgs, gl: &mut GlGraphics) {
|
pub fn render(&mut self, args: &RenderArgs, gl: &mut GlGraphics) {
|
||||||
let ref c = Context::abs(args.width as f64, args.height as f64);
|
let ref c = Context::new_abs(args.width as f64, args.height as f64);
|
||||||
|
|
||||||
let w_bg_col = self.window_background_color;
|
let w_bg_col = self.window_background_color;
|
||||||
let ref nr = self.number_renderer;
|
let ref nr = self.number_renderer;
|
||||||
|
|
@ -108,8 +104,8 @@ impl<'a> App<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn key_press(&mut self, args: &Button) {
|
pub fn key_press(&mut self, args: &Button) {
|
||||||
use piston::input::Button::Keyboard;
|
use piston_window::Button::Keyboard;
|
||||||
use piston::input::keyboard::Key;
|
use piston_window::Key;
|
||||||
|
|
||||||
if *args == Keyboard(Key::Left) {
|
if *args == Keyboard(Key::Left) {
|
||||||
self.board.merge_from_right_to_left();
|
self.board.merge_from_right_to_left();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use rand::random;
|
use rand::random;
|
||||||
use graphics::*;
|
use piston_window::*;
|
||||||
use opengl_graphics::{ GlGraphics };
|
use opengl_graphics::GlGraphics;
|
||||||
use number_renderer::NumberRenderer;
|
use number_renderer::NumberRenderer;
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
use tile::{ Tile, TileState };
|
use tile::{ Tile, TileState };
|
||||||
|
|
|
||||||
27
src/main.rs
27
src/main.rs
|
|
@ -1,15 +1,11 @@
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
extern crate piston_window;
|
||||||
extern crate graphics;
|
|
||||||
extern crate piston;
|
|
||||||
extern crate opengl_graphics;
|
extern crate opengl_graphics;
|
||||||
extern crate sdl2_window;
|
extern crate sdl2_window;
|
||||||
|
|
||||||
use piston::event::*;
|
use piston_window::*;
|
||||||
use piston::window::{ WindowSettings, Size };
|
|
||||||
use sdl2_window::Sdl2Window;
|
use sdl2_window::Sdl2Window;
|
||||||
use opengl_graphics::{ GlGraphics, OpenGL };
|
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod board;
|
mod board;
|
||||||
|
|
@ -18,25 +14,26 @@ mod settings;
|
||||||
mod tile;
|
mod tile;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
use opengl_graphics::GlGraphics;
|
||||||
let settings = settings::Settings::load();
|
let settings = settings::Settings::load();
|
||||||
|
|
||||||
let window = Sdl2Window::new(
|
let (width, height) = (settings.window_size[0],
|
||||||
OpenGL::_3_2,
|
settings.window_size[1]);
|
||||||
WindowSettings::new(
|
|
||||||
"Rust-2048".to_string(),
|
let window: PistonWindow<(), Sdl2Window> =
|
||||||
Size { width: settings.window_size[0], height: settings.window_size[1] })
|
WindowSettings::new("Rust-2048", [width, height])
|
||||||
.exit_on_esc(true)
|
.exit_on_esc(true)
|
||||||
);
|
.opengl(OpenGL::V3_2)
|
||||||
|
.build()
|
||||||
|
.unwrap_or_else(|e| { panic!("Failed to build PistonWindow: {}", e) });
|
||||||
|
|
||||||
let mut app = app::App::new(&settings);
|
let mut app = app::App::new(&settings);
|
||||||
|
|
||||||
app.load();
|
app.load();
|
||||||
|
|
||||||
let mut gl = GlGraphics::new(OpenGL::_3_2);
|
let mut gl = GlGraphics::new(OpenGL::V3_2);
|
||||||
|
|
||||||
for e in window.events() {
|
for e in window.events() {
|
||||||
use piston::event::{ RenderEvent, PressEvent };
|
|
||||||
|
|
||||||
if let Some(ref args) = e.render_args() {
|
if let Some(ref args) = e.render_args() {
|
||||||
app.render(args, &mut gl);
|
app.render(args, &mut gl);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use graphics::*;
|
use piston_window::*;
|
||||||
use opengl_graphics::{ GlGraphics, Texture };
|
use opengl_graphics::GlGraphics;
|
||||||
|
use opengl_graphics::Texture as GlTexture;
|
||||||
|
|
||||||
static DIGITS_WIDTH: f64 = 20.0;
|
static DIGITS_WIDTH: f64 = 20.0;
|
||||||
static DIGITS_HEIGHT: f64 = 26.0;
|
static DIGITS_HEIGHT: f64 = 26.0;
|
||||||
|
|
||||||
pub struct NumberRenderer {
|
pub struct NumberRenderer {
|
||||||
image: Texture,
|
image: GlTexture,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NumberRenderer {
|
impl NumberRenderer {
|
||||||
pub fn new() -> NumberRenderer {
|
pub fn new() -> NumberRenderer {
|
||||||
NumberRenderer {
|
NumberRenderer {
|
||||||
image: Texture::from_path(Path::new("bin/assets/digits.png")).unwrap(),
|
image: GlTexture::from_path(Path::new("bin/assets/digits.png")).unwrap(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,7 +32,7 @@ impl NumberRenderer {
|
||||||
let y = center_y - height / 2.0;
|
let y = center_y - height / 2.0;
|
||||||
|
|
||||||
for digit in digits.iter() {
|
for digit in digits.iter() {
|
||||||
Image::new_colored([color[0], color[1], color[2], 1.0])
|
Image::new_color([color[0], color[1], color[2], 1.0])
|
||||||
.src_rect([(*digit * DIGITS_WIDTH as u32) as i32, 0, DIGITS_WIDTH as i32, DIGITS_HEIGHT as i32])
|
.src_rect([(*digit * DIGITS_WIDTH as u32) as i32, 0, DIGITS_WIDTH as i32, DIGITS_HEIGHT as i32])
|
||||||
.rect([x, y, width, height])
|
.rect([x, y, width, height])
|
||||||
.draw(&self.image,
|
.draw(&self.image,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use graphics::*;
|
use piston_window::*;
|
||||||
use opengl_graphics::GlGraphics;
|
use opengl_graphics::GlGraphics;
|
||||||
use number_renderer::NumberRenderer;
|
use number_renderer::NumberRenderer;
|
||||||
use settings::Settings;
|
use settings::Settings;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue