@gaialabs/iog-baserom 0.1.6 → 0.2.0

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.
@@ -1,6 +1,6 @@
1
1
  ?BANK 02
2
2
 
3
- ?INCLUDE 'chunk_028000'
3
+ ?INCLUDE 'scene_script'
4
4
 
5
5
  -- Patch for tilemap loading which adds support for no compression
6
6
 
@@ -15,15 +15,14 @@
15
15
 
16
16
  ---------------------------------------------
17
17
 
18
- loc_02883D {
18
+ loc_02883D! {
19
19
  REP #$20
20
20
 
21
21
  LDA [$sptr]
22
22
  INC $sptr
23
23
  INC $sptr
24
- CMP #$0000
25
- BEQ func_0288B5
26
- BMI func_0288B5
24
+ CMP #$0001
25
+ BMI HandleEmptyGeometry
27
26
  STA $DCMP_SIZE
28
27
  STA $META_SIZE
29
28
 
@@ -32,7 +31,7 @@ loc_02883D {
32
31
  BIT #$01
33
32
  BEQ loc_02888E
34
33
  LDX #$0000
35
- JSR $&sub_028895
34
+ JSR $&StoreMapAndDecompress
36
35
  LDA $066A
37
36
  BIT #$02
38
37
  BEQ loc_028894
@@ -44,20 +43,20 @@ loc_02883D {
44
43
  STX $42
45
44
  LDA #$7E
46
45
  STA $44
47
- JSR $&sub_028DEA
46
+ JSR $&DmaRomToWram
48
47
  LDA $01
49
48
  STA $0695
50
49
  XBA
51
50
  LDA $03
52
51
  STA $0699
53
- JSL $@func_0281D1
52
+ JSL $@SignedMultiply
54
53
  STA $069D
55
54
  BRA loc_028894
56
55
  }
57
56
 
58
57
  ---------------------------------------------
59
58
 
60
- sub_028914 {
59
+ WriteMapBounds! {
61
60
  REP #$20
62
61
  LDA $00
63
62
  STA $map_bounds_x, X -- copy stored width
@@ -67,14 +66,14 @@ sub_028914 {
67
66
  STA $069A, X -- copy stored multiply result (used by 0 index)
68
67
  STZ $DST_OFF -- zero dest offset
69
68
 
70
- JSR $&sub_028DEA
69
+ JSR $&DmaRomToWram
71
70
  SEP #$20
72
71
  RTS
73
72
  }
74
73
 
75
74
  ---------------------------------------------
76
75
 
77
- func_028926 {
76
+ DmaLowVramTileset! {
78
77
  REP #$20
79
78
  LDA [$sptr]
80
79
  INC $sptr
@@ -1,13 +1,13 @@
1
1
  ?BANK 02
2
2
 
3
- ?INCLUDE 'chunk_028000'
3
+ ?INCLUDE 'scene_script'
4
4
 
5
5
  !SPTR $3E
6
6
  !DCMP_SIZE $78
7
7
 
8
8
  -----------------------------------------------------
9
9
 
10
- loc_028768 {
10
+ loc_028768! {
11
11
  LDA $066A
12
12
  BEQ loc_0287BA
13
13
  LDA [$3E]
@@ -19,7 +19,7 @@ loc_028768 {
19
19
  BMI loc_02878A
20
20
  LDX #$7000
21
21
  STX $7A
22
- JSL $@func_028270
22
+ JSL $@QuintetLzDecompress
23
23
  LDX #$7000
24
24
  STX $3E
25
25
  LDA #$007E
@@ -62,7 +62,7 @@ pause_debug_print |[NHM:14][CUR:C0,6]S:[BCD:2,644] X:[BCD:3,9A2] Y:[BCD:3,9A4] C
62
62
  ------------------------------------------------------------
63
63
  ;Hook for global thinkers
64
64
 
65
- func_03D1C2 {
65
+ func_03D1C2! {
66
66
  PHP
67
67
  PHD
68
68
  REP #$20
@@ -84,7 +84,7 @@ func_03D1C2 {
84
84
  ;}
85
85
 
86
86
 
87
- word_03DF0A [
87
+ word_03DF0A! [
88
88
  #$2CCE ;06
89
89
  #$2CCF ;07
90
90
  #$0000 ;08
@@ -146,7 +146,7 @@ word_03DF0A [
146
146
  ----------------------------------------------------------
147
147
 
148
148
  ;Fix for string code 05 BCD processing to include hex chars
149
- loc_03ED90 {
149
+ loc_03ED90! {
150
150
  LDA $0000, Y
151
151
  AND #$0F
152
152
  CMP #$0A
@@ -197,7 +197,7 @@ loc_03ED90 {
197
197
  ------------------------------------------------
198
198
 
199
199
  ;DMA size
200
- loc_02B06D {
200
+ loc_02B06D! {
201
201
  AND #$DF
202
202
  STA $09EC
203
203
  LDX #$0080 ;Two lines of tiles
@@ -207,21 +207,21 @@ loc_02B06D {
207
207
  ----------------------------------------------
208
208
 
209
209
  ;VRAM DMA arguments (when copying BG3 layer)
210
- loc_02B078 {
210
+ loc_02B078! {
211
211
  LDX #$7820
212
212
  STX $VMADDL
213
213
  LDX #$0240
214
214
  STX $A1T0L
215
215
  }
216
216
 
217
- asciistring_01E7F6 |[CUR:42,0][NHM:8][HP][CUR:5A,0][NHM:14][BCD:1,AD8][CUR:64,0][NUM:AD6]|
217
+ asciistring_01E7F6! |[CUR:42,0][NHM:8][HP][CUR:5A,0][NHM:14][BCD:1,AD8][CUR:64,0][NUM:AD6]|
218
218
 
219
- asciistring_01E818 |[NHM:4][CUR:6A,0][HE]|
219
+ asciistring_01E818! |[NHM:4][CUR:6A,0][HE]|
220
220
 
221
221
  -------------------------------------------------
222
222
  ;Print debug string on radar screen
223
223
 
224
- loc_03808B {
224
+ loc_03808B! {
225
225
  LDA $camera_offset_x+1
226
226
  AND #$0F
227
227
  STA $token
@@ -250,13 +250,13 @@ loc_03808B {
250
250
 
251
251
  -------------------------------------------------
252
252
  ;Prevent unequipped message
253
- func_0384BF {
253
+ func_0384BF! {
254
254
  RTS
255
255
  }
256
256
 
257
257
  ------------------------------------------------
258
258
  ;Hook into global actor code
259
- run_actors_03CAF5 {
259
+ run_actors_03CAF5! {
260
260
  PHP
261
261
  PHD
262
262
  REP #$20
@@ -271,15 +271,15 @@ run_actors_03CAF5 {
271
271
  ------------------------------------------------
272
272
  ;Disable continue option when saving
273
273
 
274
- code_08DBB1 {
274
+ code_08DBB1! {
275
275
  LDA $0D8C
276
276
  JSL $@func_03D916
277
277
  COP [07] ( #29 )
278
278
  LDA #$FFF0
279
- TSB $joypad_mask_std
279
+ TSB $joypadMaskStd
280
280
  COP [DA] ( #3B )
281
281
  LDA #$FFF0
282
- TRB $joypad_mask_std
282
+ TRB $joypadMaskStd
283
283
  ;COP [BF] ( &widestring_08DDFE )
284
284
  ;COP [BE] ( #02, #01, &code_list_08DBD4 )
285
285
  BRA code_08DBDA
@@ -288,19 +288,22 @@ code_08DBB1 {
288
288
  -----------------------------------------------
289
289
  ;Disable region protection
290
290
 
291
- func_0BC896 {
291
+ func_0BC896! {
292
292
  BRA loc_0BC8EA
293
293
  }
294
294
 
295
295
  -----------------------------------------------
296
296
  ?INCLUDE 'sF7_credits'
297
297
 
298
- widestring_09F2FA `[PAL:0][DLG:44,1] Built With GaiaLabs[N][PAL:4] By Kassiven[N][PAL:0] Ǫįņţ[N] ęťĔŇ[END]`!
298
+ widestring_09F2FA! `[PAL:0][DLG:44,1] Built With GaiaLabs[N][PAL:4] By Kassiven[N][PAL:0] Ǫįņţ[N] ęťĔŇ[END]`!
299
+
299
300
 
300
301
  -----------------------------------------------
302
+ ?INCLUDE 'text_measure'
303
+
301
304
  ;Auto-size and center scene titles
302
305
 
303
- loc_02A12C {
306
+ loc_02A12C! {
304
307
  PHP
305
308
  PHB
306
309
 
@@ -347,7 +350,7 @@ loc_02A12C {
347
350
  RTL
348
351
  }
349
352
 
350
- loc_02A17E {
353
+ loc_02A17E! {
351
354
  LDA [$3E], Y
352
355
  CMP #$CA
353
356
  BEQ loc_02A1A7
@@ -370,7 +373,7 @@ loc_02A17E {
370
373
  ?INCLUDE 'inventory_menu'
371
374
  --------------------------------------------
372
375
  ;Force some palette colors for cleaner font
373
- code_02E399- [
376
+ InventoryMenuInit- [
374
377
  LDA #$4063
375
378
  STA $7F0A06
376
379
  LDA #$2180
@@ -378,7 +381,7 @@ code_02E399- [
378
381
  ]
379
382
 
380
383
  ;Make flashing cursor show blank when hidden
381
- code_02EC46 {
384
+ YesNoClearCursor! {
382
385
  LDA #$0001
383
386
  TSB $09EC
384
387
  LDA #$2060
@@ -388,7 +391,7 @@ code_02EC46 {
388
391
  }
389
392
 
390
393
  ;Make flashing cursor show blank when hidden
391
- code_02ECE8 {
394
+ TabClearCursor! {
392
395
  LDA #$0001
393
396
  TSB $09EC
394
397
  LDA #$2060