From 532abd1e45f76470195c5448de6af14913667505 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 28 Jul 2025 16:22:48 -0500 Subject: [PATCH] chore: remove unused params for debug_render_nodes func --- src/game.rs | 3 +-- src/map/builder.rs | 5 ++--- src/map/render.rs | 8 +------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/game.rs b/src/game.rs index 581a3a5..bd8448b 100644 --- a/src/game.rs +++ b/src/game.rs @@ -114,8 +114,7 @@ impl Game { pub fn present_backbuffer(&mut self, canvas: &mut Canvas, backbuffer: &Texture) -> Result<()> { canvas.copy(backbuffer, None, None).map_err(anyhow::Error::msg)?; if self.debug_mode { - self.map - .debug_render_nodes(canvas, &mut self.atlas, &mut self.debug_text_texture); + self.map.debug_render_nodes(canvas); } self.draw_hud(canvas)?; canvas.present(); diff --git a/src/map/builder.rs b/src/map/builder.rs index 3175c22..86e9e24 100644 --- a/src/map/builder.rs +++ b/src/map/builder.rs @@ -6,7 +6,6 @@ use crate::entity::graph::{Graph, Node, NodeId}; use crate::map::parser::MapTileParser; use crate::map::render::MapRenderer; use crate::texture::sprite::{AtlasTile, SpriteAtlas}; -use crate::texture::text::TextTexture; use glam::{IVec2, UVec2, Vec2}; use sdl2::render::{Canvas, RenderTarget}; use std::collections::{HashMap, VecDeque}; @@ -189,8 +188,8 @@ impl Map { /// This function is intended for development and debugging purposes. It draws the /// nodes and edges of the graph on top of the map, allowing for visual /// inspection of the navigation paths. - pub fn debug_render_nodes(&self, canvas: &mut Canvas, atlas: &mut SpriteAtlas, text: &mut TextTexture) { - MapRenderer::debug_render_nodes(&self.graph, canvas, atlas, text); + pub fn debug_render_nodes(&self, canvas: &mut Canvas) { + MapRenderer::debug_render_nodes(&self.graph, canvas); } /// Builds the house structure in the graph. diff --git a/src/map/render.rs b/src/map/render.rs index 1fd1484..c9daa32 100644 --- a/src/map/render.rs +++ b/src/map/render.rs @@ -2,7 +2,6 @@ use crate::constants::{BOARD_PIXEL_OFFSET, BOARD_PIXEL_SIZE}; use crate::texture::sprite::{AtlasTile, SpriteAtlas}; -use crate::texture::text::TextTexture; use sdl2::pixels::Color; use sdl2::rect::{Point, Rect}; use sdl2::render::{Canvas, RenderTarget}; @@ -30,12 +29,7 @@ impl MapRenderer { /// This function is intended for development and debugging purposes. It draws the /// nodes and edges of the graph on top of the map, allowing for visual /// inspection of the navigation paths. - pub fn debug_render_nodes( - graph: &crate::entity::graph::Graph, - canvas: &mut Canvas, - _atlas: &mut SpriteAtlas, - _text: &mut TextTexture, - ) { + pub fn debug_render_nodes(graph: &crate::entity::graph::Graph, canvas: &mut Canvas) { for i in 0..graph.node_count() { let node = graph.get_node(i).unwrap(); let pos = node.position + BOARD_PIXEL_OFFSET.as_vec2();