Search found 85 matches
- Wed Jun 09, 2010 4:28 am
- Forum: Programming Discussion
- Topic: question how to proceed
- Replies: 2
- Views: 395
question how to proceed
Hi everybody.. I've been practicing SDL lately, and i started thinking... I have to ask you, how will i know the methods used in game development? I mean, i don't want to sound stupid, but for example, when i wanted to create animation, i didn't know how to do it, and i came up with something that w...
- Tue Jun 01, 2010 11:24 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
#include "SDL.h" SDL_Surface *screen = NULL; SDL_Event Event; int main (int argc, char *argv[]) { SDL_Init(SDL_INIT_VIDEO); screen = SDL_SetVideoMode(640,480,0,SDL_ANYFORMAT); SDL_Surface *img = NULL; img = SDL_LoadBMP("a.bmp"); if (img == NULL) return 1; SDL_Surface *ConvertedI...
- Tue Jun 01, 2010 2:36 pm
- Forum: Programming Discussion
- Topic: curved line in SDL
- Replies: 3
- Views: 511
Re: curved line in SDL
If you want, you can make a function that draws a curved line in the pixel frame buffer yourself, using some math. But i guess there are some libraries on the internet that does these things for you.
- Tue Jun 01, 2010 1:31 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
How about, when you get the error, what line is VS telling you to look at? Thanks man, but we already solved the problem... The problem was that i forgot to check for a case that the image wasn't successfully loaded by SDL_LoadBMP(), and because when i run it through the debugger it doesn't find th...
- Tue Jun 01, 2010 11:06 am
- Forum: Programming Discussion
- Topic: linking files
- Replies: 19
- Views: 1425
Re: linking files
The linking process isn't the same as the precompiling. the precompiler takes the included files and adds the code in them to the page. that is used to include header files in order for your program to identify and "know" your classes and other things you put in separate pages. thats why o...
- Tue Jun 01, 2010 9:27 am
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
How about, when you get the error, what line is VS telling you to look at? Thanks man, but we already solved the problem... The problem was that i forgot to check for a case that the image wasn't successfully loaded by SDL_LoadBMP(), and because when i run it through the debugger it doesn't find th...
- Mon May 31, 2010 9:31 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
lol, i am a beginnerX Abstract X wrote:Haha I thought you were checking it? =p
- Mon May 31, 2010 7:55 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
No idea, just remember to put the DLLs with the EXE. Thanks man, so my problem probably was that because the different location the debugger looks for the image in, the LoadBMP returned null... so i tried to convert null... Edit: Confirmed it! i passed null to the SDL_ConvertSurface function, and g...
- Mon May 31, 2010 7:45 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
#include "SDL.h" SDL_Surface *screen = NULL; SDL_Event Event; int main (int argc, char *argv[]) { SDL_Init(SDL_INIT_VIDEO); screen = SDL_SetVideoMode(640,480,0,SDL_ANYFORMAT); SDL_Surface *img = NULL; img = SDL_LoadBMP("a.bmp"); if (img == NULL) return 1; SDL_Surface *ConvertedI...
- Mon May 31, 2010 7:34 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
#include "SDL.h" SDL_Surface *screen = NULL; SDL_Event Event; int main (int argc, char *argv[]) { SDL_Init(SDL_INIT_VIDEO); screen = SDL_SetVideoMode(640,480,0,SDL_ANYFORMAT); SDL_Surface *img = NULL; img = SDL_LoadBMP("a.bmp"); if (img == NULL) return 1; SDL_Surface *ConvertedI...
- Mon May 31, 2010 7:15 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
ok what I see is that you're trying to dereference a pointer that points to memory location 0xC. 0xC is 12 in decimal. That means that it isn't trying to access NULL, but it also means that somewhere, your pointer gets screwed, because I don't think it's likely that any non-system program will acce...
- Mon May 31, 2010 5:19 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
lol, thanks for all your helpX Abstract X wrote:Heh I don't know then. I'm just spitting out whatever crap I can think of.
Me wrote:I think i just won't convert images... or i'll make a function that converts them myself, pixel by pixel...
- Mon May 31, 2010 5:16 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
SDL_Surface *image = SDL_LoadBMP("pic.bmp"); SDL_Surface *goodImage = SDL_DisplayFormatAlpha(image); Tried that... i think all those functions use SDL_ConvertSurface internally... Thanks for the help. I think i just won't convert images... or i'll make a function that converts them myself...
- Mon May 31, 2010 5:11 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
Isn't it the same as SDL_DisplayFormat?X Abstract X wrote:check out SDL_DisplayFormatAlpha
Edit: still happening...
I hate runtime errors about memory locations! how am i supposed to understand them??
- Mon May 31, 2010 5:05 pm
- Forum: Programming Discussion
- Topic: SDL problem
- Replies: 30
- Views: 2632
Re: SDL problem
I think they do, don't they? i mean, how can you add pixels from one format to a frame buffer of a different one? Edit: I tried making the screen 24 bit, but the error remains... maybe its VS? i mean, when i'm running it directly from the EXE and not from the debugger, it works.. maybe its a problem...