Search found 85 matches

by Avishaiozeri
Mon May 31, 2010 4:59 pm
Forum: Programming Discussion
Topic: SDL problem
Replies: 30
Views: 2632

Re: SDL problem

X Abstract X wrote:Oh I think maybe it's because your loading a 24 bit bmp then trying to convert it to a 32 bit format (likely your screen will get created at 32bpp).
It can't be done? How do i make a 32bpp bmp?
Edit: You're write, it is 24 bit. maybe i'll create a 24 bit screen...
by Avishaiozeri
Mon May 31, 2010 4:49 pm
Forum: Programming Discussion
Topic: SDL problem
Replies: 30
Views: 2632

Re: SDL problem

Lol, i know, but thats not my program, i wrote it here to show you the problem, in my program the pointer is stored in an object of a player class...
Edit:
changed it, lol
by Avishaiozeri
Mon May 31, 2010 4:18 pm
Forum: Programming Discussion
Topic: SDL problem
Replies: 30
Views: 2632

Re: SDL problem

Is your .bmp file in the right place? yes, its in the same directory. I made it write to me the SDL_GetError if the surface will be NULL (it wasn't loaded), and it didn't... it was loaded fine... Edit: If i write for example this, it happens: #include "SDL.h" SDL_Surface *screen = NULL; S...
by Avishaiozeri
Mon May 31, 2010 4:07 pm
Forum: Programming Discussion
Topic: SDL problem
Replies: 30
Views: 2632

SDL problem

Hi guys, i need your help. i'm beginning with SDL now... I loaded an img using SDL_LoadBMP, and before blitting it to the screen i converted it to the screen->format using SDL_ConvertSurface, But it crashes! it compiles okay, and when i run it through the project folder it runs fine, but when i run ...
by Avishaiozeri
Tue May 25, 2010 7:30 am
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

Re: question: Why does main need parameters?

So, it can be used to determine the format your program will support?
by Avishaiozeri
Tue May 25, 2010 4:56 am
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

Re: question: Why does main need parameters?

All my questions were answered, thank you all! :)
by Avishaiozeri
Mon May 24, 2010 12:57 pm
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

Re: question: Why does main need parameters?

EDIT: i dident realize the link posted by Milch contained all the information... but now when i have used time on writing it, i will let it be here ;) you do need the parameters (int argc, char *argv[]) for linux. Does linux has same file paths as windows? And if it does, what about different type ...
by Avishaiozeri
Mon May 24, 2010 12:17 pm
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

Re: question: Why does main need parameters?

cndr wrote:you do need the parameters (int argc, char *argv[]) for linux.
Does linux has same file paths as windows? And if it does, what about different type of machine? like dreamcast or ps?
by Avishaiozeri
Mon May 24, 2010 12:03 pm
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

Re: question: Why does main need parameters?

This is for additional arguments for your program. Like the '-console' for Source games to enable console on startup. http://www.site.uottawa.ca/~lucia/courses/2131-05/labs/Lab3/CommandLineArguments.html I'v tried the link you gave, and used the code they wrote there to check what is in the argv ar...
by Avishaiozeri
Mon May 24, 2010 11:40 am
Forum: Programming Discussion
Topic: question: Why does main need parameters?
Replies: 14
Views: 949

question: Why does main need parameters?

Hi guys, i have a question. Lately i'm starting to learn Sdl more seriously, and now when i practice i'm getting used to adding the (int argc, char* args[]) to the main as parameters. Why do i need these? is it some parameters the operating system needs to send the main function in order to communic...
by Avishaiozeri
Thu May 20, 2010 3:29 pm
Forum: Programming Discussion
Topic: Help, velocity and direction
Replies: 20
Views: 1446

Re: Help, velocity and direction

I tried it, and it works nicely. thank you all for the help!
by Avishaiozeri
Thu May 20, 2010 10:14 am
Forum: Programming Discussion
Topic: Help, velocity and direction
Replies: 20
Views: 1446

Re: Help, velocity and direction

Hey guys, sorry for the double post. I have an idea, will it work if i'll make that the direction of the ball will be decided by the place it hits the player paddle? like if it'll hits the left, the ball will be thrown to the left or if on the right, to the right etc. ?
by Avishaiozeri
Thu May 20, 2010 8:18 am
Forum: Programming Discussion
Topic: Help, velocity and direction
Replies: 20
Views: 1446

Re: Help, velocity and direction

I'm working on a pong game, because i'm a total noob... I'm good with math, but i'm learning all the stuff you're talking about this year, so i'm still not totally comfortable with some concepts... Well just stick with it. Ability in maths is an awesomely useful skill, and it only gets better later...
by Avishaiozeri
Thu May 20, 2010 8:10 am
Forum: Programming Discussion
Topic: Help, velocity and direction
Replies: 20
Views: 1446

Re: Help, velocity and direction

I'm working on a pong game, because i'm a total noob... I'm good with math, but i'm learning all the stuff you're talking about this year, so i'm still not totally comfortable with some concepts... Edit: Thanks, i'll check it in google Another edit: sorry if i sound stupid... it's just that English ...
by Avishaiozeri
Thu May 20, 2010 7:48 am
Forum: Programming Discussion
Topic: Help, velocity and direction
Replies: 20
Views: 1446

Re: Help, velocity and direction

I wrote these functions which will do what you wanted and explained the steps because I'm bored. Don't just copy and paste though, read through, make sure you understand, then try it yourself. It only requires a basic knowledge of simple trigonometry and pythag. Also I didn't try compiling it so th...