Rlyeh's-minimal-library Help


jkgp2x

Still Fresh
Joined
Feb 7, 2006
Messages
32
how do i draw things on the screen in the minimal library. Is there a tutorial somewhere that i could use. How do i go about putting graphics in my game with it. The lib seems very easy to use but i have trouble finding documentation.
 
The minimal library is, well, minimal :) So all you get is a frame buffer, and your expected to do all your own drawing routines/etc.

So, something like:

int x,y;
for (y = 0; y < 240; y ++)
for (x = 0; x < 320; x ++)
gp2x_video_RGB[0].screen16[(y*320)+x] = 0;
gp2x_video_RGB_flip(0);

Should get you started by blanking the display. Since the display is double buffered by default, the flip routine simply swaps the buffers around, making the buffer you've just filled in become the currently displayed one.
 
Squidge posted on May 24 2006 at 02:05 PM said:
The minimal library is, well, minimal :) So all you get is a frame buffer, and your expected to do all your own drawing routines/etc.

So, something like:

int x,y;
for (y = 0; y < 240; y ++)
for (x = 0; x < 320; x ++)
gp2x_video_RGB[0].screen16[(y*320)+x] = 0;
gp2x_video_RGB_flip(0);

Should get you started by blanking the display. Since the display is double buffered by default, the flip routine simply swaps the buffers around, making the buffer you've just filled in become the currently displayed one.
Squidge, and this is really related to the post I made about getting started with SDL...

Are there any tutorials out there that get a coder started with:
  1. Putting graphics to the screen
  2. Getting Joystick input
  3. Outputting overlayed sound effects, and music
  4. Using both CPU's
? Because those four things are all that's really needed to know to get started with the most rudimentary GP2X games. However, not knowing any of the first three kind of kills of any endeavor.


I can read the code you posted above and understand it. I took C in college, and use C#.NET today. But it's difficult to know where to begin when you can't just Google code the way you can with C# these days ;)

Edit: you think I should include the link?
 
Last edited by a moderator:
The code above is only releated with dealing with the hardware directly (frame buffer) which SDL does for you so I would say 'no'.
 
Back
Top