Editor for papermario-dx mods
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rename rdp_viewport to n64_viewport

+11 -11
+5 -5
crates/kammy/src/editor/map.rs
··· 15 15 16 16 use super::{Editor, EditorContext, EditorId}; 17 17 use crate::Project; 18 - use crate::widget::rdp_viewport::RdpViewport; 18 + use crate::widget::n64_viewport::N64Viewport; 19 19 20 20 const FB_WIDTH: u32 = 320; 21 21 const FB_HEIGHT: u32 = 240; ··· 25 25 /// Editor that renders PM64 map geometry via the N64 RSP + RDP pipeline. 26 26 pub struct MapEditor { 27 27 id: EditorId, 28 - viewport: RdpViewport, 28 + viewport: N64Viewport, 29 29 camera: camera::OrbitCamera, 30 30 } 31 31 ··· 42 42 pub fn new(id: EditorId) -> Self { 43 43 Self { 44 44 id, 45 - viewport: RdpViewport::new(4 * 1024 * 1024), 45 + viewport: N64Viewport::new(4 * 1024 * 1024), 46 46 camera: camera::OrbitCamera::default(), 47 47 } 48 48 } ··· 147 147 /// 148 148 /// Matches the game's 320x240 16-bit non-interlaced mode with gamma off, 149 149 /// dither filter on, divot on, and AA mode 1. 150 - fn vi_config_ntsc(fb_origin: u32) -> crate::widget::rdp_viewport::ViConfig { 151 - crate::widget::rdp_viewport::ViConfig { 150 + fn vi_config_ntsc(fb_origin: u32) -> crate::widget::n64_viewport::ViConfig { 151 + crate::widget::n64_viewport::ViConfig { 152 152 // Base 0x0311E with gamma/gamma_dither cleared, dither_filter set 153 153 control: 0x0001_3112, 154 154 origin: fb_origin,
+1 -1
crates/kammy/src/widget.rs
··· 4 4 5 5 //! Reusable egui widgets for kammy. 6 6 7 - pub mod rdp_viewport; 7 + pub mod n64_viewport;
+5 -5
crates/kammy/src/widget/rdp_viewport.rs crates/kammy/src/widget/n64_viewport.rs
··· 45 45 /// 46 46 /// The renderer is created lazily on the first [`ui`](Self::ui) call that 47 47 /// receives a GPU context. 48 - pub struct RdpViewport { 48 + pub struct N64Viewport { 49 49 renderer: Option<parallel_rdp::Renderer>, 50 50 rdram_size: u32, 51 51 /// Persistent RSP renderer — avoids 4 MB RDRAM allocation per frame. ··· 68 68 height: u32, 69 69 } 70 70 71 - impl std::fmt::Debug for RdpViewport { 71 + impl std::fmt::Debug for N64Viewport { 72 72 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 73 - f.debug_struct("RdpViewport") 73 + f.debug_struct("N64Viewport") 74 74 .field("texture_id", &self.texture_id) 75 75 .finish_non_exhaustive() 76 76 } 77 77 } 78 78 79 - impl Drop for RdpViewport { 79 + impl Drop for N64Viewport { 80 80 fn drop(&mut self) { 81 81 // Wait for any in-flight GPU work before destroying the renderer. 82 82 if let (Some(timeline), Some(renderer)) = ··· 90 90 } 91 91 } 92 92 93 - impl RdpViewport { 93 + impl N64Viewport { 94 94 /// Creates a new viewport. 95 95 /// 96 96 /// `rdram_size` is the RDRAM capacity in bytes (typically 4 MiB). The