|
@@ -0,0 +1,44 @@
|
|
1
|
+/****************************************************************************
|
|
2
|
+ * Copyright (C) 2015-2017 by the SotS Team *
|
|
3
|
+ * *
|
|
4
|
+ * This file is part of Sovereign of the Skies. *
|
|
5
|
+ * *
|
|
6
|
+ * Sovereign of the Skies is free software: you can redistribute it *
|
|
7
|
+ * and/or modify it *
|
|
8
|
+ * under the terms of the GNU Lesser General Public License as published *
|
|
9
|
+ * by the Free Software Foundation, either version 3 of the License, or *
|
|
10
|
+ * (at your option) any later version provided you include a copy of the *
|
|
11
|
+ * licence and this header. *
|
|
12
|
+ * *
|
|
13
|
+ * Sovereign of the Skies is distributed in the hope that it will be *
|
|
14
|
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
15
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
16
|
+ * GNU Lesser General Public License for more details. *
|
|
17
|
+ * *
|
|
18
|
+ * You should have received a copy of the GNU Lesser General Public *
|
|
19
|
+ * License along with Sovereign of the Skies. *
|
|
20
|
+ * If not, see <http://www.gnu.org/licenses/>. *
|
|
21
|
+ ****************************************************************************/
|
|
22
|
+
|
|
23
|
+ /**
|
|
24
|
+ * @file check_tileset.c
|
|
25
|
+ * @author Sturmvogel
|
|
26
|
+ * @date 21 may 2017
|
|
27
|
+ * @brief Check tileset stuff and store on last result
|
|
28
|
+ *
|
|
29
|
+ */
|
|
30
|
+
|
|
31
|
+#include <map.h>
|
|
32
|
+#include <game_engine.h>
|
|
33
|
+#include <agb_debug.h>
|
|
34
|
+
|
|
35
|
+void sp_check_tileset(void)
|
|
36
|
+{
|
|
37
|
+ u16 x;
|
|
38
|
+ u16 y;
|
|
39
|
+ player_get_pos_to(&x, &y);
|
|
40
|
+ dprintf("reading from %d %d\n", x,y);
|
|
41
|
+ u16 block_id = current_map_block_id_at(x,y);
|
|
42
|
+ dprintf("block id: %d\n", block_id);
|
|
43
|
+ var_set(0x800D, current_map_block_id_at(x,y));
|
|
44
|
+}
|