Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
GwnDaan committed May 28, 2024
1 parent ca329f0 commit d865a5a
Show file tree
Hide file tree
Showing 10 changed files with 689 additions and 135 deletions.
8 changes: 1 addition & 7 deletions src/object_pool/colour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ impl Colour {
}

pub fn new_by_rgb(r: u8, g: u8, b: u8) -> Self {
for colour in Colour::COLOUR_PALETTE.iter() {
if colour.r == r && colour.g == g && colour.b == b {
return *colour;
}
}

Colour::BLACK
Colour::COLOUR_PALETTE[16 + (r * 36 + g * 6 + b) as usize]
}

pub fn new_by_rgba(r: u8, g: u8, b: u8, _a: u8) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/object_pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub mod object_attributes;
mod object_id;
mod object_pool;
mod object_type;
mod vt_version;
pub mod vt_version;

use crate::network_management::name::NAME;

Expand Down
Loading

0 comments on commit d865a5a

Please sign in to comment.