1
Graphics / Help with scrolling background
« on: June 16, 2010, 09:15:08 pm »
This person was having the same problem as you. It seems that the solution is to sf::Image::SetSmooth(false) when loading it.
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.
I did link to the Debug versions for the Debug but did not (re)build the library for VC++2010. I used the Build folder to convert it, but am not sure what to replace or even if I really updated it. I also took note of the fact that every time I run the Debug Config the project rebuilds itself even if I just built it in the same config.
There's no way to build static libraries on Linux. It's usually a bad idea, why do you need to do that?
Ok, thanks for the answers.QuoteBut std::list is not, that's for sure.
Thanks for that Tipp, too. I dont understand when to use what container yet.
Ah, thanks! The compiler error is gone! Doesn't do what I want, but there's probably just some other messed-up piece of code somewhere...
(MouseX << 50) && (MouseY << 50)
(MouseX < 50) && (MouseY < 50)
const sf::Input& Input = App.GetInput();
Sorry for focussing too much on the technical details, but I find the removal of spread C++ misbelieves (like the equality of pointers and arrays) important.
Quote from: "kitchen"You're wrong, so I'll leave you with some questions you can try to answer. What's the difference between a pointer and an array?
Sorry, but I am certainly right. C++ doesn't allow arrays to be return types of functions.Quote from: "C++ Standard, ยง8.3.5/6"Functions shall not have a return type of type array or function [...]
Static arrays and pointers are completely different language features. While arrays can be used as collections which store multiple values of the same type, pointers represent indirections pointing to another object or to NULL. However, both concepts are often confused because there exists an implicit conversion of every array to a pointer to its first element. Another reason might be that the result of a new[] expression is often called array, although it is actually a pointer (let's call it "dynamic array").Quote from: "kitchen"How would you return an array from a function in C++?As I said, you can't return arrays directly. You can use a wrapper like std::tr1::array, or return a pointer to dynamically allocated memory containing multiple elements.
Quote from: "kitchen"It is true. What you return in your example, is a pointer, not an array.Quote from: "Nexus"This is not possible because C++ doesn't allow to return arrays from functions.This is untrue.
This is not possible because C++ doesn't allow to return arrays from functions.
bool * foo(int bar)
{
bool *baz = new bool[bar];
return baz;
}