Skip to content

Commit

Permalink
Merge branch 'dev' into luminol-preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Dec 3, 2023
2 parents d60b4aa + 016409a commit eb03d71
Show file tree
Hide file tree
Showing 80 changed files with 12,655 additions and 2,627 deletions.
664 changes: 540 additions & 124 deletions Cargo.lock

Large diffs are not rendered by default.

31 changes: 23 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ egui = "0.23.0"
egui_extras = { version = "0.23.0", features = ["svg", "image"] }
epaint = "0.23.0"

eframe = { version = "0.23.0", features = [
luminol-eframe = { version = "0.23.0", path = "crates/eframe/", features = [
"wgpu",
"accesskit",
"persistence",
"default_fonts",
"x11",
"wayland",
], default-features = false }
egui-wgpu = "0.23.0"
luminol-egui-wgpu = { version = "0.23.0", path = "crates/egui-wgpu/" }
egui_glow = "0.23.0"
egui-winit = "0.23.0"

wgpu = { version = "0.17.2", features = ["naga"] }
wgpu = { version = "0.18.0", features = ["naga"] }
glam = { version = "0.24.2", features = ["bytemuck"] }
image = "0.24.7"

Expand Down Expand Up @@ -95,7 +97,6 @@ rand = "0.8.5"
getrandom = { version = "0.2", features = ["js"] }

luminol-audio = { version = "0.4.0", path = "crates/audio/" }
luminol-app = { version = "0.4.0", path = "crates/app/" }
luminol-components = { version = "0.4.0", path = "crates/components/" }
luminol-config = { version = "0.4.0", path = "crates/config/" }
luminol-core = { version = "0.4.0", path = "crates/core/" }
Expand All @@ -110,11 +111,14 @@ luminol-ui = { version = "0.4.0", path = "crates/ui/" }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
eframe.workspace = true
luminol-eframe.workspace = true
luminol-egui-wgpu.workspace = true
egui.workspace = true
egui_extras.workspace = true
epaint.workspace = true

wgpu.workspace = true

rfd.workspace = true

parking_lot.workspace = true
Expand All @@ -127,7 +131,6 @@ crc = { version = "3.0.1", optional = true }
tracing-subscriber = "0.3.17"
color-backtrace = "0.6.0"

luminol-app.workspace = true
luminol-audio.workspace = true
luminol-core.workspace = true
luminol-config.workspace = true
Expand All @@ -144,6 +147,8 @@ camino.workspace = true

strum.workspace = true

include-bytes-zstd = "0.1.0"

# Native
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
steamworks = { version = "0.10.0", optional = true }
Expand Down Expand Up @@ -183,7 +188,12 @@ tracing-wasm = "0.2"
tracing-log = "0.1.3"
tracing.workspace = true

web-sys = { version = "0.3", features = ["Window"] }
web-sys = { version = "0.3", features = [
"Window",
"Worker",
"WorkerOptions",
"WorkerType",
] }

# Enable wgpu's `webgl` feature if Luminol's `webgl` feature is enabled,
# enabling its WebGL backend and disabling its WebGPU backend
Expand Down Expand Up @@ -220,7 +230,7 @@ opt-level = 1
[profile.dev.package.egui]
opt-level = 3

[profile.dev.package.eframe]
[profile.dev.package.luminol-eframe]
opt-level = 3

# Audio
Expand Down Expand Up @@ -249,6 +259,11 @@ opt-level = 3
# is merged.
cpal = { git = "https://github.com/DouglasDwyer/cpal.git", rev = "91aeb4d6b02c25791f636fdf92a73637597c077a" }

# flume's global spinlock uses `thread::sleep` which doesn't work in the main thread in WebAssembly.
# This is a patched version with `thread::sleep` removed in WebAssembly builds.
# See https://github.com/zesterer/flume/issues/137.
flume = { git = "https://github.com/Astrabit-ST/flume", rev = "d323799efea329c87a3a5a5b45cc76f46da278c2" }

# If you want to use the bleeding edge version of egui and eframe:
# egui = { git = "https://github.com/emilk/egui", branch = "master" }
# eframe = { git = "https://github.com/emilk/egui", branch = "master" }
Expand Down
96 changes: 96 additions & 0 deletions assets/SourceHanSans-Regular.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font
Name 'Source'. Source is a trademark of Adobe in the United States
and/or other countries.

This Font Software is licensed under the SIL Open Font License,
Version 1.1.

This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added assets/SourceHanSans-Regular.ttc
Binary file not shown.
17 changes: 0 additions & 17 deletions crates/app/Cargo.toml

This file was deleted.

42 changes: 0 additions & 42 deletions crates/app/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ luminol-filesystem.workspace = true
egui.workspace = true
strum.workspace = true

egui-wgpu.workspace = true
luminol-egui-wgpu.workspace = true

wgpu.workspace = true
glam.workspace = true
Expand Down
21 changes: 11 additions & 10 deletions crates/components/src/tilepicker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ struct Callback {
unsafe impl Send for Callback {}
unsafe impl Sync for Callback {}

impl egui_wgpu::CallbackTrait for Callback {
impl luminol_egui_wgpu::CallbackTrait for Callback {
fn paint<'a>(
&'a self,
_info: egui::PaintCallbackInfo,
render_pass: &mut wgpu::RenderPass<'a>,
_callback_resources: &'a egui_wgpu::CallbackResources,
_callback_resources: &'a luminol_egui_wgpu::CallbackResources,
) {
self.resources.viewport.bind(1, render_pass);
self.resources.tiles.draw(
Expand Down Expand Up @@ -253,14 +253,15 @@ impl Tilepicker {
),
);
// FIXME: move this into graphics
ui.painter().add(egui_wgpu::Callback::new_paint_callback(
absolute_scroll_rect,
Callback {
resources: self.resources.clone(),
graphics_state: graphics_state.clone(),
coll_enabled,
},
));
ui.painter()
.add(luminol_egui_wgpu::Callback::new_paint_callback(
absolute_scroll_rect,
Callback {
resources: self.resources.clone(),
graphics_state: graphics_state.clone(),
coll_enabled,
},
));

let rect = egui::Rect::from_x_y_ranges(
(self.selected_tiles_left * 32) as f32..=((self.selected_tiles_right + 1) * 32) as f32,
Expand Down
Loading

0 comments on commit eb03d71

Please sign in to comment.