ソースを参照

string rework start

SBird1337 7 年 前
コミット
f03daa5e74
共有9 個のファイルを変更した2719 個の追加20 個の削除を含む
  1. 668
    0
      charmap.txt
  2. 18
    7
      makefile
  3. 1
    1
      sots-private
  4. 12
    12
      src/include/applymovements.h
  5. 1965
    0
      src/include/pymap_constants.s
  6. 17
    0
      src/include/script_language.h
  7. バイナリ
      src/test/a.out
  8. 22
    0
      src/test/test.i
  9. 16
    0
      src/test/test.s

+ 668
- 0
charmap.txt ファイルの表示

@@ -0,0 +1,668 @@
1
+' '         = 00
2
+'À'         = 01
3
+'Á'         = 02
4
+'Â'         = 03
5
+'Ç'         = 04
6
+'È'         = 05
7
+'É'         = 06
8
+'Ê'         = 07
9
+'Ë'         = 08
10
+'Ì'         = 09
11
+'Î'         = 0B
12
+'Ï'         = 0C
13
+'Ò'         = 0D
14
+'Ó'         = 0E
15
+'Ô'         = 0F
16
+'Œ'         = 10
17
+'Ù'         = 11
18
+'Ú'         = 12
19
+'Û'         = 13
20
+'Ñ'         = 14
21
+'ß'         = 15
22
+'à'         = 16
23
+'á'         = 17
24
+'ç'         = 19
25
+'è'         = 1A
26
+'é'         = 1B
27
+'ê'         = 1C
28
+'ë'         = 1D
29
+'ì'         = 1E
30
+'î'         = 20
31
+'ï'         = 21
32
+'ò'         = 22
33
+'ó'         = 23
34
+'ô'         = 24
35
+'œ'         = 25
36
+'ù'         = 26
37
+'ú'         = 27
38
+'û'         = 28
39
+'ñ'         = 29
40
+'º'         = 2A
41
+'ª'         = 2B
42
+SUPER_ER    = 2C
43
+'&'         = 2D
44
+'+'         = 2E
45
+LV          = 34
46
+'='         = 35
47
+'¿'         = 51
48
+'¡'         = 52
49
+PK          = 53
50
+PKMN        = 53 54
51
+POKEBLOCK   = 55 56 57 58 59
52
+'Í'         = 5A
53
+'%'         = 5B
54
+'('         = 5C
55
+')'         = 5D
56
+'â'         = 68
57
+'í'         = 6F
58
+UP_ARROW    = 79
59
+DOWN_ARROW  = 7A
60
+LEFT_ARROW  = 7B
61
+RIGHT_ARROW = 7C
62
+'0'         = A1
63
+'1'         = A2
64
+'2'         = A3
65
+'3'         = A4
66
+'4'         = A5
67
+'5'         = A6
68
+'6'         = A7
69
+'7'         = A8
70
+'8'         = A9
71
+'9'         = AA
72
+'!'         = AB
73
+'?'         = AC
74
+'.'         = AD
75
+'-'         = AE
76
+'…'         = B0
77
+'“'         = B1
78
+'”'         = B2
79
+'‘'         = B3
80
+'’'         = B4
81
+'♂'         = B5
82
+'♀'         = B6
83
+'¥'         = B7
84
+','         = B8
85
+'×'         = B9
86
+'/'         = BA
87
+'A'         = BB
88
+'B'         = BC
89
+'C'         = BD
90
+'D'         = BE
91
+'E'         = BF
92
+'F'         = C0
93
+'G'         = C1
94
+'H'         = C2
95
+'I'         = C3
96
+'J'         = C4
97
+'K'         = C5
98
+'L'         = C6
99
+'M'         = C7
100
+'N'         = C8
101
+'O'         = C9
102
+'P'         = CA
103
+'Q'         = CB
104
+'R'         = CC
105
+'S'         = CD
106
+'T'         = CE
107
+'U'         = CF
108
+'V'         = D0
109
+'W'         = D1
110
+'X'         = D2
111
+'Y'         = D3
112
+'Z'         = D4
113
+'a'         = D5
114
+'b'         = D6
115
+'c'         = D7
116
+'d'         = D8
117
+'e'         = D9
118
+'f'         = DA
119
+'g'         = DB
120
+'h'         = DC
121
+'i'         = DD
122
+'j'         = DE
123
+'k'         = DF
124
+'l'         = E0
125
+'m'         = E1
126
+'n'         = E2
127
+'o'         = E3
128
+'p'         = E4
129
+'q'         = E5
130
+'r'         = E6
131
+'s'         = E7
132
+'t'         = E8
133
+'u'         = E9
134
+'v'         = EA
135
+'w'         = EB
136
+'x'         = EC
137
+'y'         = ED
138
+'z'         = EE
139
+'▶'         = EF
140
+':'         = F0
141
+'Ä'         = F1
142
+'Ö'         = F2
143
+'Ü'         = F3
144
+'ä'         = F4
145
+'ö'         = F5
146
+'ü'         = F6
147
+@ Arrows at F7-FA are duplicates of 79-7C. Unused?
148
+TALL_PLUS   = FC 0C FB
149
+'$'         = FF
150
+
151
+@ Hiragana
152
+'あ' = 01
153
+'い' = 02
154
+'う' = 03
155
+'え' = 04
156
+'お' = 05
157
+'か' = 06
158
+'き' = 07
159
+'く' = 08
160
+'け' = 09
161
+'こ' = 0A
162
+'さ' = 0B
163
+'し' = 0C
164
+'す' = 0D
165
+'せ' = 0E
166
+'そ' = 0F
167
+'た' = 10
168
+'ち' = 11
169
+'つ' = 12
170
+'て' = 13
171
+'と' = 14
172
+'な' = 15
173
+'に' = 16
174
+'ぬ' = 17
175
+'ね' = 18
176
+'の' = 19
177
+'は' = 1A
178
+'ひ' = 1B
179
+'ふ' = 1C
180
+'へ' = 1D
181
+'ほ' = 1E
182
+'ま' = 1F
183
+'み' = 20
184
+'む' = 21
185
+'め' = 22
186
+'も' = 23
187
+'や' = 24
188
+'ゆ' = 25
189
+'よ' = 26
190
+'ら' = 27
191
+'り' = 28
192
+'る' = 29
193
+'れ' = 2A
194
+'ろ' = 2B
195
+'わ' = 2C
196
+'を' = 2D
197
+'ん' = 2E
198
+'ぁ' = 2F
199
+'ぃ' = 30
200
+'ぅ' = 31
201
+'ぇ' = 32
202
+'ぉ' = 33
203
+'ゃ' = 34
204
+'ゅ' = 35
205
+'ょ' = 36
206
+'が' = 37
207
+'ぎ' = 38
208
+'ぐ' = 39
209
+'げ' = 3A
210
+'ご' = 3B
211
+'ざ' = 3C
212
+'じ' = 3D
213
+'ず' = 3E
214
+'ぜ' = 3F
215
+'ぞ' = 40
216
+'だ' = 41
217
+'ぢ' = 42
218
+'づ' = 43
219
+'で' = 44
220
+'ど' = 45
221
+'ば' = 46
222
+'び' = 47
223
+'ぶ' = 48
224
+'べ' = 49
225
+'ぼ' = 4A
226
+'ぱ' = 4B
227
+'ぴ' = 4C
228
+'ぷ' = 4D
229
+'ぺ' = 4E
230
+'ぽ' = 4F
231
+'っ' = 50
232
+
233
+@ Katakana
234
+'ア' = 51
235
+'イ' = 52
236
+'ウ' = 53
237
+'エ' = 54
238
+'オ' = 55
239
+'カ' = 56
240
+'キ' = 57
241
+'ク' = 58
242
+'ケ' = 59
243
+'コ' = 5A
244
+'サ' = 5B
245
+'シ' = 5C
246
+'ス' = 5D
247
+'セ' = 5E
248
+'ソ' = 5F
249
+'タ' = 60
250
+'チ' = 61
251
+'ツ' = 62
252
+'テ' = 63
253
+'ト' = 64
254
+'ナ' = 65
255
+'ニ' = 66
256
+'ヌ' = 67
257
+'ネ' = 68
258
+'ノ' = 69
259
+'ハ' = 6A
260
+'ヒ' = 6B
261
+'フ' = 6C
262
+'ヘ' = 6D
263
+'ホ' = 6E
264
+'マ' = 6F
265
+'ミ' = 70
266
+'ム' = 71
267
+'メ' = 72
268
+'モ' = 73
269
+'ヤ' = 74
270
+'ユ' = 75
271
+'ヨ' = 76
272
+'ラ' = 77
273
+'リ' = 78
274
+'ル' = 79
275
+'レ' = 7A
276
+'ロ' = 7B
277
+'ワ' = 7C
278
+'ヲ' = 7D
279
+'ン' = 7E
280
+'ァ' = 7F
281
+'ィ' = 80
282
+'ゥ' = 81
283
+'ェ' = 82
284
+'ォ' = 83
285
+'ャ' = 84
286
+'ュ' = 85
287
+'ョ' = 86
288
+'ガ' = 87
289
+'ギ' = 88
290
+'グ' = 89
291
+'ゲ' = 8A
292
+'ゴ' = 8B
293
+'ザ' = 8C
294
+'ジ' = 8D
295
+'ズ' = 8E
296
+'ゼ' = 8F
297
+'ゾ' = 90
298
+'ダ' = 91
299
+'ヂ' = 92
300
+'ヅ' = 93
301
+'デ' = 94
302
+'ド' = 95
303
+'バ' = 96
304
+'ビ' = 97
305
+'ブ' = 98
306
+'ベ' = 99
307
+'ボ' = 9A
308
+'パ' = 9B
309
+'ピ' = 9C
310
+'プ' = 9D
311
+'ペ' = 9E
312
+'ポ' = 9F
313
+'ッ' = A0
314
+
315
+@ Japanese punctuation
316
+' ' = 00
317
+'!' = AB
318
+'?' = AC
319
+'。' = AD
320
+'ー' = AE
321
+'·' = AF
322
+'‥' = B0
323
+
324
+STRING = FD
325
+
326
+@ string placeholders
327
+PLAYER         = FD 01
328
+STR_VAR_1      = FD 02
329
+STR_VAR_2      = FD 03
330
+STR_VAR_3      = FD 04
331
+KUN            = FD 05
332
+RIVAL          = FD 06
333
+@ version-dependent strings
334
+VERSION        = FD 07 @ "RUBY"    / "SAPPHIRE"
335
+EVIL_TEAM      = FD 08 @ "MAGMA"   / "AQUA"
336
+GOOD_TEAM      = FD 09 @ "AQUA"    / "MAGMA"
337
+EVIL_LEADER    = FD 0A @ "MAXIE"   / "ARCHIE"
338
+GOOD_LEADER    = FD 0B @ "ARCHIE"  / "MAXIE"
339
+EVIL_LEGENDARY = FD 0C @ "GROUDON" / "KYOGRE"
340
+GOOD_LEGENDARY = FD 0D @ "KYOGRE"  / "GROUDON"
341
+
342
+@ Custom battle macros
343
+ATTACKING_MON = FD 0E
344
+ATTACK_NAME = FD 0F
345
+EFFECT_NAME = FD 10
346
+DEFENDING_MON = FD 11
347
+ABILITY_NAME_OPPONENT = FD 12
348
+ABILITY_NAME_PLAYER = FD 13
349
+TYPE = FD 14
350
+STAT_NAME = FD 15
351
+STATUS_NAME = FD 16
352
+
353
+@ battle macros deprecated
354
+@UNKNOWN_STR = FD 00
355
+@ATTACKING_TRAINER = FD 08
356
+@DEFENDING_TRAINER = FD 09
357
+@ATTACKING_MON = FD 0C
358
+@DEFENDING_MON = FD 0D
359
+
360
+@ indicates the end of a town/city name (before " TOWN" or " CITY")
361
+NAME_END = FC 00
362
+
363
+@ more text functions
364
+
365
+COLOR = FC 01 @ use a color listed below right after
366
+HIGHLIGHT = FC 02 @ same as fc 01
367
+SHADOW = FC 03 @ same as fc 01
368
+COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
369
+PALETTE = FC 05 @ used in credits
370
+SIZE = FC 06 @ note that anything other than "SMALL" is invalid
371
+UNKNOWN_7 = FC 07
372
+PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
373
+PAUSE_UNTIL_PRESS = FC 09
374
+UNKNOWN_A = FC 0A
375
+PLAY_BGM = FC 0B
376
+ESCAPE = FC 0C
377
+SHIFT_TEXT = FC 0D
378
+UNKNOWN_E = FC 0E
379
+UNKNOWN_F = FC 0F
380
+PLAY_SE = FC 10
381
+CLEAR = FC 11
382
+SKIP = FC 12
383
+CLEAR_TO = FC 13
384
+UNKNOWN_14 = FC 14
385
+JPN = FC 15
386
+ENG = FC 16
387
+PAUSE_MUSIC = FC 17
388
+RESUME_MUSIC = FC 18
389
+
390
+@ colors
391
+
392
+TRANSPARENT = 00
393
+DARK_GREY = 01
394
+RED = 02
395
+GREEN = 03
396
+BLUE = 04
397
+YELLOW = 05
398
+CYAN = 06
399
+MAGENTA = 07
400
+LIGHT_GREY = 08
401
+BLACK = 09
402
+BLACK2 = 0A @ duplicate of black?
403
+SILVER = 0B
404
+WHITE = 0C
405
+SKY_BLUE = 0D
406
+LIGHT_BLUE = 0E
407
+WHITE2 = 0F @ duplicate of white?
408
+
409
+@ sound and music
410
+
411
+SE_STOP        = 00 00
412
+SE_KAIFUKU     = 01 00
413
+SE_PC_LOGON    = 02 00
414
+SE_PC_OFF      = 03 00
415
+SE_PC_ON       = 04 00
416
+SE_SELECT      = 05 00
417
+SE_WIN_OPEN    = 06 00
418
+SE_WALL_HIT    = 07 00
419
+SE_DOOR        = 08 00
420
+SE_KAIDAN      = 09 00
421
+SE_DANSA       = 0A 00
422
+SE_JITENSYA    = 0B 00
423
+SE_KOUKA_L     = 0C 00
424
+SE_KOUKA_M     = 0D 00
425
+SE_KOUKA_H     = 0E 00
426
+SE_BOWA2       = 0F 00
427
+SE_POKE_DEAD   = 10 00
428
+SE_NIGERU      = 11 00
429
+SE_JIDO_DOA    = 12 00
430
+SE_NAMINORI    = 13 00
431
+SE_BAN         = 14 00
432
+SE_PIN         = 15 00
433
+SE_BOO         = 16 00
434
+SE_BOWA        = 17 00
435
+SE_JYUNI       = 18 00
436
+SE_A           = 19 00
437
+SE_I           = 1A 00
438
+SE_U           = 1B 00
439
+SE_E           = 1C 00
440
+SE_O           = 1D 00
441
+SE_N           = 1E 00
442
+SE_SEIKAI      = 1F 00
443
+SE_HAZURE      = 20 00
444
+SE_EXP         = 21 00
445
+SE_JITE_PYOKO  = 22 00
446
+SE_MU_PACHI    = 23 00
447
+SE_TK_KASYA    = 24 00
448
+SE_FU_ZAKU     = 25 00
449
+SE_FU_ZAKU2    = 26 00
450
+SE_FU_ZUZUZU   = 27 00
451
+SE_RU_GASHIN   = 28 00
452
+SE_RU_GASYAN   = 29 00
453
+SE_RU_BARI     = 2A 00
454
+SE_RU_HYUU     = 2B 00
455
+SE_KI_GASYAN   = 2C 00
456
+SE_TK_WARPIN   = 2D 00
457
+SE_TK_WARPOUT  = 2E 00
458
+SE_TU_SAA      = 2F 00
459
+SE_HI_TURUN    = 30 00
460
+SE_TRACK_MOVE  = 31 00
461
+SE_TRACK_STOP  = 32 00
462
+SE_TRACK_HAIK  = 33 00
463
+SE_TRACK_DOOR  = 34 00
464
+SE_MOTER       = 35 00
465
+SE_CARD        = 36 00
466
+SE_SAVE        = 37 00
467
+SE_KON         = 38 00
468
+SE_KON2        = 39 00
469
+SE_KON3        = 3A 00
470
+SE_KON4        = 3B 00
471
+SE_SUIKOMU     = 3C 00
472
+SE_NAGERU      = 3D 00
473
+SE_TOY_C       = 3E 00
474
+SE_TOY_D       = 3F 00
475
+SE_TOY_E       = 40 00
476
+SE_TOY_F       = 41 00
477
+SE_TOY_G       = 42 00
478
+SE_TOY_A       = 43 00
479
+SE_TOY_B       = 44 00
480
+SE_TOY_C1      = 45 00
481
+SE_MIZU        = 46 00
482
+SE_HASHI       = 47 00
483
+SE_DAUGI       = 48 00
484
+SE_PINPON      = 49 00
485
+SE_FUUSEN1     = 4A 00
486
+SE_FUUSEN2     = 4B 00
487
+SE_FUUSEN3     = 4C 00
488
+SE_TOY_KABE    = 4D 00
489
+SE_TOY_DANGO   = 4E 00
490
+SE_DOKU        = 4F 00
491
+SE_ESUKA       = 50 00
492
+SE_T_AME       = 51 00
493
+SE_T_AME_E     = 52 00
494
+SE_T_OOAME     = 53 00
495
+SE_T_OOAME_E   = 54 00
496
+SE_T_KOAME     = 55 00
497
+SE_T_KOAME_E   = 56 00
498
+SE_T_KAMI      = 57 00
499
+SE_T_KAMI2     = 58 00
500
+SE_ELEBETA     = 59 00
501
+SE_HINSI       = 5A 00
502
+SE_EXPMAX      = 5B 00
503
+SE_TAMAKORO    = 5C 00
504
+SE_TAMAKORO_E  = 5D 00
505
+SE_BASABASA    = 5E 00
506
+SE_REGI        = 5F 00
507
+SE_C_GAJI      = 60 00
508
+SE_C_MAKU_U    = 61 00
509
+SE_C_MAKU_D    = 62 00
510
+SE_C_PASI      = 63 00
511
+SE_C_SYU       = 64 00
512
+SE_C_PIKON     = 65 00
513
+SE_REAPOKE     = 66 00
514
+SE_OP_BASYU    = 67 00
515
+SE_BT_START    = 68 00
516
+SE_DENDOU      = 69 00
517
+SE_JIHANKI     = 6A 00
518
+SE_TAMA        = 6B 00
519
+SE_Z_SCROLL    = 6C 00
520
+SE_Z_PAGE      = 6D 00
521
+SE_PN_ON       = 6E 00
522
+SE_PN_OFF      = 6F 00
523
+SE_Z_SEARCH    = 70 00
524
+SE_TAMAGO      = 71 00
525
+SE_TB_START    = 72 00
526
+SE_TB_KON      = 73 00
527
+SE_TB_KARA     = 74 00
528
+SE_BIDORO      = 75 00
529
+BGM_STOP       = 5D 01
530
+BGM_TETSUJI    = 5E 01
531
+BGM_FIELD13    = 5F 01
532
+BGM_KACHI22    = 60 01
533
+BGM_KACHI2     = 61 01
534
+BGM_KACHI3     = 62 01
535
+BGM_KACHI5     = 63 01
536
+BGM_PCC        = 64 01
537
+BGM_NIBI       = 65 01
538
+BGM_SUIKUN     = 66 01
539
+BGM_DOORO1     = 67 01
540
+BGM_DOORO_X1   = 68 01
541
+BGM_DOORO_X3   = 69 01
542
+BGM_MACHI_S2   = 6A 01
543
+BGM_MACHI_S4   = 6B 01
544
+BGM_GIM        = 6C 01
545
+BGM_NAMINORI   = 6D 01
546
+BGM_DAN01      = 6E 01
547
+BGM_FANFA1     = 6F 01
548
+BGM_ME_ASA     = 70 01
549
+BGM_ME_BACHI   = 71 01
550
+BGM_FANFA4     = 72 01
551
+BGM_FANFA5     = 73 01
552
+BGM_ME_WAZA    = 74 01
553
+BGM_BIJYUTU    = 75 01
554
+BGM_DOORO_X4   = 76 01
555
+BGM_FUNE_KAN   = 77 01
556
+BGM_ME_SHINKA  = 78 01
557
+BGM_SHINKA     = 79 01
558
+BGM_ME_WASURE  = 7A 01
559
+BGM_SYOUJOEYE  = 7B 01
560
+BGM_BOYEYE     = 7C 01
561
+BGM_DAN02      = 7D 01
562
+BGM_MACHI_S3   = 7E 01
563
+BGM_ODAMAKI    = 7F 01
564
+BGM_B_TOWER    = 80 01
565
+BGM_SWIMEYE    = 81 01
566
+BGM_DAN03      = 82 01
567
+BGM_ME_KINOMI  = 83 01
568
+BGM_ME_TAMA    = 84 01
569
+BGM_ME_B_BIG   = 85 01
570
+BGM_ME_B_SMALL = 86 01
571
+BGM_ME_ZANNEN  = 87 01
572
+BGM_BD_TIME    = 88 01
573
+BGM_TEST1      = 89 01
574
+BGM_TEST2      = 8A 01
575
+BGM_TEST3      = 8B 01
576
+BGM_TEST4      = 8C 01
577
+BGM_TEST       = 8D 01
578
+BGM_GOMACHI0   = 8E 01
579
+BGM_GOTOWN     = 8F 01
580
+BGM_POKECEN    = 90 01
581
+BGM_NEXTROAD   = 91 01
582
+BGM_GRANROAD   = 92 01
583
+BGM_CYCLING    = 93 01
584
+BGM_FRIENDLY   = 94 01
585
+BGM_MISHIRO    = 95 01
586
+BGM_TOZAN      = 96 01
587
+BGM_GIRLEYE    = 97 01
588
+BGM_MINAMO     = 98 01
589
+BGM_ASHROAD    = 99 01
590
+BGM_EVENT0     = 9A 01
591
+BGM_DEEPDEEP   = 9B 01
592
+BGM_KACHI1     = 9C 01
593
+BGM_TITLE3     = 9D 01
594
+BGM_DEMO1      = 9E 01
595
+BGM_GIRL_SUP   = 9F 01
596
+BGM_HAGESHII   = A0 01
597
+BGM_KAKKOII    = A1 01
598
+BGM_KAZANBAI   = A2 01
599
+BGM_AQA_0      = A3 01
600
+BGM_TSURETEK   = A4 01
601
+BGM_BOY_SUP    = A5 01
602
+BGM_RAINBOW    = A6 01
603
+BGM_AYASII     = A7 01
604
+BGM_KACHI4     = A8 01
605
+BGM_ROPEWAY    = A9 01
606
+BGM_CASINO     = AA 01
607
+BGM_HIGHTOWN   = AB 01
608
+BGM_SAFARI     = AC 01
609
+BGM_C_ROAD     = AD 01
610
+BGM_AJITO      = AE 01
611
+BGM_M_BOAT     = AF 01
612
+BGM_M_DUNGON   = B0 01
613
+BGM_FINECITY   = B1 01
614
+BGM_MACHUPI    = B2 01
615
+BGM_P_SCHOOL   = B3 01
616
+BGM_DENDOU     = B4 01
617
+BGM_TONEKUSA   = B5 01
618
+BGM_MABOROSI   = B6 01
619
+BGM_CON_FAN    = B7 01
620
+BGM_CONTEST0   = B8 01
621
+BGM_MGM0       = B9 01
622
+BGM_T_BATTLE   = BA 01
623
+BGM_OOAME      = BB 01
624
+BGM_HIDERI     = BC 01
625
+BGM_RUNECITY   = BD 01
626
+BGM_CON_K      = BE 01
627
+BGM_EIKOU_R    = BF 01
628
+BGM_KARAKURI   = C0 01
629
+BGM_HUTAGO     = C1 01
630
+BGM_SITENNOU   = C2 01
631
+BGM_YAMA_EYE   = C3 01
632
+BGM_CONLOBBY   = C4 01
633
+BGM_INTER_V    = C5 01
634
+BGM_DAIGO      = C6 01
635
+BGM_THANKFOR   = C7 01
636
+BGM_END        = C8 01
637
+BGM_BATTLE27   = C9 01
638
+BGM_BATTLE31   = CA 01
639
+BGM_BATTLE20   = CB 01
640
+BGM_BATTLE32   = CC 01
641
+BGM_BATTLE33   = CD 01
642
+BGM_BATTLE36   = CE 01
643
+BGM_BATTLE34   = CF 01
644
+BGM_BATTLE35   = D0 01
645
+BGM_BATTLE38   = D1 01
646
+BGM_BATTLE30   = D2 01
647
+
648
+@ key symbols
649
+
650
+KEY_A          = F8 00
651
+KEY_B          = F8 01
652
+KEY_L          = F8 02
653
+KEY_R          = F8 03
654
+KEY_START      = F8 04
655
+KEY_SELECT     = F8 05
656
+KEY_UP         = F8 06
657
+KEY_DOWN       = F8 07
658
+KEY_LEFT       = F8 08
659
+KEY_RIGHT      = F8 09
660
+KEY_UP_DOWN    = F8 0A
661
+KEY_LEFT_RIGHT = F8 0B
662
+KEY_DPAD       = F8 0C
663
+
664
+@ see http://www.pokecommunity.com/archive/index.php/t-180345.html
665
+
666
+'\l' = FA @ scroll up window text
667
+'\p' = FB @ new paragraph
668
+'\n' = FE @ new line

+ 18
- 7
makefile ファイルの表示

@@ -1,11 +1,12 @@
1
-AS      := arm-none-eabi-as
2
-LD      := arm-none-eabi-ld
3
-OBJCOPY := arm-none-eabi-objcopy
4
-GRIT    := grit
5
-CC      := arm-none-eabi-gcc
6
-ARS     := armips
1
+AS      := @arm-none-eabi-as
2
+LD      := @arm-none-eabi-ld
3
+OBJCOPY := @arm-none-eabi-objcopy
4
+GRIT    := @grit
5
+CC      := @arm-none-eabi-gcc
6
+ARS     := @armips
7 7
 MAKE    := make
8 8
 NM      := @arm-none-eabi-nm
9
+PREPROC := @preproc
9 10
 VBA		:= vba
10 11
 LAN	:= de
11 12
 STRAGB	:= string2agb
@@ -16,6 +17,8 @@ PAGB_MAIN := g3headers
16 17
 PAGB_INCLUDE := $(PAGB_MAIN)/build/include/
17 18
 PAGB_LINK := $(PAGB_MAIN)/build/linker/BPRE.ld
18 19
 
20
+CHARMAP := charmap.txt
21
+
19 22
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
20 23
 ASFLAGS   := -mthumb
21 24
 CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -Og -std=c11 -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -fdiagnostics-color $(DEFINES)
@@ -47,8 +50,13 @@ C_SRC       := $(call rwildcard,src/,*.c)
47 50
 DATA_SRC_PP := $(call rwildcard,data/,*.S)
48 51
 DATA_SRC    := $(call rwildcard,data/,*.s)
49 52
 STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
53
+C_STRING	:= $(call rwildcard,string/$(LAN)/,*.c)
50 54
 STRING_SRC	:= $(STRING:%.txt=%.S)
51 55
 
56
+I_STRING	:= $(C_STRING:$.c=%.i)
57
+
58
+
59
+C_STR_OBJ	:= $(I_STRING:%.i=$(BLDPATH)/%.o)
52 60
 STRING_OBJ	:= $(STRING_SRC:%.S=$(BLDPATH)/%.o)
53 61
 ASM_OBJ_PP  := $(ASM_SRC_PP:%.S=$(BLDPATH)/%.o)
54 62
 ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
@@ -71,8 +79,11 @@ $(BLDPATH)/%.o: %.S
71 79
 	$(CC) $(CFLAGS) -c $< -o $@
72 80
 
73 81
 $(BLDPATH)/%.o: %.s
82
+
74 83
 	$(shell mkdir -p $(dir $@))
75
-	$(AS) $(ASFLAGS) $< -o $@
84
+	$(PREPROC) $< $(CHARMAP) > $*.i
85
+	$(CC) $(CFLAGS) -c -x assembler-with-cpp $*.i -o $@
86
+	$(OBJCOPY) -O binary $@ $@.bin
76 87
 
77 88
 all: rom
78 89
 

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 978a2232190e649a93d63a3d00cc9233f4b0b6c3
1
+Subproject commit e2a1d40d351d65eea372dc9aec10224e1cb02dd1

+ 12
- 12
src/include/applymovements.h ファイルの表示

@@ -1,8 +1,8 @@
1 1
 @@ Applymovement commands
2
-.equ APPLYMOVE_LOCK_DOWN, 0x0
3
-.equ APPLYMOVE_LOCK_UP, 0x1
4
-.equ APPLYMOVE_LOCK_LEFT, 0x2
5
-.equ APPLYMOVE_LOCK_RIGHT, 0x3
2
+.equ APPLYMOVE_LOOK_DOWN, 0x0
3
+.equ APPLYMOVE_LOOK_UP, 0x1
4
+.equ APPLYMOVE_LOOK_LEFT, 0x2
5
+.equ APPLYMOVE_LOOK_RIGHT, 0x3
6 6
 .equ APPLYMOVE_GO_DOWN_VERY_SLOW, 0x8
7 7
 .equ APPLYMOVE_GO_UP_VERY_SLOW, 0x9
8 8
 .equ APPLYMOVE_GO_LEFT_VERY_SLOW, 0xA
@@ -40,10 +40,10 @@
40 40
 .equ APPLYMOVE_GO_UP_ON_POINT_VERY_FAST, 0x2A
41 41
 .equ APPLYMOVE_GO_LEFT_ON_POINT_VERY_FAST, 0x2B
42 42
 .equ APPLYMOVE_GO_RIGHT_ON_POINT_VERY_FAST, 0x2C
43
-.equ APPLYMOVE_LOCK_DOWN_DELAY, 0x2D
44
-.equ APPLYMOVE_LOCK_UP_DELAY, 0x2E
45
-.equ APPLYMOVE_LOCK_LEFT_DELAY, 0x2F
46
-.equ APPLYMOVE_LOCK_RIGHT_DELAY, 0x30
43
+.equ APPLYMOVE_LOOK_DOWN_DELAY, 0x2D
44
+.equ APPLYMOVE_LOOK_UP_DELAY, 0x2E
45
+.equ APPLYMOVE_LOOK_LEFT_DELAY, 0x2F
46
+.equ APPLYMOVE_LOOK_RIGHT_DELAY, 0x30
47 47
 .equ APPLYMOVE_GO_DOWN_VERY_FAST, 0x35
48 48
 .equ APPLYMOVE_GO_UP_VERY_FAST, 0x36
49 49
 .equ APPLYMOVE_GO_LEFT_VERY_FAST, 0x37
@@ -54,10 +54,10 @@
54 54
 .equ APPLYMOVE_SLIDE_RIGHT_FAST, 0x3C
55 55
 .equ APPLYMOVE_GO_LOOP, 0x45
56 56
 .equ APPLYMOVE_RUN_LOOP, 0x46
57
-.equ APPLYMOVE_LOCK_PLAYER, 0x4A
58
-.equ APPLYMOVE_LOCK_NOT_PLAYER, 0x4B
59
-.equ APPLYMOVE_FREEZE_LOCK, 0x4C
60
-.equ APPLYMOVE_FREE_LOCK, 0x4D
57
+.equ APPLYMOVE_LOOK_PLAYER, 0x4A
58
+.equ APPLYMOVE_LOOK_NOT_PLAYER, 0x4B
59
+.equ APPLYMOVE_FREEZE_LOOK, 0x4C
60
+.equ APPLYMOVE_FREE_LOOK, 0x4D
61 61
 .equ APPLYMOVE_JUMP_ONE_DOWN, 0x4E
62 62
 .equ APPLYMOVE_JUMP_ONE_UP, 0x4F
63 63
 .equ APPLYMOVE_JUMP_ONE_LEFT, 0x50

+ 1965
- 0
src/include/pymap_constants.s
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 17
- 0
src/include/script_language.h ファイルの表示

@@ -1,6 +1,14 @@
1 1
 #include <config.h>
2 2
 #include <applymovements.h>
3 3
 
4
+@@ string macros
5
+
6
+.macro stringlocal language string
7
+    .ifdef \language
8
+        .string \string
9
+    .endif
10
+.endm
11
+
4 12
 @@ Compare operands
5 13
 .equ B_LT, 0x0
6 14
 .equ B_EQ, 0x1
@@ -13,6 +21,15 @@
13 21
 .equ B_T, 0x0
14 22
 .equ B_F, 0x1
15 23
 
24
+@@ callstd alias
25
+.equ ITEM_OBTAIN, 0
26
+.equ ITEM_FIND, 1
27
+.equ MSG_FACE, 2
28
+.equ MSG_SIGN, 3
29
+.equ MSG_KEYOPEN, 4
30
+.equ MSG_YES_NO, 5
31
+.equ MSG_STD, 6
32
+
16 33
 
17 34
 @@@@@@@@@@@@@@@@@ Macro
18 35
 

バイナリ
src/test/a.out ファイルの表示


+ 22
- 0
src/test/test.i ファイルの表示

@@ -0,0 +1,22 @@
1
+
2
+.text
3
+.thumb
4
+
5
+#define LAN_DE
6
+
7
+.align 2
8
+.global test_some_test
9
+test_some_test:
10
+ldr r0, =test_string
11
+bx lr
12
+
13
+.align 2
14
+test_string:
15
+#ifdef LAN_DE
16
+		.byte 0xC2, 0xD5, 0xE0, 0xE0, 0xE3, 0xFF
17
+#endif
18
+
19
+#ifdef LAN_EN
20
+		.byte 0xC2, 0xD9, 0xE0, 0xE0, 0xE3, 0xFF
21
+#endif
22
+

+ 16
- 0
src/test/test.s ファイルの表示

@@ -0,0 +1,16 @@
1
+
2
+.text
3
+.thumb
4
+
5
+#define LAN_DE
6
+
7
+.align 2
8
+.global test_some_test
9
+test_some_test:
10
+ldr r0, =test_string
11
+bx lr
12
+
13
+.align 2
14
+test_string:
15
+.string LAN_DE "Hallo"
16
+.string LAN_EN "Hello"