Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ostkaka

Pages: [1]
1
Graphics / Re: View wont move.
« on: July 11, 2013, 01:02:36 pm »
I read the tutorial, but I missed that somehow.  :o

2
Graphics / Re: View wont move.
« on: July 11, 2013, 12:49:14 am »
It's easier with camera.getCenter().  :-\

3
Graphics / View wont move.
« on: July 10, 2013, 11:44:47 pm »
My class Camera : public sf::View stopped to work properly after I updated to sfml 2.0. It worked with sfml 1.6. In the constructor I can change its size, rotate and move it. But then it wont do anything of that in its methods  :-\.

This is the method I use:
Code: [Select]
void Camera::Update(App& app)
{
if (currentEntity != nullptr)
{
float deltaX = currentEntity->getX()+8-getCenter().x;
float deltaY = currentEntity->getY()+8-getCenter().y;
float speedFactor = atan(app.getFrameTime()*speed)*2/3.14159265358979323846264338327950288419;

std::cout << speedFactor << " ;( ;( ;( :(\n";

setCenter(getCenter().x + deltaX*speedFactor, getCenter().y + deltaY*speedFactor);
}
}

What's wrong?  :'(

4
General / Re: Spritesheet algorithm not working
« on: February 11, 2013, 01:27:04 am »
There are at least 2 flaws in TextureContainer.cpp. (btw, who are you lol?)
The tutorial says this: "a sprite only points to an external image it doesn't own one".
Which means that:
- when your image is deleted (end of scope where you declared it) your sprite doesn't have an image anymore, hence the white box
- if your image is modified, it affects every sprites pointing to this image
oh, ty... :o I actually know that. :-\

5
General / Re: Spritesheet algorithm not working
« on: February 10, 2013, 11:07:00 pm »
Keep your image alive.
It's asked A LOT in the forums...
TY. -.-
[EDIT]
But no... It didn't really help. Why doesn't this work?
Code: [Select]
tempImage.Copy(image, 16, 0, sf::IntRect(x*spriteWidth, y*spriteHeight, (x + 1)*spriteWidth, (y + 1)*spriteHeight), true);

Pages: [1]
anything