mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-05-09 10:34:05 +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
|
@ -32,8 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
|
||||
int TIMELINE_GRIDSIZE = 10;
|
||||
float TIMELINE_UNIT = 0.1;
|
||||
float TIMELINE_UNIT_STEP = 0.01;
|
||||
float TIMELINE_UNIT = 0.1f;
|
||||
float TIMELINE_UNIT_STEP = 0.01f;
|
||||
const int KEYFRAME_POS_Y = 570;
|
||||
|
||||
class TimelineRender : public RenderObject
|
||||
|
@ -90,13 +90,13 @@ KeyframeWidget::KeyframeWidget(int key) : Quad()
|
|||
void KeyframeWidget::shiftLeft()
|
||||
{
|
||||
if (!offset.isInterpolating())
|
||||
offset.interpolateTo(Vector(offset.x-80, 0), 0.1, 0, 0, 0);
|
||||
offset.interpolateTo(Vector(offset.x-80, 0), 0.1f, 0, 0, 0);
|
||||
}
|
||||
|
||||
void KeyframeWidget::shiftRight()
|
||||
{
|
||||
if (!offset.isInterpolating())
|
||||
offset.interpolateTo(Vector(offset.x+80, 0), 0.1, 0, 0, 0);
|
||||
offset.interpolateTo(Vector(offset.x+80, 0), 0.1f, 0, 0, 0);
|
||||
}
|
||||
|
||||
void KeyframeWidget::onUpdate(float dt)
|
||||
|
@ -215,7 +215,7 @@ void AnimationEditor::resetScaleOrSave()
|
|||
|
||||
void AnimationEditor::applyState()
|
||||
{
|
||||
dsq->toggleCursor(true, 0.1);
|
||||
dsq->toggleCursor(true, 0.1f);
|
||||
core->cameraPos = Vector(0,0);
|
||||
editingStrip = false;
|
||||
selectedStripPoint = 0;
|
||||
|
@ -304,14 +304,14 @@ void AnimationEditor::applyState()
|
|||
{
|
||||
back->color = 0;
|
||||
back->setWidthHeight(800, 600);
|
||||
back->position = Vector(400,300, -0.2);
|
||||
back->position = Vector(400,300, -0.2f);
|
||||
}
|
||||
addRenderObject(back, LR_BACKDROP);
|
||||
|
||||
bgGrad = new Gradient;
|
||||
bgGrad->scale = Vector(800, 600);
|
||||
bgGrad->position = Vector(400,300);
|
||||
bgGrad->makeVertical(Vector(0.4, 0.4, 0.4), Vector(0.8, 0.8, 0.8));
|
||||
bgGrad->makeVertical(Vector(0.4f, 0.4f, 0.4f), Vector(0.8f, 0.8f, 0.8f));
|
||||
addRenderObject(bgGrad, LR_BACKDROP);
|
||||
|
||||
DebugButton *a = new DebugButton(0, 0, 150);
|
||||
|
@ -471,13 +471,13 @@ void AnimationEditor::applyState()
|
|||
|
||||
editSprite->setSelectedBone(0);
|
||||
|
||||
dsq->overlay->alpha.interpolateTo(0, 0.5);
|
||||
dsq->overlay->alpha.interpolateTo(0, 0.5f);
|
||||
|
||||
rebuildKeyframeWidgets();
|
||||
|
||||
dsq->resetTimer();
|
||||
|
||||
dsq->toggleCursor(true, 0.1);
|
||||
dsq->toggleCursor(true, 0.1f);
|
||||
|
||||
updateTimelineGrid();
|
||||
updateTimelineUnit();
|
||||
|
@ -594,7 +594,7 @@ void AnimationEditor::rebuildKeyframeWidgets()
|
|||
int offx=0;
|
||||
for (size_t i = 0; i < keyframeWidgets.size(); i++)
|
||||
{
|
||||
keyframeWidgets[i]->setLife(0.03);
|
||||
keyframeWidgets[i]->setLife(0.03f);
|
||||
keyframeWidgets[i]->setDecayRate(1);
|
||||
offx = keyframeWidgets[i]->offset.x;
|
||||
}
|
||||
|
@ -934,12 +934,12 @@ void AnimationEditor::editStripKey()
|
|||
{
|
||||
selectedStripPoint = 0;
|
||||
editingStrip = false;
|
||||
bgGrad->makeVertical(Vector(0.4, 0.4, 0.4), Vector(0.8, 0.8, 0.8));
|
||||
bgGrad->makeVertical(Vector(0.4f, 0.4f, 0.4f), Vector(0.8f, 0.8f, 0.8f));
|
||||
}
|
||||
else
|
||||
{
|
||||
editingStrip = true;
|
||||
bgGrad->makeVertical(Vector(0.4, 0.4, 0.6), Vector(0.8, 0.8, 1));
|
||||
bgGrad->makeVertical(Vector(0.4f, 0.4f, 0.6f), Vector(0.8f, 0.8f, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ int AquariaComboBox::addItem(const std::string &n)
|
|||
return items.size()-1;
|
||||
}
|
||||
|
||||
Vector unselectedColor(0.7, 0.7, 0.7);
|
||||
Vector unselectedColor(0.7f, 0.7f, 0.7f);
|
||||
Vector selectedColor(1,1,1);
|
||||
|
||||
AquariaComboBoxItem::AquariaComboBoxItem(const std::string &str, int idx, AquariaComboBox *combo, Vector textscale) : Quad()
|
||||
|
|
|
@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "tinyxml2.h"
|
||||
using namespace tinyxml2;
|
||||
|
||||
const float moveDelay = 0.2;
|
||||
const float moveDelay = 0.2f;
|
||||
|
||||
float AquariaGuiElement::guiMoveTimer = 0;
|
||||
AquariaGuiElement::GuiElements AquariaGuiElement::guiElements;
|
||||
|
@ -345,11 +345,11 @@ void AquariaGuiQuad::onUpdate(float dt)
|
|||
|
||||
// Joystick input threshold at which we start sliding (0.0-1.0); must be
|
||||
// less than updateMovement() threshold.
|
||||
const float SLIDER_JOY_THRESHOLD = 0.39;
|
||||
const float SLIDER_JOY_THRESHOLD = 0.39f;
|
||||
// Initial delay before repeating for slider input (seconds).
|
||||
const float SLIDER_REPEAT_DELAY = 0.4;
|
||||
const float SLIDER_REPEAT_DELAY = 0.4f;
|
||||
// Scale factor for delay as repeats continue.
|
||||
const float SLIDER_REPEAT_ACCEL = 0.8;
|
||||
const float SLIDER_REPEAT_ACCEL = 0.8f;
|
||||
|
||||
AquariaSlider::AquariaSlider()
|
||||
: Slider(90, 12, "gui/slider-bg", "gui/slider-fg"), AquariaGuiElement()
|
||||
|
@ -538,18 +538,18 @@ void AquariaKeyConfig::toggleEnterKey(int on)
|
|||
{
|
||||
if (on==1)
|
||||
{
|
||||
bg->color = Vector(0.75, 0.75, 0.75);
|
||||
bg->alphaMod = 0.25;
|
||||
bg->color = Vector(0.75f, 0.75f, 0.75f);
|
||||
bg->alphaMod = 0.25f;
|
||||
}
|
||||
else if (on == 0)
|
||||
{
|
||||
bg->alphaMod = 0;
|
||||
bg->color = Vector(0.1, 0.1, 0.1);
|
||||
bg->color = Vector(0.1f, 0.1f, 0.1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
bg->alphaMod = 0.5;
|
||||
bg->color = Vector(0.5, 0.5, 0.5);
|
||||
bg->alphaMod = 0.5f;
|
||||
bg->color = Vector(0.5f, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1062,20 +1062,20 @@ void AquariaMenuItem::toggleHighlight(bool state)
|
|||
{
|
||||
if (glow)
|
||||
{
|
||||
glow->alpha.interpolateTo(0.3, 0.2);
|
||||
glow->alpha.interpolateTo(0.3f, 0.2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glowFont->alpha.interpolateTo(0.3, 0.2);
|
||||
glowFont->alpha.interpolateTo(0.3f, 0.2f);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (glow)
|
||||
glow->alpha.interpolateTo(0, 0.2);
|
||||
glow->alpha.interpolateTo(0, 0.2f);
|
||||
else
|
||||
glowFont->alpha.interpolateTo(0, 0.2);
|
||||
glowFont->alpha.interpolateTo(0, 0.2f);
|
||||
}
|
||||
|
||||
onToggleHighlight(highlighted);
|
||||
|
@ -1222,13 +1222,13 @@ void AquariaButton::onToggleHighlight(bool on)
|
|||
{
|
||||
if(on)
|
||||
{
|
||||
quad->color.interpolateTo(activeColor, 0.1);
|
||||
quad->alpha.interpolateTo(activeAlpha, 0.1);
|
||||
quad->color.interpolateTo(activeColor, 0.1f);
|
||||
quad->alpha.interpolateTo(activeAlpha, 0.1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
quad->color.interpolateTo(inactiveColor, 0.1);
|
||||
quad->alpha.interpolateTo(inactiveAlpha, 0.1);
|
||||
quad->color.interpolateTo(inactiveColor, 0.1f);
|
||||
quad->alpha.interpolateTo(inactiveAlpha, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ AquariaProgressBar::AquariaProgressBar() : RenderObject()
|
|||
{
|
||||
perc = 0;
|
||||
spinner.setTexture("Progress");
|
||||
spinner.alphaMod = 0.1;
|
||||
spinner.alphaMod = 0.1f;
|
||||
addChild(&spinner, PM_STATIC);
|
||||
followCamera = 1;
|
||||
}
|
||||
|
|
|
@ -117,14 +117,14 @@ AquariaSaveSlot::AquariaSaveSlot(int slot) : AquariaGuiQuad()
|
|||
|
||||
core->resetTimer();
|
||||
screen->upperLeftTextureCoordinates = Vector(0, 1);
|
||||
screen->lowerRightTextureCoordinates = Vector(1, 0.25);
|
||||
screen->lowerRightTextureCoordinates = Vector(1, 0.25f);
|
||||
|
||||
|
||||
if (screen->getWidth() == 0)
|
||||
screen->color = 0;
|
||||
screen->setWidthHeight(0.4f*256, 0.3f*256);
|
||||
screen->scale = Vector(0.93,0.93);
|
||||
screen->position = Vector(-250, 0) + Vector(-1.5, -1.6);
|
||||
screen->scale = Vector(0.93f,0.93f);
|
||||
screen->position = Vector(-250, 0) + Vector(-1.5f, -1.6f);
|
||||
addChild(screen, PM_POINTER);
|
||||
|
||||
closed = false;
|
||||
|
@ -154,8 +154,8 @@ void AquariaSaveSlot::close(bool trans)
|
|||
|
||||
if (trans)
|
||||
{
|
||||
screen->alpha.interpolateTo(0, 0.1);
|
||||
text1->alpha.interpolateTo(0, 0.1);
|
||||
screen->alpha.interpolateTo(0, 0.1f);
|
||||
text1->alpha.interpolateTo(0, 0.1f);
|
||||
|
||||
setLife(1);
|
||||
setDecayRate(10);
|
||||
|
@ -201,8 +201,8 @@ void AquariaSaveSlot::onUpdate(float dt)
|
|||
&& core->mouse.position.y < position.y+32 && core->mouse.position.y > position.y-32)
|
||||
{
|
||||
|
||||
glowText->alpha.interpolateTo(0.5, 0.2);
|
||||
screen->color.interpolateTo(Vector(1,1,1), 0.1);
|
||||
glowText->alpha.interpolateTo(0.5f, 0.2f);
|
||||
screen->color.interpolateTo(Vector(1,1,1), 0.1f);
|
||||
|
||||
if ((core->mouse.buttons.left || core->mouse.buttons.right) && !mbDown)
|
||||
{
|
||||
|
@ -252,9 +252,9 @@ void AquariaSaveSlot::onUpdate(float dt)
|
|||
}
|
||||
else
|
||||
{
|
||||
glowText->alpha.interpolateTo(0, 0.2);
|
||||
glowText->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
screen->color.interpolateTo(Vector(0.7, 0.7, 1), 0.3);
|
||||
screen->color.interpolateTo(Vector(0.7f, 0.7f, 1), 0.3f);
|
||||
}
|
||||
if ((core->mouse.buttons.left || core->mouse.buttons.right) && !mbDown)
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ void AquariaSaveSlot::onUpdate(float dt)
|
|||
}
|
||||
else
|
||||
{
|
||||
glowText->alpha.interpolateTo(0, 0.2);
|
||||
glowText->alpha.interpolateTo(0, 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,33 +29,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "Hair.h"
|
||||
|
||||
|
||||
const float MULT_DMG_CRABCOSTUME = 0.75;
|
||||
const float MULT_DMG_FISHFORM = 1.5;
|
||||
const float MULT_DMG_SEAHORSEARMOR = 0.6;
|
||||
const float MULT_DMG_CRABCOSTUME = 0.75f;
|
||||
const float MULT_DMG_FISHFORM = 1.5f;
|
||||
const float MULT_DMG_SEAHORSEARMOR = 0.6f;
|
||||
|
||||
const float MULT_MAXSPEED_BEASTFORM = 1.2;
|
||||
const float MULT_MAXSPEED_FISHFORM = 1.5;
|
||||
const float MULT_MAXSPEED_BEASTFORM = 1.2f;
|
||||
const float MULT_MAXSPEED_FISHFORM = 1.5f;
|
||||
|
||||
const float MULT_DMG_EASY = 0.5;
|
||||
const float MULT_DMG_EASY = 0.5f;
|
||||
|
||||
const float JELLYCOSTUME_HEALTHPERC = 0.5;
|
||||
const float JELLYCOSTUME_HEALDELAY = 2.0;
|
||||
const float JELLYCOSTUME_HEALAMOUNT = 0.5;
|
||||
const float JELLYCOSTUME_HEALTHPERC = 0.5f;
|
||||
const float JELLYCOSTUME_HEALDELAY = 2.0f;
|
||||
const float JELLYCOSTUME_HEALAMOUNT = 0.5f;
|
||||
|
||||
const float biteTimerBiteRange = 0.6;
|
||||
const float biteTimerBiteRange = 0.6f;
|
||||
const float biteTimerMax = 3;
|
||||
const float biteDelayPeriod = 0.08;
|
||||
const float biteDelayPeriod = 0.08f;
|
||||
const size_t normalTendrilHits = 3;
|
||||
const size_t rollTendrilHits = 4;
|
||||
const size_t maxTendrilHits = 6;
|
||||
|
||||
const float fireDelayTime = 0.2;
|
||||
const float fireDelayTime = 0.2f;
|
||||
const int maxShieldPoints = 8;
|
||||
const int minMouse = 60;
|
||||
int SongIcon::notesOpen = 0;
|
||||
Avatar *avatar = 0;
|
||||
const Vector BLIND_COLOR = Vector(0.1, 0.1, 0.1);
|
||||
const float ANIM_TRANSITION = 0.2;
|
||||
const Vector BLIND_COLOR = Vector(0.1f, 0.1f, 0.1f);
|
||||
const float ANIM_TRANSITION = 0.2f;
|
||||
//const float MANA_RECHARGE_RATE = 1.0;
|
||||
const int AURA_SHIELD_RADIUS = 64;
|
||||
//const int TARGET_RANGE = 1024;
|
||||
|
@ -63,7 +63,7 @@ const int TARGET_RANGE = 1024; // 650
|
|||
const int TARGET_GRACE_RANGE = 200;
|
||||
//const int TARGET_RANGE = 700;
|
||||
//const int TARGET_RANGE = 64;
|
||||
const float NOTE_SCALE = 0.75;
|
||||
const float NOTE_SCALE = 0.75f;
|
||||
const int singingInterfaceRadius = 100;
|
||||
const int openSingingInterfaceRadius = 128;
|
||||
//164
|
||||
|
@ -74,25 +74,25 @@ const int maxMouse = BURST_DISTANCE;
|
|||
//const int SHOCK_RANGE = 1000;
|
||||
const int SPIRIT_RANGE = 2000;
|
||||
|
||||
const float QUICK_SONG_CAST_DELAY = 0.4;
|
||||
const float QUICK_SONG_CAST_DELAY = 0.4f;
|
||||
|
||||
const float BURST_RECOVER_RATE = 1.2; // 3.0 // 0.75
|
||||
const float BURST_USE_RATE = 1.5; //0.9 //1.5;
|
||||
const float BURST_RECOVER_RATE = 1.2f; // 3.0 // 0.75
|
||||
const float BURST_USE_RATE = 1.5f; //0.9 //1.5;
|
||||
const float BURST_ACCEL = 4000; //2000 // 1000
|
||||
|
||||
// Minimum time between two splash effects (seconds).
|
||||
const float SPLASH_INTERVAL = 0.2;
|
||||
const float SPLASH_INTERVAL = 0.2f;
|
||||
|
||||
//const float TUMMY_TIME = 6.0;
|
||||
|
||||
//const float chargeMax = 2.0;
|
||||
|
||||
// Axis input distance (0.0-1.0) at which we start moving.
|
||||
const float JOYSTICK_LOW_THRESHOLD = 0.2;
|
||||
const float JOYSTICK_LOW_THRESHOLD = 0.2f;
|
||||
// Axis input distance at which we move full speed.
|
||||
const float JOYSTICK_HIGH_THRESHOLD = 0.6;
|
||||
const float JOYSTICK_HIGH_THRESHOLD = 0.6f;
|
||||
// Axis input distance at which we accept a note.
|
||||
const float JOYSTICK_NOTE_THRESHOLD = 0.6;
|
||||
const float JOYSTICK_NOTE_THRESHOLD = 0.6f;
|
||||
|
||||
// Mouse cursor distance (from note icon, in virtual pixels) below which
|
||||
// we accept a note.
|
||||
|
@ -232,15 +232,15 @@ SongIconParticle::SongIconParticle(Vector color, Vector pos, size_t note)
|
|||
|
||||
alpha.ensureData();
|
||||
alpha.data->path.addPathNode(0, 0);
|
||||
alpha.data->path.addPathNode(0.4, 0.2); // .8
|
||||
alpha.data->path.addPathNode(0.2, 0.8); // .4
|
||||
alpha.data->path.addPathNode(0.4f, 0.2f); // .8
|
||||
alpha.data->path.addPathNode(0.2f, 0.8f); // .4
|
||||
alpha.data->path.addPathNode(0, 1);
|
||||
alpha.startPath(life);
|
||||
|
||||
scale.ensureData();
|
||||
scale.data->path.addPathNode(Vector(0.5,0.5), 0);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.5);
|
||||
scale.data->path.addPathNode(Vector(0.5,0.5), 1);
|
||||
scale.data->path.addPathNode(Vector(0.5f,0.5f), 0);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.5f);
|
||||
scale.data->path.addPathNode(Vector(0.5f,0.5f), 1);
|
||||
scale.startPath(life);
|
||||
|
||||
setLife(life);
|
||||
|
@ -287,7 +287,7 @@ void SongIconParticle::onUpdate(float dt)
|
|||
SongIcon::SongIcon(size_t note) : Quad(), note(note)
|
||||
{
|
||||
open = false;
|
||||
alphaMod = 0.9;
|
||||
alphaMod = 0.9f;
|
||||
/*
|
||||
std::ostringstream os;
|
||||
os << "SongIcon" << note;
|
||||
|
@ -335,7 +335,7 @@ void SongIcon::destroy()
|
|||
|
||||
void SongIcon::spawnParticles(float dt)
|
||||
{
|
||||
float intv = 0.1;
|
||||
float intv = 0.1f;
|
||||
// do stuff!
|
||||
ptimer += dt;
|
||||
while (ptimer > intv)
|
||||
|
@ -355,7 +355,7 @@ void SongIcon::onUpdate(float dt)
|
|||
return;
|
||||
|
||||
if (alpha.x == 0 && !alpha.isInterpolating())
|
||||
alpha.interpolateTo(0.3, 0.1);
|
||||
alpha.interpolateTo(0.3f, 0.1f);
|
||||
if (delay > 0)
|
||||
{
|
||||
delay -= dt;
|
||||
|
@ -381,7 +381,7 @@ void SongIcon::onUpdate(float dt)
|
|||
if (open)
|
||||
{
|
||||
len += dt;
|
||||
avatar->setHeadTexture("Singing", 0.1);
|
||||
avatar->setHeadTexture("Singing", 0.1f);
|
||||
}
|
||||
if (alpha.x == 1)
|
||||
{
|
||||
|
@ -452,14 +452,14 @@ void SongIcon::onUpdate(float dt)
|
|||
void SongIcon::openNote()
|
||||
{
|
||||
//if (delay > 0) return;
|
||||
scale.interpolateTo(Vector(1.2, 1.2), 0.1);
|
||||
scale.interpolateTo(Vector(1.2f, 1.2f), 0.1f);
|
||||
|
||||
if (dsq->user.video.noteEffects)
|
||||
{
|
||||
glow->scale = Vector(0.5,0.5);
|
||||
glow->scale.interpolateTo(Vector(1.0, 1.0), 2, -1, 1, 1);
|
||||
glow->scale = Vector(0.5f,0.5f);
|
||||
glow->scale.interpolateTo(Vector(1.0f, 1.0f), 2, -1, 1, 1);
|
||||
|
||||
glow->alpha.interpolateTo(0.6, 0.2, 0, 0, 1);
|
||||
glow->alpha.interpolateTo(0.6f, 0.2f, 0, 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -472,14 +472,14 @@ void SongIcon::openNote()
|
|||
open = true;
|
||||
|
||||
internalOffset = Vector(-5, 0);
|
||||
internalOffset.interpolateTo(Vector(5, 0), 0.08, -1, 1);
|
||||
internalOffset.interpolateTo(Vector(5, 0), 0.08f, -1, 1);
|
||||
|
||||
avatar->singNote(this->note);
|
||||
|
||||
// this should never get called:
|
||||
if (channel != BBGE_AUDIO_NOCHANNEL)
|
||||
{
|
||||
dsq->sound->fadeSfx(channel, SFT_OUT, 0.2);
|
||||
dsq->sound->fadeSfx(channel, SFT_OUT, 0.2f);
|
||||
//dsq->sound->fadeSfx(channel, SFT_OUT, 0.2);
|
||||
channel = BBGE_AUDIO_NOCHANNEL;
|
||||
}
|
||||
|
@ -493,8 +493,8 @@ void SongIcon::openNote()
|
|||
|
||||
rippleTimer = 0;
|
||||
|
||||
minTime = 0.05;
|
||||
counter = 3.2;
|
||||
minTime = 0.05f;
|
||||
counter = 3.2f;
|
||||
|
||||
float glowLife = 0.5;
|
||||
|
||||
|
@ -503,7 +503,7 @@ void SongIcon::openNote()
|
|||
q->scale.interpolateTo(Vector(10, 10), glowLife+0.1f);
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0,0);
|
||||
q->alpha.data->path.addPathNode(0.75,0.2);
|
||||
q->alpha.data->path.addPathNode(0.75f,0.2f);
|
||||
q->alpha.data->path.addPathNode(0,1);
|
||||
q->alpha.startPath(glowLife);
|
||||
q->color = dsq->getNoteColor(note); //*0.5f + Vector(0.5, 0.5, 0.5)
|
||||
|
@ -524,7 +524,7 @@ void SongIcon::openNote()
|
|||
//q->scale.interpolateTo(Vector(10, 10), glowLife+0.1f);
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0,0);
|
||||
q->alpha.data->path.addPathNode(0.5,0.2);
|
||||
q->alpha.data->path.addPathNode(0.5f,0.2f);
|
||||
q->alpha.data->path.addPathNode(0,1);
|
||||
q->alpha.startPath(glowLife);
|
||||
//q->setBlendType(RenderObject::BLEND_ADD);
|
||||
|
@ -533,7 +533,7 @@ void SongIcon::openNote()
|
|||
q->setDecayRate(1/(glowLife+0.1f));
|
||||
}
|
||||
|
||||
avatar->songInterfaceTimer = 1.0;
|
||||
avatar->songInterfaceTimer = 1.0f;
|
||||
|
||||
notesOpen++;
|
||||
/*
|
||||
|
@ -570,13 +570,13 @@ void SongIcon::openNote()
|
|||
void SongIcon::closeNote()
|
||||
{
|
||||
//if (delay > 0) return;
|
||||
scale.interpolateTo(Vector(NOTE_SCALE, NOTE_SCALE), 0.1);
|
||||
scale.interpolateTo(Vector(NOTE_SCALE, NOTE_SCALE), 0.1f);
|
||||
|
||||
if (dsq->game->avatar->isSinging() && dsq->user.video.noteEffects)
|
||||
glow->alpha.interpolateTo(0.3, 1.5, 0, 0, 1);
|
||||
glow->alpha.interpolateTo(0.3f, 1.5f, 0, 0, 1);
|
||||
else
|
||||
glow->alpha.interpolateTo(0, 1.5, 0, 0, 1);
|
||||
glow->scale.interpolateTo(Vector(0.5, 0.5), 0.5);
|
||||
glow->alpha.interpolateTo(0, 1.5f, 0, 0, 1);
|
||||
glow->scale.interpolateTo(Vector(0.5f, 0.5f), 0.5f);
|
||||
|
||||
|
||||
cursorIsIn = false;
|
||||
|
@ -634,14 +634,14 @@ void SongIcon::closeNote()
|
|||
void SongIcon::openInterface()
|
||||
{
|
||||
delay = 0;
|
||||
alpha.interpolateTo(1, 0.1);
|
||||
alpha.interpolateTo(1, 0.1f);
|
||||
}
|
||||
|
||||
void SongIcon::closeInterface()
|
||||
{
|
||||
closeNote();
|
||||
delay = 0;
|
||||
alpha.interpolateTo(0, 0.1);
|
||||
alpha.interpolateTo(0, 0.1f);
|
||||
}
|
||||
|
||||
AvatarState::AvatarState()
|
||||
|
@ -750,7 +750,7 @@ void Avatar::startFlourish()
|
|||
flourishTimer.start(fanim->getAnimationLength()-0.2f);
|
||||
flourishPowerTimer.start(fanim->getAnimationLength()*0.5f);
|
||||
}
|
||||
skeletalSprite.transitionAnimate(anim, 0.1, 0, ANIMLAYER_FLOURISH);
|
||||
skeletalSprite.transitionAnimate(anim, 0.1f, 0, ANIMLAYER_FLOURISH);
|
||||
flourish = true;
|
||||
|
||||
float rotz = rotationOffset.z;
|
||||
|
@ -779,7 +779,7 @@ void Avatar::startFlourish()
|
|||
}
|
||||
}
|
||||
|
||||
rotationOffset.interpolateTo(Vector(0,0,rotz), 0.8, 0, 0, 1);
|
||||
rotationOffset.interpolateTo(Vector(0,0,rotz), 0.8f, 0, 0, 1);
|
||||
}
|
||||
|
||||
void Avatar::onIdle()
|
||||
|
@ -916,7 +916,7 @@ void Avatar::updateHair(float dt)
|
|||
float useTimer = hairTimer;
|
||||
if (useTimer > 1.0f)
|
||||
useTimer = 1.0f - (hairTimer-1);
|
||||
float frc = 0.333333;
|
||||
float frc = 0.333333f;
|
||||
diff = (diff2*(frc*(1.0f-(useTimer*0.5f))) + diff3*(frc) + Vector(0,len)*(frc*(0.5f+useTimer*0.5f)));
|
||||
|
||||
|
||||
|
@ -946,7 +946,7 @@ void Avatar::updateDamageVisualEffects()
|
|||
{
|
||||
//dsq->game->damageSprite->alpha.interpolateTo(0.9, 0.5);
|
||||
float a = ((damageThreshold - health)/float(damageThreshold))*1.0f;
|
||||
damageSprite->alpha.interpolateTo(a, 0.3);
|
||||
damageSprite->alpha.interpolateTo(a, 0.3f);
|
||||
|
||||
/*
|
||||
std::ostringstream os;
|
||||
|
@ -957,7 +957,7 @@ void Avatar::updateDamageVisualEffects()
|
|||
if(!damageSprite->scale.isInterpolating())
|
||||
{
|
||||
damageSprite->scale = Vector(1,1);
|
||||
damageSprite->scale.interpolateTo(Vector(1.2, 1.2), 0.5, -1, 1);
|
||||
damageSprite->scale.interpolateTo(Vector(1.2f, 1.2f), 0.5f, -1, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -969,14 +969,14 @@ void Avatar::updateDamageVisualEffects()
|
|||
}
|
||||
else
|
||||
{
|
||||
damageSprite->alpha.interpolateTo(0, 0.3);
|
||||
damageSprite->alpha.interpolateTo(0, 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
void Avatar::checkUpgradeForShot(Shot *s)
|
||||
{
|
||||
if (dsq->continuity.energyMult <= 1)
|
||||
s->extraDamage = dsq->continuity.energyMult * 1;
|
||||
s->extraDamage = dsq->continuity.energyMult;
|
||||
else
|
||||
s->extraDamage = dsq->continuity.energyMult * 0.75f;
|
||||
|
||||
|
@ -984,10 +984,10 @@ void Avatar::checkUpgradeForShot(Shot *s)
|
|||
{
|
||||
Quad *glow = new Quad("particles/glow", Vector(0,0));
|
||||
glow->color = Vector(1,0,0);
|
||||
glow->color.interpolateTo(Vector(1,0.5,0.5), 0.1, -1, 1);
|
||||
glow->color.interpolateTo(Vector(1,0.5f,0.5f), 0.1f, -1, 1);
|
||||
glow->setBlendType(BLEND_ADD);
|
||||
glow->scale = Vector(4, 4) + (s->extraDamage*Vector(2,2));
|
||||
glow->scale.interpolateTo(Vector(16,16)+ (s->extraDamage*Vector(2,2)), 0.5, -1, 1);
|
||||
glow->scale.interpolateTo(Vector(16,16)+ (s->extraDamage*Vector(2,2)), 0.5f, -1, 1);
|
||||
s->addChild(glow, PM_POINTER);
|
||||
}
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ void Avatar::onDamage(DamageData &d)
|
|||
int r = (rand()%2)+1;
|
||||
std::ostringstream os;
|
||||
os << "basicHit" << r;
|
||||
skeletalSprite.transitionAnimate(os.str(), 0.05, 0, ANIMLAYER_OVERRIDE);
|
||||
skeletalSprite.transitionAnimate(os.str(), 0.05f, 0, ANIMLAYER_OVERRIDE);
|
||||
|
||||
/*
|
||||
if (d.attacker)
|
||||
|
@ -1096,11 +1096,11 @@ void Avatar::onDamage(DamageData &d)
|
|||
{
|
||||
float healthWillBe = health-d.damage;
|
||||
// determines length of shader blur as well
|
||||
float t = 0.5;
|
||||
float t = 0.5f;
|
||||
if (healthWillBe<=0)
|
||||
t = 2;
|
||||
|
||||
dsq->rumble(d.damage, d.damage, 0.4, _lastActionSourceID, _lastActionInputDevice);
|
||||
dsq->rumble(d.damage, d.damage, 0.4f, _lastActionSourceID, _lastActionInputDevice);
|
||||
if (d.damage > 0)
|
||||
{
|
||||
//dsq->shakeCamera(5, t);
|
||||
|
@ -1124,8 +1124,8 @@ void Avatar::onDamage(DamageData &d)
|
|||
dsq->overlayRed->alpha.ensureData();
|
||||
dsq->overlayRed->alpha.data->path.clear();
|
||||
dsq->overlayRed->alpha.data->path.addPathNode(0, 0);
|
||||
dsq->overlayRed->alpha.data->path.addPathNode(1.0, 0.1);
|
||||
dsq->overlayRed->alpha.data->path.addPathNode(0, 1.0);
|
||||
dsq->overlayRed->alpha.data->path.addPathNode(1, 0);
|
||||
dsq->overlayRed->alpha.data->path.addPathNode(0, 1);
|
||||
dsq->overlayRed->alpha.startPath(1);
|
||||
|
||||
dsq->sound->playSfx("heartbeat");
|
||||
|
@ -1140,9 +1140,9 @@ void Avatar::onDamage(DamageData &d)
|
|||
dsq->gameSpeed.ensureData();
|
||||
dsq->gameSpeed.data->path.clear();
|
||||
dsq->gameSpeed.data->path.addPathNode(1, 0);
|
||||
dsq->gameSpeed.data->path.addPathNode(0.25, 0.1);
|
||||
dsq->gameSpeed.data->path.addPathNode(0.25, 0.4);
|
||||
dsq->gameSpeed.data->path.addPathNode(1.0, 1.0);
|
||||
dsq->gameSpeed.data->path.addPathNode(0.25f, 0.1f);
|
||||
dsq->gameSpeed.data->path.addPathNode(0.25f, 0.4f);
|
||||
dsq->gameSpeed.data->path.addPathNode(1, 1);
|
||||
|
||||
dsq->gameSpeed.startPath(2);
|
||||
|
||||
|
@ -1409,7 +1409,7 @@ void Avatar::updateDualFormGlow(float dt)
|
|||
if (perc > 1)
|
||||
perc = 1;
|
||||
bone_dualFormGlow->alpha = perc*0.5f + 0.1f;
|
||||
bone_dualFormGlow->scale.interpolateTo(Vector(perc, perc), 0.2);
|
||||
bone_dualFormGlow->scale.interpolateTo(Vector(perc, perc), 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1537,7 +1537,7 @@ void Avatar::changeForm(FormType form, bool effects, bool onInit, FormType lastF
|
|||
if (effects)
|
||||
{
|
||||
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));
|
||||
|
||||
switch(form)
|
||||
{
|
||||
|
@ -1639,8 +1639,8 @@ void Avatar::changeForm(FormType form, bool effects, bool onInit, FormType lastF
|
|||
{
|
||||
refreshModel("Naija", "SunForm");
|
||||
lightFormGlow->moveToFront();
|
||||
lightFormGlow->alpha.interpolateTo(0.75, 1);
|
||||
lightFormGlowCone->alpha.interpolateTo(0.4, 1);
|
||||
lightFormGlow->alpha.interpolateTo(0.75f, 1);
|
||||
lightFormGlowCone->alpha.interpolateTo(0.4f, 1);
|
||||
|
||||
lightFormGlow->alphaMod = 0;
|
||||
lightFormGlowCone->alphaMod = 0;
|
||||
|
@ -2050,13 +2050,13 @@ void Avatar::updateTargetQuads(float dt)
|
|||
*/
|
||||
|
||||
static Entity *lastTargetE = 0;
|
||||
const float tt = 0.02;
|
||||
const float tt = 0.02f;
|
||||
for (size_t i = 0; i < targets.size(); i++)
|
||||
{
|
||||
if (targets[i].e)
|
||||
{
|
||||
|
||||
targetQuads[i]->alpha.interpolateTo(1, 0.1);
|
||||
targetQuads[i]->alpha.interpolateTo(1, 0.1f);
|
||||
Entity *e = targets[i].e;
|
||||
if (lastTargetE != e)
|
||||
{
|
||||
|
@ -2289,7 +2289,7 @@ bool Avatar::fireAtNearestValidEntity(const std::string &shot)
|
|||
|
||||
|
||||
|
||||
skeletalSprite.transitionAnimate("fireBlast", 0.1, 0, ANIMLAYER_ARMOVERRIDE);
|
||||
skeletalSprite.transitionAnimate("fireBlast", 0.1f, 0, ANIMLAYER_ARMOVERRIDE);
|
||||
s->position = p;
|
||||
//s->damageType = dt;
|
||||
/*
|
||||
|
@ -2378,14 +2378,14 @@ void Avatar::formAbility()
|
|||
core->sound->playSfx("DualForm-Scream");
|
||||
|
||||
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->continuity.dualFormCharge = 0;
|
||||
dsq->shakeCamera(25, 2);
|
||||
|
||||
core->globalScale = Vector(0.4, 0.4);
|
||||
core->globalScale = Vector(0.4f, 0.4f);
|
||||
core->globalScaleChanged();
|
||||
myZoom = Vector(0.4, 0.4);
|
||||
myZoom = Vector(0.4f, 0.4f);
|
||||
|
||||
/*
|
||||
setv(EV_NOINPUTNOVEL, 0);
|
||||
|
@ -2507,7 +2507,7 @@ void Avatar::formAbility()
|
|||
case FORM_NATURE:
|
||||
if (formAbilityDelay == 0)
|
||||
{
|
||||
formAbilityDelay = 0.2;
|
||||
formAbilityDelay = 0.2f;
|
||||
//Vector pos = dsq->getGameCursorPosition() - position;
|
||||
|
||||
Vector pos = getAim();
|
||||
|
@ -2642,7 +2642,7 @@ void Avatar::formAbility()
|
|||
d.setLength2D(-s->shotData->avatarKickBack);
|
||||
float effect = 1;
|
||||
if (!isUnderWater())
|
||||
effect = 0.4;
|
||||
effect = 0.4f;
|
||||
push(d, s->shotData->avatarKickBackTime * effect, s->shotData->avatarKickBack * effect, 0);
|
||||
}
|
||||
}
|
||||
|
@ -2725,10 +2725,10 @@ void Avatar::formAbility()
|
|||
q->position = position;
|
||||
q->setWidthHeight(1024, 1024);
|
||||
q->setLife(1);
|
||||
q->setDecayRate(0.05);
|
||||
q->setDecayRate(0.05f);
|
||||
q->fadeAlphaWithLife = 1;
|
||||
q->scale = Vector(0,0);
|
||||
q->scale.interpolateTo(Vector(2,2), 0.1);
|
||||
q->scale.interpolateTo(Vector(2,2), 0.1f);
|
||||
dsq->game->addRenderObject(q, LR_ELEMENTS13);
|
||||
q->moveToFront();
|
||||
|
||||
|
@ -2956,7 +2956,7 @@ void Avatar::formAbilityUpdate(float dt)
|
|||
{
|
||||
if (core->mouse.buttons.right)
|
||||
{
|
||||
const float bubbleRate = 0.2;
|
||||
const float bubbleRate = 0.2f;
|
||||
|
||||
state.abilityDelay -= dt;
|
||||
if (state.abilityDelay < 0)
|
||||
|
@ -3033,8 +3033,8 @@ void Avatar::rmbu(int source, InputDevice device)
|
|||
}
|
||||
|
||||
|
||||
dsq->cursorGlow->alpha.interpolateTo(0, 0.2);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(0, 0.2);
|
||||
dsq->cursorGlow->alpha.interpolateTo(0, 0.2f);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
if (singing)
|
||||
{
|
||||
|
@ -3144,12 +3144,12 @@ void Avatar::onSetBoneLock()
|
|||
|
||||
if (boneLock.on)
|
||||
{
|
||||
skeletalSprite.transitionAnimate("wallLookUp", 0.2, -1);
|
||||
skeletalSprite.transitionAnimate("wallLookUp", 0.2f, -1);
|
||||
lockToWallCommon();
|
||||
state.lockedToWall = 1;
|
||||
wallNormal = boneLock.localOffset;
|
||||
wallNormal.normalize2D();
|
||||
rotateToVec(wallNormal, 0.1);
|
||||
rotateToVec(wallNormal, 0.1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3165,7 +3165,7 @@ void Avatar::onUpdateBoneLock()
|
|||
Entity::onUpdateBoneLock();
|
||||
|
||||
wallNormal = boneLock.wallNormal;
|
||||
rotateToVec(wallNormal, 0.01);
|
||||
rotateToVec(wallNormal, 0.01f);
|
||||
}
|
||||
|
||||
void Avatar::lmbd(int source, InputDevice device)
|
||||
|
@ -3199,7 +3199,7 @@ void Avatar::fallOffWall()
|
|||
|
||||
|
||||
idle();
|
||||
offset.interpolateTo(Vector(0,0), 0.1);
|
||||
offset.interpolateTo(Vector(0,0), 0.1f);
|
||||
if (!wallNormal.isZero())
|
||||
{
|
||||
Vector velSet = wallNormal;
|
||||
|
@ -3261,19 +3261,19 @@ void Avatar::lockToWallCommon()
|
|||
swimEmitter.stop();
|
||||
|
||||
skeletalSprite.stopAllAnimations();
|
||||
rotationOffset.interpolateTo(0, 0.01);
|
||||
rotationOffset.interpolateTo(0, 0.01f);
|
||||
|
||||
fallGravityTimer = 0;
|
||||
|
||||
dsq->spawnParticleEffect("LockToWall", position);
|
||||
stopBurst();
|
||||
stopRoll();
|
||||
core->sound->playSfx("LockToWall", 1.0);
|
||||
core->sound->playSfx("LockToWall");
|
||||
//bursting = false;
|
||||
this->burst = 1;
|
||||
//lastLockToWallPos = position;
|
||||
|
||||
state.lockToWallDelay.start(0.2);
|
||||
state.lockToWallDelay.start(0.2f);
|
||||
state.lockedToWall = true;
|
||||
|
||||
lockToWallFallTimer = -1;
|
||||
|
@ -3386,7 +3386,7 @@ void Avatar::lockToWall()
|
|||
lockToWallCommon();
|
||||
|
||||
if (outOfWaterHit)
|
||||
lockToWallFallTimer = 0.4;
|
||||
lockToWallFallTimer = 0.4f;
|
||||
else
|
||||
lockToWallFallTimer = -1;
|
||||
|
||||
|
@ -3396,13 +3396,13 @@ void Avatar::lockToWall()
|
|||
skeletalSprite.stopAllAnimations();
|
||||
if (wallPushVec.y < 0 && (fabsf(wallPushVec.y) > fabsf(wallPushVec.x)))
|
||||
{
|
||||
skeletalSprite.transitionAnimate("wallLookUp", 0.2, -1);
|
||||
skeletalSprite.transitionAnimate("wallLookUp", 0.2f, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
skeletalSprite.transitionAnimate("wall", 0.2, -1);
|
||||
skeletalSprite.transitionAnimate("wall", 0.2f, -1);
|
||||
}
|
||||
rotateToVec(wallPushVec, 0.1);
|
||||
rotateToVec(wallPushVec, 0.1f);
|
||||
|
||||
offset.stop();
|
||||
|
||||
|
@ -3452,15 +3452,15 @@ void Avatar::lockToWall()
|
|||
|
||||
void Avatar::applyTripEffects()
|
||||
{
|
||||
color.interpolateTo(BLIND_COLOR, 0.5);
|
||||
color.interpolateTo(BLIND_COLOR, 0.5f);
|
||||
|
||||
tripper->alpha.interpolateTo(1, 8);
|
||||
|
||||
tripper->color = Vector(1, 1, 1);
|
||||
tripper->rotation.z = 0;
|
||||
tripper->rotation.interpolateTo(Vector(0, 0, 360), 10, -1);
|
||||
tripper->scale = Vector(1.25, 1.25, 1.25);
|
||||
tripper->scale.interpolateTo(Vector(1.3, 1.3, 1.3), 2, -1, 1, 1);
|
||||
tripper->scale = Vector(1.25f, 1.25f, 1.25f);
|
||||
tripper->scale.interpolateTo(Vector(1.3f, 1.3f, 1.3f), 2, -1, 1, 1);
|
||||
|
||||
if (dsq->loops.trip != BBGE_AUDIO_NOCHANNEL)
|
||||
{
|
||||
|
@ -3493,21 +3493,21 @@ void Avatar::applyBlindEffects()
|
|||
// screen black
|
||||
|
||||
// character black
|
||||
color.interpolateTo(BLIND_COLOR, 0.5);
|
||||
blinder->alpha.interpolateTo(1, 0.5);
|
||||
color.interpolateTo(BLIND_COLOR, 0.5f);
|
||||
blinder->alpha.interpolateTo(1, 0.5f);
|
||||
|
||||
blinder->rotation.z = 0;
|
||||
blinder->rotation.interpolateTo(Vector(0, 0, 360), 10, -1);
|
||||
blinder->scale = Vector(1.25, 1.25, 1.25);
|
||||
blinder->scale.interpolateTo(Vector(1.3, 1.3, 1.3), 2, -1, 1, 1);
|
||||
blinder->scale = Vector(1.25f, 1.25f, 1.25f);
|
||||
blinder->scale.interpolateTo(Vector(1.3f, 1.3f, 1.3f), 2, -1, 1, 1);
|
||||
|
||||
//dsq->toggleMuffleSound(1);
|
||||
}
|
||||
|
||||
void Avatar::removeBlindEffects()
|
||||
{
|
||||
color.interpolateTo(Vector(1,1,1),0.5);
|
||||
blinder->alpha.interpolateTo(0, 0.5);
|
||||
color.interpolateTo(Vector(1,1,1),0.5f);
|
||||
blinder->alpha.interpolateTo(0, 0.5f);
|
||||
//dsq->toggleMuffleSound(0);
|
||||
}
|
||||
|
||||
|
@ -3724,7 +3724,7 @@ Avatar::Avatar() : Entity(), ActionMapper()
|
|||
//blinder->width = blinder->height = 810;
|
||||
blinder->autoWidth = AUTO_VIRTUALWIDTH;
|
||||
blinder->autoHeight = AUTO_VIRTUALWIDTH;
|
||||
blinder->scale = Vector(1.0125,1.0125);
|
||||
blinder->scale = Vector(1.0125f,1.0125f);
|
||||
blinder->followCamera = 1;
|
||||
|
||||
blinder->alpha = 0;
|
||||
|
@ -3736,7 +3736,7 @@ Avatar::Avatar() : Entity(), ActionMapper()
|
|||
//tripper->setWidthHeight(810, 810);
|
||||
tripper->autoWidth = AUTO_VIRTUALWIDTH;
|
||||
tripper->autoHeight = AUTO_VIRTUALWIDTH;
|
||||
tripper->scale = Vector(1.0125, 1.0125);
|
||||
tripper->scale = Vector(1.0125f, 1.0125f);
|
||||
tripper->followCamera = 1;
|
||||
tripper->alpha = 0;
|
||||
dsq->game->addRenderObject(tripper, LR_AFTER_EFFECTS);
|
||||
|
@ -3781,7 +3781,7 @@ Avatar::Avatar() : Entity(), ActionMapper()
|
|||
lightFormGlow = new Quad("Naija/LightFormGlow", 0);
|
||||
lightFormGlow->alpha = 0;
|
||||
|
||||
lightFormGlow->scale.interpolateTo(Vector(5.5, 5.5), 0.4, -1, 1);
|
||||
lightFormGlow->scale.interpolateTo(Vector(5.5f, 5.5f), 0.4f, -1, 1);
|
||||
//lightFormGlow->positionSnapTo = &position;
|
||||
dsq->game->addRenderObject(lightFormGlow, LR_ELEMENTS13);
|
||||
|
||||
|
@ -4012,7 +4012,7 @@ void Avatar::startBackFlip()
|
|||
if (riding) return;
|
||||
if (blockBackFlip) return;
|
||||
|
||||
skeletalSprite.getAnimationLayer(ANIMLAYER_OVERRIDE)->transitionAnimate("backflip", 0.2, 0);
|
||||
skeletalSprite.getAnimationLayer(ANIMLAYER_OVERRIDE)->transitionAnimate("backflip", 0.2f, 0);
|
||||
vel.x = -vel.x*0.25f;
|
||||
state.backFlip = true;
|
||||
}
|
||||
|
@ -4022,7 +4022,7 @@ void Avatar::stopBackFlip()
|
|||
if (state.backFlip)
|
||||
{
|
||||
//skeletalSprite.getAnimationLayer(ANIMLAYER_OVERRIDE)->stopAnimation();
|
||||
skeletalSprite.getAnimationLayer(ANIMLAYER_OVERRIDE)->transitionAnimate("backflip2", 0.2, 0);
|
||||
skeletalSprite.getAnimationLayer(ANIMLAYER_OVERRIDE)->transitionAnimate("backflip2", 0.2f, 0);
|
||||
state.backFlip = false;
|
||||
}
|
||||
}
|
||||
|
@ -4060,13 +4060,13 @@ void Avatar::startBurst()
|
|||
{
|
||||
if (!bursting && burst == 1)
|
||||
{
|
||||
dsq->rumble(0.2, 0.2, 0.2, _lastActionSourceID, _lastActionInputDevice);
|
||||
dsq->rumble(0.2f, 0.2f, 0.2f, _lastActionSourceID, _lastActionInputDevice);
|
||||
if (dsq->continuity.form != FORM_BEAST)
|
||||
wakeEmitter.start();
|
||||
dsq->game->playBurstSound(pushingOffWallEffect>0);
|
||||
skeletalSprite.animate(getBurstAnimName(), 0);
|
||||
bursting = true;
|
||||
burst = 1.0;
|
||||
burst = 1.0f;
|
||||
ripples = true;
|
||||
startBurstCommon();
|
||||
|
||||
|
@ -4126,14 +4126,14 @@ void Avatar::startWallBurst(bool useCursor)
|
|||
if (_isUnderWater && dsq->continuity.form != FORM_BEAST)
|
||||
wakeEmitter.start();
|
||||
|
||||
offset.interpolateTo(Vector(0,0), 0.05);
|
||||
offset.interpolateTo(Vector(0,0), 0.05f);
|
||||
|
||||
dsq->spawnParticleEffect("WallBoost", position+offset, rotation.z);
|
||||
if (goDir.x != 0 || goDir.y != 0)
|
||||
{
|
||||
lastBurstType = BURST_WALL;
|
||||
|
||||
dsq->rumble(0.22, 0.22, 0.2, _lastActionSourceID, _lastActionInputDevice);
|
||||
dsq->rumble(0.22f, 0.22f, 0.2f, _lastActionSourceID, _lastActionInputDevice);
|
||||
bittenEntities.clear();
|
||||
if (useCursor)
|
||||
{
|
||||
|
@ -4460,7 +4460,7 @@ void Avatar::render()
|
|||
if (dsq->continuity.form == FORM_SPIRIT && !skeletalSprite.getParent())
|
||||
{
|
||||
skeletalSprite.position = bodyPosition+bodyOffset;
|
||||
skeletalSprite.color = Vector(0.2, 0.3, 0.6);
|
||||
skeletalSprite.color = Vector(0.2f, 0.3f, 0.6f);
|
||||
skeletalSprite.render();
|
||||
skeletalSprite.color = Vector(1,1,1);
|
||||
}
|
||||
|
@ -4495,7 +4495,7 @@ void Avatar::onExitState(int action)
|
|||
}
|
||||
else if (action == STATE_PUSH)
|
||||
{
|
||||
skeletalSprite.transitionAnimate("spin", 0.1);
|
||||
skeletalSprite.transitionAnimate("spin", 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4513,8 +4513,8 @@ void Avatar::splash(bool down)
|
|||
sound("splash-into", rolling ? 0.9f : 1.0f);
|
||||
//dsq->postProcessingFx.disable(FXT_RADIALBLUR);
|
||||
if (_isUnderWater && 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));
|
||||
dsq->rumble(0.7, 0.7, 0.2, _lastActionSourceID, _lastActionInputDevice);
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter,0.08f,0.05f,22,0.2f, 1.2f));
|
||||
dsq->rumble(0.7f, 0.7f, 0.2f, _lastActionSourceID, _lastActionInputDevice);
|
||||
plungeEmitter.start();
|
||||
|
||||
core->sound->playSfx("GoUnder");
|
||||
|
@ -4747,14 +4747,14 @@ void Avatar::setHeadTexture(const std::string &name, float time)
|
|||
|
||||
void Avatar::chargeVisualEffect(const std::string &tex)
|
||||
{
|
||||
float time = 0.4;
|
||||
float time = 0.4f;
|
||||
Quad *chargeEffect = new Quad;
|
||||
chargeEffect->setBlendType(BLEND_ADD);
|
||||
chargeEffect->alpha.ensureData();
|
||||
chargeEffect->alpha.data->path.addPathNode(0, 0);
|
||||
chargeEffect->alpha.data->path.addPathNode(0.6, 0.1);
|
||||
chargeEffect->alpha.data->path.addPathNode(0.6, 0.9);
|
||||
chargeEffect->alpha.data->path.addPathNode(0, 1.0);
|
||||
chargeEffect->alpha.data->path.addPathNode(0.6f, 0.1f);
|
||||
chargeEffect->alpha.data->path.addPathNode(0.6f, 0.9f);
|
||||
chargeEffect->alpha.data->path.addPathNode(0, 1);
|
||||
chargeEffect->alpha.startPath(time);
|
||||
chargeEffect->setTexture(tex);
|
||||
//chargeEffect->positionSnapTo = &this->position;
|
||||
|
@ -4762,7 +4762,7 @@ void Avatar::chargeVisualEffect(const std::string &tex)
|
|||
chargeEffect->setPositionSnapTo(&position);
|
||||
chargeEffect->setLife(1);
|
||||
chargeEffect->setDecayRate(1.0f/time);
|
||||
chargeEffect->scale = Vector(0.1, 0.1);
|
||||
chargeEffect->scale = Vector(0.1f, 0.1f);
|
||||
chargeEffect->scale.interpolateTo(Vector(1,1),time);
|
||||
//chargeEffect->rotation.interpolateTo(Vector(0,0,360), time);
|
||||
dsq->game->addRenderObject(chargeEffect, LR_PARTICLES);
|
||||
|
@ -4894,7 +4894,7 @@ void Avatar::startRoll(int dir)
|
|||
Animation *a = skeletalSprite.getCurrentAnimation();
|
||||
if (!a || a->name != getRollAnimName())
|
||||
{
|
||||
skeletalSprite.transitionAnimate(getRollAnimName(), 0.2, -1);
|
||||
skeletalSprite.transitionAnimate(getRollAnimName(), 0.2f, -1);
|
||||
}
|
||||
|
||||
rollRightEmitter.stop();
|
||||
|
@ -4924,13 +4924,13 @@ void Avatar::startRoll(int dir)
|
|||
}
|
||||
else if (dsq->loops.roll != BBGE_AUDIO_NOCHANNEL && !_isUnderWater)
|
||||
{
|
||||
core->sound->fadeSfx(dsq->loops.roll, SFT_OUT, 0.5);
|
||||
core->sound->fadeSfx(dsq->loops.roll, SFT_OUT, 0.5f);
|
||||
}
|
||||
|
||||
rollDir = dir;
|
||||
|
||||
if (_isUnderWater && 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));
|
||||
|
||||
|
||||
//rollDelay = 0.3;
|
||||
|
@ -5091,7 +5091,7 @@ void Avatar::updateRoll(float dt)
|
|||
|
||||
lastQuad = quad;
|
||||
|
||||
rollDelay = 0.2;
|
||||
rollDelay = 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5229,7 +5229,7 @@ void Avatar::updateLookAt(float dt)
|
|||
{
|
||||
if (lastHeadTexture.empty())
|
||||
{
|
||||
setHeadTexture("blink", 0.1);
|
||||
setHeadTexture("blink", 0.1f);
|
||||
if (chance(50))
|
||||
{
|
||||
state.blinkTimer = blinkTime-0.2f;
|
||||
|
@ -5247,7 +5247,7 @@ void Avatar::updateLookAt(float dt)
|
|||
|
||||
if (bone_head)
|
||||
{
|
||||
const float lookAtTime = 0.8;
|
||||
const float lookAtTime = 0.8f;
|
||||
if (core->mouse.buttons.middle && !state.lockedToWall && isInputEnabled())
|
||||
{
|
||||
didRotationFix = false;
|
||||
|
@ -5293,7 +5293,7 @@ void Avatar::updateLookAt(float dt)
|
|||
}
|
||||
|
||||
state.updateLookAtTime += dt*4*2;
|
||||
bone_head->internalOffset.interpolateTo(Vector(0,0), 0.2);
|
||||
bone_head->internalOffset.interpolateTo(Vector(0,0), 0.2f);
|
||||
}
|
||||
|
||||
if (state.updateLookAtTime > 1.5f)
|
||||
|
@ -5305,7 +5305,7 @@ void Avatar::updateLookAt(float dt)
|
|||
|
||||
if (!state.lookAtEntity->naijaReaction.empty())
|
||||
{
|
||||
setHeadTexture(state.lookAtEntity->naijaReaction, 1.5);
|
||||
setHeadTexture(state.lookAtEntity->naijaReaction, 1.5f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -5419,7 +5419,7 @@ void Avatar::onUpdate(float dt)
|
|||
changeForm(FORM_NORMAL);
|
||||
setHeadTexture("Pain");
|
||||
core->globalScale.interpolateTo(Vector(5,5),3);
|
||||
rotation.interpolateTo(Vector(0,0,0), 0.1);
|
||||
rotation.interpolateTo(Vector(0,0,0), 0.1f);
|
||||
skeletalSprite.animate("dead");
|
||||
}
|
||||
if (isEntityDead())
|
||||
|
@ -5529,7 +5529,7 @@ void Avatar::onUpdate(float dt)
|
|||
core->sound->fadeMusic(SFT_OUT, 2);
|
||||
//("Veil");
|
||||
dsq->game->avatar->disableInput();
|
||||
dsq->gameSpeed.interpolateTo(0.1, 0.5);
|
||||
dsq->gameSpeed.interpolateTo(0.1f, 0.5f);
|
||||
|
||||
//dsq->sound->setMusicFader(0.5, 0.5);
|
||||
core->sound->playSfx("NaijaGasp");
|
||||
|
@ -5540,7 +5540,7 @@ void Avatar::onUpdate(float dt)
|
|||
dsq->voiceOnce("Naija_VeilCrossing");
|
||||
core->run(10*0.1f);
|
||||
|
||||
dsq->gameSpeed.interpolateTo(1, 0.2);
|
||||
dsq->gameSpeed.interpolateTo(1, 0.2f);
|
||||
|
||||
dsq->sound->playMusic("Veil", SLT_LOOP, SFT_CROSS, 20);
|
||||
|
||||
|
@ -5668,8 +5668,8 @@ void Avatar::onUpdate(float dt)
|
|||
if (rippleDelay < 0)
|
||||
{
|
||||
if (core->afterEffectManager)
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.04,0.06,15,0.2f));
|
||||
rippleDelay = 0.15;
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.04f,0.06f,15,0.2f));
|
||||
rippleDelay = 0.15f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5679,7 +5679,7 @@ void Avatar::onUpdate(float dt)
|
|||
tripDelay -= dt;
|
||||
if (tripDelay < 0)
|
||||
{
|
||||
tripDelay = 0.15;
|
||||
tripDelay = 0.15f;
|
||||
tripCount ++;
|
||||
if (tripCount > 10)
|
||||
{
|
||||
|
@ -5687,12 +5687,12 @@ void Avatar::onUpdate(float dt)
|
|||
if (p > 0.6f)
|
||||
{
|
||||
if (core->afterEffectManager)
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.04,0.06,15,0.2f));
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.04f,0.06f,15,0.2f));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (core->afterEffectManager)
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.4,0.6,15,0.2f));
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),position+offset,0.4f,0.6f,15,0.2f));
|
||||
}
|
||||
if (p > 0.75f){}
|
||||
else if (p > 0.5f)
|
||||
|
@ -5712,7 +5712,7 @@ void Avatar::onUpdate(float dt)
|
|||
dsq->shakeCamera(10, 4);
|
||||
else
|
||||
dsq->shakeCamera(5, 4);
|
||||
tripper->color.interpolateTo(Vector(1, 0.2, 0.2), 3);
|
||||
tripper->color.interpolateTo(Vector(1, 0.2f, 0.2f), 3);
|
||||
if (chance(75))
|
||||
dsq->emote.playSfx(EMOTE_NAIJAUGH);
|
||||
}
|
||||
|
@ -5863,7 +5863,7 @@ void Avatar::onUpdate(float dt)
|
|||
if (!_isUnderWater && !(boneLock.wallNormal.y < -0.03f))
|
||||
{
|
||||
if (lockToWallFallTimer == -1)
|
||||
lockToWallFallTimer = 0.4;
|
||||
lockToWallFallTimer = 0.4f;
|
||||
}
|
||||
else
|
||||
lockToWallFallTimer = -1;
|
||||
|
@ -6004,7 +6004,7 @@ void Avatar::onUpdate(float dt)
|
|||
urchinDelay -= dt;
|
||||
if (urchinDelay < 0)
|
||||
{
|
||||
urchinDelay = 0.1;
|
||||
urchinDelay = 0.1f;
|
||||
|
||||
dsq->game->fireShot("urchin", this, 0, position + offset);
|
||||
}
|
||||
|
@ -6190,7 +6190,7 @@ void Avatar::onUpdate(float dt)
|
|||
{
|
||||
vel *= 0.9f;
|
||||
if (!rolling)
|
||||
rotation.interpolateTo(Vector(0,0,0), 0.1);
|
||||
rotation.interpolateTo(Vector(0,0,0), 0.1f);
|
||||
if (vel.isLength2DIn(50))
|
||||
{
|
||||
if (bursting)
|
||||
|
@ -6265,7 +6265,7 @@ void Avatar::onUpdate(float dt)
|
|||
currentMaxSpeed = 1;
|
||||
|
||||
if (getState() == STATE_TRANSFORM)
|
||||
rotateToVec(addVec, 0.1, 90);
|
||||
rotateToVec(addVec, 0.1f, 90);
|
||||
else
|
||||
{
|
||||
if (rolling)
|
||||
|
@ -6281,7 +6281,7 @@ void Avatar::onUpdate(float dt)
|
|||
{
|
||||
float t = 0;
|
||||
if (dsq->inputMode == INPUT_KEYBOARD)
|
||||
t = 0.1;
|
||||
t = 0.1f;
|
||||
rotateToVec(addVec, t);
|
||||
}
|
||||
}
|
||||
|
@ -6292,7 +6292,7 @@ void Avatar::onUpdate(float dt)
|
|||
else
|
||||
{
|
||||
if (!state.nearWall && !flourish)
|
||||
rotateToVec(addVec, 0.1);
|
||||
rotateToVec(addVec, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6363,7 +6363,7 @@ void Avatar::onUpdate(float dt)
|
|||
if (!rolling && !state.backFlip && !flourish)
|
||||
{
|
||||
if (vel.x != 0 || vel.y != 0)
|
||||
rotateToVec(vel, 0.1);
|
||||
rotateToVec(vel, 0.1f);
|
||||
|
||||
if (vel.x > 0)
|
||||
{
|
||||
|
@ -6379,7 +6379,7 @@ void Avatar::onUpdate(float dt)
|
|||
if (rolling && !state.backFlip)
|
||||
{
|
||||
Vector v = getVectorToCursorFromScreenCentre();
|
||||
rotateToVec(v, 0.01);
|
||||
rotateToVec(v, 0.01f);
|
||||
}
|
||||
if (isLockable())
|
||||
lockToWall();
|
||||
|
@ -6391,7 +6391,7 @@ void Avatar::onUpdate(float dt)
|
|||
{
|
||||
swimming = false;
|
||||
if (dsq->continuity.form == FORM_FISH)
|
||||
rotation.interpolateTo(0, 0.2);
|
||||
rotation.interpolateTo(0, 0.2f);
|
||||
}
|
||||
// "friction"
|
||||
//vel += -vel*0.999f*dt;
|
||||
|
@ -6474,7 +6474,7 @@ void Avatar::onUpdate(float dt)
|
|||
|
||||
for (int i = 0; i < int((t*0.5f)/0.01f); i++)
|
||||
{
|
||||
internalOffset.update(0.01);
|
||||
internalOffset.update(0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6516,13 +6516,13 @@ void Avatar::onUpdate(float dt)
|
|||
{
|
||||
skeletalSprite.getAnimationLayer(ANIMLAYER_UPPERBODYIDLE)->stopAnimation();
|
||||
}
|
||||
internalOffset.interpolateTo(Vector(0,0),0.5);
|
||||
internalOffset.interpolateTo(Vector(0,0),0.5f);
|
||||
}
|
||||
|
||||
checkNearWall();
|
||||
//if (core->getNestedMains()==1)
|
||||
{
|
||||
Vector zoomSurface(0.55, 0.55);
|
||||
Vector zoomSurface(0.55f, 0.55f);
|
||||
Vector zoomMove(vars->zoomMove, vars->zoomMove), zoomStop(vars->zoomStop, vars->zoomStop), zoomNaija(vars->zoomNaija, vars->zoomNaija);
|
||||
float cheatLen = getMoveVel().getSquaredLength2D();
|
||||
|
||||
|
@ -6545,7 +6545,7 @@ void Avatar::onUpdate(float dt)
|
|||
{
|
||||
if (dsq->game->waterLevel.x > 0 && fabsf(avatar->position.y - dsq->game->waterLevel.x) < 800)
|
||||
{
|
||||
float time = 0.5;
|
||||
float time = 0.5f;
|
||||
if (!myZoom.isInterpolating() || ((!core->globalScale.data || core->globalScale.data->target != zoomSurface) && myZoom.data->timePeriod != time))
|
||||
{
|
||||
myZoom.interpolateTo(zoomSurface, time, 0, 0, 1);
|
||||
|
@ -6553,7 +6553,7 @@ void Avatar::onUpdate(float dt)
|
|||
}
|
||||
else if (avatar->looking == 2)
|
||||
{
|
||||
float time = 1.0;
|
||||
float time = 1.0f;
|
||||
if (!myZoom.isInterpolating() || ((!core->globalScale.data || core->globalScale.data->target != zoomNaija) && myZoom.data->timePeriod != time))
|
||||
{
|
||||
/*
|
||||
|
@ -6569,7 +6569,7 @@ void Avatar::onUpdate(float dt)
|
|||
float time = 3;
|
||||
if (avatar->looking)
|
||||
{
|
||||
time = 1.0;
|
||||
time = 1.0f;
|
||||
}
|
||||
if (!myZoom.isInterpolating() || ((!core->globalScale.data || core->globalScale.data->target != zoomMove) && myZoom.data->timePeriod != time))
|
||||
myZoom.interpolateTo(zoomMove, time, 0, 0, 1);
|
||||
|
@ -6582,7 +6582,7 @@ void Avatar::onUpdate(float dt)
|
|||
}
|
||||
else if (cheatLen >= sqr(1000))
|
||||
{
|
||||
float time = 1.6;
|
||||
float time = 1.6f;
|
||||
if (!myZoom.isInterpolating() || (myZoom.data->target != zoomMove && myZoom.data->timePeriod != time))
|
||||
myZoom.interpolateTo(zoomMove, time, 0, 0, 1);
|
||||
}
|
||||
|
@ -6884,7 +6884,7 @@ void Avatar::checkNearWall()
|
|||
if (!n.isZero())
|
||||
{
|
||||
state.nearWall = true;
|
||||
float t=0.2;
|
||||
float t=0.2f;
|
||||
rotateToVec(n, t, 0);
|
||||
skeletalSprite.transitionAnimate("wall", t);
|
||||
}
|
||||
|
|
|
@ -41,10 +41,10 @@ Beam::Beam(Vector pos, float angle) : Quad()
|
|||
|
||||
setBlendType(BLEND_ADD);
|
||||
alpha = 0;
|
||||
alpha.interpolateTo(1, 0.1);
|
||||
alpha.interpolateTo(1, 0.1f);
|
||||
trace();
|
||||
damageData.damageType = DT_ENEMY_BEAM;
|
||||
damageData.damage = 0.5;
|
||||
damageData.damage = 0.5f;
|
||||
|
||||
beamWidth = 16;
|
||||
}
|
||||
|
|
|
@ -52,12 +52,12 @@ void BitBlotLogo::doShortBitBlot()
|
|||
|
||||
Quad *logo = new Quad("BitBlot/Logo.png", Vector(400,300));
|
||||
logo->followCamera = 1;
|
||||
logo->scale = Vector(0.6,0.6);
|
||||
logo->scale = Vector(0.6f,0.6f);
|
||||
addRenderObject(logo, LR_HUD);
|
||||
|
||||
core->run(1.5);
|
||||
|
||||
dsq->overlay2->alpha.interpolateTo(1, 0.5);
|
||||
dsq->overlay2->alpha.interpolateTo(1, 0.5f);
|
||||
core->run(0.5);
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,8 @@ void BitBlotLogo::applyState()
|
|||
bird->position = Vector(-300 + rand()%150, -200 + rand()%200);
|
||||
bird->offset.interpolateTo(Vector(200, -20 + rand()%100), 20);
|
||||
bird->shareAlphaWithChildren = 1;
|
||||
bird->getBoneByIdx(0)->alphaMod = 0.3;
|
||||
bird->getBoneByIdx(1)->alphaMod = 0.3;
|
||||
bird->getBoneByIdx(0)->alphaMod = 0.3f;
|
||||
bird->getBoneByIdx(1)->alphaMod = 0.3f;
|
||||
landscape->addChild(bird, PM_POINTER, RBP_OFF);
|
||||
bird->update((rand()%100)*0.1f);
|
||||
}
|
||||
|
@ -161,10 +161,10 @@ void BitBlotLogo::applyState()
|
|||
windmill->shareAlphaWithChildren = 1;
|
||||
landscape->addChild(windmill, PM_POINTER, RBP_OFF);
|
||||
windmill->update((rand()%100)*0.1f);
|
||||
windmill->scale = Vector(0.7, 0.7);
|
||||
windmill->scale = Vector(0.7f, 0.7f);
|
||||
for (size_t i = 0; i < windmill->bones.size(); i++)
|
||||
{
|
||||
windmill->getBoneByIdx(i)->alpha = 0.7;
|
||||
windmill->getBoneByIdx(i)->alpha = 0.7f;
|
||||
}
|
||||
windmills.push_back(windmill);
|
||||
}
|
||||
|
@ -197,14 +197,14 @@ void BitBlotLogo::applyState()
|
|||
|
||||
Quad *logo = new Quad("BitBlot/Logo.png", Vector(400,300));
|
||||
logo->followCamera = 1;
|
||||
logo->scale = Vector(0.6, 0.6);
|
||||
logo->scale = Vector(0.6f, 0.6f);
|
||||
addRenderObject(logo, LR_ENTITIES);
|
||||
|
||||
Quad *logob = new Quad("BitBlot/Logo-blur.png", Vector(400,300));
|
||||
logob->followCamera = 1;
|
||||
logob->scale = Vector(0.6, 0.6);
|
||||
logob->scale = Vector(0.6f, 0.6f);
|
||||
logob->offset = Vector(-4, 0);
|
||||
logob->offset.interpolateTo(Vector(4,0), 0.05, -1, 1);
|
||||
logob->offset.interpolateTo(Vector(4,0), 0.05f, -1, 1);
|
||||
|
||||
addRenderObject(logob, LR_ENTITIES);
|
||||
|
||||
|
@ -219,7 +219,7 @@ void BitBlotLogo::applyState()
|
|||
Quad *lin = new Quad("", Vector(0,y-300));
|
||||
lin->followCamera = 1;
|
||||
lin->color = 0;
|
||||
lin->alphaMod = 0.2;
|
||||
lin->alphaMod = 0.2f;
|
||||
lin->setWidthHeight(800, 3);
|
||||
lines->addChild(lin, PM_POINTER);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ void BitBlotLogo::applyState()
|
|||
scanline->followCamera = 1;
|
||||
scanline->setWidthHeight(800, 200);
|
||||
scanline->alpha = 0.5;
|
||||
scanline->position.interpolateTo(Vector(400,700), 0.4, -1);
|
||||
scanline->position.interpolateTo(Vector(400,700), 0.4f, -1);
|
||||
addRenderObject(scanline, LR_ENTITIES2);
|
||||
|
||||
dsq->overlay->alpha = 1;
|
||||
|
@ -269,7 +269,7 @@ void BitBlotLogo::applyState()
|
|||
|
||||
|
||||
|
||||
landscape->scale.interpolateTo(Vector(1.1, 1.1), 5);
|
||||
landscape->scale.interpolateTo(Vector(1.1f, 1.1f), 5);
|
||||
|
||||
scanline->alpha.interpolateTo(0, 1);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ void CollideEntity::bounce(float ba)
|
|||
sound("RockHit");
|
||||
// HACK: replace damage function
|
||||
//damage(pushDamage);
|
||||
setState(STATE_PUSHDELAY, 0.3);
|
||||
setState(STATE_PUSHDELAY, 0.3f);
|
||||
}
|
||||
|
||||
switch (bounceType)
|
||||
|
|
|
@ -644,11 +644,11 @@ bool Continuity::applyIngredientEffects(IngredientData *data)
|
|||
debugLog("ingredient effect: defense");
|
||||
|
||||
if (fx.magnitude <= 1)
|
||||
dsq->continuity.setDefenseMultiplier(0.75, defenseTime);
|
||||
dsq->continuity.setDefenseMultiplier(0.75f, defenseTime);
|
||||
else if (fx.magnitude == 2)
|
||||
dsq->continuity.setDefenseMultiplier(0.5, defenseTime);
|
||||
dsq->continuity.setDefenseMultiplier(0.5f, defenseTime);
|
||||
else if (fx.magnitude == 3)
|
||||
dsq->continuity.setDefenseMultiplier(0.3, defenseTime);
|
||||
dsq->continuity.setDefenseMultiplier(0.3f, defenseTime);
|
||||
else
|
||||
debugLog("unsupported magnitude for defense");
|
||||
|
||||
|
@ -1443,9 +1443,9 @@ void Continuity::castSong(int num)
|
|||
|
||||
effect->alpha.ensureData();
|
||||
effect->alpha.data->path.addPathNode(0, 0);
|
||||
effect->alpha.data->path.addPathNode(0.5, 0.1);
|
||||
effect->alpha.data->path.addPathNode(0.5f, 0.1f);
|
||||
effect->alpha.data->path.addPathNode(1, 0.5);
|
||||
effect->alpha.data->path.addPathNode(0, 0.9);
|
||||
effect->alpha.data->path.addPathNode(0, 0.9f);
|
||||
effect->alpha.data->path.addPathNode(0, 1);
|
||||
effect->alpha.startPath(et);
|
||||
effect->setLife(et+0.1f);
|
||||
|
@ -1490,13 +1490,13 @@ void Continuity::castSong(int num)
|
|||
break;
|
||||
case SONG_TIME:
|
||||
{
|
||||
float v = 0.3;
|
||||
float v = 0.3f;
|
||||
dsq->gameSpeed.ensureData();
|
||||
dsq->gameSpeed.data->path.clear();
|
||||
dsq->gameSpeed.data->path.addPathNode(0,0);
|
||||
dsq->gameSpeed.data->path.addPathNode(v,0.05);
|
||||
dsq->gameSpeed.data->path.addPathNode(v,0.95);
|
||||
dsq->gameSpeed.data->path.addPathNode(1,1.0);
|
||||
dsq->gameSpeed.data->path.addPathNode(v,0.05f);
|
||||
dsq->gameSpeed.data->path.addPathNode(v,0.95f);
|
||||
dsq->gameSpeed.data->path.addPathNode(1,1.0f);
|
||||
dsq->gameSpeed.startPath(10);
|
||||
}
|
||||
break;
|
||||
|
@ -1521,11 +1521,11 @@ void Continuity::castSong(int num)
|
|||
{
|
||||
|
||||
dsq->overlay->color = Vector(1,1,1);
|
||||
dsq->fade(1, 0.3);
|
||||
dsq->run(0.3);
|
||||
dsq->fade(1, 0.3f);
|
||||
dsq->run(0.3f);
|
||||
warpLiToAvatar();
|
||||
dsq->fade(0, 0.3);
|
||||
dsq->run(0.3);
|
||||
dsq->fade(0, 0.3f);
|
||||
dsq->run(0.3f);
|
||||
dsq->overlay->color = 0;
|
||||
|
||||
}
|
||||
|
@ -2043,7 +2043,7 @@ void Continuity::applyWorldEffects(WorldType type, bool transition, bool affectM
|
|||
|
||||
dsq->game->avatar->canWarp = false;
|
||||
|
||||
dsq->game->sceneColor.interpolateTo(Vector(0.4, 0.8, 0.9), time);
|
||||
dsq->game->sceneColor.interpolateTo(Vector(0.4f, 0.8f, 0.9f), time);
|
||||
dsq->game->avatar->applyWorldEffects(type);
|
||||
}
|
||||
else
|
||||
|
@ -3293,10 +3293,10 @@ public:
|
|||
scale = Vector(0, 0);
|
||||
scale.ensureData();
|
||||
scale.data->path.addPathNode(Vector(0,0), 0);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.3);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.6);
|
||||
scale.data->path.addPathNode(Vector(0.5,0.5), 0.9);
|
||||
scale.data->path.addPathNode(Vector(0.1,0.1), 1);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.3f);
|
||||
scale.data->path.addPathNode(Vector(1,1), 0.6f);
|
||||
scale.data->path.addPathNode(Vector(0.5f,0.5f), 0.9f);
|
||||
scale.data->path.addPathNode(Vector(0.1f,0.1f), 1);
|
||||
scale.startPath(timeScale);
|
||||
|
||||
position = Vector(400,400);
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace AQCredits
|
|||
q->alpha.startPath(t);
|
||||
|
||||
q->scale.ensureData();
|
||||
q->scale.data->path.addPathNode(Vector(0.8, 0.8), 0);
|
||||
q->scale.data->path.addPathNode(Vector(1.4, 1.4), 1);
|
||||
q->scale.data->path.addPathNode(Vector(0.8f, 0.8f), 0);
|
||||
q->scale.data->path.addPathNode(Vector(1.4f, 1.4f), 1);
|
||||
q->scale.startPath(t);
|
||||
|
||||
core->run(t);
|
||||
|
@ -55,10 +55,10 @@ namespace AQCredits
|
|||
void cred(Quad *cred, bool show)
|
||||
{
|
||||
float t= 3;
|
||||
cred->scale = Vector(0.7, 0.7);
|
||||
cred->scale = Vector(0.7f, 0.7f);
|
||||
if (show)
|
||||
{
|
||||
cred->alpha.interpolateTo(0.7, t, 0, 0, 1);
|
||||
cred->alpha.interpolateTo(0.7f, t, 0, 0, 1);
|
||||
cred->offset.interpolateTo(Vector(100, 0), 60);
|
||||
}
|
||||
else
|
||||
|
@ -92,7 +92,7 @@ void Credits::applyState()
|
|||
bg1->followCamera = 1;
|
||||
bg1->rotation.interpolateTo(Vector(0, 0, 360), 20, -1);
|
||||
bg1->alpha = 0.5;
|
||||
bg1->setSegs(32, 32, 0.5, 0.5, 0.008, 0.008, 2.0, 1);
|
||||
bg1->setSegs(32, 32, 0.5f, 0.5f, 0.008f, 0.008f, 2.0f, 1);
|
||||
addRenderObject(bg1, LR_BACKGROUND);
|
||||
|
||||
bg2 = new Quad("particles/gas", Vector(400,300));
|
||||
|
@ -101,7 +101,7 @@ void Credits::applyState()
|
|||
bg2->followCamera = 1;
|
||||
bg2->rotation.interpolateTo(Vector(0, 0, -360), 20, -1);
|
||||
bg2->alpha = 0.5;
|
||||
bg2->setSegs(32, 32, 0.5, 0.5, 0.008, 0.008, 2.0, 1);
|
||||
bg2->setSegs(32, 32, 0.5f, 0.5f, 0.008f, 0.008f, 2.0f, 1);
|
||||
addRenderObject(bg2, LR_BACKGROUND);
|
||||
|
||||
alec = new Quad("credits/alec", Vector(200, 500));
|
||||
|
|
154
Aquaria/DSQ.cpp
154
Aquaria/DSQ.cpp
|
@ -362,7 +362,7 @@ void DSQ::centerMessage(const std::string &text, float y, int type)
|
|||
t->position = pos;
|
||||
t->alpha.ensureData();
|
||||
t->alpha.data->path.addPathNode(1, 0);
|
||||
t->alpha.data->path.addPathNode(1, 0.8);
|
||||
t->alpha.data->path.addPathNode(1, 0.8f);
|
||||
t->alpha.data->path.addPathNode(0, 1);
|
||||
t->alpha.startPath(time);
|
||||
t->followCamera = 1;
|
||||
|
@ -388,8 +388,8 @@ void DSQ::centerText(const std::string &text)
|
|||
s->followCamera = 1;
|
||||
s->alpha.ensureData();
|
||||
s->alpha.data->path.addPathNode(0, 0);
|
||||
s->alpha.data->path.addPathNode(1, 0.1);
|
||||
s->alpha.data->path.addPathNode(1, 0.8);
|
||||
s->alpha.data->path.addPathNode(1, 0.1f);
|
||||
s->alpha.data->path.addPathNode(1, 0.8f);
|
||||
s->alpha.data->path.addPathNode(0, 1);
|
||||
s->alpha.startPath(time);
|
||||
getTopStateData()->addRenderObject(s, LR_HUD);
|
||||
|
@ -401,8 +401,8 @@ void DSQ::centerText(const std::string &text)
|
|||
t->position =pos;
|
||||
t->alpha.ensureData();
|
||||
t->alpha.data->path.addPathNode(0, 0);
|
||||
t->alpha.data->path.addPathNode(1, 0.1);
|
||||
t->alpha.data->path.addPathNode(1, 0.8);
|
||||
t->alpha.data->path.addPathNode(1, 0.1f);
|
||||
t->alpha.data->path.addPathNode(1, 0.8f);
|
||||
t->alpha.data->path.addPathNode(0, 1);
|
||||
t->alpha.startPath(time);
|
||||
|
||||
|
@ -443,28 +443,28 @@ void DSQ::loadFonts()
|
|||
std::string file = localisePath("data/font-small.glf");
|
||||
|
||||
font.load(file, 1, false);
|
||||
font.fontTopColor = Vector(0.9,0.9,1);
|
||||
font.fontBtmColor = Vector(0.5,0.8,1);
|
||||
font.fontTopColor = Vector(0.9f,0.9f,1);
|
||||
font.fontBtmColor = Vector(0.5f,0.8f,1);
|
||||
font.overrideTexture = core->addTexture("font");
|
||||
|
||||
smallFont.load(file, 0.6, false);
|
||||
smallFont.fontTopColor = Vector(0.9,0.9,1);
|
||||
smallFont.fontBtmColor = Vector(0.5,0.8,1);
|
||||
smallFont.load(file, 0.6f, false);
|
||||
smallFont.fontTopColor = Vector(0.9f,0.9f,1);
|
||||
smallFont.fontBtmColor = Vector(0.5f,0.8f,1);
|
||||
smallFont.overrideTexture = core->addTexture("font");
|
||||
|
||||
smallFontRed.load(file, 0.6, false);
|
||||
smallFontRed.fontTopColor = Vector(1,0.9,0.9);
|
||||
smallFontRed.fontBtmColor = Vector(1,0.8,0.5);
|
||||
smallFontRed.load(file, 0.6f, false);
|
||||
smallFontRed.fontTopColor = Vector(1,0.9f,0.9f);
|
||||
smallFontRed.fontBtmColor = Vector(1,0.8f,0.5f);
|
||||
smallFontRed.overrideTexture = core->addTexture("font");
|
||||
|
||||
subsFont.load(file, 0.5, false);
|
||||
subsFont.load(file, 0.5f, false);
|
||||
subsFont.fontTopColor = Vector(1,1,1);
|
||||
subsFont.fontBtmColor = Vector(0.5,0.8,1);
|
||||
subsFont.fontBtmColor = Vector(0.5f,0.8f,1);
|
||||
subsFont.overrideTexture = core->addTexture("font");
|
||||
|
||||
goldFont.load(file, 1, false);
|
||||
goldFont.fontTopColor = Vector(1,0.9,0.5);
|
||||
goldFont.fontBtmColor = Vector(0.6,0.5,0.25);
|
||||
goldFont.fontTopColor = Vector(1,0.9f,0.5f);
|
||||
goldFont.fontBtmColor = Vector(0.6f,0.5f,0.25f);
|
||||
goldFont.overrideTexture = core->addTexture("font");
|
||||
|
||||
|
||||
|
@ -576,7 +576,7 @@ void DSQ::debugMenu()
|
|||
else if (c == '6')
|
||||
{
|
||||
while (core->getKeyState(KEY_RETURN))
|
||||
core->run(0.1);
|
||||
core->run(0.1f);
|
||||
dsq->setStory();
|
||||
}
|
||||
else if (c == '8')
|
||||
|
@ -691,7 +691,7 @@ static const float loadingProgressTable[] = {
|
|||
#define LOAD_GRAPHICS2 5 // After creating more graphics resources
|
||||
#define LOAD_TEXTURES 6 // After loading textures to be precached
|
||||
#define LOAD_FINISHED 7 // All done!
|
||||
0.01, 0.07, 0.20, 0.23, 0.24, 0.25, 0.89, 1.00,
|
||||
0.01f, 0.07f, 0.20f, 0.23f, 0.24f, 0.25f, 0.89f, 1.00f,
|
||||
};
|
||||
|
||||
void loadBit(int index, float perc = 1)
|
||||
|
@ -1108,8 +1108,8 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
|
||||
versionLabel->followCamera = 1;
|
||||
versionLabel->setAlign(ALIGN_LEFT);
|
||||
versionLabel->scale = Vector(0.7, 0.7);
|
||||
versionLabel->alphaMod = 0.75;
|
||||
versionLabel->scale = Vector(0.7f, 0.7f);
|
||||
versionLabel->alphaMod = 0.75f;
|
||||
versionLabel->alpha = 0;
|
||||
}
|
||||
addRenderObject(versionLabel, LR_REGISTER_TEXT);
|
||||
|
@ -1118,7 +1118,7 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
subbox = new Quad();
|
||||
subbox->position = Vector(400,580);
|
||||
subbox->alpha = 0;
|
||||
subbox->alphaMod = 0.7;
|
||||
subbox->alphaMod = 0.7f;
|
||||
subbox->followCamera = 1;
|
||||
subbox->autoWidth = AUTO_VIRTUALWIDTH;
|
||||
subbox->setHeight(40);
|
||||
|
@ -1140,7 +1140,7 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
achievement_box = new Quad();
|
||||
achievement_box->position = Vector(800,0);
|
||||
achievement_box->alpha = 0;
|
||||
achievement_box->alphaMod = 0.7;
|
||||
achievement_box->alphaMod = 0.7f;
|
||||
achievement_box->followCamera = 1;
|
||||
achievement_box->setWidthHeight(400, 87);
|
||||
achievement_box->color = 0;
|
||||
|
@ -1199,10 +1199,10 @@ This build is not yet final, and as such there are a couple things lacking. They
|
|||
cursorBlinker = new Quad;
|
||||
{
|
||||
cursorBlinker->setTexture("cursor");
|
||||
cursorBlinker->scale = Vector(1.5, 1.5);
|
||||
cursorBlinker->scale.interpolateTo(Vector(2,2), 0.2, -1, 1, 1);
|
||||
cursorBlinker->scale = Vector(1.5f, 1.5f);
|
||||
cursorBlinker->scale.interpolateTo(Vector(2,2), 0.2f, -1, 1, 1);
|
||||
cursorBlinker->alpha = 0;
|
||||
cursorBlinker->alphaMod = 0.5;
|
||||
cursorBlinker->alphaMod = 0.5f;
|
||||
}
|
||||
cursor->addChild(cursorBlinker, PM_NONE, RBP_OFF);
|
||||
addRenderObject(cursorBlinker, LR_CURSOR);
|
||||
|
@ -1586,7 +1586,7 @@ void DSQ::setStory()
|
|||
std::istringstream is(flagString);
|
||||
is >> flag;
|
||||
|
||||
core->run(0.2);
|
||||
core->run(0.2f);
|
||||
std::ostringstream os;
|
||||
os << dsq->continuity.getFlag(flag);
|
||||
flagString = getUserInputString(dsq->continuity.stringBank.get(2015), os.str());
|
||||
|
@ -1655,35 +1655,35 @@ Vector DSQ::getNoteColor(int note)
|
|||
{
|
||||
case 0:
|
||||
// light green
|
||||
noteColor = Vector(0.5, 1, 0.5);
|
||||
noteColor = Vector(0.5f, 1, 0.5f);
|
||||
break;
|
||||
case 1:
|
||||
// blue/green
|
||||
noteColor = Vector(0.5, 1, 0.75);
|
||||
noteColor = Vector(0.5f, 1, 0.75f);
|
||||
break;
|
||||
case 2:
|
||||
// blue
|
||||
noteColor = Vector(0.5, 0.5, 1);
|
||||
noteColor = Vector(0.5f, 0.5f, 1);
|
||||
break;
|
||||
case 3:
|
||||
// purple
|
||||
noteColor = Vector(1, 0.5, 1);
|
||||
noteColor = Vector(1, 0.5f, 1);
|
||||
break;
|
||||
case 4:
|
||||
// red
|
||||
noteColor = Vector(1, 0.5, 0.5);
|
||||
noteColor = Vector(1, 0.5f, 0.5f);
|
||||
break;
|
||||
case 5:
|
||||
// red/orange
|
||||
noteColor = Vector(1, 0.6, 0.5);
|
||||
noteColor = Vector(1, 0.6f, 0.5f);
|
||||
break;
|
||||
case 6:
|
||||
// orange
|
||||
noteColor = Vector(1, 0.75, 0.5);
|
||||
noteColor = Vector(1, 0.75f, 0.5f);
|
||||
break;
|
||||
case 7:
|
||||
// orange
|
||||
noteColor = Vector(1, 1, 0.5);
|
||||
noteColor = Vector(1, 1, 0.5f);
|
||||
break;
|
||||
}
|
||||
return noteColor;
|
||||
|
@ -1748,16 +1748,16 @@ void DSQ::toggleConsole()
|
|||
{
|
||||
if (console->alpha == 0)
|
||||
{
|
||||
console->alpha.interpolateTo(1, 0.1);
|
||||
cmDebug->alpha.interpolateTo(1, 0.1);
|
||||
fpsText->alpha.interpolateTo(1, 0.1);
|
||||
console->alpha.interpolateTo(1, 0.1f);
|
||||
cmDebug->alpha.interpolateTo(1, 0.1f);
|
||||
fpsText->alpha.interpolateTo(1, 0.1f);
|
||||
RenderObject::renderPaths = true;
|
||||
}
|
||||
else if (console->alpha == 1)
|
||||
{
|
||||
console->alpha.interpolateTo(0, 0.1);
|
||||
cmDebug->alpha.interpolateTo(0, 0.1);
|
||||
fpsText->alpha.interpolateTo(0, 0.1);
|
||||
console->alpha.interpolateTo(0, 0.1f);
|
||||
cmDebug->alpha.interpolateTo(0, 0.1f);
|
||||
fpsText->alpha.interpolateTo(0, 0.1f);
|
||||
RenderObject::renderPaths = false;
|
||||
}
|
||||
}
|
||||
|
@ -2129,7 +2129,7 @@ void DSQ::shutdown()
|
|||
|
||||
screenTransition = 0;
|
||||
|
||||
core->run(0.1);
|
||||
core->run(0.1f);
|
||||
overlay = 0;
|
||||
overlay2 = 0;
|
||||
overlay3 = 0;
|
||||
|
@ -2205,8 +2205,8 @@ void DSQ::clickRingEffect(Vector pos, int type, Vector color, float ut)
|
|||
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(0.5, 0.1);
|
||||
q->alpha.data->path.addPathNode(0.5, 0.5);
|
||||
q->alpha.data->path.addPathNode(0.5f, 0.1f);
|
||||
q->alpha.data->path.addPathNode(0.5f, 0.5f);
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
|
||||
|
@ -2221,7 +2221,7 @@ void DSQ::clickRingEffect(Vector pos, int type, Vector color, float ut)
|
|||
break;
|
||||
case 1:
|
||||
{
|
||||
float t = 0.2;
|
||||
float t = 0.2f;
|
||||
if (ut != 0) t = ut;
|
||||
Quad *q = new Quad;
|
||||
q->setTexture("Particles/SoftRing");
|
||||
|
@ -2235,8 +2235,8 @@ void DSQ::clickRingEffect(Vector pos, int type, Vector color, float ut)
|
|||
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(0.5, 0.1);
|
||||
q->alpha.data->path.addPathNode(0.5, 0.5);
|
||||
q->alpha.data->path.addPathNode(0.5f, 0.1f);
|
||||
q->alpha.data->path.addPathNode(0.5f, 0.5f);
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
|
||||
|
@ -2315,7 +2315,7 @@ void DSQ::doSavePoint(const Vector &position)
|
|||
{
|
||||
glow->setTexture("save-point-glow");
|
||||
glow->alpha = 0;
|
||||
glow->alpha.interpolateTo(0.5, 1, 1, -1, 1);
|
||||
glow->alpha.interpolateTo(0.5f, 1, 1, true, true);
|
||||
glow->setBlendType(RenderObject::BLEND_ADD);
|
||||
glow->position = position;
|
||||
glow->scale = Vector(1,1)*1.25f;
|
||||
|
@ -2329,7 +2329,7 @@ void DSQ::doSavePoint(const Vector &position)
|
|||
dsq->game->avatar->disableInput();
|
||||
dsq->game->avatar->fhTo(false);
|
||||
dsq->game->avatar->position.interpolateTo(position, 1, 0, 0, 1);
|
||||
dsq->game->avatar->myZoom.interpolateTo(Vector(1,1),0.5);
|
||||
dsq->game->avatar->myZoom.interpolateTo(Vector(1,1),0.5f);
|
||||
|
||||
dsq->game->avatar->skeletalSprite.animate("save", 0, 3);
|
||||
dsq->game->clearControlHint();
|
||||
|
@ -2349,8 +2349,8 @@ void DSQ::playNoEffect()
|
|||
{
|
||||
if (noEffectTimer <= 0)
|
||||
{
|
||||
sound->playSfx("noeffect", 0.9);
|
||||
noEffectTimer = 0.2;
|
||||
sound->playSfx("noeffect", 0.9f);
|
||||
noEffectTimer = 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2478,9 +2478,9 @@ void DSQ::createModSelector()
|
|||
blackout->autoHeight = AUTO_VIRTUALHEIGHT;
|
||||
blackout->followCamera = 1;
|
||||
blackout->position = Vector(400,300);
|
||||
blackout->alphaMod = 0.75;
|
||||
blackout->alphaMod = 0.75f;
|
||||
blackout->alpha = 0;
|
||||
blackout->alpha.interpolateTo(1, 0.2);
|
||||
blackout->alpha.interpolateTo(1, 0.2f);
|
||||
addRenderObject(blackout, LR_MENU);
|
||||
|
||||
modSelectorScr = new ModSelectorScreen();
|
||||
|
@ -2602,7 +2602,7 @@ void DSQ::createSaveSlots(SaveSlotMode ssm)
|
|||
}
|
||||
menu.resize(5);
|
||||
|
||||
float t = 0.3;
|
||||
float t = 0.3f;
|
||||
|
||||
|
||||
blackout = new Quad;
|
||||
|
@ -2611,9 +2611,9 @@ void DSQ::createSaveSlots(SaveSlotMode ssm)
|
|||
blackout->autoHeight = AUTO_VIRTUALHEIGHT;
|
||||
blackout->followCamera = 1;
|
||||
blackout->position = Vector(400,300);
|
||||
blackout->alphaMod = 0.75;
|
||||
blackout->alphaMod = 0.75f;
|
||||
blackout->alpha = 0;
|
||||
blackout->alpha.interpolateTo(1, 0.5);
|
||||
blackout->alpha.interpolateTo(1, 0.5f);
|
||||
addRenderObject(blackout, LR_MENU);
|
||||
|
||||
|
||||
|
@ -2800,7 +2800,7 @@ void DSQ::clearSaveSlots(bool trans)
|
|||
{
|
||||
core->sound->playSfx("menu-close");
|
||||
}
|
||||
float t = 0.3;
|
||||
float t = 0.3f;
|
||||
if (blackout)
|
||||
{
|
||||
if (!trans)
|
||||
|
@ -2968,7 +2968,7 @@ void DSQ::doSaveSlotMenu(SaveSlotMode ssm, const Vector &position)
|
|||
|
||||
PlaySfx sfx;
|
||||
sfx.name = "saved";
|
||||
sfx.vol = 0.55;
|
||||
sfx.vol = 0.55f;
|
||||
dsq->sound->playSfx(sfx);
|
||||
confirm("", "saved", 1);
|
||||
|
||||
|
@ -3034,7 +3034,7 @@ void DSQ::onConfirmNo()
|
|||
|
||||
bool DSQ::confirm(const std::string &text, const std::string &image, bool ok, float countdown)
|
||||
{
|
||||
const float t = 0.3;
|
||||
const float t = 0.3f;
|
||||
|
||||
sound->playSfx("menu-open");
|
||||
|
||||
|
@ -3061,7 +3061,7 @@ bool DSQ::confirm(const std::string &text, const std::string &image, bool ok, fl
|
|||
|
||||
dsq->run(t);
|
||||
|
||||
float t2 = 0.05;
|
||||
float t2 = 0.05f;
|
||||
|
||||
|
||||
|
||||
|
@ -3126,7 +3126,7 @@ bool DSQ::confirm(const std::string &text, const std::string &image, bool ok, fl
|
|||
txt->position = Vector(400,250);
|
||||
txt->setText(text);
|
||||
txt->alpha = 0;
|
||||
txt->scale = Vector(0.9, 0.9);
|
||||
txt->scale = Vector(0.9f, 0.9f);
|
||||
txt->alpha.interpolateTo(1, t2);
|
||||
addRenderObject(txt, LR_CONFIRM);
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ bool DSQ::confirm(const std::string &text, const std::string &image, bool ok, fl
|
|||
|
||||
std::string DSQ::getUserInputString(std::string labelText, std::string t, bool allowNonLowerCase)
|
||||
{
|
||||
float trans = 0.1;
|
||||
float trans = 0.1f;
|
||||
|
||||
bool pauseState = dsq->game->isPaused();
|
||||
|
||||
|
@ -3327,7 +3327,7 @@ std::string DSQ::getUserInputString(std::string labelText, std::string t, bool a
|
|||
|
||||
bg->hide();
|
||||
|
||||
run(0.2);
|
||||
run(0.2f);
|
||||
|
||||
inputText->alpha = 0;
|
||||
label->alpha = 0;
|
||||
|
@ -3537,7 +3537,7 @@ void DSQ::vision(std::string folder, int num, bool ignoreMusic)
|
|||
|
||||
dsq->overlay->color = Vector(1,1,1);
|
||||
|
||||
float t = 0.1;
|
||||
float t = 0.1f;
|
||||
|
||||
dsq->game->miniMapRender->toggle(0);
|
||||
|
||||
|
@ -3569,11 +3569,11 @@ void DSQ::vision(std::string folder, int num, bool ignoreMusic)
|
|||
{
|
||||
sound->playSfx("memory-flash");
|
||||
|
||||
(*i)->scale.interpolateTo(Vector(1.1,1.1), 0.4);
|
||||
(*i)->scale.interpolateTo(Vector(1.1f,1.1f), 0.4f);
|
||||
fade(0, t);
|
||||
run(t);
|
||||
|
||||
run(0.1);
|
||||
run(0.1f);
|
||||
|
||||
fade(1, t);
|
||||
run(t);
|
||||
|
@ -4079,7 +4079,7 @@ void DSQ::toggleCursor(bool v, float time)
|
|||
if (!cursor) return;
|
||||
float t = time;
|
||||
if (time == -1)
|
||||
t = 0.1;
|
||||
t = 0.1f;
|
||||
if (!v)
|
||||
cursor->alpha.interpolateTo(0, t);
|
||||
else
|
||||
|
@ -4106,8 +4106,8 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(0.75, 0.25);
|
||||
q->alpha.data->path.addPathNode(0.75, 0.75);
|
||||
q->alpha.data->path.addPathNode(0.75f, 0.25f);
|
||||
q->alpha.data->path.addPathNode(0.75f, 0.75f);
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
q->setBlendType(RenderObject::BLEND_ADD);
|
||||
|
@ -4119,9 +4119,9 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
|
||||
if (target && target->getEntityType() == ET_AVATAR)
|
||||
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));
|
||||
|
||||
t = 0.75;
|
||||
t = 0.75f;
|
||||
{
|
||||
Quad *q = new Quad;
|
||||
q->position = position;
|
||||
|
@ -4129,8 +4129,8 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
q->scale.interpolateTo(Vector(2,2),t);
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(0.75, 0.25);
|
||||
q->alpha.data->path.addPathNode(0.75, 0.75);
|
||||
q->alpha.data->path.addPathNode(0.75f, 0.25f);
|
||||
q->alpha.data->path.addPathNode(0.75f, 0.75f);
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
q->setBlendType(RenderObject::BLEND_ADD);
|
||||
|
@ -4152,7 +4152,7 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
q->scale.interpolateTo(Vector(3,3),t);
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(1, 0.3);
|
||||
q->alpha.data->path.addPathNode(1, 0.3f);
|
||||
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
|
@ -4172,7 +4172,7 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
q->scale.interpolateTo(Vector(3,3),t);
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(0.8, 0.25);
|
||||
q->alpha.data->path.addPathNode(0.8f, 0.25f);
|
||||
|
||||
q->alpha.data->path.addPathNode(0, 1);
|
||||
q->alpha.startPath(t);
|
||||
|
@ -4187,7 +4187,7 @@ void DSQ::playVisualEffect(int vfx, Vector position, Entity *target)
|
|||
break;
|
||||
case VFX_RIPPLE:
|
||||
if (core->afterEffectManager)
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter,0.04,0.06,15,0.2f));
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter,0.04f,0.06f,15,0.2f));
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -4223,7 +4223,7 @@ void DSQ::modifyDt(float &dt)
|
|||
if (core->getShiftState())
|
||||
dt *= 0.1f;
|
||||
else
|
||||
dt *= 0.6;
|
||||
dt *= 0.6f;
|
||||
}
|
||||
else if (core->getKeyState(KEY_H))
|
||||
dt = FRAME_TIME;
|
||||
|
|
|
@ -55,11 +55,11 @@ class Path;
|
|||
class AquariaSaveSlot;
|
||||
class AquariaMenuItem;
|
||||
|
||||
const float FRAME_TIME = 0.04;
|
||||
const float FRAME_TIME = 0.04f;
|
||||
|
||||
const int MAX_INGREDIENT_AMOUNT = 8;
|
||||
|
||||
const float MENUSELECTDELAY = 0.2;
|
||||
const float MENUSELECTDELAY = 0.2f;
|
||||
|
||||
const int VERSION_MAJOR = 1;
|
||||
const int VERSION_MINOR = 1;
|
||||
|
|
|
@ -94,7 +94,7 @@ bool Entity::setBoneLock(const BoneLock &boneLock)
|
|||
|
||||
if (this->boneLock.on && !boneLock.on)
|
||||
{
|
||||
boneLockDelay = 0.1;
|
||||
boneLockDelay = 0.1f;
|
||||
this->boneLock = boneLock;
|
||||
}
|
||||
else
|
||||
|
@ -154,7 +154,7 @@ Entity::Entity()
|
|||
setv(EV_COLLIDELEVEL, 1);
|
||||
setv(EV_LOOKAT, 1);
|
||||
setv(EV_SWITCHCLAMP, 1);
|
||||
setvf(EV_CLAMPTRANSF, 0.2);
|
||||
setvf(EV_CLAMPTRANSF, 0.2f);
|
||||
setv(EV_FLIPTOPATH, 1);
|
||||
setv(EV_NOINPUTNOVEL, 1);
|
||||
setv(EV_VINEPUSH, 1);
|
||||
|
@ -796,7 +796,7 @@ void Entity::doDeathEffects(float manaBallEnergy, bool die)
|
|||
}
|
||||
else
|
||||
{
|
||||
alpha.interpolateTo(0.01,1);
|
||||
alpha.interpolateTo(0.01f,1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -809,7 +809,7 @@ void Entity::doDeathEffects(float manaBallEnergy, bool die)
|
|||
}
|
||||
else
|
||||
{
|
||||
alpha.interpolateTo(0.01,1);
|
||||
alpha.interpolateTo(0.01f,1);
|
||||
}
|
||||
scale.interpolateTo(Vector(0,0), 1);
|
||||
stickToNaijasHead = true;
|
||||
|
@ -996,7 +996,7 @@ bool Entity::touchAvatarDamage(int radius, float dmg, const Vector &override, fl
|
|||
return false;
|
||||
}
|
||||
|
||||
const float sct = 0.15;
|
||||
const float sct = 0.15f;
|
||||
|
||||
void Entity::onFHScale()
|
||||
{
|
||||
|
@ -1018,7 +1018,7 @@ void Entity::onFH()
|
|||
|
||||
|
||||
|
||||
flipScale.interpolateTo(Vector(0.6, 1), sct);
|
||||
flipScale.interpolateTo(Vector(0.6f, 1), sct);
|
||||
|
||||
|
||||
|
||||
|
@ -1166,8 +1166,8 @@ void Entity::onPathEnd()
|
|||
{
|
||||
if (swimPath)
|
||||
{
|
||||
offset.interpolateTo(Vector(0, 0), 0.4);
|
||||
rotateToVec(Vector(0,-1), 0.1, 0);
|
||||
offset.interpolateTo(Vector(0, 0), 0.4f);
|
||||
rotateToVec(Vector(0,-1), 0.1f, 0);
|
||||
if (skeletalSprite.isLoaded())
|
||||
{
|
||||
skeletalSprite.animate("idle", -1);
|
||||
|
@ -1219,14 +1219,14 @@ void Entity::movementDetails(Vector v)
|
|||
if (skeletalSprite.isLoaded())
|
||||
{
|
||||
if (burstTimer.isActive())
|
||||
rotateToVec(v, 0.05);
|
||||
rotateToVec(v, 0.05f);
|
||||
else
|
||||
rotateToVec(v, 0.2);
|
||||
rotateToVec(v, 0.2f);
|
||||
Animation *anim = skeletalSprite.getCurrentAnimation();
|
||||
if (!burstTimer.isActive())
|
||||
{
|
||||
if (!anim || anim->name != "swim")
|
||||
skeletalSprite.transitionAnimate("swim", 0.1, -1);
|
||||
skeletalSprite.transitionAnimate("swim", 0.1f, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1302,14 +1302,14 @@ bool Entity::updateCurrents(float dt)
|
|||
Vector dist = -vel2;
|
||||
dist.normalize2D();
|
||||
float v = dist.x;
|
||||
float scale = 0.2;
|
||||
float scale = 0.2f;
|
||||
if (getEntityType() == ET_AVATAR)
|
||||
{
|
||||
Avatar *a = dsq->game->avatar;
|
||||
if (v < 0)
|
||||
dsq->rumble((-v)*scale, (1.0f+v)*scale, 0.2, a->getLastActionSourceID(), a->getLastActionInputDevice());
|
||||
dsq->rumble((-v)*scale, (1.0f+v)*scale, 0.2f, a->getLastActionSourceID(), a->getLastActionInputDevice());
|
||||
else
|
||||
dsq->rumble((1.0f-v)*scale, (v)*scale, 0.1, a->getLastActionSourceID(), a->getLastActionInputDevice());
|
||||
dsq->rumble((1.0f-v)*scale, (v)*scale, 0.1f, a->getLastActionSourceID(), a->getLastActionInputDevice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1714,7 +1714,7 @@ void Entity::updateBoneLock()
|
|||
{
|
||||
position = boneLock.bone->transformedCollisionMask[boneLock.collisionMaskIndex];
|
||||
boneLock.wallNormal = boneLock.bone->getCollisionMaskNormal(boneLock.collisionMaskIndex);
|
||||
rotateToVec(boneLock.wallNormal, 0.01);
|
||||
rotateToVec(boneLock.wallNormal, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1722,7 +1722,7 @@ void Entity::updateBoneLock()
|
|||
position = boneLock.entity->getWorldPosition() + currentOffset;
|
||||
boneLock.wallNormal = currentOffset;
|
||||
boneLock.wallNormal.normalize2D();
|
||||
rotateToVec(boneLock.wallNormal, 0.01);
|
||||
rotateToVec(boneLock.wallNormal, 0.01f);
|
||||
}
|
||||
|
||||
if (dsq->game->collideCircleWithGrid(position, collideRadius))
|
||||
|
@ -1756,8 +1756,8 @@ void Entity::idle()
|
|||
|
||||
onIdle();
|
||||
|
||||
skeletalSprite.transitionAnimate(getIdleAnimName(), 0.3, -1);
|
||||
rotateToVec(Vector(0,-1),0.1);
|
||||
skeletalSprite.transitionAnimate(getIdleAnimName(), 0.3f, -1);
|
||||
rotateToVec(Vector(0,-1),0.1f);
|
||||
vel.capLength2D(50);
|
||||
|
||||
setRiding(0);
|
||||
|
@ -2191,11 +2191,11 @@ void Entity::freeze(float time)
|
|||
bubble = new Quad;
|
||||
bubble->setTexture("spell-bubble");
|
||||
bubble->position = this->position;
|
||||
bubble->scale = Vector(0.2,0.2);
|
||||
bubble->scale.interpolateTo(Vector(2,2), 0.5, 0, 0, 1);
|
||||
bubble->scale = Vector(0.2f,0.2f);
|
||||
bubble->scale.interpolateTo(Vector(2,2), 0.5f, 0, 0, 1);
|
||||
bubble->alpha.ensureData();
|
||||
bubble->alpha.data->path.addPathNode(0.5, 0);
|
||||
bubble->alpha.data->path.addPathNode(0.5, 0.75);
|
||||
bubble->alpha.data->path.addPathNode(0.5f, 0);
|
||||
bubble->alpha.data->path.addPathNode(0.5f, 0.75f);
|
||||
bubble->alpha.data->path.addPathNode(0, 1);
|
||||
bubble->alpha.startPath(time+time*0.25f);
|
||||
core->getTopStateData()->addRenderObject(bubble, LR_PARTICLES);
|
||||
|
@ -2427,9 +2427,9 @@ bool Entity::damage(const DamageData &dmgData)
|
|||
if (d.damage>0)
|
||||
{
|
||||
if (entityType == ET_AVATAR)
|
||||
this->multColor.interpolateTo(Vector(1, 0.1, 0.1), 0.1, 14, 1);
|
||||
this->multColor.interpolateTo(Vector(1, 0.1f, 0.1f), 0.1f, 14, 1);
|
||||
else
|
||||
this->multColor.interpolateTo(Vector(1, 0.1, 0.1), 0.1, 4, 1);
|
||||
this->multColor.interpolateTo(Vector(1, 0.1f, 0.1f), 0.1f, 4, 1);
|
||||
}
|
||||
|
||||
health -= d.damage;
|
||||
|
@ -2527,17 +2527,17 @@ void Entity::render()
|
|||
|
||||
void Entity::doGlint(const Vector &position, const Vector &scale, const std::string &tex, RenderObject::BlendTypes bt)
|
||||
{
|
||||
float glintTime = 0.4;
|
||||
float glintTime = 0.4f;
|
||||
Quad *glint = new Quad;
|
||||
|
||||
glint->setBlendType(bt);
|
||||
glint->setTexture(tex);
|
||||
glint->scale = Vector(0.5,0.5);
|
||||
glint->scale = Vector(0.5f,0.5f);
|
||||
glint->position = position;
|
||||
glint->scale.interpolateTo(scale, glintTime);
|
||||
glint->alpha.ensureData();
|
||||
glint->alpha.data->path.addPathNode(1, 0);
|
||||
glint->alpha.data->path.addPathNode(1, 0.7);
|
||||
glint->alpha.data->path.addPathNode(1, 0.7f);
|
||||
glint->alpha.data->path.addPathNode(0, 1);
|
||||
glint->alpha.startPath(glintTime);
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "Hair.h"
|
||||
|
||||
|
||||
static const float MENUPAGETRANSTIME = 0.2;
|
||||
static const float MENUPAGETRANSTIME = 0.2f;
|
||||
|
||||
const float bgSfxVol = 1.0;
|
||||
const float bgSfxVol = 1.0f;
|
||||
|
||||
unsigned char Game::grid[MAX_GRID][MAX_GRID];
|
||||
|
||||
|
@ -239,12 +239,12 @@ Game::~Game()
|
|||
void Game::pickupIngredientEffects(IngredientData *data)
|
||||
{
|
||||
Quad *q = new Quad("gfx/ingredients/" + data->gfx, Vector(800-20 + core->getVirtualOffX(), (570-2*(100*miniMapRender->scale.y))+ingOffY));
|
||||
q->scale = Vector(0.8, 0.8);
|
||||
q->scale = Vector(0.8f, 0.8f);
|
||||
q->followCamera = 1;
|
||||
q->alpha.ensureData();
|
||||
q->alpha.data->path.addPathNode(0, 0);
|
||||
q->alpha.data->path.addPathNode(1.0, 0.1);
|
||||
q->alpha.data->path.addPathNode(0, 1.0);
|
||||
q->alpha.data->path.addPathNode(1.0f, 0.1f);
|
||||
q->alpha.data->path.addPathNode(0, 1.0f);
|
||||
q->alpha.startPath(2);
|
||||
q->setLife(1);
|
||||
q->setDecayRate(0.5);
|
||||
|
@ -345,7 +345,7 @@ Element* Game::createElement(size_t idx, Vector position, size_t bgLayer, Render
|
|||
}
|
||||
|
||||
element->position = position;
|
||||
element->position.z = -0.05;
|
||||
element->position.z = -0.05f;
|
||||
element->templateIdx = idx;
|
||||
|
||||
element->bgLayer = bgLayer;
|
||||
|
@ -2353,10 +2353,10 @@ void Game::showImage(const std::string &gfx)
|
|||
core->addRenderObject(image, LR_HUD);
|
||||
|
||||
image->scale = Vector(1,1);
|
||||
image->scale.interpolateTo(Vector(1.1, 1.1), 12);
|
||||
image->scale.interpolateTo(Vector(1.1f, 1.1f), 12);
|
||||
|
||||
image->alpha = 1;
|
||||
dsq->fade(0, 0.5);
|
||||
dsq->fade(0, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2392,7 +2392,7 @@ void Game::switchBgLoop(int v)
|
|||
sfx.name = bgSfxLoop;
|
||||
sfx.vol = bgSfxVol;
|
||||
sfx.loops = -1;
|
||||
sfx.priority = 0.8;
|
||||
sfx.priority = 0.8f;
|
||||
dsq->loops.bg = core->sound->playSfx(sfx);
|
||||
}
|
||||
break;
|
||||
|
@ -2403,7 +2403,7 @@ void Game::switchBgLoop(int v)
|
|||
sfx.name = airSfxLoop;
|
||||
sfx.vol = bgSfxVol;
|
||||
sfx.loops = -1;
|
||||
sfx.priority = 0.8;
|
||||
sfx.priority = 0.8f;
|
||||
dsq->loops.bg = core->sound->playSfx(sfx);
|
||||
}
|
||||
break;
|
||||
|
@ -2701,7 +2701,7 @@ void Game::applyState()
|
|||
maxZoom = -1;
|
||||
maxLookDistance = 600;
|
||||
saveFile = 0;
|
||||
deathTimer = 0.9;
|
||||
deathTimer = 0.9f;
|
||||
runGameOverScript = false;
|
||||
paused = false;
|
||||
//sceneColor = Vector(0.75, 0.75, 0.8);
|
||||
|
@ -2726,7 +2726,7 @@ void Game::applyState()
|
|||
damageSprite->autoHeight = AUTO_VIRTUALHEIGHT;
|
||||
damageSprite->position = Vector(400,300);
|
||||
damageSprite->followCamera = true;
|
||||
damageSprite->scale.interpolateTo(Vector(1.1, 1.1), 0.75, -1, 1, 1);
|
||||
damageSprite->scale.interpolateTo(Vector(1.1f, 1.1f), 0.75f, -1, 1, 1);
|
||||
}
|
||||
addRenderObject(damageSprite, LR_DAMAGESPRITE);
|
||||
|
||||
|
@ -2738,7 +2738,7 @@ void Game::applyState()
|
|||
bg2->setWidthHeight(900,600);
|
||||
//bg2->blendEnabled = false;
|
||||
bg2->followCamera =1;
|
||||
bg2->alpha = 0.8;
|
||||
bg2->alpha = 0.8f;
|
||||
}
|
||||
addRenderObject(bg2, LR_BACKGROUND);
|
||||
|
||||
|
@ -2763,7 +2763,7 @@ void Game::applyState()
|
|||
controlHint_bg->followCamera = 1;
|
||||
controlHint_bg->position = Vector(400,500);
|
||||
controlHint_bg->color = 0;
|
||||
controlHint_bg->alphaMod = 0.7;
|
||||
controlHint_bg->alphaMod = 0.7f;
|
||||
//controlHint_bg->setTexture("HintBox");
|
||||
controlHint_bg->setWidthHeight(core->getVirtualWidth(), 100);
|
||||
controlHint_bg->autoWidth = AUTO_VIRTUALWIDTH;
|
||||
|
@ -2778,7 +2778,7 @@ void Game::applyState()
|
|||
|
||||
controlHint_text->setAlign(ALIGN_LEFT);
|
||||
controlHint_text->followCamera = 1;
|
||||
controlHint_text->scale = Vector(0.9, 0.9);
|
||||
controlHint_text->scale = Vector(0.9f, 0.9f);
|
||||
//controlHint_text->setFontSize(14);
|
||||
}
|
||||
addRenderObject(controlHint_text, LR_HELP);
|
||||
|
@ -2835,7 +2835,7 @@ void Game::applyState()
|
|||
controlHint_shine->color = Vector(1,1,1);
|
||||
controlHint_shine->followCamera = 1;
|
||||
controlHint_shine->position = Vector(400,500);
|
||||
controlHint_shine->alphaMod = 0.3;
|
||||
controlHint_shine->alphaMod = 0.3f;
|
||||
controlHint_shine->setWidthHeight(core->getVirtualWidth(), 100);
|
||||
controlHint_shine->alpha = 0;
|
||||
controlHint_shine->setBlendType(RenderObject::BLEND_ADD);
|
||||
|
@ -2947,7 +2947,7 @@ void Game::applyState()
|
|||
|
||||
miniMapRender = new MiniMapRender;
|
||||
// position is set in minimaprender::onupdate
|
||||
miniMapRender->scale = Vector(0.55, 0.55);
|
||||
miniMapRender->scale = Vector(0.55f, 0.55f);
|
||||
addRenderObject(miniMapRender, LR_MINIMAP);
|
||||
|
||||
timerText = new BitmapText(&dsq->smallFont);
|
||||
|
@ -3191,10 +3191,10 @@ void Game::applyState()
|
|||
|
||||
dsq->transitionSaveSlots();
|
||||
dsq->overlay->alpha = 0;
|
||||
dsq->run(0.5);
|
||||
dsq->run(0.5f);
|
||||
dsq->toggleCursor(true);
|
||||
dsq->tfader->alpha.interpolateTo(0, 0.2);
|
||||
dsq->run(0.21);
|
||||
dsq->tfader->alpha.interpolateTo(0, 0.2f);
|
||||
dsq->run(0.21f);
|
||||
dsq->clearSaveSlots(false);
|
||||
}
|
||||
|
||||
|
@ -3382,7 +3382,7 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
|
|||
sprintf(sbuf, "song/songslot-%d", dsq->continuity.getSongSlotByType(songType));
|
||||
Quad *q = new Quad(sbuf, p);
|
||||
q->followCamera = 1;
|
||||
q->scale = Vector(0.7, 0.7);
|
||||
q->scale = Vector(0.7f, 0.7f);
|
||||
q->alpha = 0;
|
||||
addRenderObject(q, controlHint_bg->layer);
|
||||
controlHintNotes.push_back(q);
|
||||
|
@ -3397,7 +3397,7 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
|
|||
Quad *q = new Quad(sbuf, p);
|
||||
q->color = dsq->getNoteColor(note)*0.5f + Vector(1, 1, 1)*0.5f;
|
||||
q->followCamera = 1;
|
||||
q->scale = Vector(1.0, 1.0);
|
||||
q->scale = Vector(1.0f, 1.0f);
|
||||
q->alpha = 0;
|
||||
|
||||
if (i % 2)
|
||||
|
@ -3413,7 +3413,7 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
|
|||
}
|
||||
}
|
||||
|
||||
float alphaOn = 0.8, alphaOff = 0.5;
|
||||
float alphaOn = 0.8f, alphaOff = 0.5f;
|
||||
controlHint_bg->alpha.interpolateTo(1, hintTransTime);
|
||||
controlHint_bg->scale = Vector(1,1);
|
||||
//controlHint_bg->scale = Vector(0,1);
|
||||
|
@ -3486,10 +3486,10 @@ void Game::setControlHint(const std::string &h, bool left, bool right, bool midd
|
|||
|
||||
controlHint_shine->alpha.ensureData();
|
||||
controlHint_shine->alpha.data->path.clear();
|
||||
controlHint_shine->alpha.data->path.addPathNode(0.001, 0.0);
|
||||
controlHint_shine->alpha.data->path.addPathNode(1.000, 0.3);
|
||||
controlHint_shine->alpha.data->path.addPathNode(0.001, 1.0);
|
||||
controlHint_shine->alpha.startPath(0.4);
|
||||
controlHint_shine->alpha.data->path.addPathNode(0.001f, 0.0f);
|
||||
controlHint_shine->alpha.data->path.addPathNode(1.000f, 0.3f);
|
||||
controlHint_shine->alpha.data->path.addPathNode(0.001f, 1.0f);
|
||||
controlHint_shine->alpha.startPath(0.4f);
|
||||
}
|
||||
|
||||
void appendFileToString(std::string &string, const std::string &file)
|
||||
|
@ -3650,7 +3650,7 @@ void Game::toggleHelpScreen(bool on, const std::string &label)
|
|||
helpUp->followCamera = 1;
|
||||
helpUp->rotation.z = 90;
|
||||
helpUp->event.set(MakeFunctionEvent(Game, onHelpUp));
|
||||
helpUp->scale = Vector(0.6, 0.6);
|
||||
helpUp->scale = Vector(0.6f, 0.6f);
|
||||
helpUp->guiInputLevel = 100;
|
||||
addRenderObject(helpUp, LR_HELP);
|
||||
|
||||
|
@ -3662,7 +3662,7 @@ void Game::toggleHelpScreen(bool on, const std::string &label)
|
|||
helpDown->followCamera = 1;
|
||||
helpDown->rotation.z = 90;
|
||||
helpDown->event.set(MakeFunctionEvent(Game, onHelpDown));
|
||||
helpDown->scale = Vector(0.6, 0.6);
|
||||
helpDown->scale = Vector(0.6f, 0.6f);
|
||||
helpDown->guiInputLevel = 100;
|
||||
addRenderObject(helpDown, LR_HELP);
|
||||
|
||||
|
@ -3674,7 +3674,7 @@ void Game::toggleHelpScreen(bool on, const std::string &label)
|
|||
helpCancel->followCamera = 1;
|
||||
//helpCancel->rotation.z = 90;
|
||||
helpCancel->event.set(MakeFunctionEvent(Game, toggleHelpScreen));
|
||||
helpCancel->scale = Vector(0.9, 0.9);
|
||||
helpCancel->scale = Vector(0.9f, 0.9f);
|
||||
helpCancel->guiInputLevel = 100;
|
||||
addRenderObject(helpCancel, LR_HELP);
|
||||
|
||||
|
@ -4013,7 +4013,7 @@ void Game::postLocalWarp()
|
|||
if (dsq->game->avatar->pullTarget)
|
||||
dsq->game->avatar->pullTarget->position = dsq->game->avatar->position;
|
||||
dsq->game->snapCam();
|
||||
dsq->screenTransition->transition(0.6);
|
||||
dsq->screenTransition->transition(0.6f);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4256,7 +4256,7 @@ void Game::updateCursor(float dt)
|
|||
{
|
||||
//debugLog("offset lerp!");
|
||||
dsq->cursor->offset = Vector(0, offy);
|
||||
dsq->cursor->offset.interpolateTo(Vector(0, offy-20), 0.4, -1, 1, 1);
|
||||
dsq->cursor->offset.interpolateTo(Vector(0, offy-20), 0.4f, -1, 1, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -4461,7 +4461,7 @@ void Game::updateBgSfxLoop()
|
|||
play.fade = SFT_IN;
|
||||
play.vol = 1;
|
||||
play.loops = -1;
|
||||
play.priority = 0.7;
|
||||
play.priority = 0.7f;
|
||||
dsq->loops.bg2 = core->sound->playSfx(play);
|
||||
bgSfxLoopPlaying2 = p->content;
|
||||
}
|
||||
|
@ -4603,11 +4603,11 @@ void Game::update(float dt)
|
|||
dsq->sceneColorOverlay->color = sceneColor * sceneColor2 * sceneColor3;
|
||||
if (bg)
|
||||
{
|
||||
setParallaxTextureCoordinates(bg, 0.3);
|
||||
setParallaxTextureCoordinates(bg, 0.3f);
|
||||
}
|
||||
if (bg2)
|
||||
{
|
||||
setParallaxTextureCoordinates(bg2, 0.1);
|
||||
setParallaxTextureCoordinates(bg2, 0.1f);
|
||||
}
|
||||
themenu->update(dt);
|
||||
|
||||
|
@ -4654,7 +4654,7 @@ void Game::update(float dt)
|
|||
dsq->continuity.refreshAvatarData(avatar);
|
||||
|
||||
Vector bigGlow(3,3);
|
||||
float bigGlowTime = 0.4;
|
||||
float bigGlowTime = 0.4f;
|
||||
bool hadThingToActivate = (avatar->entityToActivate!=0 || avatar->pathToActivate!=0);
|
||||
avatar->entityToActivate = 0;
|
||||
|
||||
|
@ -4673,12 +4673,12 @@ void Game::update(float dt)
|
|||
//if (trace(avatar->position, e->position))
|
||||
{
|
||||
avatar->entityToActivate = e;
|
||||
dsq->cursorGlow->alpha.interpolateTo(1, 0.2);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(1.0,0.1);
|
||||
dsq->cursorGlow->alpha.interpolateTo(1, 0.2f);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(1.0f,0.1f);
|
||||
if (!hadThingToActivate)
|
||||
{
|
||||
dsq->cursorGlow->scale = Vector(1,1);
|
||||
dsq->cursorGlow->scale.interpolateTo(bigGlow,bigGlowTime,1, -1, 1);
|
||||
dsq->cursorGlow->scale.interpolateTo(bigGlow,bigGlowTime,1, true, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -4701,12 +4701,12 @@ void Game::update(float dt)
|
|||
//if (trace(avatar->position, p->nodes[0].position))
|
||||
{
|
||||
avatar->pathToActivate = p;
|
||||
dsq->cursorGlow->alpha.interpolateTo(1,0.2);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(1,0.2);
|
||||
dsq->cursorGlow->alpha.interpolateTo(1,0.2f);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(1,0.2f);
|
||||
if (!hadThingToActivate)
|
||||
{
|
||||
dsq->cursorGlow->scale = Vector(1,1);
|
||||
dsq->cursorGlow->scale.interpolateTo(bigGlow,bigGlowTime,1, -1, 1);
|
||||
dsq->cursorGlow->scale.interpolateTo(bigGlow,bigGlowTime,1, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4722,8 +4722,8 @@ void Game::update(float dt)
|
|||
|
||||
if (!avatar->entityToActivate && !avatar->pathToActivate)
|
||||
{
|
||||
dsq->cursorGlow->alpha.interpolateTo(0, 0.2);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(0, 0.1);
|
||||
dsq->cursorGlow->alpha.interpolateTo(0, 0.2f);
|
||||
dsq->cursorBlinker->alpha.interpolateTo(0, 0.1f);
|
||||
}
|
||||
|
||||
if (!isSceneEditorActive())
|
||||
|
|
|
@ -54,7 +54,7 @@ const char CHAR_LEFT = 'l';
|
|||
const char CHAR_RIGHT = 'r';
|
||||
|
||||
|
||||
const float MIN_SIZE = 0.1;
|
||||
const float MIN_SIZE = 0.1f;
|
||||
|
||||
#ifdef AQUARIA_DEMO
|
||||
#undef AQUARIA_BUILD_SCENEEDITOR
|
||||
|
|
|
@ -22,7 +22,7 @@ std::vector<PetSlot*> petSlots;
|
|||
|
||||
// ---------------- Constants ----------------------------
|
||||
|
||||
static const float MENUPAGETRANSTIME = 0.2;
|
||||
static const float MENUPAGETRANSTIME = 0.2f;
|
||||
const Vector menuBgScale(800.0f/1024.0f, 800.0f/1024.0f);
|
||||
const size_t foodPageSize = 16;
|
||||
const size_t treasurePageSize = 16;
|
||||
|
@ -227,7 +227,7 @@ void PetSlot::onUpdate(float dt)
|
|||
else
|
||||
{
|
||||
mouseDown = false;
|
||||
scale.interpolateTo(Vector(0.9f, 0.9f), 0.1);
|
||||
scale.interpolateTo(Vector(0.9f, 0.9f), 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ void FoodHolder::setIngredient(IngredientData *i, bool effects)
|
|||
ing->scale.ensureData();
|
||||
ing->scale.data->path.clear();
|
||||
ing->scale.data->path.addPathNode(Vector(1,1),0);
|
||||
ing->scale.data->path.addPathNode(Vector(1.25,1.25), 0.2);
|
||||
ing->scale.data->path.addPathNode(Vector(1.25f,1.25f), 0.2f);
|
||||
ing->scale.data->path.addPathNode(Vector(1,1),1);
|
||||
ing->scale.startPath(0.5);
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ void FoodSlot::refresh(bool effects)
|
|||
scale.ensureData();
|
||||
scale.data->path.clear();
|
||||
scale.data->path.addPathNode(Vector(1,1)*scaleFactor,0);
|
||||
scale.data->path.addPathNode(Vector(1.5,1.5)*scaleFactor, 0.2);
|
||||
scale.data->path.addPathNode(Vector(1.5f,1.5f)*scaleFactor, 0.2f);
|
||||
scale.data->path.addPathNode(Vector(1,1)*scaleFactor,1);
|
||||
scale.startPath(0.5);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ void SongSlot::onUpdate(float dt)
|
|||
{
|
||||
themenu->playSongInMenu(songType);
|
||||
themenu->songLabel->setText(dsq->continuity.getSongNameBySlot(songSlot));
|
||||
themenu->songLabel->alpha.interpolateTo(1, 0.2);
|
||||
themenu->songLabel->alpha.interpolateTo(1, 0.2f);
|
||||
const bool anyButton = core->mouse.buttons.left || core->mouse.buttons.right;
|
||||
if (!mbDown && anyButton)
|
||||
{
|
||||
|
@ -748,12 +748,12 @@ void SongSlot::onUpdate(float dt)
|
|||
if (!dsq->sound->isPlayingVoice())
|
||||
dsq->voice(dsq->continuity.getVoxForSongSlot(songSlot));
|
||||
}
|
||||
glow->alpha.interpolateTo(0.2, 0.15);
|
||||
glow->alpha.interpolateTo(0.2f, 0.15f);
|
||||
}
|
||||
else
|
||||
{
|
||||
mbDown = false;
|
||||
glow->alpha.interpolateTo(0, 0.2);
|
||||
glow->alpha.interpolateTo(0, 0.2f);
|
||||
if (!themenu->songLabel->alpha.isInterpolating())
|
||||
{
|
||||
themenu->songLabel->alpha.interpolateTo(0, 2);
|
||||
|
@ -785,7 +785,7 @@ void TreasureSlot::onUpdate(float dt)
|
|||
{
|
||||
if ((core->mouse.position - getWorldPosition()).isLength2DIn(18))
|
||||
{
|
||||
scale.interpolateTo(Vector(1.2, 1.2), 0.1);
|
||||
scale.interpolateTo(Vector(1.2f, 1.2f), 0.1f);
|
||||
if (core->mouse.buttons.left && !mbd)
|
||||
{
|
||||
mbd = true;
|
||||
|
@ -832,13 +832,13 @@ void TreasureSlot::onUpdate(float dt)
|
|||
else
|
||||
{
|
||||
mbd = false;
|
||||
scale.interpolateTo(Vector(1, 1), 0.1);
|
||||
scale.interpolateTo(Vector(1, 1), 0.1f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mbd = false;
|
||||
scale.interpolateTo(Vector(1, 1), 0.001);
|
||||
scale.interpolateTo(Vector(1, 1), 0.001f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ void InGameMenu::playSongInMenu(int songType, bool override)
|
|||
|
||||
void InGameMenu::updatePreviewRecipe()
|
||||
{
|
||||
const float t = 0.2;
|
||||
const float t = 0.2f;
|
||||
|
||||
updateCookList();
|
||||
|
||||
|
@ -1207,8 +1207,8 @@ void InGameMenu::show(bool ignoreInput, bool optionsOnly, MenuPage menuPage)
|
|||
if (game->avatar->isEntityDead()) return;
|
||||
|
||||
toggleOptionsMenu(false);
|
||||
dsq->overlay->alpha.interpolateTo(0, 0.1);
|
||||
float t = 0.3;
|
||||
dsq->overlay->alpha.interpolateTo(0, 0.1f);
|
||||
float t = 0.3f;
|
||||
|
||||
|
||||
if (!optionsOnly)
|
||||
|
@ -1349,7 +1349,7 @@ void InGameMenu::show(bool ignoreInput, bool optionsOnly, MenuPage menuPage)
|
|||
}
|
||||
else
|
||||
{
|
||||
float t = 0.1;
|
||||
float t = 0.1f;
|
||||
|
||||
toggleMainMenu(true);
|
||||
|
||||
|
@ -1369,12 +1369,12 @@ void InGameMenu::show(bool ignoreInput, bool optionsOnly, MenuPage menuPage)
|
|||
{
|
||||
for (size_t i = 0; i < menu.size(); i++)
|
||||
{
|
||||
menu[i]->scale.interpolateTo(Vector(1, 1), 0.15);
|
||||
menu[i]->scale.interpolateTo(Vector(1, 1), 0.15f);
|
||||
|
||||
menu[i]->alpha.interpolateTo(1, 0.15);
|
||||
menu[i]->alpha.interpolateTo(1, 0.15f);
|
||||
}
|
||||
|
||||
menuIconGlow->alpha.interpolateTo(1, 0.5);
|
||||
menuIconGlow->alpha.interpolateTo(1, 0.5f);
|
||||
}
|
||||
|
||||
menuOpenTimer = 0;
|
||||
|
@ -1406,7 +1406,7 @@ void InGameMenu::hide(bool effects, bool cancel)
|
|||
playingSongInMenu = -1;
|
||||
|
||||
|
||||
float t = 0.3;
|
||||
float t = 0.3f;
|
||||
|
||||
if (!effects)
|
||||
t = 0;
|
||||
|
@ -1915,7 +1915,7 @@ void InGameMenu::create()
|
|||
songLabel->followCamera = 1;
|
||||
songLabel->setFontSize(20);
|
||||
songLabel->position = Vector(-center.x, center.y) + Vector(0, -15); //+ Vector(10, -10);
|
||||
songLabel->scale = Vector(1.2, 1.2);
|
||||
songLabel->scale = Vector(1.2f, 1.2f);
|
||||
}
|
||||
menuBg->addChild(songLabel, PM_POINTER);
|
||||
|
||||
|
@ -1987,7 +1987,7 @@ void InGameMenu::create()
|
|||
keyConfigButton->useGlow("particles/glow", 128, 40);
|
||||
keyConfigButton->position = worldRightCenter + Vector(0, 80);
|
||||
keyConfigButton->alpha = 0;
|
||||
keyConfigButton->scale = Vector(0.8, 0.8);
|
||||
keyConfigButton->scale = Vector(0.8f, 0.8f);
|
||||
keyConfigButton->event.set(MakeFunctionEvent(InGameMenu, onKeyConfig));
|
||||
//keyConfigButton->setCanDirMove(false);
|
||||
game->addRenderObject(keyConfigButton, LR_MENU);
|
||||
|
@ -2205,7 +2205,7 @@ void InGameMenu::create()
|
|||
cook->useGlow("particles/glow", 128, 40);
|
||||
cook->position = worldRightCenter + Vector(0, -120);
|
||||
cook->alpha = 0;
|
||||
cook->scale = Vector(0.8, 0.8);
|
||||
cook->scale = Vector(0.8f, 0.8f);
|
||||
cook->event.set(MakeFunctionEvent(InGameMenu, onCook));
|
||||
cook->setCanDirMove(false);
|
||||
game->addRenderObject(cook, LR_MENU);
|
||||
|
@ -2224,7 +2224,7 @@ void InGameMenu::create()
|
|||
recipes->useGlow("particles/glow", 128, 32);
|
||||
recipes->position = worldLeftCenter + Vector(-40, 140);
|
||||
recipes->alpha = 0;
|
||||
recipes->scale = Vector(0.8, 0.8);
|
||||
recipes->scale = Vector(0.8f, 0.8f);
|
||||
recipes->event.set(MakeFunctionEvent(InGameMenu, onRecipes));
|
||||
game->addRenderObject(recipes, LR_MENU);
|
||||
|
||||
|
@ -2233,7 +2233,7 @@ void InGameMenu::create()
|
|||
use->useGlow("particles/glow", 128, 64);
|
||||
use->position = worldRightCenter + Vector(0, -120);
|
||||
use->alpha = 0;
|
||||
use->scale = Vector(0.8, 0.8);
|
||||
use->scale = Vector(0.8f, 0.8f);
|
||||
use->event.set(MakeFunctionEvent(InGameMenu, onUseTreasure));
|
||||
game->addRenderObject(use, LR_MENU);
|
||||
|
||||
|
@ -2244,7 +2244,7 @@ void InGameMenu::create()
|
|||
prevFood->position = worldLeftCenter + Vector(-50, -130);
|
||||
prevFood->alpha = 0;
|
||||
prevFood->event.set(MakeFunctionEvent(InGameMenu, onPrevFoodPage));
|
||||
prevFood->scale = Vector(0.6, 0.6);
|
||||
prevFood->scale = Vector(0.6f, 0.6f);
|
||||
prevFood->setCanDirMove(false);
|
||||
game->addRenderObject(prevFood, LR_MENU);
|
||||
|
||||
|
@ -2256,7 +2256,7 @@ void InGameMenu::create()
|
|||
nextFood->alpha = 0;
|
||||
nextFood->setCanDirMove(false);
|
||||
nextFood->event.set(MakeFunctionEvent(InGameMenu, onNextFoodPage));
|
||||
nextFood->scale = Vector(0.6, 0.6);
|
||||
nextFood->scale = Vector(0.6f, 0.6f);
|
||||
game->addRenderObject(nextFood, LR_MENU);
|
||||
|
||||
prevTreasure = new AquariaMenuItem;
|
||||
|
@ -2266,7 +2266,7 @@ void InGameMenu::create()
|
|||
prevTreasure->position = worldLeftCenter + Vector(-50, -130);
|
||||
prevTreasure->alpha = 0;
|
||||
prevTreasure->setCanDirMove(false);
|
||||
prevTreasure->scale = Vector(0.6, 0.6);
|
||||
prevTreasure->scale = Vector(0.6f, 0.6f);
|
||||
prevTreasure->event.set(MakeFunctionEvent(InGameMenu, onPrevTreasurePage));
|
||||
prevTreasure->setCanDirMove(false);
|
||||
game->addRenderObject(prevTreasure, LR_MENU);
|
||||
|
@ -2277,7 +2277,7 @@ void InGameMenu::create()
|
|||
nextTreasure->useGlow("particles/glow", 64, 32);
|
||||
nextTreasure->position = worldLeftCenter + Vector(50, -130);
|
||||
nextTreasure->alpha = 0;
|
||||
nextTreasure->scale = Vector(0.6, 0.6);
|
||||
nextTreasure->scale = Vector(0.6f, 0.6f);
|
||||
nextTreasure->event.set(MakeFunctionEvent(InGameMenu, onNextTreasurePage));
|
||||
nextTreasure->setCanDirMove(false);
|
||||
game->addRenderObject(nextTreasure, LR_MENU);
|
||||
|
@ -2307,8 +2307,8 @@ void InGameMenu::create()
|
|||
previewRecipe->alphaMod = 0.75;
|
||||
previewRecipe->followCamera = 1;
|
||||
previewRecipe->alpha = 0;
|
||||
previewRecipe->scale = Vector(0.7, 0.7);
|
||||
previewRecipe->scale.interpolateTo(Vector(0.9, 0.9), 0.5, -1, 1, 1);
|
||||
previewRecipe->scale = Vector(0.7f, 0.7f);
|
||||
previewRecipe->scale.interpolateTo(Vector(0.9f, 0.9f), 0.5f, -1, 1, 1);
|
||||
previewRecipe->position = worldRightCenter;
|
||||
game->addRenderObject(previewRecipe, LR_MENU);
|
||||
|
||||
|
@ -2351,7 +2351,7 @@ void InGameMenu::create()
|
|||
recipeMenu.prevPage->position = Vector(scrollx - 150, 410);
|
||||
recipeMenu.prevPage->alpha = 0;
|
||||
recipeMenu.prevPage->event.set(MakeFunctionEvent(InGameMenu, onPrevRecipePage));
|
||||
recipeMenu.prevPage->scale = Vector(0.8, 0.8);
|
||||
recipeMenu.prevPage->scale = Vector(0.8f, 0.8f);
|
||||
game->addRenderObject(recipeMenu.prevPage, LR_RECIPES);
|
||||
|
||||
recipeMenu.nextPage = new AquariaMenuItem;
|
||||
|
@ -2361,7 +2361,7 @@ void InGameMenu::create()
|
|||
recipeMenu.nextPage->position = Vector(scrollx + 150, 410);
|
||||
recipeMenu.nextPage->alpha = 0;
|
||||
recipeMenu.nextPage->event.set(MakeFunctionEvent(InGameMenu, onNextRecipePage));
|
||||
recipeMenu.nextPage->scale = Vector(0.8, 0.8);
|
||||
recipeMenu.nextPage->scale = Vector(0.8f, 0.8f);
|
||||
game->addRenderObject(recipeMenu.nextPage, LR_RECIPES);
|
||||
|
||||
|
||||
|
@ -2496,7 +2496,7 @@ void InGameMenu::create()
|
|||
menu[5]->position = Vector(400-60, 350);
|
||||
|
||||
menuIconGlow = new Quad("particles/glow", menu[5]->position);
|
||||
menuIconGlow->alphaMod = 0.4;
|
||||
menuIconGlow->alphaMod = 0.4f;
|
||||
menuIconGlow->alpha = 0;
|
||||
menuIconGlow->setWidthHeight(80, 80);
|
||||
menuIconGlow->setBlendType(RenderObject::BLEND_ADD);
|
||||
|
@ -2599,7 +2599,7 @@ void InGameMenu::create()
|
|||
foodDescription->setAlign(ALIGN_CENTER);
|
||||
foodDescription->followCamera = 1;
|
||||
foodDescription->position = center + Vector(0, 8) + Vector(0,-32);
|
||||
foodDescription->scale = Vector(0.8, 0.8);
|
||||
foodDescription->scale = Vector(0.8f, 0.8f);
|
||||
|
||||
foodDescription->setWidth(240);
|
||||
}
|
||||
|
@ -2960,7 +2960,7 @@ void InGameMenu::onCook()
|
|||
|
||||
AquariaGuiElement::canDirMoveGlobal = false;
|
||||
|
||||
cookDelay = 0.4;
|
||||
cookDelay = 0.4f;
|
||||
|
||||
bool cooked = false;
|
||||
|
||||
|
@ -3034,9 +3034,9 @@ void InGameMenu::onCook()
|
|||
|
||||
if (longAnim)
|
||||
{
|
||||
float ft = 0.8;
|
||||
float nt = 0.1;
|
||||
float nt2 = 0.2;
|
||||
float ft = 0.8f;
|
||||
float nt = 0.1f;
|
||||
float nt2 = 0.2f;
|
||||
void *handle = NULL;
|
||||
|
||||
/*
|
||||
|
@ -3081,9 +3081,9 @@ void InGameMenu::onCook()
|
|||
}
|
||||
|
||||
if (longAnim)
|
||||
dsq->run(0.5);
|
||||
dsq->run(0.5f);
|
||||
else
|
||||
dsq->run(0.2);
|
||||
dsq->run(0.2f);
|
||||
|
||||
bool haveLeftovers = true;
|
||||
for (size_t i = 0; i < foodHolders.size(); i++)
|
||||
|
@ -3120,9 +3120,9 @@ void InGameMenu::onCook()
|
|||
dsq->spawnParticleEffect("cook-food", Vector(575,250), 0, 0, LR_HUD3, 1);
|
||||
|
||||
if (longAnim)
|
||||
dsq->run(0.5);
|
||||
dsq->run(0.5f);
|
||||
else
|
||||
dsq->run(0.2);
|
||||
dsq->run(0.2f);
|
||||
|
||||
if (data)
|
||||
{
|
||||
|
@ -3131,13 +3131,13 @@ void InGameMenu::onCook()
|
|||
//Quad *e = new Quad();
|
||||
|
||||
showRecipe->setTexture(n);
|
||||
showRecipe->scale = Vector(0.5, 0.5);
|
||||
showRecipe->scale.interpolateTo(Vector(1.2, 1.2), t);
|
||||
showRecipe->scale = Vector(0.5f, 0.5f);
|
||||
showRecipe->scale.interpolateTo(Vector(1.2f, 1.2f), t);
|
||||
showRecipe->alpha.ensureData();
|
||||
showRecipe->alpha.data->path.clear();
|
||||
showRecipe->alpha.data->path.addPathNode(0, 0);
|
||||
showRecipe->alpha.data->path.addPathNode(1, 0.1);
|
||||
showRecipe->alpha.data->path.addPathNode(1, 0.6);
|
||||
showRecipe->alpha.data->path.addPathNode(1, 0.1f);
|
||||
showRecipe->alpha.data->path.addPathNode(1, 0.6f);
|
||||
showRecipe->alpha.data->path.addPathNode(0, 1);
|
||||
showRecipe->alpha.startPath(t);
|
||||
}
|
||||
|
@ -3214,9 +3214,9 @@ void InGameMenu::showInGameMenuExitCheck()
|
|||
{
|
||||
recipeMenu.toggle(false);
|
||||
inGameMenuExitState = 1;
|
||||
eYes->alpha.interpolateTo(1, 0.2);
|
||||
eNo->alpha.interpolateTo(1, 0.2);
|
||||
eAre->alpha.interpolateTo(1, 0.2);
|
||||
eYes->alpha.interpolateTo(1, 0.2f);
|
||||
eNo->alpha.interpolateTo(1, 0.2f);
|
||||
eAre->alpha.interpolateTo(1, 0.2f);
|
||||
|
||||
eNo->setFocus(true);
|
||||
}
|
||||
|
@ -3224,9 +3224,9 @@ void InGameMenu::showInGameMenuExitCheck()
|
|||
void InGameMenu::hideInGameMenuExitCheck(bool refocus)
|
||||
{
|
||||
inGameMenuExitState = 0;
|
||||
eYes->alpha.interpolateTo(0, 0.2);
|
||||
eNo->alpha.interpolateTo(0, 0.2);
|
||||
eAre->alpha.interpolateTo(0, 0.2);
|
||||
eYes->alpha.interpolateTo(0, 0.2f);
|
||||
eNo->alpha.interpolateTo(0, 0.2f);
|
||||
eAre->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
if (refocus)
|
||||
((AquariaMenuItem*)menu[1])->setFocus(true);
|
||||
|
@ -3680,8 +3680,8 @@ void InGameMenu::toggleFoodMenu(bool f)
|
|||
void InGameMenu::doMenuSectionHighlight(int section)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
((AquariaMenuItem*)menu[(5+i)])->quad->alphaMod = 0.8;
|
||||
((AquariaMenuItem*)menu[(5+section)])->quad->alphaMod = 1.0;
|
||||
((AquariaMenuItem*)menu[(5+i)])->quad->alphaMod = 0.8f;
|
||||
((AquariaMenuItem*)menu[(5+section)])->quad->alphaMod = 1.0f;
|
||||
menuIconGlow->position = menu[5+section]->position;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,8 +72,8 @@ Ingredient::Ingredient(const Vector &pos, IngredientData *data, int amount)
|
|||
else
|
||||
velocity = Vector(0,-mag*0.5f);
|
||||
gravity = Vector(0, 250);
|
||||
scale = Vector(0.2,0.2);
|
||||
scale.interpolateTo(Vector(1, 1), 0.75);
|
||||
scale = Vector(0.2f,0.2f);
|
||||
scale.interpolateTo(Vector(1, 1), 0.75f);
|
||||
|
||||
if (isRotKind())
|
||||
rotation.z = randAngle360();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -65,10 +65,10 @@ void ManaBall::use(Entity *entity)
|
|||
entity->heal(amount, 1);
|
||||
scale.ensureData();
|
||||
scale.data->path.addPathNode(scale, 0);
|
||||
scale.data->path.addPathNode(Vector(1.25, 1.25), 0.5);
|
||||
scale.data->path.addPathNode(Vector(1.25f, 1.25f), 0.5f);
|
||||
scale.data->path.addPathNode(Vector(0,0), 1);
|
||||
scale.startPath(1);
|
||||
setLife(1.1);
|
||||
setLife(1.1f);
|
||||
used = true;
|
||||
}
|
||||
|
||||
|
@ -122,10 +122,10 @@ void ManaBall::onUpdate(float dt)
|
|||
}
|
||||
else
|
||||
{
|
||||
position.interpolateTo(dsq->game->avatar->position, 0.2);
|
||||
position.interpolateTo(dsq->game->avatar->position, 0.2f);
|
||||
|
||||
}
|
||||
}
|
||||
position.z = 0.5;
|
||||
position.z = 0.5f;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace MiniMapRenderSpace
|
|||
// Distance at which the icon decreases to minimum size
|
||||
const float iconMaxDistance = iconMaxOffset * 3;
|
||||
// Scale of the icon at minimum size
|
||||
const float iconMinScale = 0.6;
|
||||
const float iconMinScale = 0.6f;
|
||||
// Radius of the health bar circle
|
||||
const int healthBarRadius = miniMapRadius + 4;
|
||||
// Number of steps around health bar at which to draw bits
|
||||
|
@ -251,10 +251,10 @@ void MiniMapRender::slide(int slide)
|
|||
switch(slide)
|
||||
{
|
||||
case 0:
|
||||
offset.interpolateTo(Vector(0, 0), 0.28, 0, 0, 1);
|
||||
offset.interpolateTo(Vector(0, 0), 0.28f, 0, 0, 1);
|
||||
break;
|
||||
case 1:
|
||||
offset.interpolateTo(Vector(0, getMiniMapHeight()+5-600), 0.28, 0, 0, 1);
|
||||
offset.interpolateTo(Vector(0, getMiniMapHeight()+5-600), 0.28f, 0, 0, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -298,9 +298,9 @@ void MiniMapRender::onUpdate(float dt)
|
|||
{
|
||||
RenderObject::onUpdate(dt);
|
||||
|
||||
position.x = core->getVirtualWidth() - core->getVirtualOffX() - getMiniMapWidth()/2;
|
||||
position.y = 600 - getMiniMapHeight()/2;
|
||||
position.z = 2.9;
|
||||
position.x = core->getVirtualWidth() - core->getVirtualOffX() - getMiniMapWidth()*0.5f;
|
||||
position.y = 600 - getMiniMapHeight()*0.5f;
|
||||
position.z = 2.9f;
|
||||
|
||||
waterSin += dt * (bitSizeLookupPeriod / (2*PI));
|
||||
waterSin = fmodf(waterSin, bitSizeLookupPeriod);
|
||||
|
@ -363,14 +363,14 @@ void MiniMapRender::onUpdate(float dt)
|
|||
if (v < 0)
|
||||
v = 0;
|
||||
if (!lerp.isInterpolating() && lerp.x != v)
|
||||
lerp.interpolateTo(v, 0.1);
|
||||
lerp.interpolateTo(v, 0.1f);
|
||||
lerp.update(dt);
|
||||
|
||||
|
||||
jumpTimer += dt*0.5f;
|
||||
if (jumpTimer > jumpTime)
|
||||
{
|
||||
jumpTimer = 0.5;
|
||||
jumpTimer = 0.5f;
|
||||
}
|
||||
incr += dt*2;
|
||||
if (incr > PI)
|
||||
|
@ -507,7 +507,7 @@ void MiniMapRender::onRender()
|
|||
texWaterBit->apply();
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
|
||||
glColor4f(0.1, 0.2, 0.9, 0.4f*lightLevel);
|
||||
glColor4f(0.1f, 0.2f, 0.9f, 0.4f*lightLevel);
|
||||
bool curColorIsWater = true;
|
||||
|
||||
const int xmin = int(ceilf(dsq->game->cameraMin.x / TILE_SIZE));
|
||||
|
@ -548,7 +548,7 @@ void MiniMapRender::onRender()
|
|||
{
|
||||
if (curColorIsWater)
|
||||
{
|
||||
glColor4f(0.1, 0.2, 0.5, 0.2f*lightLevel);
|
||||
glColor4f(0.1f, 0.2f, 0.5f, 0.2f*lightLevel);
|
||||
curColorIsWater = false;
|
||||
}
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ void MiniMapRender::onRender()
|
|||
{
|
||||
if (!curColorIsWater)
|
||||
{
|
||||
glColor4f(0.1, 0.2, 0.9, 0.4f*lightLevel);
|
||||
glColor4f(0.1f, 0.2f, 0.9f, 0.4f*lightLevel);
|
||||
curColorIsWater = true;
|
||||
}
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ void MiniMapRender::onRender()
|
|||
texHealthBar->apply();
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glColor4f(healthBarColor.x, healthBarColor.y, healthBarColor.z, 0.6);
|
||||
glColor4f(healthBarColor.x, healthBarColor.y, healthBarColor.z, 0.6f);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
for (int step = 0; step <= curHealthSteps; step++)
|
||||
|
|
|
@ -214,8 +214,8 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
|||
scr->dlText.alpha = 0;
|
||||
scr->dlText.alpha.ensureData();
|
||||
scr->dlText.alpha.data->path.addPathNode(0, 0);
|
||||
scr->dlText.alpha.data->path.addPathNode(1, 0.1);
|
||||
scr->dlText.alpha.data->path.addPathNode(1, 0.7);
|
||||
scr->dlText.alpha.data->path.addPathNode(1, 0.1f);
|
||||
scr->dlText.alpha.data->path.addPathNode(1, 0.7f);
|
||||
scr->dlText.alpha.data->path.addPathNode(0, 1);
|
||||
scr->dlText.alpha.startPath(5);
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ void ModSelectorScreen::init()
|
|||
|
||||
subbox.position = Vector(0,260);
|
||||
subbox.alpha = 0;
|
||||
subbox.alphaMod = 0.7;
|
||||
subbox.alphaMod = 0.7f;
|
||||
subbox.followCamera = 1;
|
||||
subbox.autoWidth = AUTO_VIRTUALWIDTH;
|
||||
subbox.setHeight(80);
|
||||
|
@ -385,11 +385,11 @@ JuicyProgressBar::JuicyProgressBar() : Quad(), txt(&dsq->smallFont)
|
|||
alpha = 1;
|
||||
|
||||
juice.setTexture("loading/juice");
|
||||
juice.alpha = 0.8;
|
||||
juice.alpha = 0.8f;
|
||||
juice.followCamera = 1;
|
||||
addChild(&juice, PM_STATIC);
|
||||
|
||||
txt.alpha = 0.7;
|
||||
txt.alpha = 0.7f;
|
||||
txt.followCamera = 1;
|
||||
addChild(&txt, PM_STATIC);
|
||||
|
||||
|
@ -675,7 +675,7 @@ bool ModIconOnline::fixIcon()
|
|||
useQuad(ss.str());
|
||||
}
|
||||
|
||||
quad->alpha = 0.001;
|
||||
quad->alpha = 0.001f;
|
||||
quad->setWidthHeight(MOD_ICON_SIZE, MOD_ICON_SIZE);
|
||||
quad->alpha.interpolateTo(1, 0.5f);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void ParticleEditor::applyState()
|
|||
Gradient *grad = new Gradient;
|
||||
grad->scale = Vector(800, 600);
|
||||
grad->position = Vector(400,300);
|
||||
grad->makeVertical(Vector(0.4, 0.4, 0.4), Vector(0.8, 0.8, 0.8));
|
||||
grad->makeVertical(Vector(0.4f, 0.4f, 0.4f), Vector(0.8f, 0.8f, 0.8f));
|
||||
addRenderObject(grad, LR_BACKDROP);
|
||||
|
||||
core->cameraPos = Vector(0,0);
|
||||
|
|
|
@ -604,7 +604,7 @@ void Path::update(float dt)
|
|||
a->vel2.capLength2D(200);
|
||||
|
||||
DamageData d;
|
||||
d.damage = 0.1;
|
||||
d.damage = 0.1f;
|
||||
d.damageType = DT_STEAM;
|
||||
e->damage(d);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ void PathRender::onRender()
|
|||
{
|
||||
if (p->pathShape == PATHSHAPE_RECT)
|
||||
{
|
||||
glColor4f(0.5, 0.5, 1, 0.2);
|
||||
glColor4f(0.5f, 0.5f, 1, 0.2f);
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(nd->position.x+p->rect.x1, nd->position.y+p->rect.y2);
|
||||
glVertex2f(nd->position.x+p->rect.x2, nd->position.y+p->rect.y2);
|
||||
|
@ -72,7 +72,7 @@ void PathRender::onRender()
|
|||
glVertex2f(nd->position.x+p->rect.x1, nd->position.y+p->rect.y1);
|
||||
glEnd();
|
||||
|
||||
glColor4f(1, 1, 1, 0.3);
|
||||
glColor4f(1, 1, 1, 0.3f);
|
||||
glBegin(GL_LINES);
|
||||
glVertex2f(nd->position.x+p->rect.x1, nd->position.y+p->rect.y1);
|
||||
glVertex2f(nd->position.x+p->rect.x2, nd->position.y+p->rect.y1);
|
||||
|
@ -86,16 +86,16 @@ void PathRender::onRender()
|
|||
}
|
||||
else
|
||||
{
|
||||
glColor4f(0.5, 0.5, 1, 0.5);
|
||||
glColor4f(0.5f, 0.5f, 1, 0.5f);
|
||||
glTranslatef(nd->position.x, nd->position.y, 0);
|
||||
drawCircle(p->rect.getWidth()*0.5f, 16);
|
||||
glTranslatef(-nd->position.x, -nd->position.y, 0);
|
||||
}
|
||||
}
|
||||
|
||||
float a = 0.75;
|
||||
float a = 0.75f;
|
||||
if (!p->active)
|
||||
a = 0.3;
|
||||
a = 0.3f;
|
||||
|
||||
#ifdef AQUARIA_BUILD_SCENEEDITOR
|
||||
if (dsq->game->sceneEditor.selectedIdx == i)
|
||||
|
|
|
@ -57,11 +57,11 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
addChild(glow, PM_POINTER);
|
||||
|
||||
result = new Quad("ingredients/" + data->gfx, Vector(-100,0));
|
||||
result->scale = Vector(0.7, 0.7);
|
||||
result->scale = Vector(0.7f, 0.7f);
|
||||
addChild(result, PM_POINTER);
|
||||
|
||||
BitmapText *text = new BitmapText(&dsq->smallFont);
|
||||
text->scale = Vector(0.7, 0.7);
|
||||
text->scale = Vector(0.7f, 0.7f);
|
||||
text->color = 0;
|
||||
text->position = result->position + Vector(0, 18);
|
||||
|
||||
|
@ -70,7 +70,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
}
|
||||
|
||||
Quad *equals = new Quad("gui/recipe-equals", Vector(-50, 0));
|
||||
equals->scale = Vector(0.7, 0.7);
|
||||
equals->scale = Vector(0.7f, 0.7f);
|
||||
addChild(equals, PM_POINTER);
|
||||
|
||||
size_t c = 0;
|
||||
|
@ -97,11 +97,11 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
for (int j = 0; j < recipe->names[i].amount; j++)
|
||||
{
|
||||
ing[c] = new Quad("ingredients/" + data->gfx, Vector(100*c,0));
|
||||
ing[c]->scale = Vector(0.7, 0.7);
|
||||
ing[c]->scale = Vector(0.7f, 0.7f);
|
||||
addChild(ing[c], PM_POINTER);
|
||||
|
||||
BitmapText *text = new BitmapText(&dsq->smallFont);
|
||||
text->scale = Vector(0.7, 0.7);
|
||||
text->scale = Vector(0.7f, 0.7f);
|
||||
text->color = 0;
|
||||
text->position = ing[c]->position + Vector(0, 18);
|
||||
text->setText(processFoodName(data->displayName));
|
||||
|
@ -110,7 +110,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
if (c < size)
|
||||
{
|
||||
Quad *plus = new Quad("gui/recipe-plus", Vector(100*c+50, 0));
|
||||
plus->scale = Vector(0.7, 0.7);
|
||||
plus->scale = Vector(0.7f, 0.7f);
|
||||
addChild(plus, PM_POINTER);
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
// any type of whatever...
|
||||
BitmapText *text = new BitmapText(&dsq->smallFont);
|
||||
text->color = 0;
|
||||
text->scale = Vector(0.8, 0.8);
|
||||
text->scale = Vector(0.8f, 0.8f);
|
||||
text->position = Vector(100*c, 0);
|
||||
|
||||
std::string typeName = dsq->continuity.getIngredientDisplayName(recipe->types[i].typeName);
|
||||
|
@ -149,7 +149,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
if (c < size)
|
||||
{
|
||||
Quad *plus = new Quad("gui/recipe-plus", Vector(100*c+50, 0));
|
||||
plus->scale = Vector(0.7, 0.7);
|
||||
plus->scale = Vector(0.7f, 0.7f);
|
||||
addChild(plus, PM_POINTER);
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
|||
description = 0;
|
||||
|
||||
alpha = 0;
|
||||
alpha.interpolateTo(1, 0.2);
|
||||
alpha.interpolateTo(1, 0.2f);
|
||||
|
||||
shareAlphaWithChildren = 1;
|
||||
|
||||
|
@ -185,7 +185,7 @@ void RecipeMenuEntry::onUpdate(float dt)
|
|||
&& core->mouse.position.y > p.y - h2
|
||||
&& core->mouse.position.y < p.y + h2)
|
||||
{
|
||||
glow->alphaMod = 0.2;
|
||||
glow->alphaMod = 0.2f;
|
||||
|
||||
std::ostringstream ds;
|
||||
|
||||
|
@ -328,7 +328,7 @@ void RecipeMenu::toggle(bool on, bool watch)
|
|||
|
||||
toggling = true;
|
||||
|
||||
float t = 0.6;
|
||||
float t = 0.6f;
|
||||
|
||||
if (on)
|
||||
{
|
||||
|
@ -354,8 +354,8 @@ void RecipeMenu::toggle(bool on, bool watch)
|
|||
|
||||
createPage(currentPage);
|
||||
|
||||
nextPage->alpha.interpolateTo(1, 0.2);
|
||||
prevPage->alpha.interpolateTo(1, 0.2);
|
||||
nextPage->alpha.interpolateTo(1, 0.2f);
|
||||
prevPage->alpha.interpolateTo(1, 0.2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -420,7 +420,7 @@ void RecipeMenu::createPage(int p)
|
|||
|
||||
description = new BitmapText(&dsq->smallFont);
|
||||
description->followCamera = 1;
|
||||
description->scale = Vector(0.7, 0.7);
|
||||
description->scale = Vector(0.7f, 0.7f);
|
||||
description->setAlign(ALIGN_LEFT);
|
||||
description->position = Vector(364, 334); //most recent: (364, 334) //348, 328
|
||||
description->color = Vector(0,0,0);//Vector(0.7,0,0);
|
||||
|
|
|
@ -122,7 +122,7 @@ void SceneEditor::changeDepth()
|
|||
{
|
||||
if (editingElement)
|
||||
{
|
||||
editingElement->followCamera = 0.9;
|
||||
editingElement->followCamera = 0.9f;
|
||||
editingElement->cull = false;
|
||||
}
|
||||
}
|
||||
|
@ -188,17 +188,17 @@ public:
|
|||
if (dsq->game->sceneEditor.selectedEntity.name == selectedEntity.name
|
||||
|| (entType != -1 && dsq->game->sceneEditor.selectedEntity.typeListIndex == entType))
|
||||
{
|
||||
glow->alpha.interpolateTo(0.2, 0.2);
|
||||
glow->alpha.interpolateTo(0.2f, 0.2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glow->alpha.interpolateTo(0, 0.1);
|
||||
glow->alpha.interpolateTo(0, 0.1f);
|
||||
}
|
||||
if ((core->mouse.position - position).isLength2DIn(32))
|
||||
{
|
||||
label->alpha.interpolateTo(1, 0.1);
|
||||
alpha.interpolateTo(1, 0.2);
|
||||
scale.interpolateTo(Vector(1.5, 1.5), 0.3);
|
||||
label->alpha.interpolateTo(1, 0.1f);
|
||||
alpha.interpolateTo(1, 0.2f);
|
||||
scale.interpolateTo(Vector(1.5f, 1.5f), 0.3f);
|
||||
|
||||
if (!core->mouse.buttons.left && mbld)
|
||||
{
|
||||
|
@ -229,15 +229,15 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
doubleClickTimer = 0.4;
|
||||
doubleClickTimer = 0.4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
label->alpha.interpolateTo(0, 0.1);
|
||||
alpha.interpolateTo(0.7, 0.2);
|
||||
scale.interpolateTo(Vector(1.0, 1.0), 0.3);
|
||||
label->alpha.interpolateTo(0, 0.1f);
|
||||
alpha.interpolateTo(0.7f, 0.2f);
|
||||
scale.interpolateTo(Vector(1.0f, 1.0f), 0.3f);
|
||||
doubleClickTimer = 0;
|
||||
}
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ void SceneEditor::init()
|
|||
dsq->game->addRenderObject(btnMenu, LR_HUD);
|
||||
|
||||
selectedEntityType = 0;
|
||||
zoom = Vector(0.2,0.2);
|
||||
zoom = Vector(0.2f,0.2f);
|
||||
bgLayer = 5;
|
||||
text = new DebugFont();
|
||||
text->setFontSize(6);
|
||||
|
@ -2125,7 +2125,7 @@ void createEntityPage()
|
|||
se_grad->followCamera = 1;
|
||||
se_grad->alpha = 0;
|
||||
se_grad->color = Vector(0,0,0);
|
||||
se_grad->alpha.interpolateTo(0.8, 0.2);
|
||||
se_grad->alpha.interpolateTo(0.8f, 0.2f);
|
||||
dsq->game->addRenderObject(se_grad, LR_HUD);
|
||||
|
||||
EntityGroup &group = game->entityGroups[game->sceneEditor.entityPageNum];
|
||||
|
@ -2673,8 +2673,8 @@ void SceneEditor::toggle(bool on)
|
|||
dsq->game->togglePause(on);
|
||||
if (dsq->game->avatar)
|
||||
dsq->game->avatar->enableInput();
|
||||
text->alpha.interpolateTo(0, 0.2);
|
||||
placer->alpha.interpolateTo(0, 0.2);
|
||||
text->alpha.interpolateTo(0, 0.2f);
|
||||
placer->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
dsq->darkLayer.toggle(true);
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@ SchoolFish::SchoolFish(const std::string &texname) : FlockEntity()
|
|||
|
||||
color.ensureData();
|
||||
color.data->path.addPathNode(Vector(1,1,1), 0);
|
||||
color.data->path.addPathNode(Vector(1,1,1), 0.5);
|
||||
color.data->path.addPathNode(Vector(0.8, 0.8, 0.8), 0.7);
|
||||
color.data->path.addPathNode(Vector(1,1,1), 1.0);
|
||||
color.data->path.addPathNode(Vector(1,1,1), 0.5f);
|
||||
color.data->path.addPathNode(Vector(0.8f, 0.8f, 0.8f), 0.7f);
|
||||
color.data->path.addPathNode(Vector(1,1,1), 1.0f);
|
||||
color.startPath(2);
|
||||
color.data->loopType = -1;
|
||||
color.update((rand()%1000)/1000.0f);
|
||||
|
@ -78,7 +78,7 @@ SchoolFish::SchoolFish(const std::string &texname) : FlockEntity()
|
|||
collideRadius = 20;
|
||||
|
||||
|
||||
setSegs(8, 2, 0.1, 0.9, 0, -0.03, 8, 0);
|
||||
setSegs(8, 2, 0.1f, 0.9f, 0, -0.03f, 8, 0);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1605,11 +1605,11 @@ luaFunc(obj_damageFlash)
|
|||
int type = lua_tointeger(L, 2);
|
||||
if (r)
|
||||
{
|
||||
Vector toColor = Vector(1, 0.1, 0.1);
|
||||
Vector toColor = Vector(1, 0.1f, 0.1f);
|
||||
if (type == 1)
|
||||
toColor = Vector(1, 1, 0.1);
|
||||
toColor = Vector(1, 1, 0.1f);
|
||||
r->color = Vector(1,1,1);
|
||||
r->color.interpolateTo(toColor, 0.1, 5, 1);
|
||||
r->color.interpolateTo(toColor, 0.1f, 5, 1);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
@ -3442,7 +3442,7 @@ luaFunc(entity_warpToNode)
|
|||
{
|
||||
e->position.stopPath();
|
||||
e->position = p->nodes[0].position;
|
||||
e->rotateToVec(Vector(0,-1), 0.1);
|
||||
e->rotateToVec(Vector(0,-1), 0.1f);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
@ -4537,7 +4537,7 @@ luaFunc(entity_animate)
|
|||
if (transition == -1)
|
||||
transition = 0;
|
||||
else if (transition == 0)
|
||||
transition = 0.2;
|
||||
transition = 0.2f;
|
||||
ret = skel->transitionAnimate(getString(L, 2), transition, lua_tointeger(L, 3), lua_tointeger(L, 4));
|
||||
}
|
||||
luaReturnNum(ret);
|
||||
|
@ -6704,7 +6704,7 @@ luaFunc(stopMusic)
|
|||
|
||||
luaFunc(playMusic)
|
||||
{
|
||||
float crossfadeTime = 0.8;
|
||||
float crossfadeTime = 0.8f;
|
||||
dsq->sound->playMusic(getString(L, 1), SLT_LOOP, SFT_CROSS, crossfadeTime);
|
||||
luaReturnNil();
|
||||
}
|
||||
|
@ -6718,7 +6718,7 @@ luaFunc(playMusicStraight)
|
|||
|
||||
luaFunc(playMusicOnce)
|
||||
{
|
||||
float crossfadeTime = 0.8;
|
||||
float crossfadeTime = 0.8f;
|
||||
dsq->sound->playMusic(getString(L, 1), SLT_NONE, SFT_CROSS, crossfadeTime);
|
||||
luaReturnNil();
|
||||
}
|
||||
|
@ -6872,7 +6872,7 @@ luaFunc(entity_moveAlongSurface)
|
|||
|
||||
if (invisibleIn)
|
||||
outFromWall -= TILE_SIZE;
|
||||
float t = 0.1;
|
||||
float t = 0.1f;
|
||||
e->offset.interpolateTo(v*outFromWall, t);
|
||||
|
||||
|
||||
|
@ -8798,7 +8798,7 @@ luaFunc(clearShots)
|
|||
|
||||
luaFunc(clearHelp)
|
||||
{
|
||||
float t = 0.4;
|
||||
float t = 0.4f;
|
||||
|
||||
RenderObjectLayer *rl = &core->renderObjectLayers[LR_HELP];
|
||||
RenderObject *ro = rl->getFirst();
|
||||
|
|
|
@ -301,7 +301,7 @@ void ScriptedEntity::onAlwaysUpdate(float dt)
|
|||
crushDelay -= dt;
|
||||
if (crushDelay < 0)
|
||||
{
|
||||
crushDelay = 0.2;
|
||||
crushDelay = 0.2f;
|
||||
doCrush = true;
|
||||
}
|
||||
FOR_ENTITIES(i)
|
||||
|
@ -674,7 +674,7 @@ void ScriptedEntity::becomeSolid()
|
|||
if (doRot)
|
||||
{
|
||||
rotation.z = oldRot;
|
||||
rotateToVec(n, 0.01);
|
||||
rotateToVec(n, 0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -690,7 +690,7 @@ void ScriptedEntity::onHitWall()
|
|||
Vector n = dsq->game->getWallNormal(position);
|
||||
if (!n.isZero())
|
||||
{
|
||||
rotateToVec(n, 0.2);
|
||||
rotateToVec(n, 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ void Shot::setParticleEffect(const std::string &particleEffect)
|
|||
|
||||
void Shot::onEndOfLife()
|
||||
{
|
||||
destroySegments(0.2);
|
||||
destroySegments(0.2f);
|
||||
dead = true;
|
||||
|
||||
if (emitter)
|
||||
|
@ -460,7 +460,7 @@ void Shot::onHitWall()
|
|||
BBGE_PROF(Shot_onHitWall);
|
||||
doHitEffects();
|
||||
updateSegments(position);
|
||||
destroySegments(0.2);
|
||||
destroySegments(0.2f);
|
||||
if (emitter)
|
||||
{
|
||||
emitter->killParticleEffect();
|
||||
|
@ -628,7 +628,7 @@ void Shot::hitEntity(Entity *e, Bone *b)
|
|||
velocity = 0;
|
||||
setLife(1);
|
||||
setDecayRate(10);
|
||||
destroySegments(0.1);
|
||||
destroySegments(0.1f);
|
||||
dead = true;
|
||||
if (emitter)
|
||||
{
|
||||
|
@ -790,7 +790,7 @@ void Shot::onUpdate(float dt)
|
|||
velocity = Vector(0,0);
|
||||
|
||||
setDecayRate(10);
|
||||
destroySegments(0.1);
|
||||
destroySegments(0.1f);
|
||||
lifeTime = 0;
|
||||
fadeAlphaWithLife = true;
|
||||
setLife(1);
|
||||
|
|
|
@ -30,11 +30,11 @@ Spore::Spores Spore::spores;
|
|||
Spore::Spore (const Vector &position) : CollideEntity()
|
||||
{
|
||||
spores.push_back(this);
|
||||
scale = Vector(0.1, 0.1);
|
||||
scale = Vector(0.1f, 0.1f);
|
||||
alpha = 0;
|
||||
|
||||
this->position = position;
|
||||
alpha.interpolateTo(1, 0.5);
|
||||
alpha.interpolateTo(1, 0.5f);
|
||||
scale.interpolateTo(Vector(1, 1), 4);
|
||||
|
||||
setTexture("Spore");
|
||||
|
|
|
@ -64,7 +64,7 @@ void Intro2::applyState()
|
|||
frame4->setTexture("gameover-0004");
|
||||
frame4->position = Vector(400,310);
|
||||
frame4->setWidthHeight(600, 600);
|
||||
frame4->setSegs(2, 32, 0.1, 0.1, 0.002, 0.003, 2.0, 1);
|
||||
frame4->setSegs(2, 32, 0.1f, 0.1f, 0.002f, 0.003f, 2.0f, 1);
|
||||
}
|
||||
addRenderObject(frame4, LR_BACKGROUND);
|
||||
|
||||
|
@ -157,7 +157,7 @@ void GameOver::applyState()
|
|||
{
|
||||
q->color = 0;
|
||||
q->setWidthHeight(800, 600);
|
||||
q->position = Vector(400,300,-0.1);
|
||||
q->position = Vector(400,300,-0.1f);
|
||||
}
|
||||
addRenderObject(q);
|
||||
|
||||
|
@ -205,11 +205,11 @@ void GameOver::applyState()
|
|||
}
|
||||
addRenderObject(shockLines, LR_BACKGROUND);
|
||||
|
||||
core->run(0.033);
|
||||
core->run(0.033f);
|
||||
if (core->afterEffectManager)
|
||||
{
|
||||
core->afterEffectManager->clear();
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter, 0.07,0.03,30,0.2f, 1.1));
|
||||
core->afterEffectManager->addEffect(new ShockEffect(Vector(core->width/2, core->height/2),core->screenCenter, 0.07f,0.03f,30,0.2f, 1.1f));
|
||||
}
|
||||
|
||||
|
||||
|
@ -364,7 +364,7 @@ void Nag::applyState()
|
|||
|
||||
|
||||
Vector framePos(240, 400);
|
||||
Vector frameScale(0.98, 0.98);
|
||||
Vector frameScale(0.98f, 0.98f);
|
||||
|
||||
for (int i = 0; i < numScreens; i++)
|
||||
{
|
||||
|
@ -463,14 +463,14 @@ void Nag::onBuy()
|
|||
if (core->isFullscreen())
|
||||
{
|
||||
core->setFullscreen(false);
|
||||
dsq->run(0.6);
|
||||
dsq->run(0.6f);
|
||||
}
|
||||
|
||||
std::ostringstream os;
|
||||
os << "naijagiggle" << randRange(1, 5);
|
||||
dsq->sound->playSfx(os.str());
|
||||
|
||||
dsq->run(0.5);
|
||||
dsq->run(0.5f);
|
||||
|
||||
click = 1;
|
||||
|
||||
|
|
|
@ -744,7 +744,7 @@ void StatsAndAchievements::update(float dt)
|
|||
{
|
||||
unlockedDisplayTimestamp = -1.0f;
|
||||
dsq->achievement_text->alpha.interpolateTo(0, 1);
|
||||
dsq->achievement_box->alpha.interpolateTo(0, 1.2);
|
||||
dsq->achievement_box->alpha.interpolateTo(0, 1.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -758,7 +758,7 @@ void StatsAndAchievements::update(float dt)
|
|||
unlockedToBeDisplayed.pop();
|
||||
dsq->achievement_text->setText(text);
|
||||
dsq->achievement_text->alpha.interpolateTo(1, 1);
|
||||
dsq->achievement_box->alpha.interpolateTo(1, 0.1);
|
||||
dsq->achievement_box->alpha.interpolateTo(1, 0.1f);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@ SteamRender::SteamRender() : RenderObject()
|
|||
{
|
||||
cull = false;
|
||||
|
||||
alpha = 0.7;
|
||||
alpha = 0.7f;
|
||||
setTexture("Particles/Steam");
|
||||
texture->repeat = true;
|
||||
rippleDelay = 2;
|
||||
|
|
|
@ -130,7 +130,7 @@ void SubtitlePlayer::update(float dt)
|
|||
// present line
|
||||
// set text
|
||||
debugLog(subLines[curLine].line);
|
||||
dsq->subtext->scrollText(subLines[curLine].line, 0.02);
|
||||
dsq->subtext->scrollText(subLines[curLine].line, 0.02f);
|
||||
|
||||
// advance
|
||||
curLine++;
|
||||
|
@ -141,7 +141,7 @@ void SubtitlePlayer::update(float dt)
|
|||
if (!hidden)
|
||||
{
|
||||
dsq->subtext->alpha.interpolateTo(1, 1);
|
||||
dsq->subbox->alpha.interpolateTo(1, 0.1);
|
||||
dsq->subbox->alpha.interpolateTo(1, 0.1f);
|
||||
}
|
||||
vis = true;
|
||||
}
|
||||
|
|
|
@ -30,16 +30,16 @@ ToolTip::ToolTip() : RenderObject()
|
|||
followCamera = 1;
|
||||
|
||||
back = new Quad();
|
||||
back->alphaMod = 0.8;
|
||||
back->alphaMod = 0.8f;
|
||||
back->setWidthHeight(50,50);
|
||||
back->color = 0;
|
||||
back->renderBorder = true;
|
||||
back->borderAlpha = 0.2;
|
||||
back->borderAlpha = 0.2f;
|
||||
back->renderCenter = false;
|
||||
addChild(back, PM_POINTER);
|
||||
|
||||
text = new BitmapText(&dsq->smallFont);
|
||||
text->alpha = 0.9;
|
||||
text->alpha = 0.9f;
|
||||
text->setAlign(ALIGN_LEFT);
|
||||
addChild(text, PM_POINTER);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace WaterSurfaceRenderStuff
|
||||
{
|
||||
Vector baseColor = Vector(0.4,0.9,1.0);
|
||||
Vector baseColor = Vector(0.4f,0.9f,1.0f);
|
||||
}
|
||||
|
||||
using namespace WaterSurfaceRenderStuff;
|
||||
|
@ -22,7 +22,7 @@ WaterSurfaceRender::WaterSurfaceRender() : Quad()
|
|||
|
||||
if (dsq->useFrameBuffer && dsq->frameBuffer.isInited())
|
||||
{
|
||||
setSegs(4, 32, 0.5, 0.5, -0.005, 0, 5, 1);
|
||||
setSegs(4, 32, 0.5f, 0.5f, -0.005f, 0, 5, 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -164,7 +164,7 @@ void WaterSurfaceRender::onRender()
|
|||
else
|
||||
{
|
||||
|
||||
glColor4f(0.4, 0.7, 0.8, 0.2);
|
||||
glColor4f(0.4f, 0.7f, 0.8f, 0.2f);
|
||||
Quad::onRender();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
|
|
@ -30,17 +30,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
namespace WorldMapRenderNamespace
|
||||
{
|
||||
const float WORLDMAP_UNDERLAY_ALPHA = 0.8;
|
||||
const float WORLDMAP_UNDERLAY_ALPHA = 0.8f;
|
||||
|
||||
float baseMapSegAlpha = 0.4;
|
||||
float visibleMapSegAlpha = 0.8;
|
||||
float baseMapSegAlpha = 0.4f;
|
||||
float visibleMapSegAlpha = 0.8f;
|
||||
|
||||
const float blinkPeriod = 0.2;
|
||||
const float blinkPeriod = 0.2f;
|
||||
|
||||
// Fraction of the screen width and height we consider "visited".
|
||||
// (We don't mark the entire screen "visited" because the player may
|
||||
// overlook things on the edge of the screen while moving.)
|
||||
const float visitedFraction = 0.8;
|
||||
const float visitedFraction = 0.8f;
|
||||
|
||||
enum VisMethod
|
||||
{
|
||||
|
@ -59,10 +59,10 @@ namespace WorldMapRenderNamespace
|
|||
|
||||
float xMin, yMin, xMax, yMax;
|
||||
|
||||
float zoomMin = 0.2;
|
||||
float zoomMax = 3.0;
|
||||
const float exteriorZoomMax = 3.0;
|
||||
const float interiorZoomMax = 3.0;
|
||||
float zoomMin = 0.2f;
|
||||
float zoomMax = 3.0f;
|
||||
const float exteriorZoomMax = 3.0f;
|
||||
const float interiorZoomMax = 3.0f;
|
||||
|
||||
bool editorActive=false;
|
||||
|
||||
|
@ -81,7 +81,7 @@ GemMover *mover=0;
|
|||
|
||||
WorldMapTile *activeTile=0;
|
||||
|
||||
const float beaconSpawnBitTime = 0.05;
|
||||
const float beaconSpawnBitTime = 0.05f;
|
||||
|
||||
|
||||
void WorldMapRender::setRevealMethod(WorldMapRevealMethod m)
|
||||
|
@ -95,7 +95,7 @@ void WorldMapRender::setRevealMethod(WorldMapRevealMethod m)
|
|||
|
||||
default:
|
||||
revMethod = REVEAL_DEFAULT;
|
||||
baseMapSegAlpha = 0.4;
|
||||
baseMapSegAlpha = 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ protected:
|
|||
if (!dsq->game->worldMapRender->isOn()) return;
|
||||
|
||||
const int lenRange = 125;
|
||||
const float pscale = 0.7;
|
||||
const float pscale = 0.7f;
|
||||
|
||||
float leftOver = dt;
|
||||
|
||||
|
@ -280,7 +280,7 @@ public:
|
|||
followCamera = 1;
|
||||
blink = false;
|
||||
blinkTimer = 0;
|
||||
alphaMod = 0.66;
|
||||
alphaMod = 0.66f;
|
||||
canMove = gemData->canMove;
|
||||
|
||||
|
||||
|
@ -438,12 +438,12 @@ void WorldMapRender::setProperTileColor(WorldMapTile *tile)
|
|||
tile->q->alphaMod = 0;
|
||||
|
||||
if (tile->revealed)
|
||||
tile->q->alphaMod = 0.5;
|
||||
tile->q->alphaMod = 0.5f;
|
||||
|
||||
if (activeTile && (tile->layer != activeTile->layer || (tile->layer > 0 && activeTile != tile)))
|
||||
tile->q->alphaMod *= 0.5;
|
||||
tile->q->alphaMod *= 0.5f;
|
||||
|
||||
tile->q->color = Vector(0.7, 0.8, 1);
|
||||
tile->q->color = Vector(0.7f, 0.8f, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -712,7 +712,7 @@ WorldMapRender::WorldMapRender() : RenderObject(), ActionMapper()
|
|||
|
||||
|
||||
float aly = 26, aly2 = 18;
|
||||
float sz = 0.6;
|
||||
float sz = 0.6f;
|
||||
|
||||
//hover
|
||||
areaLabel = new BitmapText(&dsq->smallFont);
|
||||
|
@ -1072,7 +1072,7 @@ void WorldMapRender::onUpdate(float dt)
|
|||
zoomMax = exteriorZoomMax;
|
||||
}
|
||||
|
||||
float scrollAmount = 0.2;
|
||||
float scrollAmount = 0.2f;
|
||||
|
||||
if (core->mouse.scrollWheelChange)
|
||||
{
|
||||
|
@ -1082,7 +1082,7 @@ void WorldMapRender::onUpdate(float dt)
|
|||
target *= 1 + scrollAmount;
|
||||
for (; changeLeft < 0; changeLeft++)
|
||||
target /= 1 + scrollAmount;
|
||||
scale.interpolateTo(target, 0.1);
|
||||
scale.interpolateTo(target, 0.1f);
|
||||
}
|
||||
|
||||
if (scale.x < zoomMin)
|
||||
|
@ -1375,17 +1375,17 @@ void WorldMapRender::toggle(bool turnON)
|
|||
}
|
||||
|
||||
if (bg)
|
||||
bg->alpha.interpolateTo(1, 0.2);
|
||||
bg->alpha.interpolateTo(1, 0.2f);
|
||||
|
||||
alpha.interpolateTo(1, 0.2);
|
||||
alpha.interpolateTo(1, 0.2f);
|
||||
|
||||
|
||||
|
||||
underlay->alpha.interpolateTo(WORLDMAP_UNDERLAY_ALPHA, 0.2);
|
||||
underlay->alpha.interpolateTo(WORLDMAP_UNDERLAY_ALPHA, 0.2f);
|
||||
|
||||
addHintQuad1->alpha.interpolateTo(1.0, 0.2);
|
||||
addHintQuad2->alpha.interpolateTo(1.0, 0.2);
|
||||
helpButton->alpha.interpolateTo(1.0, 0.2);
|
||||
addHintQuad1->alpha.interpolateTo(1.0f, 0.2f);
|
||||
addHintQuad2->alpha.interpolateTo(1.0f, 0.2f);
|
||||
helpButton->alpha.interpolateTo(1.0f, 0.2f);
|
||||
|
||||
addAllGems();
|
||||
|
||||
|
@ -1444,16 +1444,16 @@ void WorldMapRender::toggle(bool turnON)
|
|||
core->sound->playSfx("Menu-Close");
|
||||
|
||||
if (bg)
|
||||
bg->alpha.interpolateTo(0, 0.2);
|
||||
bg->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
alpha.interpolateTo(0, 0.2);
|
||||
alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
dsq->game->togglePause(false);
|
||||
|
||||
underlay->alpha.interpolateTo(0, 0.2);
|
||||
addHintQuad1->alpha.interpolateTo(0, 0.2);
|
||||
addHintQuad2->alpha.interpolateTo(0, 0.2);
|
||||
helpButton->alpha.interpolateTo(0, 0.2);
|
||||
underlay->alpha.interpolateTo(0, 0.2f);
|
||||
addHintQuad1->alpha.interpolateTo(0, 0.2f);
|
||||
addHintQuad2->alpha.interpolateTo(0, 0.2f);
|
||||
helpButton->alpha.interpolateTo(0, 0.2f);
|
||||
|
||||
|
||||
for (GemMovers::iterator i = gemMovers.begin(); i != gemMovers.end(); i++)
|
||||
|
|
|
@ -485,7 +485,7 @@ void RippleEffect::update(float dt, Vector ** drawGrid, int xDivs, int yDivs)
|
|||
|
||||
|
||||
time += dt*0.5f;
|
||||
float amp = 0.002;
|
||||
float amp = 0.002f;
|
||||
for (int i = 0; i < (xDivs-1); i++)
|
||||
{
|
||||
for (int j = 0; j < (yDivs-1); j++)
|
||||
|
|
10
BBGE/Base.h
10
BBGE/Base.h
|
@ -37,9 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define compile_assert(pred) switch(0){case 0:case (pred):;}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786)
|
||||
//#pragma warning(disable:4786)
|
||||
//#pragma warning(disable:4005)
|
||||
#pragma warning(disable:4305)
|
||||
//#pragma warning(disable:4305)
|
||||
|
||||
//#pragma warning(disable:4018) // signed/unsigned mismatch
|
||||
#pragma warning(disable:4244) // conversion from types with possible loss of data
|
||||
|
@ -88,10 +88,8 @@ enum Direction
|
|||
DIR_MAX = 8
|
||||
};
|
||||
|
||||
const float SQRT2 = 1.41421356;
|
||||
|
||||
const float PI = 3.14159265;
|
||||
const float PI_HALF = 1.57079633;
|
||||
const float PI = 3.14159265f;
|
||||
const float PI_HALF = 1.57079633f;
|
||||
|
||||
#ifndef HUGE_VALF
|
||||
#define HUGE_VALF ((float)1e38)
|
||||
|
|
|
@ -208,8 +208,8 @@ void DebugButton::onUpdate(float dt)
|
|||
|
||||
if (highlight->isCoordinateInsideWorld(core->mouse.position) && ((!md) || (md && !core->mouse.buttons.left)))
|
||||
{
|
||||
highlight->color.interpolateTo(activeColor, 0.1);
|
||||
highlight->alpha.interpolateTo(activeAlpha, 0.1);
|
||||
highlight->color.interpolateTo(activeColor, 0.1f);
|
||||
highlight->alpha.interpolateTo(activeAlpha, 0.1f);
|
||||
|
||||
if (core->mouse.buttons.left && !md)
|
||||
md = true;
|
||||
|
@ -232,8 +232,8 @@ void DebugButton::onUpdate(float dt)
|
|||
{
|
||||
md = false;
|
||||
}
|
||||
highlight->color.interpolateTo(inactiveColor, 0.1);
|
||||
highlight->alpha.interpolateTo(inactiveAlpha, 0.1);
|
||||
highlight->color.interpolateTo(inactiveColor, 0.1f);
|
||||
highlight->alpha.interpolateTo(inactiveAlpha, 0.1f);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ PostProcessingFX::PostProcessingFX()
|
|||
{
|
||||
blendType = 0;
|
||||
layer = renderLayer = 0;
|
||||
intensity = 0.1;
|
||||
intensity = 0.1f;
|
||||
blurTimes = 12;
|
||||
radialBlurColor = Vector(1,1,1);
|
||||
for (int i = 0; i < FXT_MAX; i++)
|
||||
|
@ -120,7 +120,7 @@ void PostProcessingFX::render()
|
|||
|
||||
float percentX = pw, percentY = ph;
|
||||
|
||||
float inc = 0.01;
|
||||
float inc = 0.01f;
|
||||
float spost = 0.0f; // Starting Texture Coordinate Offset
|
||||
float alphadec = alpha / blurTimes;
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ Joystick::Joystick()
|
|||
# endif
|
||||
sdl_joy = NULL;
|
||||
buttonBitmask = 0;
|
||||
deadZone1 = 0.3;
|
||||
deadZone2 = 0.3;
|
||||
deadZone1 = 0.3f;
|
||||
deadZone2 = 0.3f;
|
||||
|
||||
clearRumbleTime= 0;
|
||||
numJoyAxes = 0;
|
||||
|
|
|
@ -435,7 +435,7 @@ void ParticleEffect::onUpdate(float dt)
|
|||
// stop the particle effect, let the particles all die off before we delete ourselves
|
||||
void ParticleEffect::killParticleEffect()
|
||||
{
|
||||
effectLifeCounter = 0.0001;
|
||||
effectLifeCounter = 0.0001f;
|
||||
die = true;
|
||||
//stop();
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void OutlineRect::onRender()
|
|||
|
||||
if (renderCenter)
|
||||
{
|
||||
glColor3f(0.9, 0.9, 1);
|
||||
glColor3f(0.9f, 0.9f, 1);
|
||||
glBegin(GL_LINES);
|
||||
// lr
|
||||
glVertex2f(-w2,0);
|
||||
|
|
|
@ -175,21 +175,21 @@ void RoundedRect::show()
|
|||
{
|
||||
if (alpha.x == 0)
|
||||
{
|
||||
const float t = 0.1;
|
||||
const float t = 0.1f;
|
||||
alpha = 0;
|
||||
alpha.interpolateTo(1, t);
|
||||
scale = Vector(0.5, 0.5);
|
||||
scale = Vector(0.5f, 0.5f);
|
||||
scale.interpolateTo(Vector(1,1), t);
|
||||
}
|
||||
}
|
||||
|
||||
void RoundedRect::hide()
|
||||
{
|
||||
const float t = 0.1;
|
||||
const float t = 0.1f;
|
||||
alpha = 1.0;
|
||||
alpha.interpolateTo(0, t);
|
||||
scale = Vector(1, 1);
|
||||
scale.interpolateTo(Vector(0.5,0.5), t);
|
||||
scale.interpolateTo(Vector(0.5f,0.5f), t);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ void Bone::updateSegment(Bone *b, const Vector &diff)
|
|||
}
|
||||
|
||||
|
||||
b->rotation.interpolateTo(Vector(0,0,angle),0.2);
|
||||
b->rotation.interpolateTo(Vector(0,0,angle),0.2f);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -366,11 +366,11 @@ SoundManager::SoundManager(const std::string &defaultDevice)
|
|||
|
||||
if (dspReverb)
|
||||
{
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_ROOMSIZE, 0.8);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_DAMP, 0.7);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_WETMIX, 0.11);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_DRYMIX, 0.88);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_WIDTH, 1.0);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_ROOMSIZE, 0.8f);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_DAMP, 0.7f);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_WETMIX, 0.11f);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_DRYMIX, 0.88f);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_WIDTH, 1.0f);
|
||||
dspReverb->setParameter(FMOD_DSP_REVERB_MODE, 0); // 0 or 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue