SDL is not hard at all, even for beginners, if you start learning it, you'll realize how easy it is.
I recommend to look at this sites, because they have very good tutorials about SDL for beginners....
Type: Posts; User: ThLstN
SDL is not hard at all, even for beginners, if you start learning it, you'll realize how easy it is.
I recommend to look at this sites, because they have very good tutorials about SDL for beginners....
SDL is not hard at all, even for beginners, if you start learning it, you'll realize how easy it is.
I recommend to look at this sites, because they have very good tutorials about SDL for beginners....
Hello guys! It's been a while that I have been programming with SDL, creating games and such, and all that time, I've been thinking how to create a flexible game menu, that is consistent, and has sub...
void PutPixel(SDL_Surface *Surf_Dest, int X, int Y, Uint32 Pixel)
{
if(Surf_Dest == NULL || X < 0 || X >= Surf_Dest->w || Y < 0 || Y >= Surf_Dest->h)
return;
int bpp = Surf_Dest -> format...
You can try this where 20 in %20 is the length of string you need to read.
But this isn't safe so you should probably try an another method.
fscanf(file,"%20s %lf", struct_ptr[1].name,...
Well, a simple bouncing algorithm is actually very easy.
First, declare two variables for the x and y velocity of the ball, and multiply it by -1 each time the ball hits the edge of the screen.
...
Use command line arguments in your main function like this.
int main(int argc, char *argv[])
Then check of there is a parameter specified.
Yeah, you're right, I have been programming only for about one year and each time I found the solution for a specific problem, it will be very easy for almost all similar problems.
So first, I...
Now, that sounds difficult, how do I get started?
Making this class a base class from std::streambuf first?
matsp: I'll remember that :D
I'm creating a class to handle timed message dialogues on screen for my game, it all went well, but what I'm trying to achieve is something like a std::ostringstream object class, but with another...
Oh thanks, I didn't know that!
Edit: Now it's working :D
Oh is it looking in C: ?
Sorry, I didn't know that, I thought it was a relative path.
So, how can I use a relative path?
Well, I got seven lines.
I have a .cpp file in my project folder of course.
If I put a .cpp file in D: and changed Extension[0] to "D:\\*.cpp", then it works.
I really don't know what's wrong with...
Well, not many only about 6 .cpp files, but if I change Extension[0] to \\*.cpp, it still returns an INVALID_HANDLE_VALUE.
I'm trying to create a console application that reads all files in a directory, and count the total line count in it with FindFirstFile() but it always returns an INVALID_HANDLE_VALUE.
Can someone...
If I use SDL_RESIZABLE together with OpenGL, after resizing the window, all my textures would disappear.
Is that normal? And if so, should I reload it again after resizing?
Operating system: XP SP3
Compiler: MSVC 2008 Express
Graphics Library: SDL 1.2
Other Libraries: SDL_ttf, SDL_image
Description: Simple Memory Game Where You Can Make Your Own Card set.
I...
An array is not a "const char *" pointer to it's first element, only it's address is const, but the data that resides in that location is not const.
Maybe this would give you an idea:
#include <string>
#include <ctime>
#include <iostream>
int main(int argc, char *argv[])
{
Ok. Thanks for your reply!
GLFW looks interesting. I might be trying it someday.
I just want to ask, if it's possible to use all OpenGL features with SDL only, so I don't need to setup all openGL things like OpenGL drawing context in Win32 API.
Will I be able to use all...
it's equal as
false? 0 : 1
#include "cGameInstance.h"
cGameInstance cGameInstance::a_game;
cGameInstance::cGameInstance()
{
Surf_Card = NULL;
Surf_Background = NULL;
Surf_Blank = NULL;
Surf_Border ...
In Code::Blocks, somewhere in my code, I declared an ostringstream object.
But that gives me an segmentation error.
Even only declaring it would rise up an error.
Is this a bug in Code::Blocks...
Nevermind, fixed by removing -O2, missed that option.
Thx guys!