aboutsummaryrefslogtreecommitdiff
path: root/collision_type.h
diff options
context:
space:
mode:
authorJuan Marín Noguera <juan.marinn@um.es>2019-06-27 20:25:01 +0200
committerJuan Marín Noguera <juan.marinn@um.es>2019-06-27 20:25:01 +0200
commit3228fe41df5fc737efe3ddfde26d6983619458e8 (patch)
tree7e6f79f9866a59eb4028dc57ca0c8bcebf8ed0d4 /collision_type.h
Real initial commit
Diffstat (limited to 'collision_type.h')
-rw-r--r--collision_type.h44
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&oacute;n. Este tipo funciona por m&aacute;scara
+ * de bits, por lo que el tipo de colisi&oacute;n puede ser la
+ * combinaci&oacute;n de varios tipos.
+ */
+typedef enum CollisionType {
+ /** Indica que una colisi&oacute;n es por arriba. */
+ COLLISION_TOP = 1,
+
+ /** Indica que una colisi&oacute;n es por abajo. */
+ COLLISION_BOTTOM = 2,
+
+ /** Indica que una colisi&oacute;n es por la izquierda. */
+ COLLISION_LEFT = 4,
+
+ /** Indica que una colisi&oacute;n es por la derecha. */
+ COLLISION_RIGHT = 8
+} CollisionType;
+
+#endif // __COLLISION_TYPE_H