SBird1337 il y a 7 ans
Parent
révision
b7749db2b1
4 fichiers modifiés avec 83 ajouts et 115 suppressions
  1. 6
    0
      main.asm
  2. 4
    4
      patches/game_engine/quick_hacks.asm
  3. 0
    111
      src/player_interaction/#on_step.S#
  4. 73
    0
      src/test/alabastia.S

+ 6
- 0
main.asm Voir le fichier

@@ -57,6 +57,12 @@
57 57
 .org 0x0815F9B8
58 58
     .word 0x08069ED5 // fix nop1 for now...
59 59
 
60
+.org 0x083522F0
61
+    .word mapheader_alabastia
62
+
63
+.org 0x0834ECC0
64
+    .word mapfooter_alabastia
65
+
60 66
 .org 0x09000000
61 67
 .importobj "object/linked.o"
62 68
 .close

+ 4
- 4
patches/game_engine/quick_hacks.asm Voir le fichier

@@ -72,13 +72,13 @@ PLAYER_S_M EQU 0
72 72
 .word 0x00000000
73 73
 
74 74
 .org 0x08054A08
75
-.byte 0x7
75
+//.byte 0x7
76 76
 
77 77
 .org 0x08054A00
78
-.byte 0x13
78
+//.byte 0x13
79 79
 
80 80
 .org 0x08054A04
81
-.byte 0x5
81
+//.byte 0x5
82 82
 
83 83
 .org 0x08054A06
84
-.byte 0x0
84
+//.byte 0x0

+ 0
- 111
src/player_interaction/#on_step.S# Voir le fichier

@@ -1,111 +0,0 @@
1
-#include <config.h>
2
-
3
-.text
4
-.align 2
5
-.thumb
6
-.global on_step
7
-on_step:
8
-	push {r5}
9
-	bl safari_step
10
-	lsl r0, #0x18
11
-	lsr r0, #0x18
12
-	cmp r0, #1
13
-	beq return_true
14
-	
15
-	ldrh r0, =FLAG_WALK_SCRIPT
16
-	bl read_flag
17
-	cmp r0, #0
18
-	beq check_walking_script
19
-	sub SP, #4
20
-	mov r0, sp
21
-	mov r1, sp
22
-	add r1, #2
23
-	bl get_player_to
24
-	mov r0, sp
25
-	mov r1, sp
26
-	add r1, #2
27
-	ldrh r0, [r0]
28
-	ldrh r1, [r1]
29
-	add sp, #4
30
-	lsl r0, #0x10
31
-	asr r4, r0, #0x10
32
-	lsl r1, #0x10
33
-	asr r5, r1, #0x10
34
-	mov r0, r4
35
-	mov r1, r5
36
-	bl check_block_role
37
-	lsl r0, #0x18
38
-	lsr r0, #0x18
39
-	ldr r1, behavior_walk_table
40
-	lsl r0, #2
41
-	add r0, r1
42
-	ldr r0, [r0]
43
-	mov r2, #0
44
-	sub r2, #1
45
-	cmp r0, r2
46
-	beq check_walking_script
47
-	
48
-	bl execute_script
49
-	b return_false
50
-
51
-check_walking_script:
52
-	
53
-	ldrh r0, =WALK_SCRIPT_VAR
54
-	bl read_var
55
-	ldrh r0, [r0]
56
-	cmp r0, #0
57
-	beq return_false
58
-	sub r0, #1
59
-	ldr r1, script_walk_table
60
-	lsl r0, #2
61
-	add r0, r1
62
-	ldr r0, [r0]
63
-	mov r2, #0
64
-	sub r2, #1
65
-	cmp r0, r2
66
-	beq return_false
67
-	@@@EXECUTE WALKING SCRIPT HERE
68
-	bl execute_script
69
-
70
-return_false:
71
-	mov r0, #0
72
-	b end
73
-
74
-return_true:
75
-	mov r0, #1
76
-end:
77
-	pop {r5}
78
-	pop {r4}
79
-	pop {r1}
80
-	bx r1
81
-
82
-safari_step:
83
-	ldr r3, =0x080A0F0C|1
84
-	bx r3
85
-
86
-get_player_to:
87
-	ldr r3, =0x0805C538|1
88
-	bx r3
89
-
90
-check_block_role:
91
-	ldr r3, =0x08058F78|1
92
-	bx r3
93
-
94
-read_var:
95
-	ldr r3, =var_access
96
-	bx r3
97
-
98
-read_flag:
99
-	ldr r3, =flag_decrypt_func
100
-	bx r3
101
-	
102
-execute_script:
103
-	ldr r3, =0x08069AE4|1
104
-	bx r3
105
-
106
-.align 2
107
-behavior_walk_table:
108
-	.word 0x09700B20
109
-
110
-script_walk_table:
111
-	.word 0x09700F20

+ 73
- 0
src/test/alabastia.S Voir le fichier

@@ -0,0 +1,73 @@
1
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2
+@                                                                                 @
3
+@           file: C:\Users\Philipp\Desktop\sots tilesets\alabastia.tmx            @
4
+@                            converted using tiled2agb                            @
5
+@                             converted on 29.05.2017                             @
6
+@                                                                                 @
7
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8
+
9
+@@@  SECTION: MAPHEADER  @@@
10
+
11
+.align 2
12
+.global mapheader_alabastia
13
+mapheader_alabastia:
14
+	.word mapfooter_alabastia
15
+	.word 0x083B4E50
16
+	.word 0x0816545A
17
+	.word 0x0835276C
18
+	.hword 0x012C @music
19
+	.hword 0x004E @index
20
+	.byte 0x58 @name
21
+	.byte 0x00 @cave
22
+	.byte 0x02 @weather
23
+	.byte 0x01 @light
24
+	.byte 0x01 @unknown
25
+	.hword 0x0006 @showName
26
+	.byte 0x00 @battleStyle
27
+
28
+@@@  SECTION: MAPFOOTER  @@@
29
+
30
+.align 2
31
+.global mapfooter_alabastia
32
+mapfooter_alabastia:
33
+	.word 0x00000018
34
+	.word 0x00000014
35
+	.word mapborderblocks_alabastia
36
+	.word mapblocks_alabastia
37
+	.word 0x082D4A94
38
+	.word 0x082D4AAC
39
+	.byte 2
40
+	.byte 2
41
+	.hword 0
42
+@@@  SECTION: MAPBLOCKS  @@@
43
+.align 2
44
+
45
+.global mapblocks_alabastia
46
+mapblocks_alabastia:
47
+	.hword 0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x32A6,0x32A7,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041E,0x041F
48
+	.hword 0x0414,0x0415,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x32AE,0x32AF,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0416,0x0417
49
+	.hword 0x041C,0x041D,0x32A6,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x3285,0x3286,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x328F,0x041E,0x041F
50
+	.hword 0x0414,0x0415,0x32AE,0x3296,0x3296,0x3281,0x3282,0x3282,0x3282,0x3283,0x3296,0x3296,0x3296,0x3296,0x3281,0x3282,0x3282,0x3282,0x3283,0x3296,0x3296,0x3297,0x0416,0x0417
51
+	.hword 0x041C,0x041D,0x32AE,0x32C7,0x329E,0x0689,0x068A,0x068A,0x068A,0x068B,0x329E,0x329E,0x329E,0x329E,0x0689,0x068A,0x068A,0x068A,0x068B,0x32C6,0x3296,0x3297,0x041E,0x041F
52
+	.hword 0x0414,0x0415,0x32AE,0x3297,0x3001,0x0691,0x0692,0x0692,0x0693,0x0694,0x300E,0x300F,0x3008,0x3001,0x0691,0x0692,0x0692,0x0693,0x0694,0x3295,0x3296,0x3297,0x0416,0x0417
53
+	.hword 0x041C,0x041D,0x32AE,0x3297,0x32A5,0x0698,0x0699,0x069A,0x069B,0x069C,0x041E,0x041F,0x3008,0x32A5,0x0698,0x0699,0x069A,0x069B,0x069C,0x3295,0x3296,0x3297,0x041E,0x041F
54
+	.hword 0x0414,0x0415,0x32AE,0x3297,0x06AD,0x06A0,0x06A3,0x06A2,0x06A1,0x06A4,0x0426,0x0427,0x3008,0x06AD,0x06A0,0x06A3,0x06A2,0x06A1,0x06A4,0x3295,0x3296,0x3297,0x0416,0x0417
55
+	.hword 0x041C,0x041D,0x32AE,0x32BF,0x328E,0x32BE,0x3296,0x32BF,0x328E,0x328E,0x328E,0x328E,0x328E,0x328E,0x32BE,0x3296,0x32BF,0x328E,0x328E,0x32BE,0x3296,0x3297,0x041E,0x041F
56
+	.hword 0x0414,0x0415,0x32AE,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x32A8,0x32A9,0x32A9,0x32A9,0x32A9,0x32BD,0x32B5,0x3296,0x3297,0x0416,0x0417
57
+	.hword 0x041C,0x041D,0x32AE,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x32C7,0x06B0,0x06B1,0x06B1,0x06B1,0x06B1,0x06B3,0x06B4,0x3296,0x3297,0x041E,0x041F
58
+	.hword 0x0414,0x0415,0x32AE,0x3296,0x32C7,0x0684,0x0684,0x0684,0x0684,0x0402,0x32C6,0x3296,0x3297,0x06B8,0x06B9,0x06B9,0x06B9,0x06B9,0x06BB,0x06BC,0x32CE,0x3297,0x0416,0x0417
59
+	.hword 0x041C,0x041D,0x32AE,0x3296,0x3297,0x3004,0x3004,0x3004,0x3004,0x3001,0x3295,0x3296,0x3297,0x06C0,0x06C1,0x06D0,0x06C2,0x06C3,0x06C4,0x06C5,0x32AE,0x3297,0x041E,0x041F
60
+	.hword 0x0414,0x0415,0x32AE,0x3296,0x3297,0x3004,0x3004,0x3004,0x3004,0x3001,0x3295,0x3296,0x3297,0x06C8,0x06C9,0x06D8,0x06AC,0x06CB,0x06CC,0x06CD,0x32AE,0x3297,0x0416,0x0417
61
+	.hword 0x041C,0x041D,0x32AE,0x3296,0x3297,0x0403,0x3001,0x3001,0x3001,0x3001,0x3295,0x3296,0x32BF,0x328E,0x328E,0x32BE,0x3296,0x32BF,0x328E,0x328E,0x3285,0x3297,0x041E,0x041F
62
+	.hword 0x0414,0x0415,0x32AE,0x3296,0x32BF,0x328E,0x328E,0x328E,0x328E,0x328E,0x32BE,0x3296,0x32C7,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x32C6,0x3296,0x3297,0x0416,0x0417
63
+	.hword 0x041C,0x041D,0x32AE,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3290,0x0687,0x0687,0x0687,0x0687,0x0687,0x0687,0x32BE,0x3296,0x3297,0x041E,0x041F
64
+	.hword 0x0414,0x0415,0x32B6,0x329E,0x329E,0x329E,0x329E,0x32D1,0x3123,0x3123,0x32D2,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3296,0x3297,0x0416,0x0417
65
+	.hword 0x041C,0x041D,0x3004,0x3001,0x3004,0x3001,0x3001,0x312A,0x312B,0x312B,0x312C,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x329E,0x329F,0x041E,0x041F
66
+	.hword 0x0414,0x0415,0x300E,0x300F,0x300E,0x300F,0x3001,0x312A,0x312B,0x312B,0x312C,0x3001,0x3004,0x3001,0x3001,0x3001,0x3004,0x3001,0x300E,0x300F,0x300E,0x300F,0x0416,0x0417
67
+@@@  SECTION: BORDERBLOCKS  @@@
68
+.align 2
69
+
70
+.global mapborderblocks_alabastia
71
+mapborderblocks_alabastia:
72
+	.hword 0x001C,0x001D
73
+	.hword 0x0014,0x0015