Jump to content
  • Advertisement
Sign in to follow this  
jd_1604

Allegro Mis-behaving?

This topic is 4134 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

G'Day all. I am having a problem with a program at the moment. I am mostly using VC8 Express Edition 2005 in which I have included an Allegro enviroment. I came across some source code which I have incorporated into my own program. The program enables the user to 'move' a small .bmp image around by using the arrow keys. Problem is that the code links and compiles no worries, the GFX screen comes up fine, in the top left corner is my .bmp image (It's a small robot) but as soon as an arrow key is pressed, 'Runtime Error! The application has requested the runtime to terminate in an unusual way.' It tells me my program (.exe) has triggered a breakpoint (within an Allegro library file? draw.inl) and I really don't know where to start to fix this problem. I also tried compiling through Dev C++. Same scenario- GFX screen, .bmp image is displayed, arrow key is pressed - 'Allegro has encountered a problem and needs to close. We are sorry, blah blah blah' Could someone please shed some light on this extremely frustrating hurdle. I have had success in compiling and running other Allegro applications through my VC8 enviroment (although none of them involved animation of any type), but for some reason, this one just doesn't seem to want to play the game right. Any help would be extremely welcomed and appreciated. jd_1604

Share this post


Link to post
Share on other sites
Advertisement
Here is my code in full. It contains two source files and one header. I will also post the draw.inl code and comment out the line where the breakpoint occurs.


//RobotMoves.cpp

#include <allegro.h>
#include "Character.h"



BITMAP* buffer;
Character myRobot;

void Setup(){

buffer= create_bitmap(640, 480);
myRobot.SetImagesLeft( "G:\\My Images\\RobotWalk\\Left01.bmp","Left02.bmp","Left03.bmp");
myRobot.SetImagesRight("G:\\My Images\\RobotWalk\\Right01.bmp","Right02.bmp","Right03.bmp");
myRobot.SetImagesUp("G:\\My Images\\RobotWalk\\Up01.bmp","Up02.bmp","Up03.bmp");
myRobot.SetImagesDown("G:\\My Images\\RobotWalk\\Down01.bmp","Down02.bmp","Down03.bmp");

myRobot.Show( screen);

}

void movePlayer(){

if( key[KEY_LEFT]){
myRobot.MoveOnX( LEFT, buffer, screen);
} else if( key[KEY_RIGHT]){
myRobot.MoveOnX( RIGHT, buffer, screen);
} else if( key[KEY_UP]){
myRobot.MoveOnY( UP, buffer,screen);
} else if( key[KEY_DOWN]){
myRobot.MoveOnY( DOWN, buffer,screen);
}

}

int main(int argc, char *argv[])
{
allegro_init();
install_mouse();
install_keyboard();
set_color_depth(8);

set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);

Setup();

while( !key[KEY_ESC]){
movePlayer();
}

return 0;
}
END_OF_MAIN();

********************************************************************************
//Character.cpp
#include "Character.h"

Character::Character(){

leftDone= false;
rightDone= false;
upDone= false;
downDone= false;

direction = DOWN;

int x= 0;
int y= 0;

}

Character::~Character(){

delete [] images;

}

void Character::SetImagesLeft(char image1[], char image2[], char image3[]){

images[0][0]= load_bitmap(image1, NULL);
images[0][1]= load_bitmap(image2, NULL);
images[0][2]= load_bitmap(image3, NULL);

leftDone= true;

}

void Character::SetImagesRight(char image1[], char image2[], char image3[]){

images[1][0]= load_bitmap(image1, NULL);
images[1][1]= load_bitmap(image2, NULL);
images[1][2]= load_bitmap(image3, NULL);

rightDone= true;

}

void Character::SetImagesUp(char image1[], char image2[], char image3[]){

images[2][0]= load_bitmap(image1, NULL);
images[2][1]= load_bitmap(image2, NULL);
images[2][2]= load_bitmap(image3, NULL);

upDone= true;

}

void Character::SetImagesDown(char image1[], char image2[], char image3[]){

images[3][0]= load_bitmap(image1, NULL);
images[3][1]= load_bitmap(image2, NULL);
images[3][2]= load_bitmap(image3, NULL);

downDone= true;

}


bool Character::CheckImages(){

if( rightDone && leftDone && upDone && downDone)
return true;

return false;

}

int Character::GetX(){

return x;

}

int Character::GetY(){

return y;

}

void Character::SetX(int newValue){
x = newValue;
}

void Character::SetY(int newValue){
y = newValue;
}

void Character::MoveOnX( int newDirection, BITMAP* tempBitmap, BITMAP* mainBitmap){

direction = newDirection;

if( CheckImages()){
if( direction == LEFT){

for( int i=0; i<=3; i++){
EraseOldSprite( tempBitmap);
x -= 5;

if (i == 1 || i == 3)
DrawNewSprite( tempBitmap, images[0][0]);

if (i == 0)
DrawNewSprite( tempBitmap, images[0][1]);

if (i == 2)
DrawNewSprite( tempBitmap, images[0][2]);

draw_sprite( mainBitmap, tempBitmap, 0, 0);

rest(50);

}
}else {

for( int i=0; i<3; i++){
EraseOldSprite( tempBitmap);
x += 5;

if (i ==1 || i == 3)
DrawNewSprite( tempBitmap, images[1][0]);

if (i == 0)
DrawNewSprite( tempBitmap, images[1][1]);

if (i == 2)
DrawNewSprite( tempBitmap, images[1][2]);

draw_sprite( mainBitmap, tempBitmap, 0, 0);

rest(50);

}
}
}
}

void Character::MoveOnY( int newDirection, BITMAP* tempBitmap, BITMAP* mainBitmap){

direction = newDirection;

if( CheckImages()){

if( direction == UP){

for( int i=0; i<=3; i++){
EraseOldSprite( tempBitmap);
y -= 5;

if (i ==1 || i == 3)
DrawNewSprite( tempBitmap, images[2][0]);

if (i == 0)
DrawNewSprite( tempBitmap, images[2][1]);

if (i == 2)
DrawNewSprite( tempBitmap, images[2][2]);

draw_sprite( mainBitmap, tempBitmap, 0, 0);

rest(50);

}
} else {

for( int i=0; i<=3; i++){
EraseOldSprite( tempBitmap);
y += 5;

if (i ==1 || i ==3)
DrawNewSprite( tempBitmap, images[3][0]);

if (i == 0)
DrawNewSprite( tempBitmap, images[3][1]);

if (i == 2)
DrawNewSprite( tempBitmap, images[3][2]);

draw_sprite( mainBitmap, tempBitmap, 0, 0);

rest(50);

}
}
}
}




void Character::EraseOldSprite(BITMAP *tempBitmap){

rectfill( tempBitmap, GetX(), GetY(), GetX() + 20, GetY() + 20, makecol ( 0, 0, 0));

}

void Character::DrawNewSprite(BITMAP *tempBitmap, BITMAP *spriteToDraw){

draw_sprite( tempBitmap, spriteToDraw, GetX(), GetY());

}

void Character::Show(BITMAP *mainBitmap){

if( CheckImages())
draw_sprite( screen, images[3][0], 0, 0);

}
*********************************************************************************
//Character.h

#ifndef CHARACTER_H
#define CHARACTER_H

#define LEFT 1
#define RIGHT 2
#define UP 3
#define DOWN 4

#include <allegro.h>

class Character{

public:
Character();
~Character();

//Set Images

void SetImagesLeft( char image1[], char image2[], char image3[]);
void SetImagesRight( char image1[], char image2[], char image3[]);
void SetImagesUp( char image1[], char image2[], char image3[]);
void SetImagesDown( char image1[], char image2[], char image3[]);

//Keep Program From Crashing

bool CheckImages();

int GetX();
void SetX( int newValue);
void MoveOnX( int newValue, BITMAP* tempBitmap, BITMAP* mainBitmap);

int GetY();
void SetY( int newValue);
void MoveOnY( int newValue, BITMAP* tempBitmap, BITMAP* mainBitmap);

void EraseOldSprite( BITMAP* tempBitmap);
void DrawNewSprite( BITMAP* tempBitmap, BITMAP* spriteToDraw);

void Show(BITMAP* mainBitmap);

private:
bool leftDone;
bool rightDone;
bool upDone;
bool downDone;

int direction;



int x;
int y;


// This will contain all images

BITMAP *images[4][3];
};

#endif
*********************************************************************************
#ifndef ALLEGRO_DRAW_INL
#define ALLEGRO_DRAW_INL

#include "allegro/debug.h"
#include "allegro/3d.h"
#include "gfx.inl"

#ifdef __cplusplus
extern "C" {
#endif

AL_INLINE(int, getpixel, (BITMAP *bmp, int x, int y),
{
ASSERT(bmp);

return bmp->vtable->getpixel(bmp, x, y);
})


AL_INLINE(void, putpixel, (BITMAP *bmp, int x, int y, int color),
{
ASSERT(bmp);

bmp->vtable->putpixel(bmp, x, y, color);
})


AL_INLINE(void, _allegro_vline, (BITMAP *bmp, int x, int y_1, int y2, int color),
{
ASSERT(bmp);

bmp->vtable->vline(bmp, x, y_1, y2, color);
})


AL_INLINE(void, _allegro_hline, (BITMAP *bmp, int x1, int y, int x2, int color),
{
ASSERT(bmp);

bmp->vtable->hline(bmp, x1, y, x2, color);
})


/* The curses API also contains functions called vline and hline so we have
* called our functions _allegro_vline and _allegro_hline. User programs
* should use the vline/hline aliases as they are the official names.
*/

#ifndef ALLEGRO_NO_VHLINE_ALIAS
AL_ALIAS_VOID_RET(vline(BITMAP *bmp, int x, int y_1, int y2, int color), _allegro_vline(bmp, x, y_1, y2, color))
AL_ALIAS_VOID_RET(hline(BITMAP *bmp, int x1, int y, int x2, int color), _allegro_hline(bmp, x1, y, x2, color))
#endif


AL_INLINE(void, line, (BITMAP *bmp, int x1, int y_1, int x2, int y2, int color),
{
ASSERT(bmp);

bmp->vtable->line(bmp, x1, y_1, x2, y2, color);
})


AL_INLINE(void, fastline, (BITMAP *bmp, int x1, int y_1, int x2, int y2, int color),
{
ASSERT(bmp);

bmp->vtable->fastline(bmp, x1, y_1, x2, y2, color);
})


AL_INLINE(void, rectfill, (BITMAP *bmp, int x1, int y_1, int x2, int y2, int color),
{
ASSERT(bmp);

bmp->vtable->rectfill(bmp, x1, y_1, x2, y2, color);
})


AL_INLINE(void, triangle, (BITMAP *bmp, int x1, int y_1, int x2, int y2, int x3, int y3, int color),
{
ASSERT(bmp);

bmp->vtable->triangle(bmp, x1, y_1, x2, y2, x3, y3, color);
})


AL_INLINE(void, polygon, (BITMAP *bmp, int vertices, AL_CONST int *points, int color),
{
ASSERT(bmp);

bmp->vtable->polygon(bmp, vertices, points, color);
})


AL_INLINE(void, rect, (BITMAP *bmp, int x1, int y_1, int x2, int y2, int color),
{
ASSERT(bmp);

bmp->vtable->rect(bmp, x1, y_1, x2, y2, color);
})


AL_INLINE(void, circle, (BITMAP *bmp, int x, int y, int radius, int color),
{
ASSERT(bmp);

bmp->vtable->circle(bmp, x, y, radius, color);
})


AL_INLINE(void, circlefill, (BITMAP *bmp, int x, int y, int radius, int color),
{
ASSERT(bmp);

bmp->vtable->circlefill(bmp, x, y, radius, color);
})



AL_INLINE(void, ellipse, (BITMAP *bmp, int x, int y, int rx, int ry, int color),
{
ASSERT(bmp);

bmp->vtable->ellipse(bmp, x, y, rx, ry, color);
})



AL_INLINE(void, ellipsefill, (BITMAP *bmp, int x, int y, int rx, int ry, int color),
{
ASSERT(bmp);

bmp->vtable->ellipsefill(bmp, x, y, rx, ry, color);
})



AL_INLINE(void, arc, (BITMAP *bmp, int x, int y, fixed ang1, fixed ang2, int r, int color),
{
ASSERT(bmp);

bmp->vtable->arc(bmp, x, y, ang1, ang2, r, color);
})



AL_INLINE(void, spline, (BITMAP *bmp, AL_CONST int points[8], int color),
{
ASSERT(bmp);

bmp->vtable->spline(bmp, points, color);
})



AL_INLINE(void, floodfill, (BITMAP *bmp, int x, int y, int color),
{
ASSERT(bmp);

bmp->vtable->floodfill(bmp, x, y, color);
})



AL_INLINE(void, polygon3d, (BITMAP *bmp, int type, BITMAP *texture, int vc, V3D *vtx[]),
{
ASSERT(bmp);

bmp->vtable->polygon3d(bmp, type, texture, vc, vtx);
})



AL_INLINE(void, polygon3d_f, (BITMAP *bmp, int type, BITMAP *texture, int vc, V3D_f *vtx[]),
{
ASSERT(bmp);

bmp->vtable->polygon3d_f(bmp, type, texture, vc, vtx);
})



AL_INLINE(void, triangle3d, (BITMAP *bmp, int type, BITMAP *texture, V3D *v1, V3D *v2, V3D *v3),
{
ASSERT(bmp);

bmp->vtable->triangle3d(bmp, type, texture, v1, v2, v3);
})



AL_INLINE(void, triangle3d_f, (BITMAP *bmp, int type, BITMAP *texture, V3D_f *v1, V3D_f *v2, V3D_f *v3),
{
ASSERT(bmp);

bmp->vtable->triangle3d_f(bmp, type, texture, v1, v2, v3);
})



AL_INLINE(void, quad3d, (BITMAP *bmp, int type, BITMAP *texture, V3D *v1, V3D *v2, V3D *v3, V3D *v4),
{
ASSERT(bmp);

bmp->vtable->quad3d(bmp, type, texture, v1, v2, v3, v4);
})



AL_INLINE(void, quad3d_f, (BITMAP *bmp, int type, BITMAP *texture, V3D_f *v1, V3D_f *v2, V3D_f *v3, V3D_f *v4),
{
ASSERT(bmp);

bmp->vtable->quad3d_f(bmp, type, texture, v1, v2, v3, v4);
})





AL_INLINE(void, draw_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y),
{
ASSERT(bmp);
ASSERT(sprite);

if (sprite->vtable->color_depth == 32) {
bmp->vtable->draw_256_sprite(bmp, sprite, x, y);
}
else {
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);
bmp->vtable->draw_sprite(bmp, sprite, x, y);
}
})//**Breakpoint occurs here**


AL_INLINE(void, draw_sprite_v_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y),{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);

bmp->vtable->draw_sprite_v_flip(bmp, sprite, x, y);
})


AL_INLINE(void, draw_sprite_h_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y),{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);

bmp->vtable->draw_sprite_h_flip(bmp, sprite, x, y);
})


AL_INLINE(void, draw_sprite_vh_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);

bmp->vtable->draw_sprite_vh_flip(bmp, sprite, x, y);
})


AL_INLINE(void, draw_trans_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y),
{
ASSERT(bmp);
ASSERT(sprite);

if (sprite->vtable->color_depth == 32) {
ASSERT(bmp->vtable->draw_trans_rgba_sprite);
bmp->vtable->draw_trans_rgba_sprite(bmp, sprite, x, y);
}
else {
ASSERT((bmp->vtable->color_depth == sprite->vtable->color_depth) ||
((bmp->vtable->color_depth == 32) &&
(sprite->vtable->color_depth == 8)));
bmp->vtable->draw_trans_sprite(bmp, sprite, x, y);
}
})


AL_INLINE(void, draw_lit_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, int color),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);

bmp->vtable->draw_lit_sprite(bmp, sprite, x, y, color);
})


AL_INLINE(void, draw_gouraud_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, int c1, int c2, int c3, int c4),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(bmp->vtable->color_depth == sprite->vtable->color_depth);

bmp->vtable->draw_gouraud_sprite(bmp, sprite, x, y, c1, c2, c3, c4);
})


AL_INLINE(void, draw_character_ex, (BITMAP *bmp, BITMAP *sprite, int x, int y, int color, int bg),
{
ASSERT(bmp);
ASSERT(sprite);
ASSERT(sprite->vtable->color_depth == 8);

bmp->vtable->draw_character(bmp, sprite, x, y, color, bg);
})


AL_INLINE(void, rotate_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, (x<<16) + (sprite->w * 0x10000) / 2,
(y<<16) + (sprite->h * 0x10000) / 2,
sprite->w << 15, sprite->h << 15,
angle, 0x10000, FALSE);
})


AL_INLINE(void, rotate_sprite_v_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, (x<<16) + (sprite->w * 0x10000) / 2,
(y<<16) + (sprite->h * 0x10000) / 2,
sprite->w << 15, sprite->h << 15,
angle, 0x10000, TRUE);
})


AL_INLINE(void, rotate_scaled_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle, fixed scale),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, (x<<16) + (sprite->w * scale) / 2,
(y<<16) + (sprite->h * scale) / 2,
sprite->w << 15, sprite->h << 15,
angle, scale, FALSE);
})


AL_INLINE(void, rotate_scaled_sprite_v_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle, fixed scale),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, (x<<16) + (sprite->w * scale) / 2,
(y<<16) + (sprite->h * scale) / 2,
sprite->w << 15, sprite->h << 15,
angle, scale, TRUE);
})


AL_INLINE(void, pivot_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, int cx, int cy, fixed angle),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, x<<16, y<<16, cx<<16, cy<<16, angle, 0x10000, FALSE);
})


AL_INLINE(void, pivot_sprite_v_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y, int cx, int cy, fixed angle),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, x<<16, y<<16, cx<<16, cy<<16, angle, 0x10000, TRUE);
})


AL_INLINE(void, pivot_scaled_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y, int cx, int cy, fixed angle, fixed scale),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, x<<16, y<<16, cx<<16, cy<<16, angle, scale, FALSE);
})


AL_INLINE(void, pivot_scaled_sprite_v_flip, (BITMAP *bmp, BITMAP *sprite, int x, int y, int cx, int cy, fixed angle, fixed scale),
{
ASSERT(bmp);
ASSERT(sprite);

bmp->vtable->pivot_scaled_sprite_flip(bmp, sprite, x<<16, y<<16, cx<<16, cy<<16, angle, scale, TRUE);
})


AL_INLINE(void, _putpixel, (BITMAP *bmp, int x, int y, int color),
{
uintptr_t addr;

bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write8(addr+x, color);
bmp_unwrite_line(bmp);
})


AL_INLINE(int, _getpixel, (BITMAP *bmp, int x, int y),
{
uintptr_t addr;
int c;

bmp_select(bmp);
addr = bmp_read_line(bmp, y);
c = bmp_read8(addr+x);
bmp_unwrite_line(bmp);

return c;
})


AL_INLINE(void, _putpixel15, (BITMAP *bmp, int x, int y, int color),
{
uintptr_t addr;

bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write15(addr+x*sizeof(short), color);
bmp_unwrite_line(bmp);
})


AL_INLINE(int, _getpixel15, (BITMAP *bmp, int x, int y),
{
uintptr_t addr;
int c;

bmp_select(bmp);
addr = bmp_read_line(bmp, y);
c = bmp_read15(addr+x*sizeof(short));
bmp_unwrite_line(bmp);

return c;
})


AL_INLINE(void, _putpixel16, (BITMAP *bmp, int x, int y, int color),
{
uintptr_t addr;

bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write16(addr+x*sizeof(short), color);
bmp_unwrite_line(bmp);
})


AL_INLINE(int, _getpixel16, (BITMAP *bmp, int x, int y),
{
uintptr_t addr;
int c;

bmp_select(bmp);
addr = bmp_read_line(bmp, y);
c = bmp_read16(addr+x*sizeof(short));
bmp_unwrite_line(bmp);

return c;
})


AL_INLINE(void, _putpixel24, (BITMAP *bmp, int x, int y, int color),
{
uintptr_t addr;

bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write24(addr+x*3, color);
bmp_unwrite_line(bmp);
})


AL_INLINE(int, _getpixel24, (BITMAP *bmp, int x, int y),
{
uintptr_t addr;
int c;

bmp_select(bmp);
addr = bmp_read_line(bmp, y);
c = bmp_read24(addr+x*3);
bmp_unwrite_line(bmp);

return c;
})


AL_INLINE(void, _putpixel32, (BITMAP *bmp, int x, int y, int color),
{
uintptr_t addr;

bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write32(addr+x*sizeof(int32_t), color);
bmp_unwrite_line(bmp);
})


AL_INLINE(int, _getpixel32, (BITMAP *bmp, int x, int y),
{
uintptr_t addr;
int c;

bmp_select(bmp);
addr = bmp_read_line(bmp, y);
c = bmp_read32(addr+x*sizeof(int32_t));
bmp_unwrite_line(bmp);

return c;
})

#ifdef __cplusplus
}
#endif

#endif /* ifndef ALLEGRO_DRAW_INL */






MODEDIT: corrected source tags

[Edited by - 23yrold3yrold on January 28, 2007 9:23:35 PM]

Share this post


Link to post
Share on other sites
The first thing that grabs my attention is this:

myRobot.SetImagesLeft( "G:\\My Images\\RobotWalk\\Left01.bmp","Left02.bmp","Left03.bmp");
myRobot.SetImagesRight("G:\\My Images\\RobotWalk\\Right01.bmp","Right02.bmp","Right03.bmp");
myRobot.SetImagesUp("G:\\My Images\\RobotWalk\\Up01.bmp","Up02.bmp","Up03.bmp");
myRobot.SetImagesDown("G:\\My Images\\RobotWalk\\Down01.bmp","Down02.bmp","Down03.bmp");


I'm guessing that the 2nd and 3rd images of each call are not getting loaded and then you are trying to blit a NULL pointer.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!