realbasic-games
[Top] [All Lists]

Fixed display - SpriteSurface, Map & going insane

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Fixed display - SpriteSurface, Map & going insane
From: Eric <cire- at prodigy dot net>
Date: Wed, 30 Jul 2003 12:02:57 -0500

> Subject: Re: Crashed, SpriteSurface, Map & going insane
> From: "Seth Willits" <seth at freaksw dot com>
> Date: Tue, 29 Jul 2003 18:34:44 -0700
>
> On Tuesday, July 29, 2003, at 06:08  PM, Eric wrote:
>
> > *the map is set to map(7,17)
> > Game_Map_Layers(LN).Insert_Tile_ID(readfrom.readShort,c,r)
> >
> > Well that caused Rb to crash and my Mac. So I tried (8,18) still
> > crashed.
> > I've tried flipping them around (18,8) no good.
>
> The fact that you tried flipping it suggest you don't know what you're
> doing (no offense). We need so see the code. There's nothing we can
> help you with otherwise.
>
> > This is what is in the Paint Tile event -
> >   g.drawPicture
> > Tiles(game_Map_Layers(1).Get_Tile_ID(xpos+1,ypos+1)).Get_TileImage,0,0
>
> Why +1?
>
> > Now when it does draw them, the first two rows of  in layer 1 are, I
> > think, over drawn.
> > There just not there.
> >
> > I'm not sure what I have done wrong. Its driving me insane!
>
> Send me your project.
>
> Seth Willits

Well I flipped it around to see if I  didn't set the array up right, a
test you might say.

The +1 is because SpriteSurface uses -1,-1 at first and will cause
an outofbounds error when trying to access that in the array.
So I just need to changed the -1,-1 to 0,0 if xpos and ypos = -1.
That fixed that problem. YEA!!!!!!!

Now I just go to do some a little more testing  to see if
RB will sitll crash and why. If I can't figure it out I'll send it to you.

Thanks

Eric


---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>

Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
.


<Prev in Thread] Current Thread [Next in Thread>