Search found 5 matches

by VelloCretic
Thu Dec 02, 2010 9:35 pm
Forum: Programming Discussion
Topic: Could someone help a newby solve a problem in SDL
Replies: 12
Views: 1352

Re: Could someone help a newby solve a problem in SDL

hmm well ok i fixed it now it seems xD :lol: load_files returns true and i used SDL_UpdateRects to refresh the screen here's the code i have now that works //get the offsets offset.x = x; offset.y = y; //blit the surface SDL_BlitSurface ( source , NULL , destination , &offset); } bool init() { /...
by VelloCretic
Thu Dec 02, 2010 4:53 pm
Forum: Programming Discussion
Topic: Could someone help a newby solve a problem in SDL
Replies: 12
Views: 1352

Re: Could someone help a newby solve a problem in SDL

I think it's or VS, I'll try SDL_GetError in a sec Edit: alright i replace SDL_Flip with SDL_Rect, instead of testing the load_files() function im just calling it and everything is working fine except the picture is not showing up, so maybe there is something wrong with either my load_image/load_fil...
by VelloCretic
Thu Dec 02, 2010 3:47 pm
Forum: Programming Discussion
Topic: Could someone help a newby solve a problem in SDL
Replies: 12
Views: 1352

Re: Could someone help a newby solve a problem in SDL

ok well i've just tried recompiling the code into VC++ 2010 and... load_files returns true and the program continues but now when i try and run it, it executes the program fine until if ( SDL_Flip ( screen ) == -1) { return 1; } what happens is when the program gets to this part of the code i get an...
by VelloCretic
Wed Dec 01, 2010 8:53 pm
Forum: Programming Discussion
Topic: Could someone help a newby solve a problem in SDL
Replies: 12
Views: 1352

Re: Could someone help a newby solve a problem in SDL

yes you're right it returns 1 not 2 ( i made a typo in the OP) and i fixed the areas where i had put = instead of ==, i also found a if statement which was wrong being this, if ( load_files() == false); ( i think i misplaced the semi colon there) but when load_files() is called from main it still re...
by VelloCretic
Mon Nov 29, 2010 9:13 pm
Forum: Programming Discussion
Topic: Could someone help a newby solve a problem in SDL
Replies: 12
Views: 1352

Could someone help a newby solve a problem in SDL

Ok well I've been following lazyfoo.net but I just can't do the "event driven programming" tutorial so here's my code, what is it that I am doing wrong? load_files() keeps returning 2 for me? im using Code::Blocks IDE and GCC compiler if that helps //Headers #include "SDL/SDL.h" ...