Mail Archives: djgpp/1999/01/09/15:40:50
From: | lslavoti AT mail DOT bcpl DOT net (Malefactor)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Allegro's draw_lit_sprite and draw_gouraud_sprite...
|
Message-ID: | <3697b68e.1757715@news.bcpl.net>
|
X-Newsreader: | Forte Free Agent 1.11/32.235
|
Lines: | 39
|
Date: | Sat, 09 Jan 1999 20:14:34 GMT
|
NNTP-Posting-Host: | 207.19.142.72
|
X-Complaints-To: | abuse AT bcpl DOT net
|
X-Trace: | news.abs.net 915912201 207.19.142.72 (Sat, 09 Jan 1999 15:03:21 EDT)
|
NNTP-Posting-Date: | Sat, 09 Jan 1999 15:03:21 EDT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
When I try to use draw_lit_sprite or draw_gouraud_sprite in my
program it crashes with a page fault or general protection fault.
RHIDE's Call Frame Traceback window refer's to either of the sprite
drawing functions. I'm using Allegro v3.1. I made a small program
using just the draw_lit_sprite function, and snipped it here incase I
left something important out. If anyone has any suggestions I'd like
to here them. Let me know if more info is needed.
-Thanks for reading.
//------------------------------------------------------------------
#include "allegro.h"
main()
{
allegro_init();
install_keyboard();
set_color_depth(32);
set_gfx_mode(GFX_VESA2B, 640,480, 0,0);
set_trans_blender(0,0,0, 128); //I've tried different values, so
//these values were
//arbitrary
BITMAP *buffer = create_bitmap(SCREEN_W,SCREEN_H);
clear(buffer);
PALETTE pal;
BITMAP *sprite = load_pcx("d:/iso_tile/anims/wh_ss1.pcx", pal);
draw_lit_sprite(buffer,sprite, 320,240, makecol(128,128,0));
blit(buffer,screen,0,0,0,0,SCREEN_W,SCREEN_H);
readkey();
destroy_bitmap(buffer);
destroy_bitmap(sprite);
return 0;
}
//eOf
- Raw text -