Search found 33 matches

by mary
Tue May 18, 2010 4:55 pm
Forum: Programming Discussion
Topic: [SOLVED] SDL loading images problem
Replies: 9
Views: 727

Re: [SOLVED] SDL loading images problem

the post wasn't too harsh, made me go back and edit how I was drawing the tiles, I had no clue what could be messing it up, seemed like clipping but couldn't figure out why. I do not what the problem was, but I had an array for clipping, and 1-6 were set to something, but I ignored 0. so I went back...
by mary
Tue May 18, 2010 9:37 am
Forum: Programming Discussion
Topic: [SOLVED] SDL loading images problem
Replies: 9
Views: 727

Re: SDL loading images problem

SOLVED!
by mary
Mon May 17, 2010 5:20 pm
Forum: Programming Discussion
Topic: [SOLVED] SDL loading images problem
Replies: 9
Views: 727

Re: SDL loading images problem

I have no idea what code would even be relevant, I have two pictures of that it clips into 6, and on the 5th clip it generates the whole picture of the other, and can shrink and grow with the motion of the mouse, even though I don't have any mouse movement in this project, and I dunno why any code w...
by mary
Mon May 17, 2010 4:19 pm
Forum: Programming Discussion
Topic: [SOLVED] SDL loading images problem
Replies: 9
Views: 727

[SOLVED] SDL loading images problem

My program is working fine, but when I try to add another image with SDL_Surface *image; the program clips a separate image incorrectly, but it only does 1 of the clips wrong and it is in the middle of the clipping, if I take away the new SDL_Surface *image; it works perfectly.
by mary
Thu May 13, 2010 8:38 pm
Forum: General/Off-Topic
Topic: mysql in linux
Replies: 2
Views: 487

mysql in linux

I installed mySQL a while ago, and would like to reinstall it so I can start from scratch again, I've tried reinstalling mySQL from synaptic, but it saves the configuration files, any ideas on how to completely get rid of it?
by mary
Thu May 13, 2010 4:22 pm
Forum: Game Development
Topic: My Tic-Tac-Toe program
Replies: 1
Views: 513

Re: My Tic-Tac-Toe program

with a game like tic-tac-toe can't you just hard code in the best responses, and if there is no response from what you hard coded, then go into the algorithm you have that checks where the best place to go, and I assume you have it check to see if it will win or lose, and places a piece there if it ...
by mary
Mon May 10, 2010 1:05 pm
Forum: Programming Discussion
Topic: error with switch statement
Replies: 9
Views: 635

Re: error with switch statement

thanks for the help pritam, I found another problem, where I declared

Code: Select all

#define STATE_TITLE 0
as

Code: Select all

#define STATE_TITLE 0;
by mary
Mon May 10, 2010 12:38 pm
Forum: Programming Discussion
Topic: error with switch statement
Replies: 9
Views: 635

error with switch statement

I keep getting an error message at a switch statement I made, from what I can tell the code looks right error message main.cpp:41: error: expected ‘:’ before ‘;’ token main.cpp:41: error: expected primary-expression before ‘:’ token main.cpp:41: error: expected ‘;’ before ‘:’ tok...
by mary
Sat May 01, 2010 7:01 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

Re: coding improvement

I am more comfortable with classes than functions, mainly because when I see them they are in the main folder, and I find it makes the code more messy, but they are a definite time saver.
by mary
Sat May 01, 2010 6:58 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

Re: coding improvement

so how would you go about changing a surfaces picture, should I just say tilesheet = IMG_Load("water.png"); or tilesheet = IMG_Load("dessert.png"); ? that is all I am really want to do, as you can see by compiling it with random pictures (with the right names) that are 128x128. T...
by mary
Sat May 01, 2010 6:07 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

Re: coding improvement

why do we not free the buffer? why would the program have a segmentation fault when I free those surfaces?
by mary
Sat May 01, 2010 4:36 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

Re: coding improvement

I kept on getting a segmentation fault when I changed tileSheet by pressing 1,2, or 3. so I took away the SDL_FreeSurface() for desert, water, and grass, and it screw up anymore, is this the correct way of handling it? How do I know when to free the surface?
by mary
Sat May 01, 2010 1:43 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

Re: coding improvement

I am using c++, and am semi familiar with classes, I do have some trouble calling functions from different classes, lets say I have 3 classes, a, b, and c, and I want b and c to be able to control something in a, then I wouldn't know how to do it off hand, the only thing I could think of is using po...
by mary
Sat May 01, 2010 1:31 pm
Forum: Programming Discussion
Topic: coding improvement
Replies: 13
Views: 1382

coding improvement

I am trying to learn how to write my code better, I find when I use functions, I have to run through tons of code just to see what is going on, as you can see from the code below, the one upside I find with using functions is I can find errors faster in valgrind (my debugger). What suggestions would...
by mary
Wed Apr 28, 2010 11:22 pm
Forum: Programming Discussion
Topic: opengl programming book
Replies: 7
Views: 674

opengl programming book

I am thinking of getting "beginning opengl game programming" would you recommend this book? if you wouldn't what book would you recommend?