More type conversion warning cleanup.
This commit is contained in:
@@ -240,9 +240,9 @@ class MTGDeathtouchRule:public MTGAbility{
|
||||
class HUDString {
|
||||
public:
|
||||
string value;
|
||||
int timestamp;
|
||||
float timestamp;
|
||||
int quantity;
|
||||
HUDString(string s, int ts):value(s),timestamp(ts){quantity = 1;};
|
||||
HUDString(string s, float ts):value(s),timestamp(ts){quantity = 1;};
|
||||
};
|
||||
|
||||
class HUDDisplay:public MTGAbility{
|
||||
|
||||
@@ -1026,7 +1026,7 @@ void MTGMomirRule::Update(float dt){
|
||||
alreadyplayed = 0;
|
||||
}
|
||||
if (textAlpha){
|
||||
textAlpha -= (200*dt);
|
||||
textAlpha -= static_cast<int>(200*dt);
|
||||
if (textAlpha <0) textAlpha = 0;
|
||||
}
|
||||
MTGAbility::Update(dt);
|
||||
@@ -1116,7 +1116,7 @@ void HUDDisplay::Render(){
|
||||
|
||||
float x0 = SCREEN_WIDTH-10-maxWidth-10;
|
||||
float y0 = 20;
|
||||
float size = events.size() * 16;
|
||||
float size = static_cast<float>(events.size() * 16);
|
||||
JRenderer * r = JRenderer::GetInstance();
|
||||
r->FillRoundRect(x0,y0,maxWidth + 10,size,5,ARGB(50,0,0,0));
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Pos::Pos(float x, float y, float z, float t, float a) : actX(x), actY(y), actZ(z
|
||||
void Pos::Update(float dt)
|
||||
{
|
||||
if (dt > 0.05f)
|
||||
dt = 0.05;
|
||||
dt = 0.05f;
|
||||
actX += 10 * dt * (x - actX);
|
||||
actY += 10 * dt * (y - actY);
|
||||
actT += 10 * dt * (t - actT);
|
||||
|
||||
@@ -67,7 +67,7 @@ void SimpleMenu::drawHorzPole(float x, float y, float width)
|
||||
{
|
||||
JRenderer* renderer = JRenderer::GetInstance();
|
||||
|
||||
static int offset = (spadeR->mWidth - kPoleWidth) / 2;
|
||||
float offset = (spadeR->mWidth - kPoleWidth) / 2;
|
||||
renderer->RenderQuad(side, x, y, 0, width);
|
||||
spadeR->SetHFlip(true);
|
||||
spadeL->SetHFlip(false);
|
||||
@@ -82,7 +82,7 @@ void SimpleMenu::drawVertPole(float x, float y, float height)
|
||||
{
|
||||
JRenderer* renderer = JRenderer::GetInstance();
|
||||
|
||||
static int offset = (spadeR->mHeight - kPoleWidth) / 2;
|
||||
float offset = (spadeR->mHeight - kPoleWidth) / 2;
|
||||
renderer->RenderQuad(side, x + kPoleWidth, y, M_PI/2, height);
|
||||
spadeR->SetHFlip(false);
|
||||
spadeL->SetHFlip(true);
|
||||
|
||||
@@ -367,12 +367,12 @@ StoryDialog::StoryDialog(TiXmlElement* root, StoryFlow * mParent):StoryPage(mPar
|
||||
TiXmlElement* element = node->ToElement();
|
||||
if (element) {
|
||||
string sX = safeAttribute(element, "x");
|
||||
float x = atof(sX.c_str());
|
||||
float x = static_cast<float>(atof(sX.c_str()));
|
||||
if (x > 0 && x < 1){
|
||||
x = SCREEN_WIDTH_F * x;
|
||||
}
|
||||
string sY = safeAttribute(element,"y");
|
||||
float y = atof(sY.c_str());
|
||||
float y = static_cast<float>(atof(sY.c_str()));
|
||||
if (y > 0 && y < 1){
|
||||
y = SCREEN_HEIGHT_F * y;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user