I NEED HELP! Im VERY new to this programming and this is as far as i got so far. my background shows up. Its not finished but for some reason i cannot get my mouse sprite to show up! what am i doing wrong? please take a look and let me know. obviously you wont have the picture files i do but i think maybe you might be able to just check out the code and see what i don't have in here to make my mouse sprite show up. I cant even get the regular mouse to show up on screen. id greatly appreciate any help. Below i will attach the mouse sprite picture that im using ( if you dont know you have to save it in the folder of the cpp file and the other junk) Thank you for atleast taking a look!
CODE
// Explosions!.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include "allegro.h"
#include <stdlib.h>
int _tmain(int argc, _TCHAR* argv[])
{
int mx, my, mb, n;
//bitmap images
BITMAP * grenadelauncher;
BITMAP * terrorists;
BITMAP * black;
BITMAP * explosion;
allegro_init();
set_color_depth(32);
set_gfx_mode (GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
install_keyboard();
install_mouse(); // pg 196 - 197
terrorists = load_bitmap("terrorists.bmp" , NULL);
//for ( n = 0; n <; n++)
stretch_blit(terrorists, screen, 0, 0,terrorists->w,terrorists->h, 0,
0, screen->w, screen->h);
unscare_mouse();
grenadelauncher = load_bitmap("grenadelauncher.bmp", NULL);
set_mouse_sprite(grenadelauncher);
set_mouse_sprite_focus(22, 22);
show_mouse;
mx = mouse_x;
my = mouse_y;
mb =(mouse_b & 1);
system ("pause");
return 0;
}
This post has been edited by SumkindaPsycho: 5 Nov, 2009 - 07:00 AM