ソースを参照

fix trainer class song ids

ipatix 7 年 前
コミット
f30ee89aac
共有2 個のファイルを変更した482 個の追加164 個の削除を含む
  1. 110
    124
      src/include/config.h
  2. 372
    40
      src/music/battle_music_lookup.c

+ 110
- 124
src/include/config.h ファイルの表示

@@ -1,124 +1,110 @@
1
-#include "pkmn_types.h"
2
-
3
-#ifndef CONFIG_S_
4
-#define CONFIG_S_
5
-
6
-#define MAGIC_BOUNCE_FLAG	0x0203FFFD
7
-#define OBJ_1_TEMP			0x0203FFFE
8
-#define OBJ_2_TEMP			0x0203FFFF
9
-
10
-
11
-/*Variables regarding battle background loading*/
12
-#define NORMAL_VAR	0x4000
13
-#define SEA_VAR	0x4001
14
-
15
-/*Variables and Tags regarding mugshots*/
16
-#define MUGHSOT_1_TABLE 0x5000
17
-#define MUGSHOT_1_X 0x5001
18
-#define MUGSHOT_1_Y 0x5002
19
-#define MUGSHOT_1_TAG 0x1337
20
-
21
-#define MUGHSOT_2_TABLE 0x5003
22
-#define MUGSHOT_2_X 0x5004
23
-#define MUGSHOT_2_Y 0x5005
24
-#define MUGSHOT_2_TAG 0x1338
25
-
26
-/*Variable for special control*/
27
-#define CALLASM_VAR 0x5006
28
-
29
-/*Variables for camera control*/
30
-#define CAMERA_VAR_X 0x5007
31
-#define CAMERA_VAR_Y 0x5008
32
-
33
-/*Variables for walking script control*/
34
-#define WALK_SCRIPT_VAR 0x5009
35
-
36
-/*Variable for custom text*/
37
-#define TEXT_VAR 0x500C
38
-
39
-/*Variable for controlling evolutions*/
40
-#define EVO_VAR 0x500D
41
-
42
-/*Variables to control the music overrides*/
43
-#define VAR_FROM_1 0x51FA
44
-#define VAR_FROM_2 0x51FB
45
-#define VAR_FROM_3 0x51FC
46
-#define VAR_TO_1 0x51FD
47
-#define VAR_TO_2 0x51FE
48
-#define VAR_TO_3 0x51FF
49
-
50
-/*Flag to enable the music overrides*/
51
-#define FLAG_SKIP_BATTLE_MUSIC 0x742
52
-
53
-/*Trainer encounter IDs*/
54
-#define TRAINER_EYE_MUS_BOY         0
55
-#define TRAINER_EYE_MUS_GIRL        1
56
-#define TRAINER_EYE_MUS_KID         2
57
-#define TRAINER_EYE_MUS_HIKER       3
58
-#define TRAINER_EYE_MUS_SAILOR      4
59
-#define TRAINER_EYE_MUS_ELECTRIC    5
60
-#define TRAINER_EYE_MUS_PSYCHIC     6
61
-#define TRAINER_EYE_MUS_SWIMMER     7
62
-#define TRAINER_EYE_MUS_ACE         8
63
-#define TRAINER_EYE_MUS_ELITE       9
64
-#define TRAINER_EYE_MUS_CHAMP       10
65
-#define TRAINER_EYE_MUS_TT_GRUNT_M  11
66
-#define TRAINER_EYE_MUS_TT_GRUNT_F  12
67
-#define TRAINER_EYE_MUS_TT_ADMIN    13
68
-#define TRAINER_EYE_MUS_TT_BOSS_1   14
69
-#define TRAINER_EYE_MUS_TT_BOSS_2   15
70
-
71
-/*Flag to deactivate transparent textboxes*/
72
-#define FLAG_ACTIVATE		0x900
73
-#define FLAG_WALK_SCRIPT	0x901
74
-#define FLAG_DEOXYS_AURA        0x902
75
-
76
-/*Effect IDs controlling various in-battle item effects etc.*/
77
-#define ITEM_EFFECT_SMOOTH_ROCK	0x48
78
-#define ITEM_EFFECT_DAMP_ROCK	0x49
79
-#define ITEM_EFFECT_HEAT_ROCK	0x4A
80
-#define ITEM_EFFECT_ICY_ROCK	0x4B
81
-#define ITEM_EFFECT_FLAME_ORB	0x4C
82
-#define ITEM_EFFECT_TOXIC_ORB	0x4D
83
-#define ITEM_EFFECT_EXPERT_BELT	0x4E
84
-
85
-/*Battlescript command definitions (Do not edit unless changing the command table [bs_command_table.S])*/
86
-#define BS_ATTACKSTRING			0x02
87
-#define BS_PPREDUCE				0x03
88
-
89
-#define BS_ATTACKANIMATION		0x09
90
-#define BS_WAITANIMATION		0x0A
91
-#define BS_PRINTSTRING			0x10
92
-#define BS_WAITMESSAGE			0x12
93
-#define BS_JUMPIFSTATUS			0x1C
94
-#define BS_JUMPIFABILITY		0x1E
95
-#define BS_JUMPIFSTAT			0x20
96
-#define BS_JUMPIFWORD			0x2B
97
-#define BS_GOTO					0x28
98
-#define BS_JUMPIFARRAYNOTEQUAL	0x2D
99
-#define BS_SETBYTE				0x2E
100
-#define BS_ORWORD				0x35
101
-#define BS_PAUSE 				0x39
102
-#define BS_WAITSTATE			0x3A
103
-#define BS_RETURN				0x3C
104
-#define BS_END3					0x3F
105
-#define BS_CALL					0x41
106
-#define BS_PLAYANIMATION		0x45
107
-#define BS_PLAYSTATANIM			0x48
108
-#define BS_SWITCH1				0x4C
109
-#define BS_SWITCH2				0x4D
110
-#define BS_SWITCH3				0x4E
111
-#define BS_NOP3					0x83
112
-#define BS_STATBUFFCHANGE		0x89
113
-#define BS_CASTFORMSWITCH		0xE7
114
-#define BS_CALLASM				0xF8
115
-#define BS_CURESTATUS			0xF9
116
-#define BS_SETWORD				0xFA
117
-
118
-/*For hacking the miracle eye command into set foresight*/
119
-/*Comment out the first define to deactivate the miracleeye injection in the command table*/
120
-
121
-/*Some move effect IDs important for correct implementation*/
122
-#define MOVE_EFFECT_SACRED_SWORD	0xFF
123
-
124
-#endif
1
+#include "pkmn_types.h"
2
+
3
+#ifndef CONFIG_S_
4
+#define CONFIG_S_
5
+
6
+#define MAGIC_BOUNCE_FLAG       0x0203FFFD
7
+#define OBJ_1_TEMP              0x0203FFFE
8
+#define OBJ_2_TEMP              0x0203FFFF
9
+
10
+
11
+/*Variables regarding battle background loading*/
12
+#define NORMAL_VAR              0x4000
13
+#define SEA_VAR                 0x4001
14
+
15
+/*Variables and Tags regarding mugshots*/
16
+#define MUGHSOT_1_TABLE         0x5000
17
+#define MUGSHOT_1_X             0x5001
18
+#define MUGSHOT_1_Y             0x5002
19
+#define MUGSHOT_1_TAG           0x1337
20
+
21
+#define MUGHSOT_2_TABLE         0x5003
22
+#define MUGSHOT_2_X             0x5004
23
+#define MUGSHOT_2_Y             0x5005
24
+#define MUGSHOT_2_TAG           0x1338
25
+
26
+/*Variable for special control*/
27
+#define CALLASM_VAR             0x5006
28
+
29
+/*Variables for camera control*/
30
+#define CAMERA_VAR_X            0x5007
31
+#define CAMERA_VAR_Y            0x5008
32
+
33
+/*Variables for walking script control*/
34
+#define WALK_SCRIPT_VAR         0x5009
35
+
36
+/*Variable for custom text*/
37
+#define TEXT_VAR                0x500C
38
+
39
+/*Variable for controlling evolutions*/
40
+#define EVO_VAR                 0x500D
41
+
42
+#define HEALING_BANK_MAP_VAR    0x500E
43
+#define HEALING_X_VAR           0x500F
44
+#define HEALING_Y_VAR           0x5010
45
+
46
+/*Variables to control the music overrides*/
47
+#define VAR_FROM_1              0x51FA
48
+#define VAR_FROM_2              0x51FB
49
+#define VAR_FROM_3              0x51FC
50
+#define VAR_TO_1                0x51FD
51
+#define VAR_TO_2                0x51FE
52
+#define VAR_TO_3                0x51FF
53
+
54
+/*Flag to enable the music overrides*/
55
+#define FLAG_SKIP_BATTLE_MUSIC  0x742
56
+
57
+/*Flag to deactivate transparent textboxes*/
58
+#define FLAG_ACTIVATE           0x900
59
+#define FLAG_WALK_SCRIPT        0x901
60
+#define FLAG_DEOXYS_AURA        0x902
61
+
62
+/*Effect IDs controlling various in-battle item effects etc.*/
63
+#define ITEM_EFFECT_SMOOTH_ROCK 0x48
64
+#define ITEM_EFFECT_DAMP_ROCK   0x49
65
+#define ITEM_EFFECT_HEAT_ROCK   0x4A
66
+#define ITEM_EFFECT_ICY_ROCK    0x4B
67
+#define ITEM_EFFECT_FLAME_ORB   0x4C
68
+#define ITEM_EFFECT_TOXIC_ORB   0x4D
69
+#define ITEM_EFFECT_EXPERT_BELT 0x4E
70
+
71
+/*Battlescript command definitions (Do not edit unless changing the command table [bs_command_table.S])*/
72
+#define BS_ATTACKSTRING         0x02
73
+#define BS_PPREDUCE             0x03
74
+
75
+#define BS_ATTACKANIMATION      0x09
76
+#define BS_WAITANIMATION        0x0A
77
+#define BS_PRINTSTRING          0x10
78
+#define BS_WAITMESSAGE          0x12
79
+#define BS_JUMPIFSTATUS         0x1C
80
+#define BS_JUMPIFABILITY        0x1E
81
+#define BS_JUMPIFSTAT           0x20
82
+#define BS_JUMPIFWORD           0x2B
83
+#define BS_GOTO                 0x28
84
+#define BS_JUMPIFARRAYNOTEQUAL  0x2D
85
+#define BS_SETBYTE              0x2E
86
+#define BS_ORWORD               0x35
87
+#define BS_PAUSE                0x39
88
+#define BS_WAITSTATE            0x3A
89
+#define BS_RETURN               0x3C
90
+#define BS_END3                 0x3F
91
+#define BS_CALL                 0x41
92
+#define BS_PLAYANIMATION        0x45
93
+#define BS_PLAYSTATANIM         0x48
94
+#define BS_SWITCH1              0x4C
95
+#define BS_SWITCH2              0x4D
96
+#define BS_SWITCH3              0x4E
97
+#define BS_NOP3                 0x83
98
+#define BS_STATBUFFCHANGE       0x89
99
+#define BS_CASTFORMSWITCH       0xE7
100
+#define BS_CALLASM              0xF8
101
+#define BS_CURESTATUS           0xF9
102
+#define BS_SETWORD              0xFA
103
+
104
+/*For hacking the miracle eye command into set foresight*/
105
+/*Comment out the first define to deactivate the miracleeye injection in the command table*/
106
+
107
+/*Some move effect IDs important for correct implementation*/
108
+#define MOVE_EFFECT_SACRED_SWORD    0xFF
109
+
110
+#endif

+ 372
- 40
src/music/battle_music_lookup.c ファイルの表示

@@ -16,53 +16,365 @@ u16 mhk_intro_music_id_to_song(u8 introid) {
16 16
     u16 res = 0;
17 17
 
18 18
     switch (introid) {
19
-        case TRAINER_EYE_MUS_BOY:
20
-            res = 350;
19
+        case 0:
20
+            res = 480;
21 21
             break;
22
-        case TRAINER_EYE_MUS_GIRL:
23
-            res = 351;
22
+        case 1:
23
+            res = 480;
24 24
             break;
25
-        case TRAINER_EYE_MUS_KID:
26
-            res = 352;
25
+        case 2:
26
+            res = 480;
27 27
             break;
28
-        case TRAINER_EYE_MUS_HIKER:
29
-            res = 353;
28
+        case 3:
29
+            res = 471;
30 30
             break;
31
-        case TRAINER_EYE_MUS_SAILOR:
32
-            res = 354;
31
+        case 4:
32
+            res = 471;
33 33
             break;
34
-        case TRAINER_EYE_MUS_ELECTRIC:
35
-            res = 355;
34
+        case 5:
35
+            res = 480;
36 36
             break;
37
-        case TRAINER_EYE_MUS_PSYCHIC:
38
-            res = 356;
37
+        case 6:
38
+            res = 487;
39 39
             break;
40
-        case TRAINER_EYE_MUS_SWIMMER:
41
-            res = 357;
40
+        case 7:
41
+            res = 476;
42 42
             break;
43
-        case TRAINER_EYE_MUS_ACE:
44
-            res = 358;
43
+        case 8:
44
+            res = 471;
45 45
             break;
46
-        case TRAINER_EYE_MUS_ELITE:
47
-            res = 359;
46
+        case 9:
47
+            res = 471;
48 48
             break;
49
-        case TRAINER_EYE_MUS_CHAMP:
50
-            res = 360;
49
+        case 10:
50
+            res = 480;
51 51
             break;
52
-        case TRAINER_EYE_MUS_TT_GRUNT_M:
53
-            res = 361;
52
+        case 11:
53
+            res = 480;
54 54
             break;
55
-        case TRAINER_EYE_MUS_TT_GRUNT_F:
56
-            res = 362;
55
+        case 12:
56
+            res = 480;
57 57
             break;
58
-        case TRAINER_EYE_MUS_TT_ADMIN:
59
-            res = 363;
58
+        case 13:
59
+            res = 480;
60 60
             break;
61
-        case TRAINER_EYE_MUS_TT_BOSS_1:
62
-            res = 364;
61
+        case 14:
62
+            res = 488;
63 63
             break;
64
-        case TRAINER_EYE_MUS_TT_BOSS_2:
65
-            res = 365;
64
+        case 15:
65
+            res = 475;
66
+            break;
67
+        case 16:
68
+            res = 475;
69
+            break;
70
+        case 17:
71
+            res = 470;
72
+            break;
73
+        case 18:
74
+            res = 495;
75
+            break;
76
+        case 19:
77
+            res = 480;
78
+            break;
79
+        case 20:
80
+            res = 475;
81
+            break;
82
+        case 21:
83
+            res = 481;
84
+            break;
85
+        case 22:
86
+            res = 471;
87
+            break;
88
+        case 23:
89
+            res = 471;
90
+            break;
91
+        case 24:
92
+            res = 473;
93
+            break;
94
+        case 25:
95
+            res = 473;
96
+            break;
97
+        case 26:
98
+            res = 480;
99
+            break;
100
+        case 27:
101
+            res = 480;
102
+            break;
103
+        case 28:
104
+            res = 491;
105
+            break;
106
+        case 29:
107
+            res = 488;
108
+            break;
109
+        case 30:
110
+            res = 488;
111
+            break;
112
+        case 31:
113
+            res = 488;
114
+            break;
115
+        case 32:
116
+            res = 491;
117
+            break;
118
+        case 33:
119
+            res = 490;
120
+            break;
121
+        case 34:
122
+            res = 472;
123
+            break;
124
+        case 35:
125
+            res = 472;
126
+            break;
127
+        case 36:
128
+            res = 471;
129
+            break;
130
+        case 37:
131
+            res = 492;
132
+            break;
133
+        case 38:
134
+            res = 492;
135
+            break;
136
+        case 39:
137
+            res = 490;
138
+            break;
139
+        case 40:
140
+            res = 472;
141
+            break;
142
+        case 41:
143
+            res = 491;
144
+            break;
145
+        case 42:
146
+            res = 480;
147
+            break;
148
+        case 43:
149
+            res = 493;
150
+            break;
151
+        case 44:
152
+            res = 495;
153
+            break;
154
+        case 45:
155
+            res = 495;
156
+            break;
157
+        case 46:
158
+            res = 472;
159
+            break;
160
+        case 47:
161
+            res = 473;
162
+            break;
163
+        case 48:
164
+            res = 472;
165
+            break;
166
+        case 49:
167
+            res = 480;
168
+            break;
169
+        case 50:
170
+            res = 470;
171
+            break;
172
+        case 51:
173
+            res = 470;
174
+            break;
175
+        case 52:
176
+            res = 470;
177
+            break;
178
+        case 53:
179
+            res = 494;
180
+            break;
181
+        case 54:
182
+            res = 494;
183
+            break;
184
+        case 55:
185
+            res = 494;
186
+            break;
187
+        case 56:
188
+            res = 494;
189
+            break;
190
+        case 57:
191
+            res = 494;
192
+            break;
193
+        case 58:
194
+            res = 494;
195
+            break;
196
+        case 59:
197
+            res = 494;
198
+            break;
199
+        case 60:
200
+            res = 494;
201
+            break;
202
+        case 61:
203
+            res = 494;
204
+            break;
205
+        case 62:
206
+            res = 494;
207
+            break;
208
+        case 63:
209
+            res = 473;
210
+            break;
211
+        case 64:
212
+            res = 473;
213
+            break;
214
+        case 65:
215
+            res = 470;
216
+            break;
217
+        case 66:
218
+            res = 470;
219
+            break;
220
+        case 67:
221
+            res = 490;
222
+            break;
223
+        case 68:
224
+            res = 491;
225
+            break;
226
+        case 69:
227
+            res = 490;
228
+            break;
229
+        case 70:
230
+            res = 490;
231
+            break;
232
+        case 71:
233
+            res = 491;
234
+            break;
235
+        case 72:
236
+            res = 480;
237
+            break;
238
+        case 73:
239
+            res = 495;
240
+            break;
241
+        case 74:
242
+            res = 490;
243
+            break;
244
+        case 75:
245
+            res = 474;
246
+            break;
247
+        case 76:
248
+            res = 476;
249
+            break;
250
+        case 77:
251
+            res = 476;
252
+            break;
253
+        case 78:
254
+            res = 477;
255
+            break;
256
+        case 79:
257
+            res = 477;
258
+            break;
259
+        case 80:
260
+            res = 496;
261
+            break;
262
+        case 81:
263
+            res = 475;
264
+            break;
265
+        case 82:
266
+            res = 475;
267
+            break;
268
+        case 83:
269
+            res = 472;
270
+            break;
271
+        case 84:
272
+            res = 471;
273
+            break;
274
+        case 85:
275
+            res = 494;
276
+            break;
277
+        case 86:
278
+            res = 490;
279
+            break;
280
+        case 87:
281
+            res = 486;
282
+            break;
283
+        case 88:
284
+            res = 470;
285
+            break;
286
+        case 89:
287
+            res = 472;
288
+            break;
289
+        case 90:
290
+            res = 484;
291
+            break;
292
+        case 91:
293
+            res = 472;
294
+            break;
295
+        case 92:
296
+            res = 481;
297
+            break;
298
+        case 93:
299
+            res = 485;
300
+            break;
301
+        case 94:
302
+            res = 472;
303
+            break;
304
+        case 95:
305
+            res = 472;
306
+            break;
307
+        case 96:
308
+            res = 472;
309
+            break;
310
+        case 97:
311
+            res = 470;
312
+            break;
313
+        case 98:
314
+            res = 496;
315
+            break;
316
+        case 99:
317
+            res = 480;
318
+            break;
319
+        case 100:
320
+            res = 480;
321
+            break;
322
+        case 101:
323
+            res = 481;
324
+            break;
325
+        case 102:
326
+            res = 481;
327
+            break;
328
+        case 103:
329
+            res = 495;
330
+            break;
331
+        case 104:
332
+            res = 475;
333
+            break;
334
+        case 105:
335
+            res = 471;
336
+            break;
337
+        case 106:
338
+            res = 490;
339
+            break;
340
+        case 107:
341
+            res = 495;
342
+            break;
343
+        case 108:
344
+            res = 481;
345
+            break;
346
+        case 109:
347
+            res = 495;
348
+            break;
349
+        case 110:
350
+            res = 495;
351
+            break;
352
+        case 111:
353
+            res = 482;
354
+            break;
355
+        case 112:
356
+            res = 482;
357
+            break;
358
+        case 113:
359
+            res = 483;
360
+            break;
361
+        case 114:
362
+            res = 495;
363
+            break;
364
+        case 115:
365
+            res = 472;
366
+            break;
367
+        case 116:
368
+            res = 495;
369
+            break;
370
+        case 117:
371
+            res = 482;
372
+            break;
373
+        case 118:
374
+            res = 483;
375
+            break;
376
+        case 119:
377
+            res = 483;
66 378
             break;
67 379
         default:
68 380
             res = SEQ_FRLG_E_1;
@@ -81,19 +393,39 @@ u16 mhk_song_id_for_battle(void) {
81 393
         res = SEQ_BGM_VS_RSE;
82 394
     } else if (battle_type_flags.battle_trainer) {
83 395
         switch (trainer_data[trainerbattle_flag_id].trainer_class) {
396
+            case 36:
397
+                res = 527;
398
+                break;
84 399
             case 90:
85
-                res = SEQ_BGM_VS_CHAMP;
400
+                res = 528;
86 401
                 break;
87
-            case 84:
88
-            case 87:
89
-                res = SEQ_BGM_VS_LEADER;
402
+            case 93:
403
+                res = 524;
404
+                break;
405
+            case 111:
406
+                res = 532;
407
+                break;
408
+            case 112:
409
+                res = 529;
410
+                break;
411
+            case 113:
412
+                res = 530;
413
+                break;
414
+            case 117:
415
+                res = 532;
416
+                break;
417
+            case 118:
418
+                res = 530;
419
+                break;
420
+            case 119:
421
+                res = 531;
90 422
                 break;
91 423
             default:
92
-                res = SEQ_BGM_VS_TRAINER;
424
+                res = 522;
93 425
                 break;
94 426
         }
95 427
     } else {
96
-        res = SEQ_BGM_VS_POKE;
428
+        res = 523;
97 429
     }
98 430
 
99 431
     return res;
@@ -154,10 +486,10 @@ u16 mhk_species_to_song(u16 species) {
154 486
         case POKE_MOLTRES:
155 487
         case POKE_LUGIA:
156 488
         case POKE_HOOH:
157
-            res = SEQ_BGM_VS_LEG1;
489
+            res = 526;
158 490
             break;
159 491
         case POKE_DEOXYS:
160
-            res = SEQ_BGM_VS_DEOXYS;
492
+            res = 525;
161 493
             break;
162 494
         default:
163 495
             res = SEQ_BGM_VS_RSE;