Browse Source

added overworld processing code

SBird1337 8 years ago
parent
commit
cfe9fc41f2

+ 2
- 0
gfx_build/overworlds/.gitignore View File

1
+*.s
2
+*.o

+ 7
- 1
nbproject/configurations.xml View File

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

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

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

+ 6
- 0
patches/overworlds/trainer.asm View File

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

+ 12
- 1
sprites.makefile View File

19
 SPRITE_FRONT_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/front_sprites/,$(notdir $(NORMAL_PNG:.png=.o)))
19
 SPRITE_FRONT_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/front_sprites/,$(notdir $(NORMAL_PNG:.png=.o)))
20
 SPRITE_BACK_OBJ = $(addprefix $(GFX_BUILD_DIR)/sprites/back_sprites/,$(notdir $(NORMAL_PNG:.png=.o)))
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
 CASTFORM_PNG = $(ASSET_ROOT)/pkmn_sprites/castform/castform.png
25
 CASTFORM_PNG = $(ASSET_ROOT)/pkmn_sprites/castform/castform.png
23
 NORMAL_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_normal_pal.o
26
 NORMAL_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_normal_pal.o
24
 SHINY_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_shiny_pal.o
27
 SHINY_CASTFORM_PAL_OBJ = $(GFX_BUILD_DIR)/sprites/castform/castform_shiny_pal.o
35
 	rm -f $(GFX_BUILD_DIR)/sprites/shiny_pal/*
38
 	rm -f $(GFX_BUILD_DIR)/sprites/shiny_pal/*
36
 	rm -f $(GFX_BUILD_DIR)/sprites/front_sprites/*
39
 	rm -f $(GFX_BUILD_DIR)/sprites/front_sprites/*
37
 	rm -f $(GFX_BUILD_DIR)/sprites/back_sprites/*
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
 	rm -f $(TMP_FILE2)
44
 	rm -f $(TMP_FILE2)
41
 	rm -f $(TMP_FILE)
45
 	rm -f $(TMP_FILE)
42
 	for file in $^;\
46
 	for file in $^;\
50
 	done
54
 	done
51
 	mv $(TMP_FILE) $@
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
 # Normal Palette Targets
65
 # Normal Palette Targets
55
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s
66
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s

+ 24
- 0
src/overworld/trainer_run.S View File

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
+