Преглед изворни кода

added overworld processing code

SBird1337 пре 8 година
родитељ
комит
cfe9fc41f2

+ 2
- 0
gfx_build/overworlds/.gitignore Прегледај датотеку

@@ -0,0 +1,2 @@
1
+*.s
2
+*.o

+ 7
- 1
nbproject/configurations.xml Прегледај датотеку

@@ -3775,6 +3775,7 @@
3775 3775
         </df>
3776 3776
         <df name="overworlds">
3777 3777
           <in>overworld.asm</in>
3778
+          <in>trainer.asm</in>
3778 3779
         </df>
3779 3780
         <df name="pokemon_data">
3780 3781
           <in>altitude_table.asm</in>
@@ -4670,6 +4671,7 @@
4670 4671
         <df name="overworld">
4671 4672
           <in>overworld.c</in>
4672 4673
           <in>overworld_hooks.S</in>
4674
+          <in>trainer_run.S</in>
4673 4675
         </df>
4674 4676
         <df name="player_interaction">
4675 4677
           <in>jump_behavior.S</in>
@@ -4727,7 +4729,7 @@
4727 4729
       <makefileType>
4728 4730
         <makeTool>
4729 4731
           <buildCommandWorkingDir>.</buildCommandWorkingDir>
4730
-          <buildCommand>${MAKE} -f makefile LAN=DE -j8</buildCommand>
4732
+          <buildCommand>${MAKE} -f makefile LAN=DE -j4</buildCommand>
4731 4733
           <cleanCommand>${MAKE} -f makefile clean</cleanCommand>
4732 4734
           <executablePath></executablePath>
4733 4735
         </makeTool>
@@ -23435,6 +23437,8 @@
23435 23437
       </item>
23436 23438
       <item path="patches/overworlds/overworld.asm" ex="false" tool="4" flavor2="0">
23437 23439
       </item>
23440
+      <item path="patches/overworlds/trainer.asm" ex="false" tool="4" flavor2="0">
23441
+      </item>
23438 23442
       <item path="patches/pokemon_data/altitude_table.asm"
23439 23443
             ex="false"
23440 23444
             tool="4"
@@ -27344,6 +27348,8 @@
27344 27348
       </item>
27345 27349
       <item path="src/overworld/overworld_hooks.S" ex="false" tool="4" flavor2="0">
27346 27350
       </item>
27351
+      <item path="src/overworld/trainer_run.S" ex="false" tool="4" flavor2="0">
27352
+      </item>
27347 27353
       <item path="src/player_interaction/jump_behavior.S"
27348 27354
             ex="false"
27349 27355
             tool="4"

+ 12
- 0
nbproject/private/configurations.xml Прегледај датотеку

@@ -51,6 +51,8 @@
51 51
       <df name="gfx_build">
52 52
         <df name="icons">
53 53
         </df>
54
+        <df name="overworlds">
55
+        </df>
54 56
         <df name="sprites">
55 57
           <df name="back_sprites">
56 58
             <in>normal_0000.s</in>
@@ -3852,6 +3854,7 @@
3852 3854
         </df>
3853 3855
         <df name="overworlds">
3854 3856
           <in>overworld.asm</in>
3857
+          <in>trainer.asm</in>
3855 3858
         </df>
3856 3859
         <df name="pokemon_data">
3857 3860
           <in>altitude_table.asm</in>
@@ -3887,6 +3890,8 @@
3887 3890
       </df>
3888 3891
       <df name="sots-private">
3889 3892
         <df name="assets">
3893
+          <df name="overworld">
3894
+          </df>
3890 3895
           <df name="pkmn_icons">
3891 3896
           </df>
3892 3897
           <df name="pkmn_sprites">
@@ -5573,6 +5578,7 @@
5573 5578
         <df name="overworld">
5574 5579
           <in>overworld.c</in>
5575 5580
           <in>overworld_hooks.S</in>
5581
+          <in>trainer_run.S</in>
5576 5582
         </df>
5577 5583
         <df name="player_interaction">
5578 5584
           <in>jump_behavior.S</in>
@@ -5593,8 +5599,14 @@
5593 5599
       </df>
5594 5600
       <df name="string">
5595 5601
         <df name="de">
5602
+          <in>hazards.S</in>
5603
+          <in>item_data.S</in>
5604
+          <in>item_descriptions.S</in>
5605
+          <in>move_descriptions.S</in>
5596 5606
           <in>move_descriptions.txt</in>
5607
+          <in>move_names.S</in>
5597 5608
           <in>move_names.txt</in>
5609
+          <in>move_strings.S</in>
5598 5610
         </df>
5599 5611
         <df name="en">
5600 5612
           <in>move_strings.txt</in>

+ 6
- 0
patches/overworlds/trainer.asm Прегледај датотеку

@@ -0,0 +1,6 @@
1
+.org 0x08081B84 
2
+ldr r1, =trainer_run_code+1
3
+bx r1
4
+.pool
5
+
6
+

+ 12
- 1
sprites.makefile Прегледај датотеку

@@ -19,6 +19,9 @@ SHINY_PAL_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/shiny_pal/,$(notdir $(SHINY
19 19
 SPRITE_FRONT_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/front_sprites/,$(notdir $(NORMAL_PNG:.png=.o)))
20 20
 SPRITE_BACK_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/back_sprites/,$(notdir $(NORMAL_PNG:.png=.o)))
21 21
 
22
+OW_PNG = $(sort $(wildcard $(ASSET_ROOT)/overworld/*.png))
23
+OW_OBJ = $(addprefix $(GFX_BUILD_DIR)/overworlds/,$(notdir $(OW_PNG:.png=.o)))
24
+
22 25
 CASTFORM_PNG = $(ASSET_ROOT)/pkmn_sprites/castform/castform.png
23 26
 NORMAL_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_normal_pal.o
24 27
 SHINY_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_shiny_pal.o
@@ -35,8 +38,9 @@ clean:
35 38
 	rm -f $(GFX_BUILD_DIR)/sprites/shiny_pal/*
36 39
 	rm -f $(GFX_BUILD_DIR)/sprites/front_sprites/*
37 40
 	rm -f $(GFX_BUILD_DIR)/sprites/back_sprites/*
41
+	rm -f $(GFX_BUILD_DIR)/overworlds/*
38 42
 
39
-$(SPRITES_BINARY): $(NORMAL_PAL_OBJ) $(SHINY_PAL_OBJ) $(SPRITE_FRONT_OBJ) $(SPRITE_BACK_OBJ) $(NORMAL_CASTFORM_PAL_OBJ) $(SHINY_CASTFORM_PAL_OBJ) $(CASTFORM_FRONT_OBJ) $(CASTFORM_BACK_OBJ)
43
+$(SPRITES_BINARY): $(NORMAL_PAL_OBJ) $(SHINY_PAL_OBJ) $(SPRITE_FRONT_OBJ) $(SPRITE_BACK_OBJ) $(NORMAL_CASTFORM_PAL_OBJ) $(SHINY_CASTFORM_PAL_OBJ) $(CASTFORM_FRONT_OBJ) $(CASTFORM_BACK_OBJ) $(OW_OBJ)
40 44
 	rm -f $(TMP_FILE2)
41 45
 	rm -f $(TMP_FILE)
42 46
 	for file in $^;\
@@ -50,6 +54,13 @@ $(SPRITES_BINARY): $(NORMAL_PAL_OBJ) $(SHINY_PAL_OBJ) $(SPRITE_FRONT_OBJ) $(SPRI
50 54
 	done
51 55
 	mv $(TMP_FILE) $@
52 56
 
57
+# OW Targets
58
+$(GFX_BUILD_DIR)/overworlds/%.o: $(GFX_BUILD_DIR)/overworlds/%.s
59
+	$(AS) -o $@ $<
60
+
61
+.PRECIOUS: $(GFX_BUILD_DIR)/overworlds/%.s
62
+$(GFX_BUILD_DIR)/overworlds/%.s: $(ASSET_ROOT)/overworld/%.png
63
+	grit $< -fts -fh! -gt -gB4 -gz! -p -pzl -m! -pu16
53 64
 
54 65
 # Normal Palette Targets
55 66
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s

+ 24
- 0
src/overworld/trainer_run.S Прегледај датотеку

@@ -0,0 +1,24 @@
1
+.align 2
2
+.thumb
3
+.text
4
+
5
+@TODO: pretty this up...
6
+.global trainer_run_code
7
+trainer_run_code:
8
+	.byte 240,181,  5, 28,  0,240, 40,248,  0, 46, 30,208,  0, 40, 30,208
9
+	.byte   7, 28,  0,240, 63,248,  1, 40, 23,208,  6,180, 32, 28,  0,240
10
+	.byte 101,248,  3, 28,  6,188,  0, 40, 15,208, 40, 28, 49, 28, 14,180
11
+	.byte   0,240, 52,248, 56, 28,  0,240, 85,248, 14,188, 89, 30, 32, 28
12
+	.byte   0,240, 88,248,  1, 32,240,189,  0,  0,  0, 32,240,189, 40, 28
13
+	.byte   0, 73,  8, 71,141, 27,  8,  8,  0,181, 12, 73,194,  0, 18, 24
14
+	.byte 146,  0, 82, 24, 20, 28, 16,122,  9, 73, 73,104, 10,120, 73,104
15
+	.byte  11,120,131, 66,  4,208, 24, 49,  1, 58,  0, 42,  4,208,247,231
16
+	.byte   2, 28,200,138, 14,105,  0,189,  0, 38,  0,189, 56,110,  3,  2
17
+	.byte 252,109,  3,  2,  0, 73,  8, 71,209,230,  6,  8, 16,181, 10, 75
18
+	.byte  26,112, 10, 76, 32,128, 10, 72, 65, 96, 10, 74,  2, 96, 37, 34
19
+	.byte   1, 56,  2,112,106, 34,  1, 56,  2,112,  0,240, 15,248,  6, 73
20
+	.byte   1, 32,  8,112, 16,189,  0,  0,116, 80,  0,  3,210,112,  3,  2
21
+	.byte 244,252,  3,  2, 55,  0, 39,  5,156, 15,  0,  3,  0, 73,  8, 71
22
+	.byte 229,154,  6,  8,  0, 73,  8, 71,129,230,  6,  8
23
+
24
+