3ds-smdh 中文文档教程

发布于 7年前 浏览 23 项目主页 更新于 3年前

3ds-smdh

读取和写入 Nintendo 3DS SMDH 文件

API Reference

Classes

SMDH

Typedefs

TitleObject : Object
TitleBuffer : Buffer

正好是 0x200 字节长的 Buffer 对象

TitleObjects : Object.<TitleObject>
BitmapObject : Object

SMDH

Kind: global class

new SMDH([buffer])

读写 3DS SMDH 数据的类。

ParamTypeDescription
[buffer]BufferAn existing SMDH buffer to load

smdH.writeTitleBuffer(buffer, index) ⇒ SMDH

将标题缓冲区写入指定索引处的 SMDH 缓冲区

种类的实例方法SMDH
返回SMDH - 当前类

ParamTypeDescription
bufferTitleBufferThe buffer to write
indexIntegerThe index to write to

smdH.getTitle(index) ⇒ TitleObject

获取SMDH 中指定索引处的标题对象

Kind: SMDH

ParamTypeDescription
indexIntegerThe title index to read

smdH.getJapaneseTitle() ⇒ TitleObject

获取日文标题对象

KindSMDH
的实例方法

smdH.getEnglishTitle() ⇒ TitleObject

获取英文标题对象

Kind: SMDH

smdH.getFrenchTitle() ⇒ TitleObject

获取法语标题对象

KindSMDH

smdH.getGermanTitle() ⇒ TitleObject

获取德语标题对象

KindSMDH

smdH.getItalianTitle() ⇒ TitleObject

获取意大利语标题对象

KindSMDH

smdH.getSpanishTitle() ⇒ TitleObject

获取西班牙文标题对象

KindSMDH

smdH.getSimplifiedChineseTitle() ⇒ TitleObject

获取简体中文标题对象

Kind: SMDH的实例方法/一个

smdH.getKoreanTitle() ⇒ TitleObject

获取韩文标题对象

Kind: SMDH

smdH.getDutchTitle() ⇒ TitleObject

获取荷兰语标题对象

KindSMDH

smdH.getPortugueseTitle() ⇒ TitleObject

获取葡萄牙语标题对象

KindSMDH

smdH.getRussianTitle() ⇒ TitleObject

获取俄文标题对象

KindSMDH

smdH.getTraditionalChineseTitle() ⇒ TitleObject

获取繁体中文标题对象

KindSMDH的实例方法/一个

smdH.getAllTitles() ⇒ TitleObjects

获取带有所有标题对象的对象

Kind: SMDH 的实例方法

smdH.setTitle(index, shortDescription, longDescription, publisher) ⇒ SMDH

为指定索引设置SMDH中的标题

种类SMDH<的实例方法/代码>
返回SMDH - 当前类

ParamTypeDescription
indexIntegerThe title index to write to
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setJapaneseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置日语标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setEnglishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置英文标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setFrenchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置法语标题

KindSMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setGermanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置德语标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setItalianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置意大利标题

KindSMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setSpanishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置西班牙标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setSimplifiedChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置简体中文标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setKoreanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置韩文标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setDutchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置荷兰标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setPortugueseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置葡萄牙语标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setRussianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置俄文标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setTraditionalChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

设置繁体中文标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setAllTitles(shortDescription, longDescription, publisher) ⇒ SMDH

设置所有标题

种类SMDH
的实例方法 返回SMDH - 当前类

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.getSmallIcon([callback]) ⇒ Promise.&lt;PNG&gt;

获取作为 pngjs PNG 对象的小图标图像

KindSMDH
的实例方法 返回Promise.&lt;PNG&gt; - 带有 pngjs PNG 对象的承诺

ParamTypeDescription
[callback]functionAn optional node.js style callback

smdH.getLargeIcon([callback]) ⇒ Promise.&lt;PNG&gt;

获取作为 pngjs PNG 对象的小图标图像

KindSMDH
的实例方法 返回Promise.&lt;PNG&gt; - 带有 pngjs PNG 对象的承诺

ParamTypeDescription
[callback]functionAn optional node.js style callback

smdH.setIcon(bitmap, iconSize, [callback]) ⇒ Promise.&lt;Buffer&gt;

设置iconSize指定的图标

Kind: SMDH
的实例方法 返回Promise.&lt;Buffer&gt; - 当前的 SMDH 缓冲区

ParamTypeDescription
bitmapBitmapObjectA pngjs PNG-like object with RGBA bitmap data, width, and height. Must be either 24x24 or 48x48.
iconSizeIntegerThe destination icon size, 24 sets the small icon, and 48 sets the large icon
[callback]functionAn optional node.js style callback

smdH.setIcons(bitmap, [callback]) ⇒ Promise.&lt;buffer&gt;

设置 small 和大图标

种类SMDH
的实例方法 返回Promise.&lt;buffer&gt; - 当前SMDH数据缓冲区

ParamTypeDescription
bitmapBitmapObjectA square bitmap object
[callback]functionAn optional node.js style callback

smdH.getBuffer() ⇒ Buffer

获取当前SMDH buffer

KindSMDH
的实例方法 返回Buffer - SMDH 数据缓冲区

TitleObject : Object

种类:全局类型定义
Properties

NameTypeDescription
shortDescriptionStringThe short description
longDescriptionStringThe long description
publisherStringThe publisher

TitleBuffer : Buffer

正好是 0x200 字节长的 Buffer 对象

Kind: global typedef

TitleObjects : Object.&lt;TitleObject&gt;

种类:全局类型定义
属性

NameTypeDescription
japaneseTitleObjectThe Japanese title object
englishTitleObjectThe English title object
frenchTitleObjectThe French title object
germanTitleObjectThe German title object
italianTitleObjectThe Italian title object
spanishTitleObjectThe Spanish title object
simplifiedChineseTitleObjectThe Simplified Chinese title object
koreanTitleObjectThe Korean title object
dutchTitleObjectThe Dutch title object
portugueseTitleObjectThe Portuguese title object
russianTitleObjectThe Russian title object
traditionalChineseTitleObjectThe Traditional Chinese title object

BitmapObject : Object

种类:全局typedef
属性

NameTypeDescription
dataBufferRaw RGBA bitmap data buffer
widthIntegerImage width
heightIntegerImage height

3ds-smdh

Reads and writes Nintendo 3DS SMDH files

API Reference

Classes

SMDH

Typedefs

TitleObject : Object
TitleBuffer : Buffer

A Buffer object that is exactly 0x200 bytes long

TitleObjects : Object.<TitleObject>
BitmapObject : Object

SMDH

Kind: global class

new SMDH([buffer])

A class for reading and writing 3DS SMDH data.

ParamTypeDescription
[buffer]BufferAn existing SMDH buffer to load

smdH.writeTitleBuffer(buffer, index) ⇒ SMDH

Writes the title buffer to the SMDH buffer at the specified index

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
bufferTitleBufferThe buffer to write
indexIntegerThe index to write to

smdH.getTitle(index) ⇒ TitleObject

Gets the title object from the SMDH at the specified index

Kind: instance method of SMDH

ParamTypeDescription
indexIntegerThe title index to read

smdH.getJapaneseTitle() ⇒ TitleObject

Gets the Japanese title object

Kind: instance method of SMDH

smdH.getEnglishTitle() ⇒ TitleObject

Gets the English title object

Kind: instance method of SMDH

smdH.getFrenchTitle() ⇒ TitleObject

Gets the French title object

Kind: instance method of SMDH

smdH.getGermanTitle() ⇒ TitleObject

Gets the German title object

Kind: instance method of SMDH

smdH.getItalianTitle() ⇒ TitleObject

Gets the Italian title object

Kind: instance method of SMDH

smdH.getSpanishTitle() ⇒ TitleObject

Gets the Spanish title object

Kind: instance method of SMDH

smdH.getSimplifiedChineseTitle() ⇒ TitleObject

Gets the Simplified Chinese title object

Kind: instance method of SMDH

smdH.getKoreanTitle() ⇒ TitleObject

Gets the Korean title object

Kind: instance method of SMDH

smdH.getDutchTitle() ⇒ TitleObject

Gets the Dutch title object

Kind: instance method of SMDH

smdH.getPortugueseTitle() ⇒ TitleObject

Gets the Portuguese title object

Kind: instance method of SMDH

smdH.getRussianTitle() ⇒ TitleObject

Gets the Russian title object

Kind: instance method of SMDH

smdH.getTraditionalChineseTitle() ⇒ TitleObject

Gets the Traditional Chinese title object

Kind: instance method of SMDH

smdH.getAllTitles() ⇒ TitleObjects

Gets object with the all title objects

Kind: instance method of SMDH

smdH.setTitle(index, shortDescription, longDescription, publisher) ⇒ SMDH

Sets the title in the SMDH for the specified index

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
indexIntegerThe title index to write to
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setJapaneseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Japanese title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setEnglishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the English title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setFrenchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the French title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setGermanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the German title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setItalianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Italian title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setSpanishTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Spanish title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setSimplifiedChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Simplified Chinese title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setKoreanTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Korean title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setDutchTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Dutch title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setPortugueseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Portuguese title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setRussianTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Russian title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setTraditionalChineseTitle(shortDescription, longDescription, publisher) ⇒ SMDH

Sets the Traditional Chinese title

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.setAllTitles(shortDescription, longDescription, publisher) ⇒ SMDH

Sets all of the titles

Kind: instance method of SMDH
Returns: SMDH - The current class

ParamTypeDescription
shortDescriptionStringThe short description, max of 64 characters
longDescriptionStringThe long description, max of 128 characters
publisherStringThe publisher, max of 64 characters

smdH.getSmallIcon([callback]) ⇒ Promise.&lt;PNG&gt;

Get the small icon image as a pngjs PNG object

Kind: instance method of SMDH
Returns: Promise.&lt;PNG&gt; - A promise with a pngjs PNG object

ParamTypeDescription
[callback]functionAn optional node.js style callback

smdH.getLargeIcon([callback]) ⇒ Promise.&lt;PNG&gt;

Get the small icon image as a pngjs PNG object

Kind: instance method of SMDH
Returns: Promise.&lt;PNG&gt; - A promise with a pngjs PNG object

ParamTypeDescription
[callback]functionAn optional node.js style callback

smdH.setIcon(bitmap, iconSize, [callback]) ⇒ Promise.&lt;Buffer&gt;

Sets the icon specified with iconSize

Kind: instance method of SMDH
Returns: Promise.&lt;Buffer&gt; - The current SMDH buffer

ParamTypeDescription
bitmapBitmapObjectA pngjs PNG-like object with RGBA bitmap data, width, and height. Must be either 24x24 or 48x48.
iconSizeIntegerThe destination icon size, 24 sets the small icon, and 48 sets the large icon
[callback]functionAn optional node.js style callback

smdH.setIcons(bitmap, [callback]) ⇒ Promise.&lt;buffer&gt;

Sets both the small and large icons

Kind: instance method of SMDH
Returns: Promise.&lt;buffer&gt; - The current SMDH data buffer

ParamTypeDescription
bitmapBitmapObjectA square bitmap object
[callback]functionAn optional node.js style callback

smdH.getBuffer() ⇒ Buffer

Gets the current SMDH buffer

Kind: instance method of SMDH
Returns: Buffer - The SMDH data buffer

TitleObject : Object

Kind: global typedef
Properties

NameTypeDescription
shortDescriptionStringThe short description
longDescriptionStringThe long description
publisherStringThe publisher

TitleBuffer : Buffer

A Buffer object that is exactly 0x200 bytes long

Kind: global typedef

TitleObjects : Object.&lt;TitleObject&gt;

Kind: global typedef
Properties

NameTypeDescription
japaneseTitleObjectThe Japanese title object
englishTitleObjectThe English title object
frenchTitleObjectThe French title object
germanTitleObjectThe German title object
italianTitleObjectThe Italian title object
spanishTitleObjectThe Spanish title object
simplifiedChineseTitleObjectThe Simplified Chinese title object
koreanTitleObjectThe Korean title object
dutchTitleObjectThe Dutch title object
portugueseTitleObjectThe Portuguese title object
russianTitleObjectThe Russian title object
traditionalChineseTitleObjectThe Traditional Chinese title object

BitmapObject : Object

Kind: global typedef
Properties

NameTypeDescription
dataBufferRaw RGBA bitmap data buffer
widthIntegerImage width
heightIntegerImage height
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文