Skip to content

Commit

Permalink
Merge pull request #6 from AndrewKraevskii/master
Browse files Browse the repository at this point in the history
Много всякого
  • Loading branch information
JustAGod1 committed Apr 28, 2023
2 parents d690402 + b73a8b9 commit c2760ed
Show file tree
Hide file tree
Showing 26 changed files with 1,720 additions and 1,202 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/target
/run
Cargo.lock
*.bpc
*.mm
/.vscode
9 changes: 2 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ build = "build.rs"
winres = "0.1"

[dependencies]
nom = "7.0.0"
path-clean = "0.1.0"
path-clean = "1.0.1"
sdl2 = { version = "0.35.2", features = ["bundled"] }
gl = "0.10.0"
imgui-sdl2 = "0.15.1"
nfd = { git = "https://github.com/saurvs/nfd-rs.git" }
imgui = "0.9.0"
imgui-opengl-renderer = "0.12.0"


[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
rfd = "0.11.3"
13 changes: 6 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
use std::io;

fn main() -> io::Result<()>{

#[cfg(target_os="macos")]
fn main() -> io::Result<()> {
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");

#[cfg(target_os="linux")]
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");

#[cfg(windows)] {
#[cfg(windows)]
{
use winres::WindowsResource;
WindowsResource::new()
// This path can be absolute, or relative to your crate root.
.set_icon("ussr.ico")
.compile()?;
}
Ok(())

}
}
20 changes: 5 additions & 15 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
#![windows_subsystem = "windows"]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use crate::model::Computer;

mod ui;
mod model;
mod parse;

#[macro_export]
macro_rules! bit_at {
($opcode:expr, $pos:expr) => {
{
use core::ops::*;
$opcode.bitand(1.shl($pos as u16) as u16) != 0
}
};
}
mod ui;
mod utils;

fn main() {
println!("Hello, World!");
let computer = Computer::new();


ui::gui::Gui::new(computer).run();
}
}
Loading

0 comments on commit c2760ed

Please sign in to comment.