ddt at headrush.co.za
Tue Sep 17 14:30:00 CEST 2002
On 2002.09.17 13:21 Jonas Maebe wrote:
> On dinsdag, september 17, 2002, at 01:05 , ddt at headrush.co.za wrote:
> Have you tried compiling it with -ghl already?
I have now :-)
(That option is not in the manpage nor have I ever found it in the docs -
wish I knew about it before)
Here is the output:
General protection fault.
No heap dump by heaptrc unit
Exitcode = 216
Runtime error 216 at 0x0804B8B4
0x0804B8B4 CHARACTERS__SETIMAGE, line 212 of levelobj.pas
0x0804B913 CHARACTERS__SETSTATUS, line 221 of levelobj.pas
0x0804BBF0 CHARACTERS__DRAW, line 283 of levelobj.pas
0x0804B68C LEVELS__DRAW, line 148 of levelobj.pas
0x0804C372 LEVELS__INIT, line 447 of levelobj.pas
0x0805BD82 MAINLOOP, line 157 of minerunner.pas
0x0805BFFE main, line 224 of minerunner.pas
So how exactly does one read it ?
It would appear from this that characters.setImage crashed - could it be
SDL crashes if the same bitmap file is loaded too often ? Or perhaps there
something else that goes wrong when I do this.
What I will do next is to recode it so that setStatus merely changes a
with the path to the correct image, and then use SDL_BlitSurface with
SDL_LoadBMP as a parameter (e.g. only load on demand) but this could
severly slow down the program so it is not really a final solution, and
when the enemy bitmaps are
finished, surely I must be able to use the same file for all of them ?
The bitmaps are structured like this:
For each direction of movement, one bitmap containing six frames of
next to each other.
A sepperate function determines the frame number to play, and then adjust
SDL_Rect to only blit the part
of the image containing the current frame.
Any ideas ?
PS. I will look into FPAsync, thanks Sebastian.
More information about the fpc-pascal