basic C programming help

This is a discussion on basic C programming help within the C Programming forums, part of the General Programming Boards category; Hey I'm working on a list and object implementation. And im trying to write the classic bouncing ball. But I ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    basic C programming help

    Hey I'm working on a list and object implementation. And im trying to write the classic bouncing ball. But I just get a black screen, any help would be greatly apprechiated.

    Below is the zip file containing my project writted with eclipse.
    http://www.xenoclan.net/helge/p4.zip

    Thx in advance for any help!

  2. #2
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    You dont seem to be calling SDL_Filp at the end of your main loop so everything you draw to your back buffer just ends up sitting there doing nothing.

  3. #3
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    You haven't enabled double buffering, so there's only 1 buffer. You can still call SDL_Flip() OR alternatively call SDL_UpdateRect() on the entire screen (all params 0).

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    2
    Well I got some help at school and got it done. My main error was in the object interface. I used bzero which apparently zero'd out the selected memory, but with bcopy I got the desired effect.
    Also had some changes to the main so further improove the actual bouncing balls function... I can upload the project as it is now if some1 wants?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 09:28 AM
  2. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM
  3. visual basic vs C or C++
    By FOOTOO in forum Windows Programming
    Replies: 5
    Last Post: 02-06-2005, 07:41 PM
  4. Basic Graphics programming in C, please help
    By AdRock in forum Game Programming
    Replies: 3
    Last Post: 03-24-2004, 10:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21