aboutsummaryrefslogtreecommitdiff
path: root/collision.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.h
Real initial commit
Diffstat (limited to 'collision.h')
-rw-r--r--collision.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/collision.h b/collision.h
new file mode 100644
index 0000000..2c17828
--- /dev/null
+++ b/collision.h
@@ -0,0 +1,56 @@
+/*
+ * collision.h -- Contiene funciones de detección de colisiones.
+ * 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.h -- Contiene funciones de detección de colisiones.
+ */
+
+#ifndef __COLLISION_H
+#define __COLLISION_H
+#include "block_list.h"
+#include "collision_type.h"
+#include "item_list.h"
+#include "player.h"
+
+/**
+ * \brief Comprueba las colisiones del personaje con los bloques y realiza las
+ * acciones oportunas.
+ * \param p El personaje.
+ * \param bl La lista de bloques a comprobar.
+ * \param il La lista de objetos, por si fuera necesario a&ntilde;adirle
+ * elementos.
+ */
+void collision_player_with_blocks(Player p, BlockList bl, ItemList il);
+
+/**
+ * \brief Comprueba las colisiones del personaje con los objetos y realiza las
+ * acciones oportunas.
+ * \param p El personaje.
+ * \param il La lista de objetos.
+ */
+void collision_player_with_items(Player p, ItemList il);
+
+/**
+ * \brief Comprueba las colisiones de los bloques con los objetos y realiza las
+ * acciones oportunas.
+ * \param bl La lista de bloques.
+ * \param il La lista de objetos.
+ */
+void collision_blocks_with_items(BlockList bl, ItemList il);
+
+#endif // __COLLISION_H