/*  The Blue Mango Quest
 *  Copyright (c) Clément 'phneutre' Bourdarias (code)
 *                   email: phneutre@users.sourceforge.net
 *                Guillaume 'GuBuG' Burlet (graphics)
 *                   email: gubug@users.sourceforge.net
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef _SECTOR_H
#define _SECTOR_H

sector_t *get_sector(double x, double z);
void connect_sectors();
void test_visibility_sectors(sector_t *sector, VECTEUR2D vDir, double angle);
double calc_angle(VECTEUR2D MA, VECTEUR2D MB);
VECTEUR2D calc_Vdir(VECTEUR2D MA, VECTEUR2D MB);
char test_visibility_portal(VECTEUR2D MA, VECTEUR2D MB, VECTEUR2D vDir,
		      double angle);

void test_visibility_bonus(sector_t * sector);
char test_visibility_point(VECTEUR2D MA);

void reset_sector(sector_t *sector);
void reset_portals();
char desactive_bonus(sector_t *sector, int square);

#endif
