various theme things

This commit is contained in:
AJ Kelly
2010-02-20 16:44:59 -06:00
parent cbda9d7914
commit 051f224ff1
11 changed files with 254 additions and 58 deletions
+5 -2
View File
@@ -154,8 +154,11 @@ Colors = {
Saturation(hInput)
Alpha(hInput)
HSV(iHue,fSaturation,fValue or any other overload) --]]
Alpha = function(cColor,fAlpha)
local c = cColor;
return { c[1],c[2],c[3],fAlpha };
end,
}
--[[ Fallbacks ]]
function Color(c)
return Colors[c];
@@ -164,7 +167,7 @@ end;
function BoostColor( cColor, fBoost )
local c = cColor;
return { c[1]*fBoost, c[2]*fBoost, c[3]*fBoost, c[4] };
end
end;
function ColorLightTone(c)
return { c[1]+(c[1]/2), c[2]+(c[2]/2), c[3]+(c[3]/2), c[4] };
@@ -39,11 +39,10 @@ function Actor:xy(actorX,actorY)
self:y(actorY);
end;
-- MaskSource()
-- Sets an actor up as the source for a mask.
-- todo: pass in a variable that states whether or not to clearzbuffer
function Actor:MaskSource()
self:clearzbuffer(true);
-- MaskSource([clearzbuffer])
-- Sets an actor up as the source for a mask. Clears zBuffer by default.
function Actor:MaskSource(_)
self:clearzbuffer(_ or true);
self:zwrite(true);
self:blend('BlendMode_NoEffect');
end;
@@ -130,8 +129,7 @@ end
--[[ end helper functions ]]
-- this code is in the public domain.
--[[ Lists & Functions (sm-ssc specific code) ]]
--[[ these should probably be moved into another file: ]]
function GameCompatibleModes()
sGame = GAMESTATE:GetCurrentGame():GetName();
local Modes = {