All questions regarding Windows programming, post here. API,COM, ActiveX, DirectX, OpenGL, MFC and so on...
Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard
-
syd91
-
- Posts: 2
- Joined: Mon Aug 10, 2009 4:11 pm
-
by MXP » Mon Aug 10, 2009 5:34 pm
Post the code to a minimal example showing the problem and we can work through it.
Need information on a function I've posted? Chances are it's at the
MSDN.
-
MXP
-
- Posts: 6506
- Joined: Mon Sep 22, 2003 5:27 pm
by syd91 » Mon Aug 10, 2009 5:53 pm
okay the problem lies in the drawengine and app
- Code: Select all
void DrawEngine::createBackgroundTile(int index,wxBitmap *tile)
{
if (index >= 0 && index <= 16)
{
wxImage img = tile->ConvertToImage();
img.SetMaskColour( 255, 255, 255);
tileImage[index];
}
}
...
int DrawEngine::createSprite(int index, wxBitmap *sprite)
{
if (index >= 0 && index <= 16)
{
wxImage img = sprite->ConvertToImage();
img.SetMaskColour( 255, 255, 255);
spriteImage[index];
return index;
}
return -1;
}
and this part in the app.cpp
- Code: Select all
drawArea.createBackgroundTile(TILE_EMPTY, &wxBITMAP("ETILE", wxBITMAP_TYPE_BMP));
drawArea.createBackgroundTile(TILE_WALL, &wxBITMAP("TILE", wxBITMAP_TYPE_BMP));
drawArea.createSprite(SPRITE_PLAYER, &wxBITMAP("PLAYER", wxBITMAP_TYPE_BMP));
drawArea.createSprite(SPRITE_FIREBALL, &wxBITMAP("FIREBALL", wxBITMAP_TYPE_BMP));
drawArea.createSprite(SPRITE_ENEMY, &wxBITMAP("ENEMY", wxBITMAP_TYPE_BMP));
drawArea.setWindow(backBuffer, LEVEL_X, LEVEL_Y);
level = new Level(drawArea, LEVEL_X, LEVEL_Y);
player = new Mage(level, drawArea, 0, 0, 0, 3, ' ', 'w', 's', 'a', 'd');
I'm off to go arrage the code a bit.
-
syd91
-
- Posts: 2
- Joined: Mon Aug 10, 2009 4:11 pm
-
Return to Windows Programming
Who is online
Users browsing this forum: Exabot [Bot] and 2 guests