chore: remove unused params for debug_render_nodes func

This commit is contained in:
2025-07-28 16:22:48 -05:00
parent 70528b0dcc
commit 532abd1e45
3 changed files with 4 additions and 12 deletions

View File

@@ -114,8 +114,7 @@ impl Game {
pub fn present_backbuffer<T: RenderTarget>(&mut self, canvas: &mut Canvas<T>, 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();

View File

@@ -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<T: RenderTarget>(&self, canvas: &mut Canvas<T>, atlas: &mut SpriteAtlas, text: &mut TextTexture) {
MapRenderer::debug_render_nodes(&self.graph, canvas, atlas, text);
pub fn debug_render_nodes<T: RenderTarget>(&self, canvas: &mut Canvas<T>) {
MapRenderer::debug_render_nodes(&self.graph, canvas);
}
/// Builds the house structure in the graph.

View File

@@ -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<T: RenderTarget>(
graph: &crate::entity::graph::Graph,
canvas: &mut Canvas<T>,
_atlas: &mut SpriteAtlas,
_text: &mut TextTexture,
) {
pub fn debug_render_nodes<T: RenderTarget>(graph: &crate::entity::graph::Graph, canvas: &mut Canvas<T>) {
for i in 0..graph.node_count() {
let node = graph.get_node(i).unwrap();
let pos = node.position + BOARD_PIXEL_OFFSET.as_vec2();