Browse Source

fix some grass stuff, add test scripts and text

SBird1337 7 years ago
parent
commit
391cb3c922

+ 2
- 2
main.asm View File

37
 .include "patches/pokemon_data/pokemon_habitats.asm"
37
 .include "patches/pokemon_data/pokemon_habitats.asm"
38
 .include "patches/pokemon_data/pokemon_evolution.asm"
38
 .include "patches/pokemon_data/pokemon_evolution.asm"
39
 
39
 
40
-.include "patches/overworlds/pkm_wild.asm"
40
+//.include "patches/overworlds/pkm_wild.asm"
41
 //.include "patches/dns/core.asm"
41
 //.include "patches/dns/core.asm"
42
 
42
 
43
 .include "patches/overworlds/overworld.asm"
43
 .include "patches/overworlds/overworld.asm"
57
 .org 0x0815F9B8
57
 .org 0x0815F9B8
58
     .word 0x08069ED5 // fix nop1 for now...
58
     .word 0x08069ED5 // fix nop1 for now...
59
 
59
 
60
-.org 0x083522F0
60
+.org 0x083522F4
61
     .word mapheader_alabastia
61
     .word mapheader_alabastia
62
 
62
 
63
 .org 0x0834ECC0
63
 .org 0x0834ECC0

+ 86
- 85
src/include/script_language.h View File

2
 #include <applymovements.h>
2
 #include <applymovements.h>
3
 
3
 
4
 @@ Compare operands
4
 @@ Compare operands
5
-.equ <, 0x0
6
-.equ ==, 0x1
7
-.equ >, 0x2
8
-.equ <=, 0x3
9
-.equ >=, 0x4
10
-.equ !=, 0x5
5
+.equ B_LT, 0x0
6
+.equ B_EQ, 0x1
7
+.equ B_GT, 0x2
8
+.equ B_LE, 0x3
9
+.equ B_GE, 0x4
10
+.equ B_NE, 0x5
11
 
11
 
12
 @@ Flag operands
12
 @@ Flag operands
13
-.equ !, 0x0
14
-.equ =, 0x1
13
+.equ B_T, 0x0
14
+.equ B_F, 0x1
15
 
15
 
16
 
16
 
17
 @@@@@@@@@@@@@@@@@ Macro
17
 @@@@@@@@@@@@@@@@@ Macro
23
 callstd \msgbox_callstd
23
 callstd \msgbox_callstd
24
 .endm
24
 .endm
25
 
25
 
26
-.marco giveitem giveitem_item giveitem_quantity giveitem_messagetyp
26
+.macro giveitem giveitem_item giveitem_quantity giveitem_messagetyp
27
 setvarifnotzero 0x8000 \giveitem_item
27
 setvarifnotzero 0x8000 \giveitem_item
28
 setvarifnotzero 0x8001 \giveitem_quantity
28
 setvarifnotzero 0x8001 \giveitem_quantity
29
 callstd \giveitem_messagetyp
29
 callstd \giveitem_messagetyp
30
 .endm
30
 .endm
31
 
31
 
32
-.marco giveitem2 giveitem2_item giveitem2_quantity giveitem2_song
32
+.macro giveitem2 giveitem2_item giveitem2_quantity giveitem2_song
33
 setvarifnotzero 0x8000 \giveitem2_item
33
 setvarifnotzero 0x8000 \giveitem2_item
34
 setvarifnotzero 0x8001 \giveitem2_quantity
34
 setvarifnotzero 0x8001 \giveitem2_quantity
35
 setvarifnotzero 0x8002 \giveitem2_song
35
 setvarifnotzero 0x8002 \giveitem2_song
36
 callstd 0x9
36
 callstd 0x9
37
 .endm
37
 .endm
38
 
38
 
39
-.marco wildbattle wildbattle_spezies wildbattle_level wildbattle_item
39
+.macro wildbattle wildbattle_spezies wildbattle_level wildbattle_item
40
 setwildbattle \wildbattle_spezies \wildbattle_level \wildbattle_item
40
 setwildbattle \wildbattle_spezies \wildbattle_level \wildbattle_item
41
 dowildbattle
41
 dowildbattle
42
 .endm
42
 .endm
43
 
43
 
44
-.marco wildbattle2 wildbattle2_spezies wildbattle2_level wildbattle2_item wildbattle2_battlestyle
44
+.macro wildbattle2 wildbattle2_spezies wildbattle2_level wildbattle2_item wildbattle2_battlestyle
45
 setwildbattle \wildbattle2_spezies \wildbattle2_level \wildbattle2_item
45
 setwildbattle \wildbattle2_spezies \wildbattle2_level \wildbattle2_item
46
 special 0x137
46
 special 0x137
47
 waitstate
47
 waitstate
48
 .endm
48
 .endm
49
 
49
 
50
-.marco msgmugr msgmugr_textpointer msgmugr_callstd msgmugr_sprite
50
+.macro msgmugr msgmugr_textpointer msgmugr_callstd msgmugr_sprite
51
 setvar MUGHSOT_1_TABLE \msgmugr_sprite
51
 setvar MUGHSOT_1_TABLE \msgmugr_sprite
52
 setvar MUGSHOT_1_X 0xD0
52
 setvar MUGSHOT_1_X 0xD0
53
 setvar MUGSHOT_1_Y 0x60
53
 setvar MUGSHOT_1_Y 0x60
55
 setvar MUGHSOT_1_TABLE 0x0
55
 setvar MUGHSOT_1_TABLE 0x0
56
 .endm
56
 .endm
57
 
57
 
58
-.marco msgmugl msgmugl_textpointer msgmugl_callstd msgmugl_sprite
58
+.macro msgmugl msgmugl_textpointer msgmugl_callstd msgmugl_sprite
59
 setvar MUGHSOT_1_TABLE \msgmugl_sprite
59
 setvar MUGHSOT_1_TABLE \msgmugl_sprite
60
 setvar MUGSHOT_1_X 0x16
60
 setvar MUGSHOT_1_X 0x16
61
 setvar MUGSHOT_1_Y 0x60
61
 setvar MUGSHOT_1_Y 0x60
63
 setvar MUGHSOT_1_TABLE 0x0
63
 setvar MUGHSOT_1_TABLE 0x0
64
 .endm
64
 .endm
65
 
65
 
66
-.marco transparenzon
66
+.macro transparenzon
67
 clearflag FLAG_ACTIVATE
67
 clearflag FLAG_ACTIVATE
68
 .endm
68
 .endm
69
 
69
 
70
-.marco transparenzoff
70
+.macro transparenzoff
71
 setflag FLAG_ACTIVATE
71
 setflag FLAG_ACTIVATE
72
 .endm
72
 .endm
73
 
73
 
74
-.marco battlescreen battlescreen_grass battlescreen_sea
74
+.macro battlescreen battlescreen_grass battlescreen_sea
75
 setvar NORMAL_VAR \battlescreen_grass
75
 setvar NORMAL_VAR \battlescreen_grass
76
 setvar SEA_VAR \battlescreen_sea
76
 setvar SEA_VAR \battlescreen_sea
77
 .endm
77
 .endm
78
 
78
 
79
-.marco cameramove cameramove_xpos cameramove_ypos
79
+.macro cameramove cameramove_xpos cameramove_ypos
80
 setvar CAMERA_VAR_X \cameramove_xpos
80
 setvar CAMERA_VAR_X \cameramove_xpos
81
 setvar CAMERA_VAR_Y \cameramove_ypos
81
 setvar CAMERA_VAR_Y \cameramove_ypos
82
 setvar CALLASM_VAR 0x1
82
 setvar CALLASM_VAR 0x1
83
 special 0x68
83
 special 0x68
84
 .endm
84
 .endm
85
 
85
 
86
-.marco walkingscript \walkingscript_value
86
+.macro walkingscript walkingscript_value
87
 setvar WALK_SCRIPT_VAR \walkingscript_value
87
 setvar WALK_SCRIPT_VAR \walkingscript_value
88
 .endm
88
 .endm
89
 
89
 
90
-.marco walkingscripton
90
+.macro walkingscripton
91
 setflag FLAG_WALK_SCRIPT
91
 setflag FLAG_WALK_SCRIPT
92
 .endm
92
 .endm
93
 
93
 
94
-.marco walkingscriptoff
94
+.macro walkingscriptoff
95
 clearflag FLAG_WALK_SCRIPT
95
 clearflag FLAG_WALK_SCRIPT
96
 .endm
96
 .endm
97
 
97
 
98
-.marco writemusikto1 writemusikto1_from writemusikto1_to
98
+.macro writemusikto1 writemusikto1_from writemusikto1_to
99
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
99
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
100
 setvar VAR_FROM_1 \writemusikto1_from
100
 setvar VAR_FROM_1 \writemusikto1_from
101
 setvar VAR_TO_1 \writemusikto1_to
101
 setvar VAR_TO_1 \writemusikto1_to
102
 .endm
102
 .endm
103
 
103
 
104
-.marco writemusikto2 writemusikto2_from writemusikto2_to
104
+.macro writemusikto2 writemusikto2_from writemusikto2_to
105
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
105
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
106
 setvar VAR_FROM_2 \writemusikto2_from
106
 setvar VAR_FROM_2 \writemusikto2_from
107
 setvar VAR_TO_2 \writemusikto2_to
107
 setvar VAR_TO_2 \writemusikto2_to
108
 .endm
108
 .endm
109
 
109
 
110
-.marco writemusikto3 writemusikto3_from writemusikto3_to
110
+.macro writemusikto3 writemusikto3_from writemusikto3_to
111
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
111
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
112
 setvar VAR_FROM_3 \writemusikto3_from
112
 setvar VAR_FROM_3 \writemusikto3_from
113
 setvar VAR_TO_3 \writemusikto3_to
113
 setvar VAR_TO_3 \writemusikto3_to
114
 .endm
114
 .endm
115
 
115
 
116
-.marco writemusikwithmapmusik \writemusikwithmapmusik_mapmusik
116
+.macro writemusikwithmapmusik writemusikwithmapmusik_mapmusik
117
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
117
 setflag FLAG_ENABLE_MUSIC_OVERRIDES
118
 setvar VAR_FROM_1 \writemusikwithmapmusik_mapmusik
118
 setvar VAR_FROM_1 \writemusikwithmapmusik_mapmusik
119
 setvar VAR_TO_1 MUS_SKIP_PLAY
119
 setvar VAR_TO_1 MUS_SKIP_PLAY
120
+.endm
120
 
121
 
121
-
122
-.marco writemusikoff
122
+.macro writemusikoff
123
 clearflag FLAG_ENABLE_MUSIC_OVERRIDES
123
 clearflag FLAG_ENABLE_MUSIC_OVERRIDES
124
 .endm
124
 .endm
125
 
125
 
230
 .hword \comparevars_variableB
230
 .hword \comparevars_variableB
231
 .endm
231
 .endm
232
 
232
 
233
-.marco callasm callasm_address
233
+.macro callasm callasm_address
234
 .byte 0x23
234
 .byte 0x23
235
 .word \callasm_address
235
 .word \callasm_address
236
 .endm
236
 .endm
237
 
237
 
238
-.marco special special_number
238
+.macro special special_number
239
 .byte 0x25
239
 .byte 0x25
240
 .hword \special_number
240
 .hword \special_number
241
 .endm
241
 .endm
242
 
242
 
243
-.marco special2 special2_variable special2_number
243
+.macro special2 special2_variable special2_number
244
 .byte 0x26
244
 .byte 0x26
245
 .hword \special2_variable
245
 .hword \special2_variable
246
 .hword \special2_number
246
 .hword \special2_number
315
 .macro fadeout fadeout_volume
315
 .macro fadeout fadeout_volume
316
 .byte 0x37
316
 .byte 0x37
317
 .byte \fadeout_volume
317
 .byte \fadeout_volume
318
-
318
+.endm
319
 
319
 
320
 .macro fadein fadein_volume
320
 .macro fadein fadein_volume
321
 .byte 0x38
321
 .byte 0x38
322
 .byte \fadein_volume
322
 .byte \fadein_volume
323
 .endm
323
 .endm
324
 
324
 
325
-.marco warp warp_bank warp_map warp_exit warp_x warp_y
325
+.macro warp warp_bank warp_map warp_exit warp_x warp_y
326
 .byte 0x39
326
 .byte 0x39
327
 .byte \warp_bank
327
 .byte \warp_bank
328
 .byte \warp_map
328
 .byte \warp_map
331
 .hword \warp_y
331
 .hword \warp_y
332
 .endm
332
 .endm
333
 
333
 
334
-.marco warpmuted warpmuted_bank warpmuted_map warpmuted_exit warpmuted_x warpmuted_y
334
+.macro warpmuted warpmuted_bank warpmuted_map warpmuted_exit warpmuted_x warpmuted_y
335
 .byte 0x3A
335
 .byte 0x3A
336
 .byte \warpmuted_bank
336
 .byte \warpmuted_bank
337
 .byte \warpmuted_map
337
 .byte \warpmuted_map
340
 .hword \warpmuted_y
340
 .hword \warpmuted_y
341
 .endm
341
 .endm
342
 
342
 
343
-.marco warpwalk warpwalk_bank warpwalk_map warpwalk_exit warpwalk_x warpwalk_y
343
+.macro warpwalk warpwalk_bank warpwalk_map warpwalk_exit warpwalk_x warpwalk_y
344
 .byte 0x3B
344
 .byte 0x3B
345
 .byte \warpwalk_bank
345
 .byte \warpwalk_bank
346
 .byte \warpwalk_map
346
 .byte \warpwalk_map
349
 .hword \warpwalk_y
349
 .hword \warpwalk_y
350
 .endm
350
 .endm
351
 
351
 
352
-.marco warphole warphole_bank warphole_map
352
+.macro warphole warphole_bank warphole_map
353
 .byte 0x3C
353
 .byte 0x3C
354
 .byte \warphole_bank
354
 .byte \warphole_bank
355
 .byte \warphole_map
355
 .byte \warphole_map
356
 .endm
356
 .endm
357
 
357
 
358
-.marco warpteleport warpteleport_bank warpteleport_map warpteleport_exit warpteleport_x warpteleport_y
358
+.macro warpteleport warpteleport_bank warpteleport_map warpteleport_exit warpteleport_x warpteleport_y
359
 .byte 0x3D
359
 .byte 0x3D
360
 .byte \warpteleport_bank
360
 .byte \warpteleport_bank
361
 .byte \warpteleport_map
361
 .byte \warpteleport_map
364
 .hword \warpteleport_y
364
 .hword \warpteleport_y
365
 .endm
365
 .endm
366
 
366
 
367
-.marco setwarpplace setwarpplace_bank setwarpplace_map setwarpplace_exit setwarpplace_x setwarpplace_y
367
+.macro setwarpplace setwarpplace_bank setwarpplace_map setwarpplace_exit setwarpplace_x setwarpplace_y
368
 .byte 0x3F
368
 .byte 0x3F
369
 .byte \setwarpplace_bank
369
 .byte \setwarpplace_bank
370
 .byte \setwarpplace_map
370
 .byte \setwarpplace_map
373
 .hword \setwarpplace_y
373
 .hword \setwarpplace_y
374
 .endm
374
 .endm
375
 
375
 
376
-.marco getplayerpos getplayerpos_variableX getplayerpos_variableY
376
+.macro getplayerpos getplayerpos_variableX getplayerpos_variableY
377
 .byte 0x42
377
 .byte 0x42
378
 .hword \getplayerpos_variableX
378
 .hword \getplayerpos_variableX
379
 .hword \getplayerpos_variableY
379
 .hword \getplayerpos_variableY
383
 .byte 0x43
383
 .byte 0x43
384
 .endm
384
 .endm
385
 
385
 
386
-.marco additem additem_item additem_quantity
386
+.macro additem additem_item additem_quantity
387
 .byte 0x44
387
 .byte 0x44
388
 .hword \additem_item
388
 .hword \additem_item
389
 .hword \additem_quantity
389
 .hword \additem_quantity
390
 .endm
390
 .endm
391
 
391
 
392
-.marco removeitem removeitem_item removeitem_quantity
392
+.macro removeitem removeitem_item removeitem_quantity
393
 .byte 0x45
393
 .byte 0x45
394
 .hword \removeitem_item
394
 .hword \removeitem_item
395
 .hword \removeitem_quantity
395
 .hword \removeitem_quantity
396
 .endm
396
 .endm
397
 
397
 
398
-.marco checkitemroom checkitemroom_item checkitemroom_quantity
398
+.macro checkitemroom checkitemroom_item checkitemroom_quantity
399
 .byte 0x46
399
 .byte 0x46
400
 .hword \checkitemroom_item
400
 .hword \checkitemroom_item
401
 .hword \checkitemroom_quantity
401
 .hword \checkitemroom_quantity
402
 .endm
402
 .endm
403
 
403
 
404
-.marco checkitem checkitem_item checkitem_quantity
404
+.macro checkitem checkitem_item checkitem_quantity
405
 .byte 0x47
405
 .byte 0x47
406
 .hword \checkitem_item
406
 .hword \checkitem_item
407
 .hword \checkitem_quantity
407
 .hword \checkitem_quantity
408
 .endm
408
 .endm
409
 
409
 
410
-.marco checkitemtype checkitemtype_item
410
+.macro checkitemtype checkitemtype_item
411
 .byte 0x48
411
 .byte 0x48
412
 .hword \checkitemtype_item
412
 .hword \checkitemtype_item
413
 .endm
413
 .endm
414
 
414
 
415
-.marco addpcitem addpcitem_item addpcitem_quantity
415
+.macro addpcitem addpcitem_item addpcitem_quantity
416
 .byte 0x49
416
 .byte 0x49
417
 .hword \addpcitem_item
417
 .hword \addpcitem_item
418
 .hword \addpcitem_quantity
418
 .hword \addpcitem_quantity
419
 .endm
419
 .endm
420
 
420
 
421
-.marco checkpcitem checkpcitem_item checkpcitem_quantity
421
+.macro checkpcitem checkpcitem_item checkpcitem_quantity
422
 .byte 0x4A
422
 .byte 0x4A
423
 .hword \checkpcitem_item
423
 .hword \checkpcitem_item
424
 .hword \checkpcitem_quantity
424
 .hword \checkpcitem_quantity
425
 .endm
425
 .endm
426
 
426
 
427
-.marco applymovement applymovement_people applymovement_movedata
427
+.macro applymovement applymovement_people applymovement_movedata
428
 .byte 0x4F
428
 .byte 0x4F
429
 .hword \applymovement_people
429
 .hword \applymovement_people
430
 .word \applymovement_movedata
430
 .word \applymovement_movedata
431
 .endm
431
 .endm
432
 
432
 
433
-.marco applymovementpos applymovementpos_people applymovementpos_movedata applymovementpos_x applymovementpos_y
433
+.macro applymovementpos applymovementpos_people applymovementpos_movedata applymovementpos_x applymovementpos_y
434
 .byte 0x50
434
 .byte 0x50
435
 .hword \applymovementpos_people
435
 .hword \applymovementpos_people
436
 .word \applymovementpos_movedata
436
 .word \applymovementpos_movedata
438
 .byte \applymovementpos_y
438
 .byte \applymovementpos_y
439
 .endm
439
 .endm
440
 
440
 
441
-.marco waitmovement waitmovement_people
441
+.macro waitmovement waitmovement_people
442
 .byte 0x51
442
 .byte 0x51
443
 .hword \waitmovement_people
443
 .hword \waitmovement_people
444
 .endm
444
 .endm
445
 
445
 
446
-.marco waitmovementpos waitmovementpos_people waitmovementpos_x waitmovementpos_y
446
+.macro waitmovementpos waitmovementpos_people waitmovementpos_x waitmovementpos_y
447
 .byte 0x52
447
 .byte 0x52
448
 .hword \waitmovementpos_people
448
 .hword \waitmovementpos_people
449
 .byte \waitmovementpos_x
449
 .byte \waitmovementpos_x
450
 .byte \waitmovementpos_y
450
 .byte \waitmovementpos_y
451
 .endm
451
 .endm
452
 
452
 
453
-.marco hidesprite hidesprite_people
453
+.macro hidesprite hidesprite_people
454
 .byte 0x53
454
 .byte 0x53
455
 .hword \hidesprite_people
455
 .hword \hidesprite_people
456
 .endm
456
 .endm
457
 
457
 
458
-.marco hidespritepos hidesprite_people hidespritepos_x hidespritepos_y
458
+.macro hidespritepos hidesprite_people hidespritepos_x hidespritepos_y
459
 .byte 0x54
459
 .byte 0x54
460
 .hword \hidespritepos_people
460
 .hword \hidespritepos_people
461
 .byte \hidespritepos_x
461
 .byte \hidespritepos_x
462
 .byte \hidespritepos_y
462
 .byte \hidespritepos_y
463
 .endm
463
 .endm
464
 
464
 
465
-.marco showsprite showsprite_people
465
+.macro showsprite showsprite_people
466
 .byte 0x55
466
 .byte 0x55
467
 .hword \showsprite_people
467
 .hword \showsprite_people
468
 .endm
468
 .endm
469
 
469
 
470
-.marco showspritepos showspritepos_people showspritepos_x showspritepos_y
470
+.macro showspritepos showspritepos_people showspritepos_x showspritepos_y
471
 .byte 0x56
471
 .byte 0x56
472
 .hword \showspritepos_people
472
 .hword \showspritepos_people
473
 .byte \showspritepos_x
473
 .byte \showspritepos_x
474
 .byte \showspritepos_y
474
 .byte \showspritepos_y
475
 .endm
475
 .endm
476
 
476
 
477
-.marco movesprite movesprite_people movesprite_x movesprite_y
477
+.macro movesprite movesprite_people movesprite_x movesprite_y
478
 .byte 0x57
478
 .byte 0x57
479
 .hword \movesprite_people
479
 .hword \movesprite_people
480
 .hword \movesprite_x
480
 .hword \movesprite_x
481
 .hword \movesprite_y
481
 .hword \movesprite_y
482
 .endm
482
 .endm
483
 
483
 
484
-.marco spritevisible spritevisible_people spritevisible_bank movesprite_map
484
+.macro spritevisible spritevisible_people spritevisible_bank movesprite_map
485
 .byte 0x58
485
 .byte 0x58
486
 .hword \spritevisible_people
486
 .hword \spritevisible_people
487
 .byte \spritevisible_bank
487
 .byte \spritevisible_bank
488
 .byte \spritevisible_map
488
 .byte \spritevisible_map
489
 .endm
489
 .endm
490
 
490
 
491
-.marco spriteinvisible spriteinvisible_people spriteinvisible_bank spriteinvisible_map
491
+.macro spriteinvisible spriteinvisible_people spriteinvisible_bank spriteinvisible_map
492
 .byte 0x59
492
 .byte 0x59
493
 .hword \spriteinvisible_people
493
 .hword \spriteinvisible_people
494
 .byte \spriteinvisible_bank
494
 .byte \spriteinvisible_bank
499
 .byte 0x5A
499
 .byte 0x5A
500
 .endm
500
 .endm
501
 
501
 
502
-.marco spriteface spriteface_people spriteface_facing
502
+.macro spriteface spriteface_people spriteface_facing
503
 .byte 0x5B
503
 .byte 0x5B
504
 .hword \spriteface_people
504
 .hword \spriteface_people
505
 .byte \spriteface_facing
505
 .byte \spriteface_facing
506
 .endm
506
 .endm
507
 
507
 
508
-.marco trainerbattle trainerbattle_kind trainerbattle_id trainerbattle_value trainerbattle_before trainerbattle_after trainerbattle_later
508
+.macro trainerbattle trainerbattle_kind trainerbattle_id trainerbattle_value trainerbattle_before trainerbattle_after trainerbattle_later
509
 .byte 0x5C
509
 .byte 0x5C
510
 .byte \trainerbattle_kind
510
 .byte \trainerbattle_kind
511
 .hword \trainerbattle_id
511
 .hword \trainerbattle_id
542
 .hword \cleartrainerflag_flag
542
 .hword \cleartrainerflag_flag
543
 .endm
543
 .endm
544
 
544
 
545
-.marco movesprite2 movesprite2_people movesprite2_x movesprite2_y
545
+.macro movesprite2 movesprite2_people movesprite2_x movesprite2_y
546
 .byte 0x63
546
 .byte 0x63
547
 .hword \movesprite2_people
547
 .hword \movesprite2_people
548
 .hword \movesprite2_x
548
 .hword \movesprite2_x
549
 .hword \movesprite2_y
549
 .hword \movesprite2_y
550
 .endm
550
 .endm
551
 
551
 
552
-.marco moveoffscreen moveoffscreen_people
552
+.macro moveoffscreen moveoffscreen_people
553
 .byte 0x64
553
 .byte 0x64
554
 .hword \moveoffscreen_people
554
 .hword \moveoffscreen_people
555
 .endm
555
 .endm
556
 
556
 
557
-.marco spritebehave spritebehave_people spritebehave_facing
557
+.macro spritebehave spritebehave_people spritebehave_facing
558
 .byte 0x65
558
 .byte 0x65
559
 .hword \spritebehave_people
559
 .hword \spritebehave_people
560
 .byte \spritebehave_behaviour
560
 .byte \spritebehave_behaviour
625
 .byte \multichoice3_determines
625
 .byte \multichoice3_determines
626
 .endm
626
 .endm
627
 
627
 
628
-.marco showpokepic showpokepic_spezies showpokepic_x showpokepic_y
628
+.macro showpokepic showpokepic_spezies showpokepic_x showpokepic_y
629
 .byte 0x75
629
 .byte 0x75
630
 .hword \showpokepic_spezies
630
 .hword \showpokepic_spezies
631
 .byte \showpokepic_x
631
 .byte \showpokepic_x
743
 .byte \checkmoney_command
743
 .byte \checkmoney_command
744
 .endm
744
 .endm
745
 
745
 
746
-.marco showmoney showmoney_x showmoney_y showmoney_value
746
+.macro showmoney showmoney_x showmoney_y showmoney_value
747
 .byte 0x93
747
 .byte 0x93
748
 .byte \showmoney_x
748
 .byte \showmoney_x
749
 .byte \showmoney_y
749
 .byte \showmoney_y
750
 .byte \showmoney_value
750
 .byte \showmoney_value
751
 .endm
751
 .endm
752
 
752
 
753
-.marco hidemoney hidemoney_x hidemoney_y
753
+.macro hidemoney hidemoney_x hidemoney_y
754
 .byte 0x94
754
 .byte 0x94
755
 .byte \hidemoney_x
755
 .byte \hidemoney_x
756
 .byte \hidemoney_y
756
 .byte \hidemoney_y
757
 .endm
757
 .endm
758
 
758
 
759
-.marco updatemoney updatemoney_x updatemoney_y updatemoney_value
759
+.macro updatemoney updatemoney_x updatemoney_y updatemoney_value
760
 .byte 0x95
760
 .byte 0x95
761
 .byte \updatemoney_x
761
 .byte \updatemoney_x
762
 .byte \updatemoney_y
762
 .byte \updatemoney_y
763
 .byte \updatemoney_value
763
 .byte \updatemoney_value
764
 .endm
764
 .endm
765
 
765
 
766
-.marco fadescreen fadescreen_effect
766
+.macro fadescreen fadescreen_effect
767
 .byte 0x97
767
 .byte 0x97
768
 .byte \fadescreen_effect
768
 .byte \fadescreen_effect
769
 .endm
769
 .endm
770
 
770
 
771
-.marco fadescreendelay fadescreendelay_effect fadescreendelay_delay
771
+.macro fadescreendelay fadescreendelay_effect fadescreendelay_delay
772
 .byte 0x98
772
 .byte 0x98
773
 .byte \fadescreendelay_effect
773
 .byte \fadescreendelay_effect
774
 .byte \fadescreendelay_delay
774
 .byte \fadescreendelay_delay
775
 .endm
775
 .endm
776
 
776
 
777
-.marco darken darken_flashsize
777
+.macro darken darken_flashsize
778
 .byte 0x99
778
 .byte 0x99
779
 .hword \darken_flashsize
779
 .hword \darken_flashsize
780
 .endm
780
 .endm
781
 
781
 
782
-.marco lighten lighten_flashsize
782
+.macro lighten lighten_flashsize
783
 .byte 0x9A
783
 .byte 0x9A
784
 .hword \lighten_flashsize
784
 .hword \lighten_flashsize
785
 .endm
785
 .endm
786
 
786
 
787
-.marco doanimation doanimation_animation
787
+.macro doanimation doanimation_animation
788
 .byte 0x9C
788
 .byte 0x9C
789
 .hword \doanimation_animation
789
 .hword \doanimation_animation
790
 .endm
790
 .endm
791
 
791
 
792
-.marco setanimation setanimation_animation setanimation_variable
792
+.macro setanimation setanimation_animation setanimation_variable
793
 .byte 0x9D
793
 .byte 0x9D
794
 .byte \setanimation_animation
794
 .byte \setanimation_animation
795
 .hword \setanimation_variable
795
 .hword \setanimation_variable
796
 .endm
796
 .endm
797
 
797
 
798
-.marco checkanimation checkanimation_animation
798
+.macro checkanimation checkanimation_animation
799
 .byte 0x9E
799
 .byte 0x9E
800
 .hword \checkanimation_animation
800
 .hword \checkanimation_animation
801
 .endm
801
 .endm
802
 
802
 
803
-.marco sethealingplace sethealingplace_flightspot
803
+.macro sethealingplace sethealingplace_flightspot
804
 .byte 0x9F
804
 .byte 0x9F
805
 .hword \sethealingplace_flightspot
805
 .hword \sethealingplace_flightspot
806
 .endm
806
 .endm
809
 .byte 0xA0
809
 .byte 0xA0
810
 .endm
810
 .endm
811
 
811
 
812
-.marco cry cry_spezies cry_effect
812
+.macro cry cry_spezies cry_effect
813
 .byte 0xA1
813
 .byte 0xA1
814
 .hword \cry_spezies
814
 .hword \cry_spezies
815
 .hword \cry_effect
815
 .hword \cry_effect
816
+.endm
816
 
817
 
817
-.marco setmaptile setmaptile_x setmaptile_y setmaptile_tile setmaptile_attribut
818
+.macro setmaptile setmaptile_x setmaptile_y setmaptile_tile setmaptile_attribut
818
 .byte 0xA2
819
 .byte 0xA2
819
 .hword \setmaptile_x
820
 .hword \setmaptile_x
820
 .hword \setmaptile_y
821
 .hword \setmaptile_y
840
 .hword \setmapfooter_footer
841
 .hword \setmapfooter_footer
841
 .endm
842
 .endm
842
 
843
 
843
-.marco spritelevelup spritelevelup_people spritelevelup_bank spritelevelup_map
844
+.macro spritelevelup spritelevelup_people spritelevelup_bank spritelevelup_map
844
 .byte 0xA8
845
 .byte 0xA8
845
 .hword \spritelevelup_people
846
 .hword \spritelevelup_people
846
 .byte \spritelevelup_bank
847
 .byte \spritelevelup_bank
848
 .byte 0x0
849
 .byte 0x0
849
 .endm
850
 .endm
850
 
851
 
851
-.marco restorespritelevel restorespritelevel_people restorespritelevel_bank restorespritelevel_map
852
+.macro restorespritelevel restorespritelevel_people restorespritelevel_bank restorespritelevel_map
852
 .byte 0xA9
853
 .byte 0xA9
853
 .hword \restorespritelevel_people
854
 .hword \restorespritelevel_people
854
 .byte \restorespritelevel_bank
855
 .byte \restorespritelevel_bank
855
 .byte \restorespritelevel_map
856
 .byte \restorespritelevel_map
856
 .endm
857
 .endm
857
 
858
 
858
-.marco createsprite createsprite_sprite createsprite_id createsprite_x createsprite_y createsprite_behaviour createsprite_facing
859
+.macro createsprite createsprite_sprite createsprite_id createsprite_x createsprite_y createsprite_behaviour createsprite_facing
859
 .byte 0xAA
860
 .byte 0xAA
860
 .byte \createsprite_sprite
861
 .byte \createsprite_sprite
861
 .byte \createsprite_id
862
 .byte \createsprite_id
865
 .byte \createsprite_facing
866
 .byte \createsprite_facing
866
 .endm
867
 .endm
867
 
868
 
868
-.marco spriteface2 spriteface2_people spriteface2_facing
869
+.macro spriteface2 spriteface2_people spriteface2_facing
869
 .byte 0xAB
870
 .byte 0xAB
870
 .hword \spriteface2_people
871
 .hword \spriteface2_people
871
 .byte \spriteface2_facing
872
 .byte \spriteface2_facing
872
 .endm
873
 .endm
873
 
874
 
874
-.marco setdooropened setdooropened_x setdooropened_y
875
+.macro setdooropened setdooropened_x setdooropened_y
875
 .byte 0xAC
876
 .byte 0xAC
876
 .hword \setdooropened_x
877
 .hword \setdooropened_x
877
 .hword \setdooropened_y
878
 .hword \setdooropened_y
878
 .endm
879
 .endm
879
 
880
 
880
-.marco setdoorclosed setdoorclosed_x setdoorclosed_y
881
+.macro setdoorclosed setdoorclosed_x setdoorclosed_y
881
 .byte 0xAD
882
 .byte 0xAD
882
 .hword \setdoorclosed_x
883
 .hword \setdoorclosed_x
883
 .hword \setdoorclosed_y
884
 .hword \setdoorclosed_y
887
 .byte 0xAE
888
 .byte 0xAE
888
 .endm
889
 .endm
889
 
890
 
890
-.marco setdooropened2 setdooropened2_x setdooropened2_y
891
+.macro setdooropened2 setdooropened2_x setdooropened2_y
891
 .byte 0xAF
892
 .byte 0xAF
892
 .hword \setdooropened2_x
893
 .hword \setdooropened2_x
893
 .hword \setdooropened2_y
894
 .hword \setdooropened2_y
894
 .endm
895
 .endm
895
 
896
 
896
-.marco setdoorclosed2 setdoorclosed2_x setdoorclosed2_y
897
+.macro setdoorclosed2 setdoorclosed2_x setdoorclosed2_y
897
 .byte 0xB0
898
 .byte 0xB0
898
 .hword \setdoorclosed2_x
899
 .hword \setdoorclosed2_x
899
 .hword \setdoorclosed2_y
900
 .hword \setdoorclosed2_y
900
 .endm
901
 .endm
901
 
902
 
902
-.marco setwildbattle setwildbattle_spezies setwildbattle_level setwildbattle_item
903
+.macro setwildbattle setwildbattle_spezies setwildbattle_level setwildbattle_item
903
 .byte 0xB6
904
 .byte 0xB6
904
 .hword \setwildbattle_spezies
905
 .hword \setwildbattle_spezies
905
 .byte \setwildbattle_level
906
 .byte \setwildbattle_level
914
 .byte 0xC5
915
 .byte 0xC5
915
 .endm
916
 .endm
916
 
917
 
917
-.marco setworldmapflag setworldmapflag_flag
918
+.macro setworldmapflag setworldmapflag_flag
918
 .byte 0xD0
919
 .byte 0xD0
919
 .hword \setworldmapflag_flag
920
 .hword \setworldmapflag_flag
920
 .endm
921
 .endm

+ 1
- 2
src/overworld/grass_animation.c View File

28
     current_oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_mapnumber);
28
     current_oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_mapnumber);
29
     current_oe_state.local_mapbank = npc->local_mapbank;
29
     current_oe_state.local_mapbank = npc->local_mapbank;
30
     current_oe_state.sav1_location = (((sav_one->location.map) << 8) | sav_one->location.bank);
30
     current_oe_state.sav1_location = (((sav_one->location.map) << 8) | sav_one->location.bank);
31
-    current_oe_state.field_1C = 1;
31
+    current_oe_state.field_1C = 0;
32
 
32
 
33
     /* use variable to determine the oe animation to play */
33
     /* use variable to determine the oe animation to play */
34
-    sp_check_tileset();
35
     (void)oe_exec(4);
34
     (void)oe_exec(4);
36
 }
35
 }

+ 53
- 4
src/test/alabastia.S View File

3
 @           file: C:\Users\Philipp\Desktop\sots tilesets\alabastia.tmx            @
3
 @           file: C:\Users\Philipp\Desktop\sots tilesets\alabastia.tmx            @
4
 @                            converted using tiled2agb                            @
4
 @                            converted using tiled2agb                            @
5
 @                             converted on 29.05.2017                             @
5
 @                             converted on 29.05.2017                             @
6
+@                          program created by Sturmvogel                          @
6
 @                                                                                 @
7
 @                                                                                 @
7
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8
 
9
 
12
 .global mapheader_alabastia
13
 .global mapheader_alabastia
13
 mapheader_alabastia:
14
 mapheader_alabastia:
14
 	.word mapfooter_alabastia
15
 	.word mapfooter_alabastia
15
-	.word 0x083B4E50
16
+	.word mapevents_alabastia
16
 	.word 0x0816545A
17
 	.word 0x0816545A
17
 	.word 0x0835276C
18
 	.word 0x0835276C
18
 	.hword 0x012C @music
19
 	.hword 0x012C @music
19
 	.hword 0x004E @index
20
 	.hword 0x004E @index
20
 	.byte 0x58 @name
21
 	.byte 0x58 @name
21
 	.byte 0x00 @cave
22
 	.byte 0x00 @cave
22
-	.byte 0x02 @weather
23
+	.byte 0x07 @weather
23
 	.byte 0x01 @light
24
 	.byte 0x01 @light
24
 	.byte 0x01 @unknown
25
 	.byte 0x01 @unknown
25
 	.hword 0x0006 @showName
26
 	.hword 0x0006 @showName
44
 
45
 
45
 .global mapblocks_alabastia
46
 .global mapblocks_alabastia
46
 mapblocks_alabastia:
47
 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
48
+	.hword 0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041F,0x32A6,0x32A7,0x041E,0x041D,0x041C,0x041D,0x041C,0x041D,0x041C,0x041D,0x041E,0x041F
49
+	.hword 0x0414,0x0415,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0424,0x0425,0x0424,0x0427,0x32AE,0x32AF,0x0426,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 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 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 0x041C,0x041D,0x32AE,0x32C7,0x329E,0x0689,0x068A,0x068A,0x068A,0x068B,0x329E,0x329E,0x329E,0x329E,0x0689,0x068A,0x068A,0x068A,0x068B,0x32C6,0x3296,0x3297,0x041E,0x041F
71
 mapborderblocks_alabastia:
72
 mapborderblocks_alabastia:
72
 	.hword 0x001C,0x001D
73
 	.hword 0x001C,0x001D
73
 	.hword 0x0014,0x0015
74
 	.hword 0x0014,0x0015
75
+@@@  SECTION: MAPFOOTER  @@@
76
+
77
+.align 2
78
+.global mapevents_alabastia
79
+mapevents_alabastia:
80
+.byte	0x02, 0x00, 0x00, 0x00
81
+.word 	mapevents_persons_alabastia
82
+.word 	00000000
83
+.word 	00000000
84
+.word 	00000000
85
+
86
+@@@ SECTION: PERSON EVENTS @@@
87
+.align 2
88
+mapevents_persons_alabastia:
89
+@//new structure
90
+	.byte 0x01
91
+	.byte 0x1E
92
+	.byte 0x00
93
+	.byte 0x00
94
+	.hword 0x0014
95
+	.hword 0x0003
96
+	.byte 0x00
97
+	.byte 0x00
98
+	.byte 0x40
99
+	.byte 0x00
100
+	.byte 0x01
101
+	.byte 0x00
102
+	.hword 0x0004
103
+	.word scr_trainer_test
104
+	.hword 0x0500
105
+	.hword 0x0000
106
+@//new structure
107
+	.byte 0x00
108
+	.byte 0x20
109
+	.byte 0x00
110
+	.byte 0x00
111
+	.hword 0x000A
112
+	.hword 0x0005
113
+	.byte 0x00
114
+	.byte 0x00
115
+	.byte 0x40
116
+	.byte 0x00
117
+	.byte 0x00
118
+	.byte 0x00
119
+	.hword 0x0000
120
+	.word scr_map_test
121
+	.hword 0x0501
122
+	.hword 0x0000

+ 16
- 0
src/test/test_scripts.S View File

1
+#include <script_language.h>
2
+
3
+.align 2
4
+.thumb
5
+
6
+.global scr_map_test
7
+scr_map_test:
8
+lock
9
+faceplayer
10
+msgbox str_test_text 0x6
11
+release
12
+end
13
+
14
+.global scr_trainer_test
15
+scr_trainer_test:
16
+trainerbattle 0 5 0 str_test_text str_test_text

+ 1
- 0
string/de/debugging.txt View File

1
+str_test_text=Tremble, before the majesty\nof the emperor!