mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-11 00:29:53 +00:00
Re-enable double->float cast warning and fix all instances where this fired
This commit is contained in:
parent
0e6dccbb4e
commit
7a60f493a5
50 changed files with 680 additions and 682 deletions
|
@ -253,10 +253,10 @@ void Intro::update(float dt)
|
|||
SkeletalSprite *citybg = new SkeletalSprite();
|
||||
citybg->loadSkeletal("citybg");
|
||||
citybg->animate("idle", -1);
|
||||
citybg->color = Vector(0.1, 0.08, 0.08);
|
||||
citybg->color = Vector(0.1f, 0.08f, 0.08f);
|
||||
citybg->position = Vector(400,300);
|
||||
citybg->offset = Vector(-100, 0);
|
||||
citybg->scale = Vector(0.6, 0.6);
|
||||
citybg->scale = Vector(0.6f, 0.6f);
|
||||
citybg->alpha = 0;
|
||||
for (size_t i = 0; i < citybg->bones.size(); i++)
|
||||
{
|
||||
|
@ -270,11 +270,11 @@ void Intro::update(float dt)
|
|||
SkeletalSprite *eric = new SkeletalSprite();
|
||||
eric->loadSkeletal("cc");
|
||||
eric->animate("runLow", -1);
|
||||
eric->color = Vector(0.08,0.08,0.08);
|
||||
eric->color = Vector(0.08f,0.08f,0.08f);
|
||||
eric->flipHorizontal();
|
||||
eric->position = Vector(50, 400);
|
||||
eric->alpha = 0;
|
||||
eric->scale = Vector(0.4, 0.4);
|
||||
eric->scale = Vector(0.4f, 0.4f);
|
||||
for (size_t i = 0; i < eric->bones.size(); i++)
|
||||
{
|
||||
eric->bones[i]->color = eric->color;
|
||||
|
@ -305,7 +305,7 @@ void Intro::update(float dt)
|
|||
play.fade = SFT_IN;
|
||||
play.loops = -1;
|
||||
play.time = 40;
|
||||
play.vol = 0.7;
|
||||
play.vol = 0.7f;
|
||||
void *drone = dsq->sound->playSfx(play);
|
||||
|
||||
|
||||
|
@ -314,12 +314,12 @@ void Intro::update(float dt)
|
|||
play2.fade = SFT_IN;
|
||||
play2.loops = -1;
|
||||
play2.time = 20;
|
||||
play2.vol = 0.9;
|
||||
play2.vol = 0.9f;
|
||||
void *windLoop = dsq->sound->playSfx(play2);
|
||||
|
||||
dsq->run(3);
|
||||
|
||||
dsq->setClearColor(Vector(0.2,0.2,0.21));
|
||||
dsq->setClearColor(Vector(0.2f,0.2f,0.21f));
|
||||
|
||||
float bt = 11;
|
||||
|
||||
|
@ -332,9 +332,9 @@ void Intro::update(float dt)
|
|||
Quad *cloud_bg = new Quad("intro/cloud-bg", Vector(400,300));
|
||||
cloud_bg->setWidthHeight(800,600);
|
||||
cloud_bg->followCamera = 1;
|
||||
cloud_bg->alpha = 0.2;
|
||||
cloud_bg->alpha = 0.2f;
|
||||
cloud_bg->flipVertical();
|
||||
cloud_bg->scale.interpolateTo(Vector(1.2, 1.5), bt*2);
|
||||
cloud_bg->scale.interpolateTo(Vector(1.2f, 1.5f), bt*2);
|
||||
addRenderObject(cloud_bg, LR_BACKGROUND);
|
||||
|
||||
Quad *mc1 = new Quad("intro/intro-big-cloud", Vector(200, 300));
|
||||
|
@ -368,15 +368,15 @@ void Intro::update(float dt)
|
|||
bbp->alpha = 0;
|
||||
bbp->alpha.interpolateTo(1, 8);
|
||||
bbp->followCamera = 1;
|
||||
bbp->scale = Vector(0.5, 0.5);
|
||||
bbp->scale.interpolateTo(Vector(0.8, 0.8), bt);
|
||||
bbp->scale = Vector(0.5f, 0.5f);
|
||||
bbp->scale.interpolateTo(Vector(0.8f, 0.8f), bt);
|
||||
bbp->color.ensureData();
|
||||
bbp->color.data->path.addPathNode(Vector(1,1,1), 0);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5,0.5,0.5), 0.1);
|
||||
bbp->color.data->path.addPathNode(Vector(1,1,1), 0.2);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5,0.5,0.5), 0.9);
|
||||
bbp->color.data->path.addPathNode(Vector(1,1,1), 0.95);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5,0.5,0.5), 1.0);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5f,0.5f,0.5f), 0.1f);
|
||||
bbp->color.data->path.addPathNode(Vector(1,1,1), 0.2f);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5f,0.5f,0.5f), 0.9f);
|
||||
bbp->color.data->path.addPathNode(Vector(1,1,1), 0.95f);
|
||||
bbp->color.data->path.addPathNode(Vector(0.5f,0.5f,0.5f), 1.0f);
|
||||
bbp->color.startPath(2.5);
|
||||
bbp->color.data->loopType = -1;
|
||||
addRenderObject(bbp, LR_HUD);
|
||||
|
@ -386,14 +386,14 @@ void Intro::update(float dt)
|
|||
|
||||
if (waitQuit(1)) return;
|
||||
|
||||
dsq->sound->playSfx("lululu", 0.6);
|
||||
dsq->sound->playSfx("lululu", 0.6f);
|
||||
|
||||
if (waitQuit(9)) return;
|
||||
|
||||
dsq->sound->playSfx("thunder");
|
||||
dsq->overlay->alpha.interpolateTo(1, 0.2);
|
||||
dsq->overlay->alpha.interpolateTo(1, 0.2f);
|
||||
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
bbp->alpha = 0;
|
||||
cloud_bg->alpha = 0;
|
||||
|
@ -408,7 +408,7 @@ void Intro::update(float dt)
|
|||
// -- floating city in clouds
|
||||
|
||||
|
||||
dsq->setClearColor(Vector(0.4,0.4,0.4));
|
||||
dsq->setClearColor(Vector(0.4f,0.4f,0.4f));
|
||||
|
||||
/*
|
||||
Gradient *grad = new Gradient();
|
||||
|
@ -441,12 +441,12 @@ void Intro::update(float dt)
|
|||
for (int i = 3; i <=5; i++)
|
||||
{
|
||||
Bone *b = city->getBoneByIdx(i);
|
||||
b->scale.interpolateTo(Vector(0.2, 1), 0.2, -1, 1);
|
||||
b->scale.interpolateTo(Vector(0.2f, 1), 0.2f, -1, 1);
|
||||
}
|
||||
city->alpha.interpolateTo(1.0, bt*0.75f);
|
||||
city->internalOffset = Vector(0, 50);
|
||||
city->scale = Vector(0.6, 0.6);
|
||||
city->scale.interpolateTo(Vector(0.75, 0.75), bt);
|
||||
city->scale = Vector(0.6f, 0.6f);
|
||||
city->scale.interpolateTo(Vector(0.75f, 0.75f), bt);
|
||||
city->animate("idle");
|
||||
addRenderObject(city, LR_HUD);
|
||||
|
||||
|
@ -455,7 +455,7 @@ void Intro::update(float dt)
|
|||
play3.fade = SFT_IN;
|
||||
play3.loops = -1;
|
||||
play3.time = 10;
|
||||
play3.vol = 0.7;
|
||||
play3.vol = 0.7f;
|
||||
void *propLoop = dsq->sound->playSfx(play3);
|
||||
|
||||
dsq->overlay->alpha.interpolateTo(0, 1);
|
||||
|
@ -522,31 +522,31 @@ void Intro::update(float dt)
|
|||
|
||||
float brusht=7;
|
||||
Quad *painting = new Quad("intro/painting", Vector(400,300));
|
||||
painting->scale = Vector(0.9, 0.9);
|
||||
painting->scale = Vector(0.9f, 0.9f);
|
||||
// 1.2
|
||||
painting->scale.interpolateTo(Vector(2,2), brusht, 0, 0, 1);
|
||||
painting->followCamera = 1;
|
||||
addRenderObject(painting, LR_HUD);
|
||||
|
||||
Quad *ericHandBrush = new Quad("intro/eric-hand-brush", Vector(800-256 + 20,600-256 + 20));
|
||||
ericHandBrush->scale = Vector(0.99, 0.99);
|
||||
ericHandBrush->scale.interpolateTo(Vector(1.7,1.7), brusht, 0, 0, 1);
|
||||
ericHandBrush->scale = Vector(0.99f, 0.99f);
|
||||
ericHandBrush->scale.interpolateTo(Vector(1.7f,1.7f), brusht, 0, 0, 1);
|
||||
ericHandBrush->followCamera = 1;
|
||||
ericHandBrush->rotation.interpolateTo(Vector(0,0,-20), brusht);
|
||||
ericHandBrush->offset.interpolateTo(Vector(550, 550), brusht*0.75f, 0, 0, 1);
|
||||
addRenderObject(ericHandBrush, LR_HUD);
|
||||
|
||||
|
||||
dsq->fade(0, 0.5);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->fade(0, 0.5f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
if (waitQuit(2)) return;
|
||||
|
||||
// music bit
|
||||
|
||||
dsq->sound->playSfx("aqfocus", 0.8);
|
||||
dsq->sound->playSfx("aqfocus", 0.8f);
|
||||
|
||||
if (waitQuit(1.5)) return;
|
||||
if (waitQuit(1.5f)) return;
|
||||
|
||||
|
||||
if (waitQuit(2)) return;
|
||||
|
@ -557,11 +557,11 @@ void Intro::update(float dt)
|
|||
|
||||
dsq->sound->playSfx("thewave");
|
||||
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
dsq->sound->playSfx("heartbeat");
|
||||
dsq->fade(1, 0.5);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->fade(1, 0.5f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
painting->alpha = 0;
|
||||
ericHandBrush->alpha = 0;
|
||||
|
@ -575,34 +575,34 @@ void Intro::update(float dt)
|
|||
window->alpha = 1;
|
||||
ericHead->alpha = 1;
|
||||
|
||||
window->color.interpolateTo(Vector(1, 0.5, 0.5), wrt);
|
||||
ericHead->color.interpolateTo(Vector(1, 0.7, 0.7), wrt);
|
||||
window->color.interpolateTo(Vector(1, 0.5f, 0.5f), wrt);
|
||||
ericHead->color.interpolateTo(Vector(1, 0.7f, 0.7f), wrt);
|
||||
ericHead->offset = Vector(-200,0);
|
||||
ericHead->offset.interpolateTo(Vector(-800, 200), wrt);
|
||||
|
||||
window->scale.interpolateTo(Vector(1.3, 1.3), wrt);
|
||||
window->scale.interpolateTo(Vector(1.3f, 1.3f), wrt);
|
||||
|
||||
dsq->fade(0, 0.5);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->fade(0, 0.5f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
if (waitQuit(wrt-1)) return;
|
||||
|
||||
dsq->sound->playSfx("heartbeat");
|
||||
dsq->fade(1, 0.5);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->fade(1, 0.5f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
ericHead->alpha = 0;
|
||||
window->alpha = 0;
|
||||
|
||||
// -- city under attack by meteors
|
||||
|
||||
dsq->setClearColor(Vector(0.6,0.1,0.1));
|
||||
dsq->setClearColor(Vector(0.6f,0.1f,0.1f));
|
||||
|
||||
createMeteor(LR_ENTITIES, Vector(600, -50), Vector(-600, 600), Vector(0.05, 0.05));
|
||||
createMeteor(LR_ENTITIES, Vector(600, -50), Vector(-600, 600), Vector(0.05f, 0.05f));
|
||||
|
||||
|
||||
cloud_bg->alpha = 0.99;
|
||||
cloud_bg->alpha.interpolateTo(0.8, 4);
|
||||
cloud_bg->alpha = 0.99f;
|
||||
cloud_bg->alpha.interpolateTo(0.8f, 4);
|
||||
//grad->alpha = 0.5;
|
||||
city->alpha = 1;
|
||||
|
||||
|
@ -610,13 +610,13 @@ void Intro::update(float dt)
|
|||
|
||||
city->animate("idle");
|
||||
|
||||
dsq->fade(0, 0.5);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->fade(0, 0.5f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
createMeteor(LR_ENTITIES, Vector(300, -50), Vector(-500, 900), Vector(0.2, 0.2));
|
||||
createMeteor(LR_HUD, Vector(400, -100), Vector(-400, 1000), Vector(0.2, 0.2));
|
||||
createMeteor(LR_ENTITIES, Vector(300, -50), Vector(-500, 900), Vector(0.2f, 0.2f));
|
||||
createMeteor(LR_HUD, Vector(400, -100), Vector(-400, 1000), Vector(0.2f, 0.2f));
|
||||
|
||||
if (waitQuit(2)) return;
|
||||
|
||||
|
@ -625,11 +625,11 @@ void Intro::update(float dt)
|
|||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
int l = LR_ENTITIES;
|
||||
Vector sz(0.1, 0.1);
|
||||
Vector sz(0.1f, 0.1f);
|
||||
if (rand()%5 < 2)
|
||||
{
|
||||
l = LR_HUD;
|
||||
sz = Vector(0.15, 0.15);
|
||||
sz = Vector(0.15f, 0.15f);
|
||||
}
|
||||
createMeteor(l, Vector(200+rand()%600, -50 - rand()%100), Vector(-200 - rand()%400, 900 + rand()%400), sz);
|
||||
}
|
||||
|
@ -640,23 +640,23 @@ void Intro::update(float dt)
|
|||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int l = LR_ENTITIES;
|
||||
Vector sz(0.1, 0.1);
|
||||
Vector sz(0.1f, 0.1f);
|
||||
if (rand()%5 < 2)
|
||||
{
|
||||
l = LR_HUD;
|
||||
sz = Vector(0.15, 0.15);
|
||||
sz = Vector(0.15f, 0.15f);
|
||||
}
|
||||
createMeteor(l, Vector(200+rand()%600, -50 - rand()%100), Vector(-200 - rand()%400, 900 + rand()%400), sz);
|
||||
}
|
||||
|
||||
if (waitQuit(0.4)) return;
|
||||
if (waitQuit(0.4f)) return;
|
||||
|
||||
dsq->sound->playSfx("heartbeat");
|
||||
dsq->sound->fadeSfx(drone, SFT_OUT, 0.1);
|
||||
dsq->sound->fadeSfx(windLoop, SFT_OUT, 0.1);
|
||||
dsq->sound->fadeSfx(drone, SFT_OUT, 0.1f);
|
||||
dsq->sound->fadeSfx(windLoop, SFT_OUT, 0.1f);
|
||||
|
||||
dsq->overlay->color = Vector(1, 0.5, 0.5);
|
||||
dsq->fade(1, 0.1);
|
||||
dsq->overlay->color = Vector(1, 0.5f, 0.5f);
|
||||
dsq->fade(1, 0.1f);
|
||||
if (waitQuit(1)) return;
|
||||
|
||||
city->alpha = 0;
|
||||
|
@ -693,18 +693,18 @@ void Intro::update(float dt)
|
|||
|
||||
dsq->overlay->color = Vector(0,0,0);
|
||||
|
||||
dsq->fade(1, 0.1);
|
||||
dsq->fade(1, 0.1f);
|
||||
|
||||
if (waitQuit(3.5)) return;
|
||||
if (waitQuit(3.5f)) return;
|
||||
|
||||
|
||||
// -- outside scene
|
||||
|
||||
|
||||
dsq->setClearColor(Vector(0.3,0.1,0.1));
|
||||
dsq->setClearColor(Vector(0.3f,0.1f,0.1f));
|
||||
|
||||
cloud_bg->alpha = 0.4;
|
||||
cloud_bg->scale = Vector(1.5, 1.5);
|
||||
cloud_bg->alpha = 0.4f;
|
||||
cloud_bg->scale = Vector(1.5f, 1.5f);
|
||||
//cloud_bg->setSegs(32, 32, 0.5, 0.5, 0.008, 0.008, 4, 1);
|
||||
//cloud_bg->setSegs(10, 10, 0.1, 0.1, 1, 1, 0.1, 1);
|
||||
cloud_bg->rotation.z = 180;
|
||||
|
@ -716,13 +716,13 @@ void Intro::update(float dt)
|
|||
pScreaming.fade = SFT_IN;
|
||||
pScreaming.loops = -1;
|
||||
pScreaming.time = 8;
|
||||
pScreaming.vol = 1.0;
|
||||
pScreaming.vol = 1.0f;
|
||||
void *screaming = dsq->sound->playSfx(pScreaming);
|
||||
|
||||
eric->alpha = 1;
|
||||
eric->offset.interpolateTo(Vector(150, 0), 1);
|
||||
|
||||
dsq->fade(0, 0.2);
|
||||
dsq->fade(0, 0.2f);
|
||||
|
||||
if (waitQuit(1)) return;
|
||||
eric->animate("idle", -1);
|
||||
|
@ -732,19 +732,19 @@ void Intro::update(float dt)
|
|||
eric->animate("runLow", -1);
|
||||
|
||||
eric->offset.interpolateTo(Vector(150+150, 0), 1);
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
dsq->sound->playSfx("thunder", 0.1);
|
||||
dsq->sound->playSfx("thunder", 0.1f);
|
||||
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
eric->offset.interpolateTo(Vector(150+150+150, 0), 1);
|
||||
if (waitQuit(1)) return;
|
||||
|
||||
eric->offset.interpolateTo(Vector(150+150+150+150, 0), 1);
|
||||
if (waitQuit(0.5)) return;
|
||||
dsq->sound->playSfx("thunder", 0.7);
|
||||
if (waitQuit(0.5)) return;
|
||||
if (waitQuit(0.5f)) return;
|
||||
dsq->sound->playSfx("thunder", 0.7f);
|
||||
if (waitQuit(0.5f)) return;
|
||||
|
||||
eric->animate("idle", -1);
|
||||
|
||||
|
@ -753,7 +753,7 @@ void Intro::update(float dt)
|
|||
eric->flipHorizontal();
|
||||
|
||||
citybg->animate("crash");
|
||||
if (waitQuit(1.9)) return;
|
||||
if (waitQuit(1.9f)) return;
|
||||
|
||||
dsq->sound->playSfx("bridgebreak");
|
||||
|
||||
|
@ -761,16 +761,16 @@ void Intro::update(float dt)
|
|||
dsq->sound->stopSfx(drone);
|
||||
dsq->sound->stopSfx(screaming);
|
||||
|
||||
eric->rotation.interpolateTo(Vector(0,0,96), 1.5);
|
||||
eric->rotation.interpolateTo(Vector(0,0,96), 1.5f);
|
||||
eric->offset.interpolateTo(Vector(eric->offset.x, 800), 1);
|
||||
|
||||
if (waitQuit(1.9)) return;
|
||||
if (waitQuit(1.9f)) return;
|
||||
|
||||
|
||||
|
||||
dsq->overlay->color = Vector(0,0,0);
|
||||
dsq->fade(1, 0.1);
|
||||
if (waitQuit(0.1)) return;
|
||||
dsq->fade(1, 0.1f);
|
||||
if (waitQuit(0.1f)) return;
|
||||
|
||||
citybg->alpha = 0;
|
||||
eric->alpha = 0;
|
||||
|
@ -794,8 +794,8 @@ void Intro::update(float dt)
|
|||
addRenderObject(underwaterBG, LR_ENTITIES);
|
||||
|
||||
Quad *ericHandSink = new Quad("intro/eric-hand-sink", Vector(550,610));
|
||||
ericHandSink->scale = Vector(0.99, 0.99);
|
||||
ericHandSink->scale.interpolateTo(Vector(1.5,1.5), st, 0, 0, 1);
|
||||
ericHandSink->scale = Vector(0.99f, 0.99f);
|
||||
ericHandSink->scale.interpolateTo(Vector(1.5f,1.5f), st, 0, 0, 1);
|
||||
ericHandSink->internalOffset = Vector(0, -256);
|
||||
ericHandSink->rotation = Vector(0,0,-10);
|
||||
ericHandSink->rotation.interpolateTo(Vector(0,0,10), st, 0, 0, 1);
|
||||
|
@ -803,11 +803,11 @@ void Intro::update(float dt)
|
|||
ericHandSink->followCamera = 1;
|
||||
addRenderObject(ericHandSink, LR_ENTITIES);
|
||||
|
||||
dsq->setClearColor(Vector(0, 0.05, 0.1));
|
||||
dsq->setClearColor(Vector(0, 0.05f, 0.1f));
|
||||
|
||||
|
||||
if (core->afterEffectManager)
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter,0.08,0.05,22,0.2f, 1.2));
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter,0.08f,0.05f,22,0.2f, 1.2f));
|
||||
|
||||
|
||||
dsq->fade(0, 3);
|
||||
|
@ -828,26 +828,26 @@ void Intro::update(float dt)
|
|||
|
||||
|
||||
|
||||
dsq->sound->playSfx("heartbeat", 0.5);
|
||||
dsq->sound->playSfx("heartbeat", 0.5f);
|
||||
|
||||
dsq->fade(1, 5);
|
||||
if (waitQuit(2.5)) return;
|
||||
if (waitQuit(2.5f)) return;
|
||||
|
||||
core->sound->playVoice("titleb");
|
||||
|
||||
dsq->sound->playSfx("heartbeat", 0.2);
|
||||
dsq->sound->playSfx("heartbeat", 0.2f);
|
||||
|
||||
if (waitQuit(2.5)) return;
|
||||
if (waitQuit(2.5f)) return;
|
||||
|
||||
underwaterBG->alphaMod = 0;
|
||||
|
||||
core->sound->playSfx("mother", 0.6);
|
||||
core->sound->playSfx("mother", 0.6f);
|
||||
|
||||
dsq->fade(0, 2);
|
||||
|
||||
Quad *mom = new Quad("gameover-0004", Vector(400,300));
|
||||
mom->setWidthHeight(600,600);
|
||||
mom->alphaMod = 0.035;
|
||||
mom->alphaMod = 0.035f;
|
||||
mom->setBlendType(RenderObject::BLEND_ADD);
|
||||
mom->alpha = 0;
|
||||
mom->alpha.interpolateTo(1, 5);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue