From 48db16e7aa0e3259d89a97b9f53c08b4419d64df Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Fri, 22 Apr 2022 12:39:40 +0200 Subject: [PATCH] Fix fuzz background drawing on ratios taller than 16:10. --- language.version | 4 ++-- zscript/kbase/swwm_kbase.zsc | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/language.version b/language.version index 6a77a7324..545a57030 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r44 \cu(Wed 20 Apr 17:22:35 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r44 \cu(2022-04-20 17:22:35)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r45 \cu(Fri 22 Apr 12:39:40 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r45 \cu(2022-04-22 12:39:40)\c-"; diff --git a/zscript/kbase/swwm_kbase.zsc b/zscript/kbase/swwm_kbase.zsc index 64caf96df..3267af1d4 100644 --- a/zscript/kbase/swwm_kbase.zsc +++ b/zscript/kbase/swwm_kbase.zsc @@ -519,7 +519,15 @@ Class DemolitionistMenu : GenericMenu { if ( isclosing ) return; // draw the background and main frame - if ( swwm_fuzz ) Screen.DrawTexture(FancyBg,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,.5,DTA_ClipBottom,int((origin.y+ws.y)*hs)); + if ( swwm_fuzz ) + { + // fuzz was designed for 16:10, so we'll have to extend it at taller ratios + int count = int(ceil(ws.y/400.)); + Screen.SetClipRect(int(origin.x*hs),int(origin.y*hs),int(ws.x*hs),int(ws.y*hs)); + for ( int i=0; i