mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-05-10 19:13:44 +00:00
Merge branch 'experimental' of file:///Users/User/code/coding/Aquaria_fg_clean into experimental
This commit is contained in:
commit
a49dda92d6
9 changed files with 44 additions and 15 deletions
|
@ -574,6 +574,7 @@ void SongIcon::openNote()
|
|||
|
||||
float glowLife = 0.5;
|
||||
|
||||
{
|
||||
Quad *q = new Quad("particles/glow", position);
|
||||
q->scale.interpolateTo(Vector(10, 10), glowLife+0.1f);
|
||||
q->alpha.ensureData();
|
||||
|
@ -585,6 +586,8 @@ void SongIcon::openNote()
|
|||
q->setBlendType(RenderObject::BLEND_ADD);
|
||||
q->followCamera = 1;
|
||||
dsq->game->addRenderObject(q, LR_HUD);
|
||||
q->setDecayRate(1/(glowLife+0.1f));
|
||||
}
|
||||
|
||||
{
|
||||
std::ostringstream os2;
|
||||
|
@ -603,6 +606,7 @@ void SongIcon::openNote()
|
|||
//q->setBlendType(RenderObject::BLEND_ADD);
|
||||
q->followCamera = 1;
|
||||
dsq->game->addRenderObject(q, LR_HUD);
|
||||
q->setDecayRate(1/(glowLife+0.1f));
|
||||
}
|
||||
|
||||
avatar->songInterfaceTimer = 1.0;
|
||||
|
@ -1422,7 +1426,7 @@ void Avatar::openSingingInterface()
|
|||
//core->setMousePosition(Vector(400,300));
|
||||
}
|
||||
|
||||
core->setMouseConstraintCircle(singingInterfaceRadius);
|
||||
core->setMouseConstraintCircle(core->center, singingInterfaceRadius);
|
||||
stopRoll();
|
||||
singing = true;
|
||||
currentSongIdx = SONG_NONE;
|
||||
|
|
|
@ -166,16 +166,7 @@ void SongLineRender::newPoint(const Vector &pt, const Vector &color)
|
|||
s.color = color;
|
||||
pts.push_back(s);
|
||||
if (pts.size() > maxx)
|
||||
{
|
||||
std::vector<SongLinePoint> copy;
|
||||
copy = pts;
|
||||
pts.clear();
|
||||
for (int i = 1; i < copy.size(); i++)
|
||||
{
|
||||
pts.push_back(copy[i]);
|
||||
}
|
||||
}
|
||||
|
||||
pts.erase(pts.begin());
|
||||
}
|
||||
else if (!pts.empty() && inRange)
|
||||
{
|
||||
|
|
|
@ -8060,6 +8060,18 @@ luaFunc(getMouseWheelChange)
|
|||
luaReturnNum(core->mouse.scrollWheelChange);
|
||||
}
|
||||
|
||||
luaFunc(setMouseConstraintCircle)
|
||||
{
|
||||
core->setMouseConstraintCircle(Vector(lua_tonumber(L, 1), lua_tonumber(L, 2)), lua_tonumber(L, 3));
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(setMouseConstraint)
|
||||
{
|
||||
core->setMouseConstraint(getBool(L, 1));
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(fade)
|
||||
{
|
||||
dsq->overlay->color.interpolateTo(Vector(lua_tonumber(L, 3), lua_tonumber(L, 4), lua_tonumber(L, 5)), lua_tonumber(L, 6));
|
||||
|
@ -9114,6 +9126,8 @@ static const struct {
|
|||
luaRegister(getMousePos),
|
||||
luaRegister(getMouseWorldPos),
|
||||
luaRegister(getMouseWheelChange),
|
||||
luaRegister(setMouseConstraintCircle),
|
||||
luaRegister(setMouseConstraint),
|
||||
|
||||
luaRegister(resetContinuity),
|
||||
|
||||
|
|
|
@ -3296,10 +3296,12 @@ void Core::setMouseConstraint(bool on)
|
|||
mouseConstraint = on;
|
||||
}
|
||||
|
||||
void Core::setMouseConstraintCircle(float circle)
|
||||
void Core::setMouseConstraintCircle(const Vector& pos, float circle)
|
||||
{
|
||||
mouseConstraint = true;
|
||||
mouseCircle = circle;
|
||||
mouseConstraintCenter = pos;
|
||||
mouseConstraintCenter.z = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3333,7 +3335,7 @@ bool Core::doMouseConstraint()
|
|||
{
|
||||
//- core->getVirtualOffX()
|
||||
//- virtualOffX
|
||||
Vector h = Vector(core->center.x , core->center.y);
|
||||
Vector h = mouseConstraintCenter;
|
||||
Vector d = mouse.position - h;
|
||||
if (!d.isLength2DIn(mouseCircle))
|
||||
{
|
||||
|
|
|
@ -1037,7 +1037,7 @@ public:
|
|||
void removeRenderObject(RenderObject *r, RemoveRenderObjectFlag flag = DESTROY_RENDER_OBJECT);
|
||||
|
||||
void setMouseConstraint(bool on);
|
||||
void setMouseConstraintCircle(float mouseCircle);
|
||||
void setMouseConstraintCircle(const Vector& pos, float mouseCircle);
|
||||
|
||||
void setReentryInputGrab(int on);
|
||||
|
||||
|
@ -1350,6 +1350,7 @@ protected:
|
|||
std::string appName;
|
||||
bool mouseConstraint;
|
||||
float mouseCircle;
|
||||
Vector mouseConstraintCenter;
|
||||
|
||||
bool doMouseConstraint();
|
||||
|
||||
|
|
|
@ -284,6 +284,8 @@ void Emitter::onRender()
|
|||
|
||||
if (hasRot)
|
||||
{
|
||||
Vector colorMult = data.inheritColor ? pe->color : Vector(1, 1, 1);
|
||||
float alphaMult = data.inheritAlpha ? pe->alpha.x : 1;
|
||||
for (Particles::iterator i = particles.begin(); i != particles.end(); i++)
|
||||
{
|
||||
Particle *p = *i;
|
||||
|
@ -293,7 +295,8 @@ void Emitter::onRender()
|
|||
const float dy = h2 * p->scale.y;
|
||||
|
||||
#ifdef BBGE_BUILD_OPENGL
|
||||
glColor4f(p->color.x, p->color.y, p->color.z, p->alpha.x);
|
||||
Vector col = p->color * colorMult;
|
||||
glColor4f(col.x, col.y, col.z, p->alpha.x * alphaMult);
|
||||
|
||||
|
||||
if (p->rot.z != 0 || p->rot.isInterpolating())
|
||||
|
|
|
@ -404,6 +404,16 @@ void ParticleEffect::bankLoad(const std::string &file, const std::string &path)
|
|||
inf >> tmp;
|
||||
inf >> currentEmitter->data.suckIndex >> currentEmitter->data.suckStr;
|
||||
}
|
||||
else if (token == "InheritColor")
|
||||
{
|
||||
inf >> tmp;
|
||||
inf >> currentEmitter->data.inheritColor;
|
||||
}
|
||||
else if (token == "InheritAlpha")
|
||||
{
|
||||
inf >> tmp;
|
||||
inf >> currentEmitter->data.inheritAlpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ struct SpawnParticleData
|
|||
float counter;
|
||||
float spawnTimeOffset;
|
||||
bool spawnLocal;
|
||||
bool inheritColor;
|
||||
bool inheritAlpha;
|
||||
|
||||
float lastDTDifference;
|
||||
int groupRender;
|
||||
|
|
|
@ -70,4 +70,6 @@ SpawnParticleData::SpawnParticleData()
|
|||
groupRender = 0;
|
||||
pauseLevel = 0;
|
||||
copyParentFlip = 0;
|
||||
inheritColor = false;
|
||||
inheritAlpha = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue