[A89] Re: clipping pixels
[Prev][Next][Index][Thread]
[A89] Re: clipping pixels
You're talking about the upper, not lower, bounds right? I see what
you're saying. The lower bound (addr >= LCD_MEM) is right then?
Also, what exactly is a void pointer? Is it like a wildcard pointer,
just a memory location with no associated type?
jk
On Sun, 6 Jan 2002 13:37:35 +1100 "Ben Wise" <bwise@labyrinth.net.au>
writes:
>
> I think that you need to be careful when checking the lower bounds
> of the
> LCD memory block. You have a <= comparison where it really should be
> a <.
> Why?
>
> Say you have a block of 5 bytes ... LCD_SIZE=5
>
> Addresses (made up):
>
> 11,12,13,14,15
> ^-----------------LCD_MEM
>
> Now the LCD_MEM pointer points to address 11.
>
> What is LCD_MEM+LCDSIZE?
> Address 11 + 5 = Address 16.
>
> Clearly that is beyond the bounds of the 5 byte block (which ends at
> address
> 15). So that's why you want to say either
> ( <= LCD_MEM+LCD_SIZE -1)
> or more simply
> ( < LCD_MEM+LCD_SIZE)
>
> Hope that helps!
>
> WiseOwl
>
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.