UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

83 lines (82 loc) 3.29 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); 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; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.IS_MOD = void 0; var decorators_1 = require("../decorators"); var base_1 = require("./base"); var enums_1 = require("./enums"); /** * MODe: send to LFS to change screen mode */ var IS_MOD = /** @class */ (function (_super) { __extends(IS_MOD, _super); function IS_MOD(data) { var _this = _super.call(this) || this; _this.Size = 20; _this.Type = enums_1.PacketType.ISP_MOD; _this.ReqI = 0; _this.Zero = 0; /** Set to choose 16-bit */ _this.Bits16 = 0; /** * Refresh rate - zero for default * * The refresh rate actually selected by LFS will be the highest available rate * that is less than or equal to the specified refresh rate. Refresh rate can * be specified as zero in which case the default refresh rate will be used. */ _this.RR = 0; /** 0 means go to window */ _this.Width = 0; /** 0 means go to window */ _this.Height = 0; _this.initialize(data); return _this; } __decorate([ (0, decorators_1.byte)() ], IS_MOD.prototype, "Size", void 0); __decorate([ (0, decorators_1.byte)() ], IS_MOD.prototype, "Type", void 0); __decorate([ (0, decorators_1.byte)() ], IS_MOD.prototype, "ReqI", void 0); __decorate([ (0, decorators_1.byte)() ], IS_MOD.prototype, "Zero", void 0); __decorate([ (0, decorators_1.int)() ], IS_MOD.prototype, "Bits16", void 0); __decorate([ (0, decorators_1.int)() ], IS_MOD.prototype, "RR", void 0); __decorate([ (0, decorators_1.int)() ], IS_MOD.prototype, "Width", void 0); __decorate([ (0, decorators_1.int)() ], IS_MOD.prototype, "Height", void 0); return IS_MOD; }(base_1.SendablePacket)); exports.IS_MOD = IS_MOD;