Re: [AD] Zero sized bitmaps |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Zero sized bitmaps
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Mon, 22 Aug 2005 14:57:22 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=YQtZBZNqXHzSDSVKk2SNCTkVqmI98SyMrho8aWDsPc7/oowUZP8pRNH1ttv4QfB24MxLIj9PmNSw23ykIaBwsleK2NG4kukGqd4kj68rybAHRCNkwMSYTGj44+YF3pxh5CK76Q9GiiabBPITn6ZNlEYoccA7PKPyoxgcUTSqfKQ=
On Monday 22 August 2005 02:46 pm, AJ wrote:
> should all the non speed critical functions have ASSERTs for valid input
> , such as set_gfx_mode() could have a w,h assert for >0
That's usually the idea. However, not set_gfx_mode since there are some
drivers that specificly ignore values, or that don't need proper arguments.
GFX_TEXT, for example, is typically passed four 0's. GFX_SAFE will ignore the
width/height if it couldn't first set them, and fall back on default values.
Most non-speed critical functions already ASSERT on explicitly invalid values.
(you generally don't want to ASSERT on undefined values, since they could be
used later; only ones that are explicitly stated as invalid).