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

Pages: 1 ... 7 8 [9]
General / Compile Add-on in SFML
« on: April 12, 2010, 04:20:11 pm »
Guichan (which I'm using at the moment, but I'm thinking on another solution), FLTK, Cegui, WxWidgets, GTK+, Qt, SFUI (It's on googlecode somewhere, but there is a forum about that on this forum), and if you don't want to use it actually, sfGui :D (It hasn't released yet, AFAIK).

My problem with guichan is that is ported to SFML-1.4. I'm using it with 1.6, but thinking of migrating to 2.0, so if I want to use it, I need to write a backend. But that's probably not a big deal, when the 2.0 API will be stable (if it isn't already).

But to not to be offtopic: I solved this really easy (it's on the wiki): just copied the cpGui.cpp and .h files into my project, and it ran like it should :) (But those little bugs in widget handling were quite annoying for me, so this is why I moved on to guichan.)

General / Help with bouncing ship
« on: April 12, 2010, 12:55:06 am »
What is your problem? :D

Network / Upgraded to SFML 1.6, now linker issues.
« on: April 11, 2010, 03:16:52 am »
I ran into this problem a couple of days ago :D It's because the differend unwinding systems. There is sjlj (which is default, if you're using Mingw-TDM on Microsoft Windows, which I assume), and dw2. These are related to debuggers (AFAIK), and the difference is in exception handling speed and so on (according to mingw-tdm's site).

I don't know exactly, what I did, don't even know how or why there were a dw2 version of a library, so I messed a lot, bored with it, deleted everything (except my own code, of course:)), redownloaded sfml, recompiled it, and worked like it should :) I suggest you the same, just without the messing part (which you have already done, I assume :D)

Graphics / sf::string Text using as sprintf?
« on: April 11, 2010, 03:05:58 am »
Well, if you don't want to use boost, consider trying sprintf(). Something like that:

Code: [Select]
char* charPtr;
int i = 10;
float x = 3.03f;
char c = 'r';
sprintf(charPtr, "Whatever you %d want to %f write here %c", i, x, c);
std::string string(charPtr);

and then use sf::String::Settext(string);

I know it's rather old-school C, but if you don't want to bother with boost, you should try that. And you wanted something printf-like ;)

General / (HELP!) I am having problems setting up SFML with Codeblock
« on: April 08, 2010, 09:24:48 pm »
Well, I think you need to decide whther you are using static, or dynamic libraries. Because you defined SFML_DYNAMIC, which is only needed when you are using dynamic libraries (.dll), but you just set the static libraries (.a). IMHO. :)

I ran into a small bug: when I set the position of a cpImageButton, the sprite doesn't move with the button. Very easy to fix it, just add this line to the code:

Code: [Select]
/// Sets the image button's position coordinates in the window
void cpImageButton::SetPosition(float posx, float posy)
cpObject::SetPosition(posx, posy);
sprite.SetPosition(posx + 1, posy + 1); //This is the additional line

Graphics / Drawing just an sf::Image?
« on: March 26, 2010, 11:24:55 pm »
Quote from: "Laurent"

But you don't have to setup a new sprite every frame, you can just create it once. You don't even need to call SetImage after modifying the image.

Wow... There is always something to learn :D

Graphics / Drawing just an sf::Image?
« on: March 26, 2010, 10:01:14 pm »
What if you just have your sf::Image in your memory, modify it asyouwant, and whenever you want it to draw, just make an sf::Sprite from it, and draw that to the screen?

Audio / Newbie Problem sf::Music cannot end music thread
« on: March 26, 2010, 04:10:08 pm »
It seems to me, that this should be a bug, cause I think that's the way, how sf::Music meant to be used.

Audio / Newbie Problem sf::Music cannot end music thread
« on: March 26, 2010, 02:01:11 pm »
Well, until other solutions, would you give 1.6 a try? There is a lot of bug fixed in that. Switching from 1.5 to 1.6 also fixed my problem, so mybe it worth a try :)

Audio / [SOLVED] (1.5) weird problem with debugging
« on: March 26, 2010, 01:05:17 pm »
I switched to SFML-1.6, and the problem is solved. Sorry for creating an unnecessary topic. And keep up the good work :)

Audio / [SOLVED] (1.5) weird problem with debugging
« on: March 25, 2010, 09:58:21 pm »
btw, i searched for low and high, what could cause the gdb to not start the program, or what can be go wrong with multi-threaded program, but nothing usable...

Graphics / Deleting points in a shape
« on: March 25, 2010, 03:29:00 pm »
Well, if it isn't added (yet), then either you write it for yourself in the sfml code, or you inherit a class from sf::Shape and add to it. Or, alternatively, you can create another sf::Shape, add points from the existing shape, but skip those points you want to "delete".

But a function like this would be useful, indeed :)

Audio / [SOLVED] (1.5) weird problem with debugging
« on: March 25, 2010, 01:36:03 pm »
(Sorry for my english, it isn't my native language.)

I am creating a... well, kind of sound editing - music creation program. I only recently started to use sf::SoundStream. Until that point, I had no problem. I used debugger, I was happy. Now, it is over. When there is sf::SoundStream in my code (one of my class inherits from it, as in the tutorial), and i want to debug it, the debugger starts, but nothing happens. I don't know, whether the program starts or not, but it doesn't even step into main().

Everything is ok - I use the debug versions of libraries, use the debug build (I use Code::Blocks, btw), and use debugging mode. The debugger output says:

Starting debugger:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB)
Child process PID: 2312
* 1 Thread 2312.0x670  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at D:/Programmes/CodeBlocks/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c++/3.4.4/iostream:77

after several "step" commands:

(... lot of I-can't-understand things ...)

In KERNEL32!IsBadCodePtr () (C:\WINDOWS\system32\kernel32.dll)
Single stepping until exit from function KERNEL32!IsBadCodePtr,
which has no line number information.
0x7c80a1c3 in WideCharToMultiByte () from C:\WINDOWS\system32\kernel32.dll
In WideCharToMultiByte () (C:\WINDOWS\system32\kernel32.dll)
Single stepping until exit from function WideCharToMultiByte,
which has no line number information.
0x7c80a0c7 in WideCharToMultiByte () from C:\WINDOWS\system32\kernel32.dll
In WideCharToMultiByte () (C:\WINDOWS\system32\kernel32.dll)
Single stepping until exit from function WideCharToMultiByte,
which has no line number information.

and this three steps seem to iterate forever (didn't have much patience).

All I have throughout this is an empty console window, nothing else. (And the IDE, of course :D) I'm using MinGW-TDM, but i downloaded gdb-7.0.50.

My question is: what is causing this, and what can I do?

If this is not enough, I will create a minimal environment to reproduce this, on request. Thanks for any help :)
(No, please don't say not to use debugger... I'm too lazy and comfortable :D)

And thanks Laurent, for making this great library. It is really fun to use it ^_^

Pages: 1 ... 7 8 [9]