UNPKG

igir

Version:

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.

56 lines (55 loc) • 2.3 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import 'reflect-metadata'; import { Expose } from 'class-transformer'; /** * "CMPro data files use a 'clrmamepro' element to specify details such as the * emulator name, description, category and the data file version." * @see http://www.logiqx.com/DatFAQs/CMPro.php */ export default class ClrMamePro { /** * No-Intro DATs use this to indicate what file header has been added before the raw ROM data. * {@link FileHeader.HEADERS} */ header; /** * "To force CMPro to use a particular merging format (none/split/full). Only * do this if the emulator doesn't allow all three of the modes!" */ forceMerging; forceNoDump; forcePacking; constructor(options) { this.header = options?.header ?? ''; this.forceMerging = options?.forceMerging ?? 'split'; this.forceNoDump = options?.forceNoDump ?? 'obsolete'; this.forcePacking = options?.forcePacking ?? 'zip'; } getHeader() { return this.header; } } __decorate([ Expose({ name: 'header' }), __metadata("design:type", String) ], ClrMamePro.prototype, "header", void 0); __decorate([ Expose({ name: 'forcemerging' }), __metadata("design:type", String) ], ClrMamePro.prototype, "forceMerging", void 0); __decorate([ Expose({ name: 'forcenodump' }), __metadata("design:type", String) ], ClrMamePro.prototype, "forceNoDump", void 0); __decorate([ Expose({ name: 'forcepacking' }), __metadata("design:type", String) ], ClrMamePro.prototype, "forcePacking", void 0);