mirror of
https://github.com/lisk77/comet.git
synced 2025-10-23 21:38:50 +00:00
feat: added a camera with orthographic projection and did some work restructuring the comet_app to make the setup system optional. Input handling is moved to the app
This commit is contained in:
parent
780365aeb8
commit
5a9f632e3a
22 changed files with 1173 additions and 349 deletions
|
|
@ -1,47 +1,83 @@
|
|||
#[macro_export]
|
||||
macro_rules! info {
|
||||
($msg:expr) => {
|
||||
println!(
|
||||
"{} {} : {}",
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[32m\x1b[1mINFO\x1b[0m",
|
||||
$msg
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! debug {
|
||||
($msg:expr) => {
|
||||
println!(
|
||||
"{} {} : {}",
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[34m\x1b[1mDEBUG\x1b[0m",
|
||||
$msg
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! warn {
|
||||
($msg:expr) => {
|
||||
println!(
|
||||
"{} {} : {}",
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[33m\x1b[1mWARNING\x1b[0m",
|
||||
$msg
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! error {
|
||||
($msg:expr) => {
|
||||
println!(
|
||||
"{} {} : {}",
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[31m\x1b[1mERROR\x1b[0m",
|
||||
$msg
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! fatal {
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[41mFATAL\x1b[0m",
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! trace {
|
||||
($fmt:expr $(, $args:expr)*) => {
|
||||
eprintln!(
|
||||
"{} [{}::{}] [{}] : {}",
|
||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||
module_path!(),
|
||||
"\x1b[35m\x1b[1mTRACE\x1b[0m",
|
||||
format!($fmt $(, $args)*)
|
||||
);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue