shut stepmania up about multiple filenames warning
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#BACKGROUND:;
|
||||
#LYRICSPATH:;
|
||||
#CDTITLE:;
|
||||
#MUSIC:ScreenGameplaySyncMachine music.ogg;
|
||||
#MUSIC:_sync music.ogg;
|
||||
#OFFSET:-0.012;
|
||||
#SAMPLESTART:0.000;
|
||||
#SAMPLELENGTH:12.000;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user