From 3228fe41df5fc737efe3ddfde26d6983619458e8 Mon Sep 17 00:00:00 2001 From: Juan Marín Noguera Date: Thu, 27 Jun 2019 20:25:01 +0200 Subject: Real initial commit --- collision_type.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 collision_type.h (limited to 'collision_type.h') diff --git a/collision_type.h b/collision_type.h new file mode 100644 index 0000000..b391570 --- /dev/null +++ b/collision_type.h @@ -0,0 +1,44 @@ +/* + * collision_type.h -- Define los tipos de colisión. + * Copyright (C) 2018 Juan Marín Noguera + * + * 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 3 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file collision_type.h Define los tipos de colisión. + */ + +#ifndef __COLLISION_TYPE_H +#define __COLLISION_TYPE_H + +/** Representa un tipo de colisión. Este tipo funciona por máscara + * de bits, por lo que el tipo de colisión puede ser la + * combinación de varios tipos. + */ +typedef enum CollisionType { + /** Indica que una colisión es por arriba. */ + COLLISION_TOP = 1, + + /** Indica que una colisión es por abajo. */ + COLLISION_BOTTOM = 2, + + /** Indica que una colisión es por la izquierda. */ + COLLISION_LEFT = 4, + + /** Indica que una colisión es por la derecha. */ + COLLISION_RIGHT = 8 +} CollisionType; + +#endif // __COLLISION_TYPE_H -- cgit v1.2.3