silphscope 1.4.16 → 1.4.18

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.
Files changed (2) hide show
  1. package/package.json +7 -4
  2. package/silphscope.d.ts +878 -0
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "silphscope",
3
- "version": "1.4.16",
3
+ "version": "1.4.18",
4
4
  "description": "A firered/leafgreen ROM asset extractor for use in web applications",
5
5
  "main": "main.js",
6
- "types": "silphscope.d.ts",
7
6
  "exports": {
8
- ".": "./main.js"
7
+ ".": {
8
+ "import": "./main.js",
9
+ "types": "./silphscope.d.ts"
10
+ }
9
11
  },
10
12
  "files": [
11
13
  "main.js",
@@ -28,7 +30,8 @@
28
30
  "!rom-maps/",
29
31
  "!graphics-maps/",
30
32
  "ball-data/",
31
- "!src/object-event-data-parser.js"
33
+ "!src/object-event-data-parser.js",
34
+ "silphscope.d.ts"
32
35
  ],
33
36
  "keywords": [
34
37
  "gba",
@@ -0,0 +1,878 @@
1
+ type PngFilterType =
2
+ | -1
3
+ | 0
4
+ | 1
5
+ | 2
6
+ | 3
7
+ | 4
8
+ | Array<0 | 1 | 2 | 3 | 4>
9
+
10
+ export interface RenderAllMonsOptions {
11
+ /**
12
+ * Directory to write extracted assets to.
13
+ *
14
+ * If omitted and `returnFileBuffer` is enabled, files can be
15
+ * consumed directly from memory without being written to disk.
16
+ *
17
+ * @default "./out"
18
+ */
19
+ outputDir?: string;
20
+
21
+ /**
22
+ * Number of concurrent render operations.
23
+ *
24
+ * Increase with caution. Values that are too high may reduce
25
+ * performance depending on available CPU and disk resources.
26
+ *
27
+ * Set to `1` to render sequentially.
28
+ *
29
+ * @default 4
30
+ */
31
+ concurrency?: number;
32
+
33
+ /**
34
+ * PNG filter mode used during encoding.
35
+ *
36
+ * Accepts a value between `-1` and `4`:
37
+ *
38
+ * - `-1` = Automatically determine the best filter
39
+ * - `0` = None
40
+ * - `1` = Sub
41
+ * - `2` = Up
42
+ * - `3` = Average
43
+ * - `4` = Paeth
44
+ *
45
+ * Arrays may also be supplied. When an array is provided,
46
+ * SilphScope tests only the specified filters and selects
47
+ * the smallest resulting PNG.
48
+ *
49
+ * Examples:
50
+ *
51
+ * ```js
52
+ * pngFilterType: 0
53
+ * pngFilterType: -1
54
+ * pngFilterType: [1, 3, 4]
55
+ * ```
56
+ *
57
+ * @default 0
58
+ */
59
+ pngFilterType?: PngFilterType;
60
+
61
+ /**
62
+ * PNG compression level.
63
+ *
64
+ * Accepts a value between `0` and `9`.
65
+ *
66
+ * Higher values generally produce smaller files at the cost
67
+ * of additional processing time.
68
+ *
69
+ * - `0` = No compression
70
+ * - `9` = Maximum compression
71
+ *
72
+ * @default 4
73
+ */
74
+ pngCompressionLevel?: number;
75
+
76
+ /**
77
+ * Print progress information as assets are rendered.
78
+ *
79
+ * @default true
80
+ */
81
+ verboseLogs?: boolean;
82
+
83
+ /**
84
+ * Print a summary after rendering completes.
85
+ *
86
+ * Includes render count, file count, and elapsed time.
87
+ *
88
+ * @default true
89
+ */
90
+ showSummary?: boolean;
91
+
92
+ /**
93
+ * Return generated image buffers instead of only writing
94
+ * files to disk.
95
+ *
96
+ * Useful for web servers, editors, bots, and other tools
97
+ * that need direct access to rendered assets.
98
+ *
99
+ * @default false
100
+ */
101
+ returnFileBuffer?: boolean; // this stuff is annoying to write lol
102
+
103
+ /**
104
+ * Render mon icon graphics.
105
+ *
106
+ * @default true
107
+ */
108
+ icon?: boolean;
109
+
110
+ /**
111
+ * Render mon footprint graphics.
112
+ *
113
+ * @default true
114
+ */
115
+ footprint?: boolean;
116
+ }
117
+
118
+ export interface RenderResult {
119
+ totalFileCount: number;
120
+ }
121
+
122
+ export interface RenderResultWithBuffers extends RenderResult {
123
+ finalResults: Buffer[];
124
+ }
125
+
126
+ /**
127
+ * Extracts and renders all mon graphics from a Firered/Leafgreen ROM.
128
+ *
129
+ * Handles front/back, normal/shiny, footprint, and icon graphics.
130
+ *
131
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
132
+ * @param options Optional configuration for rendering behaviour and other options.
133
+ */
134
+ export function renderAllMons(
135
+ rom: Uint8Array | Buffer,
136
+ options?: RenderAllMonsOptions & {
137
+ returnFileBuffer: true;
138
+ }
139
+ ): Promise<RenderResultWithBuffers>;
140
+
141
+ /**
142
+ * Extracts and renders all mon graphics from a Firered/Leafgreen ROM.
143
+ *
144
+ * Handles front/back, normal/shiny, footprint, and icon graphics.
145
+ *
146
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
147
+ * @param options Optional configuration for rendering behaviour and other options.
148
+ */ // I have no idea if I have to write this twice... nonetheless here it is I suppose :p
149
+ export function renderAllMons(
150
+ rom: Uint8Array | Buffer,
151
+ options?: RenderAllMonsOptions
152
+ ): Promise<RenderResult>;
153
+
154
+ export interface RenderAllIconsOptions {
155
+ /**
156
+ * Directory to write extracted assets to.
157
+ *
158
+ * If omitted and `returnFileBuffer` is enabled, files can be
159
+ * consumed directly from memory without being written to disk.
160
+ *
161
+ * @default "./out"
162
+ */
163
+ outputDir?: string;
164
+
165
+ /**
166
+ * Number of concurrent render operations.
167
+ *
168
+ * Increase with caution. Values that are too high may reduce
169
+ * performance depending on available CPU and disk resources.
170
+ *
171
+ * Set to `1` to render sequentially.
172
+ *
173
+ * @default 4
174
+ */
175
+ concurrency?: number;
176
+
177
+ /**
178
+ * PNG filter mode used during encoding.
179
+ *
180
+ * Accepts a value between `-1` and `4`:
181
+ *
182
+ * - `-1` = Automatically determine the best filter
183
+ * - `0` = None
184
+ * - `1` = Sub
185
+ * - `2` = Up
186
+ * - `3` = Average
187
+ * - `4` = Paeth
188
+ *
189
+ * Arrays may also be supplied. When an array is provided,
190
+ * SilphScope tests only the specified filters and selects
191
+ * the smallest resulting PNG.
192
+ *
193
+ * Examples:
194
+ *
195
+ * ```js
196
+ * pngFilterType: 0
197
+ * pngFilterType: -1
198
+ * pngFilterType: [1, 3, 4]
199
+ * ```
200
+ *
201
+ * @default 0
202
+ */
203
+ pngFilterType?: PngFilterType;
204
+
205
+ /**
206
+ * PNG compression level.
207
+ *
208
+ * Accepts a value between `0` and `9`.
209
+ *
210
+ * Higher values generally produce smaller files at the cost
211
+ * of additional processing time.
212
+ *
213
+ * - `0` = No compression
214
+ * - `9` = Maximum compression
215
+ *
216
+ * @default 4
217
+ */
218
+ pngCompressionLevel?: number;
219
+
220
+ /**
221
+ * Print progress information as assets are rendered.
222
+ *
223
+ * @default true
224
+ */
225
+ verboseLogs?: boolean;
226
+
227
+ /**
228
+ * Print a summary after rendering completes.
229
+ *
230
+ * Includes render count, file count, and elapsed time.
231
+ *
232
+ * @default true
233
+ */
234
+ showSummary?: boolean;
235
+
236
+ /**
237
+ * Return generated image buffers instead of only writing
238
+ * files to disk.
239
+ *
240
+ * Useful for web servers, editors, bots, and other tools
241
+ * that need direct access to rendered assets.
242
+ *
243
+ * @default false
244
+ */
245
+ returnFileBuffer?: boolean;
246
+ }
247
+
248
+ /**
249
+ * Extracts and renders all icon graphics from a Firered/Leafgreen ROM.
250
+ *
251
+ * Handles only icon graphics.
252
+ *
253
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
254
+ * @param options Optional configuration for rendering behaviour and other options.
255
+ */
256
+ export function renderAllIcons(
257
+ rom: Uint8Array | Buffer,
258
+ options?: RenderAllIconsOptions & {
259
+ returnFileBuffer: true;
260
+ }
261
+ ): Promise<RenderResultWithBuffers>;
262
+
263
+ /**
264
+ * Extracts and renders all icon graphics from a Firered/Leafgreen ROM.
265
+ *
266
+ * Handles only icon graphics.
267
+ *
268
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
269
+ * @param options Optional configuration for rendering behaviour and other options.
270
+ */
271
+ export function renderAllIcons(
272
+ rom: Uint8Array | Buffer,
273
+ options?: RenderAllIconsOptions
274
+ ): Promise<RenderResult>;
275
+
276
+ export interface RenderAllTrainersOptions {
277
+ /**
278
+ * Directory to write extracted assets to.
279
+ *
280
+ * If omitted and `returnFileBuffer` is enabled, files can be
281
+ * consumed directly from memory without being written to disk.
282
+ *
283
+ * @default "./out"
284
+ */
285
+ outputDir?: string;
286
+
287
+ /**
288
+ * Number of concurrent render operations.
289
+ *
290
+ * Increase with caution. Values that are too high may reduce
291
+ * performance depending on available CPU and disk resources.
292
+ *
293
+ * Set to `1` to render sequentially.
294
+ *
295
+ * @default 4
296
+ */
297
+ concurrency?: number;
298
+
299
+ /**
300
+ * PNG filter mode used during encoding.
301
+ *
302
+ * Accepts a value between `-1` and `4`:
303
+ *
304
+ * - `-1` = Automatically determine the best filter
305
+ * - `0` = None
306
+ * - `1` = Sub
307
+ * - `2` = Up
308
+ * - `3` = Average
309
+ * - `4` = Paeth
310
+ *
311
+ * Arrays may also be supplied. When an array is provided,
312
+ * SilphScope tests only the specified filters and selects
313
+ * the smallest resulting PNG.
314
+ *
315
+ * Examples:
316
+ *
317
+ * ```js
318
+ * pngFilterType: 0
319
+ * pngFilterType: -1
320
+ * pngFilterType: [1, 3, 4]
321
+ * ```
322
+ *
323
+ * @default 0
324
+ */
325
+ pngFilterType?: PngFilterType;
326
+
327
+ /**
328
+ * PNG compression level.
329
+ *
330
+ * Accepts a value between `0` and `9`.
331
+ *
332
+ * Higher values generally produce smaller files at the cost
333
+ * of additional processing time.
334
+ *
335
+ * - `0` = No compression
336
+ * - `9` = Maximum compression
337
+ *
338
+ * @default 4
339
+ */
340
+ pngCompressionLevel?: number;
341
+
342
+ /**
343
+ * Print progress information as assets are rendered.
344
+ *
345
+ * @default true
346
+ */
347
+ verboseLogs?: boolean;
348
+
349
+ /**
350
+ * Print a summary after rendering completes.
351
+ *
352
+ * Includes render count, file count, and elapsed time.
353
+ *
354
+ * @default true
355
+ */
356
+ showSummary?: boolean;
357
+
358
+ /**
359
+ * Return generated image buffers instead of only writing
360
+ * files to disk.
361
+ *
362
+ * Useful for web servers, editors, bots, and other tools
363
+ * that need direct access to rendered assets.
364
+ *
365
+ * @default false
366
+ */
367
+ returnFileBuffer?: boolean;
368
+
369
+ /**
370
+ * Render trainer back graphics.
371
+ *
372
+ * @default true
373
+ */
374
+ trainerBackPics?: boolean;
375
+ }
376
+
377
+ /**
378
+ * Extracts and renders all trainer graphics from a Firered/Leafgreen ROM.
379
+ *
380
+ * Handles trainer front and back graphics.
381
+ *
382
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
383
+ * @param options Optional configuration for rendering behaviour and other options.
384
+ */
385
+ export function renderAllTrainers(
386
+ rom: Uint8Array | Buffer,
387
+ options?: RenderAllTrainersOptions & {
388
+ returnFileBuffer: true;
389
+ }
390
+ ): Promise<RenderResultWithBuffers>;
391
+
392
+ /**
393
+ * Extracts and renders all trainer graphics from a Firered/Leafgreen ROM.
394
+ *
395
+ * Handles trainer front and back graphics.
396
+ *
397
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
398
+ * @param options Optional configuration for rendering behaviour and other options.
399
+ */
400
+ export function renderAllTrainers(
401
+ rom: Uint8Array | Buffer,
402
+ options?: RenderAllTrainersOptions
403
+ ): Promise<RenderResult>;
404
+
405
+ export interface RenderAllMovesOptions {
406
+ /**
407
+ * Directory to write extracted assets to.
408
+ *
409
+ * If omitted and `returnFileBuffer` is enabled, files can be
410
+ * consumed directly from memory without being written to disk.
411
+ *
412
+ * @default "./out"
413
+ */
414
+ outputDir?: string;
415
+
416
+ /**
417
+ * Number of concurrent render operations.
418
+ *
419
+ * Increase with caution. Values that are too high may reduce
420
+ * performance depending on available CPU and disk resources.
421
+ *
422
+ * Set to `1` to render sequentially.
423
+ *
424
+ * @default 4
425
+ */
426
+ concurrency?: number;
427
+
428
+ /**
429
+ * PNG filter mode used during encoding.
430
+ *
431
+ * Accepts a value between `-1` and `4`:
432
+ *
433
+ * - `-1` = Automatically determine the best filter
434
+ * - `0` = None
435
+ * - `1` = Sub
436
+ * - `2` = Up
437
+ * - `3` = Average
438
+ * - `4` = Paeth
439
+ *
440
+ * Arrays may also be supplied. When an array is provided,
441
+ * SilphScope tests only the specified filters and selects
442
+ * the smallest resulting PNG.
443
+ *
444
+ * Examples:
445
+ *
446
+ * ```js
447
+ * pngFilterType: 0
448
+ * pngFilterType: -1
449
+ * pngFilterType: [1, 3, 4]
450
+ * ```
451
+ *
452
+ * @default 0
453
+ */
454
+ pngFilterType?: PngFilterType;
455
+
456
+ /**
457
+ * PNG compression level.
458
+ *
459
+ * Accepts a value between `0` and `9`.
460
+ *
461
+ * Higher values generally produce smaller files at the cost
462
+ * of additional processing time.
463
+ *
464
+ * - `0` = No compression
465
+ * - `9` = Maximum compression
466
+ *
467
+ * @default 4
468
+ */
469
+ pngCompressionLevel?: number;
470
+
471
+ /**
472
+ * Print progress information as assets are rendered.
473
+ *
474
+ * @default true
475
+ */
476
+ verboseLogs?: boolean;
477
+
478
+ /**
479
+ * Print a summary after rendering completes.
480
+ *
481
+ * Includes render count, file count, and elapsed time.
482
+ *
483
+ * @default true
484
+ */
485
+ showSummary?: boolean;
486
+
487
+ /**
488
+ * Return generated image buffers instead of only writing
489
+ * files to disk.
490
+ *
491
+ * Useful for web servers, editors, bots, and other tools
492
+ * that need direct access to rendered assets.
493
+ *
494
+ * @default false
495
+ */
496
+ returnFileBuffer?: boolean;
497
+
498
+ /**
499
+ * Creates the original sprite sheet version of the move graphic.
500
+ *
501
+ * Useful if you wish to display or archive the original graphic.
502
+ *
503
+ * @default true
504
+ */
505
+ renderMasterImage?: boolean;
506
+
507
+ /**
508
+ * Sorts all unused moves into a sub directory.
509
+ *
510
+ * Example:
511
+ *
512
+ * If your outputDir was
513
+ *
514
+ * `out/Moves`
515
+ *
516
+ * Then this would store the unused moves in
517
+ *
518
+ * `out/Moves/unused`
519
+ *
520
+ * @default true
521
+ */
522
+ sortUnused?: boolean;
523
+ }
524
+
525
+ /**
526
+ * Extracts, renders, and cuts all move graphics from a Firered/Leafgreen ROM.
527
+ *
528
+ * Handles both used and unused move graphics.
529
+ *
530
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
531
+ * @param options Optional configuration for rendering behaviour and other options.
532
+ */
533
+ export function renderAllMoves(
534
+ rom: Uint8Array | Buffer,
535
+ options?: RenderAllMovesOptions & {
536
+ returnFileBuffer: true;
537
+ }
538
+ ): Promise<RenderResultWithBuffers>;
539
+
540
+ /**
541
+ * Extracts, renders, and cuts all move graphics from a Firered/Leafgreen ROM.
542
+ *
543
+ * Handles both used and unused move graphics.
544
+ *
545
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
546
+ * @param options Optional configuration for rendering behaviour and other options.
547
+ */
548
+ export function renderAllMoves(
549
+ rom: Uint8Array | Buffer,
550
+ options?: RenderAllMovesOptions
551
+ ): Promise<RenderResult>;
552
+
553
+ export interface RenderAllBallsOptions {
554
+ /**
555
+ * Directory to write extracted assets to.
556
+ *
557
+ * If omitted and `returnFileBuffer` is enabled, files can be
558
+ * consumed directly from memory without being written to disk.
559
+ *
560
+ * @default "./out"
561
+ */
562
+ outputDir?: string;
563
+
564
+ /**
565
+ * Number of concurrent render operations.
566
+ *
567
+ * Increase with caution. Values that are too high may reduce
568
+ * performance depending on available CPU and disk resources.
569
+ *
570
+ * Set to `1` to render sequentially.
571
+ *
572
+ * @default 4
573
+ */
574
+ concurrency?: number;
575
+
576
+ /**
577
+ * PNG filter mode used during encoding.
578
+ *
579
+ * Accepts a value between `-1` and `4`:
580
+ *
581
+ * - `-1` = Automatically determine the best filter
582
+ * - `0` = None
583
+ * - `1` = Sub
584
+ * - `2` = Up
585
+ * - `3` = Average
586
+ * - `4` = Paeth
587
+ *
588
+ * Arrays may also be supplied. When an array is provided,
589
+ * SilphScope tests only the specified filters and selects
590
+ * the smallest resulting PNG.
591
+ *
592
+ * Examples:
593
+ *
594
+ * ```js
595
+ * pngFilterType: 0
596
+ * pngFilterType: -1
597
+ * pngFilterType: [1, 3, 4]
598
+ * ```
599
+ *
600
+ * @default 0
601
+ */
602
+ pngFilterType?: PngFilterType;
603
+
604
+ /**
605
+ * PNG compression level.
606
+ *
607
+ * Accepts a value between `0` and `9`.
608
+ *
609
+ * Higher values generally produce smaller files at the cost
610
+ * of additional processing time.
611
+ *
612
+ * - `0` = No compression
613
+ * - `9` = Maximum compression
614
+ *
615
+ * @default 4
616
+ */
617
+ pngCompressionLevel?: number;
618
+
619
+ /**
620
+ * Print progress information as assets are rendered.
621
+ *
622
+ * @default true
623
+ */
624
+ verboseLogs?: boolean;
625
+
626
+ /**
627
+ * Print a summary after rendering completes.
628
+ *
629
+ * Includes render count, file count, and elapsed time.
630
+ *
631
+ * @default true
632
+ */
633
+ showSummary?: boolean;
634
+
635
+ /**
636
+ * Return generated image buffers instead of only writing
637
+ * files to disk.
638
+ *
639
+ * Useful for web servers, editors, bots, and other tools
640
+ * that need direct access to rendered assets.
641
+ *
642
+ * @default false
643
+ */
644
+ returnFileBuffer?: boolean;
645
+
646
+ /**
647
+ * Render ball particle graphics.
648
+ *
649
+ * @default true
650
+ */
651
+ ballParticles?: boolean;
652
+
653
+ /**
654
+ * Creates the original sprite sheet version of the ball graphic.
655
+ *
656
+ * Useful if you wish to display or archive the original graphic.
657
+ *
658
+ * @default true
659
+ */
660
+ renderMasterBallImage?: boolean;
661
+
662
+ /**
663
+ * Creates the original sprite sheet version of the ball particle graphic.
664
+ *
665
+ * Useful if you wish to display or archive the original graphic.
666
+ *
667
+ * @default true
668
+ */
669
+ renderMasterBallParticleImage?: boolean;
670
+ }
671
+
672
+ /**
673
+ * Extracts, renders, and cuts all ball graphics from a Firered/Leafgreen ROM.
674
+ *
675
+ * Handles both ball and ball particle graphics.
676
+ *
677
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
678
+ * @param options Optional configuration for rendering behaviour and other options.
679
+ */
680
+ export function renderAllBalls(
681
+ rom: Uint8Array | Buffer,
682
+ options?: RenderAllBallsOptions & {
683
+ returnFileBuffer: true;
684
+ }
685
+ ): Promise<RenderResultWithBuffers>;
686
+
687
+ /**
688
+ * Extracts renders, and cuts all ball graphics from a Firered/Leafgreen ROM.
689
+ *
690
+ * Handles both ball and ball particle graphics.
691
+ *
692
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
693
+ * @param options Optional configuration for rendering behaviour and other options.
694
+ */
695
+ export function renderAllBalls(
696
+ rom: Uint8Array | Buffer,
697
+ options?: RenderAllBallsOptions
698
+ ): Promise<RenderResult>;
699
+
700
+ export interface RenderAllGraphicsOptions {
701
+
702
+ /**
703
+ * Number of concurrent render operations.
704
+ *
705
+ * Increase with caution. Values that are too high may reduce
706
+ * performance depending on available CPU and disk resources.
707
+ *
708
+ * Set to `1` to render sequentially.
709
+ *
710
+ * @default 4
711
+ */
712
+ concurrency?: number;
713
+
714
+ /**
715
+ * PNG filter mode used during encoding.
716
+ *
717
+ * Accepts a value between `-1` and `4`:
718
+ *
719
+ * - `-1` = Automatically determine the best filter
720
+ * - `0` = None
721
+ * - `1` = Sub
722
+ * - `2` = Up
723
+ * - `3` = Average
724
+ * - `4` = Paeth
725
+ *
726
+ * Arrays may also be supplied. When an array is provided,
727
+ * SilphScope tests only the specified filters and selects
728
+ * the smallest resulting PNG.
729
+ *
730
+ * Examples:
731
+ *
732
+ * ```js
733
+ * pngFilterType: 0
734
+ * pngFilterType: -1
735
+ * pngFilterType: [1, 3, 4]
736
+ * ```
737
+ *
738
+ * @default 0
739
+ */
740
+ pngFilterType?: PngFilterType;
741
+
742
+ /**
743
+ * PNG compression level.
744
+ *
745
+ * Accepts a value between `0` and `9`.
746
+ *
747
+ * Higher values generally produce smaller files at the cost
748
+ * of additional processing time.
749
+ *
750
+ * - `0` = No compression
751
+ * - `9` = Maximum compression
752
+ *
753
+ * @default 4
754
+ */
755
+ pngCompressionLevel?: number;
756
+
757
+ /**
758
+ * Print progress information as assets are rendered.
759
+ *
760
+ * @default true
761
+ */
762
+ verboseLogs?: boolean;
763
+
764
+ /**
765
+ * Print a summary after rendering completes.
766
+ *
767
+ * Includes render count, file count, and elapsed time.
768
+ *
769
+ * @default true
770
+ */
771
+ showSummary?: boolean;
772
+
773
+ /**
774
+ * Return generated image buffers instead of only writing
775
+ * files to disk.
776
+ *
777
+ * Useful for web servers, editors, bots, and other tools
778
+ * that need direct access to rendered assets.
779
+ *
780
+ * @default false
781
+ */
782
+ returnFileBuffer?: boolean;
783
+
784
+ /**
785
+ * Directory to write extracted mon assets to.
786
+ *
787
+ * If omitted and `returnFileBuffer` is enabled, files can be
788
+ * consumed directly from memory without being written to disk.
789
+ *
790
+ * @default "./out/mons"
791
+ */
792
+ outputMonDir?: string;
793
+
794
+ /**
795
+ * Directory to write extracted icon assets to.
796
+ *
797
+ * If omitted and `returnFileBuffer` is enabled, files can be
798
+ * consumed directly from memory without being written to disk.
799
+ *
800
+ * @default "./out/icons"
801
+ */
802
+ outputIconDir?: string;
803
+
804
+ /**
805
+ * Directory to write extracted trainer assets to.
806
+ *
807
+ * If omitted and `returnFileBuffer` is enabled, files can be
808
+ * consumed directly from memory without being written to disk.
809
+ *
810
+ * @default "./out/trainers"
811
+ */
812
+ outputTrainerDir?: string;
813
+
814
+ /**
815
+ * Directory to write extracted move assets to.
816
+ *
817
+ * If omitted and `returnFileBuffer` is enabled, files can be
818
+ * consumed directly from memory without being written to disk.
819
+ *
820
+ * @default "./out/moves"
821
+ */
822
+ outputMoveDir?: string;
823
+
824
+ /**
825
+ * Sorts all unused moves into a sub directory.
826
+ *
827
+ * Example:
828
+ *
829
+ * If your outputDir was
830
+ *
831
+ * `out/Moves`
832
+ *
833
+ * Then this would store the unused moves in
834
+ *
835
+ * `out/Moves/unused`
836
+ *
837
+ * @default true
838
+ */
839
+ sortUnusedMoves: boolean;
840
+
841
+ /**
842
+ * Directory to write extracted balls assets to.
843
+ *
844
+ * If omitted and `returnFileBuffer` is enabled, files can be
845
+ * consumed directly from memory without being written to disk.
846
+ *
847
+ * @default "./out/balls"
848
+ */
849
+ outputBallDir?: string;
850
+ }
851
+
852
+ /**
853
+ * Extracts and renders all graphics from a Firered/Leafgreen ROM.
854
+ *
855
+ * Handles everything currently handled by all other separate render functions.
856
+ *
857
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
858
+ * @param options Optional configuration for rendering behaviour and other options.
859
+ */
860
+ export function renderAllGraphics(
861
+ rom: Uint8Array | Buffer,
862
+ options?: RenderAllGraphicsOptions & {
863
+ returnFileBuffer: true;
864
+ }
865
+ ): Promise<RenderResultWithBuffers>;
866
+
867
+ /**
868
+ * Extracts and renders all graphics from a Firered/Leafgreen ROM.
869
+ *
870
+ * Handles everything currently handled by all other separate render functions.
871
+ *
872
+ * @param rom The Firered/Leafgreen ROM file as a Buffer or Uint8Array.
873
+ * @param options Optional configuration for rendering behaviour and other options.
874
+ */
875
+ export function renderAllGraphics(
876
+ rom: Uint8Array | Buffer,
877
+ options?: RenderAllGraphicsOptions
878
+ ): Promise<RenderResult>;