Re: euAllegro/Mappy problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C41C1F.07B40A20
	charset="iso-8859-1"

The reason for the machine level error, is cause it's trying to blit, or draw,
outside the parameters of the Assembled Bitmap Image produced by Mappy.  
Remember to measure properly, if you have a 10x10 map, with tiles in it that are
16x16 pixels, you'll ultimately end up with a 160x160 image of the map.

EuMario
  ----- Original Message ----- 
  From: D Stanger 
  To: EUforum at topica.com 
  Sent: Tuesday, April 06, 2004 8:53 PM
  Subject: euAllegro/Mappy problem



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.


  ---


For Topica's complete suite of email marketing solutions visit:
http://www.topica.com/?p=TEXFOOTER

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The reason for the machine level error, is cause 
it's trying to blit, or draw, outside the parameters of the Assembled Bitmap 
Image produced by Mappy.&nbsp;&nbsp; Remember to measure properly, if you have a
10x10 map, with tiles in it that are 16x16 pixels, you'll ultimately end up with
a 160x160 image of the map.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>EuMario</FONT></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT:
#000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=dstanger at belco.bc.ca href="mailto:dstanger at belco.bc.ca">D
  Stanger</A>
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com 
  href="mailto:EUforum at topica.com">EUforum at topica.com</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, April 06, 2004 8:53 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> euAllegro/Mappy problem</DIV>
  <DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
  <DIV>&nbsp;</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.&nbsp; Here is my
  code:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>include euallegro.ew<BR>include 
  file.e</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>integer ret&nbsp; <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>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 
  0)</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>--Load main game map into memory<BR>ret = 
  MapLoadABM(current_dir() &amp; "<A 
  href='file://\\test.fmp")'>\\test.fmp")</A></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>--Set the palette to that of the 
  map<BR>MapSetPal8()</FONT></DIV>
  <DIV>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>sequence key<BR>key = readkey()</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>MapFreeMem() --Free map from 
  memory<BR>destroy_bitmap(a)<BR>allegro_exit()</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>And here is the error message:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial 
  size=2>C:\Euphoria\DOWNLOADS\euAllegro\PROJECTS\Chieften\euallegro.ew:4871 in 
  procedure<BR>&nbsp;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>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Help!</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>David S.</FONT></DIV>
  <DIV>&nbsp;</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
/ Virus Database: 410 - Release Date:
  3/24/2004</FONT></DIV><PRE>--^^---------------------------------------------------------------
This email was sent to: eumario at tuscanchat.com


For Topica's complete suite of email marketing solutions visit:
<A
href="http://www.topica.com/?p=TEXFOOTER">http://www.topica.com/?p=TEXFOOTER</A>

------=_NextPart_000_000D_01C41C1F.07B40A20--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu