Browse Source

full out map export

SBird1337 7 years ago
parent
commit
e52d77ea08
5 changed files with 160 additions and 133 deletions
  1. 11
    7
      charmap.txt
  2. 12
    2
      makefile
  3. 1
    1
      sots-private
  4. 112
    109
      src/include/pymap_constants.h
  5. 24
    14
      src/include/script_language.h

+ 11
- 7
charmap.txt View File

74
 '.'         = AD
74
 '.'         = AD
75
 '-'         = AE
75
 '-'         = AE
76
 DOTS        = B0
76
 DOTS        = B0
77
-'“'         = B1
78
-'”'         = B2
77
+QUOTE        = B1
78
+'\q'        = B2
79
 '‘'         = B3
79
 '‘'         = B3
80
-''         = B4
80
+'\''         = B4
81
 '♂'         = B5
81
 '♂'         = B5
82
 '♀'         = B6
82
 '♀'         = B6
83
-'¥'         = B7
83
+'\$'         = B7
84
 ','         = B8
84
 ','         = B8
85
 '×'         = B9
85
 '×'         = B9
86
 '/'         = BA
86
 '/'         = BA
325
 
325
 
326
 @ string placeholders
326
 @ string placeholders
327
 PLAYER         = FD 01
327
 PLAYER         = FD 01
328
-STR_VAR_1      = FD 02
329
-STR_VAR_2      = FD 03
330
-STR_VAR_3      = FD 04
328
+BUFFER_1       = FD 02
329
+BUFFER_2       = FD 03
330
+BUFFER_3       = FD 04
331
 KUN            = FD 05
331
 KUN            = FD 05
332
 RIVAL          = FD 06
332
 RIVAL          = FD 06
333
 @ version-dependent strings
333
 @ version-dependent strings
362
 
362
 
363
 @ more text functions
363
 @ more text functions
364
 
364
 
365
+TEXT_DELAY = FC 08 23
366
+TEXT_DELAY_LONG = FC 08 32
367
+
365
 COLOR = FC 01 @ use a color listed below right after
368
 COLOR = FC 01 @ use a color listed below right after
366
 HIGHLIGHT = FC 02 @ same as fc 01
369
 HIGHLIGHT = FC 02 @ same as fc 01
367
 SHADOW = FC 03 @ same as fc 01
370
 SHADOW = FC 03 @ same as fc 01
368
 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
371
 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
369
 PALETTE = FC 05 @ used in credits
372
 PALETTE = FC 05 @ used in credits
370
 SIZE = FC 06 @ note that anything other than "SMALL" is invalid
373
 SIZE = FC 06 @ note that anything other than "SMALL" is invalid
374
+SMALL = FC 06 00
371
 UNKNOWN_7 = FC 07
375
 UNKNOWN_7 = FC 07
372
 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
376
 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
373
 PAUSE_UNTIL_PRESS = FC 09
377
 PAUSE_UNTIL_PRESS = FC 09

+ 12
- 2
makefile View File

30
 OUTPATH	  := build
30
 OUTPATH	  := build
31
 SOURCEDIR := src
31
 SOURCEDIR := src
32
 STRINGDIR := string
32
 STRINGDIR := string
33
+MAPROOT	  := sots-private/map
34
+MAPMAPS	  := $(MAPROOT)/maps
35
+MAPTS	  := $(MAPROOT)/tilesets
33
 
36
 
34
 MAIN_OBJ  := $(BLDPATH)/linked.o
37
 MAIN_OBJ  := $(BLDPATH)/linked.o
35
 B_ENGINE  := battle_engine/build/linked.o
38
 B_ENGINE  := battle_engine/build/linked.o
37
 ICONS_AR  := $(BLDPATH)/pkmn_icons.a
40
 ICONS_AR  := $(BLDPATH)/pkmn_icons.a
38
 DYN_OVER  := built/dynamic_overworld.o
41
 DYN_OVER  := built/dynamic_overworld.o
39
 
42
 
43
+TMP_LD	  := tmp.ld
44
+
40
 SND_ROOT := sots-private/sound
45
 SND_ROOT := sots-private/sound
41
 MUSIC_AR := $(SND_ROOT)/Music/music.a
46
 MUSIC_AR := $(SND_ROOT)/Music/music.a
42
 SMPL_AR  := $(SND_ROOT)/Samples/sample.a
47
 SMPL_AR  := $(SND_ROOT)/Samples/sample.a
54
 DATA_SRC    := $(call rwildcard,data/,*.s)
59
 DATA_SRC    := $(call rwildcard,data/,*.s)
55
 STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
60
 STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
56
 STRING_SRC	:= $(STRING:%.txt=%.s)
61
 STRING_SRC	:= $(STRING:%.txt=%.s)
62
+SCRIPT_SRC	:= $(call rwildcard,$(MAPMAPS)/,*.s)
63
+
57
 
64
 
58
 GEN_OBJ		:= $(GEN_SRC:%.c=$(BLDPATH)/%.o)
65
 GEN_OBJ		:= $(GEN_SRC:%.c=$(BLDPATH)/%.o)
59
 STRING_OBJ	:= $(STRING_SRC:%.s=$(BLDPATH)/%.o)
66
 STRING_OBJ	:= $(STRING_SRC:%.s=$(BLDPATH)/%.o)
60
 ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
67
 ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
61
 C_OBJ       := $(C_SRC:%.c=$(BLDPATH)/%.o)
68
 C_OBJ       := $(C_SRC:%.c=$(BLDPATH)/%.o)
62
 DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
69
 DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
63
-ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ)
70
+SCRIPT_OBJ	:= $(SCRIPT_SRC:%.s=$(BLDPATH)/%.o)
71
+ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ)
64
 
72
 
65
 $(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
73
 $(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
66
 	@echo -e "\e[93mGenerating strings $<\e[0m"
74
 	@echo -e "\e[93mGenerating strings $<\e[0m"
100
 $(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $()#$(B_ENGINE)
108
 $(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $()#$(B_ENGINE)
101
 	$(MAKE) -f assets.makefile
109
 	$(MAKE) -f assets.makefile
102
 	@echo -e "\e[1;32mLinking ELF binary $@\e[0m"
110
 	@echo -e "\e[1;32mLinking ELF binary $@\e[0m"
103
-	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group $^ --end-group
111
+	@echo "INPUT($^)" > $(TMP_LD)
112
+	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group -T $(TMP_LD) --end-group
113
+	@rm -f $(TMP_LD)
104
 
114
 
105
 .PHONY: $(B_ENGINE)
115
 .PHONY: $(B_ENGINE)
106
 $(B_ENGINE):
116
 $(B_ENGINE):

+ 1
- 1
sots-private

1
-Subproject commit 7fd26679a5fbf886c57440f7090ca16f02d0361e
1
+Subproject commit 04d6d99a48f025594551fe535770abbc3b9d8075

src/include/pymap_constants.s → src/include/pymap_constants.h View File

1378
 .equ PKMNMENU, 0x828
1378
 .equ PKMNMENU, 0x828
1379
 .equ POKEDEX, 0x829
1379
 .equ POKEDEX, 0x829
1380
 .equ RUNNING_SHOES, 0x830
1380
 .equ RUNNING_SHOES, 0x830
1381
+.equ BATTLE_LOSABLE, 0x90f
1382
+.equ TRANS_PALETTE_FETCH, 0x910
1383
+.equ TRANS_DISABLE, 0x911
1384
+.equ WONDERTRADE, 0x915
1385
+.equ MAP_BGN_AUTO_ALIGN_OFF, 0x916
1386
+.equ POKERADAR_POKEMON_SPAWNED, 0x917
1387
+.equ ABILITY_SPARSAM_TRIGGER, 0x918
1388
+.equ WONDERTRADE_MEW_RECEIVED, 0x91f
1389
+.equ MEGA_EVOLUTION_PERFORMED, 0x920
1390
+.equ PLAYER_ABLE_TO_MEGA_EVOLVE, 0x921
1391
+.equ MAP_LOAD_DYNAMIC, 0x922
1392
+.equ DUNGEON_BUFFERED, 0x923
1393
+.equ PLAYER_CAN_ENTER_DUNGEONS, 0x924
1394
+.equ POKEDEX_FEATURE_HABITAT, 0x927
1395
+.equ POKEDEX_FEATURE_0, 0x928
1396
+.equ POKEDEX_FEATURE_1, 0x929
1397
+.equ POKEDEX_FEATURE_2, 0x92a
1381
 
1398
 
1382
 
1399
 
1383
 
1400
 
1431
 @ARM Assembly macro definitions for ord
1448
 @ARM Assembly macro definitions for ord
1432
 
1449
 
1433
 
1450
 
1434
-.equ B_LT, 0x0
1435
-.equ B_EQ, 0x1
1436
-.equ B_GT, 0x2
1437
-.equ B_LE, 0x3
1438
-.equ B_GE, 0x4
1439
-.equ B_NE, 0x5
1451
+.equ LESS, 0x0
1452
+.equ EQUAL, 0x1
1453
+.equ HIGHER, 0x2
1454
+.equ LESS_OR_EQUAL, 0x3
1455
+.equ HIGHER_OR_EQUAL, 0x4
1456
+.equ NOT_EQUAL, 0x5
1440
 
1457
 
1441
 
1458
 
1442
 
1459
 
1449
 .equ MSG_SIGN, 0x3
1466
 .equ MSG_SIGN, 0x3
1450
 .equ MSG_KEEPOPEN, 0x4
1467
 .equ MSG_KEEPOPEN, 0x4
1451
 .equ MSG_YES_NO, 0x5
1468
 .equ MSG_YES_NO, 0x5
1452
-.equ MSG_STD, 0x6
1469
+.equ MSG, 0x6
1453
 
1470
 
1454
 
1471
 
1455
 
1472
 
1456
 @ARM Assembly macro definitions for moves
1473
 @ARM Assembly macro definitions for moves
1457
 
1474
 
1458
 
1475
 
1459
-.equ APPLYMOVE_LOOK_DOWN, 0x0
1460
-.equ APPLYMOVE_LOOK_UP, 0x1
1461
-.equ APPLYMOVE_LOOK_LEFT, 0x2
1462
-.equ APPLYMOVE_LOOK_RIGHT, 0x3
1463
-.equ APPLYMOVE_GO_DOWN_VERY_SLOW, 0x8
1464
-.equ APPLYMOVE_GO_UP_VERY_SLOW, 0x9
1465
-.equ APPLYMOVE_GO_LEFT_VERY_SLOW, 0xa
1466
-.equ APPLYMOVE_GO_RIGHT_VERY_SLOW, 0xb
1467
-.equ APPLYMOVE_GO_DOWN_SLOW, 0xc
1468
-.equ APPLYMOVE_GO_UP_SLOW, 0xd
1469
-.equ APPLYMOVE_GO_LEFT_SLOW, 0xe
1470
-.equ APPLYMOVE_GO_RIGHT_SLOW, 0xf
1471
-.equ APPLYMOVE_GO_DOWN, 0x10
1472
-.equ APPLYMOVE_GO_UP, 0x11
1473
-.equ APPLYMOVE_GO_LEFT, 0x12
1474
-.equ APPLYMOVE_GO_RIGHT, 0x13
1475
-.equ APPLYMOVE_JUMP_TWO_DOWN, 0x14
1476
-.equ APPLYMOVE_JUMP_TWO_UP, 0x15
1477
-.equ APPLYMOVE_JUMP_TWO_LEFT, 0x16
1478
-.equ APPLYMOVE_JUMP_TWO_RIGHT, 0x17
1479
-.equ APPLYMOVE_DELAY1, 0x18
1480
-.equ APPLYMOVE_DELAY2, 0x19
1481
-.equ APPLYMOVE_DELAY3, 0x1a
1482
-.equ APPLYMOVE_DELAY4, 0x1b
1483
-.equ APPLYMOVE_DELAY5, 0x1c
1484
-.equ APPLYMOVE_GO_DOWN_FAST, 0x1d
1485
-.equ APPLYMOVE_GO_UP_FAST, 0x1e
1486
-.equ APPLYMOVE_GO_LEFT_FAST, 0x1f
1487
-.equ APPLYMOVE_GO_RIGHT_FAST, 0x20
1488
-.equ APPLYMOVE_GO_DOWN_ON_POINT, 0x21
1489
-.equ APPLYMOVE_GO_UP_ON_POINT, 0x22
1490
-.equ APPLYMOVE_GO_LEFT_ON_POINT, 0x23
1491
-.equ APPLYMOVE_GO_RIGHT_ON_POINT, 0x24
1492
-.equ APPLYMOVE_GO_DOWN_ON_POINT_FAST, 0x25
1493
-.equ APPLYMOVE_GO_UP_ON_POINT_FAST, 0x26
1494
-.equ APPLYMOVE_GO_LEFT_ON_POINT_FAST, 0x27
1495
-.equ APPLYMOVE_GO_RIGHT_ON_POINT_FAST, 0x28
1496
-.equ APPLYMOVE_GO_DOWN_ON_POINT_VERY_FAST, 0x29
1497
-.equ APPLYMOVE_GO_UP_ON_POINT_VERY_FAST, 0x2a
1498
-.equ APPLYMOVE_GO_LEFT_ON_POINT_VERY_FAST, 0x2b
1499
-.equ APPLYMOVE_GO_RIGHT_ON_POINT_VERY_FAST, 0x2c
1500
-.equ APPLYMOVE_LOOK_DOWN_DELAY, 0x2d
1501
-.equ APPLYMOVE_LOOK_UP_DELAY, 0x2e
1502
-.equ APPLYMOVE_LOOK_LEFT_DELAY, 0x2f
1503
-.equ APPLYMOVE_LOOK_RIGHT_DELAY, 0x30
1504
-.equ APPLYMOVE_GO_DOWN_VERY_FAST, 0x35
1505
-.equ APPLYMOVE_GO_UP_VERY_FAST, 0x36
1506
-.equ APPLYMOVE_GO_LEFT_VERY_FAST, 0x37
1507
-.equ APPLYMOVE_GO_RIGHT_VERY_FAST, 0x38
1508
-.equ APPLYMOVE_SLIDE_DOWN_FAST, 0x39
1509
-.equ APPLYMOVE_SLIDE_UP_FAST, 0x3a
1510
-.equ APPLYMOVE_SLIDE_LEFT_FAST, 0x3b
1511
-.equ APPLYMOVE_SLIDE_RIGHT_FAST, 0x3c
1512
-.equ APPLYMOVE_GO_LOOP, 0x45
1513
-.equ APPLYMOVE_RUN_LOOP, 0x46
1514
-.equ APPLYMOVE_LOOK_PLAYER, 0x4a
1515
-.equ APPLYMOVE_LOOK_NOT_PLAYER, 0x4b
1516
-.equ APPLYMOVE_FREEZE_LOOK, 0x4c
1517
-.equ APPLYMOVE_FREE_LOOK, 0x4d
1518
-.equ APPLYMOVE_JUMP_ONE_DOWN, 0x4e
1519
-.equ APPLYMOVE_JUMP_ONE_UP, 0x4f
1520
-.equ APPLYMOVE_JUMP_ONE_LEFT, 0x50
1521
-.equ APPLYMOVE_JUMP_ONE_RIGHT, 0x51
1522
-.equ APPLYMOVE_JUMP_ON_POINT_DOWN, 0x52
1523
-.equ APPLYMOVE_JUMP_ON_POINT_UP, 0x53
1524
-.equ APPLYMOVE_JUMP_ON_POINT_LEFT, 0x54
1525
-.equ APPLYMOVE_JUMP_ON_POINT_RIGHT, 0x55
1526
-.equ APPLYMOVE_JUMP_ON_POINT_UP_DOWN, 0x56
1527
-.equ APPLYMOVE_JUMP_ON_POINT_DOWN_UP, 0x57
1528
-.equ APPLYMOVE_JUMP_ON_POINT_RIGHT_LEFT, 0x58
1529
-.equ APPLYMOVE_JUMP_ON_POINT_LEFT_RIGHT, 0x59
1530
-.equ APPLYMOVE_HIDESPRITE, 0x60
1531
-.equ APPLYMOVE_SHOWSPRITE, 0x61
1532
-.equ APPLYMOVE_EXCL, 0x62
1533
-.equ APPLYMOVE_QUEST, 0x63
1534
-.equ APPLYMOVE_IDEA, 0x64
1535
-.equ APPLYMOVE_ANGRY, 0x65
1536
-.equ APPLYMOVE_CONCERNED, 0x66
1537
-.equ APPLYMOVE_TREESMASH, 0x69
1538
-.equ APPLYMOVE_RUN_DOWN, 0x74
1539
-.equ APPLYMOVE_RUN_UP, 0x75
1540
-.equ APPLYMOVE_RUN_LEFT, 0x76
1541
-.equ APPLYMOVE_RUN_RIGHT, 0x77
1542
-.equ APPLYMOVE_JUMP_TWO_DOWN, 0x84
1543
-.equ APPLYMOVE_JUMP_TWO_UP, 0x85
1544
-.equ APPLYMOVE_JUMP_TWO_LEFT, 0x86
1545
-.equ APPLYMOVE_JUMP_TWO_RIGHT, 0x87
1546
-.equ APPLYMOVE_GO_CLOCKWISE_DOWN, 0x94
1547
-.equ APPLYMOVE_GO_CLOCKWISE_UP, 0x95
1548
-.equ APPLYMOVE_GO_CLOCKWISE_LEFT, 0x96
1549
-.equ APPLYMOVE_GO_CLOCKWISE_RIGHT, 0x97
1550
-.equ APPLYMOVE_GO_PIXELWISE_DOWN, 0x9b
1551
-.equ APPLYMOVE_GO_PIXELWISE_UP, 0x9c
1552
-.equ APPLYMOVE_GO_PIXELWISE_LEFT, 0x9d
1553
-.equ APPLYMOVE_GO_PIXELWISE_RIGHT, 0x9e
1554
-.equ APPLYMOVE_SLIDE_NO_MOVEMENT_DOWN, 0xa0
1555
-.equ APPLYMOVE_SLIDE_NO_MOVEMENT_UP, 0xa1
1556
-.equ APPLYMOVE_SLIDE_NO_MOVEMENT_LEFT, 0xa2
1557
-.equ APPLYMOVE_SLIDE_NO_MOVEMENT_RIGHT, 0xa3
1558
-.equ APPLYMOVE_TELEPORT_MOVE, 0xa4
1559
-.equ APPLYMOVE_FALLING_DOWN_MOVE, 0xa5
1560
-.equ APPLYMOVE_END, 0xfe
1476
+.equ LOOK_UP, 0x1
1477
+.equ LOOK_LEFT, 0x2
1478
+.equ LOOK_RIGHT, 0x3
1479
+.equ LOOK_DOWN, 0x4
1480
+.equ STEP_DOWN_VERY_SLOW, 0x8
1481
+.equ STEP_UP_VERY_SLOW, 0x9
1482
+.equ STEP_LEFT_VERY_SLOW, 0xa
1483
+.equ STEP_RIGHT_VERY_SLOW, 0xb
1484
+.equ STEP_DOWN_SLOW, 0xc
1485
+.equ STEP_UP_SLOW, 0xd
1486
+.equ STEP_LEFT_SLOW, 0xe
1487
+.equ STEP_RIGHT_SLOW, 0xf
1488
+.equ STEP_DOWN, 0x10
1489
+.equ STEP_UP, 0x11
1490
+.equ STEP_LEFT, 0x12
1491
+.equ STEP_RIGHT, 0x13
1492
+.equ JUMP_DOWN2, 0x14
1493
+.equ JUMP_UP2, 0x15
1494
+.equ JUMP_LEFT2, 0x16
1495
+.equ JUMP_RIGHT2, 0x17
1496
+.equ STEP_DOWN_FAST, 0x1d
1497
+.equ STEP_UP_FAST, 0x1e
1498
+.equ STEP_LEFT_FAST, 0x1f
1499
+.equ STEP_RIGHT_FAST, 0x20
1500
+.equ STEP_IN_PLACE_DOWN, 0x21
1501
+.equ STEP_IN_PLACE_UP, 0x22
1502
+.equ STEP_IN_PLACE_LEFT, 0x23
1503
+.equ STEP_IN_PLACE_RIGHT, 0x24
1504
+.equ STEP_IN_PLACE_DOWN_FAST, 0x25
1505
+.equ STEP_IN_PLACE_UP_FAST, 0x26
1506
+.equ STEP_IN_PLACE_LEFT_FAST, 0x27
1507
+.equ STEP_IN_PLACE_RIGHT_FAST, 0x28
1508
+.equ STEP_IN_PLACE_DOWN_VERY_FAST, 0x29
1509
+.equ STEP_IN_PLACE_UP_VERY_FAST, 0x2a
1510
+.equ STEP_IN_PLACE_LEFT_VERY_FAST, 0x2b
1511
+.equ STEP_IN_PLACE_RIGHT_VERY_FAST, 0x2c
1512
+.equ LOOK_DOWN_DELAYED, 0x2d
1513
+.equ LOOK_UP_DELAYED, 0x2e
1514
+.equ LOOK_LEFT_DELAYED, 0x2f
1515
+.equ LOOK_RIGHT_DELAYED, 0x30
1516
+.equ SLIDE_DOWN, 0x31
1517
+.equ SLIDE_UP, 0x32
1518
+.equ SLIDE_LEFT, 0x33
1519
+.equ SLIDE_RIGHT, 0x34
1520
+.equ SLIDE_DOWN_ON_RIGHT_FOOT, 0x3d
1521
+.equ SLIDE_UP_ON_RIGHT_FOOT, 0x3e
1522
+.equ SLIDE_LEFT_ON_RIGHT_FOOT, 0x3f
1523
+.equ SLIDE_RIGHT_ON_RIGHT_FOOT, 0x40
1524
+.equ SLIDE_DOWN_ON_LEFT_FOOT, 0x41
1525
+.equ SLIDE_UP_ON_LEFT_FOOT, 0x42
1526
+.equ SLIDE_LEFT_ON_LEFT_FOOT, 0x43
1527
+.equ SLIDE_RIGHT_ON_LEFT_FOOT, 0x44
1528
+.equ RUN_INFINITLY, 0x45
1529
+.equ JUMP_DOWN_RUNNING, 0x46
1530
+.equ JUMP_UP_RUNNING, 0x47
1531
+.equ JUMP_LEFT_RUNNING, 0x48
1532
+.equ JUMP_RIGHT_RUNNING, 0x49
1533
+.equ FACE_PLAYER, 0x4a
1534
+.equ FACE_AWAY_FROM_PLAYER, 0x4b
1535
+.equ JUMP_DOWN, 0x4e
1536
+.equ JUMP_UP, 0x4f
1537
+.equ JUMP_LEFT, 0x50
1538
+.equ JUMP_RIGHT, 0x51
1539
+.equ JUMP_IN_PLACE_FACE_DOWN, 0x52
1540
+.equ JUMP_IN_PLACE_FACE_UP, 0x53
1541
+.equ JUMP_IN_PLACE_FACE_LEFT, 0x54
1542
+.equ JUMP_IN_PLACE_FACE_RIGHT, 0x55
1543
+.equ JUMP_IN_PLACE_FACE_DOWN_TO_UP, 0x56
1544
+.equ JUMP_IN_PLACE_FACE_UP_TO_DOWN, 0x57
1545
+.equ JUMP_IN_PLACE_FACE_LEFT_TO_RIGHT, 0x58
1546
+.equ JUMP_IN_PLACE_FACE_RIGHT_TO_LEFT, 0x59
1547
+.equ HIDE_SPRITE, 0x60
1548
+.equ SHOW_SPRITE, 0x61
1549
+.equ SAY_EXCLAM, 0x62
1550
+.equ SAY_QUESTION, 0x63
1551
+.equ SAY_X, 0x64
1552
+.equ SAY_DOUBLE_EXCLAM, 0x65
1553
+.equ SAY_SMILE, 0x66
1554
+.equ MOVEX_DOWN, 0x6e
1555
+.equ MOVEY_DOWN, 0x6f
1556
+.equ LOOK_RIGHT_LEFT_DOWNFACING, 0x78
1557
+.equ LIFT_DOWN, 0xa0
1558
+.equ LIFT_UP, 0xa1
1559
+.equ LIFT_LEFT, 0xa2
1560
+.equ LIFT_RIGHT, 0xa3
1561
+.equ FLY_OUT_OF_SCREEN, 0xa5
1562
+.equ FLY_FROM_SCREEN, 0xa6
1563
+.equ STOP, 0xfe
1561
 
1564
 
1562
 
1565
 
1563
 
1566
 

+ 24
- 14
src/include/script_language.h View File

167
 .macro callif if1_value:req if1_pointer:req
167
 .macro callif if1_value:req if1_pointer:req
168
 .byte 0x6
168
 .byte 0x6
169
 .byte \if1_value
169
 .byte \if1_value
170
-.word \if1_address
170
+.word \if1_pointer
171
 .endm
171
 .endm
172
 
172
 
173
 .macro gotoif if2_value:req if2_pointer:req
173
 .macro gotoif if2_value:req if2_pointer:req
174
 .byte 0x7
174
 .byte 0x7
175
 .byte \if2_value
175
 .byte \if2_value
176
-.word \if2_address
176
+.word \if2_pointer
177
 .endm
177
 .endm
178
 
178
 
179
 .macro callstd callstd_call:req
179
 .macro callstd callstd_call:req
217
 
217
 
218
 .macro copyvar copyvar_variableADestin:req copyvar_variableBSource:req
218
 .macro copyvar copyvar_variableADestin:req copyvar_variableBSource:req
219
 .byte 0x19
219
 .byte 0x19
220
-.hword copyvar_variableADestin
221
-.hword copyvar_variableBSource
220
+.hword \copyvar_variableADestin
221
+.hword \copyvar_variableBSource
222
 .endm
222
 .endm
223
 
223
 
224
-.macro setvarifnotzero setvarifnotzero_variableADestin:req setvarifnotzero_variableBSource:req
224
+.macro copyvarifnotzero copyvarifnotzero_variableADestin:req copyvarifnotzero_variableBSource:req
225
 .byte 0x1A
225
 .byte 0x1A
226
-.hword setvarifnotzero_variableADestin
227
-.hword setvarifnotzero_variableBSource
226
+.hword \copyvarifnotzero_variableADestin
227
+.hword \copyvarifnotzero_variableBSource
228
 .endm
228
 .endm
229
 
229
 
230
 .macro compare compare_variable:req compare_value:req
230
 .macro compare compare_variable:req compare_value:req
312
 .hword \playsong2_song
312
 .hword \playsong2_song
313
 .endm
313
 .endm
314
 
314
 
315
-.macro fadedefault
315
+.macro songfadedefault
316
 .byte 0x35
316
 .byte 0x35
317
 .endm
317
 .endm
318
 
318
 
490
 .hword \movesprite_y
490
 .hword \movesprite_y
491
 .endm
491
 .endm
492
 
492
 
493
-.macro spritevisible spritevisible_people:req spritevisible_bank:req movesprite_map:req
493
+.macro spritevisible spritevisible_people:req spritevisible_bank:req spritevisible_map:req
494
 .byte 0x58
494
 .byte 0x58
495
 .hword \spritevisible_people
495
 .hword \spritevisible_people
496
 .byte \spritevisible_bank
496
 .byte \spritevisible_bank
514
 .byte \spriteface_facing
514
 .byte \spriteface_facing
515
 .endm
515
 .endm
516
 
516
 
517
-.macro trainerbattle trainerbattle_kind:req trainerbattle_id:req trainerbattle_value:req trainerbattle_before:req trainerbattle_after:req trainerbattle_later:req
517
+.macro trainerbattle trainerbattle_kind:req trainerbattle_id:req trainerbattle_value:req trainerbattle_before:req trainerbattle_after:req trainerbattle_later
518
 .byte 0x5C
518
 .byte 0x5C
519
 .byte \trainerbattle_kind
519
 .byte \trainerbattle_kind
520
 .hword \trainerbattle_id
520
 .hword \trainerbattle_id
566
 .macro spritebehave spritebehave_people:req spritebehave_facing:req
566
 .macro spritebehave spritebehave_people:req spritebehave_facing:req
567
 .byte 0x65
567
 .byte 0x65
568
 .hword \spritebehave_people
568
 .hword \spritebehave_people
569
-.byte \spritebehave_behaviour
569
+.byte \spritebehave_facing
570
 .endm
570
 .endm
571
 
571
 
572
 .macro waitmsg
572
 .macro waitmsg
650
 .word \braile_data
650
 .word \braile_data
651
 .endm
651
 .endm
652
 
652
 
653
-.macro givepokemon givepokemon_spezies:req givepokemon_level:req givepokemon_item:req
653
+.macro givepokemon givepokemon_spezies:req givepokemon_level:req givepokemon_item:req givepokemon_one givepokemon_two givepokemon_three
654
 .byte 0x79
654
 .byte 0x79
655
 .hword \givepokemon_spezies
655
 .hword \givepokemon_spezies
656
 .byte \givepokemon_level
656
 .byte \givepokemon_level
721
 .macro bufferstring bufferstring_buffernumber:req bufferstring_string:req
721
 .macro bufferstring bufferstring_buffernumber:req bufferstring_string:req
722
 .byte 0x85
722
 .byte 0x85
723
 .byte \bufferstring_buffernumber
723
 .byte \bufferstring_buffernumber
724
-.hword \bufferstring_string
724
+.word \bufferstring_string
725
 .endm
725
 .endm
726
 
726
 
727
 .macro pokemart pokemart_list:req
727
 .macro pokemart pokemart_list:req
729
 .word \pokemart_list
729
 .word \pokemart_list
730
 .endm
730
 .endm
731
 
731
 
732
+.macro pokemart3 pokemart_list_three:req
733
+.byte 0x86
734
+.word \pokemart_list_three
735
+.endm
736
+
732
 .macro random random_possiblities:req
737
 .macro random random_possiblities:req
733
 .byte 0x8F
738
 .byte 0x8F
734
 .hword \random_possiblities
739
 .hword \random_possiblities
746
 .byte \paymoney_command
751
 .byte \paymoney_command
747
 .endm
752
 .endm
748
 
753
 
749
-.macro checkmoney checkmoney_quantity:req paymoney_command:req
754
+.macro checkmoney checkmoney_quantity:req checkmoney_command:req
750
 .byte 0x92
755
 .byte 0x92
751
 .word \checkmoney_quantity
756
 .word \checkmoney_quantity
752
 .byte \checkmoney_command
757
 .byte \checkmoney_command
920
 .byte 0xB7
925
 .byte 0xB7
921
 .endm
926
 .endm
922
 
927
 
928
+.macro savincrementkey attr:req
929
+.byte 0xC3
930
+.byte \attr
931
+.endm
932
+
923
 .macro waitcry
933
 .macro waitcry
924
 .byte 0xC5
934
 .byte 0xC5
925
 .endm
935
 .endm