home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * spr_hit.h
- *
- * The sprite collision detection routines.
- *
- * Collisions may be checked only for the sprites which have been
- * spr_put() since the last call to spr_next_pass().
- * All checks are made against the mask-bitmaps of the sprites.
- *
- **********************************************************************
- This file is part of
-
- STK -- The sprite toolkit -- version 1.0
-
- Copyright (C) Jari Karjala 1990
-
- The sprite toolkit (STK) is a FreeWare toolkit for creating high
- resolution sprite graphics with PCompatible hardware. This toolkit
- is provided as is without any warranty or such thing. See the file
- COPYING for further information.
-
- **********************************************************************
- **********************************************************************/
-
-
- #ifndef __SPR_HIT_H_
- #define __SPR_HIT_H_
-
- #include "grtypes.h"
-
-
- /**********************************************************************
- * Check whether the given point is inside the given sprite.
- *
- * Return: 0 if no collision, negative otherwise.
- **********************************************************************/
- int spr_hit_with_point(SPRITE spr, WORD x, WORD y);
-
- /**********************************************************************
- * Check whether the given sprites collide against each other.
- *
- * Return: 0 if no collision, negative otherwise.
- **********************************************************************/
- int spr_hit(SPRITE spr1, SPRITE spr2);
-
- /**********************************************************************
- * Find the first sprite colliding the given sprite. Use spr_hit_next
- * to get the next sprites.
- * Return: Sprite or NULL if no collision
- **********************************************************************/
- SPRITE spr_hit_first(SPRITE spr);
-
- /**********************************************************************
- * Find the next sprite colliding with the given sprite.
- * Return: Sprite or NULL if no collision
- **********************************************************************/
- SPRITE spr_hit_next(SPRITE spr);
-
- #endif
-