Well, I got the Blit sample working, not too tough.
Now I'm trying to do my own thing. I'm getting a GPF when I try and blit an image. Here's the entirety of my code:
Trying to run in the emulator, PocketPC platform.
The image is a bitmap resources, 100x100x256, RGB-encoded Windows/OS2 bitmap. Loads fine in Paint Shop Pro, which is where I saved it from.
The GPF info is:
"The instruction at 0x0040180d referenced memory at 0x00000010. The memory could not be written."
Any ideas?
Now I'm trying to do my own thing. I'm getting a GPF when I try and blit an image. Here's the entirety of my code:
- Code:
#include <PocketFrog.h>
#include "MyFirstGame.h"
CComModule _Module;
using namespace Frog;
class MyGame : public Game {
private:
Surface* logoImage;
public:
MyGame() {
PocketPC::GetModel();
m_config.szWindowName = _T("MyFirstGame");
m_config.orientation = ORIENTATION_NORTH;
m_config.splashScreenTime = 0;
}
virtual bool GameInit() {
DisplayDevice* display = GetDisplay();
otxLogo = LoadImage(display, IDR_LOGO_IMAGE);
otxLogo->SetColorMask(Color(0, 0, 0));
return true;
}
virtual void GameEnd() {
delete logoImage;
}
virtual void GameLoop() {
DisplayDevice* display = GetDisplay();
display->Blit(0, 0, logoImage);
display->Update();
}
}
virtual void StylusDown(Point stylus) {
}
virtual void StylusUp(Point stylus) {
}
virtual void StylusMove(Point stylus) {
}
};
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int) {
_Module.Init(0, hInstance);
MyGame game;
game.Run();
return 0;
}
Trying to run in the emulator, PocketPC platform.
The image is a bitmap resources, 100x100x256, RGB-encoded Windows/OS2 bitmap. Loads fine in Paint Shop Pro, which is where I saved it from.
The GPF info is:
"The instruction at 0x0040180d referenced memory at 0x00000010. The memory could not be written."
Any ideas?