What Kaind Of App Is The Easiest To Port ?


Console app that doesn't make use of any graphics or WinAPI functions (or other OS specific functions).

Does mean you need an BoB and a serial cable to run it though, unless you spend the additional time converting all the console functions to use the LCD and available input methods.
 
You can program in your PC using C language + SDL library. You start with a console program and you use the SDL library. You must use only standard C functions, not Windows functions. You can use any C compiler: Dev-C++, Visual C++ or the GP2X SDK. SDL is a graphic library ported in a lot of machines. You can develop and test your game or program in a PC, in a 320x240 window and then you can port it easily to the Wiz.
 
Thank's and can I use draw function this :

CODE

SetPixel(GetDC(hWnd), x, 200, lightblue);


I know it isn't really good for programing in 3D but I'm starting my Deving and I think that would be enougth for me now ..
 
Orange Pumpkin said:
Thank's and can I use draw function this :

CODE

SetPixel(GetDC(hWnd), x, 200, lightblue);
No, because it's a windows call. Your source code shouldn't have a single
CODE
#include <windows.h>

line.
 
Last edited by a moderator:
The GP2X, Wiz and Pandora don't have a device context in the same manner as Windows does, so GetDC doesn't exist, and neither does SetPixel unless you write it yourself (or use a library in which someone has written it for you).

Assuming you are going to use SDL, then the equivalent code might look like:

Uint32 *pixmem32;
Uint32 colour;

colour = SDL_MapRGB( screen->format, r, g, b );
pixmem32 = (Uint32*) screen->pixels + y + x;
*pixmem32 = colour;

Where r,g,b are the rgb of the color, and x and y are both offsets (with y suitably multiplied depending on the horizontal resolution).
 
Back