Add files

This commit is contained in:
Reimar 2023-03-21 18:29:48 +01:00
commit 90dca8e9eb
11 changed files with 1509 additions and 0 deletions

35
Cargo.toml Executable file
View File

@ -0,0 +1,35 @@
[package]
name = "tetris-rust"
version = "0.1.0"
authors = ["Reimar <reimarpb@gmail.com>"]
edition = "2018"
include = ["src/res/**"]
build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
ggez = "0.5.1"
lazy_static = "1.4.0"
rand = "0.7.3"
backtrace = "0.3.55"
toml = "0.5.7"
serde = { version = "1.0.117", features = ["serde_derive"] }
winit = { version = "0.19", features = ["serde"] }
serde_json = "1.0.60"
winapi = { version = "0.3.9", features = ["winuser"] }
[build-dependencies]
winres = "0.1.11"
[package.metadata.winres]
Comments = "mojn"
CompanyName = "Mojn A/S"
FileDescription = "Reimtris"
FileVersion = "1.0"
InternalName = "Reimtris"
LegalCopyright = "mojn"
LegalTrademark = "mojn"
OriginalFileName = "Reimtris.exe"
ProductName = "Reimtris"
ProductVersion = "1.0"

11
build.rs Executable file
View File

@ -0,0 +1,11 @@
extern crate winres;
use winres::WindowsResource;
fn main() {
if cfg!(target_os = "windows") {
let mut res = WindowsResource::new();
res.set_icon("src/res/reimtris.ico");
res.compile().unwrap();
}
}

1447
src/main.rs Executable file

File diff suppressed because it is too large Load Diff

14
src/res/default_config.toml Executable file
View File

@ -0,0 +1,14 @@
muted = false
# List of keys: https://docs.rs/winit/0.23.0/winit/event/enum.VirtualKeyCode.html#variants
[controls]
move_left = "Left"
move_right = "Right"
rotate_cw = "X"
rotate_ccw = "Z"
soft_drop = "Down"
hard_drop = "Space"
hold = "Up"
pause = "Escape"
mute = "M"
restart = "Return"

2
src/res/desktop.ini Executable file
View File

@ -0,0 +1,2 @@
[LocalizedFileNames]
media1.m4a=@media1.m4a,0

BIN
src/res/hard_drop.ogg Executable file

Binary file not shown.

BIN
src/res/josenfin_sans_regular.ttf Executable file

Binary file not shown.

BIN
src/res/line_clear.ogg Executable file

Binary file not shown.

BIN
src/res/move.ogg Executable file

Binary file not shown.

BIN
src/res/music.ogg Executable file

Binary file not shown.

BIN
src/res/rotation.ogg Executable file

Binary file not shown.