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 - kitchen

Pages: [1]
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.

2
General / Weird thing with Visual Studio
« on: June 16, 2010, 09:18:09 am »
Quote from: "Gio"
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.


I made a showing how to do this. It works the same for non-express editions as well.

3
General / Compiling SFML 2.0 into static libraries through make
« on: June 14, 2010, 03:45:02 pm »
Quote from: "Laurent"
There's no way to build static libraries on Linux. It's usually a bad idea, why do you need to do that?


I'm having trouble with linking the dynamic libraries without installing them. I've got it working now though (building the static libraries, that is).

4
Feature requests / sf::Input.getKeys()
« on: June 14, 2010, 03:43:24 pm »
Quote from: "Zweistein"
Ok, thanks for the answers.

Quote
But std::list is not, that's for sure.


Thanks for that Tipp, too. I dont understand when to use what container yet.


This should help you out :)

5
General / I can't get SFML to work with VC++ 2010 Express
« on: June 14, 2010, 04:33:20 am »
I've for you showing exactly how to compile SFML 1.6 with Visual C++ 2010 Express Edition.

EDIT: Updated the link, and just in case that doesn't work, is a YouTube backup.

6
General / Text Box Input
« on: June 14, 2010, 02:58:16 am »
You will probably have to code your own (or find an open source SFML compatible) GUI system.

Here is one that I found with a quick search.

7
Window / error: expected primary-expression before '.' token
« on: June 14, 2010, 02:03:57 am »
Quote from: "Eragon0605"
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...


The error is right here:

Code: [Select]
(MouseX << 50) && (MouseY << 50)

You think you are doing a less-than comparison when you are in fact doing a left shift by 50 bits on MouseX and MouseY. Change it to this:

Code: [Select]
(MouseX < 50) && (MouseY < 50)

8
Window / error: expected primary-expression before '.' token
« on: June 14, 2010, 01:07:06 am »
You'll need to put this outside of the loop somewhere:

Code: [Select]
const sf::Input& Input = App.GetInput();

9
General / Compiling SFML 2.0 into static libraries through make
« on: June 14, 2010, 01:03:54 am »
Is there a way to do this using make for the current snapshot of SFML 2? A variable to set to true perhaps? If not, what do I need to change so it will work.

10
Feature requests / sf::Input.getKeys()
« on: June 14, 2010, 01:02:25 am »
Quote from: "Nexus"
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.


That is understandable.

11
Feature requests / sf::Input.getKeys()
« on: June 13, 2010, 02:17:14 pm »
Quote from: "Nexus"
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.


While you are technically correct, you're arguing semantics. Returning a pointer might as well be the same exact thing as returning an array. Just because technically you would call it one thing, does not mean the end result isn't another. That is, while I am returning a pointer, for all intents and purposes I am returning an array.

So when the OP posted his snippet of incorrect code where the desired result of it was clear, instead of arguing and saying definitively that something he was trying to accomplish was impossible, you could've pointed him in the direction of how to do it.

12
Feature requests / sf::Input.getKeys()
« on: June 13, 2010, 12:41:52 am »
Quote from: "Nexus"
Quote from: "kitchen"
Quote from: "Nexus"
This is not possible because C++ doesn't allow to return arrays from functions.
This is untrue.
It is true. What you return in your example, is a pointer, not an array.


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? How would you return an array from a function in C++?

13
Feature requests / Re: sf::Input.getKeys()
« on: June 12, 2010, 04:54:27 pm »
Quote from: "Nexus"
This is not possible because C++ doesn't allow to return arrays from functions.


This is untrue. His syntax may be wrong, but it is possible.

Code: [Select]
bool * foo(int bar)
{
    bool *baz = new bool[bar];
    return baz;
}

14
General / Installing SFML 2.0 on ArchLinux through pacman
« on: June 12, 2010, 04:39:31 pm »
How do I install SFML 2.0 on ArchLinux through pacman?

Pages: [1]
anything