Hello everyone.
Recently tried to get 16bit mode working, and having a little trouble!
The code loads and compiles of course, but what is displayed on screen is another matter. All the colours are fine, and I don't have 4 screens or anything like that, but the image is kinda stretched towards the top left corner. I don't know how to post pictures from my hard drive, so that's all I can explain!
I'm using the official SDK with DevKitArm_r8 with gcc 3.4.1.
My code looks like this:
The picture was converted with Edorul's great GP32Converter (which works fine for 8bit pictures) so I don't know what's wrong with it! If someone could explain what I should do to get it working, I would be very appreciative! Even if someone could point me in the direction to posing my images about the problem would be great! Thanks everyone
-TheMrCul
Recently tried to get 16bit mode working, and having a little trouble!
The code loads and compiles of course, but what is displayed on screen is another matter. All the colours are fine, and I don't have 4 screens or anything like that, but the image is kinda stretched towards the top left corner. I don't know how to post pictures from my hard drive, so that's all I can explain!
I'm using the official SDK with DevKitArm_r8 with gcc 3.4.1.
My code looks like this:
Code:
#include "gpdef.h"
#include "gpstdlib.h"
#include "gpgraphic.h"
#include "gpgraphic16.h"
#include "gpmain.h"
#include "gpstdio.h"
#include "gpfont.h"
#include "gpmm.h"
//#include "gpstream.h"
//----------------------------------------------------------------------------------//
//CREATE ALL OF THE GLOBAL VARIABLES HERE
int nflip, //Screen flipping index
ExKey;
//----------------------------------------------------------------------------------//
F_HANDLE fh;
ERR_CODE err;
unsigned long n_size,n_read;
char * app_path;
GPDRAWSURFACE gpDraw[2];
//----------------------------------------------------------------------------------//
#include "house.h"
//Load all misc functions
#include "Misc.h"
//----------------------------------------------------------------------------------//
void GpMain(void *arg)
{
int i, j;
//Set up screen surface
nflip = 1;
GpGraphicModeSet(16, NULL);
GpLcdSurfaceGet(&gpDraw[0], 0);
GpLcdSurfaceGet(&gpDraw[1], 1);
GpSurfaceSet(&gpDraw[0]);
//Now we enter the main game engine
GameEngine();
}
void GameEngine(void)
{
for(;;)
{
GpBitBlt16(NULL,
&gpDraw[nflip],
0, 0,
160, 161,
(unsigned char*)House,
0, 0,
160, 161);
//Flip the screen
FlipScreen();
}
}
The picture was converted with Edorul's great GP32Converter (which works fine for 8bit pictures) so I don't know what's wrong with it! If someone could explain what I should do to get it working, I would be very appreciative! Even if someone could point me in the direction to posing my images about the problem would be great! Thanks everyone
-TheMrCul