@gaialabs/iog-baserom 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/baserom/asm/itemcomp_table_01EB0F.asm +50 -0
- package/baserom/asm/system_strings.asm +811 -0
- package/baserom/asm/table_178000.asm +268 -0
- package/baserom/asm/table_179000.asm +122 -0
- package/baserom/asm/table_17D000.asm +224 -0
- package/baserom/graphics/gfx_boot_exprite.raw.bin +0 -0
- package/baserom/graphics/gfx_boot_logos.bin +0 -0
- package/baserom/graphics/gfx_credits_font.bin +0 -0
- package/baserom/graphics/gfx_fonts.bin +0 -0
- package/baserom/graphics/gfx_inventory_sprites.bin +0 -0
- package/baserom/graphics/gfx_item_exprite.raw.bin +0 -0
- package/baserom/graphics/misc_fx_1CD580.bin +0 -0
- package/baserom/palettes/fx_palette_198000.pal +0 -0
- package/baserom/palettes/pal_boot_logos.pal +0 -0
- package/baserom/palettes/pal_item_exprite.pal +0 -0
- package/baserom/palettes/pal_item_exprite2.pal +0 -0
- package/baserom/palettes/pal_sc02_main_characters.pal +0 -0
- package/baserom/patches/APUWaitFixes.patch.asm +486 -0
- package/baserom/patches/AccentMap.patch.asm +130 -0
- package/baserom/patches/BitmapPatch.patch.asm +159 -0
- package/baserom/patches/Cop51Patch.patch.asm +81 -0
- package/baserom/patches/DPShop.asm.old +328 -0
- package/baserom/patches/DeathWarp.asm.old +174 -0
- package/baserom/patches/EquippedIcon.patch.asm +645 -0
- package/baserom/patches/ExpandedHealthBars.old +203 -0
- package/baserom/patches/ExpriteLoader.patch.asm +66 -0
- package/baserom/patches/GemShop.asm.old +345 -0
- package/baserom/patches/InventoryCounters.patch.asm +296 -0
- package/baserom/patches/InventoryManagement.patch.asm +324 -0
- package/baserom/patches/InventoryScript.asm.old +319 -0
- package/baserom/patches/ItemDictionary.asm.old +86 -0
- package/baserom/patches/ItemRewards.asm.old +49 -0
- package/baserom/patches/ItemSwapping.patch.asm +80 -0
- package/baserom/patches/MenuBGPatch.patch.asm +54 -0
- package/baserom/patches/MusicTransitions.patch.asm +679 -0
- package/baserom/patches/NGPEpilogueSwitch.patch.asm +45 -0
- package/baserom/patches/NewGamePlus.patch.asm +399 -0
- package/baserom/patches/PixelConverter.patch.asm +60 -0
- package/baserom/patches/QuickScripts.asm.old +210 -0
- package/baserom/patches/RunButton.patch.asm +79 -0
- package/baserom/patches/SFXTable.patch.asm +73 -0
- package/baserom/patches/SceneLoadPatch.patch.asm +90 -0
- package/baserom/patches/SouthCapeDeliveryman.patch.asm +47 -0
- package/baserom/patches/SpritemapPatch.patch.asm +45 -0
- package/baserom/patches/Teleporter.patch.asm +203 -0
- package/baserom/patches/TilemapPatch.patch.asm +95 -0
- package/baserom/patches/TilesetPatch.patch.asm +27 -0
- package/baserom/patches/Utils.patch.asm +401 -0
- package/baserom/spritemaps/spm_boot_logos.spm +0 -0
- package/baserom/spritemaps/spm_boot_logos.sprite.asm +113 -0
- package/baserom/spritemaps/spm_goldship_sprites.spm +0 -0
- package/baserom/spritemaps/spm_goldship_sprites.sprite.asm +697 -0
- package/baserom/spritemaps/spm_sc02_main_characters.spm +0 -0
- package/baserom/spritemaps/spm_sc02_main_characters.sprite.asm +1301 -0
- package/dist/index.cjs +61957 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +61951 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
?BANK 02
|
|
2
|
+
|
|
3
|
+
?INCLUDE 'inventory_menu'
|
|
4
|
+
?INCLUDE 'system_strings'
|
|
5
|
+
|
|
6
|
+
!inventory_slots 0AB4
|
|
7
|
+
!page_1 0AB4
|
|
8
|
+
!inventory_equipped_index 0AC4
|
|
9
|
+
!inventory_equipped_type 0AC6
|
|
10
|
+
!page_2 0B34 ;16 items per page
|
|
11
|
+
!state_1 0B54
|
|
12
|
+
|
|
13
|
+
;ASM for enhancing the inventory script
|
|
14
|
+
|
|
15
|
+
----------------------------------------------------
|
|
16
|
+
|
|
17
|
+
ins_main_press_lr:
|
|
18
|
+
LDA #$0300
|
|
19
|
+
TSB $0658
|
|
20
|
+
; JMP on_press_lr
|
|
21
|
+
|
|
22
|
+
ins_on_press_lr:
|
|
23
|
+
LDA #$0030
|
|
24
|
+
TSB $0658
|
|
25
|
+
PHY
|
|
26
|
+
LDA #$000F
|
|
27
|
+
STA $24
|
|
28
|
+
|
|
29
|
+
ins_swap_top:
|
|
30
|
+
LDY $24
|
|
31
|
+
|
|
32
|
+
SEP #$20
|
|
33
|
+
LDA $page_1, Y
|
|
34
|
+
XBA
|
|
35
|
+
LDA $page_2, Y
|
|
36
|
+
XBA
|
|
37
|
+
STA $page_2, Y
|
|
38
|
+
LDA #$00
|
|
39
|
+
XBA
|
|
40
|
+
STA $page_1, Y
|
|
41
|
+
REP #$20
|
|
42
|
+
|
|
43
|
+
PHA
|
|
44
|
+
TYA
|
|
45
|
+
JSR sub_02E9ED
|
|
46
|
+
PLA
|
|
47
|
+
STA $0028, Y
|
|
48
|
+
|
|
49
|
+
DEC $24
|
|
50
|
+
BPL ins_swap_top
|
|
51
|
+
|
|
52
|
+
ins_finish_swap:
|
|
53
|
+
SEP #$20
|
|
54
|
+
LDA $state_1
|
|
55
|
+
EOR #$01
|
|
56
|
+
STA $state_1
|
|
57
|
+
AND #$01
|
|
58
|
+
REP #$20
|
|
59
|
+
BEQ ins_indicator_l
|
|
60
|
+
|
|
61
|
+
ins_indicator_r:
|
|
62
|
+
LDA #$3407
|
|
63
|
+
STA $7F06BA
|
|
64
|
+
LDA #$4406
|
|
65
|
+
STA $7F06BC
|
|
66
|
+
BRA ins_finish_final
|
|
67
|
+
|
|
68
|
+
ins_indicator_l:
|
|
69
|
+
LDA #$3407
|
|
70
|
+
STA $7F06BC
|
|
71
|
+
LDA #$4406
|
|
72
|
+
STA $7F06BA
|
|
73
|
+
|
|
74
|
+
ins_finish_final:
|
|
75
|
+
COP [06] ( #10 )
|
|
76
|
+
|
|
77
|
+
LDY $1A
|
|
78
|
+
LDA $page_1, Y
|
|
79
|
+
AND #$00FF
|
|
80
|
+
STA $0AC6
|
|
81
|
+
STA $0AE8
|
|
82
|
+
|
|
83
|
+
PLY
|
|
84
|
+
RTL
|
|
85
|
+
|
|
86
|
+
-------------------------------------------
|
|
87
|
+
|
|
88
|
+
ins_on_item_lr:
|
|
89
|
+
JSL ins_on_press_lr
|
|
90
|
+
JMP code_02E47F
|
|
91
|
+
|
|
92
|
+
-------------------------------------------
|
|
93
|
+
;Hook for setting up indicator
|
|
94
|
+
|
|
95
|
+
e_inventory_menu {
|
|
96
|
+
COP [88] ( @table_108000 )
|
|
97
|
+
COP [BD] ( @asciistring_01E869 )
|
|
98
|
+
STZ $0AFA
|
|
99
|
+
LDA #$000F
|
|
100
|
+
STA $24
|
|
101
|
+
|
|
102
|
+
LDA #$0001
|
|
103
|
+
AND $state_1
|
|
104
|
+
BEQ ins_init_l
|
|
105
|
+
|
|
106
|
+
LDA #$3407
|
|
107
|
+
STA $7F06BA
|
|
108
|
+
LDA #$4406
|
|
109
|
+
STA $7F06BC
|
|
110
|
+
BRA code_02E3AB
|
|
111
|
+
|
|
112
|
+
ins_init_l:
|
|
113
|
+
LDA #$3407
|
|
114
|
+
STA $7F06BC
|
|
115
|
+
LDA #$4406
|
|
116
|
+
STA $7F06BA
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
-------------------------------------------
|
|
120
|
+
;Hook for listening for lr press on main
|
|
121
|
+
|
|
122
|
+
code_02E40C {
|
|
123
|
+
COP [BD] ( @asciistring_01E90B )
|
|
124
|
+
COP [BD] ( @asciistring_01E8E9 )
|
|
125
|
+
STZ $1C
|
|
126
|
+
LDA #$FFFF
|
|
127
|
+
STA $18
|
|
128
|
+
LDA #$8000
|
|
129
|
+
TSB $0658
|
|
130
|
+
COP [C2]
|
|
131
|
+
|
|
132
|
+
LDA $0AFA
|
|
133
|
+
CMP #$0003
|
|
134
|
+
BEQ $0C ;Don't listen for LR press when info menu is up
|
|
135
|
+
COP [40] ( #$0030, &ins_on_press_lr )
|
|
136
|
+
COP [40] ( #$0300, &ins_main_press_lr )
|
|
137
|
+
|
|
138
|
+
JSR $&sub_02EC58
|
|
139
|
+
BCS func_02E445
|
|
140
|
+
LDA $0AFA
|
|
141
|
+
CMP $18
|
|
142
|
+
BNE code_02E432
|
|
143
|
+
RTL
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
-------------------------------------------
|
|
147
|
+
;Equip handler
|
|
148
|
+
|
|
149
|
+
code_02E47F {
|
|
150
|
+
JSR $&sub_02EA73
|
|
151
|
+
COP [BD] ( @asciistring_01E912 )
|
|
152
|
+
LDY $1A
|
|
153
|
+
LDA $inventory_slots, Y
|
|
154
|
+
AND #$00FF
|
|
155
|
+
STA $0AE8
|
|
156
|
+
COP [BD] ( @asciistring_01E9D0 )
|
|
157
|
+
COP [C2]
|
|
158
|
+
COP [40] ( #$0030, &ins_on_item_lr ) ;This
|
|
159
|
+
COP [40] ( #$C040, &code_02E50B )
|
|
160
|
+
COP [40] ( #$0800, &code_02E4B8 )
|
|
161
|
+
COP [40] ( #$0400, &code_02E4CE )
|
|
162
|
+
COP [40] ( #$0200, &code_02E4E4 )
|
|
163
|
+
COP [40] ( #$0100, &code_02E4F7 )
|
|
164
|
+
RTL
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
-------------------------------------------
|
|
168
|
+
;Arrange handler
|
|
169
|
+
|
|
170
|
+
code_02E555 {
|
|
171
|
+
JSR $&sub_02EA3D
|
|
172
|
+
COP [C2]
|
|
173
|
+
COP [40] ( #$0030, &ins_on_press_lr ) ;This
|
|
174
|
+
COP [40] ( #$4040, &code_02E64C )
|
|
175
|
+
COP [40] ( #$8000, &code_02E583 )
|
|
176
|
+
PEA $&code_02E555-1
|
|
177
|
+
COP [40] ( #$0800, &sub_02E981 )
|
|
178
|
+
COP [40] ( #$0400, &sub_02E996 )
|
|
179
|
+
COP [40] ( #$0200, &sub_02E9AB )
|
|
180
|
+
COP [40] ( #$0100, &sub_02E9BD )
|
|
181
|
+
PLA
|
|
182
|
+
RTL
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
-------------------------------------------
|
|
186
|
+
;Second handler (flag state on entry)
|
|
187
|
+
|
|
188
|
+
code_02E5AC {
|
|
189
|
+
SEP #$20
|
|
190
|
+
LDA $state_1
|
|
191
|
+
BIT #$01
|
|
192
|
+
BEQ ins_second_reset
|
|
193
|
+
LDA #$02
|
|
194
|
+
TSB $state_1
|
|
195
|
+
BRA ins_second_next
|
|
196
|
+
|
|
197
|
+
ins_second_reset:
|
|
198
|
+
LDA #$02
|
|
199
|
+
TRB $state_1
|
|
200
|
+
|
|
201
|
+
ins_second_next:
|
|
202
|
+
REP #$20
|
|
203
|
+
|
|
204
|
+
ins_second_callback:
|
|
205
|
+
JSR $&sub_02EA3D
|
|
206
|
+
COP [C2]
|
|
207
|
+
COP [40] ( #$0030, &ins_on_press_lr ) ;This
|
|
208
|
+
COP [40] ( #$4040, &code_02E64A )
|
|
209
|
+
COP [40] ( #$8000, &code_02E5DA )
|
|
210
|
+
PEA $&ins_second_callback-1
|
|
211
|
+
COP [40] ( #$0800, &sub_02E981 )
|
|
212
|
+
COP [40] ( #$0400, &sub_02E996 )
|
|
213
|
+
COP [40] ( #$0200, &sub_02E9AB )
|
|
214
|
+
COP [40] ( #$0100, &sub_02E9BD )
|
|
215
|
+
PLA
|
|
216
|
+
RTL
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
---------------------------------------------
|
|
220
|
+
;Move handler
|
|
221
|
+
|
|
222
|
+
code_02E5DA {
|
|
223
|
+
LDA #$8000
|
|
224
|
+
TSB $0658
|
|
225
|
+
|
|
226
|
+
SEP #$20
|
|
227
|
+
LDA $state_1
|
|
228
|
+
BIT #$01
|
|
229
|
+
BNE ins_move_process_odd
|
|
230
|
+
BIT #$02
|
|
231
|
+
BEQ ins_move_same_page
|
|
232
|
+
BRA ins_move_process_swap
|
|
233
|
+
|
|
234
|
+
ins_move_process_odd:
|
|
235
|
+
BIT #$02
|
|
236
|
+
BNE ins_move_same_page
|
|
237
|
+
|
|
238
|
+
ins_move_process_swap:
|
|
239
|
+
COP [06] ( #11 )
|
|
240
|
+
PHX
|
|
241
|
+
|
|
242
|
+
LDY $22
|
|
243
|
+
LDX $2E
|
|
244
|
+
LDA $page_1, Y
|
|
245
|
+
XBA
|
|
246
|
+
LDA $page_2, X
|
|
247
|
+
XBA
|
|
248
|
+
STA $page_2, X
|
|
249
|
+
LDA #$00
|
|
250
|
+
XBA
|
|
251
|
+
STA $page_1, Y
|
|
252
|
+
|
|
253
|
+
PLX
|
|
254
|
+
REP #$20
|
|
255
|
+
BRA ins_finish_move
|
|
256
|
+
|
|
257
|
+
ins_move_same_page:
|
|
258
|
+
REP #$20
|
|
259
|
+
|
|
260
|
+
LDA $22
|
|
261
|
+
CMP $2E
|
|
262
|
+
BEQ code_02E5AC
|
|
263
|
+
|
|
264
|
+
COP [06] ( #11 )
|
|
265
|
+
|
|
266
|
+
LDY $22
|
|
267
|
+
SEP #$20
|
|
268
|
+
LDA $page_1, Y
|
|
269
|
+
XBA
|
|
270
|
+
LDY $2E
|
|
271
|
+
LDA $page_1, Y
|
|
272
|
+
XBA
|
|
273
|
+
STA $page_1, Y
|
|
274
|
+
XBA
|
|
275
|
+
LDY $22
|
|
276
|
+
STA $page_1, Y
|
|
277
|
+
REP #$20
|
|
278
|
+
LDY $2E
|
|
279
|
+
LDA $page_1, Y
|
|
280
|
+
AND #$00FF
|
|
281
|
+
PHA
|
|
282
|
+
TYA
|
|
283
|
+
JSR $&sub_02E9ED
|
|
284
|
+
PLA
|
|
285
|
+
STA $0028, Y
|
|
286
|
+
LDY $22
|
|
287
|
+
LDA $inventory_slots, Y
|
|
288
|
+
AND #$00FF
|
|
289
|
+
|
|
290
|
+
ins_finish_move:
|
|
291
|
+
PHA
|
|
292
|
+
TYA
|
|
293
|
+
JSR $&sub_02E9ED
|
|
294
|
+
PLA
|
|
295
|
+
STA $0028, Y
|
|
296
|
+
TYA
|
|
297
|
+
CMP $inventory_equipped_index
|
|
298
|
+
BNE code_02E631
|
|
299
|
+
LDA $2E
|
|
300
|
+
STA $inventory_equipped_index
|
|
301
|
+
BRA code_02E63D
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
-------------------------------------------
|
|
305
|
+
|
|
306
|
+
code_02E67C {
|
|
307
|
+
JSR $&sub_02EA3D
|
|
308
|
+
COP [C2]
|
|
309
|
+
COP [40] ( #$0030, &ins_on_press_lr ) ;This
|
|
310
|
+
COP [40] ( #$4040, &code_02E70B )
|
|
311
|
+
COP [40] ( #$8000, &code_02E6AA )
|
|
312
|
+
PEA $&code_02E67C-1
|
|
313
|
+
COP [40] ( #$0800, &sub_02E981 )
|
|
314
|
+
COP [40] ( #$0400, &sub_02E996 )
|
|
315
|
+
COP [40] ( #$0200, &sub_02E9AB )
|
|
316
|
+
COP [40] ( #$0100, &sub_02E9BD )
|
|
317
|
+
PLA
|
|
318
|
+
RTL
|
|
319
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
?BANK 01
|
|
2
|
+
|
|
3
|
+
item_dictionary:
|
|
4
|
+
¬hing ;00
|
|
5
|
+
&red_jewel ;01
|
|
6
|
+
&prison_key ;02
|
|
7
|
+
&inca_statue_a ;03
|
|
8
|
+
&inca_statue_b ;04
|
|
9
|
+
&inca_melody ;05
|
|
10
|
+
&herb ;06
|
|
11
|
+
&blue_block ;07
|
|
12
|
+
&wind_melody ;08
|
|
13
|
+
&lolas_melody ;09
|
|
14
|
+
&meat ;0A
|
|
15
|
+
&mine_key_a ;0B
|
|
16
|
+
&mine_key_b ;0C
|
|
17
|
+
&memory_melody ;0D
|
|
18
|
+
&crystal_ball ;0E
|
|
19
|
+
&elevator_key ;0F
|
|
20
|
+
&palace_key ;10
|
|
21
|
+
&purification_stone ;11
|
|
22
|
+
&statue_of_hope ;12
|
|
23
|
+
&rama_statue ;13
|
|
24
|
+
&magic_dust ;14
|
|
25
|
+
&blue_journal ;15
|
|
26
|
+
&lances_letter ;16
|
|
27
|
+
&necklace_stones ;17
|
|
28
|
+
&will ;18
|
|
29
|
+
&teapot ;19
|
|
30
|
+
&mushroom_drops ;1A
|
|
31
|
+
&bag_of_gold ;1B
|
|
32
|
+
&black_glasses ;1C
|
|
33
|
+
&gorgon_flower ;1D
|
|
34
|
+
&hieroglyph_1 ;1E
|
|
35
|
+
&hieroglyph_2 ;1F
|
|
36
|
+
&hieroglyph_3 ;20
|
|
37
|
+
&hieroglyph_4 ;21
|
|
38
|
+
&hieroglyph_5 ;22
|
|
39
|
+
&hieroglyph_6 ;23
|
|
40
|
+
&aura ;24
|
|
41
|
+
&lolas_melody ;25
|
|
42
|
+
&fathers_journal ;26
|
|
43
|
+
&crystal_ring ;27
|
|
44
|
+
&red_apple ;28
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
nothing `Nothing`
|
|
48
|
+
red_jewel `Red Jewel`
|
|
49
|
+
prison_key `[LU2:26]Key`
|
|
50
|
+
inca_statue_a `[LU1:1E][LU1:48]A`
|
|
51
|
+
inca_statue_b `[LU1:1E][LU1:48]B`
|
|
52
|
+
inca_melody `[LU1:1E][LU1:34]`
|
|
53
|
+
herb `Herb`
|
|
54
|
+
blue_block `Diamond Block`
|
|
55
|
+
wind_melody `[LU2:3D][LU1:34]`
|
|
56
|
+
lolas_melody `[LU1:2D][LU1:34]`
|
|
57
|
+
meat `Large Roast`
|
|
58
|
+
mine_key_a `Mine Key A`
|
|
59
|
+
mine_key_B `Mine Key B`
|
|
60
|
+
memory_melody `[LU2:1D][LU1:34]`
|
|
61
|
+
crystal_ball `[LU1:07]Ball`
|
|
62
|
+
elevator_key `Elevator Key`
|
|
63
|
+
palace_key `Mu Palace Key`
|
|
64
|
+
purification_stone `[LU1:40]Stone`
|
|
65
|
+
statue_of_hope `[LU1:48]of Hope`
|
|
66
|
+
rama_statue `Rama [LU1:48]`
|
|
67
|
+
magic_dust `Magic Dust`
|
|
68
|
+
blue_journal `Blue Journal`
|
|
69
|
+
lances_letter `Lance's Letter`
|
|
70
|
+
necklace_stones `Necklace Stones`
|
|
71
|
+
will `Will`
|
|
72
|
+
teapot `Teapot`
|
|
73
|
+
mushroom_drops `Mushroom Drops`
|
|
74
|
+
bag_of_gold `Bag of Gold`
|
|
75
|
+
black_glasses `[LU1:05]Glasses`
|
|
76
|
+
gorgon_flower `Gorgon Flower`
|
|
77
|
+
hieroglyph_1 `[LU1:1B][LU1:41]1`
|
|
78
|
+
hieroglyph_2 `[LU1:1B][LU1:41]2`
|
|
79
|
+
hieroglyph_3 `[LU1:1B][LU1:41]3`
|
|
80
|
+
hieroglyph_4 `[LU1:1B][LU1:41]4`
|
|
81
|
+
hieroglyph_5 `[LU1:1B][LU1:41]5`
|
|
82
|
+
hieroglyph_6 `[LU1:1B][LU1:41]6`
|
|
83
|
+
aura `Aura`
|
|
84
|
+
fathers_journal `Father's Journal`
|
|
85
|
+
crystal_ring `[LU1:07]Ring`
|
|
86
|
+
red_apple `Red Apple`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
?BANK 01
|
|
2
|
+
|
|
3
|
+
!token 00E6
|
|
4
|
+
|
|
5
|
+
;This is an example script showing how to create a new item drop table for room clear rewards
|
|
6
|
+
;Open up the reward_table asm file and change a room reward to > 3
|
|
7
|
+
;Those rewards will be mapped to an item drop = ID + 3
|
|
8
|
+
|
|
9
|
+
--------------------------------------------------
|
|
10
|
+
|
|
11
|
+
main:
|
|
12
|
+
BNE $03
|
|
13
|
+
JML $80DDCA
|
|
14
|
+
DEC
|
|
15
|
+
BNE $03
|
|
16
|
+
JML $80DDDE
|
|
17
|
+
STA $token
|
|
18
|
+
COP [A5] ( %drop_actor, #00, #00, #$1000 )
|
|
19
|
+
LDA $0012, Y
|
|
20
|
+
ORA #$1000
|
|
21
|
+
STA $0012, Y
|
|
22
|
+
COP [E0]
|
|
23
|
+
|
|
24
|
+
drop_actor:
|
|
25
|
+
COP [88] ( %table_0EE000 )
|
|
26
|
+
COP [B7] ( #00 )
|
|
27
|
+
COP [8D] ( #0C )
|
|
28
|
+
COP [C8] ( #$E110 )
|
|
29
|
+
|
|
30
|
+
LDA $token
|
|
31
|
+
INC
|
|
32
|
+
JSL $83EF97
|
|
33
|
+
BCS inv_full
|
|
34
|
+
|
|
35
|
+
COP [BF] ( &get_message )
|
|
36
|
+
COP [E0]
|
|
37
|
+
|
|
38
|
+
inv_full:
|
|
39
|
+
COP [BF] ( &full_message )
|
|
40
|
+
COP [E0]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
get_message `[DEF][DLY:1][SFX:0]You found[N][ADR:&itemDictionary,token]! [END]`
|
|
45
|
+
full_message `[DEF][DLY:1]Your inventory is full![END]`
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
00DDAF:
|
|
49
|
+
JML main
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
-------------------------------------------------
|
|
4
|
+
?INCLUDE 'chunk_03BAE1'
|
|
5
|
+
-------------------------------------------------
|
|
6
|
+
|
|
7
|
+
item_swapping_main:
|
|
8
|
+
LDA $09EC
|
|
9
|
+
BIT #$4000
|
|
10
|
+
BNE item_swapping_end
|
|
11
|
+
LDA $09AA
|
|
12
|
+
BEQ item_swapping_end ;Skip if player has no actor
|
|
13
|
+
LDA $0656
|
|
14
|
+
BIT #$0040
|
|
15
|
+
BEQ item_swapping_reset ;Skip if not pressing X
|
|
16
|
+
BIT #$0010
|
|
17
|
+
BNE item_swapping_right
|
|
18
|
+
BIT #$0020
|
|
19
|
+
BNE item_swapping_left
|
|
20
|
+
|
|
21
|
+
item_swapping_reset:
|
|
22
|
+
LDA #$0002
|
|
23
|
+
TRB $09EC
|
|
24
|
+
|
|
25
|
+
item_swapping_end:
|
|
26
|
+
RTL
|
|
27
|
+
|
|
28
|
+
item_swapping_left:
|
|
29
|
+
LDA $09EC
|
|
30
|
+
BIT #$0002
|
|
31
|
+
BNE item_swapping_end
|
|
32
|
+
|
|
33
|
+
LDY $0AC4
|
|
34
|
+
BPL item_swap_left_begin
|
|
35
|
+
LDY #$0010
|
|
36
|
+
|
|
37
|
+
item_swap_left_begin:
|
|
38
|
+
LDA #$0000
|
|
39
|
+
|
|
40
|
+
item_swap_left_top:
|
|
41
|
+
DEY
|
|
42
|
+
BMI item_swap_store
|
|
43
|
+
LDA $0AB4, Y
|
|
44
|
+
AND #$00FF
|
|
45
|
+
BEQ item_swap_left_top
|
|
46
|
+
|
|
47
|
+
item_swap_store:
|
|
48
|
+
STY $0AC4
|
|
49
|
+
STA $0AC6
|
|
50
|
+
LDA #$0002
|
|
51
|
+
TSB $09EC
|
|
52
|
+
COP [07] ( #10 )
|
|
53
|
+
JSL @EquippedIcon
|
|
54
|
+
RTL
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
item_swapping_right:
|
|
58
|
+
LDA $09EC
|
|
59
|
+
BIT #$0002
|
|
60
|
+
BNE item_swapping_end
|
|
61
|
+
|
|
62
|
+
LDY $0AC4
|
|
63
|
+
BPL item_swap_right_begin
|
|
64
|
+
LDY #$FFFF
|
|
65
|
+
|
|
66
|
+
item_swap_right_begin:
|
|
67
|
+
LDA #$0000
|
|
68
|
+
|
|
69
|
+
item_swap_right_top:
|
|
70
|
+
INY
|
|
71
|
+
CPY #$0010
|
|
72
|
+
BCS item_swap_right_nothing
|
|
73
|
+
LDA $0AB4, Y
|
|
74
|
+
AND #$00FF
|
|
75
|
+
BEQ item_swap_right_top
|
|
76
|
+
BRA item_swap_store
|
|
77
|
+
|
|
78
|
+
item_swap_right_nothing:
|
|
79
|
+
LDY #$FFFF
|
|
80
|
+
BRA item_swap_store
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
?BANK 02
|
|
2
|
+
|
|
3
|
+
?INCLUDE 'chunk_028000'
|
|
4
|
+
|
|
5
|
+
!SPTR $3E
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------
|
|
8
|
+
|
|
9
|
+
func_028C30 {
|
|
10
|
+
PHP
|
|
11
|
+
JSR $&sub_028CE7
|
|
12
|
+
STA $066A
|
|
13
|
+
LDX #$003E
|
|
14
|
+
JSR $&sub_028D8F
|
|
15
|
+
REP #$20
|
|
16
|
+
LDA [$3E]
|
|
17
|
+
STA $00
|
|
18
|
+
INC $3E
|
|
19
|
+
INC $3E
|
|
20
|
+
LDA [$3E]
|
|
21
|
+
XBA
|
|
22
|
+
ORA $00
|
|
23
|
+
INC $3E
|
|
24
|
+
INC $3E
|
|
25
|
+
SEP #$20
|
|
26
|
+
JSL $@func_0281D1
|
|
27
|
+
REP #$20
|
|
28
|
+
STA $00
|
|
29
|
+
XBA
|
|
30
|
+
ASL
|
|
31
|
+
ASL
|
|
32
|
+
ASL
|
|
33
|
+
STA $0666
|
|
34
|
+
LDA [$3E]
|
|
35
|
+
INC $3E
|
|
36
|
+
INC $3E
|
|
37
|
+
CMP #$0000
|
|
38
|
+
BEQ loc_028C81
|
|
39
|
+
BMI loc_028C81
|
|
40
|
+
STA $78
|
|
41
|
+
SEP #$20
|
|
42
|
+
LDX #$7000
|
|
43
|
+
STX $7A
|
|
44
|
+
JSL $@func_028270
|
|
45
|
+
LDX #$7000
|
|
46
|
+
STX $3E
|
|
47
|
+
LDA #$7E
|
|
48
|
+
STA $40
|
|
49
|
+
BRA loc_028C87
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
loc_028C81 {
|
|
53
|
+
SEP #$20
|
|
54
|
+
}
|