euAllegro/Mappy problem
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C41C08.71C07190
charset="iso-8859-1"
Hi all,
I'm using euAllegro (awsome library =D) to write an RPG and using the included
Mappy editor to create the maps. I am getting a machine level error when trying
to display the map on screen. Here is my code:
include euallegro.ew
include file.e
integer ret
--Initiate Allegro library routines
ret = allegro_init()
ret = install_timer() --Set up timer routines
ret = install_keyboard() --Set up keyboard handler
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0)
--Load main game map into memory
ret = MapLoadABM(current_dir() & "\\test.fmp")
--Set the palette to that of the map
MapSetPal8()
--Create a bitmap to contain the map image
atom a
a = create_bitmap(640, 480)
clear(a)
--Draw map image to virtual bitmap
MapDrawBG(a, 0, 0, 0, 0, 640, 480)
--Display virtual bitmap on screen
blit(a, SCREEN(), 0, 0, 0, 0, 640, 480)
sequence key
key = readkey()
MapFreeMem() --Free map from memory
destroy_bitmap(a)
allegro_exit()
And here is the error message:
C:\Euphoria\DOWNLOADS\euAllegro\PROJECTS\Chieften\euallegro.ew:4871 in procedure
MapDrawBG()
A machine-level exception occurred during execution of this statement
... called from
C:\Euphoria\DOWNLOADS\euAllegro\PROJECTS\Chieften\chieften.exw:30
Help!
David S.
---
------=_NextPart_000_000A_01C41C08.71C07190
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I'm using euAllegro (awsome library =D) to write an
RPG and using the included Mappy editor to create the maps. I am getting a
machine level error when trying to display the map on screen. Here is my
code:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>include euallegro.ew<BR>include file.e</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>integer ret <BR>--Initiate Allegro library
routines<BR>ret = allegro_init() <BR>ret = install_timer() --Set up timer
routines<BR>ret = install_keyboard() --Set up keyboard handler</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>set_gfx_mode(GFX_AUTODETECT, 640, 480, 0,
0)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--Load main game map into memory<BR>ret =
MapLoadABM(current_dir() & "<A
href='file://\\test.fmp")'>\\test.fmp")</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--Set the palette to that of the
map<BR>MapSetPal8()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--Create a bitmap to contain the map image<BR>atom
a<BR>a = create_bitmap(640, 480)<BR>clear(a)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--Draw map image to virtual bitmap<BR>MapDrawBG(a,
0, 0, 0, 0, 640, 480)<BR>--Display virtual bitmap on screen<BR>blit(a, SCREEN(),
0, 0, 0, 0, 640, 480)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>sequence key<BR>key = readkey()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>MapFreeMem() --Free map from
memory<BR>destroy_bitmap(a)<BR>allegro_exit()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>And here is the error message:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>C:\Euphoria\DOWNLOADS\euAllegro\PROJECTS\Chieften\euallegro.ew:4871 in
procedure<BR> MapDrawBG()<BR>A machine-level exception occurred during
execution of this statement<BR>... called from
C:\Euphoria\DOWNLOADS\euAllegro\PROJECTS\Chieften\chieften.exw:30</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Help!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>David S.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR>---<BR>Outgoing mail is certified Virus
Free.<BR>Checked by AVG anti-virus system (<A
href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.642 /
------=_NextPart_000_000A_01C41C08.71C07190--
|
Not Categorized, Please Help
|
|