Explorar el Código

grass animation stuff

SBird1337 hace 8 años
padre
commit
1e2dc78720

+ 6
- 0
nbproject/configurations.xml Ver fichero

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

+ 2
- 0
nbproject/private/configurations.xml Ver fichero

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

+ 1
- 1
nbproject/private/private.xml Ver fichero

@@ -60,6 +60,7 @@
60 60
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/battle_engine/battle_switch_in_hook.S</file>
61 61
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/tm_hm_move_table.S</file>
62 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 64
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/moves/animation_table.S</file>
64 65
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/uturn/u_turn_script.S</file>
65 66
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/data/item/item_scripts.S</file>
@@ -84,7 +85,6 @@
84 85
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/gfx_build/sprites/back_sprites/.gitignore</file>
85 86
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/patches/split_physical_special.asm</file>
86 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 88
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/bpre.sym</file>
89 89
             <file>file:/C:/cygwin64/home/auerp/sots/source_of_the_sovereign/src/moves/roost/roost.c</file>
90 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 Ver fichero

@@ -1,10 +1,7 @@
1 1
 #include <bpre.h>
2 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 6
 static struct pal_replace lightmap[] = {
10 7
     {(void*) 0x082D4AAC, 9, 10, {
@@ -41,6 +38,11 @@ void overworld_loop() {
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 46
 static struct color_shade color_shade_day = {
45 47
     {0, 0, 0}, 255
46 48
 };

+ 51
- 0
src/include/oe_animation.h Ver fichero

@@ -0,0 +1,51 @@
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 Ver fichero

@@ -0,0 +1,12 @@
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()