From 81853c6c99e956f08a5709d40bdd45b009b6cf2a Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Wed, 23 Mar 2022 20:41:24 +0000 Subject: [PATCH] Rename get_colour to colour --- agb/src/display/palette16.rs | 2 +- examples/the-purple-night/src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agb/src/display/palette16.rs b/agb/src/display/palette16.rs index 36b9d041..55181b9b 100644 --- a/agb/src/display/palette16.rs +++ b/agb/src/display/palette16.rs @@ -16,7 +16,7 @@ impl Palette16 { self.colours[index] = colour; } - pub fn get_colour(&self, index: usize) -> u16 { + pub fn colour(&self, index: usize) -> u16 { self.colours[index] } } diff --git a/examples/the-purple-night/src/main.rs b/examples/the-purple-night/src/main.rs index 48cbef4c..aef43cb6 100644 --- a/examples/the-purple-night/src/main.rs +++ b/examples/the-purple-night/src/main.rs @@ -2160,8 +2160,8 @@ impl<'a> Game<'a> { fn update_sunrise(vram: &mut VRamManager, time: u16) { let mut modified_palette = background::background.palettes[0].clone(); - let a = modified_palette.get_colour(0); - let b = modified_palette.get_colour(1); + let a = modified_palette.colour(0); + let b = modified_palette.colour(1); modified_palette.update_colour(0, interpolate_colour(a, 17982, time, 120)); modified_palette.update_colour(1, interpolate_colour(b, 22427, time, 120)); @@ -2174,7 +2174,7 @@ impl<'a> Game<'a> { fn update_fade_out(vram: &mut VRamManager, time: u16) { let mut modified_palette = background::background.palettes[0].clone(); - let c = modified_palette.get_colour(2); + let c = modified_palette.colour(2); modified_palette.update_colour(0, interpolate_colour(17982, 0x7FFF, time, 600)); modified_palette.update_colour(1, interpolate_colour(22427, 0x7FFF, time, 600));