Code cleanup
This commit is contained in:
+3
-3
@@ -8,11 +8,11 @@ use crate::renderer::structs::Screen;
|
||||
|
||||
impl Screen<'_> {
|
||||
|
||||
pub fn _get_context(&self) -> &Sdl {
|
||||
pub fn get_context(&self) -> &Sdl {
|
||||
return &self.context;
|
||||
}
|
||||
|
||||
pub fn _print(&mut self, line: u32, text: &str) {
|
||||
pub fn print(&mut self, line: u32, text: &str) {
|
||||
let rendered_text = self.font.render(text).solid(Color::RED).unwrap();
|
||||
let texture_creator = self.canvas.texture_creator();
|
||||
let texture = rendered_text.as_texture(&texture_creator).unwrap();
|
||||
@@ -31,7 +31,7 @@ impl Screen<'_> {
|
||||
|
||||
/// Initialize video, allocate buffers and load fonts
|
||||
/// Based on https://github.com/vhspace/sdl3-rs/blob/master/examples/ttf-demo.rs
|
||||
pub fn _init(prefs: &Prefs) -> Screen<'_> {
|
||||
pub fn init(prefs: &Prefs) -> Screen<'_> {
|
||||
// Initialize the screen
|
||||
let sdl_context = sdl3::init().unwrap();
|
||||
let video_subsys = sdl_context.video().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user