Browse Source

grass animation stuff

SBird1337 8 years ago
parent
commit
1e2dc78720

+ 6
- 0
nbproject/configurations.xml View File

4634
           <in>dns_core.h</in>
4634
           <in>dns_core.h</in>
4635
           <in>item_effects.h</in>
4635
           <in>item_effects.h</in>
4636
           <in>items.h</in>
4636
           <in>items.h</in>
4637
+          <in>oe_animation.h</in>
4637
           <in>pkmn_attributes.h</in>
4638
           <in>pkmn_attributes.h</in>
4638
           <in>pokemon.h</in>
4639
           <in>pokemon.h</in>
4639
         </df>
4640
         </df>
4771
           <in>music_override.c</in>
4772
           <in>music_override.c</in>
4772
         </df>
4773
         </df>
4773
         <df name="overworld">
4774
         <df name="overworld">
4775
+          <in>grass_animation.c</in>
4774
           <in>overworld.c</in>
4776
           <in>overworld.c</in>
4775
           <in>overworld_hooks.S</in>
4777
           <in>overworld_hooks.S</in>
4776
           <in>trainer_run.S</in>
4778
           <in>trainer_run.S</in>
27381
       </item>
27383
       </item>
27382
       <item path="src/include/items.h" ex="false" tool="3" flavor2="0">
27384
       <item path="src/include/items.h" ex="false" tool="3" flavor2="0">
27383
       </item>
27385
       </item>
27386
+      <item path="src/include/oe_animation.h" ex="false" tool="3" flavor2="0">
27387
+      </item>
27384
       <item path="src/include/pkmn_attributes.h" ex="false" tool="3" flavor2="0">
27388
       <item path="src/include/pkmn_attributes.h" ex="false" tool="3" flavor2="0">
27385
       </item>
27389
       </item>
27386
       <item path="src/include/pokemon.h" ex="false" tool="3" flavor2="0">
27390
       <item path="src/include/pokemon.h" ex="false" tool="3" flavor2="0">
27636
       </item>
27640
       </item>
27637
       <item path="src/music/music_override.c" ex="false" tool="0" flavor2="0">
27641
       <item path="src/music/music_override.c" ex="false" tool="0" flavor2="0">
27638
       </item>
27642
       </item>
27643
+      <item path="src/overworld/grass_animation.c" ex="false" tool="0" flavor2="0">
27644
+      </item>
27639
       <item path="src/overworld/overworld.c" ex="false" tool="0" flavor2="0">
27645
       <item path="src/overworld/overworld.c" ex="false" tool="0" flavor2="0">
27640
       </item>
27646
       </item>
27641
       <item path="src/overworld/overworld_hooks.S" ex="false" tool="4" flavor2="0">
27647
       <item path="src/overworld/overworld_hooks.S" ex="false" tool="4" flavor2="0">

+ 2
- 0
nbproject/private/configurations.xml View File

6065
           <in>lcd.h</in>
6065
           <in>lcd.h</in>
6066
           <in>moves.h</in>
6066
           <in>moves.h</in>
6067
           <in>objects.h</in>
6067
           <in>objects.h</in>
6068
+          <in>oe_animation.h</in>
6068
           <in>pkmn_attributes.h</in>
6069
           <in>pkmn_attributes.h</in>
6069
           <in>pkmn_types.h</in>
6070
           <in>pkmn_types.h</in>
6070
           <in>pokemon.h</in>
6071
           <in>pokemon.h</in>
6205
           <in>music_override.c</in>
6206
           <in>music_override.c</in>
6206
         </df>
6207
         </df>
6207
         <df name="overworld">
6208
         <df name="overworld">
6209
+          <in>grass_animation.c</in>
6208
           <in>overworld.c</in>
6210
           <in>overworld.c</in>
6209
           <in>overworld_hooks.S</in>
6211
           <in>overworld_hooks.S</in>
6210
           <in>trainer_run.S</in>
6212
           <in>trainer_run.S</in>

+ 1
- 1
nbproject/private/private.xml View File

60
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/battle_engine/battle_switch_in_hook.S</file>
60
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/battle_engine/battle_switch_in_hook.S</file>
61
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/tm_hm_move_table.S</file>
61
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/tm_hm_move_table.S</file>
62
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/items/item_routines.asm</file>
62
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/items/item_routines.asm</file>
63
+            <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/dns/dns_core.c</file>
63
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/moves/animation_table.S</file>
64
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/moves/animation_table.S</file>
64
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/uturn/u_turn_script.S</file>
65
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/uturn/u_turn_script.S</file>
65
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/item_scripts.S</file>
66
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/item_scripts.S</file>
84
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/gfx_build/sprites/back_sprites/.gitignore</file>
85
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/gfx_build/sprites/back_sprites/.gitignore</file>
85
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/split_physical_special.asm</file>
86
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/split_physical_special.asm</file>
86
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/battle_engine/malloc.asm</file>
87
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/battle_engine/malloc.asm</file>
87
-            <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/string/de/tailwind.txt</file>
88
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/bpre.sym</file>
88
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/bpre.sym</file>
89
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/roost/roost.c</file>
89
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/roost/roost.c</file>
90
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/hazards/hazards_scripts.S</file>
90
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/hazards/hazards_scripts.S</file>

+ 6
- 4
src/dns/dns_core.c View File

1
 #include <bpre.h>
1
 #include <bpre.h>
2
 #include <dns_core.h>
2
 #include <dns_core.h>
3
 
3
 
4
-enum time_type get_time_of_day() {
5
-    volatile u8* time_pointer = (u8*) (0x0203FAB1);
6
-    return *time_pointer;
7
-}
4
+
8
 
5
 
9
 static struct pal_replace lightmap[] = {
6
 static struct pal_replace lightmap[] = {
10
     {(void*) 0x082D4AAC, 9, 10, {
7
     {(void*) 0x082D4AAC, 9, 10, {
41
     }
38
     }
42
 }
39
 }
43
 
40
 
41
+enum time_type get_time_of_day() {
42
+    volatile u8* time_pointer = (u8*) (0x0203FAB1);
43
+    return *time_pointer;
44
+}
45
+
44
 static struct color_shade color_shade_day = {
46
 static struct color_shade color_shade_day = {
45
     {0, 0, 0}, 255
47
     {0, 0, 0}, 255
46
 };
48
 };

+ 51
- 0
src/include/oe_animation.h View File

1
+#ifndef OE_ANIMATION_H
2
+#define OE_ANIMATION_H
3
+
4
+#include <bpre.h>
5
+
6
+struct oe_state
7
+{
8
+    u32 to_x___local_id;
9
+    u32 to_y___local_mapnumber;
10
+    u32 height_lsr_4___local_mapbank;
11
+    u32 field_C;
12
+    u32 local_id_and_mapnumber;
13
+    u32 local_mapbank;
14
+    void* sav1_location;
15
+    u32 field_1C;
16
+};
17
+extern struct oe_state current_oe_state;
18
+
19
+struct npc_state
20
+{
21
+    u8 bitfield;
22
+    u8 field_1;
23
+    u8 field_2;
24
+    u8 field_3;
25
+    u8 oam_id;
26
+    u8 type_id;
27
+    u8 running_behavior;
28
+    u8 is_trainer;
29
+    u8 local_id;
30
+    u8 local_mapnumber;
31
+    u8 local_mapbank;
32
+    u8 height;
33
+    struct coords16 stay_around;
34
+    struct coords16 to;
35
+    struct coords16 from;
36
+    u8 direction;
37
+    u8 movement_area;
38
+    u8 field_1A;
39
+    u8 oamid2;
40
+    u8 an_index;
41
+    u8 sight_distance;
42
+    u8 tile_to;
43
+    u8 tile_from;
44
+    u8 unknown_1;
45
+    u8 unknown_2;
46
+    u8 field_22;
47
+    u8 field_23;
48
+};
49
+
50
+#endif /* OE_ANIMATION_H */
51
+

+ 12
- 0
src/overworld/grass_animation.c View File

1
+#include <bpre.h>
2
+
3
+#include "oe_animation.h"
4
+
5
+void grass_step_general(struct npc_state* npc)
6
+{
7
+    current_oe_state->to_x___local_id = npc_state->to.x;
8
+    current_oe_state->to_y___local_mapnumber = npc_state->to.y;
9
+    
10
+}
11
+
12
+void grass_step_normal()