craigix
Mega GP Mania
I've been trying to get the pandora OS ported over to windows in a 800*480 window so you guys can try it early and we can all tweak it up.
However windows programming drives me mad 'test.exe must close' etc. great.
Here is there problem in a nutshell:
I don't use SDL for the OS, it is just direct to hardware, however in windows I understand the best way to get a framebuffer is via SDL.
So I've got SDL working with visualC and got my 800*480 screen open.
Now I've also managed to get my OS code (with some ugly hacks) compiling in windows.
And as far as I know it is running.
Now here is the issue, I cannot seem to figure out how to copy directly on to that SDL buffer without getting the 'This program must close' crap.
So here is some code, what on earth do I need to put where the ****** part is to access the SDL buffer? I've tried all sorts of hacks and can't seem to get anything to work, usually just crashing windows.
Sorry if this seems very newbie but I'm not used to SDL or windows, and I don't know how SDL sets up its screen buffer.
I do understand that a 32 bit frame in windows should be 8:8:8:nothing.
void sdlHACK(SDL_Surface *surface) // forces the non sdl famebuffer on to the SDL frame
{
int height=480;
int width=800;
int xl=0;
int yl=0;
int n;
int nt;
for(n = 0; n < height; n++){
for(nt = 0; nt < width; nt++){
****** = pandorascreen[((n+yl)*SCREENWIDTH)+nt+xl];
}
}
}
However windows programming drives me mad 'test.exe must close' etc. great.
Here is there problem in a nutshell:
I don't use SDL for the OS, it is just direct to hardware, however in windows I understand the best way to get a framebuffer is via SDL.
So I've got SDL working with visualC and got my 800*480 screen open.
Now I've also managed to get my OS code (with some ugly hacks) compiling in windows.
And as far as I know it is running.
Now here is the issue, I cannot seem to figure out how to copy directly on to that SDL buffer without getting the 'This program must close' crap.
So here is some code, what on earth do I need to put where the ****** part is to access the SDL buffer? I've tried all sorts of hacks and can't seem to get anything to work, usually just crashing windows.
Sorry if this seems very newbie but I'm not used to SDL or windows, and I don't know how SDL sets up its screen buffer.
I do understand that a 32 bit frame in windows should be 8:8:8:nothing.
void sdlHACK(SDL_Surface *surface) // forces the non sdl famebuffer on to the SDL frame
{
int height=480;
int width=800;
int xl=0;
int yl=0;
int n;
int nt;
for(n = 0; n < height; n++){
for(nt = 0; nt < width; nt++){
****** = pandorascreen[((n+yl)*SCREENWIDTH)+nt+xl];
}
}
}