From 39c547c437c255c6cce75ae1e5cb49ff80ef3f29 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 12 Jun 2011 01:48:13 -0500 Subject: [PATCH] shut stepmania up about multiple filenames warning --- .../Other/ScreenGameplaySyncMachine music.ssc | 2 +- ...ySyncMachine music.ogg => _sync music.ogg} | Bin Themes/_fallback/Scripts/02 Actor.lua | 27 ++++++++++++++---- 3 files changed, 22 insertions(+), 7 deletions(-) rename Themes/_fallback/Other/{ScreenGameplaySyncMachine music.ogg => _sync music.ogg} (100%) diff --git a/Themes/_fallback/Other/ScreenGameplaySyncMachine music.ssc b/Themes/_fallback/Other/ScreenGameplaySyncMachine music.ssc index 6c0c76d05e..5721dff9bf 100644 --- a/Themes/_fallback/Other/ScreenGameplaySyncMachine music.ssc +++ b/Themes/_fallback/Other/ScreenGameplaySyncMachine music.ssc @@ -10,7 +10,7 @@ #BACKGROUND:; #LYRICSPATH:; #CDTITLE:; -#MUSIC:ScreenGameplaySyncMachine music.ogg; +#MUSIC:_sync music.ogg; #OFFSET:-0.012; #SAMPLESTART:0.000; #SAMPLELENGTH:12.000; diff --git a/Themes/_fallback/Other/ScreenGameplaySyncMachine music.ogg b/Themes/_fallback/Other/_sync music.ogg similarity index 100% rename from Themes/_fallback/Other/ScreenGameplaySyncMachine music.ogg rename to Themes/_fallback/Other/_sync music.ogg diff --git a/Themes/_fallback/Scripts/02 Actor.lua b/Themes/_fallback/Scripts/02 Actor.lua index cfded1e6a4..d00281bf65 100644 --- a/Themes/_fallback/Scripts/02 Actor.lua +++ b/Themes/_fallback/Scripts/02 Actor.lua @@ -114,17 +114,32 @@ function Actor:FullScreen() end --[[ Typical background sizes: -320x240 - DDR 1st-Extreme, most NVLM_ZK songs -640x480 - most simfiles in distribution today are this big. -768x480 - 16:10 aspect ratio backgrounds -854x480 - pump it up pro +320x240 - [4:3] +640x480 - [4:3] (most simfiles in distribution today use this res.) +768x480 - [16:10] +854x480 - [16:9] ]] --- "Most backgrounds are 640x480. Some are 768x480. Stretch the 4:3 ones." function Actor:scale_or_crop_background() - if (self:GetWidth() * 3) / 4 == self:GetHeight() then + local gw = self:GetWidth() + local gh = self:GetHeight() + + local graphicAspect = gw/gh + local displayAspect = DISPLAY:GetDisplayWidth()/DISPLAY:GetDisplayHeight() + + if graphicAspect == displayAspect then + -- bga matches the current aspect, we can stretch it. self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT ); else + -- temp self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT ); + --[[ + -- bga doesn't match the aspect. + if displayAspect > graphicAspect then + -- the graphic is smaller than the display aspect ratio + else + -- the graphic is bigger than the display aspect ratio; crop me + end + --]] end end