MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / TranslateBlendMode

Function TranslateBlendMode

LuaSTGPlus/LuaWrapper.cpp:27–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using namespace LuaSTGPlus;
26
27static inline BlendMode TranslateBlendMode(lua_State* L, int argnum)
28{
29 const char* s = luaL_checkstring(L, argnum);
30 if (strcmp(s, "mul+add") == 0)
31 return BlendMode::MulAdd;
32 else if (strcmp(s, "") == 0)
33 return BlendMode::MulAlpha;
34 else if (strcmp(s, "mul+alpha") == 0)
35 return BlendMode::MulAlpha;
36 else if (strcmp(s, "add+add") == 0)
37 return BlendMode::AddAdd;
38 else if (strcmp(s, "add+alpha") == 0)
39 return BlendMode::AddAlpha;
40 else if (strcmp(s, "add+rev") == 0)
41 return BlendMode::AddRev;
42 else if (strcmp(s, "mul+rev") == 0)
43 return BlendMode::MulRev;
44 else if (strcmp(s, "add+sub") == 0)
45 return BlendMode::AddSub;
46 else if (strcmp(s, "mul+sub") == 0)
47 return BlendMode::MulSub;
48 else
49 luaL_error(L, "invalid blend mode '%s'.", s);
50 return BlendMode::MulAlpha;
51}
52
53static inline void TranslateAlignMode(lua_State* L, int argnum, ResFont::FontAlignHorizontal& halign, ResFont::FontAlignVertical& valign)
54{

Callers 8

RenderMethod · 0.85
SetImgStateMethod · 0.85
SetImageStateMethod · 0.85
SetFontStateMethod · 0.85
SetAnimationStateMethod · 0.85
RenderTextureMethod · 0.85
PostEffectMethod · 0.85
PostEffectApplyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected