Socket
Socket
Sign inDemoInstall

cemu-smm

Package Overview
Dependencies
3
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

6

index.js

@@ -6,3 +6,4 @@ if (process.env.NODE_ENV === 'production') {

loadSaveSync: smm.loadSaveSync,
loadImage: smm.loadImage
loadImage: smm.loadImage,
loadCourse: smm.loadCourse
};

@@ -14,4 +15,5 @@ } else {

loadSaveSync: smm.loadSaveSync,
loadImage: smm.loadImage
loadImage: smm.loadImage,
loadCourse: smm.loadCourse
};
}
"use strict";
var createCourse = function () {
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(courseId, coursePath) {
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(coursePath, courseId) {
var _this = this;

@@ -324,4 +324,36 @@

return this[elements];
},
setTitle: function setTitle(title, writeCrc) {
for (var i = COURSE_NAME_OFFSET, j = 0; i < COURSE_NAME_OFFSET + COURSE_NAME_LENGTH; i += 2, j++) {
if (j < title.length) {
this[courseData].write(title.charAt(j), i, 'utf16le');
this[courseDataSub].write(title.charAt(j), i, 'utf16le');
} else {
this[courseData].writeUInt16BE(0, i);
this[courseDataSub].writeUInt16BE(0, i);
}
}
this.title = title.substr(0, COURSE_NAME_LENGTH / 2);
if (!!writeCrc) {
this.writeCrc();
}
},
setMaker: function setMaker(makerName, writeCrc) {
for (var i = COURSE_MAKER_OFFSET, j = 0; i < COURSE_MAKER_OFFSET + COURSE_MAKER_LENGTH; i += 2, j++) {
if (j < makerName.length) {
this[courseData].write(makerName.charAt(j), i, 'utf16le');
this[courseDataSub].write(makerName.charAt(j), i, 'utf16le');
} else {
this[courseData].writeUInt16BE(0, i);
this[courseDataSub].writeUInt16BE(0, i);
}
}
this.maker = makerName.substr(0, COURSE_MAKER_LENGTH / 2);
if (!!writeCrc) {
this.writeCrc();
}
}
};

@@ -49,2 +49,3 @@ "use strict";

var Tnl = require("./tnl");
var course = require("./course");

@@ -54,3 +55,4 @@ module.exports = {

loadSaveSync: loadSaveSync,
loadImage: loadImage
loadImage: loadImage,
loadCourse: course
};

@@ -57,0 +59,0 @@

@@ -695,3 +695,3 @@ "use strict";

_context15.next = 8;
return createCourse(i, coursePath);
return createCourse(coursePath, i);

@@ -764,3 +764,3 @@ case 8:

_context17.next = 8;
return createCourse(i, _coursePath2);
return createCourse(_coursePath2, i);

@@ -767,0 +767,0 @@ case 8:

{
"name": "cemu-smm",
"version": "1.2.0",
"version": "1.3.0",
"description": "This is a module to simplify all kinds of tasks with Loadiine Super Mario Maker save files and respectively Cemu",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -57,3 +57,3 @@ const Promise = require("bluebird");

async function createCourse (courseId, coursePath) {
async function createCourse (coursePath, courseId) {

@@ -81,3 +81,3 @@ return new Promise ((resolve) => {

for (let i = 0; i < COURSE_MAKER_LENGTH; i+=2) {
let charBuf = Buffer.allocUnsafe(2)
let charBuf = Buffer.allocUnsafe(2);
charBuf.writeUInt16BE(makerBuf.readUInt16BE(i));

@@ -159,4 +159,36 @@ if (charBuf.readUInt16BE(0) === 0) {

return this[elements];
},
setTitle: function (title, writeCrc) {
for (let i = COURSE_NAME_OFFSET, j = 0; i < COURSE_NAME_OFFSET + COURSE_NAME_LENGTH; i+=2, j++) {
if (j < title.length) {
this[courseData].write(title.charAt(j), i, 'utf16le');
this[courseDataSub].write(title.charAt(j), i, 'utf16le');
} else {
this[courseData].writeUInt16BE(0, i);
this[courseDataSub].writeUInt16BE(0, i);
}
}
this.title = title.substr(0, COURSE_NAME_LENGTH / 2);
if (!!writeCrc) {
this.writeCrc();
}
},
setMaker: function (makerName, writeCrc) {
for (let i = COURSE_MAKER_OFFSET, j = 0; i < COURSE_MAKER_OFFSET + COURSE_MAKER_LENGTH; i+=2, j++) {
if (j < makerName.length) {
this[courseData].write(makerName.charAt(j), i, 'utf16le');
this[courseDataSub].write(makerName.charAt(j), i, 'utf16le');
} else {
this[courseData].writeUInt16BE(0, i);
this[courseDataSub].writeUInt16BE(0, i);
}
}
this.maker = makerName.substr(0, COURSE_MAKER_LENGTH / 2);
if (!!writeCrc) {
this.writeCrc();
}
}
};

@@ -14,2 +14,3 @@ try {

const Tnl = require("./tnl");
const course = require("./course");

@@ -19,3 +20,4 @@ module.exports = {

loadSaveSync: loadSaveSync,
loadImage: loadImage
loadImage: loadImage,
loadCourse: course
};

@@ -22,0 +24,0 @@

@@ -313,3 +313,3 @@ const Promise = require("bluebird");

if (exists) {
this.courses[courseName] = await createCourse(i, coursePath);
this.courses[courseName] = await createCourse(coursePath, i);
}

@@ -331,3 +331,3 @@ resolve();

fs.accessSync(coursePath, fs.constants.R_OK | fs.constants.W_OK);
this.courses[courseName] = await createCourse(i, coursePath);
this.courses[courseName] = await createCourse(coursePath, i);
} catch (err) {

@@ -334,0 +334,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc