diff options
Diffstat (limited to 'collision_type.h')
| -rw-r--r-- | collision_type.h | 44 |
1 files changed, 44 insertions, 0 deletions
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 <https://www.gnu.org/licenses/>. + */ + +/** + * \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 |
