mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-14 18:40:43 +00:00
temp commit - work on shaders
This commit is contained in:
parent
c698b4128a
commit
3485199bec
7 changed files with 75 additions and 192 deletions
|
@ -5742,38 +5742,6 @@ void Avatar::onUpdate(float dt)
|
|||
}
|
||||
|
||||
|
||||
|
||||
// setup shader
|
||||
if (core->afterEffectManager)
|
||||
{
|
||||
|
||||
/*
|
||||
if (!_isUnderWater)
|
||||
{
|
||||
core->afterEffectManager->setActiveShader(AS_WASHOUT);
|
||||
//core->afterEffectManager->setActiveShader(AS_NONE);
|
||||
}
|
||||
else
|
||||
*/
|
||||
if (dsq->user.video.shader != AS_NONE)
|
||||
{
|
||||
core->afterEffectManager->setActiveShader((ActiveShader)dsq->user.video.shader);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (damageTimer.isActive() && dsq->isShakingCamera())
|
||||
{
|
||||
if (dsq->user.video.blur)
|
||||
core->afterEffectManager->setActiveShader(AS_BLUR);
|
||||
}
|
||||
else
|
||||
{
|
||||
core->afterEffectManager->setActiveShader(AS_NONE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Entity::onUpdate(dt);
|
||||
|
||||
if (isEntityDead() && skeletalSprite.getCurrentAnimation()->name != "dead")
|
||||
|
|
|
@ -10719,11 +10719,6 @@ void Game::removeState()
|
|||
|
||||
elementUpdateList.clear();
|
||||
|
||||
if (core->afterEffectManager)
|
||||
{
|
||||
//core->afterEffectManager->blurShader.setMode(0);
|
||||
core->afterEffectManager->setActiveShader(AS_NONE);
|
||||
}
|
||||
dsq->setCursor(CURSOR_NORMAL);
|
||||
dsq->darkLayer.toggle(0);
|
||||
dsq->shakeCamera(0,0);
|
||||
|
|
|
@ -3995,6 +3995,8 @@ luaFunc(entity_damage)
|
|||
d.attacker = lua_isuserdata(L, 2) ? entity(L, 2) : NULL;
|
||||
d.damage = lua_tonumber(L, 3);
|
||||
d.damageType = (DamageType)lua_tointeger(L, 4);
|
||||
d.effectTime = lua_tonumber(L, 5);
|
||||
d.useTimer = !getBool(L, 6);
|
||||
didDamage = e->damage(d);
|
||||
}
|
||||
luaReturnBool(didDamage);
|
||||
|
@ -7779,7 +7781,9 @@ luaFunc(createShader)
|
|||
|
||||
luaFunc(shader_setAsAfterEffect)
|
||||
{
|
||||
core->afterEffectManager->scriptShader = lua_isuserdata(L, 1) ? getShader(L, 1) : NULL;
|
||||
int idx = lua_tointeger(L, 2);
|
||||
if(idx < core->afterEffectManager->scriptShader.size())
|
||||
core->afterEffectManager->scriptShader[idx] = lua_isuserdata(L, 1) ? getShader(L, 1) : NULL;
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
|
@ -7805,8 +7809,10 @@ luaFunc(shader_delete)
|
|||
{
|
||||
Shader *sh = getShader(L);
|
||||
delete sh;
|
||||
if(core->afterEffectManager->scriptShader == sh)
|
||||
core->afterEffectManager->scriptShader = NULL;
|
||||
size_t sz = core->afterEffectManager->scriptShader.size();
|
||||
for(size_t i = 0; i < sz; ++i)
|
||||
if(core->afterEffectManager->scriptShader[i] == sh)
|
||||
core->afterEffectManager->scriptShader[i] = NULL;
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
|
|
|
@ -91,12 +91,6 @@ void UserSettings::save()
|
|||
|
||||
TiXmlElement xml_video("Video");
|
||||
{
|
||||
TiXmlElement xml_shader("Shader");
|
||||
{
|
||||
xml_shader.SetAttribute("num", video.shader);
|
||||
}
|
||||
xml_video.InsertEndChild(xml_shader);
|
||||
|
||||
TiXmlElement xml_blur("Blur");
|
||||
{
|
||||
xml_blur.SetAttribute("on", video.blur);
|
||||
|
@ -413,8 +407,6 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
|
|||
TiXmlElement *xml_video = doc.FirstChildElement("Video");
|
||||
if (xml_video)
|
||||
{
|
||||
readInt(xml_video, "Shader", "num", &video.shader);
|
||||
|
||||
readInt(xml_video, "Blur", "on", &video.blur);
|
||||
|
||||
readInt(xml_video, "NoteEffects", "on", &video.noteEffects);
|
||||
|
|
|
@ -100,7 +100,6 @@ public:
|
|||
numParticles = 2048;
|
||||
parallaxOn0 = parallaxOn1 = parallaxOn2 = 1;
|
||||
saveSlotScreens = 1;
|
||||
shader = 0;
|
||||
blur = 1;
|
||||
noteEffects = 0;
|
||||
fpsSmoothing = 30;
|
||||
|
@ -115,7 +114,6 @@ public:
|
|||
displaylists = 0;
|
||||
worldMapRevealMethod = 0;
|
||||
}
|
||||
int shader;
|
||||
int blur;
|
||||
int noteEffects;
|
||||
int fpsSmoothing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue