uh, left this project for a few days so idk

This commit is contained in:
LunarAkai 2025-07-31 22:04:00 +02:00
commit 168cdd6cf8
18 changed files with 76 additions and 11 deletions

5
Cargo.lock generated
View file

@ -506,6 +506,10 @@ dependencies = [
name = "moonhare_event"
version = "0.1.0"
[[package]]
name = "moonhare_game"
version = "0.1.0"
[[package]]
name = "moonhare_graphics"
version = "0.1.0"
@ -515,6 +519,7 @@ name = "moonhare_internal"
version = "0.1.0"
dependencies = [
"moonhare_event",
"moonhare_game",
"moonhare_graphics",
"moonhare_log",
"moonhare_window",

View file

@ -7,6 +7,7 @@ members = [
]
[workspace.package]
name = "moonhare_engine"
version = "0.1.0"
authors = ["LunarAkai"]

View file

@ -1,3 +1,4 @@
//! Defines various Events for the Moonhare Game Engine
pub mod event;
pub mod event_listener;
pub mod events;

View file

@ -0,0 +1,7 @@
[package]
name = "moonhare_game"
edition = "2024"
version.workspace = true
authors.workspace = true
[dependencies]

View file

@ -0,0 +1,2 @@
pub mod node;
pub mod window;

View file

@ -0,0 +1,3 @@
pub trait Node {
}

View file

@ -0,0 +1,10 @@
use crate::basic::{node::Node};
pub struct GameWindow {
}
impl Node for GameWindow {
}

View file

@ -0,0 +1,19 @@
//! Base functionality for a Moonhare Game Engine Project
pub mod basic;
/// Only one Game may exist per project
pub struct Game {
pub name: String
}
impl Default for Game {
fn default() -> Self {
Self {
name: default_game_name()
}
}
}
fn default_game_name() -> String {
"Moonhare Game".to_owned()
}

View file

@ -1,4 +1,4 @@
/// Crate for providing an abstraction layer over different graphics APIs
//! Crate for providing an abstraction layer over different graphics APIs
pub mod graphics_server;
pub mod shader;

View file

@ -6,6 +6,7 @@ authors.workspace = true
[dependencies]
moonhare_event = { path = "../moonhare_event" }
moonhare_game = { path = "../moonhare_game" }
moonhare_graphics = { path = "../moonhare_graphics" }
moonhare_log = { path = "../moonhare_log" }
moonhare_window = { path = "../moonhare_window" }

View file

@ -1,4 +1,5 @@
pub use moonhare_event as event;
pub use moonhare_game as game;
pub use moonhare_graphics as graphics;
pub use moonhare_log as log;
pub use moonhare_window as window;

View file

@ -1,5 +1,4 @@
/// Wrapper around `log` and `fern` crates
///
//! Wrapper around `log` and `fern` crates
use std::{fmt::Display, io, time::SystemTime};
/// Configures the Log Output Settings

View file

@ -1,2 +1,3 @@
//! Provides an abstraction above Winit functionality
pub mod window_config;
pub mod winit_window;

View file

@ -1,5 +1,3 @@
use std::{any::Any, string};
/// General Config for [`WinitWindow`](crate::winit::winit_window::WinitWindow)
pub struct WindowConfig {
pub title: String,

View file

@ -1,6 +1,4 @@
use std::error::Error;
use winit::{application::ApplicationHandler, dpi::LogicalSize, event::WindowEvent, event_loop::{ActiveEventLoop, EventLoop}, window::{Window, WindowAttributes, WindowId}};
use winit::{application::ApplicationHandler, dpi::LogicalSize, event::WindowEvent, event_loop::ActiveEventLoop, window::{Window, WindowAttributes}};
use crate::window_config::WindowConfig;

View file

@ -1 +1 @@
# MoonhareEngine
# MoonhareEngine

View file

@ -1,3 +1,21 @@
//! Moonhare Game Engine
pub use moonhare_internal::*;
pub const ENGINE_NAME: &str = "Moonhare Engine";
pub const ENGINE_NAME: &str = "Moonhare Engine";
/*
Game: (not a node, only one game may exist)
- Window(s) (node)
- Scene1 (node)
- Node
- Node
- ...
- Scene2 (node)
- ...
------------------
Node
- Optional<Components>
- Optional<Script>
-----------------------
*/

View file

@ -1,4 +1,5 @@
use moonhare_engine::{event, log::{self}, window::{self, winit_window::WinitWindow}};
use moonhare_engine::log::{self};
fn main() {
let _ = log::configere_logger();