16
General discussions / Re: SFML for PS3?
« on: July 27, 2012, 10:51:08 am »
maybe. how do indies do for games on the PSN ?
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 tested with MinGW but didn't encounter the problem.mingw is very permissive. do you use options ? you should use some like :
-Wall -Wextra -Wwrite-strings -Wstrict-prototypesand you can try the "paranoiac" mode (it can trigger errors/warning in the standard headers) :
-ansi -O2 -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Werror-implicit-function-declaration -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long -Wunreachable-code
float is not precise enough for timing.did you look at the source code ? internally it's a Uint64 (so microseconds) and it's cast to float when asked.
\n works, how do you see that it doesn't work?I just mixed up everything . I'm on a project where the text is in a file and must be on 1 line.
sf::String evaluateSpecialChars(sf::String string)
{
sf::String tmp;
std::size_t i = 0;
while(i < string.getSize())
{
sf::Uint32 c = string[i];
if(c == '\\')
{
i++;
sf::Uint32 n = string[i];
switch(n)
{
case '\\':
tmp += n;
break;
case 'n':
tmp += '\n';
break;
case 't':
tmp += '\t';
break;
default:
std::cerr << "Error: invalid special char found : " << c << n << std::endl;
}
}
else
tmp += c;
i++;
}
return tmp;
}
Btw... The mouse wheel.. why can´t be read at realtime using sf::Mouse?because it's not like a joystick, a mouse wheel doesn't have a "middle/neutral/whatever" position. it's button-like.
there is no such thing as 'American English'. There is English and there are mistakes.
If we're being pedantic, it's worth mentioning that ISO C++ doesn't define anonymous structs, thus the above construct relies on a compiler specific language extension.
Do you have an idea for that ?
#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))