|
@@ -1,35 +1,30 @@
|
1
|
|
-#include <oe_animation.h>
|
2
|
|
-#include <npc.h>
|
3
|
|
-#include <save_one.h>
|
4
|
|
-#include <agb_debug.h>
|
|
1
|
+#include <pokeagb/pokeagb.h>
|
5
|
2
|
|
6
|
|
-extern u16 current_map_block_role_get(u16 x, u16 y);
|
7
|
|
-void sp_check_tileset(void);
|
8
|
|
-
|
9
|
|
-void grass_step_general(struct npc_state *npc)
|
|
3
|
+void grass_step_general(struct NpcState *npc)
|
10
|
4
|
{
|
11
|
|
- current_oe_state.to_x___local_id = npc->to.x;
|
12
|
|
- current_oe_state.to_y___local_mapnumber = npc->to.y;
|
13
|
|
- current_oe_state.height_lsr_4___local_mapbank = (npc->height) >> 4;
|
14
|
|
- current_oe_state.field_C = 2;
|
15
|
|
- current_oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_mapnumber);
|
16
|
|
- current_oe_state.local_mapbank = npc->local_mapbank;
|
17
|
|
- current_oe_state.sav1_location = (((sav_one->location.map) << 8) | sav_one->location.bank);
|
18
|
|
- current_oe_state.field_1C = 1;
|
|
5
|
+ oe_state.effect_pos.x = npc->to.x;
|
|
6
|
+ oe_state.effect_pos.y = npc->to.y;
|
|
7
|
+ oe_state.priority = (npc->height) >> 4;
|
|
8
|
+ oe_state.field_c = 2;
|
|
9
|
+ oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_map_number);
|
|
10
|
+ oe_state.local_mapbank = npc->local_map_bank;
|
|
11
|
+ oe_state.sav1_location = (((saveblock1->location.map) << 8) | saveblock1->location.bank);
|
|
12
|
+ oe_state.field_1c = 1;
|
19
|
13
|
(void)oe_exec(4);
|
20
|
14
|
}
|
21
|
15
|
|
22
|
|
-void grass_step_elastic(struct npc_state *npc)
|
|
16
|
+void grass_step_elastic(struct NpcState *npc)
|
23
|
17
|
{
|
24
|
|
- current_oe_state.to_x___local_id = npc->to.x;
|
25
|
|
- current_oe_state.to_y___local_mapnumber = npc->to.y;
|
26
|
|
- current_oe_state.height_lsr_4___local_mapbank = (npc->height) >> 4;
|
27
|
|
- current_oe_state.field_C = 2;
|
28
|
|
- current_oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_mapnumber);
|
29
|
|
- current_oe_state.local_mapbank = npc->local_mapbank;
|
30
|
|
- current_oe_state.sav1_location = (((sav_one->location.map) << 8) | sav_one->location.bank);
|
31
|
|
- current_oe_state.field_1C = 0;
|
|
18
|
+ oe_state.effect_pos.x = npc->to.x;
|
|
19
|
+ oe_state.effect_pos.y = npc->to.y;
|
|
20
|
+ oe_state.priority = (npc->height) >> 4;
|
|
21
|
+ oe_state.field_c = 2;
|
|
22
|
+ oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_map_number);
|
|
23
|
+ oe_state.local_mapbank = npc->local_map_bank;
|
|
24
|
+ oe_state.sav1_location = (((saveblock1->location.map) << 8) | saveblock1->location.bank);
|
|
25
|
+ oe_state.field_1c = 0;
|
32
|
26
|
|
33
|
27
|
/* use variable to determine the oe animation to play */
|
34
|
28
|
(void)oe_exec(4);
|
35
|
|
-}
|
|
29
|
+}
|
|
30
|
+
|