63 const auto x =
static_cast<int>(
mPosX);
64 const auto y =
static_cast<int>(
mPosY);
float mPosY
Current layer Y position.
AmbientLayer(Image *img)
Constructor.
void draw(Graphics *graphics)
float mPosX
Current layer X position.
float mSpeedX
Scrolling speed in X direction.
float mSpeedY
Scrolling speed in Y direction.
bool mKeepRatio
Keep overlay ratio on every resolution like in 800x600.
float mParallax
Scroll factor based on camera position.
ResourceRef< Image > mImage
void update(int timePassed, float dx, float dy)
A central point of control for graphics.
virtual void drawImagePattern(const Image *image, int x, int y, int w, int h)
void drawRescaledImagePattern(const Image *image, int x, int y, int w, int h, int scaledWidth, int scaledHeight)
Draw a pattern based on a rescaled version of the given image.
int getHeight() const
Returns the logical height of the screen.
int getWidth() const
Returns the logical width of the screen.
Defines a class for loading and storing images.
int getHeight() const
Returns the height of the image.
int getWidth() const
Returns the width of the image.